Power transmission line engineering carbon emission prediction method and device
By fusing structured and unstructured data through a multi-head attention mechanism and a BiLSTM network, the problem of inaccurate carbon emission prediction in power transmission line projects is solved, achieving high-precision and interpretable carbon emission prediction and supporting the low-carbon transformation of power transmission line projects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INST OF ECONOMIC & TECH STATE GRID HEBEI ELECTRIC POWER
- Filing Date
- 2025-12-08
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies are inaccurate in predicting carbon emissions in power transmission line projects, cannot effectively analyze the cross-correlation between structured and unstructured data, and the multicollinearity problem weakens the model's generalization ability, resulting in distorted responses to sudden policy factors and a lack of traceable explanatory power.
A carbon emission prediction model is constructed by using a multi-head attention mechanism and a BiLSTM network to generate temporal feature matrices and semantic vectors from structured and unstructured data, assigning weights using the multi-head attention mechanism, and combining the BiLSTM network for cross-modal data fusion.
It achieves high-precision prediction of carbon emissions, dynamically captures the changing patterns and influencing factors of multiple data sources, improves the accuracy and interpretability of the prediction model, and provides data-driven decision support for the low-carbon transformation of power transmission line projects.
Smart Images

Figure CN122021985A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the interdisciplinary field of artificial intelligence and energy systems, and in particular to a method and apparatus for predicting carbon emissions from power transmission line projects. Background Technology
[0002] As the global energy structure accelerates its transition to a low-carbon model, the accurate measurement and trend prediction of carbon emissions throughout the entire life cycle of power transmission line projects, as core infrastructure of the power system, has become a key technological link in achieving the "dual carbon" goal. Traditional carbon emission prediction models are mostly based on time series regression analysis constructed from historical operational data, failing to fully integrate information such as external policies, regulations, and the economic and technological environment. This results in a lag in response to unstructured influencing factors such as industry policy adjustments and changes in technical standards. While existing deep learning models can handle multi-source data inputs, they struggle to effectively analyze the cross-correlation between structured numerical features and textual semantic features. Furthermore, most black-box models cannot pinpoint the key driving factors of the prediction results, leading to a lack of traceable interpretability in the prediction conclusions and limiting their feasibility in engineering design and environmental decision-making.
[0003] Current technologies face significant bottlenecks in processing multimodal carbon emission data: First, the driving factors implicit in unstructured text are difficult to extract effectively by traditional structured models, and the semantic gap between textual features and numerical data leads to insufficient intermodal information interaction. Second, multicollinearity caused by redundant variables in high-dimensional feature spaces weakens the model's generalization ability, while conventional dimensionality reduction methods cannot achieve feature optimization while preserving key textual semantics. These problems often result in predictive models exhibiting distorted responses to sudden policy factors and failing to accurately capture key driving mechanisms in practical engineering, hindering the in-depth application of digital carbon reduction technologies. Summary of the Invention
[0004] This application provides a method and apparatus for predicting carbon emissions from power transmission line projects, in order to solve the problem of inaccurate carbon emission prediction in existing technologies for power transmission line projects.
[0005] In a first aspect, this application provides a method for predicting carbon emissions from power transmission line projects, including: The historical carbon emission data of the transmission line project under test and the external influencing factors affecting the carbon emission data are obtained, and a time-series feature matrix is generated based on the historical carbon emission data, and a semantic vector is generated based on the external influencing factors. A multi-head attention mechanism is used to assign weights to the temporal feature matrix and the semantic vector, and a fused feature vector is generated based on the temporal feature matrix, the semantic vector, the weights of the temporal feature matrix, and the weights of the semantic vector. The fused feature vector is input into the carbon emission prediction model, which outputs the carbon emission prediction value of the transmission line project under test. The carbon emission prediction model is constructed based on a BiLSTM network.
[0006] Secondly, this application provides a carbon emission prediction device for power transmission line projects, comprising: The acquisition module is used to acquire historical carbon emission data of the transmission line project under test and external influencing factors affecting the carbon emission data, and generate a time-series feature matrix based on the historical carbon emission data, and generate a semantic vector based on the external influencing factors. The fusion module is used to assign weights to the temporal feature matrix and the semantic vector using a multi-head attention mechanism, and to generate a fused feature vector based on the temporal feature matrix, the semantic vector, the weights of the temporal feature matrix, and the weights of the semantic vector. The prediction module is used to input the fused feature vector into the carbon emission prediction model and output the carbon emission prediction value of the transmission line project under test. The carbon emission prediction model is constructed based on a BiLSTM network.
[0007] This application provides a method and apparatus for predicting carbon emissions from power transmission line projects. The method involves acquiring historical carbon emission data and external influencing factors of the power transmission line project under test, generating a time-series feature matrix based on the historical carbon emission data, and generating a semantic vector based on the external influencing factors. A multi-head attention mechanism is used to assign weights to the time-series feature matrix and semantic vector, and a fused feature vector is generated based on the time-series feature matrix, the semantic vector, the weights of the time-series feature matrix, and the weights of the semantic vector. The fused feature vector is then input into a carbon emission prediction model, which outputs the predicted carbon emission value of the power transmission line project under test. The carbon emission prediction model is constructed based on a BiLSTM network. This application achieves comprehensive utilization of multiple data sources by simultaneously acquiring historical carbon emission data and external influencing factors of the transmission line project under test, and generating time-series feature matrices and semantic vectors respectively. This helps to more comprehensively capture the changing patterns and influencing factors of carbon emissions. Furthermore, by using a multi-head attention mechanism to generate weights for different features, the influence of different features on the final prediction result can be dynamically adjusted, allowing the prediction model to pay more attention to features that have a significant impact on the prediction result, thereby improving the accuracy of the prediction. At the same time, the effective combination of time-series feature matrices and semantic vectors fully utilizes the advantages of both types of features, enhances the expressive power of the features, and helps to improve the performance of the carbon emission prediction model. In addition, this application can more accurately predict the carbon emission values of the transmission line project under test, providing stronger support for project planning and the formulation of energy conservation and emission reduction measures, and contributing to more efficient energy utilization and more environmentally friendly project construction. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0009] Figure 1 This is a flowchart illustrating the carbon emission prediction method for power transmission line projects provided in the embodiments of this application; Figure 2 This is a schematic diagram of the calculation process of empirical mode decomposition provided in the embodiments of this application; Figure 3 This is a graph showing the changes in index coefficients during the lasso regression process provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the BiLSTM network provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the carbon emission prediction device for power transmission line engineering provided in the embodiments of this application. Detailed Implementation
[0010] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0011] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0012] Due to the inaccuracy of current carbon emission prediction technologies in power transmission line projects, there is an urgent need to construct a dynamic prediction system that integrates multi-source heterogeneous data. An ideal solution should overcome the limitations of traditional single-modal modeling by deeply coupling structured time-series data with unstructured text. It also requires designing an adaptive feature selection mechanism to retain multimodal indicators with significant explanatory power for carbon emissions during dimensionality reduction. This necessitates innovative design of a collaborative mechanism between a multimodal feature fusion architecture and cross-modal prediction algorithms, thereby driving the evolution of carbon emission management in power transmission projects towards intelligence and precision.
[0013] Therefore, this application proposes a method for predicting carbon emissions from power transmission line projects. It extracts long-term and short-term time-series features by performing modal decomposition on structured data such as historical carbon emission data. For unstructured data, such as external impact data affecting carbon emissions, it first extracts influencing factor indicators to construct an initial feature pool. Then, it uses a lasso regression-based algorithm platform to screen key features that significantly impact carbon emissions from power transmission line projects. Regularization is then used to reduce computational complexity and effectively handle multicollinearity, thereby improving the accuracy of subsequent predictions. Finally, TextCNN technology is used to reconstruct the relevant text data from the screening results into semantic vector modalities and incorporate them into the model. A multimodal deep learning framework is constructed based on internal and external multi-source data features, and a multi-head attention mechanism is introduced to adaptively allocate the interaction weights of structured and unstructured features. A BiLSTM network is combined to capture the temporal dependencies of cross-modal datasets, achieving deep fusion of multi-source heterogeneous data.
[0014] Based on this, this application utilizes an integrated algorithm system based on lasso regression, neural networks, and multimodal deep learning to output a visual explanation of the carbon emission prediction results and key driving factors of transmission line projects. This effectively quantifies the impact of internal historical data and external factors such as industry policies on the carbon emission changes of transmission line projects and predicts future trends, providing intelligent support for the carbon reduction transformation of transmission line projects under the new power system.
[0015] Figure 1 The implementation flowchart of the carbon emission prediction method for power transmission line projects provided in this application embodiment is described in detail below: In step 101, historical carbon emission data of the transmission line project under test and external influencing factors affecting carbon emission data are obtained, and a time-series feature matrix is generated based on the historical carbon emission data, and a semantic vector is generated based on the external influencing factors.
[0016] In this embodiment, historical carbon emission data of the transmission line project under test and external influencing factors affecting the carbon emission data are obtained from the power grid enterprise database and the Internet. Then, a time-series feature matrix is generated using the historical carbon emission data, and a semantic vector is generated using the external influencing factors.
[0017] In constructing carbon emission prediction models for power transmission line projects, the acquisition of multi-source data and mode segmentation are fundamental steps that directly affect the input quality and prediction accuracy of subsequent carbon emission prediction models. The core of this process involves obtaining structured data (i.e., historical carbon emission data) and unstructured data (i.e., external influencing factors) from the enterprise databases of power grid companies and publicly available data sources, and then performing mode segmentation and preprocessing based on their characteristics to lay the foundation for multi-modal feature fusion.
[0018] In this embodiment, the collection of structured and unstructured data needs to cover the entire life cycle of the power transmission project and external influencing factors.
[0019] The structured data portion mainly includes historical carbon emission records and engineering parameters. Taking a transmission line project of a provincial power grid company as an example, the structured data includes monthly carbon emission data (unit: tons of CO2) provided by the provincial power grid company, covering mechanical fuel consumption and carbon emissions from material production during the construction phase, as well as line loss carbon emissions during the operation phase (calculated based on line length and load). In addition, engineering parameters such as conductor type (e.g., LGJ-400 / 35 steel-cored aluminum stranded wire), tower height, and construction machinery model need to be aligned with the carbon emission data in a time series manner to form a multi-dimensional time-series matrix.
[0020] Unstructured data primarily includes reports and documents related to power transmission line projects. Taking a provincial power grid company's power transmission line project as an example, the unstructured data includes, but is not limited to, published guidance documents on carbon emissions, local evaluation documents of the power transmission line project, monthly price fluctuation data from the carbon trading market, and patent texts for flexible DC transmission technology. This data can be obtained from various websites, academic databases, and corporate intranets, and stored in a distributed file system to ensure the diversity and timeliness of data sources.
[0021] This application embodiment achieves comprehensive utilization of multiple data sources by simultaneously acquiring historical carbon emission data and external influencing factors of the transmission line project under test, and generating time-series feature matrices and semantic vectors respectively, which helps to more comprehensively capture the changing patterns and influencing factors of carbon emissions.
[0022] In one possible implementation, generating a time-series feature matrix based on historical carbon emission data can include: Empirical mode decomposition (EMD) is used to perform mode decomposition on historical carbon emission data to obtain multiple intrinsic mode functions (IMFs). Each IMF is an oscillation component at different time scales in the historical carbon emission data. Each intrinsic mode function is normalized, and a sliding window with a preset window length and a preset sliding step size is used to slide across all normalized intrinsic mode functions to generate a time series feature matrix.
[0023] Optionally, structured data mode decomposition is a core step in extracting the intrinsic features of carbon emission time-series data from power transmission line projects. This application aims to improve prediction accuracy by using signal processing techniques to decompose complex carbon emission sequences into sub-components at different time scales. Specifically, Empirical Mode Decomposition (EMD) is used to perform mode decomposition on structured data (i.e., historical carbon emission data), decomposing the complex signal into several Intrinsic Mode Functions (IMFs) and a residual term. Each IMF represents the oscillation components at different time scales in the complex signal.
[0024] The core elements of Empirical Mode Decomposition (EMD) include an iterative mechanism for removing local trends and a multi-scale decomposition structure of the signal. EMD is based on three assumptions: First, the analyzed data must have two or more extreme points, i.e., at least one maximum and one minimum. Second, the time scale between extreme points is the sole determinant of the local temporal characteristics of the data. Third, if the data has no extreme points but only inflection points, the extreme values can be obtained through differentiation, and then the final decomposition result can be obtained through integration. The calculation process is as follows: Figure 2 As shown, the specific operation is as follows: (1) Extraction of extreme points and construction of envelope Let the original carbon emission time series signal be First, identify all its local maxima. and minimum point The upper envelope is generated by connecting the maxima and minima using the cubic spline interpolation method. With lower envelope The calculation formula is:
[0025]
[0026] in, This is the Spline function, used to generate and evaluate cubic spline interpolation polynomials.
[0027] (2) Calculation of local moving averages The mean values of the upper and lower envelopes constitute the local trend component of the signal, that is:
[0028] in, This represents the local trend component of the signal.
[0029] From the original carbon emission time series signal Subtract High-frequency oscillation candidate components were obtained. (i.e., intermediate signal), that is:
[0030] Next, examine the candidate components of the high-frequency oscillation. Does it meet two termination conditions: first, the number of extreme points and the number of zero points in the entire sequence are equal or differ by no more than one; second, at any given time, the upper and lower envelopes are symmetrical about the time axis. If satisfied, then the high-frequency oscillation candidate component is... As the first intrinsic mode function (IMF1), otherwise, high-frequency oscillation candidate components are used. Update the original carbon emission time series signal Repeat steps (1)-(2) until the condition is met.
[0031] (3) Separation of residual terms After obtaining the first intrinsic mode function (IMF1), the original carbon emission time series signal was used. Subtracting IMF1 yields the new signal, i.e., the residual term. ,Right now:
[0032] Then determine the residual term. Does the termination condition satisfy (i.e., firstly, the number of extreme points and the number of zero points in the entire sequence are equal or differ by no more than one; secondly, at any time, the upper and lower envelopes are symmetric about the time axis)? If satisfied, then by processing the residual terms... Process the remaining IMF components until the decomposition is complete; if not, utilize the residual terms. As a time-series signal of primary carbon emissions Repeat steps (1)-(3) until the condition is met.
[0033] The final IMF component is usually called the R component, and its final decomposition form is:
[0034] in, The first decomposition obtained Each intrinsic mode function (IMFi) is arranged in descending order of frequency. It satisfies the two conditions of the IMF (balance between extrema and zero crossings, and envelope symmetry about the zero axis). The residual term represents the long-term trend or DC component of the signal (i.e., it cannot be further decomposed into high-frequency oscillations).
[0035] For example, taking the carbon emission data of a transmission line project of a provincial power grid company as an example, EMD decomposition yields 3 IMF components and 1 residual term R component, namely: IMF1: High-frequency fluctuations with a cycle of 3-6 months, reflecting short-term energy consumption changes in construction machinery.
[0036] IMF2: Medium-frequency fluctuations with a cycle of 1-2 years, corresponding to the annual cyclical nature of carbon emissions from material transportation.
[0037] IMF3: Low-frequency fluctuations with a cycle of more than 3 years, reflecting the long-term impact of adjustments.
[0038] Residual items: show a continuous downward trend, with an average annual decrease of 2.1%, attributed to the cumulative effect of clean technology application.
[0039] Then, to eliminate the dimensional differences of the IFM components, each IFM is normalized, i.e.:
[0040] in, The normalized version One eigenmode function For the first One eigenmode function For the first The mean of the intrinsic mode functions, For the first The standard deviation of each intrinsic mode function.
[0041] After normalization, a time-series feature matrix is generated using a sliding window with a preset window length and a preset sliding step size. For example, with a preset window length of T=12 (covering the entire annual cycle) and a preset sliding step size of S=1 month, the normalized IMF sequence is converted into a time-series feature matrix.
[0042] Each time-series feature matrix It includes D IMF components within a 12-month window, with the output target being carbon emissions for the next D months. .in, For feature dimensions.
[0043] For example, when D=3, the corresponding time series feature matrix is:
[0044] Each time-series feature matrix It includes three IMF components within a 12-month window, with the output target being carbon emissions for the next three months. .
[0045] This application's embodiments utilize structured data mode decomposition (EMD) to transform the original carbon emission sequence into a multi-scale feature matrix. This preserves short-term fluctuation details while extracting long-term evolution trends, providing a high-information-density input for subsequent multi-modal fusion. Combining the adaptive characteristics of EMD with the temporal modeling capabilities of a sliding window, it can accurately capture the dynamic evolution mechanism of carbon emissions.
[0046] In one possible implementation, generating semantic vectors based on external influencing factors can include: Using lasso regression to extract key features of external influencing factors, the key features affecting the carbon emissions of the transmission line project under test are used as the first key feature. The first key feature is input into the semantic vector extraction model, which outputs a semantic vector. The semantic vector extraction model is built based on the Word2Vec model and the TextCNN model.
[0047] Optionally, to fully consider technical and other factors, the unstructured data external modality reconstruction in this embodiment aims to extract key driving factors related to carbon emissions from transmission line projects from text, reports, and technical documents, and transform them into numerical semantic vector features, thereby revealing the impact mechanism of external factors on carbon emissions. The specific process of unstructured data external modality reconstruction is as follows: key features are screened from external influencing factors using lasso regression; key external factors affecting carbon emissions from transmission line projects are screened out using regularized regression to obtain the first key feature; the text structure of documents, reports, patents, etc., related to the first key feature is transformed into a vector matrix structure represented by numerical values using the Word2Vec model; the processed vector matrix structure is used as input; ReLU is used as the activation function; local features in the vector matrix structure are extracted using the TextCNN model; and semantic vectors are formed through concatenation.
[0048] In this embodiment, the lasso regression algorithm platform is used to screen key feature indicators. Lasso regression can adapt to situations with a small sample size but a large number of indicators. At the same time, the system also performs well in variable selection and prediction.
[0049] Lasso regression is a compression estimation method. Its basic idea is to add the L1 norm as a constraint to the ordinary least squares method to compress the regression coefficients of the model, thereby eliminating unimportant variables. Its basic principle is as follows: Multiple regression, due to its larger number of explanatory variables, generally performs better than univariate regression. The calculation method is as follows:
[0050] in, It is the dependent variable with a sample size of m. It is an independent variable with a sample size of m and a dimension of p. It is the solution of regression coefficients. It is a random disturbance term with a mean of 0 and a variance of . The error terms follow a normal distribution and are independent of each other. Represents the identity matrix.
[0051] The coefficient solution can be estimated using the least squares method. Its main idea is to make To make it as small as possible, that is, to make To reach the minimum, that is:
[0052] Therefore, we can further obtain the estimated coefficient solution:
[0053] in, The predicted carbon emissions from power transmission line projects. As a predictor, For predictive factors The coefficient.
[0054] However, the coefficient solutions obtained using the least squares estimation method are often not accurate enough, and the explanatory power of the system is poor when there are many variables. Lasso regression is used in the objective function Add L1 norm As a constraint, the coefficient solution is obtained:
[0055] in, As the penalty factor, the complexity of lasso regression is determined by... To control, when When it is 0, Approaching infinity is equivalent to having no constraints; when When the value is appropriately large, some undetermined coefficients can be reduced to 0, ultimately resulting in a system with fewer variables. The value can be obtained through cross-validation.
[0056] See Figure 3 This demonstrates the effect of the penalty factor. As the value increases, each variable is gradually compressed to 0. Figure 3 The horizontal axis in the figure represents the penalty factor. The ordinate is used to control the strength of the penalty term. The stronger the penalty term, the more variable coefficients will be compressed to zero, thus affecting the sparsity of variable coefficients in the model. The ordinate represents the magnitude of the variable coefficients. Figure 3 Each curve in the graph represents the coefficient of a variable as... The path of change. With The increase in value, Figure 3 The curves in the model will gradually decrease, and some curves will eventually drop to zero, which means that the corresponding variable coefficients have been compressed to zero and thus removed from the model.
[0057] For example, taking the carbon emission data of a provincial power grid company's transmission line project as an example, a total of 20 feature vectors affecting the carbon emission of transmission line projects were selected, as shown in Table 1. The degree of influence of these variables varies.
[0058] Table 1. Classification of Key Feature Indicators of Unstructured Text
[0059] For situations where time-series data for influencing factor indicators are missing or unavailable, interpolation and moving average methods are used to fill in the missing data. The system based on lasso regression prediction performs regression analysis on the aforementioned 20 characteristic variables and then filters and reduces dimensionality. For example... Figure 3 In the diagram, dashed lines 1 and 2 represent the minimum standard error (MinSE) and minimum mean square error (MinMSE) indicators, respectively. MinMSE is generally chosen as the optimal parameter. The point above it represents the number of non-zero variables to retain, meaning that the number of key indicators selected is 7. At this point, the penalty factor... The value was 0.0102. After regression, the final result retained 7 feature variables, including 2 positive variables. This indicates that there are 5 negative variables, using... The details are as follows: Table 2 Key Influencing Variables of Carbon Emissions from Transmission Line Projects
[0060] The table above shows seven explanatory variables with non-zero coefficients obtained through lasso regression. The key features selected need to have their semantic information extracted from the original text and converted into numerical vectors for model input.
[0061] In addition, the semantic vector extraction process is as follows: (1) Word2Vec word vector training, for example, using the Gensim library to train a word embedding model with a window size of 5, a dimension of 100, and a minimum word frequency of 5.
[0062] (2) TextCNN local feature extraction, including input layer, convolutional layer, pooling layer and feature concatenation.
[0063] The input layer maps the segmented text into a word vector matrix. L=200 is the maximum length of this article, and d=100 is the word vector dimension.
[0064] Convolutional layer: Three types of convolutional kernels with dimensions of 2*100, 3*100, and 4*100 are used to perform convolution operations on the word vector matrix to obtain feature map C.
[0065]
[0066] in, To use width The first convolution Each feature map For convolution operations, For size The convolution kernel parameter matrix, To cover to Submatrix of positional word vectors, For the first Bias terms for each convolution kernel.
[0067] To improve training speed, ReLU is used as the activation function to perform a non-linear transformation on the convolutional feature map:
[0068] in, The feature map after activation function processing. The activation function introduces a nonlinear transformation to suppress negative noise.
[0069] Pooling layer: The maximum value in each feature map is selected as the pooling result, resulting in a 64-dimensional feature.
[0070] Feature concatenation: The three convolutional kernels generate a total of 192-dimensional vectors (64... 3) Representing local semantic patterns of text.
[0071] This application's embodiments reconstruct unstructured data from external modalities, transforming text into high-information-density semantic vectors. This process preserves the semantic relationships of the original text while extracting key driving factors through statistical filtering and deep learning. This process provides interpretable external feature inputs for multimodal fusion, significantly improving the carbon emission prediction model's responsiveness to external factors.
[0072] In one possible implementation, after obtaining historical carbon emission data and external influencing factors of the transmission line project under test, the method may further include: Linear interpolation was used to fill missing values in historical carbon emission data, and z-score standardization was used to eliminate the dimensions of historical carbon emission data. External influencing factors are segmented using word segmentation tools, and an initial feature index pool is constructed for the segmented external influencing factors. Accordingly, a time-series feature matrix is generated based on historical carbon emission data, and a semantic vector is generated based on external influencing factors, including: A time-series feature matrix is generated based on historical carbon emission data after missing value imputation and dimension elimination, and a semantic vector is generated based on the initial feature index pool.
[0073] Optionally, structured data preprocessing needs to address the issues of missing data and dimensional differences. Linear interpolation is used for missing value imputation, and z-score standardization is used for dimensional elimination. For unstructured data, word segmentation tools are used for word segmentation, and the external influencing factors after word segmentation are used to construct an initial feature index pool.
[0074] The preprocessing of structured data consists of two steps: The first step is filling in missing values.
[0075] Using linear interpolation to fill in missing values in historical carbon emission data can include: Obtain the first and second valid values for each missing time point. The first valid value is the nearest neighboring valid value counting backwards from each missing time point, and the second valid value is the nearest neighboring valid value counting forwards from each missing time point. Using the first valid value, the second valid value, the time point of the first valid value, and the time point of the second valid value for each missing time point, the missing value corresponding to the missing time point is calculated.
[0076] Optionally, the nearest neighboring valid value (i.e., the first valid value) to the time point corresponding to each missing value is obtained, and the nearest neighboring valid value (i.e., the second valid value) to the time point corresponding to each missing value is obtained. Then, the missing value corresponding to the corresponding missing time point is calculated using the first valid value, the second valid value, the time point corresponding to the first valid value, and the time point corresponding to the second valid value.
[0077] For example, taking the carbon emission data of a provincial power grid company's transmission line project as an example, approximately 14% of the fields in the original data are missing, including some months' machine shift records that were not entered. To fill in the missing values, linear interpolation is used.
[0078] in, For missing values, The first valid value, The second valid value, The time point corresponding to the first valid value. The time point corresponding to the second valid value. The time points corresponding to the missing values.
[0079] The second process is dimension elimination.
[0080] Z-score standardization can be used to eliminate the dimension of historical carbon emission data, which may include: Calculate the characteristic mean and standard deviation of historical carbon emission data; Using the historical carbon emission data, the characteristic mean and standard deviation of the historical carbon emission data, obtain the historical carbon emission data with the dimension eliminated.
[0081] Optionally, input the characteristic mean and standard deviation into the z-score standardization formula to obtain the historical carbon emission data with the dimension eliminated. The z-score standardization formula is:
[0082] Where, is the data after dimension elimination, is the original data, is the characteristic mean, is the standard deviation.
[0083] The preprocessing of unstructured data is as follows: (1) Use the pdfplumber library in Python to extract the file text and remove the header, footer and irrelevant charts.
[0084] (2) Use a word segmentation tool to segment the text and filter out stop words (such as "de", "shi").
[0085] (3) Construct an initial feature index pool, as shown in Table 1, for subsequent feature extraction.
[0086] In the process of multi-source data integration, data heterogeneity and time synchronization also need to be noted. The update frequency of unstructured text is different from the monthly collection cycle of structured data. Therefore, the embodiment of this application designs a dynamic sliding window mechanism. For low-frequency text data, its features are persisted within the window period until they are covered by new data; for high-frequency indicators, they are aligned with structured data through monthly mean aggregation. In addition, the dimension difference between text features and numerical features may affect the convergence speed of the carbon emission prediction model. Therefore, the two types of features are normalized separately before fusion to ensure the reasonable distribution of attention weights.
[0087] In step 102, the multi-head attention mechanism is used to allocate weights to the time series feature matrix and the semantic vector, and a fused feature vector is generated based on the time series feature matrix, the semantic vector, the weights of the time series feature matrix and the weights of the semantic vector.
[0088] In this embodiment, multimodal feature fusion is the core step in integrating structured temporal feature matrices and unstructured semantic vectors. A multi-head attention mechanism dynamically allocates weights to different modal features and generates a high-information-density fusion vector. Specifically, a multi-head attention mechanism is constructed to assign weights to the temporal feature matrix and semantic vectors, generating a fusion feature vector.
[0089] This application utilizes a multi-head attention mechanism to weight temporal features and semantic vectors, dynamically adjusting the influence of different features on the final prediction result. This allows the carbon emission prediction model to focus more on features that significantly impact the prediction outcome, thereby improving prediction accuracy. Simultaneously, by generating a fused feature vector, temporal and semantic features are effectively combined, fully leveraging the advantages of both types of features and enhancing their expressive power, thus contributing to improved performance of the carbon emission prediction model.
[0090] In one possible implementation, a multi-head attention mechanism is used to assign weights to the temporal feature matrix and semantic vector, which may include: Map the time-series feature matrix to the first query vector, the first key vector, and the first value vector; Map the semantic vector to the second query vector, the second key vector, and the second value vector; A multi-head attention mechanism is used to calculate the weights of the temporal feature matrix for the first query vector, the first key vector, and the first value vector; A multi-head attention mechanism is used to calculate the weights of the semantic vector from the second query vector, the second key vector, and the second value vector.
[0091] Optionally, for the structured time-series feature matrix, the IMF component matrix after mode decomposition and normalization... For example, T=12, (IMF1, IMF2, IMF3).
[0092] For unstructured semantic vectors, the semantic vectors extracted by TextCNN ,for example, =10, .
[0093] A linear mapping generates a query vector, a key vector, and a value vector; that is, the structured time-series feature matrix is mapped to the first query vector. First key vector and the first value vector Unstructured semantic vectors are mapped to the second query vector. Second key vector Second value vector ,Right now:
[0094]
[0095] in, , , (All belong to) ) represents the weights of the time-series feature matrix. , , (All belong to) ) represents the weight of the semantic vector, and , , , , , Unify the feature dimensions to This ensures dimensional consistency in cross-modal interactions.
[0096] Then, the interaction between the structured temporal feature matrix and the unstructured semantic vector is achieved through scaled dot product attention, i.e.:
[0097] in, The degree of matching between the temporal feature matrix and the semantic vector at each time step. for , , dimensionality This is a scaling factor to prevent the dot product value from becoming too large, which could lead to gradient instability.
[0098] In one possible implementation, a fused feature vector is generated based on the temporal feature matrix, semantic vector, weights of the temporal feature matrix, and weights of the semantic vector. This may include: The first eigenvector is obtained by using the temporal feature matrix and its weights. The second feature vector is obtained by using the semantic vector and its weights. A fused feature vector is generated using the first and second feature vectors.
[0099] Optionally, a first feature vector is calculated using the temporal feature matrix and the corresponding weights, and a second feature vector is calculated using the semantic vector and the corresponding weights. Accordingly, a fused feature vector is obtained by fusing the first and second feature vectors.
[0100] Specifically, a multi-head attention mechanism is employed to facilitate simultaneous attention to various external input parameters. The formula is as follows:
[0101]
[0102] in, , , The first One thing to note , , The weight matrix, This is for the output of the multi-head attention splicing mechanism.
[0103] The embodiments of this application, through multimodal feature fusion, enable the carbon emission prediction model to adaptively capture the interaction effects of structured temporal fluctuations and external factors, significantly improving prediction accuracy.
[0104] In step 103, the fused feature vector is input into the carbon emission prediction model, and the carbon emission prediction value of the transmission line project to be tested is output. The carbon emission prediction model is constructed based on the BiLSTM network.
[0105] In this embodiment, the fused feature vector is input into the carbon emission prediction model built based on the BiLSTM network to capture the temporal dependency of cross-modal data and output the carbon emission prediction value of the transmission line project.
[0106] The embodiments of this application employ a carbon emission prediction model based on a BiLSTM network. The BiLSTM network can better process sequence data and capture long-term dependencies in the data. It has good adaptability to predicting carbon emission data with time series characteristics, which helps to improve the accuracy and stability of the prediction.
[0107] Among them, the carbon emission prediction model is a dynamic prediction system, which aims to output carbon emission prediction values through cross-modal time series modeling.
[0108] BiLSTM networks are a variant of recurrent neural networks designed to process sequential data through forward and backward propagation. They can simultaneously consider past and future information to capture long-term dependencies. Their basic structure is as follows: Figure 4 As shown. The design of the cross-modal BiLSTM network is as follows: The core of the BiLSTM network is a bidirectional LSTM layer, which consists of two LSTM units: one processes the input sequence in forward order, and the other processes the input sequence in reverse order.
[0109] Forward LSTM unit: Propagate forward from t=1 to t=T to compute the hidden state. .
[0110] Reverse LSTM unit: Backpropagation from t=T to t=1 to compute hidden states.
[0111] Hidden state concatenation: The final hidden state at each time step is ,in, This represents the number of cells in a single-layer LSTM.
[0112] Each LSTM unit contains components such as an input gate, a forget gate, an output gate, and a storage unit. Then, by concatenating their hidden states, the outputs of the forward and backward LSTMs are merged. The hidden state sequence is then weighted and summed to generate a context vector c, i.e.:
[0113] in, , and All of these are trainable parameters. For time step Attention weights reflect The importance of time-specific features for prediction.
[0114] The context vector c is mapped through a fully connected layer to the predicted carbon emissions for the next D months, i.e.:
[0115] in, and These are the output layer parameters.
[0116] The mean squared error is then used to measure the deviation between the predicted and actual values, i.e.:
[0117] in, For the sample size, For the first The future sample The actual carbon emissions for a month.
[0118] In addition, the multi-head attention mechanism statically assigns weights to the importance of features from different modalities to obtain a fused feature vector; while the BiLSTM network is designed to capture the patterns of feature changes over time after fusion, such as the lag in the influence of certain information, which requires dynamic adjustment of the alignment time window during fusion.
[0119] In one possible implementation, before inputting the fused feature vector into the carbon emission prediction model and outputting the predicted carbon emission value of the transmission line project under test, the method may further include: Subsequences of the time-series feature matrix and semantic vector features After time-dimensional alignment, fused features are generated through a control mechanism. ,Right now:
[0120] in, It is the sigmoid activation function. , All of these are training parameters.
[0121] In one possible implementation, after inputting the fused feature vector into the carbon emission prediction model and outputting the predicted carbon emission value of the transmission line project under test, the method may further include: The feature importance weights are calculated using carbon emission predictions and fused feature vectors. By using feature importance weights and fused feature vectors, an activation map is calculated to quantify the contribution intensity of the first key feature to the predicted carbon emissions of the transmission line project under test.
[0122] Optionally, the embodiments of this application provide carbon emission prediction values. Seeking information on fusion features gradient Then, the gradients are averaged over the time dimension to obtain the feature importance weights. ,Right now:
[0123] Finally, weighted fusion features are used to generate an activation map to quantify the contribution strength of key drivers, and an interpretable analysis report can be generated. The contribution strength calculation formula is as follows:
[0124] The embodiments of this application construct a dynamic prediction system, which not only achieves high-precision carbon emission prediction, but also reveals the mechanism of action of external factors through interpretability analysis. This system provides a data-driven decision-making tool for the low-carbon transformation of power grid companies' transmission projects.
[0125] This application provides a method for predicting carbon emissions from power transmission line projects. It acquires historical carbon emission data and external influencing factors of the project, generates a time-series feature matrix based on the historical carbon emission data, and generates a semantic vector based on the external influencing factors. A multi-head attention mechanism is used to assign weights to the time-series feature matrix and semantic vector, and a fused feature vector is generated based on the time-series feature matrix, semantic vector, the weights of the time-series feature matrix, and the weights of the semantic vector. The fused feature vector is then input into a carbon emission prediction model, which outputs the predicted carbon emission value of the power transmission line project. The carbon emission prediction model is constructed based on a BiLSTM network. This application achieves comprehensive utilization of multiple data sources by simultaneously acquiring historical carbon emission data and external influencing factors of the transmission line project under test, and generating time-series feature matrices and semantic vectors respectively. This helps to more comprehensively capture the changing patterns and influencing factors of carbon emissions. Furthermore, by using a multi-head attention mechanism to generate weights for different features, the influence of different features on the final prediction result can be dynamically adjusted, allowing the prediction model to pay more attention to features that have a significant impact on the prediction result, thereby improving the accuracy of the prediction. At the same time, the effective combination of time-series feature matrices and semantic vectors fully utilizes the advantages of both types of features, enhances the expressive power of the features, and helps to improve the performance of the carbon emission prediction model. In addition, this application can more accurately predict the carbon emission values of the transmission line project under test, providing stronger support for project planning and the formulation of energy conservation and emission reduction measures, and contributing to more efficient energy utilization and more environmentally friendly project construction.
[0126] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0127] The following are device embodiments of this application. For details not described in detail, please refer to the corresponding method embodiments described above.
[0128] Figure 5 A schematic diagram of the carbon emission prediction device for power transmission line engineering provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiment of this application are shown, and are described in detail below: like Figure 5 As shown, the carbon emission prediction device 5 for power transmission line projects includes: The acquisition module 51 is used to acquire historical carbon emission data of the transmission line project under test and external influencing factors affecting carbon emission data, and generate a time series feature matrix based on historical carbon emission data, and generate a semantic vector based on external influencing factors. The fusion module 52 is used to assign weights to the temporal feature matrix and semantic vector using a multi-head attention mechanism, and to generate a fused feature vector based on the temporal feature matrix, semantic vector, weights of the temporal feature matrix, and weights of the semantic vector. The prediction module 53 is used to input the fused feature vector into the carbon emission prediction model and output the carbon emission prediction value of the transmission line project to be tested. The carbon emission prediction model is constructed based on the BiLSTM network.
[0129] This application provides a carbon emission prediction device for transmission line projects. It acquires historical carbon emission data and external influencing factors of the transmission line project under test, generates a time-series feature matrix based on the historical carbon emission data, and generates a semantic vector based on the external influencing factors. A multi-head attention mechanism is used to assign weights to the time-series feature matrix and semantic vector, and a fused feature vector is generated based on the time-series feature matrix, semantic vector, the weights of the time-series feature matrix, and the weights of the semantic vector. The fused feature vector is input into a carbon emission prediction model, which outputs the predicted carbon emission value of the transmission line project under test. The carbon emission prediction model is constructed based on a BiLSTM network. This application achieves comprehensive utilization of multiple data sources by simultaneously acquiring historical carbon emission data and external influencing factors of the transmission line project under test, and generating time-series feature matrices and semantic vectors respectively. This helps to more comprehensively capture the changing patterns and influencing factors of carbon emissions. Furthermore, by using a multi-head attention mechanism to generate weights for different features, the influence of different features on the final prediction result can be dynamically adjusted, allowing the prediction model to pay more attention to features that have a significant impact on the prediction result, thereby improving the accuracy of the prediction. At the same time, the effective combination of time-series feature matrices and semantic vectors fully utilizes the advantages of both types of features, enhances the expressive power of the features, and helps to improve the performance of the carbon emission prediction model. In addition, this application can more accurately predict the carbon emission values of the transmission line project under test, providing stronger support for project planning and the formulation of energy conservation and emission reduction measures, and contributing to more efficient energy utilization and more environmentally friendly project construction.
[0130] In one possible implementation, the acquisition module can be used for: Empirical mode decomposition (EMD) is used to perform mode decomposition on historical carbon emission data to obtain multiple intrinsic mode functions (IMFs). Each IMF is an oscillation component at different time scales in the historical carbon emission data. Each intrinsic mode function is normalized, and a sliding window with a preset window length and a preset sliding step size is used to slide across all normalized intrinsic mode functions to generate a time series feature matrix.
[0131] In one possible implementation, the acquisition module can also be used for: Using lasso regression to extract key features of external influencing factors, the key features affecting the carbon emissions of the transmission line project under test are used as the first key feature. The first key feature is input into the semantic vector extraction model, which outputs a semantic vector. The semantic vector extraction model is built based on the Word2Vec model and the TextCNN model.
[0132] In one possible implementation, the fusion module can be used for: Map the time-series feature matrix to the first query vector, the first key vector, and the first value vector; Map the semantic vector to the second query vector, the second key vector, and the second value vector; A multi-head attention mechanism is used to calculate the weights of the temporal feature matrix for the first query vector, the first key vector, and the first value vector; A multi-head attention mechanism is used to calculate the weights of the semantic vector from the second query vector, the second key vector, and the second value vector.
[0133] In one possible implementation, the fusion module can also be used for: The first eigenvector is obtained by using the temporal feature matrix and its weights. The second feature vector is obtained by using the semantic vector and its weights. A fused feature vector is generated using the first and second feature vectors.
[0134] In one possible implementation, the device may further include a quantization module, which can be used for: The feature importance weights are calculated using carbon emission predictions and fused feature vectors. By using feature importance weights and fused feature vectors, an activation map is calculated to quantify the contribution intensity of the first key feature to the predicted carbon emissions of the transmission line project under test.
[0135] In one possible implementation, the device may further include a preprocessing module, which can be used for: Linear interpolation was used to fill missing values in historical carbon emission data, and z-score standardization was used to eliminate the dimensions of historical carbon emission data. External influencing factors are segmented using word segmentation tools, and an initial feature index pool is constructed for the segmented external influencing factors. Accordingly, the acquisition module can be used for: A time-series feature matrix is generated based on historical carbon emission data after missing value imputation and dimension elimination, and a semantic vector is generated based on the initial feature index pool.
[0136] In one possible implementation, the preprocessing module can also be used for: Obtain the first and second valid values for each missing time point. The first valid value is the nearest neighboring valid value counting backwards from each missing time point, and the second valid value is the nearest neighboring valid value counting forwards from each missing time point. Using the first valid value, the second valid value, the time point of the first valid value, and the time point of the second valid value for each missing time point, the missing value corresponding to the missing time point is calculated.
[0137] In one possible implementation, the preprocessing module can also be used for: Calculate the characteristic mean and standard deviation of historical carbon emission data; By using historical carbon emission data, the characteristic mean and standard deviation of historical carbon emission data, dimensionless historical carbon emission data is obtained.
[0138] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0139] Those skilled in the art will recognize that the templates, units, and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0140] If the module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the above embodiments of the carbon emission prediction method for power transmission line projects. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory, a random access memory, an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0141] The above-described 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 of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for predicting carbon emissions from power transmission line projects, characterized in that, include: The historical carbon emission data of the transmission line project under test and the external influencing factors affecting the carbon emission data are obtained, and a time-series feature matrix is generated based on the historical carbon emission data, and a semantic vector is generated based on the external influencing factors. A multi-head attention mechanism is used to assign weights to the temporal feature matrix and the semantic vector, and a fused feature vector is generated based on the temporal feature matrix, the semantic vector, the weights of the temporal feature matrix, and the weights of the semantic vector. The fused feature vector is input into the carbon emission prediction model, which outputs the carbon emission prediction value of the transmission line project under test. The carbon emission prediction model is constructed based on a BiLSTM network.
2. The carbon emission prediction method for transmission line projects according to claim 1, characterized in that, The generation of the time-series feature matrix based on the historical carbon emission data includes: The historical carbon emission data is decomposed using empirical mode decomposition to obtain multiple intrinsic mode functions, each of which represents the oscillation component at different time scales in the historical carbon emission data. Each intrinsic mode function is normalized, and a sliding window with a preset window length and a preset sliding step size is used to slide across all normalized intrinsic mode functions to generate the time-series feature matrix.
3. The carbon emission prediction method for transmission line projects according to claim 1, characterized in that, The generation of semantic vectors based on the external influencing factors includes: Lasso regression was used to extract key features from the external influencing factors, and the key features that affect the carbon emissions of the transmission line project under test were used as the first key feature. The first key feature is input into the semantic vector extraction model, which outputs the semantic vector. The semantic vector extraction model is constructed based on the Word2Vec model and the TextCNN model.
4. The carbon emission prediction method for transmission line projects according to claim 1, characterized in that, The step of weighting the temporal feature matrix and the semantic vector using a multi-head attention mechanism includes: The time-series feature matrix is mapped to the first query vector, the first key vector, and the first value vector; Map the semantic vector to the second query vector, the second key vector, and the second value vector; A multi-head attention mechanism is used to calculate the weights of the temporal feature matrix from the first query vector, the first key vector, and the first value vector. A multi-head attention mechanism is used to calculate the weights of the semantic vector from the second query vector, the second key vector, and the second value vector.
5. The carbon emission prediction method for transmission line projects according to claim 1, characterized in that, The step of generating a fused feature vector based on the temporal feature matrix, the semantic vector, the weights of the temporal feature matrix, and the weights of the semantic vector includes: The first feature vector is obtained by using the time-series feature matrix and its weights. Using the semantic vector and its weights, a second feature vector is obtained; The fused feature vector is generated using the first feature vector and the second feature vector.
6. The carbon emission prediction method for transmission line projects according to claim 3, characterized in that, After inputting the fused feature vector into the carbon emission prediction model and outputting the predicted carbon emission value of the transmission line project to be tested, the method further includes: The feature importance weights are calculated using the predicted carbon emissions and the fused feature vector. Using the feature importance weights and the fused feature vectors, an activation map is calculated to quantify the contribution of the first key feature to the predicted carbon emissions of the transmission line project under test.
7. The carbon emission prediction method for transmission line projects according to claim 1, characterized in that, After obtaining historical carbon emission data and external influencing factors of the transmission line project under test, the method further includes: The missing values of the historical carbon emission data were filled using linear interpolation, and the dimensions of the historical carbon emission data were eliminated using z-score standardization. The external influencing factors are segmented using a word segmentation tool, and an initial feature index pool is constructed for the segmented external influencing factors. Accordingly, the generation of a time-series feature matrix based on the historical carbon emission data and the generation of a semantic vector based on the external influencing factors include: A time-series feature matrix is generated based on historical carbon emission data after missing value imputation and dimension elimination, and a semantic vector is generated based on the initial feature index pool.
8. The carbon emission prediction method for transmission line projects according to claim 7, characterized in that, The process of filling missing values in the historical carbon emission data using linear interpolation includes: Obtain the first and second valid values for each missing time point. The first valid value is the nearest neighboring valid value counting backwards from each missing time point, and the second valid value is the nearest neighboring valid value counting forwards from each missing time point. Using the first valid value, the second valid value, the time point of the first valid value, and the time point of the second valid value for each missing time point, the missing value corresponding to the missing time point is calculated.
9. The carbon emission prediction method for transmission line projects according to claim 7, characterized in that, The dimensionless elimination of the historical carbon emission data using z-fractional standardization includes: Calculate the characteristic mean and standard deviation of the historical carbon emission data; Using the historical carbon emission data, the characteristic mean and standard deviation of the historical carbon emission data, dimensionless historical carbon emission data is obtained.
10. A carbon emission prediction device for power transmission line projects, characterized in that, include: The acquisition module is used to acquire historical carbon emission data of the transmission line project under test and external influencing factors affecting the carbon emission data, and generate a time-series feature matrix based on the historical carbon emission data, and generate a semantic vector based on the external influencing factors. The fusion module is used to assign weights to the temporal feature matrix and the semantic vector using a multi-head attention mechanism, and to generate a fused feature vector based on the temporal feature matrix, the semantic vector, the weights of the temporal feature matrix, and the weights of the semantic vector. The prediction module is used to input the fused feature vector into the carbon emission prediction model and output the carbon emission prediction value of the transmission line project under test. The carbon emission prediction model is constructed based on a BiLSTM network.