A method and system for predicting energy consumption of a smart building based on machine learning

CN122988331APending Publication Date: 2026-10-27SHANDONG PROV CONSTR DESIGN & RES INST
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

[0003]然而,现有技术存在以下不足:在特征构建上缺乏对建筑物理特性的显式注入,通常将多源气象、室内状态和时间变量直接作为普通输入,迫使模型从数据中隐式学习本可由工程先验直接表达的耦合关系,在小样本或工况覆盖不全时易导致训练不稳定和泛化能力不足;多采用单一的时序编码网络统一处理所有特征,未区分外部快速扰动与内部慢速惯性的物理差异,导致模型结构与被建模对象的动态特性不匹配,快速扰动容易被长时平滑,慢变基线又易受局部噪声干扰;在处理工作日与非工作日的能耗模式差异时,常将日类型作为简单离散特征或采用两套独立模型,前者难以表达不同模式下状态更新机制的底层差异,后者则割裂了模式间的共性知识共享,且增加了工程维护成本;在融合快慢两类时序信息时,通常采用简单拼接或末端状态组合,缺乏以建筑内部惯性状态为依据对历史扰动进行主动筛选的机制,无法为不同时刻的外部扰动分配差异化的融合权重,限制了预测精度和可解释性

Benefits of technology

首先,本发明构建了基于物理先验注入的特征工程体系。通过将室外多源气象参数融合为等效室外热扰动指数,将室内热湿状态按建筑热时间常数分解为慢变趋势与快变残差,并将时间戳转化为工作日与非工作日解耦周期特征,使模型输入具备明确的工程物理含义,而非单纯依赖原始数据驱动。其次,构建了快慢解耦的双物理分支时序编码网络。将重构特征按物理属性分流,外部快速扰动由因果膨胀卷积网络捕捉,内部慢速惯性由带日类型调制的门控循环单元建模,从结构层面实现了“分而治之”,避免了单一网络混合处理造成的快速信号被平滑或慢速基线被噪声干扰的问题。然后,提出基于日类型调制的门控循环单元慢速演化机制。在标准门控循环单元的更新门中注入由日类型嵌入生成的动态偏置项,使模型能根据工作日与非工作日自适应调整历史状态的保留与更新比例,无需构建多个独立模型即可在统一框架内表达差异化的能耗基线演化规律。最后,建立以慢速惯性为查询的快慢分支互注意力融合方法。以慢速演化分支的最终隐藏状态作为查询,对快速响应分支的全部历史隐藏状态进行注意力加权,实现用建筑内部惯性基线主动筛选关键外部扰动时间片段,避免简单拼接末端状态导致的信息丢失,提升了融合的物理可解释性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122988331A_ABST
    Figure CN122988331A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of wisdom building energy consumption prediction method and system based on machine learning, belong to machine learning technical field.It includes the following steps: collecting building energy consumption time series data and constructing original building energy consumption prediction sample;On the basis of original building energy consumption prediction sample, construct equivalent outdoor thermal disturbance index, workday and non-workday decoupling period characteristics, indoor slow change trend characteristics and indoor fast change residual characteristics, and the feature matrix of reconstructed building energy consumption is obtained by splicing with basic observation characteristics;Based on external disturbance fast response branch, internal inertia slow evolution branch and fast-slow branch attention fusion module, construct double physical branch time series coding network;Robust regression loss function and gradient descent method are used to train model parameters, and the trained model is obtained;The reconstructed building energy consumption feature matrix is input into the trained model to obtain building total energy consumption power prediction result.The present application improves the physical interpretability and accuracy of prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine learning technology, specifically relating to a method and system for predicting energy consumption in smart buildings based on machine learning. Background Technology

[0002] With the acceleration of urbanization and the continuous improvement of people's requirements for indoor environmental comfort, the total energy consumption of buildings is showing a rigid growth trend, which poses a severe challenge to the refined management of urban carbon emissions. Therefore, it is essential to design an accurate method for predicting building energy consumption. With the popularization of building energy management systems and Internet of Things (IoT) sensing technologies, a large amount of energy consumption, meteorological, indoor environmental, and personnel and equipment operation data has been accumulated during building operation, providing a data foundation for improving the accuracy of building total energy consumption prediction using machine learning methods.

[0003] However, existing technologies have the following shortcomings: They lack explicit injection of building physical characteristics into feature construction, typically using multi-source meteorological data, indoor conditions, and time variables directly as ordinary inputs. This forces the model to implicitly learn coupling relationships from the data that could be directly expressed by engineering priors, easily leading to training instability and insufficient generalization ability when dealing with small samples or incomplete coverage of working conditions. Furthermore, they often use a single temporal coding network to uniformly process all features, failing to distinguish the physical differences between external rapid disturbances and internal slow inertia. This results in a mismatch between the model structure and the dynamic characteristics of the modeled object; rapid disturbances are easily smoothed over long periods, and slow baselines are compromised. It is also susceptible to local noise interference; when dealing with the differences in energy consumption patterns between weekdays and non-weekdays, the day type is often treated as a simple discrete feature or two independent models are used. The former is difficult to express the underlying differences in the state update mechanism under different modes, while the latter severs the sharing of common knowledge between modes and increases the engineering maintenance cost; when fusing fast and slow time series information, simple splicing or end state combination is usually used. There is a lack of a mechanism to actively screen historical disturbances based on the inertial state inside the building, and it is impossible to assign differentiated fusion weights to external disturbances at different times, which limits the prediction accuracy and interpretability. Summary of the Invention

[0004] To solve the above problems, the present invention provides the following technical solution: This invention provides a machine learning-based method for predicting energy consumption in smart buildings, specifically including: S1. Collect multi-source building operation data, perform time alignment on the multi-source building operation data, construct original building energy consumption prediction samples, and divide all original building energy consumption prediction samples into training samples, validation samples, and test samples. S2. Based on the original building energy consumption prediction sample, construct the equivalent outdoor thermal disturbance index, weekday and non-weekday decoupling cycle characteristics, indoor slow change trend characteristics and indoor fast change residual characteristics. Combine the above physical prior characteristics with the basic observation characteristics to obtain the reconstructed building energy consumption characteristic matrix. S3. A dual-physical-branch temporal coding network is constructed based on the fast response branch for external disturbances, the slow evolution branch for internal inertia, and the mutual attention fusion module between fast and slow branches. S4. Train a dual-physical-branch temporal coding network based on a robust regression loss function, and update the model parameters end-to-end using gradient descent. S5. Deploy the trained dual-physical-branch temporal coding network into the building energy management system for online prediction. The system outputs prediction results and operation prompts based on the total energy consumption power prediction output value.

[0005] As a further technical solution, S1 includes: The multi-dimensional building operation data includes: total building energy consumption power sequence, outdoor dry-bulb temperature sequence, total solar radiation intensity sequence, wind speed sequence and outdoor relative humidity sequence, indoor average temperature sequence and indoor average relative humidity sequence, lighting power density sequence, equipment power density sequence and personnel density sequence, hourly index, day type code and holiday code; The multi-dimensional building operation data is time-aligned according to a unified sampling interval, and missing and outlier values ​​are linearly interpolated and outlier pruning is performed. The original building energy consumption prediction samples are constructed according to the input historical window length and prediction step size. All original building energy consumption prediction samples are divided into training samples, validation samples and test samples according to time order.

[0006] As a further technical solution, S2 specifically includes: The outdoor dry-bulb temperature sequence, total solar radiation intensity sequence, wind speed sequence, and outdoor relative humidity sequence are extracted from the original building energy consumption prediction sample. The solar radiation-corrected warming contribution and humidity-corrected warming contribution are calculated. The outdoor dry-bulb temperature, solar radiation-corrected warming contribution, and humidity-corrected warming contribution are combined to obtain the equivalent outdoor temperature. The difference between the outdoor dry-bulb temperature and the building equilibrium temperature is then calculated to obtain the equivalent outdoor thermal disturbance index. Parse the hour index and day type code from the timestamp, map the hour index to the intraday cycle angle, calculate the basic intraday cycle component, construct the day type symbol modulation factor based on the day type code, generate the day type modulation cycle component, and concatenate the basic intraday cycle component and the day type modulation cycle component to obtain the decoupled cycle feature vector of working days and non-working days. The indoor average temperature and average relative humidity sequences are extracted as indoor thermal and humidity state variables. The indoor thermal inertia smoothing coefficient is calculated based on the building thermal time constant. The slow-varying trend component is calculated for each indoor thermal and humidity state variable. The fast-varying residual component is calculated based on the observed values ​​of the indoor thermal and humidity state variables and the slow-varying trend component. The slow-varying trend and fast-varying residual of the indoor average temperature and average relative humidity are concatenated column by column to obtain the fast-varying residual component of the indoor average temperature and the feature matrix of the indoor fast-varying residual. The basic building observation features, equivalent outdoor thermal disturbance index sequence, weekday and non-weekday decoupled periodic feature matrix, indoor slow-varying trend feature matrix, and indoor fast-varying residual feature matrix are column-level concatenated, and continuous features are standardized to obtain the reconstructed building energy consumption feature matrix. The basic building observation features refer to the feature matrix composed of original observation fields that have not been physically decomposed and have a direct effect on the prediction of total building energy consumption.

[0007] As a further technical solution, the external disturbance fast response branch described in S3 includes: Extract the fast response feature group matrix from the reconstructed building energy consumption feature matrix; The fast response feature group matrix is ​​input into the fast response temporal convolutional network, which is composed of stacked causal dilated convolutional blocks; In each causal dilated convolutional block, gated activation and residual connection are performed. The gated perturbation output is added to the input of that layer by residual addition to obtain the output of that layer. By sequentially performing calculations on all causal dilated convolutional blocks, a fast response hidden state sequence is obtained.

