Industrial equipment energy consumption real-time mapping and prediction method based on digital twinning

CN122886846APending Publication Date: 2026-10-09HANGZHOU QIANJIANG ELECTRIC GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610888103.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-18
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0004](3)缺乏将能耗预测结果自动转换为碳排放数据的能力,能耗预测与碳排放核算相互割裂

Benefits of technology

一、实现多协议设备的即插即用与安全隔离。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886846A_ABST
    Figure CN122886846A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of industrial equipment energy consumption real-time mapping and prediction method based on digital twinning, the cross technical field of industrial internet of things and artificial intelligence, rely on edge intelligent gateway to execute, through protocol fingerprint matching and WebAssembly sandbox technology realizes the plug-and-play access and security isolation of multi-protocol equipment;Build digital twinning model based on state-event time sequence structure, and realize virtual-actual high-precision mapping in combination with real-time data feedback mechanism;Local space-time features and long time sequence dependencies of energy consumption data are extracted using CNN-BiLSTM-Attention hybrid deep learning model to achieve high-precision energy consumption prediction;Real-time conversion of carbon emissions is achieved through built-in emission factor library;Multi-objective optimization decision is made using reinforcement learning algorithm combined with source network load storage state. The problems of industrial protocol fragmentation, low energy consumption prediction accuracy and weak source network load storage collaboration capability are solved, device access automation is realized, mapping error is less than 2%, reasoning delay is less than 50ms, and energy consumption and carbon emissions can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial Internet of Things and artificial intelligence, specifically to a method for real-time mapping and prediction of energy consumption of industrial equipment based on digital twins. Background Technology

[0002] Driven by Industry 4.0 and smart manufacturing, industrial enterprises are undergoing profound digital transformation. Statistics show that over 200 communication protocols exist in the global industrial sector, including Modbus RTU / TCP, OPC UA, MQTT, Profinet, EtherNet / IP, BACnet, DNP3, and IEC 60870-5-104. The use of proprietary communication protocols by different manufacturers and from different eras of industrial equipment presents significant challenges to equipment interoperability. Existing digital twin energy consumption prediction technologies suffer from the following shortcomings: (1) The mapping accuracy between the digital twin model and the physical entity is insufficient, and the virtual-real synchronization mechanism of the "state-event" time sequence structure is lacking, resulting in a deviation of more than 5% between the twin and the physical entity.

[0003] (2) Energy consumption prediction models are mainly based on statistical methods (ARIMA, Prophet) and shallow machine learning (random forest, SVM), which are difficult to capture the nonlinear time series characteristics and long-term dependence of industrial equipment energy consumption. The prediction accuracy MAPE is generally higher than 10%.

[0004] (3) There is a lack of ability to automatically convert energy consumption forecast results into carbon emission data, and energy consumption forecasting and carbon emission accounting are separated from each other.

[0005] (4) Access to multi-protocol industrial equipment relies on manual configuration. Protocol-driven systems lack security isolation mechanisms, have long deployment cycles, and pose security risks.

[0006] With the deepening of Industry 4.0 and the "dual carbon" goals, industrial enterprises are facing increasingly urgent needs for digital transformation and energy conservation and emission reduction. Industrial energy management, as a key link in reducing production costs and carbon emissions, is facing multiple technological challenges: I. Severe fragmentation of industrial protocols and high barriers to device access: Many "dumb" or outdated devices exist in industrial settings, with inconsistent communication protocol standards (such as Modbus, OPC UA, Profinet, etc.), making device interconnection difficult. Traditional access methods rely on manual parameter configuration and custom driver development, which is not only inefficient and lacks versatility, but also fails to meet the plug-and-play needs of enterprises for rapid capacity expansion or equipment upgrades.

[0007] Second, insufficient accuracy in energy consumption prediction makes it difficult to cope with complex operating conditions: Energy consumption data of industrial equipment is usually nonlinear, non-stationary, and has long-term time-series dependencies. Traditional statistical methods (such as ARIMA) or single machine learning models are difficult to effectively extract local spatiotemporal features and long-term dependencies in energy consumption data, resulting in low prediction accuracy and failing to provide a reliable basis for refined energy scheduling.

