Energy consumption metering method and device based on digital twinning

By collecting building energy consumption data through digital twin technology and analyzing topological, temporal, health, and environmental characteristics, combined with an energy consumption coefficient prediction model, accurate metering and dynamic compensation of building energy consumption are achieved. This solves the accuracy problem of energy consumption analysis in existing technologies and improves the prediction accuracy of energy consumption compensation.

CN121723552BActive Publication Date: 2026-06-26SHANGHAI SHIPPING GROUP +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANGHAI SHIPPING GROUP
Filing Date
2025-12-19
Publication Date
2026-06-26

AI Technical Summary

Technical Problem

Existing technologies for multi-source heterogeneous data fusion and dynamic collaborative control lack a correlation calibration mechanism for the dynamic coupling of equipment status data and simulation models, resulting in energy consumption benchmarks deviating from actual operating conditions and affecting the accuracy of building energy consumption analysis.

Method used

By using a digital twin-based energy consumption metering method, we collect building energy consumption correlation data, analyze topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics, and combine them with an energy consumption coefficient prediction model to determine the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, thereby achieving baseline energy consumption prediction and dynamic compensation. We also use an attention mechanism-based long short-term memory network to predict the energy consumption compensation coefficient.

Benefits of technology

It achieves precise metering of building energy consumption and quantification of energy-saving effects, improves the accuracy of energy consumption analysis, and enhances the prediction accuracy of energy consumption compensation coefficient by capturing the nonlinear deviation between long-term aging characteristics and short-term fluctuation characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723552B_ABST
    Figure CN121723552B_ABST
Patent Text Reader

Abstract

The application discloses an energy consumption metering method and device based on digital twinning, which comprises the following steps: collecting building energy consumption related data based on a pre-constructed building energy consumption digital twinning model; analyzing the energy consumption of the building according to the building energy consumption related data, and giving topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics; combining a pre-constructed energy consumption coefficient prediction model to analyze the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics, and giving environmental influence coefficients, topological correlation coefficients and space utilization coefficients; determining a benchmark energy consumption prediction model through the environmental influence coefficients, topological correlation coefficients and space utilization coefficients, combining an energy consumption compensation coefficient, and giving building target energy consumption, so as to realize accurate prediction of benchmark energy consumption and dynamic compensation of actual energy consumption, realize accurate metering of building energy consumption, and improve the analysis accuracy of building energy consumption.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of energy consumption analysis of building models, specifically relating to an energy consumption metering method and device based on digital twins. Background Technology

[0002] Building energy consumption accounts for 40% of global energy consumption and more than 30% of greenhouse gas emissions. Therefore, reducing overall building energy consumption and carbon emissions is of great significance for the green and sustainable development of buildings.

[0003] The application of digital twin technology in building energy management has been deepening in recent years. By integrating building information models, IoT sensors and dynamic simulation tools, it can dynamically describe the state and behavior of real objects on the digital end, provide real-time predictive data for building energy monitoring, realize static analysis of building energy consumption and equipment monitoring, and effectively reduce the difference between the model and the actual object.

[0004] Patent application CN118445900A discloses a real-time predictive control method for building energy consumption using digital twin technology. The method includes establishing a digital twin model of the building, building a building energy consumption prediction model and an indoor environmental satisfaction prediction model based on ideal data, inputting data from the digital twin model during operation into the prediction model, and finally establishing a multi-objective optimization model using control command data as decision variables to output the optimal control command for real-time building energy consumption prediction. This method solves the problems of existing building energy consumption prediction models failing to match actual building conditions and lacking interpretability of results. It reduces the discrepancy between the model and the building, improves the model's realism, and provides an interpretable and evidence-based reference for the formulation of energy-saving strategies.

[0005] However, existing technologies still have significant shortcomings in multi-source heterogeneous data fusion and dynamic collaborative control. The lack of a correlation calibration mechanism for the dynamic coupling of equipment status data and simulation models causes energy consumption benchmarks to deviate from actual operating conditions. How to perform correlation calibration of digital twin models based on equipment status data to improve the accuracy of digital twin models in building energy consumption analysis is a problem that needs to be solved. Summary of the Invention

[0006] To address the shortcomings of the existing technologies, this invention provides a digital twin-based energy consumption metering method and apparatus. The method includes: collecting building energy consumption correlation data based on a pre-constructed digital twin model of building energy consumption; analyzing the building's energy consumption based on the correlation data, providing topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics; combining a pre-constructed energy consumption coefficient prediction model, analyzing the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics, providing an environmental impact coefficient, a topological correlation coefficient, and a space utilization coefficient; determining a benchmark energy consumption prediction model using the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, and providing a target energy consumption for the building based on the energy consumption compensation coefficient.

[0007] By collecting and analyzing building energy consumption correlation data through a digital twin model of building energy consumption, the system identifies corresponding topological correlation characteristics, multi-scale temporal characteristics, equipment health characteristics, and environmental lag characteristics from four aspects. Combined with a pre-constructed energy consumption coefficient prediction model, feature analysis is performed to determine the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient in the baseline energy consumption prediction model. Finally, the target building energy consumption is determined by incorporating the energy consumption compensation coefficient. By identifying key energy conversion parameters through the energy consumption coefficient prediction model and integrating four types of characteristics—topological correlation, multi-scale temporal characteristics, equipment health characteristics, and environmental lag characteristics—the system achieves accurate prediction of baseline energy consumption and dynamic compensation for actual energy consumption. This enables precise metering of building energy consumption and quantification of energy-saving effects, improving the accuracy of building energy consumption analysis.

[0008] In a first aspect, the present invention provides an energy consumption metering method based on digital twins, specifically including the following steps:

[0009] Collect building energy consumption related data based on a pre-built digital twin model of building energy consumption;

[0010] Based on building energy consumption correlation data, the energy consumption of buildings is analyzed, and topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics are given.

[0011] Based on the pre-built energy consumption coefficient prediction model, the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics are analyzed, and the environmental impact coefficient, topological correlation coefficient and space utilization coefficient are given.

[0012] By using environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, a baseline energy consumption prediction model is determined, and by combining the energy consumption compensation coefficient, the target energy consumption of the building is given.

[0013] Furthermore, the digital twin model of building energy consumption is obtained through the following steps:

[0014] Obtain the topology diagram of the energy-consuming equipment;

[0015] Based on the energy consumption level of the energy-consuming equipment, the topology diagram of the energy-consuming equipment is mapped onto the 3D building model to construct a primary digital twin model;

[0016] By mapping virtual and real data through the unique energy consumption codes of each energy-consuming device in the primary digital twin model, a digital twin model of building energy consumption is obtained.

[0017] Furthermore, the building energy consumption data includes the real-time load rate of energy-consuming equipment, the average load rate at different time scales, the cumulative runtime, the number of equipment failures, the maintenance interval, and the outdoor temperature at different times.

