Electric power carbon emission behavior analysis method and device, computer equipment and storage medium
By analyzing the electricity carbon emission behavior of high-energy-consuming enterprises using a multimodal deep learning model, the problems of data partiality and poor analytical versatility are solved, enabling accurate prediction and adjustment of electricity carbon emission behavior.
Patent Information
- Application Number
- CN202511623945.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-13
AI Technical Summary
Existing technologies for analyzing the carbon emissions behavior of high-energy-consuming enterprises suffer from data bias and poor universality of analysis methods, making it difficult for enterprises to accurately adjust their carbon emissions behavior.
By acquiring multi-source data related to electricity carbon emission behavior, extracting data features of various data types, constructing cross-domain interactive features, and using a multimodal deep learning model for periodic modeling and prediction, including processing of embedding layers, multi-head attention layers, and improved fully connected layers, the predicted results of electricity carbon emission behavior are output.
It enables accurate analysis of electricity carbon emission behavior, deeply explores the intrinsic connections between complex influencing factors, provides accurate prediction results, and helps enterprises adjust their electricity carbon emission behavior.
Smart Images

Figure CN121526046A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data processing technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for analyzing electricity carbon emission behavior. Background Technology
[0002] As major electricity consumers, high-energy-consuming enterprises have a significant impact on the overall environment and sustainable energy development due to their carbon emissions. Therefore, accurately analyzing the carbon emission behavior of high-energy-consuming enterprises is crucial for formulating effective energy conservation and emission reduction strategies.
[0003] Current methods for analyzing the carbon emissions behavior of high-energy-consuming enterprises have several limitations. Firstly, the data used for this analysis is often one-sided and fails to accurately reflect the complex influencing factors. Secondly, most analyses rely on simple statistical analysis or empirical models. Simple statistical analysis can only reveal superficial patterns and cannot delve into the intrinsic connections between complex influencing factors. Empirical models are typically based on limited experience in specific regions and time periods, lacking versatility. When applied to high-energy-consuming enterprises in different geographical areas and with different production types, they often fail to accurately analyze carbon emissions behavior. Therefore, current methods for analyzing the carbon emissions behavior of high-energy-consuming enterprises suffer from limitations in data acquisition and cannot accurately and deeply analyze carbon emission behavior. This leaves enterprises without clear direction when formulating energy-saving and emission-reduction measures based on the analysis results, hindering targeted and precise optimization of production processes and energy usage. In other words, it is detrimental to enterprises accurately adjusting their carbon emission behavior based on the analysis results. Summary of the Invention
[0004] Therefore, it is necessary to provide a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for analyzing electricity carbon emission behavior, which enables enterprises to accurately adjust their electricity carbon emission behavior based on the analysis results of electricity carbon emission behavior.
[0005] Firstly, this application provides a method for analyzing the carbon emission behavior of electricity, including:
[0006] Acquire target multi-source data related to electricity carbon emission behavior;
[0007] Extract data features corresponding to various data types from target multi-source data, and construct cross-domain interaction features by combining data features corresponding to at least two data types;
[0008] Periodic modeling of data features and cross-domain interaction features yields periodic dynamic change features;
[0009] The periodic dynamic change features are input into a multimodal deep learning model to obtain the prediction results of electricity carbon emission behavior. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer is used to perform cross-modal feature unified processing on the periodic dynamic change features and output the embedding feature matrix. The multi-head attention layer is used to output the multi-head attention result based on the embedding feature matrix. The improved fully connected layer is used to output the prediction results of electricity carbon emission behavior based on the multi-head attention result.
[0010] In one embodiment, acquiring target multi-source data associated with electricity carbon emission behavior includes:
[0011] Establish communication links with meteorological monitoring systems and power company monitoring systems;
[0012] Based on communication links, initial multi-source data related to power carbon emission behavior are obtained from meteorological monitoring systems and power enterprise monitoring systems;
[0013] The initial multi-source data is processed by handling missing values and normalizing the data to obtain the target multi-source data.
[0014] In one embodiment, cross-modal feature unification processing is performed on the periodically dynamically changing features to output an embedded feature matrix, including:
[0015] The periodic dynamic change characteristics are broken down into numerical characteristics and time-related characteristics;
[0016] The numerical features are mapped to a feature space of a preset dimension to obtain the first feature;
[0017] The time-type features are processed by sine and cosine encoding to obtain the second feature;
[0018] The first and second features are concatenated to output the embedded feature matrix.
[0019] In one embodiment, the multi-head attention result is output based on the embedded feature matrix, including:
[0020] Based on the embedded feature matrix and the multi-head mapping matrix configured in the multi-head attention layer, the attention result of each output head in the multi-head attention layer is calculated;
[0021] Based on the scaled dot product attention mechanism, the attention weight of each output head is calculated;
[0022] Based on the attention weight of each output head, the attention results of multiple output heads are fused to obtain a multi-head attention result.
[0023] In one embodiment, the predicted results of electricity carbon emission behavior are output based on the multi-head attention results, including:
[0024] Obtain the prediction results of the improved fully connected layer based on multi-head attention;
[0025] Based on the prediction results, determine the feature contribution of each data type and the feature interaction contribution between at least two data types;
[0026] If the loss function value of the prediction result does not meet the expected condition of the loss function, gradient propagation optimization is performed on the multimodal deep learning model based on the feature contribution and feature interaction contribution until the loss function value of the output prediction result meets the expected condition of the loss function, thus obtaining the prediction result of electricity carbon emission behavior.
[0027] In one embodiment, gradient propagation optimization is performed on the multimodal deep learning model based on feature contribution and feature interaction contribution, including:
[0028] Enhanced data features are obtained by enhancing data features based on feature contribution, and cross-domain interaction features composed of enhanced data features corresponding to at least two data types are enhanced based on feature interaction contribution to obtain enhanced cross-domain interaction features.
[0029] Anomaly detection is performed on enhanced data features and enhanced cross-domain interaction features. In the absence of anomalies, enhanced data features with a feature contribution greater than a preset contribution and enhanced cross-domain interaction features with a feature interaction contribution greater than a preset contribution are regarded as high feature contribution features.
[0030] We optimize the parameters of the gradient propagation path for features with high feature contribution in multimodal deep learning models.
[0031] Secondly, this application also provides a device for analyzing the carbon emission behavior of electricity, comprising:
[0032] The multi-source data acquisition module is used to acquire target multi-source data related to electricity carbon emission behavior;
[0033] The feature extraction module is used to extract data features corresponding to various data types from the target multi-source data, and to construct cross-domain interaction features by combining data features corresponding to at least two data types.
[0034] The periodic modeling module is used to perform periodic modeling on data features and cross-domain interaction features to obtain periodic dynamic change features;
[0035] The prediction result acquisition module is used to input periodically dynamic features into a multimodal deep learning model to obtain prediction results of electricity carbon emission behavior. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer is used to perform cross-modal feature unified processing on the periodically dynamic features and output an embedded feature matrix. The multi-head attention layer is used to output multi-head attention results based on the embedded feature matrix. The improved fully connected layer is used to output prediction results of electricity carbon emission behavior based on the multi-head attention results.
[0036] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above embodiments.
[0037] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above embodiments.
[0038] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps in the above embodiments.
[0039] The aforementioned methods, devices, computer equipment, computer-readable storage media, and computer program products for analyzing electricity carbon emission behavior first acquire target multi-source data associated with electricity carbon emission behavior. This avoids the bias of data used in electricity carbon emission behavior analysis and ensures a true reflection of the complex influencing factors of electricity carbon emission behavior. Then, data features corresponding to various data types are extracted from the target multi-source data. By combining data features corresponding to at least two data types, cross-domain interactive features are constructed to deeply explore the intrinsic relationships between complex influencing factors. Furthermore, the data features and cross-domain interactive features are periodically modeled to obtain periodic dynamic change features that capture dynamic changes. These periodic dynamic change features are then input into a multimodal deep learning model to obtain prediction results for electricity carbon emission behavior. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer performs unified cross-modal feature processing on the periodic dynamic change features and outputs an embedded feature matrix. The multi-head attention layer outputs multi-head attention results based on the embedded feature matrix. The improved fully connected layer outputs prediction results for electricity carbon emission behavior based on the multi-head attention results. In other words, multimodal deep learning models are not built based on specific conditions, have better generality, and can be used to accurately analyze electricity carbon emission behavior. By adopting the above process, the limitations of data acquisition can be overcome, and further, through in-depth exploration of the intrinsic relationships between complex influencing factors, periodic modeling, and multimodal deep learning model processing, carbon emission behavior can be accurately and thoroughly analyzed, thereby obtaining accurate predictions of electricity carbon emission behavior. This allows enterprises to precisely adjust their electricity carbon emission behavior based on the analysis results. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a diagram illustrating the application environment of the electricity carbon emission behavior analysis method in one embodiment.
[0042] Figure 2 This is a flowchart illustrating a method for analyzing the carbon emission behavior of electricity in one embodiment;
[0043] Figure 3 This is a schematic diagram of the process of controlling carbon emission analysis using a multimodal Transformer model in one embodiment;
[0044] Figure 4This is a schematic diagram comparing the predicted and actual electricity consumption values in one embodiment.
[0045] Figure 5 This is a schematic diagram comparing the predicted and actual values of dynamic carbon emission factors in one embodiment.
[0046] Figure 6 This is a structural block diagram of a power carbon emission behavior analysis device in one embodiment;
[0047] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] The electricity carbon emission behavior analysis method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, server 102 communicates with data system 104 via a network. The data storage system can store the data that server 102 needs to process. The data storage system can be integrated onto server 102 or placed on a cloud or other network server. Server 102 can first obtain target multi-source data related to electricity carbon emission behavior from multiple data systems 104. Then, it extracts data features corresponding to various data types from the target multi-source data and constructs cross-domain interactive features by combining data features corresponding to at least two data types. Furthermore, server 102 can periodically model the data features and cross-domain interactive features to obtain periodically dynamic changing features. Finally, server 102 can input the periodically dynamic changing features into a multimodal deep learning model to obtain the prediction result of electricity carbon emission behavior. The multimodal deep learning model includes: an embedding layer, a multi-head attention layer, and an improved fully connected layer; the embedding layer is used to perform unified cross-modal feature processing on the periodically dynamic changing features and outputs an embedding feature matrix; the multi-head attention layer is used to output multi-head attention results based on the embedding feature matrix; and the improved fully connected layer is used to output the prediction result of electricity carbon emission behavior based on the multi-head attention results. The system comprises multiple data systems 104, each storing data related to electricity carbon emission behavior. Data systems 104 include, but are not limited to, meteorological monitoring systems and power company monitoring systems. Servers 102 can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.
[0050] In one exemplary embodiment, such as Figure 2 As shown, a method for analyzing the carbon emission behavior of electricity is provided, and this method is applied to... Figure 1 The following describes 102 server examples, including steps 202 to 208. Wherein:
[0051] Step 202: Obtain target multi-source data related to electricity carbon emission behavior.
[0052] Optionally, for high-energy-consuming enterprises that need to conduct analysis of electricity carbon emission behavior, the server can obtain initial multi-source data related to electricity carbon emission behavior from multiple channels such as meteorological monitoring systems of meteorological monitoring agencies and monitoring systems of power enterprises. Then, by preprocessing the initial multi-source data, target multi-source data related to electricity carbon emission behavior can be obtained.
[0053] For example, the server can obtain meteorological data (temperature, precipitation, relative humidity, wind speed, surface radiation, cloud cover, etc.) covering the date and the company's location from the meteorological monitoring system, and obtain the company's electricity consumption data (total electricity consumption, average monthly electricity consumption, daily electricity consumption, etc.) and dynamic carbon emission factors from the power company monitoring system.
[0054] Step 204: Extract data features corresponding to various data types from the target multi-source data, and construct cross-domain interaction features by combining data features corresponding to at least two data types.
[0055] The data types include, but are not limited to: temperature, precipitation, wind speed, electricity consumption, time, humidity, and radiation. Each data type has its own corresponding data type identifier (including but not limited to number and unit) so that the server can distinguish which data type each piece of data in the target multi-source data belongs to.
[0056] Optionally, the server can extract data of multiple data types from the target multi-source data based on data type identification identifiers, and then perform feature extraction on each of the multiple data types to obtain the corresponding data features for each data type. Furthermore, the server can combine the data features corresponding to at least two related data types based on the relationships between data types. Each successful combination constitutes a successful construction of a cross-domain interaction feature. Based on this, by constructing cross-domain interaction features, potential relationships between different data types can be mined to enhance the multimodal deep learning model's ability to capture complex relationships. This facilitates accurate and in-depth analysis of carbon emission behavior, thereby obtaining highly accurate prediction results for electricity carbon emission behavior.
[0057] For example, for date data corresponding to time-based data in the target multi-source data, the server can perform feature extraction in the following way: extract the year, month, day, and weekday features of the date data, and transform the date data into continuous variables through trigonometric function transformation. Taking month m as an example, a sine feature is generated. Sum and cosine characteristics This is to preserve the periodicity of date data.
[0058] For example, taking the data features corresponding to the combined temperature data type and electricity consumption data type as an example to construct the cross-domain interactive feature "temperature-electricity consumption interactive feature", it can be illustrated as shown in formula (1):
[0059] (1)
[0060] In formula (1), This represents the interaction characteristics between temperature and electricity consumption, where T represents temperature. This represents the company's total electricity consumption. Formula (1) is used to explore the potential correlation between temperature data and electricity consumption data.
[0061] For example, the construction of the cross-domain interactive feature "humidity-radiation interaction feature" by combining the data features corresponding to the humidity data type and the radiation data type is illustrated in formula (2):
[0062] (2)
[0063] In formula (2), The formula (2) represents the humidity-radiation interaction characteristics, where H represents relative humidity and R represents surface radiation intensity. It is used to explore the potential correlation between humidity data and radiation data.
[0064] Step 206: Perform periodic modeling on data features and cross-domain interaction features to obtain periodic dynamic change features.
[0065] Optionally, for all data features and all cross-domain interaction features, the server can extract time features such as year / month / day / week, use Fourier series expansion to capture long-term periodic patterns, and further calculate time difference features to capture periodic dynamic changes, thus obtaining periodic dynamic change features.
[0066] For example, the server can convert discrete months m∈[1,12] into continuous frequency components. As shown in formula (3):
[0067] (3)
[0068] In formula (3), and These are the Fourier coefficients. represents the baseline value considered in the Fourier series expansion, and n represents the harmonic order in the Fourier series expansion. The historical data fluctuation cycle is fitted using the least squares method, and the time difference characteristics are further calculated to capture short-term dynamic changes, such as capturing the rate of change in electricity consumption between two adjacent days, as shown in formula (4):
[0069] (4)
[0070] In formula (4), This indicates the rate of change in electricity consumption between two consecutive days. This indicates the electricity consumption of enterprises on the previous day out of two consecutive days. This indicates the electricity consumption of enterprises on the latter of two consecutive days.
[0071] Step 208: Input the periodic dynamic change features into the multimodal deep learning model to obtain the prediction results of electricity carbon emission behavior.
[0072] The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer performs unified cross-modal feature processing on periodically changing dynamic features, outputting an embedded feature matrix. The multi-head attention layer outputs multi-head attention results based on the embedded feature matrix. The improved fully connected layer outputs prediction results for electricity carbon emission behavior based on the multi-head attention results. The prediction results for electricity carbon emission behavior can include: enterprise electricity consumption and dynamic carbon emission factors.
[0073] Optionally, cross-modal feature unification processing of periodically dynamically changing features may specifically include: splitting the periodically dynamically changing features into numerical features and temporal features, then mapping the numerical features to a feature space of a preset dimension to obtain the first feature, and performing sine and cosine encoding on the temporal features to obtain the second feature. Then, concatenating the first feature and the second feature to obtain the embedded feature matrix.
[0074] Optionally, the multi-head attention result is output based on the embedded feature matrix, and then the prediction result of electricity carbon emission behavior is output based on the multi-head attention result. This can include: the multi-head attention layer calculates the attention result of each output head based on the embedded feature matrix, and then calculates the attention weight of each output head based on the scaled dot product attention mechanism, thereby fusing the attention results of multiple output heads according to the attention weights to obtain the multi-head attention result. The improved fully connected layer first outputs an initial first prediction result based on the multi-head attention result, and then iteratively optimizes the model parameters using a dynamic optimization strategy until the iterative optimization stopping condition is reached. The improved fully connected layer then outputs the optimal prediction result of electricity carbon emission behavior.
[0075] The aforementioned method for analyzing electricity carbon emission behavior first acquires target multi-source data associated with electricity carbon emission behavior to avoid biased data and accurately reflect the complex influencing factors. Then, it extracts data features corresponding to various data types from the target multi-source data and constructs cross-domain interaction features by combining features from at least two data types to deeply explore the intrinsic connections between complex influencing factors. Furthermore, it performs periodic modeling on the data features and cross-domain interaction features to obtain periodic dynamic change features that capture dynamic changes. These periodic dynamic change features are then input into a multimodal deep learning model to obtain prediction results for electricity carbon emission behavior. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer performs unified cross-modal feature processing on the periodic dynamic change features and outputs an embedded feature matrix. The multi-head attention layer outputs multi-head attention results based on the embedded feature matrix. The improved fully connected layer outputs prediction results for electricity carbon emission behavior based on the multi-head attention results. In other words, the multimodal deep learning model is not based on specific conditions, has better generality, and can be used to accurately analyze electricity carbon emission behavior. By adopting the above process, the limitations of data acquisition can be overcome. Furthermore, by deeply exploring the intrinsic relationships between complex influencing factors, periodic modeling, and multimodal deep learning model processing, carbon emission behavior can be accurately and thoroughly analyzed, thereby obtaining accurate prediction results of electricity carbon emission behavior. This enables enterprises to precisely adjust their electricity carbon emission behavior based on the analysis results.
[0076] In one embodiment, acquiring target multi-source data associated with electricity carbon emission behavior includes:
[0077] Establish communication links with meteorological monitoring systems and power company monitoring systems;
[0078] Based on communication links, initial multi-source data related to power carbon emission behavior are obtained from meteorological monitoring systems and power enterprise monitoring systems;
[0079] The initial multi-source data is processed by handling missing values and normalizing the data to obtain the target multi-source data.
[0080] Among them, the meteorological monitoring system is used for comprehensive monitoring and early warning of meteorological and environmental conditions. The power enterprise monitoring system is used to monitor and control the power production and supply process, for example, monitoring the electricity consumption and carbon emissions of high-energy-consuming enterprises.
[0081] Optionally, the server can first establish communication links with meteorological monitoring systems and power company monitoring systems, such as data transmission communication links, and then, based on these communication links, obtain initial multi-source data related to power carbon emission behavior from the meteorological monitoring systems and power company monitoring systems. Furthermore, the server can first process the initial multi-source data for missing data to estimate the missing values, and then perform data normalization to eliminate the influence of dimensions, thereby obtaining the target multi-source data.
[0082] For example, the server can perform missing value processing on the initial multi-source data based on the Lagrange interpolation method. For instance, for each data type, the data features under the data type are used as the known data points corresponding to the data type. Then through known data points An nth-degree polynomial function L(x) is constructed to estimate the missing data, as shown in formula (5):
[0083] (5)
[0084] In formula (5), the Lagrange basis function The 3σ principle, based on statistics, is used to detect outliers. If a data point x in the data features corresponding to this data type satisfies... ( Given the mean of the data points, If the standard deviation of the known data points is given, then the data point x is considered an anomaly, and the median of the data feature can be used to replace the anomaly data point x. Furthermore, the server can use the min-max normalization method to perform data normalization processing, as shown in formula (6):
[0085] (6)
[0086] In formula (6), data points Taking a certain data type as an example, This represents the minimum value of the data points corresponding to this data type. This represents the maximum value of the data points corresponding to this data type. For data points The data is normalized. Formula (6) is used to ensure that the data characteristics are in the interval [0, 1] and to eliminate the influence of dimensions.
[0087] In this embodiment, relatively comprehensive data can be obtained from meteorological monitoring systems and power company monitoring systems to analyze the carbon emission behavior of enterprises, avoiding the bias of the acquired data. Furthermore, by processing missing values and normalizing the initial multi-source data, target multi-source data that is conducive to highly accurate analysis of the carbon emission behavior of enterprises can be obtained, thus accurately predicting the carbon emission behavior of enterprises and enabling them to precisely adjust their carbon emission behavior based on the analysis results.
[0088] In an exemplary embodiment, cross-modal feature unification processing is performed on periodically dynamically changing features to obtain an embedded feature matrix, including:
[0089] The periodic dynamic change characteristics are broken down into numerical characteristics and time-related characteristics;
[0090] The numerical features are mapped to a feature space of a preset dimension to obtain the first feature;
[0091] The time-type features are processed by sine and cosine encoding to obtain the second feature;
[0092] By concatenating the first and second features, the embedded feature matrix is obtained.
[0093] Optionally, in the embedding layer, the server can decompose the periodically changing dynamic features into numerical features and temporal features. The numerical features include at least the data features corresponding to temperature data, precipitation data, and electricity consumption data, while the temporal features include at least the data features corresponding to date data (such as year, month, and day). Furthermore, the server can map the numerical features to a feature space of a preset dimension (such as a 128-dimensional feature space) to obtain the first feature, as shown in formula (7).
[0094] (7)
[0095] In formula (7), Represents the original numerical features. for Numerical features mapped to a 128-dimensional feature space. For the weights of the linear embedding layer, The bias is used for the linear embedding layer. The weights and biases can be flexibly configured according to the needs of the actual application scenario.
[0096] Meanwhile, the server can perform sine and cosine encoding on the time-type features to obtain the second feature, as shown in formulas (8) and (9):
[0097] (8)
[0098] (9)
[0099] In formulas (8) and (9), pos is the time step (e.g., day t). =128 represents the model dimension, and i is the dimension index. Formula (8) performs sine encoding on the time-type features, and formula (9) performs cosine encoding on the time-type features to capture periodicity.
[0100] Furthermore, the server can concatenate the first feature and the second feature to obtain the embedded feature matrix. , to serve as input for the multi-head attention layer.
[0101] In this embodiment, by performing cross-modal feature unified processing on the periodic dynamic change features, an embedded feature matrix is obtained. This ensures that the input of the multi-head attention layer retains both periodicity and dynamism, while effectively mining the complex correlations between multimodal data. This ensures that the analysis of the carbon emission behavior of high-energy-consuming enterprises is accurate and adaptable to dynamic scenarios.
[0102] In some embodiments, the multi-head attention result is output based on the embedded feature matrix, including:
[0103] Based on the embedded feature matrix and the multi-head mapping matrix configured in the multi-head attention layer, the attention result of each output head in the multi-head attention layer is calculated;
[0104] Based on the scaled dot product attention mechanism, the attention weight of each output head is calculated;
[0105] Based on the attention weight of each output head, the attention results of multiple output heads are fused to obtain a multi-head attention result.
[0106] The number of output heads in the multi-head attention layer can be flexibly configured according to the needs of the actual application scenario. This embodiment can use an 8-head self-attention mechanism to achieve dependency modeling across feature dimensions.
[0107] Optionally, the server can be based on the embedded feature matrix and the multi-head mapping matrix configured in the multi-head attention layer (for each output head). , , The attention result of each output head in the multi-head attention layer is calculated, including Q (Query), K (Key), and V (Value) for each output head. The embedding feature matrix E can then be mapped to the mapping matrix of each output head. , , Multiplying these values yields Q, K, and V for each output header, as shown in formula (10):
[0108] (10)
[0109] Furthermore, the server can calculate the attention weights of each output head based on the scaling dot product attention mechanism, according to the attention results (Q, K, V) of each output head.
[0110] Specifically, it can be shown in formula (11):
[0111] (11)
[0112] In formula (11), =16 indicates the dimension of a single output head. This mechanism can calculate the similarity between features, for example, highlighting the intrinsic relationship between different complex influencing factors such as "temperature-electricity consumption", "radiation-cloud cover", and "humidity-radiation".
[0113] Finally, the server can fuse the attention results of multiple output heads based on the attention weights of each output head, and then combine them with the output projection matrix. Multiplying them together yields the result of multi-head attention. Specifically, it can be shown in formula (12):
[0114] (12)
[0115] In formula (12), The attention results of the first output head are represented sequentially until the attention results of the h-th output head are represented. ∈ It can be used to achieve multi-view feature interaction.
[0116] In this embodiment, the complex relationships between complex influencing factors can be effectively explored based on the multi-head attention layer, which is conducive to the high-precision output of electricity carbon emission behavior prediction results by the multimodal deep learning model, enabling enterprises to accurately adjust their electricity carbon emission behavior based on the analysis results.
[0117] In one possible implementation, the predicted results of electricity carbon emission behavior are output based on the multi-head attention results, including:
[0118] Obtain the prediction results of the improved fully connected layer based on multi-head attention;
[0119] Based on the prediction results, determine the feature contribution of each data type and the feature interaction contribution between at least two data types;
[0120] If the loss function value of the prediction result does not meet the expected condition of the loss function, gradient propagation optimization is performed on the multimodal deep learning model based on the feature contribution and feature interaction contribution until the loss function value of the output prediction result meets the expected condition of the loss function, thus obtaining the prediction result of electricity carbon emission behavior.
[0121] It should be noted that the improved fully connected layer in this embodiment includes an improved feedforward network and a normalization layer. The improved feedforward network adopts a residual block structure, with residual connections configured between the two fully connected layers to effectively capture deep feature relationships while maintaining training stability and alleviating the gradient vanishing problem of deep networks. The normalization layer introduces adaptive normalization, which can dynamically adjust the normalization parameters based on the input statistical information.
[0122] The improved feedforward network can be specifically shown in Equations (13) and (14):
[0123] (13)
[0124] (14)
[0125] In formulas (13) and (14), For activation function, The weights of the first fully connected layer. , The bias is for the first fully connected layer. This is the output of the first fully connected layer. The weights of the second fully connected layer. , The bias of the second fully connected layer This is the output of the second fully connected layer. This is the embedded feature matrix.
[0126] In the normalization layer, the mean of the input to the normalization layer is calculated. and variance Then through a learnable scaling factor and offset factor Adjustments can be made as shown in formula (15):
[0127] (15)
[0128] In formula (15), It is a small constant that prevents the denominator from being zero.
[0129] Based on this, after inputting the multi-head attention result into the improved fully connected layer, the server can obtain the prediction result output by the improved fully connected layer based on the multi-head attention result. Furthermore, the server can calculate the feature contribution of each data type based on the prediction result output by the improved fully connected layer, using the integral gradient method. The integral gradient method calculates the importance of a certain data type to the prediction of dynamic carbon emission behavior, i.e., the feature contribution, by calculating the path integral from the baseline (average data features of the data type) to the input point (data features of a certain data type). Further, the server can calculate the feature interaction contribution between at least two data types based on the second-order cross-network and the feature contribution of each data type. Even further, the server can calculate the loss function value of the prediction result based on a preset loss function (such as the cross-entropy loss function). If the loss function value of the prediction result does not meet the expected condition of the loss function, the server performs gradient propagation optimization on the multimodal deep learning model based on the feature contribution and feature interaction contribution until the loss function value of the output prediction result meets the expected condition of the loss function, thus obtaining the prediction result of electricity carbon emission behavior.
[0130] For example, the feature interaction contribution can be calculated based on a second-order cross-network as shown in formula (16):
[0131] (16)
[0132] In formula (16), The feature contribution value corresponding to the i-th data type. The feature contribution value corresponding to the j-th data type. The feature interaction contribution is the feature contribution between the i-th data type and the j-th data type. This represents the calculation of the first-order gradient. Based on formula (16), higher-order synergistic effects between features can be captured, enhancing the ability to model the correlation between complex influencing factors.
[0133] In this embodiment, the interpretability of the prediction results can be provided by quantifying the contribution of features and the interaction contribution of features. This provides effective guidance for enterprises to accurately reduce emissions based on the predicted carbon emission behavior, avoiding the "black box" effect of the decision-making process within the multimodal deep learning model. This allows enterprises to clearly understand how complex influencing factors affect their carbon emission behavior. Furthermore, the optimal prediction result for electricity carbon emission behavior can be obtained by comparing the loss function values.
[0134] In one embodiment, gradient propagation optimization is performed on the multimodal deep learning model based on feature contribution and feature interaction contribution, including:
[0135] Enhanced data features are obtained by enhancing data features based on feature contribution, and cross-domain interaction features composed of enhanced data features corresponding to at least two data types are enhanced based on feature interaction contribution to obtain enhanced cross-domain interaction features.
[0136] Anomaly detection is performed on enhanced data features and enhanced cross-domain interaction features. In the absence of anomalies, enhanced data features with a feature contribution greater than a preset contribution and enhanced cross-domain interaction features with a feature interaction contribution greater than a preset contribution are regarded as high feature contribution features.
[0137] We optimize the parameters of the gradient propagation path for features with high feature contribution in multimodal deep learning models.
[0138] Optionally, the server can perform feature enhancement on the data features of a certain data type if the feature contribution is greater than the contribution threshold τ, based on the comparison between the feature contribution and the contribution threshold τ, to obtain enhanced data features, as shown in formula (17):
[0139] (17)
[0140] In formula (17), For the data characteristics under the i-th data type, for Enhanced data features obtained after feature enhancement. is the scaling factor, used to control the magnitude of feature enhancement. G is the preset function, used to adjust the feature contribution based on the feature contribution. The comparison result with the contribution threshold τ is used to generate the feature contribution.
[0141] Feature enhancement is performed using the following formula: I is an indicator function, which is 1 when the feature contribution is greater than the contribution threshold τ, and 0 otherwise. It is used to determine whether to enhance the data features. The contribution threshold τ can be flexibly configured according to the needs of the actual application scenario. Through formula (17), key features that have an important impact on the prediction of dynamic carbon emission behavior can be highlighted, thereby improving the prediction accuracy of the multimodal deep learning model. For example, if the feature contribution of the temperature data type is greater than the contribution threshold τ, the temperature features under the temperature data type can be enhanced according to the above formula (17), thereby enhancing the sensitivity of the multimodal deep learning model to temperature features.
[0142] Furthermore, the server can calculate the feature interaction contribution based on formula (16). Enhance the cross-domain interaction features composed of enhanced data features corresponding to at least two data types, and weight the cross-domain interaction features to obtain enhanced cross-domain interaction features, as shown in formula (18):
[0143] (18)
[0144] In formula (18), This represents the total number of data types. For the data characteristics of the i-th data type, Let be the data features under the j-th data type. The server can enhance the ability of the multimodal deep learning model to capture complex relationships through formula (18). For example, features such as "temperature-electricity consumption interaction" and "humidity-radiation interaction" can help the multimodal deep learning model better understand the combined impact of complex influencing factors on carbon emission behavior.
[0145] Optionally, the server can effectively enhance key features based on the spatiotemporal gating attention mechanism and the hot loading mechanism of the anomaly submodel, as shown in formulas (19) and (20), and then use an anomaly detection algorithm to perform anomaly detection.
[0146] (19)
[0147] (20)
[0148] In formulas (19) and (20), It is the sigmoid function. It is a gating vector that can be used to adjust the attention score. Input features include augmented data features and augmented cross-domain interaction features. For the weights in the dynamic weighting process, This refers to the bias in the dynamic weighting process. The result is the result after dynamic weighting. Formulas (19) and (20) are used to dynamically weight different spatiotemporal features in enhancing data features and enhancing cross-domain interaction features, which can effectively enhance key features.
[0149] For example, anomaly detection algorithms include, but are not limited to: reconstruction-based anomaly detection algorithms, distance-based anomaly detection algorithms, density-based anomaly detection algorithms, deep learning-based anomaly detection algorithms, and statistical anomaly detection algorithms. Once an anomaly is detected, the server can quickly load the anomaly sub-model to improve the robustness of the multimodal deep learning model. For instance, when an anomaly in temperature characteristics is detected, a specialized anomaly sub-model for handling abnormal temperature data is loaded promptly, ensuring that the multimodal deep learning model can still output high-precision predictions of electricity carbon emission behavior even under abnormal conditions. Through the aforementioned spatiotemporal gating attention mechanism and anomaly sub-model hot-loading mechanism, the weights of different spatiotemporal features can be dynamically adjusted, while anomalies can be quickly processed, enhancing model robustness.
[0150] In the absence of anomalies, the server can use enhanced data features with a feature contribution greater than the preset contribution and enhanced cross-domain interaction features with a feature interaction contribution greater than the preset contribution as high feature contribution features. Then, it can optimize the parameters of the gradient propagation path for high feature contribution features in the multimodal deep learning model. For example, for high feature contribution features, gradient truncation and reparameterization techniques can be used to optimize the parameters of the gradient propagation path. Specifically, gradient truncation can be shown in formula (21), and reparameterization can be shown in formula (22).
[0151] (twenty one)
[0152] (twenty two)
[0153] In formula (21), It is the gradient vector with high feature contribution before gradient truncation. It is the gradient vector after gradient truncation. and It is the cutoff threshold. In formula (22), It is the mean parameter of the distribution. It is the standard deviation parameter of the distribution. It is the basic noise variable. Formulas (21) and (22) avoid gradient explosion or vanishing by truncating and reparameterizing the data features with high feature contribution, making the model processing process more stable and efficient.
[0154] For example, parameter optimization can also be performed in the following ways:
[0155] (1) Gradient optimization: Based on the Adam optimizer, weight decay is introduced to construct the AdamW optimizer to prevent model overfitting. The update formulas of the AdamW optimizer are shown in formulas (23) to (25):
[0156] (twenty three)
[0157] (twenty four)
[0158] (25)
[0159] In formulas (23)~(25), It is the first-order moment decay rate. =0.9. It is the second-order moment decay rate. =0.999. For learning rate, . It is a numerical stability constant. . It is the weight decay coefficient. The parameters are for the t-th iteration. The parameters at the (t-1)th iteration. Let be the gradient of the loss function with respect to the parameters at the t-th iteration. This is the first moment estimate of the gradient at the t-th iteration. This is the first moment estimate of the gradient at the (t-1)th iteration. This is the first-order moment estimate after bias correction. This is the second moment estimate of the gradient at the t-th iteration. This is the second moment estimate of the gradient at the (t-1)th iteration. This is the second-order moment estimate after bias correction.
[0160] (2) Gradient accumulation: In order to simulate a larger batch size with limited computing resources, gradients are calculated on multiple mini-batch data, and then these gradients are accumulated after a certain number of steps and a parameter update is performed.
[0161] (3) Dynamic learning rate scheduling: When the loss function value does not decrease for 7 consecutive rounds, the learning rate decays to 30%. At the same time, a learning rate warm-up mechanism is introduced to gradually increase the learning rate from a small value to the set initial value, so as to help the model converge to the appropriate parameter space more quickly.
[0162] (4) Early stopping mechanism: If the loss function value does not improve for 20 consecutive rounds, training is terminated and the optimal parameters are saved. At the same time, in order to prevent premature stopping, a patience factor is introduced into the early stopping mechanism. That is, when the loss does not improve for a certain number of consecutive rounds, training is not stopped immediately, but the training is continued to be observed for a certain number of rounds. If there is still no improvement, training is stopped.
[0163] This embodiment introduces a contribution-driven dynamic feature enhancement process to highlight the impact of key features with high contribution on the analysis of electricity carbon emission behavior, thereby improving the model's sensitivity to core factors. Furthermore, implementing a gradient propagation path optimization scheme driven by high feature contribution can stabilize the gradient propagation path of key features and prevent the model from getting trapped in local optima. Based on this, this embodiment can more accurately analyze corporate electricity carbon emission behavior, providing reliable support for the formulation of energy conservation and emission reduction strategies, and effectively improving the accuracy of the analysis and its practical application value.
[0164] The above embodiments dynamically optimize the model based on the multimodal deep learning model, and combine dynamic feature modeling, feature enhancement, second-order cross-network, spatiotemporal gating attention mechanism and abnormal sub-model hot loading mechanism to solve the optimal prediction results of electricity carbon emission behavior. This is conducive to realizing high-precision prediction of enterprise electricity consumption and dynamic carbon emission factors, and provides data support analysis for the carbon emission behavior of high energy-consuming enterprises.
[0165] In a specific application scenario, based on the above embodiments, such as Figure 3 As shown, a flowchart illustrating the process of controlling carbon emission analysis using a multimodal Transformer model is provided, mainly including the following steps:
[0166] (1) Initialize the parameters of the multimodal Transformer model. The multimodal Transformer model includes an embedding layer, a multi-head attention layer (i.e., a Transformer layer), and an improved fully connected layer.
[0167] Initialization may include: initializing the weights and biases of each part in the multimodal Transformer model. The initial multi-source data is preprocessed to obtain the target multi-source data. Based on the target multi-source data, periodic dynamic features are obtained through feature extraction, feature interaction and periodic modeling. Numerical features are then initialized in the embedding layer based on formula (7), and temporal features are initialized in the embedding layer based on formulas (8) and (9) to obtain the multimodal embedding feature matrix as the input of the Transformer layer.
[0168] (2) Fusing multi-head attention results. Through the Transformer layer, the attention results (Q, K, V) of each output head are generated by formula (10), and the attention weight of each output head is calculated by formula (11). Then, the attention results of multiple output heads are fused by formula (12) to obtain the multi-head attention result.
[0169] (3) Output prediction results. The prediction results are output by improving the fully connected layer.
[0170] (4) Enhance features based on quantified feature contribution. Calculate feature contribution and feature interaction contribution, and then enhance the corresponding data features according to formula (17) based on feature contribution, and enhance cross-domain interaction features according to formula (18) based on feature interaction contribution.
[0171] For example, data features may include: month, year, temperature-month interaction, air temperature, starting day, day of the week, surface radiation, relative humidity, whether it is a weekend, cloud cover, wind speed, radiation-weekday interaction, total precipitation, etc. The specific feature contributions can be: month 32.14, year 27.16, temperature-month interaction 24.62, air temperature 23.78, starting day 19.84, day of the week 17.71, surface radiation 15.37, relative humidity 14.52, whether it is a weekend 12.31, cloud cover 7.16, wind speed 6.30, radiation-weekday interaction 5.97, and total precipitation 5.95.
[0172] (5) Anomaly detection and handling. A spatiotemporal gating attention mechanism and an anomaly sub-model hot-loading mechanism are introduced. If an anomaly is detected, the anomaly sub-model is hot-loaded for processing.
[0173] (6) Gradient propagation optimization. For example, based on formulas (21) and (22), the gradient propagation path of features with high feature contribution is optimized to update the model parameters.
[0174] (7) Solve for the optimal prediction result of electricity carbon emission behavior. Repeat steps (3) to (6) in this embodiment until the loss function value of the output prediction result satisfies the expected condition of the loss function, determine that the convergence condition is met, and output the optimal prediction result of electricity carbon emission behavior. Among them, satisfying the expected condition of the loss function can mean that the change range of the loss function value or the loss function value is less than the set threshold.
[0175] For example, taking the predicted results of a high-energy-consuming enterprise's electricity carbon emission behavior, which include electricity consumption, as an example, Figure 4 As shown, a comparison diagram between predicted and actual electricity consumption values is provided. Taking the predicted carbon emission behavior of a high-energy-consuming enterprise, including dynamic carbon emission factors, as an example, ... Figure 5 As shown, a diagram illustrating the comparison between the predicted and actual values of the dynamic carbon emission factor is provided.
[0176] In this embodiment, intelligent analysis of the carbon emission behavior of high-energy-consuming enterprises is achieved through multi-dimensional data, dynamic feature modeling, and interpretable models. On one hand, multi-source data acquisition combined with preprocessing effectively improves data quality. Further feature extraction, feature interaction, and periodic modeling uncover more potential feature relationships, greatly enhancing feature interpretability and laying the foundation for accurate analysis. On the other hand, prediction processing based on Transformer layers and improved fully connected layers, along with dynamic optimization, effectively handles complex data relationships, achieving high-precision analysis. Furthermore, through a series of processing steps including feature enhancement, interaction capture, anomaly handling, and gradient optimization, the model's performance is comprehensively improved. This enables it to perform more stable and accurate analysis and prediction when facing the complex and ever-changing carbon emission scenarios of high-energy-consuming enterprises. It allows for accurate and in-depth analysis of carbon emission behavior, resulting in accurate predictions of electricity carbon emission behavior. This allows enterprises to precisely adjust their electricity carbon emission behavior based on the analysis results.
[0177] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0178] Based on the same inventive concept, this application also provides an electricity carbon emission behavior analysis device for implementing the electricity carbon emission behavior analysis method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more embodiments of the electricity carbon emission behavior analysis device provided below can be found in the limitations of the electricity carbon emission behavior analysis method described above, and will not be repeated here.
[0179] In one exemplary embodiment, such as Figure 6 As shown, a device for analyzing the carbon emission behavior of electricity is provided, including a multi-source data acquisition module 602, a feature extraction module 604, a periodic modeling module 606, and a prediction result acquisition module 608. Wherein:
[0180] The multi-source data acquisition module is used to acquire target multi-source data related to electricity carbon emission behavior;
[0181] The feature extraction module is used to extract data features corresponding to various data types from the target multi-source data, and to construct cross-domain interaction features by combining data features corresponding to at least two data types.
[0182] The periodic modeling module is used to perform periodic modeling on data features and cross-domain interaction features to obtain periodic dynamic change features;
[0183] The prediction result acquisition module is used to input periodically dynamic features into a multimodal deep learning model to obtain prediction results of electricity carbon emission behavior. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer is used to perform cross-modal feature unified processing on the periodically dynamic features and output an embedded feature matrix. The multi-head attention layer is used to output multi-head attention results based on the embedded feature matrix. The improved fully connected layer is used to output prediction results of electricity carbon emission behavior based on the multi-head attention results.
[0184] The aforementioned electricity carbon emission behavior analysis device first acquires target multi-source data associated with electricity carbon emission behavior to avoid biased data used in the analysis and to truly reflect the complex influencing factors of electricity carbon emission behavior. Then, it extracts data features corresponding to various data types from the target multi-source data and constructs cross-domain interactive features by combining data features corresponding to at least two data types to deeply explore the intrinsic connections between complex influencing factors. Furthermore, it performs periodic modeling on the data features and cross-domain interactive features to obtain periodic dynamic change features that capture dynamic changes. These periodic dynamic change features are then input into a multimodal deep learning model to obtain the electricity carbon emission behavior prediction results. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer performs unified cross-modal feature processing on the periodic dynamic change features and outputs an embedded feature matrix. The multi-head attention layer outputs multi-head attention results based on the embedded feature matrix. The improved fully connected layer outputs the electricity carbon emission behavior prediction results based on the multi-head attention results. In other words, the multimodal deep learning model is not based on specific conditions, has better versatility, and can be used to accurately analyze electricity carbon emission behavior. By adopting the above process, the limitations of data acquisition can be overcome. Furthermore, by deeply exploring the intrinsic relationships between complex influencing factors, periodic modeling, and multimodal deep learning model processing, carbon emission behavior can be accurately and thoroughly analyzed, thereby obtaining accurate prediction results of electricity carbon emission behavior. This enables enterprises to precisely adjust their electricity carbon emission behavior based on the analysis results.
[0185] In one embodiment, the multi-source data acquisition module includes:
[0186] The communication link establishment unit is used to establish communication links with the meteorological monitoring system and the power company's monitoring system.
[0187] The multi-source data acquisition unit is used to acquire initial multi-source data related to power carbon emission behavior from meteorological monitoring systems and power enterprise monitoring systems based on communication links;
[0188] The data preprocessing unit is used to process the initial multi-source data by handling missing data values and normalizing the data to obtain the target multi-source data.
[0189] In one embodiment, the periodic modeling module includes:
[0190] The feature splitting unit is used to split periodically dynamic features into numerical features and time features;
[0191] The feature mapping unit is used to map numerical features to a feature space of a preset dimension to obtain the first feature.
[0192] The feature coding unit is used to perform sine and cosine coding on the time-type features to obtain the second feature;
[0193] The feature concatenation unit is used to concatenate the first feature and the second feature, and output the embedded feature matrix.
[0194] In one embodiment, the electricity carbon emission behavior analysis device includes a multi-head attention processing module, which includes:
[0195] The attention result calculation unit is used to calculate the attention result of each output head in the multi-head attention layer based on the embedded feature matrix and the multi-head mapping matrix configured in the multi-head attention layer.
[0196] The attention weight calculation unit is used to calculate the attention weight of each output head based on the scaled dot product attention mechanism.
[0197] The attention result fusion unit is used to fuse the attention results of multiple output heads according to the attention weight of each output head to obtain multi-head attention results.
[0198] In one embodiment, the electricity carbon emission behavior analysis device includes a result output module, which includes:
[0199] The prediction result output unit is used to obtain the prediction results of the improved fully connected layer based on multi-head attention.
[0200] The feature contribution calculation unit is used to determine the feature contribution of each data type and the feature interaction contribution between at least two data types based on the prediction results.
[0201] The gradient propagation optimization unit is used to perform gradient propagation optimization on the multimodal deep learning model based on the feature contribution and feature interaction contribution when the loss function value of the prediction result does not meet the expected condition of the loss function, until the loss function value of the output prediction result meets the expected condition of the loss function, thus obtaining the prediction result of electricity carbon emission behavior.
[0202] In one embodiment, the gradient propagation optimization unit is specifically used for:
[0203] Enhanced data features are obtained by enhancing data features based on feature contribution, and cross-domain interaction features composed of enhanced data features corresponding to at least two data types are enhanced based on feature interaction contribution to obtain enhanced cross-domain interaction features.
[0204] Anomaly detection is performed on enhanced data features and enhanced cross-domain interaction features. In the absence of anomalies, enhanced data features with a feature contribution greater than a preset contribution and enhanced cross-domain interaction features with a feature interaction contribution greater than a preset contribution are regarded as high feature contribution features.
[0205] We optimize the parameters of the gradient propagation path for features with high feature contribution in multimodal deep learning models.
[0206] Each module in the aforementioned electricity carbon emission behavior analysis device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0207] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data on electricity carbon emission behavior analysis. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a method for analyzing electricity carbon emission behavior.
[0208] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0209] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0210] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0211] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0212] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0213] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0214] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0215] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for analyzing the carbon emission behavior of electricity, characterized in that, The method includes: Acquire target multi-source data related to electricity carbon emission behavior; Extract data features corresponding to various data types from the target multi-source data, and construct cross-domain interaction features by combining data features corresponding to at least two data types. Periodically model the data features and the cross-domain interaction features to obtain periodically dynamic changing features; The periodic dynamic change features are input into a multimodal deep learning model to obtain prediction results of electricity carbon emission behavior. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer is used to perform cross-modal feature unification processing on the periodic dynamic change features and output an embedding feature matrix. The multi-head attention layer is used to output multi-head attention results based on the embedding feature matrix. The improved fully connected layer is used to output prediction results of electricity carbon emission behavior based on the multi-head attention results.
2. The method according to claim 1, characterized in that, The acquisition of target multi-source data related to electricity carbon emission behavior includes: Establish communication links with meteorological monitoring systems and power company monitoring systems; Based on the communication link, initial multi-source data related to electricity carbon emission behavior are obtained from the meteorological monitoring system and the power company monitoring system. The initial multi-source data is processed for missing values and normalized to obtain the target multi-source data.
3. The method according to claim 1, characterized in that, The process of performing cross-modal feature unification processing on the periodic dynamic change features and outputting an embedded feature matrix includes: The periodic dynamic change characteristics are broken down into numerical characteristics and time-related characteristics; The numerical features are mapped to a feature space of a preset dimension to obtain the first feature; The time-type feature is subjected to sine and cosine encoding to obtain the second feature; The first feature and the second feature are concatenated to output the embedded feature matrix.
4. The method according to claim 1, characterized in that, The output of the multi-head attention result based on the embedded feature matrix includes: Based on the embedded feature matrix and the multi-head mapping matrix configured in the multi-head attention layer, the attention result of each output head in the multi-head attention layer is calculated; Based on the scaled dot product attention mechanism, the attention weight of each output head is calculated; Based on the attention weight of each output head, the attention results of multiple output heads are fused to obtain the multi-head attention result.
5. The method according to claim 1, characterized in that, The output of the predicted electricity carbon emission behavior based on the multi-head attention result includes: Obtain the prediction result output by the improved fully connected layer based on the multi-head attention result; Based on the prediction results, determine the feature contribution degree corresponding to each of the data types, and the feature interaction contribution degree between at least two of the data types; If the loss function value of the predicted result does not meet the expected condition of the loss function, gradient propagation optimization is performed on the multimodal deep learning model based on the feature contribution and the feature interaction contribution until the loss function value of the output predicted result meets the expected condition of the loss function, thereby obtaining the predicted result of electricity carbon emission behavior.
6. The method according to claim 5, characterized in that, The step of optimizing the multimodal deep learning model through gradient propagation based on the feature contribution and the feature interaction contribution includes: The data features are enhanced based on the feature contribution degree to obtain enhanced data features. Furthermore, based on the feature interaction contribution degree, cross-domain interaction features composed of enhanced data features corresponding to at least two types of the data are enhanced to obtain enhanced cross-domain interaction features. Anomaly detection is performed on the enhanced data features and the enhanced cross-domain interaction features. If no anomalies are found, the enhanced data features whose feature contribution is greater than a preset contribution and the enhanced cross-domain interaction features whose feature interaction contribution is greater than the preset contribution are regarded as high feature contribution features. The gradient propagation path for the high-feature contribution feature in the multimodal deep learning model is optimized by parameters.
7. A device for analyzing the carbon emission behavior of electricity, characterized in that, The device includes: The multi-source data acquisition module is used to acquire target multi-source data related to electricity carbon emission behavior; The feature extraction module is used to extract data features corresponding to various data types from the target multi-source data, and to construct cross-domain interaction features by combining data features corresponding to at least two data types. A periodic modeling module is used to perform periodic modeling on the data features and the cross-domain interaction features to obtain periodic dynamic change features; The prediction result acquisition module is used to input the periodic dynamic change features into a multimodal deep learning model to obtain the prediction result of electricity carbon emission behavior. The multimodal deep learning model includes an embedding layer, a multi-head attention layer, and an improved fully connected layer. The embedding layer is used to perform cross-modal feature unification processing on the periodic dynamic change features and output an embedding feature matrix. The multi-head attention layer is used to output a multi-head attention result based on the embedding feature matrix. The improved fully connected layer is used to output the prediction result of electricity carbon emission behavior based on the multi-head attention result.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.