A building energy consumption anomaly pattern recognition method and system

CN122286596BActive Publication Date: 2026-09-22THE SECOND CONSTR OF CHINA CONSTR EIGHTH ENG DIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610710303.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-05-22
Publication Date
2026-09-22
Estimated Expiration
2046-05-22

AI Technical Summary

Technical Problem

然而,建筑能耗的异常通常并非表现为单一时刻的功率越限或幅值突变,而是体现为室外气象条件发生变化后,建筑总电功率未能按照正常规律产生相应的跟随响应,这类“温度已变而功率未动”的协变关系异常在空调负荷占比较高的公共建筑中尤为常见,却难以被传统的阈值报警或简单的幅值预测模型有效捕捉

Benefits of technology

本发明采用基于温度变化事件的迟滞响应建模,将单一时刻的温度数值转化为持续衰减的功率影响权重,显式刻画建筑热惯性带来的响应滞后;采用协同增强功率序列与温度响应权重矩阵,在输入阶段便将“功率应当跟随温度变化”的物理期望注入数据表征,而非依赖网络自行隐式学习这种协变关系;采用温度响应门控的双分支解码结构,将负荷重构拆分为基础功率分支与温度响应分支,并通过外部门控融合使温度事件区域的异常重构偏差得到针对性放大;采用局部变化加权重构损失,对温度事件影响区与功率动态变化区赋予更高训练权重,迫使模型优先掌握正常工况下温度驱动响应的精细规律。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122286596B_ABST
    Figure CN122286596B_ABST
Patent Text Reader

Abstract

The application relates to a building energy consumption anomaly pattern recognition method and system, and belongs to the technical field of building energy consumption. The method comprises the following steps: collecting building total electric power and outdoor dry bulb temperature data, constructing a temperature change event set, generating a temperature response weight sequence and a collaborative feature tensor through one-sided hysteresis attenuation; designing a double-branch convolutional auto-encoding network, decoupling the basic power and the temperature response load, and training the model by using local change weighted reconstruction loss; and setting a threshold based on the normal sample reconstruction error distribution to complete anomaly determination. The application does not require an anomaly label, explicitly depicts the building thermal inertia characteristics, can significantly improve the recognition accuracy of temperature-driven energy consumption anomalies, and is suitable for online monitoring of public building energy consumption with a high air conditioner load ratio.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of building energy consumption technology, specifically relating to a method and system for identifying abnormal patterns in building energy consumption. Background Technology

[0002] During building operation, abnormal fluctuations in total electrical power are often a significant indicator of equipment failure, inappropriate control strategies, or sensor bias. Timely detection and localization of such anomalies are crucial for ensuring building energy efficiency and equipment safety. However, abnormal building energy consumption is usually not manifested as a single momentary power limit exceeding or a sudden change in amplitude. Instead, it is reflected in the failure of the building's total electrical power to respond accordingly to changes in outdoor weather conditions. This type of covariance anomaly, where "temperature changes but power does not," is particularly common in public buildings with a high proportion of air conditioning load, yet it is difficult to effectively capture using traditional threshold alarms or simple amplitude prediction models.

[0003] Existing technologies suffer from the following drawbacks: Conventional methods often use temperature and power as parallel feature inputs at synchronous moments, lacking the ability to explicitly model the power hysteresis response time difference after temperature changes; anomaly detection training generally relies on a balanced reconstruction loss function, treating all time steps equally, resulting in the network being insufficiently sensitive to local subtle anomalies where power does not follow after temperature abrupt changes; existing autoencoder structures typically use a single decoding path to reconstruct all load components, making it difficult to effectively decouple temperature-correlated loads from the base load, and the identification of temperature-driven anomalies is masked by the stable base load; most methods do not utilize the advantage of the diurnal two-dimensional structure for cross-day simultaneous moment comparison, only processing long sequences one-dimensionally along the time axis, and do not fully utilize the normal pattern reference of "the same moment on different days". Summary of the Invention

[0004] To achieve the above objectives, the present invention employs the following technical solution: This invention provides a method for identifying abnormal patterns in building energy consumption, comprising the following steps: S1. Collect total building power data and outdoor dry-bulb temperature data, construct a building energy consumption monitoring window, organize training samples, and obtain the original building energy consumption monitoring tensor. The original building energy consumption monitoring tensor Including the original power sequence and the original temperature sequence ; S2, Based on the original temperature sequence Construct a set of temperature change events A one-sided hysteresis attenuation method is used to map temperature change events into temperature response weight sequences. These weight sequences are then used to construct a cooperative enhancement power sequence, ultimately yielding a cooperative feature tensor. ; S3. Construct a dual-branch convolutional autoencoder network, including a shared encoder, a temperature-conditional branch, a shared decoder, a basic power branch, a temperature response branch, and a temperature reconstruction branch; integrate the collaborative feature tensor... Input the bibranch convolutional autoencoder network to obtain the reconstructed power matrix and the reconstructed temperature matrix; train the bibranch convolutional autoencoder network using the local variation weighted reconstruction loss function to obtain the trained bibranch convolutional autoencoder network; S4. Set the anomaly judgment threshold based on the reconstruction error distribution on the normal training sample set, and then score and judge the window to be detected in the inference stage; to obtain the building energy consumption anomaly pattern recognition result.

[0005] Furthermore, step S1 specifically includes: Collect total building power data and outdoor dry-bulb temperature data, with a fixed sampling interval of 10 minutes. For any consecutive 7-day monitoring window, the number of time steps for a single data type is recorded as follows. The number of features is denoted as All training windows were organized into the original building energy consumption monitoring tensor. Original building energy consumption monitoring tensor The size is ,in, Indicates the sample size; for the original building energy consumption monitoring tensor Take the first feature of any sample in the sequence to form the original power sequence. ;in, Indicates the first The total building power samples at each time step; the second feature is used to form the original temperature sequence. ,in, Indicates the first Outdoor dry-bulb temperature sampling values ​​at each time step.

[0006] Furthermore, in step S2, based on the original temperature sequence Construct a set of temperature change events : For the original temperature sequence Perform moving average smoothing to obtain a smoothed temperature series. ,in, Indicates the first Smoothed temperature values ​​for each time step; For smooth temperature series The temperature slopes on the left and right sides are calculated step-by-step to obtain temperature change events; for the first... At each time step, the temperature slope on the left is denoted as... The temperature slope on the right is denoted as When the first When the following two conditions are met simultaneously at the nth time step, the nth time step will be... Each time step is denoted as a temperature change event: Condition 1, and opposite signs, or Greater than the preset slope change threshold; Condition 2, based on the first Centered on a time step, before and after each The local temperature change at each time step exceeds a preset threshold. Calculate the event intensity for each temperature change event, for the _th_ event... There are several temperature change events, and their event locations are denoted as... The event intensity is denoted as ; All temperature change events are organized into a temperature change event set in chronological order. .

[0007] Furthermore, in step S2, the temperature response weight sequence is generated and the collaboratively enhanced power sequence is constructed: Construct a one-sided hysteresis decay kernel for each temperature change event; The effects of all temperature change events are superimposed using a one-sided hysteresis decay kernel to generate a temperature response weight sequence. ,in, Indicates the first Temperature response weights for each time step; Using temperature response weight sequence For the original power sequence Perform multiplicative enhancement to obtain a synergistically enhanced power sequence. ,in, Indicates the first The collaborative enhancement power value at each time step.