[0008] Third, there is a disconnect between the physical and digital worlds, and a lack of real-time feedback mechanisms: existing energy consumption monitoring systems mostly remain at the level of simple data display, lacking high-fidelity digital twin models. Due to the inability to establish a real-time, high-precision mapping and automatic calibration mechanism between physical entities and virtual models, the system struggles to detect subtle changes in equipment operating status, resulting in a delayed response to energy consumption anomalies.

[0009] Fourth, the ability to coordinate and optimize energy sources, grids, loads and storage is weak, resulting in low overall benefits: Existing energy management systems often only focus on single energy consumption monitoring or simple load control, lacking the ability to make multi-objective optimization decisions that organically combine carbon emission quantification, new energy consumption (such as photovoltaics), energy storage scheduling and time-of-use pricing, making it difficult to minimize both electricity costs and carbon emissions while ensuring production. Summary of the Invention

[0010] This invention addresses the shortcomings of existing technologies by providing a real-time mapping and prediction method for energy consumption of industrial equipment based on digital twins. Applied to edge intelligent gateways, it features multi-protocol access, edge AI inference, offline autonomy, and cloud-edge collaboration capabilities. Utilizing a protocol fingerprint database and Wasm sandbox technology, it achieves automatic identification and secure isolation of over 200 industrial protocols. Through a state-event structure and automatic calibration mechanism, it ensures that the error between the digital twin and the actual entity is controlled within 2%. Based on NPU acceleration, the model inference latency is less than 50ms, and it supports offline autonomous operation. By integrating the advantages of local features, temporal dependencies, and weight allocation, it improves prediction accuracy.

[0011] The above-mentioned technical problems of the present invention are mainly solved by the following technical solutions: A method for real-time mapping and prediction of energy consumption of industrial equipment based on digital twins is proposed. The method is applied to an edge intelligent gateway for multi-protocol industrial equipment. The gateway is configured with a physical link layer module, a transmission adaptation layer module, a protocol identification layer module, a protocol parsing layer module, a data standardization layer module, an edge AI inference engine module, a local time-series database module, a network outage autonomy module, and a cloud-edge collaboration module.

[0012] The method includes the following steps: S1: Multi-source data acquisition and preprocessing. S2: Automatic identification and access of multi-protocol industrial equipment for plug-and-play operation. S3: Construction and calibration of a real-time digital twin mapping model. S4: Training and inference of an energy consumption prediction model based on CNN-BiLSTM-Attention. S5: Real-time conversion between energy consumption and carbon emissions. S6: Multi-objective optimization decision-making based on reinforcement learning for source-grid-load-storage systems.

[0013] Preferably, step S2 includes: the protocol identification layer module has a built-in protocol fingerprint database that stores feature signature vectors of more than 200 industrial protocols; when a new device is connected, 50 communication messages are automatically collected, and multi-dimensional features such as message length distribution, field offset mode, CRC check method, and function code distribution are extracted. These features are then compared with the protocol fingerprint database using a weighted cosine similarity calculation. The protocol type with the highest similarity and exceeding the threshold of 0.85 is taken as the identification result; after the protocol identification is completed, the corresponding WebAssembly protocol driver plugin is loaded from the local repository, and the protocol parsing state machine is initialized in an independent Wasm sandbox.

[0014] Preferably, step S3 uses a state-event time sequence structure to describe the operating conditions of industrial equipment. The state-event time sequence structure includes continuous operating state parameters and discrete event parameters. The continuous operating state parameters include power, speed, temperature, and pressure, while the discrete event parameters include equipment start-up and shutdown, process switching, and fault alarms. The digital twin model is automatically calibrated by driving real-time IoT data. When the mapping error exceeds the 2% threshold, a deviation correction feedback mechanism is triggered to readjust the model parameters, thereby achieving a high-precision virtual-real mapping with an error of less than 2% between the physical entity and the digital twin.

[0015] Preferably, the CNN-BiLSTM-Attention energy consumption prediction model in step S4 includes: CNN convolutional layers: A 2-layer Conv1D+MaxPooling structure is used to extract local spatiotemporal features. The first layer has 64 Conv1D filters and a kernel size of 3, while the second layer has 128 Conv1D filters and a kernel size of 3.

[0016] BiLSTM layer: Employs a 64-unit × 2-layer bidirectional structure to capture long-term temporal dependencies.

[0017] Attention mechanism: Bahdanau attention is used to assign adaptive weights for each time step.

[0018] Fully connected layer: Energy consumption prediction values ​​are output sequentially through Dense(32) and Dense(1).