[0018] Based on building energy consumption correlation data, the energy consumption of buildings is analyzed, and topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics are presented, specifically including:

[0019] Based on the real-time load rate of energy-consuming equipment and the electrical distance of each energy-consuming equipment in the building's electrical circuit, the topological association characteristics of each circuit are determined.

[0020] By analyzing the average load rate at different time scales, the fluctuation of energy-consuming equipment at different time scales is presented, giving multi-scale time characteristics.

[0021] The health status of energy-consuming equipment is analyzed by combining the cumulative running time, number of equipment failures, and maintenance intervals, and the health characteristics of the equipment are given.

[0022] Based on the outdoor temperature at different times, the environmental lag of energy-consuming equipment is analyzed, and the characteristics of environmental lag are given.

[0023] Furthermore, multi-scale time features include long-term aging features and short-term fluctuation features;

[0024] By analyzing the average load rate at different time scales, the fluctuation of energy-consuming equipment at different time scales is presented, giving multi-scale time characteristics, specifically including:

[0025] Based on the long-term time scale, the average load rate of energy-consuming equipment at different times within the long-term time scale is analyzed, and combined with the maximum load rate of energy-consuming equipment, the long-term aging characteristics are obtained.

[0026] Based on the real-time load rate of energy-consuming equipment at different times within a short-term time scale, the standard deviation and mean load are obtained, the short-term fluctuation of energy-consuming equipment is analyzed, and the short-term fluctuation characteristics are given.

[0027] Furthermore, by combining the cumulative operating time of energy-consuming equipment, the number of equipment failures, and maintenance intervals, the health status of the energy-consuming equipment is analyzed, and the equipment health characteristics are given, specifically including:

[0028] Compare the cumulative operating time and theoretical lifespan of energy-consuming equipment to provide operational characteristic items;

[0029] By comparing the number of equipment failures and the maximum number of failures of energy-consuming equipment, fault characteristic items are given;

[0030] Based on the maintenance interval and average maintenance interval of energy-consuming equipment, maintenance characteristic items are given;

[0031] By integrating operational feature weights, fault feature weights, and maintenance feature weights, the equipment health features are obtained.

[0032] Furthermore, the energy consumption coefficient prediction model includes a first prediction sub-model, a second prediction sub-model, a third prediction sub-model, and a regression fusion sub-model;

[0033] Based on a pre-built energy consumption coefficient prediction model, the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics are analyzed to provide environmental impact coefficients, topological correlation coefficients, and space utilization coefficients, specifically including:

[0034] The first prediction sub-model is used to analyze and predict the equipment health characteristics and environmental lag characteristics to obtain the environmental coefficient.

[0035] The topological coefficients are obtained by analyzing and predicting multi-scale temporal features and topological correlation features through the second prediction sub-model.

[0036] By using the third prediction sub-model and combining it with the building space characteristics, the topological correlation characteristics are analyzed and predicted to obtain the spatial coefficients;

[0037] Based on the regression fusion sub-model, the environmental coefficient, topological coefficient, and spatial coefficient are fused and adjusted to output the environmental impact coefficient, topological correlation coefficient, and spatial utilization coefficient.

[0038] Furthermore, after obtaining the topological coefficients and spatial coefficients, the following is also included:

[0039] Based on a preset topology threshold, the topology coefficients are compared to obtain the topology comparison results;

[0040] Based on the topology comparison results, analyze the load rate of each spatial area, calculate the average building load rate, and give the current spatial load concentration factor.

[0041] Obtain the standard deviation of historical topological coefficients and combine it with the current topological coefficients to give the first excess factor;

[0042] Obtain the mean and standard deviation of the historical spatial load concentration factor, and combine them with the current spatial load concentration factor to give a second excess factor;

[0043] By combining the weighting coefficients and integrating the first excess factor and the second excess factor, a comprehensive enhancement factor is given;

[0044] Based on the comprehensive enhancement factor and combined with the preset enhancement coefficient, the current spatial coefficient is updated to obtain the latest spatial coefficient.

[0045] Furthermore, by using environmental impact coefficients, topological correlation coefficients, and space utilization coefficients, a baseline energy consumption prediction model is determined. Combined with energy consumption compensation coefficients, the target energy consumption for the building is then given, specifically including:

[0046] By embedding the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient into a preset energy conversion formula, a baseline energy consumption prediction model is determined.

[0047] Based on the benchmark energy consumption prediction model, the real-time energy consumption data of the building is analyzed to determine the benchmark energy consumption of the building.

[0048] By combining the energy consumption compensation coefficient, the building's baseline energy consumption is adjusted to give the building's target energy consumption.

[0049] Furthermore, the energy consumption compensation coefficient is obtained by training a long short-term memory network using an attention mechanism. This network comprises an embedding layer, an LSTM layer, and an attention layer, specifically including:

[0050] The embedding layer maps high-dimensional features, including multi-scale temporal features and device health features, to a low-dimensional vector space to obtain embedded feature vectors;

[0051] LSTM layers capture temporal relationships embedded in feature vectors and output the hidden feature state;

[0052] The attention layer performs weighted processing on the hidden state of the feature layer to obtain the energy consumption compensation coefficient.

[0053] Secondly, the present invention also provides an energy consumption metering device based on digital twins, employing an energy consumption metering method based on digital twins as described in any one of the above claims, comprising:

[0054] The data acquisition module is used to collect building energy consumption-related data based on a pre-built digital twin model of building energy consumption.

[0055] The feature extraction module is used to analyze the building's energy consumption based on building energy consumption correlation data, and to provide topological correlation features, multi-scale time features, equipment health features, and environmental lag features.

[0056] The coefficient prediction module is used to combine a pre-built energy consumption coefficient prediction model to analyze topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics, and to give environmental impact coefficient, topological correlation coefficient and space utilization coefficient.

[0057] The energy consumption output module is used to determine the baseline energy consumption prediction model by using the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, and to give the target energy consumption of the building by combining the energy consumption compensation coefficient.

[0058] The present invention provides an energy consumption metering method and device based on digital twins, which has at least the following beneficial effects:

[0059] (1) Building energy consumption correlation data is collected and the building's energy consumption is analyzed through a digital twin model of building energy consumption. The corresponding topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics are given from four aspects. Combined with the pre-constructed energy consumption coefficient prediction model, feature analysis is performed to give the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient in the benchmark energy consumption prediction model. Finally, the target energy consumption of the building is determined by combining the energy consumption compensation coefficient. By determining the key parameters of energy conversion through the energy consumption coefficient prediction model, and integrating the four types of characteristics of topological correlation, multi-scale time, equipment health, and environmental lag, the accurate prediction of benchmark energy consumption and dynamic compensation of actual energy consumption are realized. This achieves accurate measurement of building energy consumption and quantification of energy-saving effects, and improves the accuracy of building energy consumption analysis.