[0008] As a further technical solution, the internal inertial slow evolution branch described in S3 includes: Extract the slow-evolution feature group matrix and day type coding sequence from the reconstructed building energy consumption feature matrix; Convert the day type encoding into a day type embedding vector; The slow-evolution feature set matrix is ​​input into a gated recurrent unit with day-type modulation, where the update bias increment is obtained by the day-lightning response embedding increment mapping; The reset gate, candidate hidden state, and current slow-evolution hidden state are obtained according to the standard calculation method of the gated loop unit, and the slow-evolution hidden state sequence is output in chronological order. As a further technical solution, the fast and slow branch mutual attention fusion module described in S3 includes: Read the fast response hidden state at each time step from the fast response hidden state sequence, and read the terminal slow evolution hidden state from the slow evolution hidden state sequence; The attention score for each historical time step is calculated using the slow-evolution final hidden state as query information and the fast-response hidden state as candidate perturbation information. Normalize all attention scores within the input history window to obtain attention weights, and use these attention weights to perform a weighted summation on the fast response hidden state sequence; The fast perturbation weighted convergence vector is concatenated with the slow-evolving final hidden state, and the predicted total energy consumption of the building is obtained through the output layer.

[0009] As a further technical solution, S4 specifically includes: Predicted total energy consumption of future buildings is obtained based on a dual-physical-branch temporal coding network. The prediction residual is calculated based on the actual value of the total energy consumption of the future building and the predicted value of the total energy consumption of the future building, and the loss form is selected based on the robust switching threshold. Calculate the robust regression loss for all samples in the training batch and take the average as the training target; The model parameters are updated end-to-end using mini-batch gradient descent.

[0010] As a further technical solution, S5 specifically includes: The trained dual-physical-branch temporal coding network is deployed into the building energy management system; The system processes the acquired data in the same way as in the training phase, and inputs the processed data into the deployed dual physical branch temporal coding network to obtain the online prediction value of the total energy consumption of future buildings. Based on the comparison between the online prediction of the building's total energy consumption and the preset threshold, corresponding operation prompts are output.

[0011] This invention provides a smart building energy consumption prediction system based on machine learning, comprising: Data acquisition module: used to collect multi-source building operation data, construct original building energy consumption prediction samples, and divide them into training samples, validation samples, and test samples; Feature reconstruction module: used to construct equivalent outdoor thermal disturbance index, weekday and non-weekday decoupled periodic features, indoor slow-change trend features and indoor fast-change residual features, which are then concatenated with the basic building observation feature matrix to obtain the reconstructed building energy consumption feature matrix; Model building module: used to build a dual-physical-branch temporal coding network and train it using a robust regression loss function and gradient descent method; Prediction module: Deploys the trained dual-physical-branch temporal coding network, collects data online and makes predictions, and outputs running prompts based on the prediction results and set thresholds.

[0012] The present invention also provides a computer-readable storage medium storing a computer program that can be executed by a processor to implement a machine learning-based method for predicting energy consumption in smart buildings.

[0013] Beneficial effects of this invention: First, this invention constructs a feature engineering system based on physical prior injection. By fusing outdoor multi-source meteorological parameters into an equivalent outdoor thermal disturbance index, decomposing indoor thermal and humidity states into slow-varying trends and fast-varying residuals according to the building thermal time constant, and transforming timestamps into decoupled weekday and non-weekday periodic features, the model input has a clear engineering physical meaning, rather than simply relying on raw data-driven approaches. Second, a fast-slow decoupled dual-physical-branch temporal coding network is constructed. Reconstructed features are split according to physical attributes; external fast disturbances are captured by a causal dilated convolutional network, while internal slow inertia is modeled by a gated recurrent unit with day-type modulation. This achieves a "divide and conquer" approach at the structural level, avoiding the problems of smoothing fast signals or noise interference on slow baselines caused by mixed processing in a single network. Finally, a slow evolution mechanism based on gated recurrent units with day-type modulation is proposed. A dynamic bias term generated by day type embedding is injected into the update gate of the standard gated loop unit, enabling the model to adaptively adjust the retention and update ratio of historical states according to weekdays and non-weekdays. This allows for the expression of differentiated energy consumption baseline evolution patterns within a unified framework without the need to construct multiple independent models. Finally, a fast-slow branch mutual attention fusion method is established, using slow inertia as the query. The final hidden state of the slow evolution branch is used as the query, and all historical hidden states of the fast response branch are attention-weighted. This enables the active filtering of key external disturbance time segments using the building's internal inertial baseline, avoiding information loss caused by simply splicing end states and improving the physical interpretability of the fusion. Attached Figure Description

[0014] 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.

[0015] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 This is a graph showing the change in total building energy consumption power according to the present invention; Figure 3 This is a flowchart of the slow-changing trend and fast-changing residual decomposition of the present invention; Figure 4 This is a flowchart of the dual physical branch temporal coding network and the prediction of future building total energy consumption power of the present invention; Figure 5 This is a bar chart showing the distribution of mutual attention weights between fast and slow branches in this invention. Figure 6This is a comparison chart of the predicted and actual total energy consumption power of future buildings according to the present invention. Detailed Implementation

[0016] 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.

[0017] Example 1 1. Data Collection and Prediction Sample Construction This invention addresses the task of predicting total building energy consumption. It collects building energy metering data, outdoor meteorological data, indoor thermal and humidity data, personnel and equipment operation data, and calendar time data. First, the multi-source building operation data is organized into time-aligned raw building energy consumption time-series data. Then, supervised prediction samples are constructed according to the input historical window and prediction step size, providing a unified data foundation for subsequent physical prior injection and dual-physical-branch time-series coding. The specific steps are as follows: (1) Collect the total building energy consumption power sequence from the building energy metering system, collect the outdoor dry bulb temperature sequence, total solar radiation intensity sequence, wind speed sequence and outdoor relative humidity sequence from the outdoor weather station or weather service interface, collect the indoor average temperature sequence and indoor average relative humidity sequence from the indoor sensor system, collect the lighting power density sequence, equipment power density sequence and personnel density sequence from the building automation system or operation ledger, and parse the hour index, day type code and holiday code from the timestamp.

[0018] definition Indicates the sampling time index. ; This represents the total number of sampling times in the continuously sampled data; Indicates the first The total building energy consumption power at the sampling time refers to the total power value collected by the building energy metering system, which is used as a prediction target. Indicates the first The outdoor dry-bulb temperature at the sampling time is used to characterize the sensible heat state of the outdoor air; Indicates the first The total solar radiation intensity at the sampling time is used to characterize the heat input intensity of solar radiation on the building facade or roof; Indicates the first The wind speed at the sampling time is used to characterize the effect of outdoor airflow on convective heat transfer on the surface of the building envelope; Indicates the first The outdoor relative humidity at the sampling time is used to characterize the humidity state of the outdoor air; Indicates the first The indoor average temperature at the sampling time is used to characterize the indoor sensible heat state; Indicates the first The indoor average relative humidity at the sampling time is used to characterize the indoor air humidity state.

[0019] If multiple indoor temperature sensors are installed inside the building, first eliminate sensor readings that are outside a reasonable range, such as those below a certain threshold. or higher Abnormal readings are identified, and then the average indoor temperature readings at the same sampling time are calculated. If multiple indoor humidity sensors are installed inside the building, those readings below a certain threshold are first discarded. or higher The abnormal readings are then averaged with the valid indoor humidity sensor readings at the same sampling time to obtain the indoor average relative humidity.

[0020] (2) The total building energy consumption power sequence, outdoor meteorological sequence, indoor thermal and humidity state sequence, personnel and equipment operation sequence, and calendar time sequence are time-aligned according to a unified sampling interval, which is denoted as . , This represents the time distance between adjacent sampling times, and can be taken as... minute, minutes or minute.

[0021] For missing values ​​in the data, the timestamp of the building energy metering system is used as the baseline time axis. For data with a sampling frequency higher than the baseline time axis, the average value is taken within each baseline time period. For data with a sampling frequency lower than the baseline time axis, forward hold or linear interpolation is used for imputation. If a continuous field has a small number of missing values, and the consecutive missing length does not exceed [a certain value], [further details are needed]. If there are 100 sampling points, the missing data is filled in using the linear interpolation results of adjacent valid sampling points; if the length of consecutive missing data exceeds 1000, the missing data is filled in using the linear interpolation results of adjacent valid sampling points. If there are multiple sampling points, the predicted samples corresponding to that time period will not be included in the training, thus avoiding false trends caused by long-term missing data.

[0022] Outlier pruning is performed on continuous fields. Specifically, for outdoor dry-bulb temperature, total solar radiation intensity, wind speed, outdoor relative humidity, indoor average temperature, indoor average relative humidity, lighting power density, equipment power density, personnel density, and total building energy consumption, the values ​​of the first, second, and third outliers are statistically analyzed on the training set. percentile and first Percentile, will be lower than the 1st percentile. The percentile value is cropped to the 1st percentile. The percentile will be higher than the 1st percentile. The percentile value is cropped to the 1st percentile. Percentile. This processing is used to reduce the impact of sensor spikes, communication errors, and temporary anomalies on model training.

[0023] (3) Construct supervised prediction samples according to the input historical window length and prediction step size. Specifically, the input historical window length is denoted as... , This represents the number of historical sampling points used by the model in a single prediction; the prediction step size is denoted as... , This represents the sampling point interval for future prediction relative to the end of the input history window, with the th... The sampling time is used as the starting point of the input history window, and the first sampling time is captured. From the sampling time to the... Multi-source building operation data at each sampling time point forms the first... Original building energy consumption prediction sample ; will the first Total building energy consumption at each sampling time As the first Original building energy consumption prediction sample Corresponding prediction target .