[0019] Preferably, the training parameters of the CNN-BiLSTM-Attention model are as follows: the optimizer is Adam, the initial learning rate is 0.001, the batch size is 32, the training period is 100, and the EarlyStopping mechanism is used with a patience value of 10 to monitor the validation set loss. The loss function is the mean squared error (MSE).

[0020] Preferably, the input feature vector of the model includes: active power, equipment speed, operating temperature, production output, and time features, including hour, weekday, month, and whether it is a holiday; the output of the model is the predicted energy consumption value for the next period.

[0021] Preferably, the energy consumption-carbon emission real-time conversion engine in step S5 has a built-in multi-energy medium emission factor library, and the conversion formula is C=E×EF, where C is the carbon emission amount in kgCO2; E is the predicted energy consumption in kWh; and EF is the emission factor. The emission factor library includes: grid emission factor 0.7035 kgCO2 / kWh, natural gas emission factor 2.162 kgCO2 / m3, and diesel emission factor 3.15 kgCO2 / kg.

[0022] Preferably, step S6 employs either DDPG or SAC reinforcement learning algorithms to achieve multi-objective collaborative optimization of the power generation, grid, load, and energy storage systems. The state space of the reinforcement learning includes: predicted photovoltaic output, predicted load, energy storage SOC, and time-of-use pricing. The action space includes: energy storage charging and discharging power, and interruptible load dispatching quantity. The reward function is: electricity cost savings + carbon emission reduction - battery degradation penalty.

[0023] Preferably, the protocol parsing layer module uses WebAssembly containerized sandbox to isolate and execute protocol driver plugins. Each protocol driver runs in an independent Wasm sandbox, and security is ensured by memory isolation between sandboxes. The loading and unloading of protocol drivers are verified by digital signatures to ensure integrity.

[0024] Preferably, the edge AI inference engine module implements localized AI inference based on NPU, and the inference latency of the CNN-BiLSTM-Attention model is less than 50ms. It supports the continued execution of energy consumption prediction and optimization decisions in the autonomous mode when the network is disconnected, and automatically retransmits the prediction results and operation logs during the network disconnection period after the network is restored.

[0025] The working principle of this invention is mainly divided into five core levels: multi-source heterogeneous data access principle, digital twin virtual-real mapping principle, deep learning energy consumption prediction principle, carbon emission quantification calculation principle, and multi-objective collaborative optimization decision-making principle.

[0026] I. Principle of Multi-Source Heterogeneous Data Access: Fingerprint Matching and Sandbox Isolation. Addressing the pain point of complex protocols in industrial settings, the system adopts an automatic identification principle of "passive monitoring + feature analysis."

[0027] Protocol fingerprinting: When the physical link layer detects a new device access, the system passively captures the communication packet stream and extracts multi-dimensional feature vectors such as packet length distribution, field offset pattern, CRC check method, and function code distribution. By calculating the weighted cosine similarity between this vector and known protocol features in the built-in fingerprint database, once the similarity exceeds a threshold (e.g., 0.85), the protocol type is determined, achieving automatic identification without manual configuration.

[0028] Wasm Sandbox Isolation Driver: Based on the identification results, the system dynamically loads the corresponding WebAssembly (Wasm) format protocol driver plugin. Each plugin runs in an independent memory sandbox, parsing message data through a state machine. This mechanism ensures that an anomaly in a single protocol driver will not affect the gateway's main system, achieving a balance between efficiency and security.

[0029] II. Real-time Digital Twin Mapping Principle: State-Event Fusion and Closed-Loop Calibration. To accurately replicate the operating state of physical devices in virtual space, the system adopts a dual-track driving mapping principle of "state-event".

[0030] Multidimensional state fusion: The system defines continuous analog quantities (such as power, speed, and temperature) collected by sensors as "states" and discrete switching quantities generated by the equipment (such as start-up, shutdown, fault, and process switching) as "events". In the digital twin, the continuous state curves are fused with discrete event markers through timestamp alignment to construct a complete time sequence map of equipment operation conditions.

[0031] Feedback self-calibration mechanism: The system compares the output data of the physical entity and the digital twin in real time. When the calculated mapping error exceeds a preset threshold (e.g., 2%), a feedback control loop is triggered to automatically adjust the parameters of the twin model (e.g., correction coefficient, transmission delay, etc.), forcing the digital twin to approximate the real state of the physical entity and ensuring high fidelity of virtual-real synchronization.