[0060] (2) The energy consumption compensation coefficient is predicted by capturing the nonlinear deviation between the long-term aging characteristics and short-term fluctuation characteristics of energy-consuming equipment. The long short-term memory network with attention mechanism is used to input the long-term aging characteristics, short-term fluctuation characteristics and equipment health characteristics. The influence of short-term fluctuation is highlighted through the attention mechanism, which solves the problem of "insufficient processing of time features" in the traditional model and improves the prediction accuracy of the energy consumption compensation coefficient. Attached Figure Description

[0061] Figure 1 A flowchart illustrating the energy consumption metering method based on digital twins provided in this embodiment of the invention;

[0062] Figure 2 A flowchart for obtaining a digital twin model of building energy consumption provided in an embodiment of the present invention;

[0063] Figure 3 This is a flowchart of feature extraction from building energy consumption correlation data provided in an embodiment of the present invention;

[0064] Figure 4 The flowcharts provided for embodiments of the present invention provide environmental impact coefficient, topological correlation coefficient, and space utilization coefficient.

[0065] Figure 5 A flowchart of the target energy consumption of a building is provided for embodiments of the present invention;

[0066] Figure 6 A flowchart for determining the energy consumption compensation coefficient provided in an embodiment of the present invention;

[0067] Figure 7 A structural block diagram of the energy consumption metering method based on digital twin provided in an embodiment of the present invention;

[0068] Figure 8 This is a structural block diagram of an energy consumption metering device based on digital twins provided in an embodiment of the present invention.

[0069] Among them, 201 is the data acquisition module; 202 is the feature extraction module; 203 is the coefficient prediction module; and 204 is the energy consumption output module. Detailed Implementation

[0070] To better understand the above technical solutions, a detailed description of the solutions will be provided below in conjunction with the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0071] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms, and “multiple” generally includes at least two unless the context clearly indicates otherwise.

[0072] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that an article or device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such an article or device. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the article or device that includes said element.

[0073] This invention determines key energy conversion parameters through an energy consumption coefficient prediction model, integrates four types of features—topological correlation, multi-scale time, equipment health, and environmental lag—to achieve accurate prediction of baseline energy consumption and dynamic compensation for actual energy consumption. It solves the problems of "physical rigidity" and "insufficient feature correlation" in traditional models. By transforming the spatial correlation, temporal evolution, equipment status, and environmental impact of building energy consumption into calculable quantitative variables, it provides a highly interpretable and accurate solution for building energy consumption management.

[0074] This invention provides an energy consumption metering method based on digital twins, specifically including: collecting building energy consumption correlation data based on a pre-constructed building energy consumption digital twin model; analyzing the building's energy consumption based on the building energy consumption correlation data, providing topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics; combining a pre-constructed energy consumption coefficient prediction model, analyzing the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics, providing environmental impact coefficient, topological correlation coefficient, and space utilization coefficient; determining a benchmark energy consumption prediction model through the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, and providing the building's target energy consumption by combining the energy consumption compensation coefficient.

[0075] By employing physical design of high-dimensional features (topology, time, health, environment), adaptive prediction of baseline energy consumption prediction model parameters (Stacking ensemble model), and prediction of energy compensation coefficients using a long short-term memory network with an attention mechanism, we have achieved accurate metering of building energy consumption and quantification of energy-saving effects. This innovative approach deeply integrates "digital twins" and "machine learning," thereby improving the accuracy of building energy consumption calculations.

[0076] like Figure 1 As shown in the figure, this embodiment of the invention provides an energy consumption metering method based on digital twins, and the specific steps are as follows:

[0077] S101: Collect building energy consumption related data based on a pre-built digital twin model of building energy consumption.

[0078] Among them, the building energy consumption related data includes the real-time load rate of energy-consuming equipment, the average load rate at different time scales, the cumulative running time, the number of equipment failures, the maintenance interval, and the outdoor temperature at different times.

[0079] Furthermore, the building energy consumption digital twin model, referring to Figure 2 This can be obtained through the following steps:

[0080] Obtain the topology diagram of the energy-consuming equipment;

[0081] Based on the energy consumption level of the energy-consuming equipment, the topology diagram of the energy-consuming equipment is mapped onto the 3D building model to construct a primary digital twin model;

[0082] By mapping virtual and real data through the unique energy consumption codes of each energy-consuming device in the primary digital twin model, a digital twin model of building energy consumption is obtained.

[0083] In one specific implementation, the topology diagram of various energy-consuming devices in the building is first obtained. These devices include, but are not limited to, chillers, elevators, and air conditioning units. Simultaneously, a 3D building model is constructed based on the building information modeling (BIM). According to the energy consumption level of the devices and in conjunction with the topology diagram, the devices are sequentially mapped onto the 3D building model to obtain a primary digital twin model. The energy consumption levels are, in order, the main substation level, the distribution board level, and the terminal equipment level. It can be understood that the primary digital twin model contains the relationships between the building and each energy-consuming device; that is, the spatial coordinates of energy-consuming devices such as electricity meters, water meters, and gas meters are marked in the 3D building model, forming a "device-location" topology tree. At this point, the energy consumption data of the devices needs to be mapped onto the primary digital twin model to form a building energy consumption twin model.

[0084] In a specific example, virtual device objects are created on the virtual terminal based on each energy-consuming device. For instance, if an energy-consuming device has an electricity meter, a virtual electricity meter variable is created on the virtual terminal; if an energy-consuming device has an air conditioning room, a 3D room node is created on the virtual terminal. Each pair of "energy-consuming device-virtual terminal object" is associated with a unique energy consumption code. Energy consumption data generated by the energy-consuming devices is transmitted in real-time to the corresponding virtual object in the primary digital twin model via data channels and unique energy consumption codes, completing the virtual-real data mapping. Similarly, staff can adjust the values ​​in the virtual object to control the energy-consuming devices. It is important to note that before data mapping, the units and dimensions of the energy consumption data need to be standardized to ensure consistency across multiple data sources.

[0085] When collecting real-time data from energy-consuming devices, a multi-source acquisition strategy is employed. For example, real-time data is automatically collected via the Modbus / BACnet protocol through the smart meter layer, while a manual data entry port is configured for each metering node through the mechanical meter layer. Data source priorities are set: automatic data collection is prioritized when the smart meter layer is functioning normally, and manual data entry is prioritized when a fault occurs through the mechanical meter layer. Before mapping the data to the real-world system, the collected energy consumption data undergoes quality verification. This verification includes monitoring the online status of energy-consuming devices, verifying the range of energy consumption data values, and cross-validating data from related devices, such as correlating water pressure and flow data. If the online status of an energy-consuming device is abnormal, the energy consumption data in the virtual-to-real-world mapping is marked as abnormal. If negative values ​​or out-of-range energy consumption data are found, the corresponding data is discarded.