[0008] Furthermore, in step S2, the collaborative feature tensor The construction process is as follows: Based on the normal training sample set, index each intraday time period. The robust centers and robust scales of total building power, outdoor dry-bulb temperature, and synergistic enhancement power were statistically analyzed separately. The original power sequence for any sample Original temperature sequence and synergistic power sequence Robust normalization was performed separately to obtain the normalized power sequence. Normalized temperature series and normalized enhanced power sequence ; Normalized power sequence The power matrix is ​​divided by day and rearranged into a normalized power matrix. Normalize the temperature sequence Rearranged into a normalized temperature matrix Normalized power sequence Rearranged into a normalized enhanced power matrix ; Weight the temperature response sequence Rearranged into a temperature response weight matrix ; The normalized power matrix is ​​processed according to a fixed channel order. Normalized temperature matrix Normalized power matrix and temperature response weight matrix Stacking along the channel direction yields the co-feature tensor. .

[0009] Furthermore, in step S3, a shared encoder and a temperature-conditional branch are constructed to extract features from the collaborative feature tensor. Extracting high-level latent representations from the normalized temperature matrix separately. Extracting global temperature background conditions provides a structured feature basis for subsequent power decoupling and reconstruction. The specific steps are as follows: The shared encoder contains three layers of convolutional processing: the first convolutional layer uses a size of... The convolution kernel has 16 output channels, followed by a ReLU activation function; the second convolution uses a kernel of size 16. The convolution kernel has 32 output channels, followed by a ReLU activation function; the third convolution layer uses a kernel of size 1. The convolution kernel has 32 output channels, and the ReLU activation function is applied after the convolution. Downsampling with a stride of 2 is performed only along the intraday time direction after the first and second convolution layers. Cooperative feature tensor Input a shared encoder to obtain a latent feature map ; The temperature condition branch includes two layers of convolution processing. The first convolution outputs 8 channels, and the second convolution outputs 8 channels. After both convolution layers, downsampling is performed only along the intraday time direction, consistent with the shared encoder. Normalized temperature matrix The input temperature conditional branch undergoes two convolutional layers to obtain an intermediate temperature feature map. Global average pooling is then performed on the intermediate temperature feature map to obtain the temperature conditional vector. .

[0010] Furthermore, shared decoder and dual-branch power reconstruction: latent feature map The input shared decoder first processes the latent feature map The intermediate decoding features are obtained by linearly interpolating and upsampling to 72 along the intraday timeline, followed by one convolutional layer. These intermediate decoding features are then linearly interpolated and upsampled to 144 along the intraday timeline, followed by one convolutional layer to obtain the shared decoding feature map. ; The shared decoding feature map Input the base power branch, through 1 level of size The size of the convolutional layer and the 1st layer is The convolutional layer outputs the fundamental power matrix. ; First, the temperature condition vector The temperature condition feature map was obtained by spatially replicating the location across all 7 days and 144 intraday time periods. Then share the decoded feature map Temperature condition characteristic diagram and temperature response weight matrix By concatenating channels, the temperature response branch input feature is obtained; the temperature response branch input feature is then processed through a single layer of size [missing information]. The size of the convolutional layer and the 1st layer is The convolutional layer outputs a temperature response matrix. ; Integrating the basic power matrix through external control methods and temperature response matrix The reconstructed power matrix is ​​obtained. ; Shared decoding feature maps Input temperature reconstruction branch, after 1 level of size The size of the convolutional layer and the 1st layer is The convolutional layer yields the reconstructed temperature matrix. .

[0011] Furthermore, in step S3, the local change weighted reconstruction loss is used in conjunction with network training: Power matrix enhancement by normalization Calculate the intensity matrix of local power variation : For the normalized enhanced power matrix Calculate the absolute value of the first-order difference between adjacent positions according to the intraday time direction; then normalize the absolute value of the difference to the range of 0 to 1 according to the maximum value in the current sample to obtain the power local variation intensity matrix. ; by temperature response weight matrix and the intensity matrix of local power variation Jointly generate loss weight matrix Loss weight matrix The calculation method is expressed as follows: ;in, This represents the temperature response weighting adjustment coefficient; Indicates the adjustment coefficient for the intensity of local power variation; According to the reconstructed power matrix and reconstructing the temperature matrix The sample loss is calculated as follows: ,in, This represents the weight of the temperature reconstruction loss, used to control the strength of the temperature channel constraint; This represents averaging over all positions in the matrix; The normal training sample set is input into the dual-branch convolutional autoencoder in batches, and the network parameters are updated using an adaptive moment estimation optimizer.

[0012] Furthermore, in step S4, the anomaly score is calculated and the anomaly determination threshold is set: All normal training samples are re-input into the trained dual-branch convolutional autoencoder network, and anomaly scores are calculated for each sample. ;No. Anomaly scores for each sample Defined as sample loss ; Collect abnormal scores from all normal training samples to form a normal score distribution, and define the 95th percentile of the normal score distribution as the anomaly detection threshold. ; For any sample within the monitoring window to be detected, after preprocessing in step S2, it is input into the trained dual-branch convolutional autoencoder network to obtain an anomaly score for the sample to be detected. ; score the abnormality of the sample to be tested With anomaly detection threshold The comparison yields the results of building energy consumption anomaly pattern identification; when When the energy consumption of the building to be monitored is deemed abnormal, it is determined that the building's energy consumption is abnormal. When this happens, the monitoring window to be tested is determined to be normal.

[0013] The present invention also provides a building energy consumption anomaly pattern recognition system, which performs the above-described building energy consumption anomaly pattern recognition method, including: Data acquisition module: used to collect total building power data and outdoor dry-bulb temperature data, construct building energy consumption monitoring window, organize training samples, and obtain the original building energy consumption monitoring tensor; Data preprocessing module: Constructs a set of temperature change events based on the original temperature sequence; uses a one-sided hysteresis decay method to map the temperature change events into a temperature response weight sequence, constructs a collaborative enhancement power sequence through the temperature response weight sequence, and finally obtains a collaborative feature tensor; Network model construction module: Construct a two-branch convolutional autoencoder network, including a shared encoder, a temperature conditional branch, a shared decoder, a base power branch, a temperature response branch, and a temperature reconstruction branch; input the collaborative feature tensor and the normalized temperature matrix into the two-branch convolutional autoencoder network to obtain the reconstructed power matrix and the reconstructed temperature matrix; train the two-branch convolutional autoencoder network using a local variation weighted reconstruction loss function to obtain the trained two-branch convolutional autoencoder network; Anomaly detection module: Sets anomaly detection threshold based on the reconstruction error distribution on the normal training sample set, and then scores and judges the window to be detected during the inference stage; thus obtaining the building energy consumption anomaly pattern recognition result.

[0014] The advantages of this invention are: This invention employs hysteresis response modeling based on temperature change events, transforming the temperature value at a single moment into a continuously decaying power influence weight, explicitly characterizing the response hysteresis caused by building thermal inertia. It uses a collaborative enhancement of the power sequence and temperature response weight matrix, injecting the physical expectation that "power should follow temperature changes" into the data representation during the input stage, rather than relying on the network to implicitly learn this covariant relationship. A temperature-response-gated dual-branch decoding structure is used, splitting load reconstruction into a basic power branch and a temperature response branch, and external gate control fusion is used to specifically amplify abnormal reconstruction deviations in temperature event regions. A local variation-weighted reconstruction loss is used, assigning higher training weights to the temperature event influence region and the power dynamic change region, forcing the model to prioritize mastering the fine-grained laws of temperature-driven response under normal operating conditions. Attached Figure Description