[0024] For example, the sampling interval is minutes, enter the history window length Predicting step size Then the first The original building energy consumption prediction sample used past Hourly building operation data is used as input to predict the end of the historical input window. Total building energy consumption per minute. If the historical data window ends on the current day... Then the predicted target corresponds to the day Total building energy consumption.

[0025] (4) Divide all original building energy consumption prediction samples into training samples, validation samples and test samples according to time sequence. Among them, training samples are used to fit model parameters, validation samples are used to select models and stop training early, and test samples are used to evaluate the final prediction effect.

[0026] Training, validation, and test samples are divided chronologically, not randomly, to prevent future runtime states from leaking into the training phase. The earliest... The time period is used as the training sample, and the middle The time period was used as the validation sample, and finally The time period is used as the test sample. The standardized statistics, outlier clipping boundaries, and physical prior parameters of continuous features are all determined based solely on the training samples. The validation samples, test samples, and online prediction samples all use the statistics and parameters saved during the training phase.

[0027] To analyze the pattern of change in the original building's total energy consumption over time, Figure 2 This chart illustrates the variation of total building energy consumption over time step index, with the vertical axis representing total building energy consumption in kilowatts and the horizontal axis representing the time step index. The series reveals a clear diurnal fluctuation pattern in building energy consumption, with higher energy consumption during the day and lower energy consumption at night. The original data contains temporal patterns and external disturbances that can be learned by the model.

[0028] 2. Physical Prior Injection and Feature Reconstruction In building energy consumption time-series data, outdoor meteorological disturbances are not simply determined by a single temperature. Daily cycles also vary depending on weekdays and non-weekdays, resulting in different usage patterns. Indoor average temperature and indoor average relative humidity simultaneously contain thermal inertia baselines and short-term disturbances. If these variables are directly used as ordinary input fields, the model struggles to explicitly distinguish between rapid external disturbances, slow internal inertia, and cyclical usage differences. Therefore, this invention, based on the original building energy consumption prediction samples, constructs an equivalent outdoor thermal disturbance index, decoupled weekday and non-weekday cycle characteristics, slow-varying indoor trend characteristics, and fast-varying indoor residual characteristics. These physical prior features are then concatenated with the basic observation features to obtain a reconstructed building energy consumption feature matrix. The specific steps are as follows: 2.1 Construction of the equivalent outdoor thermal disturbance index considering corrections for solar radiation, wind speed, and humidity Outdoor dry-bulb temperature, total solar radiation intensity, wind speed, and outdoor relative humidity collectively affect the heat input and air conditioning load of the building envelope. Inputting these meteorological fields individually increases the difficulty for the subsequent model to learn the coupling relationship with external thermal disturbances. Therefore, this invention converts these meteorological fields into equivalent outdoor thermal disturbance indices, giving the external environmental thermal excitations a clear physical meaning during the model input stage. The specific steps are as follows: (1) From the first Original building energy consumption prediction sample Extract the length as The outdoor dry-bulb temperature sequence, total solar radiation intensity sequence, wind speed sequence, and outdoor relative humidity sequence were obtained, and it was ensured that the four sequences corresponded one-to-one at the same sampling time.

[0029] For the first entry in the history window time steps ( ), for the first The time step within a sample of original building energy consumption predictions is defined. Indicates the first The outdoor dry-bulb temperature at each time step is used to characterize the sensible heat state of outdoor air. Indicates the first The total solar radiation intensity at each time step is used to characterize the intensity of solar radiation heat input. Indicates the first The wind speed at each time step is used to characterize the degree of enhancement of outdoor airflow in convective heat transfer to the external surface; Indicates the first The outdoor relative humidity at each time step is used to characterize the humidity level of outdoor air.

[0030] For different outliers, if the wind speed is negative, the negative value will be cropped to... If the total solar radiation intensity shows a slight negative value or an abnormally negative value at night, it will be cropped to... This processing conforms to the physical values ​​of meteorological quantities and avoids the adverse effects of abnormal observations on thermal disturbance estimation.

[0031] (2) Calculate the solar radiation equivalent temperature increase contribution based on the total solar radiation intensity and wind speed. The solar radiation equivalent temperature increase contribution refers to the result of converting the solar radiation heat input into an equivalent temperature increment, which is used to convert the total solar radiation intensity to a thermal disturbance scale that can be used in conjunction with the outdoor dry-bulb temperature.

[0032] First, construct the denominator for external convective heat transfer based on wind speed. This denominator is obtained by adding the basic value of the convective heat transfer coefficient to the wind speed heat transfer enhancement term (corresponding to...). During the calculation process (Item). The basic value of the convective heat transfer coefficient is denoted as... , To characterize the convective heat transfer capacity of a building's exterior surface under conditions of no significant wind speed disturbance, the following values ​​can be used: to The wind speed heat transfer increment coefficient is denoted as , To characterize the degree to which increased wind speed enhances the convective heat transfer capacity of a building's exterior, one can take... to When wind speed increases, the denominator of the convective heat transfer on the outer surface increases, indicating that the building's outer surface is more likely to exchange heat with the outdoor air, and the equivalent warming contribution calculated from solar radiation decreases accordingly.

[0033] Then, multiply the total solar radiation intensity by the solar radiation absorption coefficient, and divide by the denominator of the external surface convective heat transfer to obtain the solar radiation-induced warming contribution (corresponding to...). During the calculation process (Item). The solar radiation absorption coefficient is denoted as... , The ability of a building facade or roof material to absorb solar radiation energy can be determined based on the material's color and surface properties; for example, light-colored walls can be... Ordinary concrete exterior walls can be removed Dark-colored roofing is acceptable. .

[0034] (3) The humidity-corrected heating contribution is calculated based on the outdoor relative humidity and outdoor dry-bulb temperature. The humidity-corrected heating contribution is used to characterize the enhancement effect of latent heat load on cooling demand under high temperature and high humidity conditions. Among them, the impact of outdoor relative humidity on the total energy consumption of buildings is usually weaker in low temperature environments than in high temperature environments. Therefore, this invention only enhances the humidity effect when the outdoor dry-bulb temperature is higher than the humidity correction start temperature.

[0035] Among them, the humidity correction start temperature is , The temperature threshold used to define when humidity correction begins to have a significant effect can be taken as follows: to The humidity correction intensity factor is , The strength of the contribution of outdoor relative humidity to the equivalent outdoor thermal disturbance index can be taken as... to .when Not higher than At that time, the contribution of humidity correction to temperature rise was taken ;when Higher than At this time, the contribution of humidity correction to temperature increases synchronously with the outdoor relative humidity and the magnitude of the exceedance of the humidity correction activation temperature. By introducing humidity correction only in the high-temperature range, it is possible to avoid erroneously amplifying the impact of cooling load in low-temperature, high-humidity scenarios.

[0036] (4) Combine the outdoor dry-bulb temperature, the solar radiation-adjusted warming contribution, and the humidity-corrected warming contribution to obtain the equivalent outdoor temperature. Then, subtract the equivalent outdoor thermal disturbance index from the building equilibrium temperature. The building equilibrium temperature is denoted as [missing information]. , Used to characterize outdoor reference temperature when no significant cooling or heating is required, can be taken as... to . No. Equivalent outdoor thermal disturbance index at each time step It can be calculated as follows: in, Indicates the first The equivalent outdoor thermal disturbance index for each time step refers to the signed external thermal excitation characteristics obtained by integrating outdoor dry-bulb temperature, total solar radiation intensity, wind speed, outdoor relative humidity and building equilibrium temperature. It is used to characterize the direction and intensity of thermal disturbance of the outdoor environment relative to the building equilibrium state. This represents the stability constant of the heat transfer denominator, used to prevent the denominator from being too small; it can be taken as... ; This indicates that the larger value is used in the calculation to ensure that the humidity correction only takes effect on the high-temperature side.

[0037] When the outdoor dry-bulb temperature at a certain sampling time is The total solar radiation intensity is Wind speed is The outdoor relative humidity is ,Pick , , , , , The contribution of solar radiation to warming is approximately Humidity correction contributes to warming The equivalent outdoor thermal disturbance index is approximately The high value indicates that the external environment has a strong driving effect on the cooling load at this moment.

[0038] Repeat the above calculation for all time steps within the input history window to obtain the equivalent outdoor thermal disturbance index sequence. , It refers to the A single-channel feature sequence is formed by arranging equivalent outdoor thermal disturbance indices in chronological order, with a dimension of [missing value]. .

[0039] The equivalent outdoor thermal disturbance index does not replace all meteorological fields, but provides a physically meaningful comprehensive external thermal excitation feature; outdoor dry-bulb temperature, total solar radiation intensity, wind speed and outdoor relative humidity can still be retained as basic observation features, so that the model can both utilize engineering priors and learn the residual differences of specific buildings from the data.

[0040] 2.2 Generation of Decoupling Cycle Characteristics between Working Days and Non-Working Days The building's total energy consumption exhibits a clear diurnal periodicity, and the same hour may correspond to completely different levels of human activity and equipment operating patterns on weekdays and non-weekdays. If only hourly numbers are used, the model will struggle to identify these patterns. Point and The periodic proximity relationship between points; if only day type encoding is used, the model is difficult to express the continuous changes within the day. Therefore, this invention uses a fixed harmonic basis to generate intraday periodic features and decouples the weekday and non-weekday periodic patterns through day type symbol modulation. The specific steps are as follows: (1) Parse the hour index and day type code from the timestamp corresponding to each time step within the input history window. Specifically, the hour index is denoted as... , Indicates the first The hourly position of a time step within a day, with values ​​ranging from... to ; Day type encoding is denoted as , Indicates the first The building usage day type corresponding to each time step, weekdays are taken as follows: Pick up on non-working days .