[0032] III. Deep Learning Energy Consumption Prediction Principles: Multi-scale Feature Extraction and Attention Focus. A hybrid neural network model of CNN-BiLSTM-Attention is used to model and predict complex industrial energy consumption time-series data.

[0033] Local Feature Extraction (CNN): Using a one-dimensional convolutional neural network (CNN) to slide and scan the input time series data, local high-frequency fluctuation features and short-term correlation patterns (such as energy consumption spikes caused by sudden loads) in energy consumption data are extracted.

[0034] Long-term dependency capture: The feature sequences extracted by the CNN are input into a bidirectional long short-term memory network. The forward LSTM learns the impact of historical data on the future, and the backward LSTM uses future context information to assist in current understanding, thereby capturing long-term trends and seasonal patterns in energy consumption data.

[0035] Key Time Period Focus: By introducing the Bahdanau attention mechanism, different weights are assigned to each time step of the BiLSTM output. The model can automatically "focus" on the key time periods that contribute the most to the prediction results (such as the equipment startup phase or high-load production phase), suppressing irrelevant noise, thereby outputting high-precision energy consumption predictions for the next time period.

[0036] IV. Principle of Real-Time Carbon Emission Conversion: Factor Mapping and Dynamic Calculation. Based on energy consumption prediction results, the system realizes real-time conversion from energy consumption to carbon emissions according to the principles of mass conservation and carbon emission accounting.

[0037] Dynamic factor matching: The system has a built-in emission factor library containing multiple energy media such as electricity, natural gas, and diesel. Based on the type of energy consumed by the equipment (e.g., identified as electricity consumption), the system automatically calls the corresponding regional power grid emission factor (e.g., the East China power grid factor is 0.7035 kgCO2 / kWh).

[0038] Linear mapping calculation: Based on the formula C = E × EFC = E × EF (carbon emissions = energy consumption value × emission factor), the predicted electrical energy (kWh) is mapped to carbon dioxide emission equivalent (kgCO2) in real time, thereby realizing the direct link between energy consumption data and environmental data.

[0039] V. Multi-objective Collaborative Optimization Decision-Making Principle: Deep Reinforcement Learning and Intelligent Game Theory. To achieve optimal scheduling of source, network, load, and storage, the system constructs a decision-making model for agent-environment interaction based on the principles of deep reinforcement learning (DDPG or SAC).

[0040] State perception: The intelligent agent perceives the environmental state in real time, including photovoltaic power generation forecast (renewable resource supply), load forecast (energy demand), energy storage SOC (system energy storage status), and real-time time-of-use electricity price (economic cost signal).

[0041] Strategy exploration and evaluation: The agent outputs actions based on the current state (i.e., energy storage charging and discharging power, and the scheduling amount of interruptible loads). These actions act on the physical environment and change the system state.

[0042] Reward Maximization Driven: The system is designed with a composite reward function that includes "electricity cost savings" (economic benefits), "carbon emission reduction" (environmental benefits), and "battery degradation penalty" (equipment health). Through continuous trial and error and learning, the agent aims to find a strategy that maximizes long-term cumulative rewards, thereby achieving optimized operation with the lowest cost and least carbon emissions while meeting production needs.

[0043] The present invention can achieve the following effects: This invention provides a method for real-time mapping and prediction of energy consumption of industrial equipment based on digital twins, which has the following significant advantages compared with existing technologies: I. Achieve plug-and-play functionality and secure isolation for multi-protocol devices.

[0044] By using a built-in protocol fingerprint database and a weighted cosine similarity algorithm, this invention can automatically identify industrial equipment types (supporting 200+ protocols), eliminating the need for tedious manual configuration and reducing identification time to the second level (e.g., within 12 seconds), significantly lowering the barrier to entry for equipment and maintenance costs.

[0045] WebAssembly (Wasm) sandbox technology is used to load protocol driver plugins. The memory isolation mechanism ensures the security of different protocol drivers, effectively preventing the entire gateway from crashing due to the failure of a single driver, and improving the robustness of the system.

[0046] II. Constructing a high-precision digital twin model and a real-time self-calibration mechanism.

[0047] The system uses a "state-event" time sequence structure to describe the equipment's operating conditions, integrating continuous operating parameters (such as power and temperature) with discrete events (such as start-up, shutdown, and faults), thus more comprehensively reflecting the actual operating logic of industrial equipment.

