Industrial user carbon emission monitoring method and device fusing attention mechanism and residual network
By integrating attention mechanism and residual network, the status of industrial equipment and the carbon emissions are monitored in real time, which solves the problems of low monitoring accuracy and difficult real-time monitoring in the existing technology, and realizes accurate and real-time monitoring of carbon emissions of industrial users.
Patent Information
- Application Number
- CN202411568744.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-14
AI Technical Summary
The prior art has problems such as low accuracy, limited scope of application and difficulty in real-time monitoring in the monitoring of carbon emissions of industrial equipment.
Using a method of integrating attention mechanism and residual network, by obtaining the power load sequence data of industrial users and the status data of carbon emission equipment, training the equipment status recognition model, monitoring the equipment status in real time and calculating carbon emissions.
It realizes accurate and real-time monitoring of carbon emissions of industrial users, improves monitoring accuracy and scope of application, and supports refined carbon management.
Smart Images

Figure CN119623822A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of industrial equipment carbon emission monitoring, and in particular to a method and device for monitoring carbon emissions of industrial users by integrating an attention mechanism with a residual network. Background Art
[0002] Global climate change is becoming increasingly severe. Industrial carbon emissions are the main cause of this problem. Carbon emissions from industrial users account for a very large proportion of total carbon emissions. Therefore, establishing a monitoring system for carbon emissions from industrial users to accurately measure carbon footprints can help identify areas for energy conservation and emission reduction, and formulate corresponding optimization measures to improve resource utilization efficiency and reduce operating costs.
[0003] In the prior art, carbon emission monitoring methods for industrial equipment usually adopt a carbon emission factor method based on fossil fuels, that is, the carbon accounting basic equation of activity data (AD) × emission factor (EF) is used to estimate carbon emissions, where AD is the activity amount of production or consumption activities that lead to greenhouse gas emissions, such as the consumption of each fossil fuel, the consumption of limestone raw materials, electricity, steam, etc. This type of method is simple and easy to use, but since it only estimates carbon emissions based on fossil fuel consumption from the perspective of time and users, carbon emission activities are only roughly estimated, and industrial equipment is usually electrically driven, and the carbon emissions of equipment under different driving states are different, and a carbon emission activity is usually completed by the collaborative work of multiple industrial equipment, and the carbon emissions of different industrial equipment under different operating states are different. Therefore, the actual accuracy of the traditional carbon emission factor method is not high and its scope of application is limited, making it difficult to support refined carbon management.
[0004] Some practitioners have proposed using deep learning technology to train carbon emission prediction models based on neural networks to learn the characteristics of carbon emission data, predict the future carbon emissions of equipment, and realize intelligent monitoring of carbon emissions. However, on the one hand, the above method can only predict the carbon emissions of equipment, but cannot realize real-time monitoring of carbon emissions, which is not conducive to timely obtaining the carbon emission status of equipment; on the other hand, the traditional method of training carbon emission prediction models based on neural networks is difficult to train, and often requires a lot of time and cost for training. In addition, the model is easily affected by environmental noise, and there will be complex noise in the actual power data, resulting in low final prediction accuracy. Summary of the invention
[0005] The technical problem to be solved by the present invention is: in response to the technical problems existing in the prior art, the present invention provides a method and device for monitoring carbon emissions of industrial users by integrating attention mechanism and residual network, which has simple implementation method, low cost, high efficiency and accuracy, strong real-time and robustness.
[0006] In order to solve the above technical problems, the technical solution proposed by the present invention is:
[0007] A method for monitoring carbon emissions of industrial users by integrating attention mechanism and residual network, comprising the following steps:
[0008] Step S01, obtaining the power load sequence data of the user to be tested within a specified time period and the corresponding status data of all key carbon emission equipment as training sample data, wherein the key carbon emission equipment is equipment whose carbon emission is greater than a preset threshold;
[0009] Step S02, inputting the training sample data into the network model formed by the fusion attention mechanism and the residual network for training, and obtaining the equipment state recognition model after training, wherein the network model formed by the fusion attention mechanism and the residual network is based on the shrinkage residual network, and the channel attention mechanism and the BAM attention module are embedded in the front end of the fully connected layer on the output side of the shrinkage residual network, and the weight coefficients of different channels are calculated by the channel attention mechanism, and the judgment threshold is calculated according to each of the weight coefficients, and the feature map output by the shrinkage residual network is screened by using the judgment threshold, and then the feature map is enhanced by the BAM attention module, and the state recognition result of the carbon emission equipment is output through the fully connected layer;
[0010] Step S03, obtaining the real-time electricity load sequence data of the user to be tested and inputting it into the trained equipment status recognition model to obtain the real-time status recognition results of all key carbon emission equipment in the user to be tested;
[0011] Step S04: Obtain the carbon emission factors corresponding to different device states of all carbon emission devices in the user to be tested, and calculate the real-time carbon emissions of the user to be tested based on the real-time state recognition results of all carbon emission devices in the user to be tested and the corresponding carbon emission factors.
[0012] Further, in step S02, the weight coefficients of different channels are calculated by the channel attention mechanism and the judgment threshold is calculated according to each of the weight coefficients, including:
[0013] Step S201, compressing the feature map obtained by the convolutional network of the training sample data into a channel descriptor to obtain an aggregated feature containing global information;
[0014] Step S202, calculating the weight of the feature channel by performing an Excitation operation on the aggregated features containing global information;
[0015] Step S203: Use the calculated weight of the feature channel to weight the feature map obtained by the convolutional network of the training sample data to obtain a channel attention mechanism output and use it as the judgment threshold.
[0016] Furthermore, in step S201, the calculation expression of the aggregated feature containing global information is:
[0017]
[0018] Among them, x i is the feature map obtained by the convolutional network for the i-th training sample data, y i is the aggregated feature containing global information corresponding to the i-th training sample data, a×b represents the feature space dimension, a and b represent the height and width of the feature map respectively, and m and n represent the height and width values respectively.
[0019] Furthermore, in step S202, the aggregated features containing global information are subjected to an Excitation operation to calculate the weight of the feature channel according to the following formula:
[0020] s=σ(W2δ(W1y))
[0021] Among them, σ and δ represent Sigmoid and ReLU activation functions respectively, W1 and W2 are the weight matrices of the two fully connected layers respectively, and y is the aggregated feature containing global information corresponding to the training sample data;
[0022] In step S203, the channel attention mechanism output is obtained according to the following formula and used as the judgment threshold:
[0023] τ=s·x
[0024] Among them, τ represents the judgment threshold, and x is the feature map obtained by the convolutional network through the training sample data.
[0025] Further, in step S02, the feature map output by the shrinkage residual network is screened according to the following formula based on the judgment threshold:
[0026]
[0027] Among them, w is the weight and sgn represents the sign function.
[0028] Furthermore, in step S02, the BAM attention module performs feature enhancement on the feature map according to the following formula:
[0029] U′=U+U·σ(M c (U)+M s (U))
[0030] M c (U) = BN(MLP(AνgPool(U)))
[0031] =BN(W1'(W0'AνgPool(U)+b0)+b1)
[0032]
[0033] Among them, σ is the Sigmoid activation function, U is the input feature map, U' is the output feature map after feature enhancement by the BAM attention module, BN is batch normalization, MLP is a fully connected operation, AvgPool is a global average pooling; W'0, W'1 are weight parameters, b0, b1 are bias parameters, f n*n Represents n*n convolution.
[0034] Furthermore, in step S04, the real-time carbon emission CE of the user to be tested is calculated according to the following formula:
[0035]
[0036] Among them, EF i,j is the carbon emission factor of the i-th device state in time interval j, T is the calculation duration, m is the number of carbon emission devices among the users to be tested, and d is the number of time intervals into which the calculation duration T is divided.
[0037] A carbon emissions monitoring device for industrial users integrating attention mechanism and shrinkage residual network, comprising:
[0038] A training data acquisition module is used to acquire the power load sequence data of the user to be tested within a specified time period and the corresponding status data of all key carbon emission equipment as training sample data, wherein the key carbon emission equipment is equipment with carbon emissions greater than a preset threshold;
[0039] A model training module, used for inputting the training sample data into a network model formed by a fusion attention mechanism and a residual network for training, and obtaining a device state recognition model after training. The network model formed by the fusion attention mechanism and the residual network is based on a shrinkage residual network, and is obtained by embedding a channel attention mechanism and a BAM attention module at the front end of a fully connected layer on the output side of the shrinkage residual network. The channel attention mechanism calculates weight coefficients of different channels and calculates a judgment threshold based on each of the weight coefficients. The judgment threshold is used to screen a feature map output by the shrinkage residual network, and then the feature map is enhanced by the BAM attention module, and the state recognition result of the carbon emission equipment is output through the fully connected layer;
[0040] A real-time data acquisition module is used to acquire the real-time electricity load sequence data of the user to be tested and input it into the trained equipment status recognition model to obtain the real-time status recognition results of all key carbon emission equipment in the user to be tested;
[0041] The carbon emission calculation module is used to obtain the carbon emission factors corresponding to all carbon emission devices in the user to be tested in different device states, and calculate the real-time carbon emissions of the user to be tested based on the real-time state identification results of all carbon emission devices in the user to be tested and the corresponding carbon emission factors.
[0042] A computer device comprises a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.
[0043] A computer-readable storage medium storing a computer program, wherein the computer program implements the above method when executed by a processor.
[0044] Compared with the prior art, the advantages of the present invention are:
[0045] 1. The present invention breaks down the carbon emission activities of industrial users into the operating status of all carbon emission equipment within a unit time, monitors the operating status of each industrial equipment in real time, and calculates the carbon emissions of the entire industrial users based on the operating status of each industrial equipment and the corresponding carbon emission factor. It can accurately calculate the real-time carbon emissions of industrial users, effectively improve the accuracy and scope of carbon emission monitoring, and realize refined management of carbon emission activities.
[0046] 2. The present invention forms an improved shrinkage residual network by fusing the channel attention mechanism, the BAM attention mechanism and the shrinkage residual network, and uses the training sample data composed of different power load sequence data and the corresponding carbon emission equipment status data to train and obtain the equipment status recognition model. The training can be completed quickly based on the shrinkage residual network, reducing the difficulty of model training. The channel attention mechanism is used to calculate the corresponding weight coefficients for different channels, and the influence of different sample data can be adaptively adjusted. The feature map output by the shrinkage residual network is screened based on the weight coefficient, and the feature map with complex noise information can be filtered out. At the same time, the feature map is enhanced by combining the BAM attention mechanism, which can effectively avoid the interference of complex noise on the detection results, thereby improving the recognition accuracy and robustness of the carbon emission equipment status. The recognition results of all carbon emission equipment statuses in industrial users and the corresponding carbon emission factors can be used to efficiently and accurately calculate the carbon emissions, thereby realizing real-time monitoring of carbon emissions of industrial users. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 This is a schematic diagram of the implementation process of the industrial user carbon emissions monitoring method that integrates the attention mechanism and the residual network in this embodiment.
[0048] Figure 2It is a schematic diagram of the principle of an improved shrinkage residual network formed by fusing the channel attention mechanism, the BAM attention mechanism and the shrinkage residual network adopted in this embodiment. DETAILED DESCRIPTION
[0049] The present invention is further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
[0050] An industrial user usually contains multiple industrial equipment, for example, a factory contains multiple production equipment. Each industrial equipment will generate carbon emissions during operation, and the carbon emissions of industrial equipment depend on the operating state of the industrial equipment, that is, the carbon emissions of the equipment under different operating states are different. For example, when the equipment is driven by a high proportion of fossil fuels, that is, when the equipment is operated at a high efficiency, the carbon emissions generated by the equipment are large, and correspondingly, when the equipment is driven by a low proportion of fossil fuels, that is, when the equipment is operated at a low efficiency, the carbon emissions generated by the equipment are also low. Taking the carbon emissions of the steelmaking process as an example, the steelmaking process needs to be completed through the coordinated work of blast furnaces, converters, refining furnaces, electric arc furnaces and auxiliary equipment. For each boiler, if the furnace is in a high power state such as a high temperature or a good conversion effect, the carbon emissions generated are also high, and if the operating efficiency of the furnace is low, the corresponding carbon emissions are also less. In the process of estimating carbon emissions, the traditional carbon emission factor method directly makes a rough estimate of a carbon emission activity as a whole, so the actual accuracy is not high and the scope of application is limited, making it difficult to support refined carbon management.
[0051] The present invention breaks down the carbon emission activities of industrial users into the operating status of all carbon emission equipment per unit time, monitors the operating status of each industrial equipment in real time, and calculates the carbon emissions of the entire industrial users based on the operating status of each industrial equipment and the corresponding carbon emission factor. The real-time carbon emissions of industrial users can be accurately calculated, effectively improving the accuracy and scope of carbon emission monitoring, and realizing refined management of carbon emission activities.
[0052] At the same time, considering that the method of training the carbon emission prediction model based on the neural network cannot realize the real-time monitoring of the carbon emission, is not conducive to timely obtaining the carbon emission status of the equipment, and has the problems of high difficulty in model training, easy to be affected by environmental noise, and low prediction accuracy, the present invention forms an improved shrinkage residual network by fusing the channel attention mechanism with the BAM attention mechanism and the shrinkage residual network, and uses the training sample data corresponding to the different power load sequence data and the corresponding carbon emission equipment status data to train based on the network model to obtain the equipment status recognition model. Since the model is based on the shrinkage residual network, the model training is simple, which can reduce the difficulty of model training, and the channel attention mechanism is used to calculate the corresponding weight coefficients for different channels, and the influence of different sample data can be adaptively adjusted, and then the feature map output by the shrinkage residual network is screened based on the weight coefficient, and the feature map with complex noise information can be filtered out. At the same time, the feature map is enhanced by combining the BAM attention mechanism, which can effectively avoid the interference of complex noise on the detection result, thereby improving the recognition accuracy and robustness of the carbon emission equipment status, and combining the recognition results of all carbon emission equipment statuses in industrial users with the corresponding carbon emission factors, the carbon emissions can be calculated efficiently and accurately.
[0053] like Figure 1 As shown, the steps of the industrial user carbon emissions monitoring method integrating the attention mechanism and the residual network in this embodiment include:
[0054] Step S01: obtaining the power load sequence data of the user to be tested within a specified time period and the corresponding status data of all key carbon emission equipment as training sample data, wherein the key carbon emission equipment is the equipment whose carbon emission is greater than a preset threshold.
[0055] Specifically, the power load sequence data of the user to be tested within a period of time (configurable) in history and the corresponding key carbon emission equipment status data can be obtained to form a training data sample for the model. Among them, the key carbon emission equipment is the equipment with a large amount of carbon emissions in industrial users. The key carbon emission equipment among industrial users can be determined based on the configured preset threshold (configurable).
[0056] Step S02, input the training sample data into the network model formed by the fusion attention mechanism and the residual network for training, and obtain the equipment state recognition model after training. The network model formed by the fusion attention mechanism and the residual network is based on the shrinkage residual network, and the channel attention mechanism and the BAM attention module are embedded in the front end of the fully connected layer on the output side of the shrinkage residual network. The channel attention mechanism calculates the weight coefficients of different channels and calculates the judgment threshold according to each weight coefficient. The judgment threshold is used to screen the feature map output by the shrinkage residual network, and then the feature map is enhanced by the BAM attention module, and the state recognition result of the carbon emission equipment is output through the fully connected layer.
[0057] This embodiment forms an improved shrinkage residual network by integrating the channel attention mechanism and BAM (Bottleneck Attention Module) on the basis of the shrinkage residual network. Figure 2 As shown, after stacking multiple layers of basic modules in the shrinkage residual network, a channel attention mechanism (used in the residual module, not shown in the figure) and a BAM attention module are added to the front end of the fully connected layer. The device state recognition model is trained based on the network model, and the channel attention mechanism is used to determine a set of unique weight coefficients for each sample, so that the model can adaptively adjust the influence of different samples, improve the flexibility and effectiveness of feature selection, and greatly improve the accuracy and robustness of device state recognition, ensure the stability and efficiency of the model in complex environments, and combine the BAM attention mechanism to further enhance the feature map and improve the model recognition accuracy. Therefore, by combining the channel attention mechanism, BAM and residual modules, an accurate and robust device state recognition model can be quickly trained.
[0058] As an optional implementation, the steps of calculating weight coefficients of different channels by the channel attention mechanism and calculating the judgment threshold according to each weight coefficient include:
[0059] Step S201, compressing the feature map obtained by the convolutional network of the training sample data into a channel descriptor to obtain an aggregated feature containing global information;
[0060] Step S202, calculating the weight of the feature channel by using the Excitation operation on the aggregated features containing global information;
[0061] Step S203: Use the new weights to weight the feature map obtained by the convolutional network of the training sample data to obtain the channel attention mechanism output and use it as the judgment threshold.
[0062] As an optional implementation, in the above step S201, the calculation expression of the aggregated feature containing global information is:
[0063]
[0064] Among them, x i is the feature map obtained by the convolutional network for the i-th training sample data, y i is the aggregated feature containing global information corresponding to the i-th training sample data, a×b represents the feature space dimension, a and b represent the height and width of the feature map respectively, and m and n represent the specific height and width values respectively.
[0065] As an optional implementation, in the above step S202, the channel attention mechanism can automatically learn weights through a small sub-network so that each sample data can determine its own unique set of weights, so that the model can adaptively adjust the influence of different samples, and improve the flexibility and effectiveness of feature selection. In the SE (Squeeze-and-Excitation Networks) network, the Excitation operation consists of two fully connected layers, which generate the weight of each channel through a nonlinear activation function (ReLU) and a sigmoid function. The weight can reflect the importance of each channel for learning specific feature representations. The calculation expression for calculating the weight s of the feature channel using the aggregated feature y through the Excitation operation using the aggregated feature containing global information can be specifically expressed as:
[0066] s=σ(W2δ(W1y)) (2)
[0067] Among them, σ and δ represent Sigmoid and ReLU activation functions respectively, and W1 and W2 are the weight matrices of the two fully connected layers respectively.
[0068] As an optional implementation, in the above step S203, the obtained new weight s is specifically obtained by weighted calculation with the feature map obtained by the convolutional network through the training sample data, that is, the output of the channel attention mechanism is obtained according to the following formula and used as the judgment threshold:
[0069] τ=s·x (3)
[0070] Among them, τ represents the judgment threshold.
[0071] As an optional implementation, the feature map output by the shrinkage residual network can be screened according to the following formula based on the judgment threshold:
[0072]
[0073] Among them, w is the weight and sgn represents the sign function.
[0074] As shown in the above formula (4), the new threshold function f(x) is used to process the training sample data in combination with the determined judgment threshold. Most of the features above the threshold τ in the feature map are important features, so the features above the threshold τ are retained, while the features below the threshold are mostly noise information, so the features with absolute values below the threshold are set to zero. The new feature map after the above screening can preferentially eliminate the features of complex noise information and shrink them toward zero, which not only effectively reduces noise interference and improves the purity and reliability of the data, but also ensures the retention of key features, thereby improving the precision and accuracy of carbon emission monitoring. The use of the above new threshold function f(x) can also make the entire monitoring process more flexible and precise, and can adapt to the variable data in different industrial environments, further enhancing the adaptability and accuracy of the real-time monitoring system.
[0075] In a specific application embodiment, during the training process, the training sample data is input into the shrinkage residual network, and the weight coefficient of each sample data is calculated through the channel attention mechanism integrated into the network. The feature map x obtained by the training sample data through the convolutional network is first compressed into a channel descriptor according to formula (1) to obtain an aggregate feature y containing global information. Then, based on the aggregate feature y containing global information, the weight of the feature channel is calculated according to formula (2), that is, the corresponding weight of each sample data is obtained. Then, the result obtained by multiplying the feature map with the average value according to formula (3) is used as the new threshold τ. The feature map x calculated by the residual module of the sample data is processed using the new threshold function f(x) shown in formula (4) to eliminate the complex noise information in the feature map while retaining important features.
[0076] After obtaining important features according to the above steps, the feature map output by the residual module is further processed through the BAM attention mechanism to enhance important features based on BAM attention, and finally the status results of key carbon emission equipment are output through the fully connected layer. BAM is an attention mechanism module that infers attention maps through two independent paths: channel and spatial. It calculates attention maps in the channel and spatial dimensions of the feature map respectively, and then combines the two attention maps to emphasize important features and suppress unimportant information.
[0077] As an optional implementation, the BAM attention module can perform feature enhancement on the feature map according to the following formula:
[0078] U′=U+U·σ(M c (U)+M s (U)) (5)
[0079]
[0080] Among them, σ is the Sigmoid activation function, U is the input feature map, U' is the output feature map after feature enhancement by the BAM attention module, BN is batch normalization, MLP is a fully connected operation, AvgPool is a global average pooling; W'0, W'1 are weight parameters, b0, b1 are bias parameters, f n*n Represents n*n convolution.
[0081] Furthermore, the residual network adopts cross-layer identity connection, which can further reduce the difficulty of network training and prevent gradient disappearance and explosion problems.
[0082] Step S03: obtain the real-time electricity load sequence data of the user to be tested and input it into the trained equipment status recognition model to obtain the real-time status recognition results of all key carbon emission equipment in the user to be tested.
[0083] After the equipment status recognition model is trained in step S02, the real-time power load sequence data of the user to be tested is obtained in real time. After the data is input into the trained equipment status recognition model, the status recognition results of all key carbon emission equipment in the industrial user can be obtained, such as whether each device is in operation, and whether each device is operating in a high power or low power state.
[0084] Step S04: Obtain the carbon emission factors corresponding to different device states of all carbon emission devices in the user to be tested, and calculate the real-time carbon emissions of the user to be tested based on the real-time state recognition results of all carbon emission devices in the user to be tested and the corresponding carbon emission factors.
[0085] By using the status identification results corresponding to all carbon emission equipment in the industrial user obtained in step S03 and combining the status of all key carbon emission equipment and their corresponding carbon emission factors, the real-time carbon emission data of the industrial user can be calculated.
[0086] As an optional implementation, for a factory with m devices in different states, the carbon emissions in a given time period T, divided into d time intervals, can be estimated using the carbon emission factor (KgCO2 / kWh) of each device state. For example, the real-time carbon emissions CE of the user to be tested is calculated according to the following formula:
[0087]
[0088] Among them, EF i,j is the carbon emission factor of the i-th device state in time interval j, T is the calculation duration, m is the number of carbon emission devices among the users to be tested, and d is the number of time intervals into which the calculation duration T is divided.
[0089] This embodiment first obtains the user's electricity load data and key carbon emission equipment data as samples, and then inputs the sample data into an improved shrinkage residual network that integrates the channel attention mechanism, BAM and shrinkage residual network for model training, and uses the channel attention mechanism to determine the weight coefficient of each sample and then calculate it as a judgment threshold, and uses the judgment threshold to process the sample data to eliminate the feature map of complex noise information, and then enhances important features based on BAM attention, and outputs the status results of the core carbon emission equipment through the fully connected layer; then, based on the trained equipment status recognition model, the real-time electricity load data of the user to be tested is identified to obtain the real-time status of all key carbon emission equipment in the industrial user; finally, the carbon emission factors corresponding to the user's key carbon emission equipment in different states are obtained, and the real-time carbon emission data of the industrial user is calculated by combining the status of all key carbon emission equipment and their corresponding carbon emission factors, which can efficiently realize accurate and real-time monitoring of the carbon emissions of industrial users.
[0090] The industrial user carbon emissions monitoring device of this embodiment integrates the attention mechanism and the shrinkage residual network, including:
[0091] A training data acquisition module is used to obtain the power load sequence data of the user to be tested within a specified time period and the corresponding status data of all key carbon emission equipment as training sample data. The key carbon emission equipment is the equipment whose carbon emission is greater than a preset threshold;
[0092] A model training module is used to input training sample data into the equipment state recognition model formed by integrating the attention mechanism and the residual network for training. After training, the equipment state recognition model is obtained. The equipment state recognition model is based on the shrinkage residual network, and the channel attention mechanism and the BAM attention module are embedded in the front end of the fully connected layer on the output side of the shrinkage residual network. The weight coefficients of different channels are calculated by the channel attention mechanism, and the judgment threshold is calculated according to each weight coefficient. The feature map output by the shrinkage residual network is screened using the judgment threshold, and then the feature map is enhanced by the BAM attention module, and the state recognition result of the carbon emission equipment is output through the fully connected layer;
[0093] A real-time data acquisition module is used to obtain the real-time electricity load sequence data of the user to be tested and input it into the trained equipment status recognition model to obtain the real-time status recognition results of all key carbon emission equipment in the user to be tested;
[0094] The carbon emission calculation module is used to obtain the carbon emission factors corresponding to all carbon emission devices in the user to be tested in different device states, and calculate the real-time carbon emissions of the user to be tested based on the real-time state identification results of all carbon emission devices in the user to be tested and the corresponding carbon emission factors.
[0095] The industrial user carbon emissions monitoring device that integrates the attention mechanism and the shrinkage residual network in this embodiment corresponds one to one with the above-mentioned industrial user carbon emissions monitoring method that integrates the attention mechanism and the shrinkage residual network, and will not be described one by one here.
[0096] This embodiment further provides a computer device, including a processor and a memory, wherein the memory is used to store a computer program, and the processor is used to execute the computer program to perform the above method.
[0097] It is understandable that the above method of this embodiment can be executed by a single device, such as a computer or server, etc., and can also be applied to a distributed scenario and completed by multiple devices in cooperation with each other. In the case of a distributed scenario, one of the multiple devices can only execute one or more steps in the above method of this embodiment, and multiple devices interact to complete the above method. The processor can be implemented in the form of a general-purpose CPU, a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, etc., for executing related programs to implement the above method of this embodiment. The memory can be implemented in the form of a read-only memory ROM, a random access memory RAM, a static storage device, and a dynamic storage device. The memory can store an operating system and other applications. When the above method of this embodiment is implemented by software or firmware, the relevant program code is stored in the memory and called and executed by the processor.
[0098] This embodiment further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0099] Those skilled in the art will appreciate that the above-mentioned embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, may be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0100] The above is only a preferred embodiment of the present invention, and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment, it is not intended to limit the present invention. Therefore, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the content of the technical solution of the present invention shall fall within the scope of protection of the technical solution of the present invention.
Claims
1. A method for monitoring carbon emissions of industrial users by integrating attention mechanism and residual network, characterized in that the steps include: Step S01, obtaining the power load sequence data of the user to be tested within a specified time period and the corresponding status data of all key carbon emission equipment as training sample data, wherein the key carbon emission equipment is equipment whose carbon emission is greater than a preset threshold; Step S02, inputting the training sample data into the network model formed by the fusion attention mechanism and the residual network for training, and obtaining the equipment state recognition model after training, wherein the network model formed by the fusion attention mechanism and the residual network is based on the shrinkage residual network, and the channel attention mechanism and the BAM attention module are embedded in the front end of the fully connected layer on the output side of the shrinkage residual network, and the weight coefficients of different channels are calculated by the channel attention mechanism, and the judgment threshold is calculated according to each of the weight coefficients, and the feature map output by the shrinkage residual network is screened by using the judgment threshold, and then the feature map is enhanced by the BAM attention module, and the state recognition result of the carbon emission equipment is output through the fully connected layer; Step S03, obtaining the real-time electricity load sequence data of the user to be tested and inputting it into the trained equipment status recognition model to obtain the real-time status recognition results of all key carbon emission equipment in the user to be tested; Step S04: Obtain the carbon emission factors corresponding to different device states of all carbon emission devices in the user to be tested, and calculate the real-time carbon emissions of the user to be tested based on the real-time state recognition results of all carbon emission devices in the user to be tested and the corresponding carbon emission factors.
2. According to claim 1, the industrial user carbon emissions monitoring method integrating attention mechanism and residual network is characterized in that: In step S02, the weight coefficients of different channels are calculated by the channel attention mechanism and the judgment threshold is calculated according to each weight coefficient, including: Step S201, compressing the feature map obtained by the convolutional network of the training sample data into a channel descriptor to obtain an aggregated feature containing global information; Step S202, calculating the weight of the feature channel by performing an Excitation operation on the aggregated features containing global information; Step S203: Use the calculated weight of the feature channel to weight the feature map obtained by the convolutional network of the training sample data to obtain a channel attention mechanism output and use it as the judgment threshold.
3. The industrial user carbon emissions monitoring method integrating attention mechanism and residual network according to claim 2 is characterized in that: In step S201, the calculation expression of the aggregated feature containing global information is: Among them, x i is the feature map obtained by the convolutional network for the i-th training sample data, y i is the aggregated feature containing global information corresponding to the i-th training sample data, a×b represents the feature space dimension, a and b represent the height and width of the feature map respectively, and m and n represent the height and width values respectively.
4. The industrial user carbon emissions monitoring method integrating attention mechanism and residual network according to claim 2 is characterized in that: In step S202, the aggregated features containing global information are subjected to an Excitation operation to calculate the weight of the feature channel according to the following formula: s=σ(W2δ(W1y)) Among them, σ and δ represent Sigmoid and ReLU activation functions respectively, W1 and W2 are the weight matrices of the two fully connected layers respectively, and y is the aggregated feature containing global information corresponding to the training sample data; In step S203, the channel attention mechanism output is obtained according to the following formula and used as the judgment threshold: τ=s·x Among them, τ represents the judgment threshold, and x is the feature map obtained by the convolutional network through the training sample data.
5. The industrial user carbon emissions monitoring method integrating attention mechanism and residual network according to claim 4 is characterized in that: In step S02, the feature map output by the shrinkage residual network is screened according to the following formula based on the judgment threshold: Among them, w is the weight and sgn represents the sign function.
6. The industrial user carbon emissions monitoring method integrating attention mechanism and residual network according to any one of claims 1 to 5, characterized in that: In step S02, the BAM attention module performs feature enhancement on the feature map according to the following formula: U′=U+U·σ(M c (U)+M s (IN)) M c (U)=BN(MLP(AνgPool(U))) =BN(W'1(W'0AνgPool(U)+b0)+b1) Among them, σ is the Sigmoid activation function, U is the input feature map, U' is the output feature map after feature enhancement by the BAM attention module, BN is batch normalization, MLP is a fully connected operation, AvgPool is a global average pooling; W'0, W'1 are weight parameters, b0, b1 are bias parameters, f n*n Represents n*n convolution.
7. The industrial user carbon emissions monitoring method integrating attention mechanism and residual network according to any one of claims 1 to 5, characterized in that: In step S04, the real-time carbon emissions CE of the user to be tested is calculated according to the following formula: Among them, EF i,j is the carbon emission factor of the i-th device state in time interval j, T is the calculation duration, m is the number of carbon emission devices among the users to be tested, and d is the number of time intervals into which the calculation duration T is divided.
8. An industrial user carbon emissions monitoring device integrating attention mechanism and shrinkage residual network, characterized in that: include: A training data acquisition module is used to acquire the power load sequence data of the user to be tested within a specified time period and the corresponding status data of all key carbon emission equipment as training sample data, wherein the key carbon emission equipment is equipment with carbon emissions greater than a preset threshold; A model training module, used for inputting the training sample data into a network model formed by a fusion attention mechanism and a residual network for training, and obtaining a device state recognition model after training. The network model formed by the fusion attention mechanism and the residual network is based on a shrinkage residual network, and is obtained by embedding a channel attention mechanism and a BAM attention module at the front end of a fully connected layer on the output side of the shrinkage residual network. The channel attention mechanism calculates weight coefficients of different channels and calculates a judgment threshold based on each of the weight coefficients. The judgment threshold is used to screen a feature map output by the shrinkage residual network, and then the feature map is enhanced by the BAM attention module, and the state recognition result of the carbon emission equipment is output through the fully connected layer; A real-time data acquisition module is used to acquire the real-time electricity load sequence data of the user to be tested and input it into the trained equipment status recognition model to obtain the real-time status recognition results of all key carbon emission equipment in the user to be tested; The carbon emission calculation module is used to obtain the carbon emission factors corresponding to all carbon emission devices in the user to be tested in different device states, and calculate the real-time carbon emissions of the user to be tested based on the real-time state identification results of all carbon emission devices in the user to be tested and the corresponding carbon emission factors.
9. A computer device comprising a processor and a memory, wherein the memory is used to store a computer program, wherein: The processor is configured to execute the computer program to perform the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Behavior detection method based on residual contraction structure and non-local attention
CN114842553A
Underwater sound source distance measurement method and device based on attention mechanism and multi-scale fusion
CN116106880A
Scene text detection method based on image segmentation
CN116486393A
Carbon emission monitoring method, device and equipment for industrial user and storage medium
CN117763271A
Cited By
Industrial multi-load identification and direct carbon emission monitoring method
CN122927076A