[0041] During the parsing of day type codes, Monday to Friday can be set as working days by default, and Saturday and Sunday can be set as non-working days by default; statutory holidays can be merged into non-working days; if the building has special operating days such as work shift adjustments, special schedules, or exam weeks, the day type code will be corrected according to the building's operating calendar to make the day type code consistent with the actual usage pattern of the building.

[0042] (2) Map the hour index to the intraday cycle angle and calculate the basic intraday cycle component, which includes a sine phase component and a cosine phase component. The sine phase component is used to describe the position of the intraday cycle in one orthogonal direction, and the cosine phase component is used to describe the position of the intraday cycle in another orthogonal direction. The combination of the two can keep the beginning and end of the day continuous in the feature space.

[0043] To calculate the first The basic intraday cycle component of the first time step needs to be analyzed for the second time step. Calculation at each time step and These are respectively represented as the sine phase component and the cosine phase component. Pi is a constant. Represents the sine function; This represents the cosine function. Because... Dot and Points are adjacent in the sine and cosine space; this process avoids the hour numbering from... Jump to This results in discontinuous numerical values.

[0044] (3) Construct the day type symbol modulation factor based on the day type code, and generate the day type modulation period component. The day type symbol modulation factor is denoted as... , This refers to the symbolic factor obtained from the day type encoding conversion, used to distinguish the cyclical expression direction of working days and non-working days; it can be set as follows: ,when hour ,when hour .

[0045] By multiplying the daily type symbol modulation factor by the basic intraday cycle component, we obtain the daily type modulation sine component and the daily type modulation cosine component. This allows the same hour to have modulation components in opposite directions on weekdays and non-weekdays. At the same time, it enables the model to directly perceive differences in building usage patterns without having to rely entirely on trainable embeddings to learn daily type differences from samples.

[0046] (4) Concatenate the basic intraday cycle component and the daily type modulation cycle component to obtain the decoupled cycle feature vector of working days and non-working days. , is represented as: in, Indicates the first The decoupled periodic feature vector of each time step between working days and non-working days refers to the deterministic time feature composed of the basic intra-day periodic component and the day-type modulation periodic component, with a dimension of [missing information]. It is used to characterize intraday cycle phase and daily type differences.

[0047] In one embodiment, if the first The time step is a working day Point, then , The daily modulation cycle component is in the same direction as the basic intraday cycle component; if the first The time step is non-working days. Point, then , The daily modulation cycle component is reversed in direction relative to the fundamental intra-day cycle component. Therefore, it is also... With point input, the model can distinguish between high-intensity usage patterns on weekdays and low-intensity usage patterns on non-weekdays.

[0048] Finally, the decoupling cycle feature vectors of all weekdays and non-weekdays within the input history window are arranged in chronological order to obtain the decoupling cycle feature matrix of weekdays and non-weekdays. , It refers to the The time feature matrix is ​​composed of the decoupled periodic feature vectors of working days and non-working days, with dimensions of [missing information]. .

[0049] 2.3 Slow-change trend and rapid-change residual decomposition of indoor thermal and humidity state variables Indoor average temperature and indoor average relative humidity both include a slow baseline formed by the heat storage and release of the building envelope, as well as short-term disturbances caused by air conditioning start-up and shutdown, door and window opening and closing, and changes in occupant activity. If indoor average temperature and indoor average relative humidity are directly input into the model, the model will have difficulty distinguishing between indoor thermal inertia and short-term disturbances. Therefore, this invention adopts an exponential smoothing method based on the building thermal time constant to decompose indoor thermal and humidity state variables into indoor slowly changing trend characteristics and indoor rapidly changing residual characteristics. The decomposition process is as follows: Figure 3 As shown, the specific steps are as follows: (1) Extract the indoor average temperature sequence and indoor average relative humidity sequence from the input history window, and use them as indoor thermal and humidity state variables. Specifically, the index of the indoor thermal and humidity state variables is denoted as... , ;definition Indicates the first The indoor thermal humidity state variable at the th The observations at each time step, i.e. Indicates the first The average indoor temperature at each time step Indicates the first The indoor average relative humidity at each time step.

[0050] After extracting the indoor average temperature and indoor average relative humidity sequences, missing value imputation and outlier pruning are performed on the indoor average temperature and indoor average relative humidity sequences, followed by slow-varying trend and fast-varying residual decomposition. If a certain indoor thermal and humidity state variable is still missing in the first time step of the input history window, the median of that variable under the same hour and day type in the training set can be used to fill it, avoiding recursive initialization failure.

[0051] (2) Calculate the indoor thermal inertia smoothing coefficient based on the building thermal time constant.

[0052] The building thermal time constant is denoted as . , Used to characterize the buffering capacity of building envelope and indoor heat capacity to changes in indoor thermal and humidity conditions; units and sampling intervals. Consistent (in minutes), can be set according to building type, for example, light structures can use [a specific setting]. Minutes, typical office building can be rented Minutes, heavy structure available Minutes. The indoor thermal inertia smoothness coefficient is denoted as... , The proportion used to control the writing of the current observation value into the slow-varying trend component is calculated as follows: In the formula, This represents the natural exponential function. The larger the building thermal time constant, the smaller the indoor thermal inertia smoothing coefficient, indicating that the slow-varying trend component is less sensitive to changes in a single sampling point; the smaller the building thermal time constant, the larger the indoor thermal inertia smoothing coefficient, indicating that the slow-varying trend component can respond to changes in the current observation value more quickly.

[0053] (3) For each indoor thermal and humidity state variable, the slow-varying trend component is calculated recursively, and the slow-varying trend component is denoted as... , It refers to the first The indoor thermal humidity state variable at the th The slow-changing trend component of each time step serves as the baseline of the indoor state after indoor thermal inertia smoothing, reflecting the slow migration of heat storage and release in the building envelope and the indoor thermal and humidity state.

[0054] The recursive calculation process is as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] The indoor thermal humidity state variable at the th The slow-varying trend component at the nth time step is initialized as the indoor thermal-humidity state variable at the nth time step. The observations at each time step, i.e. From the first Starting at the current time step, the current observation is weighted and fused with the slow-varying trend component from the previous time step to obtain the slow-varying trend component for the current time step, represented as: in, Indicates the first The indoor thermal humidity state variable at the th The slow-varying trend component at each time step is used to propagate the historical indoor state baseline to the current time step. This recursive process can mitigate the impact of single-point anomalies and short-term disturbances on the indoor state baseline.

[0055] (4) Calculate the rapidly varying residual components based on the observed values ​​of indoor thermal and humidity state variables and the slowly varying trend components. The rapidly varying residual components are denoted as... , It refers to the first The indoor thermal humidity state variable at the th The rapidly varying residual components at each time step, representing the short-term fluctuations of the indoor thermal and humidity state variable observations after subtracting the slowly varying trend components, are used to reflect rapid changes caused by air conditioning start-up and shutdown, door and window opening, changes in occupant activity, and local disturbances. The formula for calculating the rapidly varying residual components is: like A positive value indicates that the current indoor thermal and humidity state variable is higher than the slow-change trend baseline; if A negative value indicates that the current indoor thermal and humidity state variable is below the slow-change trend baseline; if near This indicates that the current indoor thermal and humidity state variables are basically consistent with the slow-change trend baseline.

[0056] As an example, sampling interval Minutes, building thermal time constant of a typical office building After minutes, the indoor thermal inertia smoothness coefficient is approximately If the average indoor temperature suddenly changes from [a certain point in time]... Rise to The slow-changing trend component absorbs only a small proportion of abrupt changes, while the fast-changing residual component increases significantly, enabling the subsequent fast-response branch to capture the short-term disturbance, while the slow-evolution branch maintains a stable indoor thermal inertia baseline.

[0057] Finally, the slow-varying trend components of indoor average temperature and indoor average relative humidity are concatenated column-wise to obtain the indoor slow-varying trend feature matrix. , This refers to a feature matrix composed of slowly varying trend components of indoor thermal and humidity state variables, with dimensions of [missing information]. Simultaneously, the rapidly varying residual components of indoor average temperature and indoor average relative humidity are concatenated column-wise to obtain the indoor rapidly varying residual feature matrix. , It refers to the feature matrix composed of the rapidly varying residual components of indoor thermal and humidity state variables, with dimensions of 1. .

[0058] After completing the decomposition of slow-varying trends and fast-varying residuals, the indoor average temperature and indoor average relative humidity are no longer directly input into subsequent networks as undecomposed raw indoor thermal and humidity state variables, avoiding feature redundancy caused by repeated input of the same source information. The indoor slow-varying trend feature matrix is ​​used for the slow evolution branch, and the indoor fast-varying residual feature matrix is ​​used for the fast response branch, so that the two types of indoor state information with different physical meanings have different processing paths in the model structure.

[0059] 2.4 Reconstructing the Building Energy Consumption Feature Matrix To enable the subsequent dual-physical-branch temporal coding network to simultaneously receive basic observation information and physical prior information, this invention performs column-level concatenation of basic building observation features, equivalent outdoor thermal disturbance index sequences, weekday and non-weekday decoupled periodic feature matrices, indoor slow-varying trend feature matrices, and indoor fast-varying residual feature matrices, and standardizes continuous features to obtain a reconstructed building energy consumption feature matrix. The specific steps are as follows: (1) Constructing the basic building observation feature matrix Basic building observation feature matrix It refers to a feature matrix composed of original observation fields that have not been physically decomposed and have a direct effect on the prediction of total building energy consumption, with dimensions of [missing information]. ;in, This represents the number of feature channels in the basic building observation feature matrix.

[0060] The basic building observation feature matrix includes outdoor dry-bulb temperature, total solar radiation intensity, wind speed, outdoor relative humidity, lighting power density, equipment power density, personnel density, day type code, and holiday code. Indoor average temperature and indoor average relative humidity are not included in the basic building observation feature matrix because they have already been decomposed into an indoor slow-varying trend feature matrix and an indoor fast-varying residual feature matrix.