[0015] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0016] Figure 1 This is a flowchart of the steps of the method of the present invention; Figure 2 A flowchart illustrating the construction of the synergistic power enhancement sequence for this invention; Figure 3 A flowchart for constructing the collaborative feature tensor for this invention; Figure 4 This is a data flow diagram of the dual-branch convolutional autoencoder network of the present invention; Figure 5 This is a diagram illustrating the training process of the dual-branch convolutional autoencoder network of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Example 1 In this embodiment, as Figure 1 As shown, this invention provides a method for identifying abnormal patterns in building energy consumption, the specific steps of which include: S1. Construction of Building Energy Consumption Monitoring Window and Organization of Training Samples Building energy consumption anomalies are often not simply power exceeding limits at a single moment, but rather a failure of the building's total electrical power to respond according to normal patterns after changes in outdoor dry-bulb temperature. The data used in this invention needs to simultaneously retain the synchronous sampling relationship between total building electrical power and outdoor dry-bulb temperature, while maintaining a continuous multi-day periodic structure. To this end, this invention first constructs a fixed-length building energy consumption monitoring window to obtain the original building energy consumption monitoring tensor used for subsequent preprocessing and model training. The specific steps are as follows: 1) Collect total building power data and outdoor dry-bulb temperature data, with a fixed sampling interval of 10 minutes. For any consecutive 7-day monitoring window, the number of time steps for a single data type is recorded as follows: ,in, The number of features is denoted as ,in, The two characteristics are the building's total electrical power and the outdoor dry-bulb temperature.

[0019] All training windows were reorganized into the original building energy consumption monitoring tensor. Original building energy consumption monitoring tensor The size is ,in, Indicates the number of samples.

[0020] For the original building energy consumption monitoring tensor Take the first feature of any sample in the sequence to form the original power sequence. ,in, Indicates the first The total building power samples at each time step; the second feature is used to form the original temperature sequence. ,in, Indicates the first Outdoor dry-bulb temperature sampling values ​​at each time step.

[0021] Original power sequence Compared with the original temperature sequence They correspond one-to-one on the timeline.

[0022] 2) Perform a data integrity check for each monitoring window. If no more than 3 consecutive time steps are missing, check the original power sequence. and the original temperature sequence Linear interpolation is performed according to the time axis; when more than 3 consecutive time steps are missing, the corresponding monitoring window is directly removed to avoid long-term missing measurements from damaging the temperature-power covariance relationship.

[0023] 3) Based on equipment maintenance records, building automation system alarm records, and manual inspection records, normal operation windows are selected to form a normal training sample set. Each sample in the normal training sample set corresponds to a continuous 7-day monitoring window with no equipment failures, no obvious forced manual intervention, and no prolonged power outages or network interruptions. In the network training phase of this invention, only the normal training sample set is used; abnormal labels are not used for supervised training.

[0024] Furthermore, to facilitate subsequent data organization according to the "day-intra-day time" method, the 1008 time steps of each sample are divided into 7 segments of 144 time steps each day. A day index is defined. Indicates the 7th day of the month. The value for "day" ranges from 1 to 7; define the intraday time index. Indicates the first of the day Each sample is taken at 10-minute intervals, with values ​​ranging from 1 to 144. Original power sequence. and the original temperature sequence any time step Each of these can be uniquely mapped to a single index. A daily time index .

[0025] In one embodiment, for example, if time step Because there are 144 time steps per day, (Day 2) (The 56th 10-minute sampling location corresponds to 9:20 AM), therefore, the 200th time step uniquely corresponds to the sampling point at 9:20 AM on the second day. This indicates the rounding up operation.

[0026] S2. Collaborative preprocessing based on temperature change events and hysteresis responses The response of a building's total electrical power to outdoor dry-bulb temperature is typically hysteretic. For example, after a rapid rise in outdoor dry-bulb temperature, the air conditioning load often does not increase instantaneously at the same sampling point, but rather gradually manifests over several subsequent sampling points. If the original power sequence and the original temperature sequence are directly concatenated and input into the network, the network is more likely to learn the amplitude itself, but it is difficult to explicitly focus on the abnormal pattern of "temperature has changed significantly but power has not followed normally".

[0027] This step first extracts temperature change events from the original temperature sequence, then generates a temperature response weight sequence, constructs a cooperative enhancement power sequence based on this, and finally reconstructs it into a cooperative feature tensor oriented towards preserving the diurnal cycle structure, such as... Figure 2 As shown, the specific steps are as follows: S201, Temperature Change Event Extraction In identifying building energy consumption anomalies, the real focus should not be on every tiny fluctuation in temperature, but rather on the points where the temperature trend shows a clear turning point or acceleration. To avoid false events caused by noise, this step first smooths the original temperature sequence before detecting meaningful temperature change events. The specific steps are as follows: 1) For the original temperature sequence Perform moving average smoothing to obtain a smoothed temperature series. ,in, Indicates the first Smoothed temperature values ​​for each time step.

[0028] In one implementation, the moving average window length is 3 or 5. When the window length is 3, it means that the current time step uses the current value and the values ​​of the previous and next time steps to calculate the average. When the window is located at the boundary position, it is filled with the nearest valid value.

[0029] 2) For smoothed temperature sequences Calculate the temperature slopes on the left and right sides step by step. For the first... At each time step, the temperature slope on the left is denoted as... The temperature slope on the right is denoted as ,in, , Temperature slope on the left side Used to characterize the direction and magnitude of temperature change within the previous sampling interval at the current location; right-hand temperature slope. It is used to characterize the direction and magnitude of temperature change within one sampling interval after the current location.

[0030] Furthermore, temperature change events are identified according to the principle of "a change in trend direction or a significant abrupt change in the rate of change." Specifically, when the first... When the following two conditions are met simultaneously at the nth time step, the nth time step will be... Each time step is recorded as a temperature change event: First, and opposite signs, or Greater than the preset slope change threshold, Indicates taking the absolute value; secondly, with the first Centered on a time step, before and after each The local temperature change at each time step exceeds a preset threshold.

[0031] In a convenient implementation method, the local window radius The value can be 6, corresponding to 60 minutes before and after; the preset slope change threshold can be 0.2℃ to 0.5℃, corresponding to the change in 10 minutes; the preset amplitude threshold can be 1℃ to 3℃.

[0032] It should be noted that if the local temperature change is less than the preset threshold (e.g., 0.5℃), the location is not considered a valid temperature change event, and the subsequent steps are skipped.

[0033] 3) Calculate the event intensity for each temperature change event. For the th... There are several temperature change events, and their event locations are denoted as... The event intensity is denoted as Event intensity This value, ranging from 0 to 1, is used to indicate the potential impact of the temperature change event on the subsequent total electrical power of the building.

[0034] In the specific implementation, the absolute value of the temperature difference within the local window before and after the event location is first calculated, and then mapped to a range of 0 to 1 according to a preset reference temperature difference. For example, if the absolute value of the temperature difference between the two local windows reaches 5°C or more, the event intensity is... Take 1; if the absolute value of the temperature difference is 2.5℃, then the event intensity is... A value of 0.5 can be used; if the absolute value of the temperature difference is less than 0.5℃, then this location will no longer be retained as a valid temperature change event.

[0035] 4) Arrange all temperature change events into a temperature change event set in chronological order. ,in, This indicates the number of temperature change events detected in the current sample.

[0036] In one embodiment, for example, if a building experiences a smoothed temperature sequence change from 27.0℃, 27.4℃, 28.1℃, 29.0℃ to 29.8℃ near the 312th time step, then the temperature near that location is rising rapidly. If the temperature slope on the left side of the 311th time step is 0.4℃, the temperature slope on the right side of the 312th time step is 0.9℃, and the cumulative temperature difference over 60 minutes reaches 2.8℃, then the 312th time step can be recorded as a temperature change event. If the reference temperature difference is taken as 5℃, then the event intensity... It can be calculated as 0.56 based on 2.8 / 5.

[0037] S202, Temperature Response Weight Sequence Generation and Collaborative Power Enhancement Sequence Construction Knowing only the location of a temperature change event is insufficient; it is also necessary to determine the duration of its impact on the building's total electrical power and how the impact diminishes. This step employs a one-sided hysteresis attenuation method, mapping the temperature change event into a temperature response weighted sequence, and then using this sequence to construct a collaboratively enhanced power sequence. The specific steps are as follows: 1) Construct a one-sided hysteresis decay kernel for each temperature change event.