[0048] A deviation correction feedback mechanism based on real-time IoT data is introduced. When the mapping error exceeds a threshold (e.g., 2%), the model parameters are automatically adjusted to ensure that the error between the physical entity and the digital twin is always controlled within an extremely low range (R^2 > 0.98), laying a data foundation for subsequent accurate prediction.

[0049] Third, it significantly improves the accuracy and timeliness of energy consumption forecasting.

[0050] A hybrid deep learning model combining CNN, BiLSTM, and Attention is proposed. CNN is used to extract local spatiotemporal features, BiLSTM to capture long-term bidirectional dependencies, and the Attention mechanism to focus on key time steps, effectively solving the problem of difficult modeling of energy consumption data under complex operating conditions.

[0051] Experimental results show that this model reduces MAE by 67% compared to the traditional ARIMA model and by 19% compared to the ordinary CNN-BiLSTM model, achieving high-precision prediction with MAPE < 3%.

[0052] Leveraging an edge AI inference engine (based on NPU), it achieves localized inference with a latency of less than 50ms, supports autonomous operation even when the network is down, and meets the stringent real-time requirements of industrial sites.

[0053] IV. Achieving multi-objective optimization decision-making for real-time quantification of carbon emissions.

[0054] It has a built-in multi-energy medium emission factor library, which enables real-time conversion from energy consumption forecasting to carbon emission forecasting (C=E × EFC=E×EF), helping enterprises accurately grasp their carbon footprint and meet compliance requirements such as ISO 14064.

[0055] Based on the reinforcement learning (DDPG / SAC) algorithm, this study comprehensively considers multiple dimensions such as photovoltaic output, time-of-use pricing, and energy storage SOC to output a source-grid-load-storage collaborative optimization strategy. By balancing electricity cost savings, carbon emission reduction, and battery life, it achieves a win-win situation for both economic and environmental benefits. Attached Figure Description

[0056] Figure 1 This is a schematic diagram of the architecture of the real-time mapping and prediction system for industrial equipment energy consumption based on digital twins, as presented in this invention.

[0057] Figure 2 This is a flowchart of the digital twin real-time mapping engine of the present invention.

[0058] Figure 3 This is a structural diagram of the CNN-BiLSTM-Attention energy consumption prediction model of the present invention.

[0059] Figure 4 This is a diagram of the multi-protocol industrial equipment data acquisition and edge AI inference architecture of the present invention.

[0060] Figure 5 This is the flowchart of the real-time energy consumption-carbon emission conversion and optimization decision-making process of the present invention. Detailed Implementation

[0061] The technical solution of the invention will be further described in detail below through embodiments and in conjunction with the accompanying drawings.

[0062] Example 1: As Figure 1As shown, the real-time energy consumption mapping and prediction system for industrial equipment based on digital twins comprises three main parts: a physical layer device cluster, an edge AI gateway, and a cloud-based digital twin platform. The physical layer devices include typical industrial equipment such as motors, pump sets, air conditioning units, air compressors, and spinning machines, which connect to the edge AI gateway via various protocols including Modbus RTU / TCP, OPC UA, MQTT, and Profinet. The edge AI gateway includes a multi-protocol adaptation module, an automatic protocol identification module, an edge AI inference module, and a local time-series database (TDengine), communicating bidirectionally with the cloud-based digital twin platform via an encrypted MQTT channel. The cloud-based digital twin platform includes a real-time mapping engine, a CNN-BiLSTM-Attention prediction engine, a carbon emission conversion engine, and an optimization decision engine, ultimately displaying energy consumption prediction curves and carbon emission reports on a web-based visualization dashboard.

[0063] Example 2: As Figure 4 As shown, the protocol identification layer module 103 has a built-in protocol fingerprint database that stores feature signature vectors for over 200 industrial protocols. When a new device is connected, the gateway automatically collects 50 communication messages, extracts multi-dimensional features such as message length distribution, field offset pattern, CRC check method, and function code distribution, and performs a weighted cosine similarity calculation with the protocol fingerprint database. The protocol type with the highest similarity exceeding the threshold of 0.85 is taken as the identification result. After protocol identification is completed, the corresponding WebAssembly protocol driver plugin is loaded from the local repository, and the protocol parsing state machine is initialized in an independent Wasm sandbox. Taking a manufacturing company adding a Siemens S7-1200 PLC as an example: T+0 seconds: the physical link layer detects the carrier signal; T+3 seconds: protocol identification is completed (S7 protocol similarity 0.97); T+5 seconds: the Wasm driver is loaded and a communication session is established; T+12 seconds: device information, 42 data points, and real-time data are all reported to the cloud. The entire process is completed automatically in 12 seconds, without manual configuration.