[0061] (2) The equivalent outdoor thermal disturbance index sequence, the decoupling period feature matrix of working days and non-working days, the indoor slow-change trend feature matrix and the indoor fast-change residual feature matrix are organized into a feature matrix with the same time length as the basic building observation feature matrix.

[0062] Among them, the equivalent outdoor thermal disturbance index sequence The dimension is Weekday and Non-Workday Decoupling Cycle Feature Matrix The dimension is Indoor slow-change trend characteristic matrix The dimension is Indoor rapid variation residual characteristic matrix The dimension is If any matrix has a different number of rows due to time alignment or sample truncation... Then, the time axis of the basic building observation feature matrix is ​​used as the reference for re-truncation or completion to ensure that the first digit of all matrices is correct. Each row corresponds to the same sampling time. Furthermore, the day-type encoding sequence and the holiday encoding sequence are each organized into a dimension of... The discrete characteristic matrices are denoted as follows: and .

[0063] (3) Standardize the continuous features by constraining the training set statistics. The continuous features include outdoor dry-bulb temperature, total solar radiation intensity, wind speed, outdoor relative humidity, lighting power density, equipment power density, personnel density, equivalent outdoor thermal disturbance index, indoor slow-change trend features and indoor fast-change residual features.

[0064] During processing, only the training samples are used to calculate the training set mean and standard deviation for each continuous feature channel; the same training set mean and standard deviation are used to standardize the training samples, validation samples, test samples, and online prediction samples. If the training set standard deviation of a certain continuous feature channel is less than... Then replace the standard deviation of the training set with To avoid division by zero errors, discrete features such as day type codes and holiday codes are not continuously standardized and can be retained as integer codes, or input into the embedding layer of subsequent networks.

[0065] (4) The basic building observation feature matrix, the equivalent outdoor thermal disturbance index sequence, the weekday and non-weekday decoupling period feature matrix, the indoor slow-varying trend feature matrix, and the indoor fast-varying residual feature matrix are column-level spliced ​​according to the feature channel direction to obtain the reconstructed building energy consumption feature matrix. , is represented as: in, The reconstructed building energy consumption feature matrix refers to the model input matrix after physical prior injection, fast and slow decomposition of indoor thermal and humidity states, and column-level stitching, with dimensions of [missing information]. ;in, This represents the number of feature channels in the reconstructed building energy consumption feature matrix, used to characterize the number of input features contained in each time step; This represents a column-level concatenation operator, used to merge multiple feature matrices with the same time length according to the feature channel direction.

[0066] The reconstructed building energy consumption feature matrix includes basic observation features, equivalent outdoor thermal disturbance index, deterministic periodic prior, indoor slow-varying trend features, and indoor fast-varying residual features. It can inject features with clear physical meaning into the network input, so that the subsequent model does not have to rely entirely on data-driven methods to learn the relationship between external thermal disturbance, daily type periodic differences, and indoor thermal inertia decomposition, thereby improving the training stability and cross-building prediction ability in small sample scenarios.

[0067] 3. Construction of a dual-physical-branch temporal coding network Building total energy consumption forecasting relies on both the short-term transmission of external disturbances and the slow evolution of internal states. External meteorological changes, solar radiation variations, and rapidly changing indoor residuals usually have a rapid impact on short-term load changes; while indoor slow-changing trends, occupancy density, equipment power density, and cyclical usage patterns usually have a slower impact on the energy consumption baseline. If a single time-series coding network is used to process all features, it is easy for rapid disturbances to be smoothed by long-term states, or for the slow baseline to be interfered with by local noise.

[0068] This invention divides the reconstructed building energy consumption feature matrix into a fast response feature group matrix and a slow evolution feature group matrix, respectively inputting external disturbance fast response branches and internal inertia slow evolution branches. Then, through a fast-slow branch mutual attention fusion module, it outputs the predicted value of the future total building energy consumption. This prediction process is as follows: Figure 4 As shown, the specific steps are as follows: 3.1 Construction of a rapid response branch for external disturbances The external disturbance rapid response branch is used to handle external meteorological disturbances and short-term indoor fluctuations. This branch adopts a causal dilated convolution structure to capture short- to medium-term disturbance patterns without using future information. The specific steps are as follows: (1) From the reconstruction of the building energy consumption characteristic matrix Extracting fast response feature set matrix .

[0069] Fast response feature group matrix This refers to an input matrix composed of feature channels that exhibit significant short-term changes and have a direct impact on rapid fluctuations in total building energy consumption, with dimensions of [missing information]. ;in, This represents the number of feature channels in the fast response feature set matrix. The fast response feature set matrix includes the equivalent outdoor thermal disturbance index, outdoor dry-bulb temperature, total solar radiation intensity, wind speed, outdoor relative humidity, rapid variation residual components of indoor average temperature, and rapid variation residual components of indoor average relative humidity. These features can reflect rapid events such as abrupt changes in solar radiation, wind speed changes, enhanced high temperature and humidity, air conditioning start-up and shutdown, and local indoor disturbances, and are suitable for capturing local temporal patterns using convolutional structures.

[0070] (2) Input the fast response feature group matrix into the fast response temporal convolutional network.

[0071] Fast-response temporal convolutional networks are constructed by stacking causal dilated convolutional blocks, enabling the first... The branch output at the time step only depends on the . The historical input at each time step and before it, independent of the first time step The data is obtained after a certain time step, thus conforming to the temporal causal constraints of the prediction task.

[0072] A fast-response temporal convolutional network can be set up with 3 layers of causal dilated convolutional blocks, with the dilation rate of each layer set to a different value. , and The kernel length is taken as The number of output channels for each layer is taken as follows .in, This represents the hidden state dimension of the fast response, used to limit the length of the output vector at each time step of the fast response branch. It can take the following values: , or Causal dilated convolutions enable networks to cover a longer range of historical perturbations with fewer layers by expanding the sampling interval in the historical direction.

[0073] When the kernel length is The expansion rates are in the following order: , and Then, a fast-response temporal convolutional network can cover approximately The historical range of each sampling point; when the sampling interval is At minutes, corresponding to approximately The minute-long historical disturbance range is suitable for capturing the impact of rapid increases in solar radiation, sudden changes in wind speed, and increased rapid indoor residuals on the future total energy consumption of buildings.

[0074] (3) Gated activation and residual connections are performed in each causal dilated convolution block. Specifically, the input of the same layer is processed by candidate feature convolution and gated feature convolution respectively; the output of the candidate feature convolution is processed by the hyperbolic tangent activation function to obtain candidate perturbation features; the output of the gated feature convolution is processed by the sigmoid activation function to obtain gate weights; then the candidate perturbation features are multiplied element-wise by the gate weights to obtain the gated perturbation output. In specific implementation, this process can be expressed as: in, This represents the input to the current convolutional block. Represents candidate feature convolution. Represents gated feature convolution. This represents the hyperbolic tangent activation function. This represents the Sigmoid activation function. This indicates element-wise multiplication. The output of the gated perturbation refers to the perturbation feature obtained by multiplying the candidate perturbation feature by the gate weight element by element, after information filtering.

[0075] Then, the gated perturbation output is added to the residual of the layer's input to obtain the layer's output. When the number of input channels and the number of output channels of the layer are different, the following method is used: One-dimensional convolution maps the input channels before summing the residuals. In practice, this process can be represented as: in, Indicates the original input The processing result: If the number of input and output channels of this layer is the same, then it is... It itself; if it is inconsistent, then it is a contradiction. conduct The result after one-dimensional convolution mapping; This represents the final output of the current causal dilated convolution block, which refers to the residual connection result obtained by adding the gated perturbation output to the input of this layer after possible channel mapping.

[0076] During convolution, gated activation can suppress short-term noise that is independent of changes in the building's total energy consumption, and residual connections can maintain training stability and reduce the risk of gradient decay caused by multi-layer convolution.

[0077] (4) Complete the calculation of all causal dilated convolution blocks in sequence to obtain the fast response hidden state sequence. Fast response to hidden state sequences This refers to the time-series feature matrix of the fast response branch output of external disturbances, with dimensions of [missing information]. It is used to characterize the response characteristics of external disturbances and indoor short-term fluctuations at each time step within the input history window.

[0078] The external perturbation fast response branch does not perform uniform convolution on all features, but instead specifically processes the fast response feature group matrix. This isolates the short-term perturbation path from the mixed input, making the model more sensitive to sudden changes in total solar radiation intensity, wind speed variations, rapid increases in the residuals of indoor average temperature and indoor average relative humidity, thereby improving short-term predictive response capabilities. It is a temporal convolutional network composed of multiple layers of causal dilated convolutional blocks. Its input is the fast response feature group matrix. This matrix contains rapidly changing features such as the equivalent outdoor thermal perturbation index, outdoor dry-bulb temperature, and total solar radiation intensity. The core of the network structure consists of several cascaded causal dilated convolutional blocks. Each layer executes a gated activation mechanism: the input first passes through "candidate feature convolution" and "gated feature convolution" in parallel. The former is activated by the hyperbolic tangent function to obtain candidate perturbation features, while the latter is activated by the sigmoid function to obtain gate weights. These two convolutions are multiplied element-wise to achieve feature selection. Then, this result is added to the residual of the input to that layer after possible channel mapping, and this is used as the output of that layer. By stacking convolutional blocks with different dilation rates, this branch can cover a relatively long time-range perturbation history without violating temporal causality, ultimately outputting a fast-response hidden state sequence. .