[0038] Define the hysteresis length parameter as , This represents the maximum number of time steps in which a temperature change event continues to affect the building's total electrical power. For example, Option 12 is acceptable, corresponding to 120 minutes.

[0039] Define relative time difference ,in, Indicates the index of the current time step. Indicates the first The location index of each temperature change event.

[0040] The unilateral hysteresis decay kernel is denoted as Its definition is: in, It reaches a maximum value of 1 when a temperature change event occurs, and then decreases linearly with time, exceeding the hysteresis length parameter. Take 0 after that.

[0041] It should be noted that the unilateral hysteresis decay kernel It only applies to the current moment and subsequent moments, not moments before the temperature change event. It is used to represent the physical process of "temperature changes first, power responds later," meaning the temperature change event occurs at moment [time value missing]. Only at that moment and thereafter The power attenuation effect will only occur within a certain time step, while... The weight of the previous time points is always 0. This simulates the lag response of the HVAC system to temperature changes. After the temperature rises, the delay in the building's heat capacity and control system causes the power change to not occur in advance, but to be gradually reflected in several subsequent sampling points.

[0042] In one embodiment, for example, a rapid temperature rise event is detected at the 400th time step, if the hysteresis length... (Corresponding to 120 minutes), then at the time step hour This indicates that step 399 is unaffected by this event; while step 400... Step 403 This continues until the weight decays to 0 in step 412.

[0043] 2) The effects of all temperature change events are superimposed to generate a temperature response weight sequence. ,in, Indicates the first The temperature response weights for each time step range from 0 to 1. The calculation method is expressed as follows: in, Indicates the number of temperature change events; Indicates the first A temperature change event at time step The value of the unilateral hysteresis decay kernel at the location is taken when When 0 is taken, Press at time The calculation is performed using the calculation method described above. Indicates the first The event intensity of a temperature change event; This means that when the effects of multiple temperature change events overlap, the superposition result will be truncated to 1 to avoid excessive subsequent enhancement.

[0044] 3) Utilizing temperature response weighted sequences For the original power sequence Perform multiplicative enhancement to obtain a synergistically enhanced power sequence. ,in, Indicates the first The collaborative enhancement power value at each time step is calculated as follows: in, This represents the enhancement strength coefficient, used to control the amplification ratio of the temperature response weight to the original power value.

[0045] In one implementation, It can be taken as 0.1 to 0.3; when When the value is 0.2, if the temperature response weight at a certain time step... If the value is 0.6, then the total electrical power of the building at that time step will be amplified to 1.12 times the original value.

[0046] In one embodiment, for example, if a temperature change event is detected at the 400th time step, the event intensity is... Hysteresis length parameter The relative time difference corresponding to the 403rd time step is... unilateral hysteresis decay kernel The temperature response weight contributed by this event to the 403rd time step is: If the strength coefficient is increased And the original power value at time step 403 is 120kW, then the corresponding synergistic enhancement power value is kW.

[0047] It should be noted that this step preserves the original temperature sequence. Unchanged, not the original temperature sequence The enhancement process injects only the "importance of the power response to temperature change events" into the power channel, without changing the actual observed temperature value itself.

[0048] It should also be noted that, in order to explicitly mark the "temperature-driven response range that should be of more concern under normal circumstances" in advance, this step does not simply amplify the high-temperature period or the low-temperature period, but only enhances the power expression during the period when the temperature changes significantly and the power should show a hysteresis response. When the network reconstructs the normal mode, it will learn more accurately "how the power should change after the temperature change", thereby improving its sensitivity to abnormalities such as missing response, over-response, and hysteresis response.

[0049] S203, Robust Normalization and Construction of Day-Time Co-functional Feature Tensors Both the building's total electrical power and outdoor dry-bulb temperature exhibit a clear diurnal cycle structure. If a one-dimensional sequence of length 1008 is used directly, the network can see the continuous relationship between consecutive moments, but it is difficult to directly utilize the comparison relationship of "the same moment on different days".

[0050] This step first performs robust normalization, then rearranges the sequence into a two-dimensional structure of 7 days × 144 time points, and unifies the weights of power, temperature, enhanced power, and temperature response into a co-feature tensor, such as... Figure 3 As shown, the specific steps are as follows: 1) Based on the normal training sample set, index each intraday time period. The robust centers and robust scales of total building power, outdoor dry-bulb temperature, and synergistic enhancement power are calculated separately.

[0051] To avoid mixing the normal loads of the early morning and afternoon into the same distribution, for any intraday time index The median of the total electrical power of a building is denoted as The interquartile range of the building's total electrical power is denoted as The median outdoor dry-bulb temperature is denoted as . The interquartile range of the outdoor dry-bulb temperature is denoted as The median of the synergistic enhancement power is denoted as The interquartile range of the synergistic power enhancement is denoted as .

[0052] It should be noted that the robust center refers to the corresponding characteristic at that time of day. The median of all normal samples represents the typical central value at that moment and is not easily affected by a small number of outliers. A robust scale refers to the corresponding feature at any given moment within the day. The interquartile range across all normal samples, i.e., the difference between the 75th and 25th percentiles, reflects a robust estimate of the normal range of fluctuation at that time. Normalization using the median and interquartile range is more resistant to potential unlabeled minor anomalies or outlier noise in the training data than the mean and standard deviation.

[0053] 2) The original power sequence for any sample Original temperature sequence and synergistic power sequence Robust normalization was performed separately to obtain the normalized power sequence. Normalized temperature series and normalized enhanced power sequence .

[0054] In specific implementation, for the first Each time step is first determined by its intraday time index. Find the corresponding median and interquartile range, then perform a normalization operation: subtract the median and divide by the interquartile range. To prevent the interquartile range from being zero, add a very small constant to the denominator. , Desirable .

[0055] In one embodiment, for example, a sample at 14:00 on day 3 (corresponding to...) The original power value is If we statistically analyze all normal training samples to obtain the median of the time within that day... Interquartile range The normalized value is This value indicates that at the current moment, the power is about 0.5 IQR units higher than the normal typical value, thus eliminating the dimension while retaining the relative fluctuation range.

[0056] 3) Normalize the power sequence The power matrix is ​​divided by day and rearranged into a normalized power matrix. Normalized power matrix The size is Normalize the temperature sequence Rearranged into a normalized temperature matrix Normalized temperature matrix The size is Normalized power sequence Rearranged into a normalized enhanced power matrix Normalized power matrix The size is ; Weight the temperature response sequence Rearranged into a temperature response weight matrix Temperature response weight matrix The size is .

[0057] 4) Normalize the power matrix according to a fixed channel order. Normalized temperature matrix Normalized power matrix and temperature response weight matrix Stacking along the channel direction yields the co-feature tensor. Cooperative feature tensor The size is The first channel is a normalized power matrix. The second channel is the normalized temperature matrix. The third channel is a normalized enhanced power matrix. The fourth channel is the temperature response weight matrix. Cooperative feature tensor Used as input for subsequent convolutional autoencoder networks.

[0058] In one embodiment, for example, if the position corresponding to 14:20 on the 3rd day of a sample is... Then the collaborative feature tensor The 4-dimensional vector at this location consists of: the normalized power value at 14:20 on day 3, the normalized temperature value at 14:20 on day 3, the normalized boosted power value at 14:20 on day 3, and the temperature response weight value at 14:20 on day 3. Therefore, the subsequent bi-branch convolutional autoencoder network at this location can not only see the multi-channel information of the current moment, but also simultaneously perceive information from adjacent moments on the same day and from the same moment on different days through two-dimensional convolution.