[0064] Example 3: As Figure 2 As shown, the digital twin real-time mapping engine adopts a "state-event" temporal structure to achieve high-precision synchronization between the virtual and real worlds. The multi-source data acquisition module obtains equipment operating parameters through IoT sensors, smart meters, and PLC / MES systems; the data preprocessing module performs cleaning, normalization, and time alignment; the physical-digital state mapping module establishes state-event temporal associations; and the model calibration module automatically calibrates the twin model parameters using real-time IoT data. When the mapping error exceeds a 2% threshold, a deviation correction feedback mechanism is triggered, readjusting the model parameters until the accuracy requirements are met. In a real-world test in a spinning workshop, the mapping error R² between the spinning machine speed, number of spindles, yarn count, and other process parameters and the digital twin model reached 0.9821, MAE = 0.6435 kWh, and RMSE = 2.4423 kWh.

[0065] Example 4: Figure 3 As shown, the NN-BiLSTM-Attention energy consumption prediction model adopts an end-to-end deep learning architecture. The input layer receives multi-dimensional feature vectors, including: active power (kW), equipment speed (rpm), operating temperature (°C), production output (pieces / hour), and time features (hour, weekday, month, whether it is a holiday). The CNN convolutional layer adopts a 2-layer Conv1D (64→128 filters, kernel size 3) + MaxPooling structure to extract local spatiotemporal feature patterns. The BiLSTM layer adopts a 64-unit × 2-layer bidirectional structure, with the forward LSTM capturing historical dependencies and the backward LSTM capturing future context, effectively modeling the long-range temporal dependencies of energy consumption data. The attention mechanism adopts Bahdanau attention, assigning adaptive weights to each time step, so that the model focuses on the key time period that has the greatest impact on the prediction results. The fully connected layer outputs the predicted energy consumption value for the next time period through Dense(32) and Dense(1) in sequence.

[0066] The model was trained using the Adam optimizer with an initial learning rate of 0.001, a batch size of 32, and 100 training epochs, along with an EarlyStopping mechanism (patience value of 10, monitoring validation set loss). The mean squared error (MSE) loss function was used, and evaluation metrics included R², MAE, and RMSE. On a dataset of spinning machines in a textile factory (7714 samples, sampling interval 1-3 minutes, training set:validation set:test set = 7:1:2), the model achieved R² = 0.9821, MAE = 0.6435 kWh, and RMSE = 2.4423 kWh. Compared to the CNN-BiLSTM baseline model, MAE was reduced by 19%, and RMSE by 3.5%; compared to the ARIMA statistical model, MAE was reduced by 67%.

[0067] Example 5: Figure 5 As shown, the real-time energy consumption-carbon emission conversion engine automatically converts the energy consumption prediction results of the CNN-BiLSTM-Attention model into carbon emissions. The conversion formula is: C=E×EF, where C is the carbon emission (kgCO2), E is the predicted energy consumption (kWh), and EF is the emission factor (kgCO2 / kWh). The emission factor library includes emission factors for multiple energy media: East China Power Grid electricity 0.7035 kgCO2 / kWh (released by the Ministry of Ecology and Environment in 2024), natural gas 2.162 kgCO2 / m3, diesel 3.15 kgCO2 / kg, and heat (coal-fired) 0.25 kgCO2 / kg steam. Taking a factory air compressor station as an example, with a predicted power consumption of 440 kWh, the carbon emission C=440×0.7035=309.54 kgCO2.

[0068] The carbon emission intensity benchmarking analysis module compares the calculated results with industry benchmarks, historical values ​​for the same period, and target values ​​in multiple dimensions. The optimization decision engine employs the DDPG / SAC reinforcement learning algorithm to achieve multi-objective collaborative optimization of energy sources, grid, load, and storage. The state space includes predicted photovoltaic output, predicted load, energy storage SOC, and time-of-use pricing; the action space includes energy storage charging and discharging power and interruptible load dispatching; the reward function is electricity cost savings + carbon emission reduction - battery degradation penalty. Through multi-objective optimization, the system outputs equipment start-up and shutdown scheduling strategies, demand response participation plans, and carbon quota trading recommendations. In a zero-carbon factory demonstration project, this optimization strategy achieved a comprehensive benefit of 12% reduction in energy consumption, 18% reduction in carbon emission intensity, and 15% electricity cost savings.