[0079] 3.2 Construction of Internal Inertial Slow Evolution Branches The internal inertial slow evolution branch is used to handle the indoor thermal and humidity baseline, personnel activity patterns, equipment operating levels, and deterministic periodic priors. This branch uses a gated cyclic unit with day-type modulation, enabling the hidden state update intensity to adaptively change according to the differences in operation between weekdays and non-weekdays. The specific steps are as follows: (1) From the reconstruction of the building energy consumption characteristic matrix Extracting the slow-evolution feature set matrix Japanese type encoding sequence Among them, the slow evolution feature group matrix This refers to an input matrix composed of feature channels that exhibit relatively stable changes and reflect the baseline of energy consumption within a building, with dimensions of [missing information]. ; This represents the number of feature channels in the slow-evolution feature group matrix. Furthermore, the day-type encoding sequence... This refers to the sequence obtained by arranging the day type codes of each time step within the input history window in chronological order, with a dimension of [missing information]. .

[0080] The slow evolution feature matrix includes an indoor slow change trend feature matrix, lighting power density, equipment power density, personnel density, and a weekday and non-weekday decoupling cycle feature matrix. These features can reflect the baseline of thermal and humidity conditions inside the building, the intensity of personnel activity, the level of equipment use, and the intraday cycle pattern, and are suitable for retaining long-term state trajectories by a cyclical structure.

[0081] (2) Convert the day type encoding into a day type embedding vector, denoted as . , It refers to the first The day type embedding vector for each time step is a continuous vector obtained by querying the trainable embedding table using the day type encoding. It is used to provide the gated loop unit with information on the difference in state updates between working days and non-working days.

[0082] In practical implementation, a day type embedding table can be set up with two embedding items. The first embedding item corresponds to weekdays, and the second embedding item corresponds to non-weekdays. The embedding dimension can be selected from... , or The day-type embedding vector does not replace the weekday / non-weekday decoupling periodic feature matrix. The weekday / non-weekday decoupling periodic feature matrix is ​​used to provide a fixed-period prior, while the day-type embedding vector is used to provide trainable hidden state update modulation. For example, for weekday mode, the model may learn an embedding vector that makes the update gate tend to write more current input information in order to quickly track changes in people and equipment. For non-weekday mode, the embedding vector may make the update gate focus more on preserving historical states, making the inertial baseline more stable. The two have different functions.

[0083] (3) Input the slow evolution feature group matrix into the gated cyclic unit with day type modulation.

[0084] Specifically, a modulation bias generated by a day-type embedding vector is added to the update gate of the gated loop unit, so that weekdays and non-weekdays have different historical state retention ratios and current input write ratios. The update gate can be represented as: in, Indicates the first The slow evolution feature set vector at each time step refers to the slow evolution feature set matrix. The OK; Indicates the first The slow evolution of hidden states at each time step; Indicates the first The slow evolution hidden state at each time step. Initial slow evolution hidden state. It can be set to an all-zero vector or a trainable initial vector; Indicates the first The update gate vector at each time step is used to control the fusion ratio of historical information and current input information in the slow-evolution hidden state; This indicates updating the gate weight matrix, which is a trainable parameter. This indicates updating the gate bias vector, which is a trainable parameter; represents the day type modulation matrix, used to map the day type embedding vector to the update gate bias increment, and is a trainable parameter; Indicates will and Perform vector concatenation; This represents the Sigmoid activation function, used to constrain the update gate vector to... arrive Within the range.

[0085] Compared to regular update gates In comparison, this design adds This invention introduces a dynamic bias based on day type encoding, enabling the state update mechanism of the gated recurrent unit to perceive two distinct building operation modes: "weekdays" and "non-weekdays." Therefore, this invention eliminates the need to construct two separate models or branches, and avoids simply using day type as a common feature input. Within a unified recurrent neural network structure, it switches information flow modes based on day type, allowing the network to adaptively adjust its "memory" strength when learning the long-term dynamics of the building energy consumption inertia baseline. This more accurately characterizes the evolution of energy consumption baselines under different day types, enhancing the model's expressive power and cross-scenario generalization ability.

[0086] (4) Obtain the reset gate, candidate hidden state and current slow-evolution hidden state according to the standard calculation method of the gated loop unit, and output the slow-evolution hidden state sequence in chronological order. Slow-evolving hidden state sequence This refers to the temporal feature matrix output by the internal inertial slow evolution branch, with dimensions of... ; This represents the hidden state dimension of slow evolution, which can be taken as... , or .

[0087] The internal inertial slow evolution branch is used to calculate the update gate with day-type modulation. Subsequently, its subsequent processing flow strictly follows the standard structure of the gated loop unit, and the specific implementation steps are as follows: (I) Calculate the reset gate : will the first Slow evolution feature vectors at each time step Hidden state of slow evolution from the previous time step Perform vector concatenation; then, the concatenated vector is passed to a trainable weight matrix. Multiply and add the bias vector Then, the Sigmoid activation function is input to obtain the reset gate vector. The purpose of the reset gate is to determine how much past hidden state information needs to be ignored when calculating candidate hidden states.

[0088] (II) Calculate the candidate hidden state Use the reset door calculated in the previous step. right Information filtering, i.e., calculation Then, The vectors are concatenated with the filtered hidden states and then processed using a trainable weight matrix. and bias vector Perform a linear transformation; finally, input the result into the hyperbolic tangent activation function to obtain the candidate hidden states. This state includes the current input. And the historical information that is selectively retained by the reset door.

[0089] (III) Calculate the final hidden state Update gate based on day type modulation The hidden state of the previous time step and candidate hidden state Perform linear interpolation fusion to obtain the final slow evolution hidden state at the current time step. Update Gate Each element controls the retention ratio of historical states and candidate states. When When a certain dimension is close to 1, the model tends to retain more candidate information at the current moment; when it is close to 0, it tends to retain more historical states.

[0090] During model updates, the personnel density and equipment power density of office buildings typically change frequently on weekdays. The update gate with day type modulation can learn a higher current input write ratio, enabling the slow-evolving hidden state to respond more quickly to changes in weekday operations. On non-weekday low-load periods, the changes are typically more stable. The update gate with day type modulation can learn a higher historical state retention ratio, reducing the impact of accidental disturbances on the internal inertial baseline.

[0091] It is important to note that day-type modulation only applies to the update gate; the reset gate and candidate hidden states still employ the standard structure of gated loop units. Based on this, while maintaining a simple network structure, the slow evolution branch can be equipped with differentiated state updates for weekdays and non-weekdays, thus more accurately representing the operational patterns of the building's internal energy consumption baseline.

[0092] In this stage, the core of the internal inertial slow evolution branch is a gated recurrent unit with day-type modulation, whose input is the slow evolution feature set matrix. Japanese type encoding sequence The processing flow is as follows: First, convert the discrete day type encoding into a continuous day type embedding vector. Then, in the standard update gate calculation of the gated recurrent unit, an additional step is added, consisting of a day-type embedding vector. Through the modulation matrix The generated bias term dynamically adjusts the mixing ratio of historical states with the current input based on whether it's a weekday or non-weekday. In addition, the calculation of the reset gate, candidate hidden states, and final hidden states all follow the standard structure of the gated recurrent unit. This branch is calculated recursively step-by-step, ultimately outputting the slow-evolutionary hidden state sequence for all time steps. .

[0093] 3.3 Fast and Slow Branch Mutual Attention Fusion Based on Slow Inertial Queries The fast-response hidden state sequence contains external perturbation information from multiple time steps within the input history window, while the slow-evolution hidden state sequence contains inertial evolution information of the building's internal state. If only the terminal hidden states of the two branches are concatenated, it's easy to lose the fast perturbation time segments in the history window that are more crucial for future prediction. Therefore, this invention uses the final hidden state of the slow evolution as inertial query information, performs attention filtering on the fast-response hidden state sequence to obtain a fast perturbation weighted convergence vector, and then fuses it with the final hidden state of the slow evolution to output the predicted value. The specific steps are as follows: (1) Read the fast response hidden state at each time step from the fast response hidden state sequence, and read the terminal slow evolution hidden state from the slow evolution hidden state sequence. Wherein, for the ... A sample, defined Indicates the first The sample at the th The fast response hidden state at each time step is used to characterize the response characteristics of external disturbances and indoor short-term fluctuations at that time step. Indicates the first The sample at the th The slow-evolutionary hidden states at each time step are used to characterize the building's internal inertial baseline at the end of the input history window.

[0094] in, The output of the fast response branch for external disturbances is obtained, and the first... The fast response feature set matrix of each sample is input to the fast response branch under external perturbation, and its output is the fast response hidden state sequence. In the middle, the first The vector at each time step is... ; Obtained from the output of the internal inertial slow evolution branch, the first... The slow evolution feature group matrix and day type encoding sequence of each sample are input into the internal inertial slow evolution branch, and its output is the slow evolution hidden state sequence. In the middle, the last one (the) The vector of (number) time steps is .

[0095] (2) Using the slow-evolution final hidden state as the query information and the fast-response hidden state as the candidate perturbation information, calculate the attention score for each historical time step. The attention score is denoted as... , It refers to the first The sample at the th The degree of matching between the fast-response hidden state and the slow-evolution final hidden state at each time step is used to measure the importance of that historical perturbation time step for predicting future building total energy consumption. The attention score can be calculated using an additive attention approach, expressed as: in, The attention scoring vector is used to map the intermediate attention representation to a scalar score and is a trainable parameter. This represents the query projection matrix, used to transform the final hidden state of slow evolution, and is a trainable parameter. The key projection matrix is ​​used to transform the fast response hidden state and is a trainable parameter. This represents the attention bias vector, which is a trainable parameter. This represents the hyperbolic tangent activation function. To ensure dimensionality compatibility, it can be set to... or through and The matrix projects both onto the same dimensional space.

[0096] (3) Normalize all attention scores within the input history window to obtain attention weights, and use these attention weights to perform a weighted summation of the fast response hidden state sequence. The attention weights are denoted as... , Indicates the first The sample at the th The contribution ratio of the fast response hidden state to the predicted output at each time step, and the sum of the attention weights at each time step are: .