[0059] It should be noted that this step does not further break down the one-dimensional long sequence into more complex artificial context blocks. Instead, it directly uses the two-dimensional structure of "7 days × 144 moments" to retain the intra-weekly periodic relationship and intra-day continuous relationship. While ensuring clear granularity, it minimizes the complexity caused by manual recombination. Based on this, the subsequent network can directly learn the two types of relationships, "comparison across days at the same moment" and "continuous changes before and after the same day", on the regular two-dimensional grid. The structure is simpler and the engineering implementation is more direct.

[0060] S3. Construction of a temperature-responsive gated dual-branch convolutional autoencoder network This invention employs a temperature-responsive gated bi-branch convolutional autoencoder network to process the cooperative feature tensor. Unsupervised modeling is performed. The network uses a set of normal training samples as training objects and learns normal operating modes by reconstructing the power-temperature relationship of normal samples. The network structure includes a shared encoder, a temperature conditional branch, a shared decoder, a basic power branch, a temperature response branch, and a temperature reconstruction branch, as shown below. Figure 4 As shown, the specific steps are as follows: S301, Shared Encoder and Temperature Condition Branch Construction Construct a shared encoder with a temperature-conditional branch to extract features from the collaborative feature tensor. Extracting high-level latent representations from the normalized temperature matrix separately. Extracting global temperature background conditions provides a structured feature basis for subsequent power decoupling and reconstruction. The specific steps are as follows: 1) Combine the collaborative feature tensor Input to the shared encoder, the input size of the shared encoder is... .

[0061] In one implementation, the shared encoder comprises three convolutional layers. The first convolutional layer uses a size of... The convolution kernel has 16 output channels, followed by a ReLU activation function; the second convolution uses a kernel of size 16. The convolution kernel has 32 output channels, followed by a ReLU activation function; the third convolution layer uses a kernel of size 1. The convolution kernel has 32 output channels, and the convolution is followed by a ReLU activation function.

[0062] To compress the intra-day time dimension without excessively compressing the day dimension, downsampling with a stride of 2 is performed only along the intra-day time direction after the first and second convolutional layers, without downsampling along the day dimension. After these two downsampling operations, the co-feature tensor... Encoded as latent feature maps Latent feature map The size is Latent Feature Map Used to indicate the multi-channel collaborative mode in the current 7-day window.

[0063] 2) Normalize the temperature matrix A separate temperature condition branch is used to extract the overall temperature change background for the current 7-day window.

[0064] In one implementation, the temperature conditional branch comprises two convolutional layers. The first convolutional layer outputs 8 channels, and the second convolutional layer outputs 8 channels. After both convolutional layers, downsampling is performed only along the intraday time-time direction, consistent with the shared encoder. After obtaining the intermediate temperature feature map, global average pooling is then performed on all spatial locations to obtain the temperature conditional vector. Temperature condition vector The dimension can be 8.

[0065] It should be noted that the temperature condition vector This is used to characterize background information such as the overall temperature level, rate of temperature change, and intensity of temperature fluctuations within the current 7-day window. Since the normal response of a building's total electrical power to outdoor dry-bulb temperature varies across different seasons and day types, a temperature condition vector is introduced during subsequent decoding. This allows the model to reference the temperature background of the current window while reconstructing power.

[0066] S302, Shared Decoder and Dual-Branch Power Reconfiguration Construct a shared decoder and a dual-branch power reconstruction structure. The shared decoder encodes the latent feature map. Gradually restore to the original spatial resolution, and then generate the fundamental power matrix in parallel. Temperature response matrix and reconstructing the temperature matrix The base power and temperature response components are fused through external control to obtain the final reconstructed power matrix. The specific steps are as follows: 1) Latent feature map Input to the shared decoder. The goal of the shared decoder is to process the latent feature maps... Restore the spatial resolution to the same "7 days × 144 moments" as the original input.

[0067] In one implementation, the latent feature map is first... The intermediate decoding features are obtained by linearly interpolating and upsampling to 72 along the intraday timeline, followed by one convolutional layer. These intermediate decoding features are then linearly interpolated and upsampled to 144 along the intraday timeline, followed by one convolutional layer to obtain the shared decoding feature map. Shared decoding feature map The size is .

[0068] 2) From shared decoding feature maps Generate base power branch output. The base power branch is used to reconstruct the base load portion that is not directly driven by rapid temperature changes, such as lighting, office equipment, servers, and other relatively stable equipment loads.

[0069] In the specific implementation, the decoded feature map will be shared. Input the size of layer 1 as The size of the convolutional layer and the 1st layer is The convolutional layer outputs the fundamental power matrix. Basic power matrix The size is , Indicates the first Heavenly The basic power reconstruction value of the location at any given time within a day.

[0070] 3) Decoding feature maps Temperature condition vector and temperature response weight matrix Together, they generate the temperature response branch output.

[0071] In the specific implementation, the temperature condition vector is first... The temperature condition feature map was obtained by spatially replicating the location across all 7 days and 144 intraday time periods. Temperature condition characteristic diagram The size is Then share the decoded feature map Temperature condition characteristic diagram and temperature response weight matrix By concatenating the channels, the temperature response branch input features are obtained; then, through a single layer of size... The size of the convolutional layer and the 1st layer is The convolutional layer outputs a temperature response matrix. Temperature response matrix The size is , Indicates the first Heavenly The temperature-driven power response reconstruction value at each location within a given day.

[0072] 4) Integrating the basic power matrix through external control methods and temperature response matrix The reconstructed power matrix is ​​obtained. .

[0073] In practical implementation, the power matrix is ​​reconstructed. Based on the following formula, the power matrix is ​​reconstructed at locations where the temperature response weight is relatively small. Mainly composed of the basic power matrix The temperature response matrix is ​​determined to be positioned where the temperature response weight is higher. For reconstructed power matrix Their contributions will be significantly amplified, as follows: in, Represents the reconstructed power matrix, with size . ; Represents the fundamental power matrix; Represents the temperature response weight matrix; Represents the temperature response matrix; This indicates that the elements at corresponding positions are multiplied one by one.

[0074] 5) Decoding feature maps Generate the temperature reconstruction branch output to obtain the reconstructed temperature matrix. The temperature reconstruction branch is used to constrain the network while preserving information from the temperature channels, preventing the network from focusing solely on power and ignoring temperature during training.

[0075] In the specific implementation, the decoded feature map will be shared. Input the size of layer 1 as The size of the convolutional layer and the 1st layer is The convolutional layer outputs a reconstructed temperature matrix. Reconstructing the temperature matrix The size is .

[0076] In one embodiment, as an example, if the temperature response weight value of a sample at 15:00 on day 4... The element in the 4th row and 91st column of the fundamental power matrix The element in the 4th row and 91st column of the temperature response matrix Then the element in the 4th row and 91st column of the reconstructed power matrix If the other location is at 03:00 AM, the temperature response weight value... The element in the 4th row and 91st column of the fundamental power matrix The element in the 4th row and 91st column of the temperature response matrix Then the element in the 4th row and 91st column of the reconstructed power matrix Therefore, it can be seen that for the same size temperature response matrix... Locations will not be excessively magnified at night when temperature changes are not significant.

[0077] It should be noted that the total electrical power of a building does indeed contain both base loads that are weakly correlated with temperature and air conditioning loads that are strongly correlated with temperature. If both are mixed in the reconstruction, the network is prone to fitting the temperature-driven part incorrectly. Therefore, this step splits the power reconstruction into a "base power part" and a "temperature response part," and uses a temperature response weight matrix. External control of the temperature response component can lead to a situation where the temperature has changed significantly over a certain period of time but the building's total electrical power does not respond normally. In such cases, the temperature response branch will be difficult to reconstruct accurately, resulting in a more significant deviation in the anomaly score.