[0086] S102: Based on building energy consumption correlation data, analyze the building's energy consumption and provide topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics.

[0087] Furthermore, based on building energy consumption correlation data, the energy consumption of buildings is analyzed, and topological correlation characteristics, multi-scale temporal characteristics, equipment health characteristics, and environmental lag characteristics are presented, with reference to... Figure 3 Specifically, it includes:

[0088] Based on the real-time load rate of energy-consuming equipment and the electrical distance of each energy-consuming equipment in the building's electrical circuit, the topological association characteristics of each circuit are determined.

[0089] By analyzing the average load rate at different time scales, the fluctuation of energy-consuming equipment at different time scales is presented, giving multi-scale time characteristics.

[0090] The health status of energy-consuming equipment is analyzed by combining the cumulative running time, number of equipment failures, and maintenance intervals, and the health characteristics of the equipment are given.

[0091] Based on the outdoor temperature at different times, the environmental lag of energy-consuming equipment is analyzed, and the characteristics of environmental lag are given.

[0092] It is important to understand that high-dimensional features are extracted from four aspects of building energy consumption: spatial correlation (such as loop equipment coordination), temporal evolution (such as equipment aging), equipment status (such as health), and environmental impact (such as temperature and humidity lag). This yields topological correlation features, multi-scale temporal features, equipment health features, and environmental lag features, providing a data foundation for subsequent energy consumption coefficient prediction models. The extracted high-dimensional features can be used as input variables for energy consumption coefficient prediction models.

[0093] Topological association features represent the load coupling factor of electrical circuits. In building electrical circuits, equipment load rates exhibit synergistic effects (e.g., air conditioner startup increases transformer load rate). Traditional models often overlook these synergistic effects and the correlation between energy-consuming devices, leading to biases in energy consumption analysis. Topological association features capture the load coupling effect of energy-consuming devices within the same circuit using electrical distance weighting, yielding the load coupling factor, specifically expressed as:

[0094]

[0095] Among them, C i Let C be the load coupling factor of loop i, representing the degree of coordinated load of energy-consuming devices within the loop. i ∈[0,1], the larger the value of the load coupling factor, the stronger the synergistic effect. loop(i) represents the set of energy-consuming devices in loop i. jw represents the real-time load rate of energy-consuming device j. ij Let d be the electrical distance weight for loop i and energy-consuming device j. ij D is the electrical distance between the center of loop i and the energy-consuming device j. max L is the maximum electrical distance in the loop. max,i Let be the rated total load rate of loop i.

[0096] The larger the load coupling factor, the stronger the load coordination among energy-consuming devices in the same circuit, the more concentrated the circuit load, and the greater the line loss.

[0097] Specifically, multi-scale time features include long-term aging features and short-term fluctuation features;

[0098] By analyzing the average load rate at different time scales, the fluctuation of energy-consuming equipment at different time scales is presented, giving multi-scale time characteristics, specifically including:

[0099] Based on the long-term time scale, the average load rate of energy-consuming equipment at different times within the long-term time scale is analyzed, and combined with the maximum load rate of energy-consuming equipment, the long-term aging characteristics are obtained.

[0100] Based on the real-time load rate of energy-consuming equipment at different times within a short-term time scale, the standard deviation of the load and the mean of the load are obtained, the short-term fluctuation of the energy-consuming equipment is analyzed, and the short-term fluctuation characteristics are given.

[0101] Multi-scale time features are analyzed from both long-term aging and short-term fluctuations through time-dimensional decomposition. Equipment energy consumption evolves over time, exhibiting both long-term aging trends (e.g., efficiency decline due to motor winding aging) and short-term fluctuation patterns (e.g., sudden load changes during holidays). Traditional models using a single time feature cannot distinguish between long-term aging trends and short-term fluctuation patterns. This invention uses dual-scale time variables for feature analysis. Long-term aging features are specifically represented as follows:

[0102]

[0103] Among them, A i For the long-term aging characteristics of energy-consuming equipment i, L i (t) represents the average load rate of energy-consuming device i on day t, where t is the number of operating days, L max,i T is the rated maximum load rate of energy-consuming device i. long This refers to the time span covered by the data for long-term aging features. For example, if the long-term aging feature requires analyzing the average load rate over the most recent month, then T... long =30 days.

[0104] Short-term volatility characteristics are specifically expressed as follows:

[0105]

[0106] Among them, V i Let σ represent the short-term fluctuation characteristics of energy-consuming device i, and let σ represent the energy-consuming device i in time T. short The standard deviation of real-time load rate over a period of time For T short Average real-time load rate over a given period. (T) short This refers to the time span of the data corresponding to short-term fluctuation characteristics. For example, if the short-term fluctuation characteristics require analyzing the real-time load rate of the most recent day, then T... short =24 hours.

[0107] Long-term aging characteristics increase over time, reflecting the increased load rate of energy-consuming equipment due to aging. The larger the value of the short-term fluctuation characteristic, the more drastic the short-term load fluctuation of energy-consuming equipment.

[0108] Specifically, the health status of energy-consuming equipment is analyzed by combining the cumulative operating time, number of equipment failures, and maintenance intervals, and the health characteristics of the equipment are given, including:

[0109] Compare the cumulative operating time and theoretical lifespan of energy-consuming equipment to provide operational characteristic items;

[0110] By comparing the number of equipment failures and the maximum number of failures of energy-consuming equipment, fault characteristic items are given;

[0111] Based on the maintenance interval and average maintenance interval of energy-consuming equipment, maintenance characteristic items are given;

[0112] By integrating operational feature weights, fault feature weights, and maintenance feature weights, the equipment health features are obtained.

[0113] In one specific implementation, equipment health characteristics are objectively weighted using the entropy weight method to conduct a comprehensive health assessment of multiple indicators. Equipment health status (such as aging and malfunctions) directly affects the energy efficiency of energy-consuming equipment. Traditional models only use single indicators such as "runtime" to analyze the health status of energy-consuming equipment, ignoring factors such as "maintenance records" and "number of malfunctions." Equipment health characteristics are generated by comprehensively considering multiple indicators using the entropy weight method, specifically represented as follows:

[0114]

[0115] Among them, HI i For the equipment health characteristics of energy-consuming device i, T i T represents the cumulative operating time of energy-consuming device i. design The theoretical lifespan of energy-consuming equipment, for example, T. design =10 years, F i F represents the number of equipment failures for energy-consuming device i.max The maximum number of failures allowed for energy-consuming equipment, for example, F max =5 times. M i M is the maintenance interval for energy-consuming equipment. avg This represents the average maintenance interval for similar energy-consuming equipment. ω1 is the weight of the operating characteristic, ω2 is the weight of the fault characteristic, and ω3 is the weight of the maintenance characteristic. For example, ω1=0.4, ω2=0.3, ω3=0.3. In this example, the weights of each characteristic are calculated using the entropy weight method, objectively reflecting the importance of each characteristic. In other examples, these weights can be determined using other methods, which are not limited here.