[0097] Specifically, this includes, for Performing Softmax normalization yields... Then, the fast response hidden states at each time step are summed according to their corresponding attention weights to obtain the fast perturbation weighted convergence vector. , It refers to the first The fast perturbation weighted convergence vector of each sample represents the comprehensive characteristics of historical fast perturbations formed after slow inertial query filtering.

[0098] When the total solar radiation intensity rises rapidly, the equivalent outdoor thermal disturbance index increases, and the indoor average temperature rapidly changes to a positive residual near the end of the input history window, the matching degree between the fast response hidden state and the slow evolution final hidden state at these time steps is relatively high. The attention weight is increased accordingly, making the model pay more attention to the driving effect of recent external thermal disturbances on future cooling loads.

[0099] (4) The fast perturbation weighted convergence vector and the slow evolution final hidden state are concatenated for feature extraction, and the predicted total energy consumption of the future building is obtained through the output layer. The predicted total energy consumption of the future building is denoted as... , Indicates the first The future number corresponding to the sample Predicted total energy consumption power of buildings.

[0100] The specific process is as follows: First, and Concatenate the features along their respective dimensions to obtain a fast-slow fused feature vector; then input the fast-slow fused feature vector into the fully connected output layer to obtain... The weights and biases of the fully connected output layer are trainable parameters that are automatically updated during the training process.

[0101] The fast-slow branch mutual attention fusion is not simply an averaging of the fast response branch and the slow evolution branch, nor does it only use the end state. Instead, it actively filters more critical time segments from historical rapid disturbances by utilizing the building's internal inertial baseline. Based on this, it can simultaneously preserve the long-term building energy consumption baseline and the impact of short-term external disturbances, improving the physical interpretability and prediction accuracy of future building total energy consumption forecasts.

[0102] The dual-physical-branch temporal coding network consists of three parts: an external disturbance fast response branch, an internal inertial slow evolution branch, and a fast-slow branch mutual attention fusion module. The external disturbance fast response branch receives the fast response feature set matrix and extracts the temporal features of external disturbances and short-term indoor fluctuations through stacked causal dilated convolutional blocks. The internal inertial slow evolution branch receives the slow evolution feature set matrix and day-type encoding, and extracts the evolution features of the building's internal inertial baseline through gated recurrent units with day-type modulation. The fast-slow branch mutual attention fusion module uses the final hidden state of the slow evolution branch as a query, applies attention weights to the output of the fast response branch at all time steps, fuses the fast and slow temporal features, and finally obtains the predicted value through a fully connected output layer.

[0103] To analyze the distribution of mutual attention weights between fast and slow branches, Figure 5 The bar chart illustrates the distribution of attention weights calculated for the fast response hidden state sequence using the final hidden state of the slow evolution as query information in the fast-slow branch mutual attention fusion module. The horizontal axis represents the time step index, which is dimensionless; the vertical axis represents the attention weight, which is also dimensionless. The attention mechanism can automatically filter the time segments in the historical window that are more critical for predicting the total energy consumption of future buildings. This demonstrates that when significant external disturbances occur near the end of the historical period, the attention weight of the corresponding time step will increase significantly, thus injecting rapid disturbance information into the final prediction in a targeted manner.

[0104] 4. Robust Regression Loss Function Setting and End-to-End Training Outliers may exist in the total building energy consumption data due to sensor malfunctions, temporary peak loads, manual intervention, special operation during holidays, and sudden equipment start-ups and shutdowns. If ordinary mean squared error loss is used, outliers will exert an excessive pull on the parameter update direction, reducing the fitting effect of normal operation samples.

[0105] This invention employs a robust regression loss function to train a dual-physical-branch temporal coding network, maintaining a squared penalty in the small residual interval and a linear penalty in the large residual interval. The specific steps are as follows: (1) Input the training samples into Part 2 to obtain the corresponding reconstructed building energy consumption feature matrix, and then input the reconstructed building energy consumption feature matrix into Part 3 to obtain the predicted value of the future total building energy consumption power. Specifically, for the first part... A training sample, defined Indicates the future number Step on the actual value of total building energy consumption. Indicates the future number Predicted total energy consumption of buildings.

[0106] Each training batch contains One training sample; This represents the number of samples in the training batch, which can be taken as... , or Each training sample in the training batch undergoes the same physical prior injection, fast response branch, slow evolution branch, and fast-slow branch mutual attention fusion process.

[0107] (2) Calculate the prediction residual based on the actual value of the total energy consumption of the future building and the predicted value of the total energy consumption of the future building, and select the loss form based on the robust switching threshold.

[0108] Wherein, the robust switching threshold is denoted as , The boundary used to control the switching between the squared penalty and the linear penalty can be taken as the standard deviation of the total building energy consumption power in the training set. The factor can also be set based on the prediction error distribution of the validation set. When the predicted residuals are within the normal range, a squared penalty is applied to enable the model to fit normal samples with fine granularity; when When the prediction residual is large, it may correspond to abnormal operation or accidental peak. Linear penalty is used to reduce the rate of loss growth and avoid abnormal samples from excessively affecting the direction of model parameter update.

[0109] (3) Calculate the robust regression loss for all samples within the training batch, and take the average as the training target. Robust regression loss It can be represented as: in, This represents the robust regression loss value for the training batch, used to measure the deviation between the predicted and actual total building energy consumption, and serves as the end-to-end training objective. A squared penalty for small residual intervals improves the fitting accuracy for normal samples, while a linear penalty for large residual intervals suppresses the interference of outliers on the training process.

[0110] (4) Update model parameters end-to-end using mini-batch gradient descent. In one implementation, the optimizer is the Adam optimizer, with an initial learning rate of... The maximum number of training rounds is taken as to Batch size After each training round, the validation set robust regression loss is calculated on the validation samples; if the validation set robust regression loss is continuous... If the loss of the validation set is not reduced, training will be stopped early, and the model parameters at which the robust regression loss of the validation set is minimized will be saved.

[0111] The gradient norm can be pruned during training, for example, by setting the upper bound of the gradient norm to a certain value. To reduce the risk of gradient explosion during training of recurrent structures; alternatively, Dropout can be added after fast response hidden state sequences and slow evolution hidden state sequences, with a dropout rate of [missing information]. to This is to reduce the risk of overfitting.

[0112] To demonstrate the accuracy of the model's predictions, a comparison was made between the predicted and actual total energy consumption of future buildings. Figure 6 The actual and predicted values ​​(vertical axis unit: kW) of several test samples are displayed using a line graph with scatter plots, and the horizontal axis represents the test sample index. The predicted values ​​generally follow the trend of the actual values, although there is some deviation, but they can capture the direction of power increase and decrease.

[0113] 5. Online prediction and output of total building energy consumption After model training is complete, the trained dual-physical-branch temporal coding network is deployed into the building energy management system. During online operation, the system generates an online reconstructed building energy consumption feature matrix using the same data fields, sampling intervals, time alignment, physical prior calculation methods, and standardized statistics as in the training phase, and outputs the predicted total energy consumption of the building in the future. The specific steps are as follows: (1) Extract the current input historical window from the online building operation data stream to obtain the online original building energy consumption prediction sample. .

[0114] Among them, the online original building energy consumption prediction sample This refers to the length before the current prediction time. A multi-source building operation data window is used to perform online prediction of total building energy consumption. It includes fields consistent with those used in the training phase, including historical values ​​of total building energy consumption, outdoor dry-bulb temperature, total solar radiation intensity, wind speed, outdoor relative humidity, indoor average temperature, indoor average relative humidity, lighting power density, equipment power density, occupancy density, and timestamp-related fields. If weather forecast data is needed to predict future time periods, then future weather data is only used to construct external predictive auxiliary features; the basic input of the current method remains the data already observed within the current input history window.

[0115] (2) Online original building energy consumption prediction sample The physical prior injection and feature reconstruction are performed exactly the same as in the training phase. Specifically, following the process described in Part 2, the equivalent outdoor thermal disturbance index sequence is first calculated, then the decoupled periodic feature matrix for weekdays and non-weekdays is generated, followed by the generation of the indoor slow-varying trend feature matrix and the indoor fast-varying residual feature matrix. Finally, column-level stitching and standardization are completed to obtain the online reconstructed building energy consumption feature matrix. , This refers to the model input matrix corresponding to the current online prediction window, with dimensions of [missing information]. .

[0116] The online prediction phase must use the mean of continuous features, standard deviation of continuous features, outlier clipping boundaries, building thermal time constant, and physical prior parameters saved during the training phase. Standardized parameters must not be recalculated based on a single online window, otherwise it will disrupt the consistency of feature scale between the training and online prediction phases.

[0117] (3) Reconstruct the building energy consumption characteristic matrix online. The trained dual-physical-branch temporal coding network is input and sequentially passed through the fast response branch for external perturbations, the slow evolution branch for internal inertia, and the fast-slow branch mutual attention fusion module to obtain the online prediction of the total energy consumption of future buildings. , This refers to the future prediction window corresponding to the current online prediction window. The predicted total energy consumption of a building is used by the building energy management system to perform load warnings, optimize air conditioning control, make demand response decisions, or identify energy consumption anomalies.

[0118] (4) Output prediction results and operation prompts based on the online prediction of the total energy consumption of the building in the future. Specifically, if the online prediction of the total energy consumption of the building in the future exceeds the preset power alarm threshold, a high load risk prompt will be output; if the online prediction of the total energy consumption of the building in the future increases relative to the current total energy consumption of the building, the growth rate will exceed the preset growth threshold, a rapid load increase prompt will be output; if multiple online prediction windows show that the total energy consumption of the building in the future is at a high level, a continuous high load prompt will be output.