[0078] S303, Weighted Reconstruction Loss Based on Local Changes and Network Training A local variation weighted reconstruction loss function is used to train the aforementioned dual-branch convolutional autoencoder network. The loss function utilizes the temperature response weight matrix. and the intensity matrix of local power variation Spatially weighting the reconstruction error guides the network to focus on learning the normal reconstruction patterns in temperature-driven significant regions and regions with obvious power dynamic changes, such as... Figure 5 As shown, the specific steps are as follows: 1) Power enhancement matrix by normalization Calculate the intensity matrix of local power variation Local power variation intensity matrix It is used to reflect whether the change in the total electrical power of buildings near the current location is significant.

[0079] In practical implementation, the normalized power enhancement matrix is... Calculate the absolute value of the first-order difference between adjacent positions according to the intraday time direction; then normalize the absolute value of the difference to the range of 0 to 1 using the maximum value in the current sample; for the first intraday time position of each day, since there is no previous time, the intensity of local power variation can be directly set to 0. Power Local Variation Intensity Matrix The size is .

[0080] In one embodiment, for example, a sample at 10:30 on day 5 ( The normalized enhancement power value of ) is 0.2, and its previous time 10:20 ( If the value of ) is 0.5, then the absolute value of the first difference is If the maximum absolute value of the differences at all locations within the sample is 0.6, then the normalized value at that location is... This value reflects a moderate relative change in power over a short period of time.

[0081] 2) From the temperature response weight matrix and the intensity matrix of local power variation Jointly generate loss weight matrix Loss weight matrix This is used to allow the network to focus on fitting locations where "temperature-driven" and "power-change" conditions are significant.

[0082] In practical implementation, to enable the network to adaptively focus on the two types of regions most relevant to anomaly identification during the training phase, the loss weight matrix is... The calculation method is expressed as follows: in, This represents the loss weight matrix, with size . The constant 1 represents the base weights. This represents the temperature response weighting adjustment coefficient; This represents the adjustment coefficient for the intensity of local power variations. Preferably, 0.6 is acceptable. 0.4 is acceptable.

[0083] It should be noted that this applies to areas where temperature is a significant driver (by...). Characterization): These are the periods when power should exhibit a delayed response after a temperature change event, and are key areas of interest for identifying building energy consumption anomalies. Increasing their loss weight forces the network to learn normal response patterns more accurately, thereby improving the significance of reconstruction bias during anomalies. For areas with significant dynamic power changes (from... (Characteristics): These are periods with significant power fluctuations (such as weekday start-ups and shutdowns, load switching). If the network does not learn the normal fluctuations in these areas sufficiently, it may misjudge normal fluctuations as anomalies. Weighting can improve the ability to reconstruct normal dynamics and reduce false alarms. In addition, the basic weight "1" is used to ensure that all time points participate in training, avoiding the network focusing only on a few high-weight positions while ignoring the basic reconstruction ability during stable periods.

[0084] 3) Based on the reconstructed power matrix and reconstructing the temperature matrix Calculate the sample loss. The sample loss is denoted as... The calculation method is expressed as follows: in, This represents the training loss for a single sample; Represents the normalized power enhancement matrix; Represents the reconstructed power matrix; Represents the normalized temperature matrix; This represents the reconstructed temperature matrix; This represents the weight of the temperature reconstruction loss, used to control the strength of the temperature channel constraint, and is preferably between 0.2 and 0.5. This indicates that the average value is calculated over all positions in the matrix.

[0085] In one embodiment, for example, if the temperature response weighting value at a certain location is 0.8, the local power change intensity is 0.5, and , Then the loss weight at that position is If the temperature response weight at another stable location is 0.1 and the local power change intensity is 0.1, then the loss weight at that location is... This means that the network will place greater emphasis on the reconstruction accuracy of the former during training.

[0086] 4) Input the normal training sample set into the temperature-response-gated dual-branch convolutional autoencoder in batches, and update the network parameters using an adaptive moment estimation optimizer. The initial learning rate can be set to... The batch size can be 16 or 32, and the total number of training cycles can be 80 to 150. During training, a portion of the normal training sample set is used as the validation set, and the network parameters with the lowest validation loss are saved as subsequent anomaly detection models.

[0087] 5) During the training phase, only the normal training sample set is used, and no abnormal labels are introduced. This invention learns "the normalized enhanced power matrix under normal operating conditions". How should the temperature response weight matrix be weighted? and normalized temperature matrix "It is reconstructed under the condition that the temperature-power covariance in the sample deviates from the normal pattern." Therefore, when the temperature-power covariance in the sample deviates from the normal pattern, the network will reconstruct the power matrix. Significant deviations may occur at times.

[0088] It should be noted that the basic power matrix The physical meaning is the soft constraint induced jointly by network structure design and loss function. The basic power branch and temperature response branch share decoding features. However, the basic power branch is not related to the temperature response weight matrix before fusion. Interaction. During training, in order to simultaneously satisfy the external control fusion of power reconstruction accuracy and temperature response branch, the network will naturally assign load components that are weakly correlated with temperature and relatively stable across different time steps to the basic power branch. This is because only in this way can the temperature response branch... High-value areas can be flexibly adjusted To match temperature-driven power fluctuations without causing conflicts. Furthermore, in the loss function... Weighting forces the network to prioritize the reconstruction accuracy of regions with significant temperature response and drastic power changes. If the basic power branch is to avoid introducing excessive errors in these regions, it must learn components that do not change drastically with temperature events.

[0089] It should also be noted that the temperature response matrix The physical meaning is a soft constraint formed by gradient assignment jointly induced by conditional input constraints and gating fusion. The input of the temperature response branch includes the temperature response weight matrix. and temperature condition vector Branches are generated The intensity of the temperature event and the overall temperature background at the current moment are already "known". If temperature-driven power changes cannot be reflected, then during the fusion phase... The reconstruction error will increase significantly. Furthermore, the external control formula... During backpropagation, The gradient will be Weighted. In High-value areas (i.e., areas affected by temperature events). The gradient contribution is large, so the network must be adjusted. To fit the temperature response component in the actual power; low value area The gradient is suppressed, and the network does not force the gradient. To fit changes that are independent of temperature.

[0090] S4. Anomaly Score Calculation and Anomaly Judgment Threshold Setting After the network training is completed, an anomaly detection threshold needs to be set based on the reconstruction error distribution on the normal training sample set. Then, the window to be detected is scored and judged during the inference phase. The specific steps are as follows: 1) Re-input all normal training samples into the already trained temperature-response-gated dual-branch convolutional autoencoder network, and calculate the anomaly score for each sample. . No. Anomaly scores for each sample Defined as the sum of the weighted reconstruction error of its power component and the reconstruction error of its temperature component, i.e., directly using the sample loss in step S303. As an anomaly score .

[0091] In one embodiment, as an example, suppose a sample to be tested is calculated to receive: Mean of power reconfiguration weighted reconfiguration error Mean temperature reconstruction error Temperature loss weight ; The anomaly score for this sample is: .

[0092] 2) Collect abnormal ratings from all normal training samples to form a normal rating distribution. Define the 95th percentile of the normal rating distribution as the anomaly detection threshold. Anomaly detection threshold Used to distinguish normal samples from abnormal samples that deviate significantly from the normal reconstruction pattern.

[0093] 3) For any monitoring window to be detected, perform the same preprocessing steps S201 to S203 to obtain the collaborative feature tensor. Normalized temperature matrix Normalized power matrix Temperature response weight matrix and the intensity matrix of local power variation Then, the collaborative feature tensor Inputting a pre-trained temperature-response-gated dual-branch convolutional autoencoder network yields the reconstructed power matrix. and reconstructing the temperature matrix Finally, the anomaly score of the sample to be tested is calculated according to step S303. .

[0094] Furthermore, the abnormality score of the sample to be tested is... With anomaly detection threshold Comparison. When When the monitoring window to be tested is found to have abnormal building energy consumption, it is determined that the building has abnormal energy consumption. When this happens, the monitoring window to be tested is determined to be normal.