[0116] Equipment health characteristics are ∈ [0,1]. The larger the value of the equipment health characteristic, the better the equipment health status. For example, HI=0.8 indicates that the equipment is in good condition, and HI=0.4 indicates that maintenance is required.

[0117] Because environmental factors (such as temperature and humidity) have a lag effect on energy-consuming equipment in buildings (e.g., air conditioning energy consumption only increases one hour after outdoor temperature rises), traditional models using real-time environmental data have low correlation with the current energy consumption of these devices, leading to biases in energy consumption analysis. This invention incorporates an environmental lag feature, specifically expressed as follows:

[0118]

[0119] Where, ΔT lag The environmental lag characteristic represents the lag K. delay The temperature difference between indoors and outdoors over time, K delay Let ΔT(tk) be the longest lag time, ΔT(tk) be the indoor-outdoor temperature difference k hours before the current time t, and λ be the maximum lag time. k The lag weights exhibit exponential decay, with β being the decay coefficient. A smaller β indicates a greater near-term environmental impact. For example, if β = 0.2, then λ1 = 0.8187, λ2 = 0.6703, ..., λ6 = 0.3012. Environmental lag characteristics more accurately reflect the actual impact of environmental factors on various energy-consuming devices in current buildings, which aligns with the thermodynamic law that heat transfer requires time. For example, K... delay =6 indicates that the environmental lag characteristic reflects the impact of the environment on various energy-consuming equipment in the building during the first 6 hours.

[0120] S103: Combining the pre-built energy consumption coefficient prediction model, the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics are analyzed, and the environmental impact coefficient, topological correlation coefficient and space utilization coefficient are given.

[0121] Furthermore, the energy consumption coefficient prediction model includes a first prediction sub-model, a second prediction sub-model, a third prediction sub-model, and a regression fusion sub-model;

[0122] Based on a pre-built energy consumption coefficient prediction model, the topological correlation characteristics, multi-scale temporal characteristics, equipment health characteristics, and environmental lag characteristics are analyzed, and the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient are given. Figure 4 Specifically, it includes:

[0123] The first prediction sub-model is used to analyze and predict the equipment health characteristics and environmental lag characteristics to obtain the environmental coefficient.

[0124] The topological coefficients are obtained by analyzing and predicting multi-scale temporal features and topological correlation features through the second prediction sub-model.

[0125] By using the third prediction sub-model and combining it with the building space characteristics, the topological correlation characteristics are analyzed and predicted to obtain the spatial coefficients;

[0126] Based on the regression fusion sub-model, the environmental coefficient, topological coefficient, and spatial coefficient are fused and adjusted to output the environmental impact coefficient, topological correlation coefficient, and spatial utilization coefficient.

[0127] In the embodiments provided by the present invention, the first prediction sub-model, the second prediction sub-model, the third prediction sub-model and the regression fusion sub-model are integrated by the Stacking integration strategy to obtain the energy consumption coefficient prediction model.

[0128] Specifically, the first prediction sub-model is a neural network that integrates physical constraints, including an input layer, two hidden layers, and an output layer. It is trained using historical energy consumption data, which includes features across various dimensions and their corresponding energy consumption. In practice, the input layer receives environmental lag features and device health features; each hidden layer has 128 neurons activated using ReLU to avoid gradient vanishing; the output layer has one neuron activated using ReLU to verify physical constraints, adjusting weights and biases through backpropagation to ensure the environmental coefficient is non-negative. It is understandable that the environmental lag feature (temperature difference ΔT)... lag The impact of temperature difference on energy consumption follows thermodynamic laws; the greater the temperature difference, the more energy equipment (such as air conditioners) needs to consume to maintain the indoor temperature. Therefore, the environmental coefficient must be non-negative. The first prediction sub-model constrains the output layer results through the ReLU activation function. The first prediction sub-model captures the interaction effect between equipment state and environmental lag, and the obtained environmental coefficient quantifies the lagged impact of environmental temperature difference on energy consumption.

[0129] The second predictive sub-model is a graph neural network (GNN) model that integrates electrical topology, comprising a basic graph structure, GNN layers, and an MLP output layer, trained using historical energy consumption data. In the basic graph structure, nodes represent energy-consuming devices, and edges represent electrical connections between these devices. Edge weights are determined by the electrical impedance between the devices. During model use, topological correlation features and multi-scale temporal features are injected into each node to form an initial feature vector. The GNN layer is a three-layer structure. Each layer uses the GraphSAGE algorithm to sample the hidden states of neighboring nodes and calculate a weighted sum. The hidden states are updated using the LeakyReLU activation function. After processing through the three GNN layers, the last hidden state of each node is extracted as a node embedding, which includes load synergy with neighboring devices. The node embedding is input into the MLP output layer, processed through the hidden layer and linear activation layer of the MLP output layer, and mapped to topological coefficients. This second predictive sub-model captures the interaction between temporal evolution and topological structure, and the resulting topological coefficients quantify the impact of load synergy between devices on energy consumption. It is understandable that in building electrical circuits, the electromagnetic coupling effect between devices (such as the increase in the load rate of the distribution transformer due to the start-up of an air conditioner) is determined by electrical impedance. The smaller the electrical impedance, the smoother the current transfer between devices and the stronger the load coordination. The edge weight is specifically represented as follows:

[0130]

[0131] Where, ω ij Z represents the edge weight between nodes i and j, γ is the attenuation coefficient, which is adjusted according to the device type. ij Let be the impedance between nodes i and j.

[0132] The third prediction sub-model is a spatial field model that integrates the electrical topology, including a feature fusion module, a spatial field diffusion module, and a prediction module, trained using historical energy consumption data. Building spatial features include spatial volume and space utilization. In use, the third prediction sub-model processes building spatial features and topological correlation features as follows:

[0133] The feature fusion module first concatenates architectural spatial features and topological relational features into a feature vector V. in =[Volume,Occupancy,C i Then, fused features are generated through a fully connected layer. ; Calculate the physical guiding factor The physical guiding factor and the fusion feature are multiplied element by element to give the comprehensive feature. Among them, the physical guidance factor characterizes the load intensity per unit volume, and the comprehensive feature is a feature vector that integrates physical guidance.

[0134] The spatial field diffusion module first divides the space into multiple equal-volume units, with each unit serving as a graph node, and adjacent units connected by edges representing heat conduction paths; a comprehensive feature V is injected at the central node (e.g., the space center). phy Other nodes are zero vectors; after several layers of GCN diffusion, the "heat source characteristics" of the central node are propagated to the remaining nodes, simulating the diffusion of heat conduction; after pooling layer processing, the maximum eigenvalue is extracted from all the diffused nodes as the global feature. The maximum eigenvalue represents the most significant diffusion effect in space and is the factor with the greatest impact on energy consumption. By transforming the comprehensive feature into a spatial field diffusion feature, the impact of heat conduction on energy consumption is simulated, providing spatial field information for spatial coefficient prediction.

[0135] The prediction module is a fully connected layer that, in conjunction with an activation function, maps global features to spatial coefficients. The prediction module transforms the physical effects of spatial field diffusion into quantifiable energy consumption coefficients, completing the final mapping from features to predicted values.

[0136] The third predictive sub-model captures the interaction effect between spatial features and topological associations, and the resulting spatial coefficients quantify the impact of space use intensity on energy consumption.

[0137] The regression fusion sub-model is a linear regression model. This model adjusts the environmental, topological, and spatial coefficients output by the three prediction sub-models using a linear regression weight matrix and a linear regression bias term, ultimately outputting the environmental impact coefficient, topological correlation coefficient, and spatial utilization coefficient, as follows:

[0138]

[0139] in, This is the environmental impact factor. The topological correlation coefficient, Space utilization coefficient, The environmental coefficient is the output of the first prediction sub-model. The topological coefficients output by the second predictive sub-model. denoted as the spatial coefficients output by the third predictor sub-model, W as the linear regression weight matrix of the linear regression model, and b as the linear regression bias term of the linear regression model.

[0140] It should be noted that after obtaining the topological coefficients and spatial coefficients, the following are also included:

[0141] Based on a preset topology threshold, the topology coefficients are compared to obtain the topology comparison results;

[0142] Based on the topology comparison results, analyze the load rate of each spatial area, calculate the average building load rate, and give the current spatial load concentration factor.

[0143] Obtain the standard deviation of historical topological coefficients and combine it with the current topological coefficients to give the first excess factor;

[0144] Obtain the mean and standard deviation of the historical spatial load concentration factor, and combine them with the current spatial load concentration factor to give a second excess factor;

[0145] By combining the weighting coefficients and integrating the first excess factor and the second excess factor, a comprehensive enhancement factor is given;

[0146] Based on the comprehensive enhancement factor and combined with the preset enhancement coefficient, the current spatial coefficient is updated to obtain the latest spatial coefficient.

[0147] In one specific implementation, when the topology comparison result shows that the topology coefficient is higher than a preset topology threshold, the spatial coefficient is strengthened. Specifically, historical (e.g., the last three months') predictions of the topology coefficients by the second prediction sub-model can be collected, and statistical analysis can be performed on the historical predictions of the topology coefficients to calculate the mean μ of the historical predictions of the topology coefficients. K and standard deviation σ K (i.e., the standard deviation of historical topology coefficients); and sort the historical predicted values ​​of topology coefficients from smallest to largest, taking the 90th percentile value as the topology threshold k0, which can also be dynamically adjusted according to seasonal changes. When the topology coefficient is higher than this topology threshold, it indicates that the loop load is highly coordinated and the spatial load will be locally concentrated. It is necessary to strengthen the spatial coefficient to reflect this concentration effect and improve the sensitivity of space utilization to energy consumption.

[0148] It is understandable that a building contains multiple spatial areas such as conference rooms and computer rooms. For each spatial area, its real-time load rate L is calculated. s Then calculate the average real-time load rate μ for all spatial regions. L For each region, calculate the portion of its load factor that exceeds the mean, and then average it to obtain the spatial load concentration factor.

[0149]

[0150] Where S is the spatial load concentration factor, used to quantify the degree of spatial load concentration, serving as the spatial basis for the reinforcement mechanism; N is the total number of spatial regions; and L... s μ represents the real-time load rate of spatial region s. L This represents the average real-time load rate.

[0151] Based on the statistical analysis of historical spatial load concentration factors (such as the historical spatial load concentration factors for the most recent 3 months), the mean μ of the historical spatial load concentration factors is determined. S and standard deviation σ S .

[0152] The first excess factor is specifically expressed as:

[0153]

[0154] Here, ΔK is the first excess factor, representing the degree of standardization of the current topological coefficients exceeding the threshold. As a topological driving factor for the reinforcement mechanism, the greater the excess, the stronger the reinforcement demand. Here, k is the current topology coefficient, k0 is the topology threshold, and σ is the topology coefficient. K This represents the standard deviation of the historical predicted values ​​of the topology coefficients.

[0155] The second excess factor is specifically expressed as follows:

[0156]

[0157] Where ΔS is the second excess factor, representing the degree to which the current spatial load concentration exceeds the standardized historical average. As a spatial driving factor for the reinforcement mechanism, the greater the excess, the stronger the reinforcement demand. S is the current spatial load concentration factor, μ S σ S These are the mean and standard deviation of the historical spatial load concentration factor, respectively.

[0158] The comprehensive enhancement factor is specifically expressed as follows:

[0159]

[0160] in, The comprehensive enhancement factor represents the total enhancement requirement that integrates topological and spatial factors. τ is the weighting coefficient, ΔK is the first excess factor, and ΔS is the second excess factor.

[0161] The latest spatial coefficients are specifically expressed as follows:

[0162]

[0163] in, For the updated (i.e., latest) spatial coefficients, θ is the current spatial coefficient, and θ is the enhancement coefficient, which can be taken as 0.3. It is calibrated using historical data to avoid over-enhancement.

[0164] By using a topology-space joint correction mechanism, the model can more accurately reflect the cross-dimensional synergy of load coordination and spatial concentration, capture the spatial concentration effect when the load is highly coordinated, and improve the accuracy of baseline energy consumption prediction.

[0165] S104: Determine the baseline energy consumption prediction model by using the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, and give the target energy consumption of the building by combining the energy consumption compensation coefficient.

[0166] Furthermore, by using the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, a baseline energy consumption prediction model is determined. Combined with the energy consumption compensation coefficient, the target energy consumption for the building is then given, with reference to... Figure 5 Specifically, it includes:

[0167] By embedding the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient into a preset energy conversion formula, a baseline energy consumption prediction model is determined.

[0168] Based on the benchmark energy consumption prediction model, the real-time energy consumption data of the building is analyzed to determine the benchmark energy consumption of the building.

[0169] By combining the energy consumption compensation coefficient, the building's baseline energy consumption is adjusted to give the building's target energy consumption.

[0170] By embedding the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient into a preset energy conversion formula, a baseline energy consumption prediction model is determined, specifically as follows:

[0171]

[0172] Among them, E base For building foundation energy consumption, This is the environmental impact factor. The topological correlation coefficient, C is the space utilization coefficient. i Let M be the topological association characteristic of loop i, M be the total number of loops, and T be the topological association characteristic of loop i. lag The concept of environmental lag characteristics is used, where Volume represents the spatial volume within the building's spatial characteristics, and Occupancy represents the space utilization rate within the building's spatial characteristics. The energy conversion method decomposes building energy consumption into the energy contribution of environmental factors, the energy contribution of topological relationships, and the energy contribution of space utilization: ambient temperature is the core driver of building energy consumption, load fluctuations between equipment affect energy consumption, and space utilization is the fundamental driver of building energy consumption.

[0173] The target energy consumption of a building is specifically expressed as follows:

[0174]

[0175] Among them, E final Let E be the target energy consumption of the building, α be the energy compensation coefficient, and E be the energy consumption target. base Energy consumption for building foundations.

[0176] Furthermore, the energy consumption compensation coefficient is obtained by training a long short-term memory network using an attention mechanism. This attention mechanism network includes an embedding layer, an LSTM layer, and an attention layer, as described above. Figure 6 Specifically, it includes:

[0177] The embedding layer maps high-dimensional features, including multi-scale temporal features and device health features, to a low-dimensional vector space to obtain embedded feature vectors;

[0178] LSTM layers capture temporal relationships embedded in feature vectors and output the hidden feature state;

[0179] The attention layer performs weighted processing on the hidden state of the feature layer to obtain the energy consumption compensation coefficient.

[0180] In one specific implementation, the Long Short-Term Memory (LSTM) network is trained using historical energy consumption data. In use, the embedding layer maps high-dimensional features composed of real-time long-term aging features, short-term fluctuation features, and device health features to a low-dimensional vector space, preserving the non-linear relationships between features to obtain the embedded feature vector. The LSTM layer captures the temporal relationships in the embedded feature vector, such as the aging trend in the long-term aging features, and outputs the hidden feature state. The attention layer weights the hidden feature state output by the LSTM layer, for example, assigning higher weights to short-term fluctuation features, specifically as follows:

[0181]

[0182] Among them, h t Let w be the hidden feature state at time step t, w be the attention weight vector, exp() be the exponential function, and Attention() be the attention function of the attention layer.

[0183] The energy consumption compensation coefficient is predicted by capturing the nonlinear deviations of abnormal factors in energy-consuming equipment (such as sudden load changes during holidays) and employing a long short-term memory network with an attention mechanism. It takes real-time long-term aging characteristics, short-term fluctuation characteristics, and equipment health characteristics as input to complete the prediction of the energy consumption compensation coefficient α. Traditional models using fully connected layers cannot capture the dependencies of time series data.

[0184] By highlighting the impact of short-term fluctuations through the attention mechanism, the problem of "insufficient handling of time features" in traditional models is solved, and the prediction accuracy of energy consumption compensation coefficient is improved.

[0185] Reference Figure 7 Based on building energy consumption correlation data, this study analyzes building energy consumption to obtain topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics. Through the first, second, and third prediction sub-models, each characteristic is analyzed from different aspects, providing environmental impact coefficients, topological correlation coefficients, and space utilization coefficients, and determining a benchmark energy consumption prediction model. By combining the benchmark energy consumption prediction model with the energy consumption compensation coefficient, the target energy consumption of the building is finally obtained. This achieves accurate prediction of benchmark energy consumption and dynamic compensation of actual energy consumption, enabling accurate measurement of building energy consumption and improving the accuracy of building energy consumption analysis.

[0186] This invention employs a physical-data dual-driven parameter adaptation method, which determines the core parameters (environmental impact coefficient, topological correlation coefficient, and space utilization coefficient) of the benchmark energy consumption prediction model by the energy consumption coefficient prediction model. This achieves a closed loop between physical rules and data learning, solves the problem of "fixed physical parameters" in traditional models, and improves the prediction accuracy of building energy consumption.

[0187] Reference Figure 8 This invention provides an energy consumption metering device based on digital twins, comprising:

[0188] Data acquisition module 201 is used to collect building energy consumption related data based on a pre-built digital twin model of building energy consumption;

[0189] The feature extraction module 202 is used to analyze the building's energy consumption based on the building energy consumption correlation data, and to provide topological correlation features, multi-scale time features, equipment health features, and environmental lag features.

[0190] The coefficient prediction module 203 is used to combine a pre-built energy consumption coefficient prediction model to analyze topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics, and to give environmental impact coefficient, topological correlation coefficient and space utilization coefficient.

[0191] The energy consumption output module 204 is used to determine the benchmark energy consumption prediction model by using the environmental impact coefficient, topological correlation coefficient and space utilization coefficient, and to give the building target energy consumption by combining the energy consumption compensation coefficient.

[0192] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the described module can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0193] Although preferred embodiments of the invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all changes and modifications falling within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if these modifications and variations of the invention fall within the scope of the claims and their equivalents, the invention is also intended to include these modifications and variations.

Claims

1. An energy consumption metering method based on digital twins, characterized in that, include: Based on a pre-built digital twin model of building energy consumption, building energy consumption-related data is collected. This data includes the real-time load rate of energy-consuming equipment, the average load rate at different time scales, the cumulative runtime, the number of equipment failures, the maintenance interval, and the outdoor temperature at different times. Based on building energy consumption correlation data, this paper analyzes the building's energy consumption status and provides topological correlation characteristics, multi-scale temporal characteristics, equipment health characteristics, and environmental lag characteristics. Specifically, this includes: determining the topological correlation characteristics of each circuit based on the real-time load rate of energy-consuming equipment and the electrical distance of each energy-consuming device in the building's electrical circuit; analyzing the fluctuation of energy-consuming equipment at different time scales using the average load rate at different time scales, and providing multi-scale temporal characteristics; analyzing the health status of energy-consuming equipment by combining the cumulative running time, number of equipment failures, and maintenance intervals, and providing equipment health characteristics; and analyzing the environmental lag of energy-consuming equipment based on outdoor temperatures at different times, and providing environmental lag characteristics. Based on the pre-built energy consumption coefficient prediction model, the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics are analyzed, and the environmental impact coefficient, topological correlation coefficient and space utilization coefficient are given. A baseline energy consumption prediction model is determined using environmental impact coefficient, topological correlation coefficient, and space utilization coefficient. Combined with energy consumption compensation coefficient, the target energy consumption of the building is given. The energy consumption compensation coefficient is obtained by training a long short-term memory network using an attention mechanism. The long short-term memory network using the attention mechanism includes an embedding layer, an LSTM layer, and an attention layer. Specifically, the embedding layer maps high-dimensional features, including multi-scale temporal features and equipment health features, to a low-dimensional vector space to obtain an embedded feature vector; the LSTM layer captures the temporal relationships in the embedded feature vector and outputs the hidden feature state; and the attention layer performs weighted processing on the hidden feature state to obtain the energy consumption compensation coefficient.

2. The energy consumption metering method based on digital twin as described in claim 1, characterized in that, A digital twin model of building energy consumption is obtained through the following steps: Obtain the topology diagram of the energy-consuming equipment; Based on the energy consumption level of the energy-consuming equipment, the topology diagram of the energy-consuming equipment is mapped onto the 3D building model to construct a primary digital twin model; By mapping virtual and real data through the unique energy consumption codes of each energy-consuming device in the primary digital twin model, a digital twin model of building energy consumption is obtained.

3. The energy consumption metering method based on digital twin as described in claim 1, characterized in that, Multi-scale time features include long-term aging features and short-term fluctuation features; By analyzing the average load rate at different time scales, the fluctuation of energy-consuming equipment at different time scales is presented, giving multi-scale time characteristics, specifically including: Based on the long-term time scale, the average load rate of energy-consuming equipment at different times within the long-term time scale is analyzed, and combined with the maximum load rate of energy-consuming equipment, the long-term aging characteristics are obtained. Based on the real-time load rate of energy-consuming equipment at different times within a short-term time scale, the standard deviation and mean load are obtained, the short-term fluctuation of energy-consuming equipment is analyzed, and the short-term fluctuation characteristics are given.

4. The energy consumption metering method based on digital twin as described in claim 1, characterized in that, The health status of energy-consuming equipment is analyzed by combining the cumulative operating time, number of equipment failures, and maintenance intervals, and the health characteristics of the equipment are given, including: Compare the cumulative operating time and theoretical lifespan of energy-consuming equipment to provide operational characteristic items; By comparing the number of equipment failures and the maximum number of failures of energy-consuming equipment, fault characteristic items are given; Based on the maintenance interval and average maintenance interval of energy-consuming equipment, maintenance characteristic items are given; By integrating operational feature weights, fault feature weights, and maintenance feature weights, the equipment health features are obtained.

5. The energy consumption metering method based on digital twin as described in claim 1, characterized in that, The energy consumption coefficient prediction model includes a first prediction sub-model, a second prediction sub-model, a third prediction sub-model, and a regression fusion sub-model; Based on a pre-built energy consumption coefficient prediction model, the topological correlation characteristics, multi-scale time characteristics, equipment health characteristics, and environmental lag characteristics are analyzed to provide environmental impact coefficients, topological correlation coefficients, and space utilization coefficients, specifically including: The first prediction sub-model is used to analyze and predict the equipment health characteristics and environmental lag characteristics to obtain the environmental coefficient. The topological coefficients are obtained by analyzing and predicting multi-scale temporal features and topological correlation features through the second prediction sub-model. By using the third prediction sub-model and combining it with the building space characteristics, the topological correlation characteristics are analyzed and predicted to obtain the spatial coefficients; Based on the regression fusion sub-model, the environmental coefficient, topological coefficient, and spatial coefficient are fused and adjusted to output the environmental impact coefficient, topological correlation coefficient, and spatial utilization coefficient.

6. The energy consumption metering method based on digital twin as described in claim 5, characterized in that, After obtaining the topological and spatial coefficients, the following is also included: Based on a preset topology threshold, the topology coefficients are compared to obtain the topology comparison results; Based on the topology comparison results, analyze the load rate of each spatial area, calculate the average building load rate, and give the current spatial load concentration factor. Obtain the standard deviation of historical topological coefficients and combine it with the current topological coefficients to give the first excess factor; Obtain the mean and standard deviation of the historical spatial load concentration factor, and combine them with the current spatial load concentration factor to give a second excess factor; By combining the weighting coefficients and integrating the first excess factor and the second excess factor, a comprehensive enhancement factor is given; Based on the comprehensive enhancement factor and combined with the preset enhancement coefficient, the current spatial coefficient is updated to obtain the latest spatial coefficient.

7. The energy consumption metering method based on digital twin as described in claim 1, characterized in that, By using environmental impact coefficients, topological correlation coefficients, and space utilization coefficients, a baseline energy consumption prediction model is determined. Combined with energy consumption compensation coefficients, the target energy consumption for the building is then given, specifically including: By embedding the environmental impact coefficient, topological correlation coefficient, and space utilization coefficient into a preset energy conversion formula, a baseline energy consumption prediction model is determined. Based on the benchmark energy consumption prediction model, the real-time energy consumption data of the building is analyzed to determine the benchmark energy consumption of the building. By combining the energy consumption compensation coefficient, the building's baseline energy consumption is adjusted to give the building's target energy consumption.

8. An energy consumption metering device based on digital twin, characterized in that, The energy consumption metering method based on digital twins as described in any one of claims 1-7 includes: The data acquisition module is used to collect building energy consumption related data based on a pre-built digital twin model of building energy consumption. The building energy consumption related data includes the real-time load rate of energy-consuming equipment, the average load rate at different time scales, the cumulative running time, the number of equipment failures, the maintenance interval, and the outdoor temperature at different times. The feature extraction module is used to analyze the building's energy consumption based on building energy consumption correlation data, providing topological correlation features, multi-scale time features, equipment health features, and environmental lag features. Specifically, it includes: determining the topological correlation features of each circuit based on the real-time load rate of energy-consuming equipment and the electrical distance between each energy-consuming device in the building's electrical circuit; analyzing the fluctuation of energy-consuming equipment at different time scales based on the average load rate at different time scales, providing multi-scale time features; analyzing the health status of energy-consuming equipment based on the cumulative running time, number of equipment failures, and maintenance intervals, providing equipment health features; and analyzing the environmental lag of energy-consuming equipment based on outdoor temperatures at different times, providing environmental lag features. The coefficient prediction module is used to combine a pre-built energy consumption coefficient prediction model to analyze topological correlation characteristics, multi-scale time characteristics, equipment health characteristics and environmental lag characteristics, and to give environmental impact coefficient, topological correlation coefficient and space utilization coefficient. The energy consumption output module is used to determine the baseline energy consumption prediction model through environmental impact coefficient, topological correlation coefficient, and space utilization coefficient, and to give the target energy consumption of the building by combining the energy consumption compensation coefficient. The energy consumption compensation coefficient is obtained by training a long short-term memory network with an attention mechanism. The long short-term memory network with attention mechanism includes an embedding layer, an LSTM layer, and an attention layer. Specifically, the embedding layer maps high-dimensional features including multi-scale time features and equipment health features to a low-dimensional vector space to obtain an embedded feature vector; the LSTM layer captures the temporal relationship in the embedded feature vector and outputs the feature hidden state; the attention layer performs weighted processing on the feature hidden state to obtain the energy consumption compensation coefficient.