[0069] Example 6: If there are 50 spinning machines, 3 air compressors, and 2 air conditioning units, the annual electricity consumption is approximately 10 million kWh. After deploying the system described in this invention, the following effects are achieved: (1) Equipment access: 50 spinning machines are connected via RS485 / Modbus RTU, and air compressors and air conditioners are connected via Ethernet / OPC UA. All devices automatically complete protocol identification and driver loading within 12 seconds.

[0070] (2) Digital twin mapping: A 3D model of the workshop is established, and the speed, number of spindles, yarn count and energy consumption of each spinning machine are synchronized to the digital twin in real time. The mapping error R²>0.98.

[0071] (3) Energy consumption prediction: The CNN-BiLSTM-Attention model outputs the energy consumption prediction curve for the next 4 hours in 15-minute increments, with MAPE < 3%.

[0072] (4) Carbon emission conversion: calculate carbon emissions in real time and automatically generate carbon emission reports that comply with ISO 14064.

[0073] (5) Optimized scheduling: By combining time-of-use electricity pricing (0.98 yuan / kWh during peak hours and 0.32 yuan / kWh during off-peak hours), the start-up and shutdown sequence of equipment is optimized through load scheduling, saving approximately 850,000 yuan in electricity costs annually, with an investment payback period of approximately 1.5 years.

[0074] In summary, this method for real-time mapping and prediction of industrial equipment energy consumption based on digital twins, executed by an edge intelligent gateway, achieves plug-and-play access and secure isolation of multi-protocol devices through protocol fingerprint matching and WebAssembly sandbox technology. It constructs a digital twin model based on a "state-event" temporal structure and combines it with a real-time data feedback mechanism to achieve high-precision mapping between the virtual and real worlds. A CNN-BiLSTM-Attention hybrid deep learning model is used to extract local spatiotemporal features and long-term temporal dependencies of energy consumption data, achieving high-precision energy consumption prediction. Carbon emissions are converted in real-time through a built-in emission factor library. A reinforcement learning algorithm is employed to perform multi-objective optimization decisions based on the source-grid-load-storage status. This method solves the problems of fragmented industrial protocols, low energy consumption prediction accuracy, and weak source-grid-load-storage coordination capabilities. It achieves automated equipment access, mapping errors of less than 2%, and inference latency of less than 50ms, effectively reducing energy consumption and carbon emissions, demonstrating significant economic and environmental benefits.

[0075] The above description is only a specific embodiment of the present invention, but the structural features of the present invention are not limited thereto. Any changes or modifications made by those skilled in the art within the scope of the present invention are covered by the patent scope of the present invention.

Claims

1. A method for real-time mapping and prediction of energy consumption of industrial equipment based on digital twins, characterized in that, The method is applied to an edge intelligent gateway for multi-protocol industrial equipment. The gateway is configured with a physical link layer module, a transmission adaptation layer module, a protocol identification layer module, a protocol parsing layer module, a data standardization layer module, an edge AI inference engine module, a local time-series database module, a network outage autonomy module, and a cloud-edge collaboration module. The method includes the following steps: S1: Multi-source data acquisition and preprocessing; S2: Plug-and-play automatic identification and access for multi-protocol industrial equipment; S3: Real-time mapping model construction and calibration for digital twins; S4: Training and inference of energy consumption prediction model based on CNN-BiLSTM-Attention; S5: Real-time conversion between energy consumption and carbon emissions; S6: Multi-objective optimization decision-making based on reinforcement learning for source-network-load-storage systems.

2. The method for real-time mapping and prediction of industrial equipment energy consumption based on digital twins according to claim 1, characterized in that, Step S2 includes: the protocol identification layer module has a built-in protocol fingerprint database that stores feature signature vectors of more than 200 industrial protocols; when a new device is connected, 50 communication messages are automatically collected, and multi-dimensional features such as message length distribution, field offset mode, CRC check method, and function code distribution are extracted. The weighted cosine similarity is calculated with the protocol fingerprint database, and the protocol type with the highest similarity and exceeding the threshold of 0.85 is taken as the identification result; after the protocol identification is completed, the corresponding WebAssembly protocol driver plugin is loaded from the local repository, and the protocol parsing state machine is initialized in an independent Wasm sandbox.