[0095] 4) To facilitate maintenance personnel in locating abnormal periods, a location-level anomaly contribution matrix is ​​further output. Location-level anomaly contribution matrix It can be derived from the loss weight matrix The result is obtained by element-wise multiplication with the squared residual of the power reconstruction, i.e. Location-level anomaly contribution matrix The size is .in, The larger the value, the higher the number. Heavenly The greater the contribution of a given time point within a day to the overall anomaly score, the higher the contribution.

[0096] In one embodiment, for example, if the outdoor dry-bulb temperature continues to rise between 14:00 and 16:00 on the 6th day of a monitoring window, but the chiller or fresh air system is not operating normally, then the temperature response weight matrix for that period... Higher values ​​theoretically result in a larger reconstruction of the normal response from the temperature response branch; however, the actual input normalized power enhancement matrix... The corresponding position in the matrix did not show the expected increase, therefore this period showed anomalies in the position-level contribution matrix. The values ​​in the score will be consistently large, eventually leading to abnormal scoring. Exceeding the anomaly detection threshold This triggers an abnormal alarm.

[0097] S5. Online monitoring data access and anomaly identification process After completing model training and setting anomaly detection thresholds, this invention can be deployed in a building energy consumption online monitoring system to continuously monitor the building's operating status. The specific steps are as follows: During the online monitoring phase, the system continuously receives data on total building power and outdoor dry-bulb temperature, maintaining a sampling interval of 10 minutes. The system maintains a fixed-length sliding monitoring window of 7 days. When a new sampled value arrives, the sliding monitoring window advances one time step, discarding the oldest time step and adding the newest one.

[0098] Furthermore, for the updated sliding monitoring window, the following steps are repeated: temperature change event extraction in step S201, temperature response weight sequence generation and collaborative enhancement power sequence construction in step S202, and robust normalization and daily-time collaborative feature tensor construction in step S203, to obtain the collaborative feature tensor corresponding to the current sliding monitoring window. .

[0099] Furthermore, the collaborative feature tensor corresponding to the current sliding monitoring window... Inputting a pre-trained temperature-response-gated dual-branch convolutional autoencoder network yields the reconstructed power matrix. and reconstructing the temperature matrix And calculate the anomaly score for the current sliding monitoring window. .

[0100] Furthermore, when the current sliding monitoring window shows anomaly scores... Exceeding the anomaly detection threshold When this occurs, the system outputs an anomaly alarm; simultaneously, it combines this with the location-level anomaly contribution matrix. Provide the days and times when anomalies occur in a concentrated manner, so that maintenance personnel can further verify the equipment start-up and shutdown strategies, cold source operation status, air conditioning linkage control logic, and sensor measurement status.

[0101] It should be noted that this invention primarily targets the abnormal scenario of "temperature change but power failure," and is particularly suitable for building energy consumption monitoring scenarios with a high proportion of air conditioning load, a clear daily cycle, and significant thermal inertia and control lag. Specifically: High proportion of air conditioning load: The total power of such buildings is sensitive to changes in outdoor temperature. The temperature-power coupling relationship is strong. The main anomaly is "the temperature has changed but the power has not followed," which is exactly the target anomaly mode of the temperature response gating mechanism of this invention. The daily cycle is obvious: utilizing Two-dimensional structures can naturally capture "cross-day comparisons at the same moment" and "continuous changes within the same day", enhancing the ability to represent periodic normal patterns; Significant thermal inertia and control hysteresis: By using a one-sided hysteresis decay kernel, the impact of temperature change events is extended to subsequent time periods, and the hysteresis characteristics of the power response are modeled to avoid misjudging normal hysteresis as abnormal.

[0102] Example 2 This embodiment also provides a building energy consumption anomaly pattern recognition system, which executes the building energy consumption anomaly pattern recognition method described in Embodiment 1, including: Data acquisition module: used to collect total building power data and outdoor dry-bulb temperature data, construct building energy consumption monitoring window, organize training samples, and obtain the original building energy consumption monitoring tensor; Data preprocessing module: Constructs a set of temperature change events based on the original temperature sequence; uses a one-sided hysteresis decay method to map the temperature change events into a temperature response weight sequence, constructs a collaborative enhancement power sequence through the temperature response weight sequence, and finally obtains a collaborative feature tensor; Network model construction module: Construct a two-branch convolutional autoencoder network, including a shared encoder, a temperature conditional branch, a shared decoder, a base power branch, a temperature response branch, and a temperature reconstruction branch; input the collaborative feature tensor and the normalized temperature matrix into the two-branch convolutional autoencoder network to obtain the reconstructed power matrix and the reconstructed temperature matrix; train the two-branch convolutional autoencoder network using a local variation weighted reconstruction loss function to obtain the trained two-branch convolutional autoencoder network; Anomaly detection module: Sets anomaly detection threshold based on the reconstruction error distribution on the normal training sample set, and then scores and judges the window to be detected during the inference stage; thus obtaining the building energy consumption anomaly pattern recognition result.

[0103] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for identifying abnormal patterns in building energy consumption, characterized in that, Includes the following steps: S1. Collect total building power data and outdoor dry-bulb temperature data, construct a building energy consumption monitoring window, organize training samples, and obtain the original building energy consumption monitoring tensor. The original building energy consumption monitoring tensor Including the original power sequence and the original temperature sequence ; S2, Based on the original temperature sequence Construct a set of temperature change events A one-sided hysteresis attenuation method is used to map temperature change events into temperature response weight sequences. These weight sequences are then used to construct a cooperative enhancement power sequence, ultimately yielding a cooperative feature tensor. ; Temperature response weighted sequence generation and collaborative power sequence enhancement construction: For each temperature change event, a one-sided hysteresis decay kernel is constructed; based on the one-sided hysteresis decay kernel, the effects of all temperature change events are superimposed to generate a temperature response weight sequence. ,in, Indicates the first Temperature response weights at each time step; utilizing the temperature response weight sequence For the original power sequence Perform multiplicative enhancement to obtain a synergistically enhanced power sequence. ,in, Indicates the first The collaborative enhancement power value at each time step; S3. Construct a dual-branch convolutional autoencoder network, including a shared encoder, a temperature-conditional branch, a shared decoder, a basic power branch, a temperature response branch, and a temperature reconstruction branch; integrate the collaborative feature tensor... Input the bi-branch convolutional autoencoder network to obtain the reconstructed power matrix and the reconstructed temperature matrix; train the bi-branch convolutional autoencoder network using the local variation weighted reconstruction loss function to obtain the trained bi-branch convolutional autoencoder network; S4. Set the anomaly judgment threshold based on the reconstruction error distribution on the normal training sample set, and then score and judge the window to be detected in the inference stage; to obtain the building energy consumption anomaly pattern recognition result.

2. The method for identifying abnormal building energy consumption patterns according to claim 1, characterized in that, Step S1 specifically includes: Collect total building power data and outdoor dry-bulb temperature data, with a fixed sampling interval of 10 minutes. For any consecutive 7-day monitoring window, the number of time steps for a single data type is recorded as follows: The number of features is denoted as All training windows were organized into the original building energy consumption monitoring tensor. Original building energy consumption monitoring tensor The size is ,in, Indicates the sample size; for the original building energy consumption monitoring tensor Take the first feature of any sample in the sequence to form the original power sequence. ;in, Indicates the first The total building power samples at each time step; the second feature is used to form the original temperature sequence. ,in, Indicates the first Outdoor dry-bulb temperature sampling values ​​at each time step.