[0119] For example, if the building demand alarm threshold is Model output Then the building energy management system outputs the future High load risk warning within minutes; if three consecutive online forecast windows predict the future... The building's total energy consumption per minute is higher than If the system continuously experiences high load, a warning will be displayed, and it will be recommended to adjust the air conditioning settings, optimize the equipment start-up and shutdown sequence, or implement peak shaving strategies in advance.

[0120] It is important to note that the online prediction process maintains consistency with the training process in feature construction, physical prior calculation, and standardization, ensuring that the model can stably receive input features with the same distribution during deployment as during training. By employing an equivalent outdoor thermal disturbance index, decoupled weekday and non-weekday periodic features, fast and slow decomposition of indoor thermal and humidity conditions, and a dual-physical-branch temporal coding network, this invention can simultaneously express the impact of rapid external disturbances, slow internal inertia, and differences in usage cycles on the total building energy consumption, thereby improving the accuracy, stability, and interpretability of building energy consumption time-series predictions.

[0121] Example 2 A smart building energy consumption prediction system based on machine learning, specifically comprising: Data acquisition module: used to collect multi-source building operation data, construct original building energy consumption prediction samples, and divide them into training samples, validation samples, and test samples; Feature reconstruction module: used to construct equivalent outdoor thermal disturbance index, weekday and non-weekday decoupled periodic features, indoor slow-change trend features and indoor fast-change residual features, which are then concatenated with the basic building observation feature matrix to obtain the reconstructed building energy consumption feature matrix; Model building module: used to build a dual-physical-branch temporal coding network and train it using a robust regression loss function and gradient descent method; Prediction module: Deploys the trained dual-physical-branch temporal coding network, collects data online and makes predictions, and outputs running prompts based on the prediction results and set thresholds.

[0122] Example 3 A computer-readable storage medium storing a computer program that can be executed by a processor to implement a deep learning-based method for detecting abnormal vibrations in the joints of an industrial robot.

[0123] Readable storage media include: non-volatile memory: flash memory, ROM, EPROM, EEPROM; volatile memory: random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM); disk storage media: hard disk (HDD), floppy disk; optical storage media: optical disc (CD, DVD, Blu-ray disc), etc.

[0124] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting energy consumption in smart buildings based on machine learning, characterized in that, include: S1. Collect multi-source building operation data, perform time alignment on the multi-source building operation data, construct original building energy consumption prediction samples, and divide all original building energy consumption prediction samples into training samples, validation samples, and test samples. S2. Based on the original building energy consumption prediction sample, construct the equivalent outdoor thermal disturbance index, weekday and non-weekday decoupling cycle characteristics, indoor slow change trend characteristics and indoor fast change residual characteristics. Combine the above physical prior characteristics with the basic observation characteristics to obtain the reconstructed building energy consumption characteristic matrix. S3. A dual-physical-branch temporal coding network is constructed based on the fast response branch for external disturbances, the slow evolution branch for internal inertia, and the mutual attention fusion module between fast and slow branches. S4. Train a dual-physical-branch temporal coding network based on a robust regression loss function, and update the model parameters end-to-end using gradient descent. S5. Deploy the trained dual-physical-branch temporal coding network into the building energy management system for online prediction. The system outputs prediction results and operation prompts based on the total energy consumption power prediction output value.

2. The method for predicting energy consumption in smart buildings based on machine learning according to claim 1, characterized in that, S1 includes: The multi-dimensional building operation data includes: total building energy consumption power sequence, outdoor dry-bulb temperature sequence, total solar radiation intensity sequence, wind speed sequence and outdoor relative humidity sequence, indoor average temperature sequence and indoor average relative humidity sequence, lighting power density sequence, equipment power density sequence and personnel density sequence, hourly index, day type code and holiday code; The multi-dimensional building operation data is time-aligned according to a unified sampling interval, and missing and outlier values ​​are linearly interpolated and outlier pruning is performed. The original building energy consumption prediction samples are constructed according to the input historical window length and prediction step size. All original building energy consumption prediction samples are divided into training samples, validation samples and test samples according to time order.

3. The method for predicting energy consumption in smart buildings based on machine learning according to claim 1, characterized in that, S2 specifically includes: The outdoor dry-bulb temperature sequence, total solar radiation intensity sequence, wind speed sequence, and outdoor relative humidity sequence are extracted from the original building energy consumption prediction sample. The solar radiation-corrected warming contribution and humidity-corrected warming contribution are calculated. The outdoor dry-bulb temperature, solar radiation-corrected warming contribution, and humidity-corrected warming contribution are combined to obtain the equivalent outdoor temperature. The difference between the outdoor dry-bulb temperature and the building equilibrium temperature is then calculated to obtain the equivalent outdoor thermal disturbance index. Parse the hour index and day type code from the timestamp, map the hour index to the intraday cycle angle, calculate the basic intraday cycle component, construct the day type symbol modulation factor based on the day type code, generate the day type modulation cycle component, and concatenate the basic intraday cycle component and the day type modulation cycle component to obtain the decoupled cycle feature vector of working days and non-working days. The indoor average temperature and average relative humidity sequences are extracted as indoor thermal and humidity state variables. The indoor thermal inertia smoothing coefficient is calculated based on the building thermal time constant. The slow-varying trend component is calculated for each indoor thermal and humidity state variable. The fast-varying residual component is calculated based on the observed values ​​of the indoor thermal and humidity state variables and the slow-varying trend component. The slow-varying trend and fast-varying residual of the indoor average temperature and average relative humidity are concatenated column by column to obtain the fast-varying residual component of the indoor average temperature and the feature matrix of the indoor fast-varying residual. The basic building observation features, equivalent outdoor thermal disturbance index sequence, weekday and non-weekday decoupled periodic feature matrix, indoor slow-varying trend feature matrix, and indoor fast-varying residual feature matrix are column-level concatenated, and continuous features are standardized to obtain the reconstructed building energy consumption feature matrix. The basic building observation features refer to the feature matrix composed of original observation fields that have not been physically decomposed and have a direct effect on the prediction of total building energy consumption.

4. The method for predicting energy consumption in smart buildings based on machine learning according to claim 1, characterized in that, The external disturbance fast response branch described in S3 includes: Extract the fast response feature group matrix from the reconstructed building energy consumption feature matrix; The fast response feature group matrix is ​​input into the fast response temporal convolutional network, which is composed of stacked causal dilated convolutional blocks; In each causal dilated convolutional block, gated activation and residual connection are performed. The gated perturbation output is added to the input of that layer by residual addition to obtain the output of that layer. By sequentially performing calculations on all causal dilated convolutional blocks, a fast response hidden state sequence is obtained.

5. The method for predicting energy consumption in smart buildings based on machine learning according to claim 1, characterized in that, The internal inertial slow evolution branch described in S3 includes: Extract the slow-evolution feature group matrix and day type coding sequence from the reconstructed building energy consumption feature matrix; Convert the day type encoding into a day type embedding vector; The slow-evolution feature set matrix is ​​input into a gated recurrent unit with day-type modulation, where the update bias increment is obtained by the day-lightning response embedding increment mapping; The reset gate, candidate hidden state, and current slow-evolution hidden state are obtained according to the standard calculation method of the gated loop unit, and the slow-evolution hidden state sequence is output in chronological order.

6. The method for predicting energy consumption in smart buildings based on machine learning according to claim 1, characterized in that, The fast and slow branch mutual attention fusion module described in S3 includes: Read the fast response hidden state at each time step from the fast response hidden state sequence, and read the terminal slow evolution hidden state from the slow evolution hidden state sequence; The attention score for each historical time step is calculated using the slow-evolution final hidden state as query information and the fast-response hidden state as candidate perturbation information. Normalize all attention scores within the input history window to obtain attention weights, and use these attention weights to perform a weighted summation on the fast response hidden state sequence; The fast perturbation weighted convergence vector is concatenated with the slow-evolving final hidden state, and the predicted total energy consumption of the building is obtained through the output layer.

7. The method for predicting energy consumption in smart buildings based on machine learning according to claim 1, characterized in that, S4 specifically includes: Predicted total energy consumption of future buildings is obtained based on a dual-physical-branch temporal coding network. The prediction residual is calculated based on the actual value of the total energy consumption of the future building and the predicted value of the total energy consumption of the future building, and the loss form is selected based on the robust switching threshold. Calculate the robust regression loss for all samples in the training batch and take the average as the training target; The model parameters are updated end-to-end using mini-batch gradient descent.

8. The method for predicting energy consumption in smart buildings based on machine learning according to claim 1, characterized in that, S5 specifically includes: The trained dual-physical-branch temporal coding network is deployed into the building energy management system; The system processes the acquired data in the same way as in the training phase, and inputs the processed data into the deployed dual physical branch temporal coding network to obtain the online prediction value of the total energy consumption of future buildings. Based on the comparison between the online prediction of the building's total energy consumption and the preset threshold, corresponding operation prompts are output.

9. A smart building energy consumption prediction system based on machine learning, performing the method as described in claims 1-8, characterized in that, include: Data acquisition module: used to collect multi-source building operation data, construct original building energy consumption prediction samples, and divide them into training samples, validation samples, and test samples; Feature reconstruction module: used to construct equivalent outdoor thermal disturbance index, weekday and non-weekday decoupled periodic features, indoor slow-change trend features and indoor fast-change residual features, which are then concatenated with the basic building observation feature matrix to obtain the reconstructed building energy consumption feature matrix; Model building module: used to build a dual-physical-branch temporal coding network and train it using a robust regression loss function and gradient descent method; Prediction module: Deploys the trained dual-physical-branch temporal coding network, collects data online and makes predictions, and outputs running prompts based on the prediction results and set thresholds.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that can be executed by a processor to implement the machine learning-based smart building energy consumption prediction method according to any one of claims 1-8.