3. The method for real-time mapping and prediction of industrial equipment energy consumption based on digital twins according to claim 1, characterized in that, Step S3 describes the operating conditions of industrial equipment using a state-event time sequence structure. This structure includes continuous operating state parameters and discrete event parameters. The continuous operating state parameters include power, speed, temperature, and pressure, while the discrete event parameters include equipment start-up and shutdown, process switching, and fault alarms. Real-time IoT data drives the automatic calibration of the digital twin model. When the mapping error exceeds a 2% threshold, a deviation correction feedback mechanism is triggered to readjust the model parameters, achieving a high-precision virtual-real mapping with an error of less than 2% between the physical entity and the digital twin.

4. The method for real-time mapping and prediction of industrial equipment energy consumption based on digital twins according to claim 1, characterized in that, The CNN-BiLSTM-Attention energy consumption prediction model in step S4 includes: CNN convolutional layers: A 2-layer Conv1D+MaxPooling structure is used to extract local spatiotemporal features. The first layer has 64 Conv1D filters and a kernel size of 3, and the second layer has 128 Conv1D filters and a kernel size of 3. BiLSTM layer: Employs a 64-unit × 2-layer bidirectional structure to capture long-term temporal dependencies; Attention mechanism: Bahdanau attention is used to assign adaptive weights for each time step; Fully connected layer: Energy consumption prediction values ​​are output sequentially through Dense(32) and Dense(1).

5. The method for real-time mapping and prediction of industrial equipment energy consumption based on digital twins according to claim 4, characterized in that, The training parameters of the CNN-BiLSTM-Attention model are as follows: the optimizer is Adam, the initial learning rate is 0.001, the batch size is 32, the training period is 100, and the EarlyStopping mechanism is used with a patience value of 10 to monitor the validation set loss. The loss function is the mean squared error (MSE).

6. The method for real-time mapping and prediction of industrial equipment energy consumption based on digital twins according to claim 4, characterized in that, The input feature vector of the model includes: active power, equipment speed, operating temperature, production output, and time features, including hour, weekday, month, and whether it is a holiday; the output of the model is the predicted energy consumption value for the next period.

7. The method for real-time mapping and prediction of industrial equipment energy consumption based on digital twins according to claim 1, characterized in that, The real-time energy consumption-carbon emission conversion engine in step S5 has a built-in multi-energy medium emission factor library. The conversion formula is C=E×EF, where C is the carbon emission amount in kgCO2; E is the predicted energy consumption in kWh; and EF is the emission factor. The emission factor library includes: grid emission factor 0.7035 kgCO2 / kWh, natural gas emission factor 2.162 kgCO2 / m3, and diesel emission factor 3.15 kgCO2 / kg.

8. The method for real-time mapping and prediction of energy consumption of industrial equipment based on digital twins according to claim 1, characterized in that, Step S6 employs DDPG or SAC reinforcement learning algorithms to achieve multi-objective collaborative optimization of source-grid-load-storage. The state space of the reinforcement learning includes: photovoltaic power output forecast, load forecast, energy storage SOC, and time-of-use electricity price; The operational space includes: energy storage charging and discharging power, and interruptible load dispatching capacity; The reward function is electricity cost savings + carbon emission reduction - battery degradation penalty.

9. The method for real-time mapping and prediction of energy consumption of industrial equipment based on digital twins according to claim 1, characterized in that, The protocol parsing layer module uses WebAssembly containerized sandboxes to isolate and execute protocol driver plugins. Each protocol driver runs in an independent Wasm sandbox, and security is ensured between sandboxes through memory isolation. The loading and unloading of protocol drivers are verified through digital signatures to ensure integrity.

10. The method for real-time mapping and prediction of energy consumption of industrial equipment based on digital twins according to claim 1, characterized in that, The edge AI inference engine module implements localized AI inference based on NPU. The inference latency of the CNN-BiLSTM-Attention model is less than 50ms. It supports continuing to perform energy consumption prediction and optimization decisions in the autonomous mode when the network is down. After the network is restored, the prediction results and operation logs during the downtime are automatically retransmitted.