3. The method for identifying abnormal building energy consumption patterns according to claim 1, characterized in that, In step S2, based on the original temperature sequence Construct a set of temperature change events : For the original temperature sequence Perform moving average smoothing to obtain a smoothed temperature series. ,in, Indicates the first Smoothed temperature values ​​at each time step; for the smoothed temperature sequence Calculate the temperature slopes on the left and right sides step by step to obtain temperature change events; for the first time step... At each time step, the temperature slope on the left is denoted as... The temperature slope on the right is denoted as When the first When the following two conditions are met simultaneously at the nth time step, the nth time step will be... Each time step is denoted as a temperature change event: Condition 1, and opposite signs, or Greater than the preset slope change threshold; Condition 2, based on the first Centered on a time step, before and after each The local temperature change amplitude at time step i is greater than a preset amplitude threshold; the event intensity is calculated for each temperature change event, for the i-th time step... There are several temperature change events, and their event locations are denoted as... The event intensity is denoted as Organize all temperature change events into a temperature change event set in chronological order. .

4. The method for identifying abnormal building energy consumption patterns according to claim 3, characterized in that, In step S2, the collaborative feature tensor The construction process is as follows: Based on the normal training sample set, index each intraday time period. The robust centers and robust scales of total building power, outdoor dry-bulb temperature, and synergistic enhancement power were statistically analyzed separately. The original power sequence for any sample Original temperature sequence and synergistic power sequence Robust normalization was performed separately to obtain the normalized power sequence. Normalized temperature series and normalized enhanced power sequence ; normalize the power sequence The power matrix is ​​divided by day and rearranged into a normalized power matrix. Normalize the temperature series Rearranged into a normalized temperature matrix ; Normalized power sequence Rearranged into a normalized enhanced power matrix ; Weight the temperature response sequence Rearranged into a temperature response weight matrix Normalized power matrix in fixed channel order Normalized temperature matrix Normalized power matrix and temperature response weight matrix Stacking along the channel direction yields the co-feature tensor. .

5. The method for identifying abnormal building energy consumption patterns according to claim 4, characterized in that, In step S3, the shared encoder and temperature condition branch are constructed: The shared encoder contains three layers of convolutional processing: the first convolutional layer uses a size of... The convolution kernel has 16 output channels, followed by a ReLU activation function; the second convolution uses a kernel of size 16. The convolution kernel has 32 output channels, followed by a ReLU activation function; the third convolution layer uses a kernel of size 1. The convolution kernel has 32 output channels, followed by a ReLU activation function; after the first and second convolution layers, downsampling with a stride of 2 is performed only along the intraday time direction; the co-feature tensor is... Input a shared encoder to obtain a latent feature map ; The temperature condition branch includes two convolutional layers. The first convolutional layer outputs 8 channels, and the second convolutional layer outputs 8 channels. After both convolutional layers, downsampling is performed only along the intraday time direction, consistent with the shared encoder. The normalized temperature matrix is ​​then processed. The input temperature conditional branch undergoes two convolutional layers to obtain an intermediate temperature feature map. Global average pooling is then performed on the intermediate temperature feature map to obtain the temperature conditional vector. .

6. The method for identifying abnormal building energy consumption patterns according to claim 5, characterized in that, In step S3, the shared decoder and dual-branch power reconstruction are performed: latent feature map The input shared decoder first processes the latent feature map The intermediate decoding features are obtained by upsampling to 72 along the intraday time direction through linear interpolation and then passing them through one convolutional layer. The intermediate decoded features are then upsampled to 144 along the intraday timeline using linear interpolation, and then passed through one convolutional layer to obtain the shared decoded feature map. The shared decoding feature map Input the base power branch, through 1 level of size The size of the convolutional layer and the 1st layer is The convolutional layer outputs the fundamental power matrix. First, convert the temperature condition vector. The temperature condition feature map was obtained by spatially replicating the location across all 7 days and 144 intraday time periods. ; Then share the decoded feature map Temperature condition characteristic diagram and temperature response weight matrix By concatenating the channels, the temperature response branch input features are obtained; The temperature response branch input feature is passed through a layer of size 1. The size of the convolutional layer and the 1st layer is The convolutional layer outputs a temperature response matrix. ; Integrating the basic power matrix through external control methods and temperature response matrix The reconstructed power matrix is ​​obtained. Shared decoding feature maps Input temperature reconstruction branch, after 1 level of size The size of the convolutional layer and the 1st layer is The convolutional layer yields the reconstructed temperature matrix. .

7. The method for identifying abnormal building energy consumption patterns according to claim 6, characterized in that, In step S3, the local change weighted reconstruction loss is used in network training: Power matrix enhancement by normalization Calculate the intensity matrix of local power variation : For the normalized enhanced power matrix Calculate the absolute value of the first-order difference between adjacent positions according to the intraday time direction; Then, normalize the absolute value of the difference to the range of 0 to 1 using the maximum value in the current sample to obtain the power local variation intensity matrix. ; by temperature response weight matrix and the intensity matrix of local power variation Jointly generate loss weight matrix Loss weight matrix The calculation method is expressed as follows: ;in, This represents the temperature response weighting adjustment coefficient; This represents the adjustment coefficient for the intensity of local power variations; based on the reconstructed power matrix. and reconstructing the temperature matrix The sample loss is calculated as follows: ,in, Indicates the weight of the temperature reconstruction loss; This represents averaging across all positions in the matrix; the normal training sample set is input into the dual-branch convolutional autoencoder in batches, and the network parameters are updated using an adaptive moment estimator optimizer.

8. The method for identifying abnormal building energy consumption patterns according to claim 1, characterized in that, In step S4, the anomaly score is calculated and the anomaly determination threshold is set: All normal training samples are re-input into the trained dual-branch convolutional autoencoder network, and anomaly scores are calculated for each sample. ;No. Anomaly scores for each sample Defined as sample loss ; Collect abnormal scores from all normal training samples to form a normal score distribution, and define the 95th percentile of the normal score distribution as the anomaly detection threshold. For any sample within the monitoring window to be detected, after preprocessing in step S2, it is input into the trained dual-branch convolutional autoencoder network to obtain the anomaly score of the sample to be detected. ; score the abnormality of the sample to be tested With anomaly detection threshold The comparison yields the results of building energy consumption anomaly pattern identification; when When the energy consumption of the building to be monitored is deemed abnormal, it is determined that the building's energy consumption is abnormal. When this happens, the monitoring window to be tested is determined to be normal.

9. A building energy consumption anomaly pattern recognition system, executing the building energy consumption anomaly pattern recognition method as described in claim 1, characterized in that, include: Data acquisition module: This is used to collect total building power data and outdoor dry-bulb temperature data, construct a building energy consumption monitoring window, organize training samples, and obtain the original building energy consumption monitoring tensor. Data preprocessing module: Constructs a set of temperature change events based on the original temperature sequence; uses a one-sided hysteresis decay method to map the temperature change events into a temperature response weight sequence, constructs a collaborative enhancement power sequence through the temperature response weight sequence, and finally obtains a collaborative feature tensor; Network model construction module: Construct a two-branch convolutional autoencoder network, including a shared encoder, a temperature conditional branch, a shared decoder, a base power branch, a temperature response branch, and a temperature reconstruction branch; input the collaborative feature tensor and the normalized temperature matrix into the two-branch convolutional autoencoder network to obtain the reconstructed power matrix and the reconstructed temperature matrix; train the two-branch convolutional autoencoder network using a local variation weighted reconstruction loss function to obtain the trained two-branch convolutional autoencoder network; Anomaly detection module: Sets anomaly detection threshold based on the reconstruction error distribution on the normal training sample set, and then scores and judges the window to be detected during the inference stage; The results of abnormal building energy consumption patterns were obtained.

Citation Information

Patent Citations

  • Method, device, computer device and storage medium for detecting abnormal state of energy consumption

    AU2021107642A4

  • Abnormal energy consumption diagnosis method and system based on short-term building energy consumption prediction model

    CN114169254A