Building energy consumption optimization management method and device based on digital twinning
By combining digital twin modeling and load forecasting with multi-objective optimization and rolling solution, and introducing adaptive adjustment, the shortcomings of state prediction, strategy optimization and model adjustment in building energy consumption optimization management are solved, and accurate analysis and continuous optimization are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG BREEZE INTELLIGENT TECH CO LTD
- Filing Date
- 2026-04-08
- Publication Date
- 2026-05-08
AI Technical Summary
Existing building energy consumption optimization management methods have shortcomings in terms of state prediction, strategy optimization, and model adjustment, and lack effective multi-source data processing, twin modeling, control strategy fusion, and model accuracy improvement.
By collecting multi-source sensing data streams for anomaly detection and data alignment, a digital twin model is constructed for load forecasting and multi-objective optimization. Combining rolling solution and adaptive adjustment, error compensation and parameter identification are introduced to achieve accurate analysis and continuous optimization.
It enables precise analysis of building energy consumption optimization management, constructs reliable control strategies, ensures continuous optimization and efficient adjustment of the model, and improves the energy consumption optimization effect.
Smart Images

Figure CN121995771A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, specifically to a building energy consumption optimization management method and device based on digital twins. Background Technology
[0002] Existing building energy consumption optimization and management methods have significant shortcomings. Traditional systems perform poorly in multi-source data processing and twin modeling, failing to effectively predict the state and thus affecting optimization results.
[0003] Furthermore, existing technologies face bottlenecks in optimizing control and policy fusion. Most systems lack robust constraint handling mechanisms and weight allocation strategies, resulting in suboptimal control performance.
[0004] Existing systems have technical shortcomings in model adjustment. They lack in-depth analysis of prediction biases, making efficient parameter updates through online identification difficult and impacting model accuracy. Solving these problems is crucial for improving building energy consumption optimization capabilities. Summary of the Invention
[0005] To address the problems in existing technologies, this application provides a building energy consumption optimization management method and device based on digital twins, which can effectively solve the shortcomings of traditional technologies in terms of state prediction, strategy optimization and model adjustment, and provide technical support for building energy consumption optimization.
[0006] To solve at least one of the above problems, this application provides the following technical solution: Firstly, this application provides a building energy consumption optimization management method based on digital twins, including: Multi-source sensing data streams are obtained by collecting temperature and humidity data, energy consumption data, and personnel density data uploaded by sensors within the building. Anomaly detection and data alignment are performed on the multi-source sensing data streams to obtain synchronized data groups. A digital twin model is constructed based on the synchronized data groups to obtain a twin state vector. The twin state vector is fused with preset forecast data in a time series to generate a prediction input matrix. Load prediction calculations are performed on the prediction input matrix to obtain the load sequence for future periods. Based on the future load sequence, a multi-objective optimization function is constructed to obtain a set of objective equations. Model constraints and physical limit constraints are applied to the set of objective equations to generate a set of constraint conditions. The set of constraint conditions is input into a rolling optimization solver to calculate a multi-scenario control strategy. The multi-scenario control strategy is weighted to obtain a fusion control command sequence. The control parameters of the first time step are extracted from the fusion control command sequence to generate an execution command and send it to the building execution equipment. The actual load value and operating parameters of the execution equipment are collected to obtain a feedback data set. The error between the feedback data set and the predicted load value is calculated to obtain a prediction deviation value. An error compensation model is constructed based on the prediction deviation value to complete the prediction correction. The key parameters of the digital twin model are identified online according to the prediction deviation value to generate an updated parameter set. The updated parameter set is written into the digital twin model to complete the adaptive adjustment.
[0007] Furthermore, it also includes: reading the analog signal output by the sensor through the data acquisition gateway at a preset sampling frequency to obtain the raw signal stream; performing signal separation on the raw signal stream to generate channel data groups; performing signal quality detection on the channel data groups to obtain data reliability indicators; and performing preprocessing on each channel signal based on the data reliability indicators to generate multi-source sensing data streams. Based on the multi-source sensing data stream, the autocorrelation value of the signal is calculated using a sliding window to obtain a correlation feature group. The correlation feature group is then input into an anomaly detector to generate an anomaly label matrix. Anomaly data points are removed from the anomaly label matrix to obtain a valid data group. The time delay deviation between the multi-channel signals is calculated using a timestamp alignment algorithm. Time delay compensation is then performed on the valid data group to generate a synchronization data group.
[0008] Furthermore, it also includes: grouping the synchronous data group according to the building equipment topology to obtain an equipment status table; extracting physical characteristic parameters from the equipment status table to obtain a model parameter group; constructing an equipment performance model based on the model parameter group to obtain a component model set; modularly assembling the component model set with the building physics model to generate a twin state vector; and calculating the system steady-state response based on the twin state vector to obtain the model initial state. The model's initial state and preset forecast data are standardized to obtain a normalized feature set. The normalized feature set is then used to generate a state sequence matrix through a time-series feature extractor. The state sequence matrix is then divided into a sliding window to obtain a sample sequence set. The sample sequence set is then input into a deep prediction network to calculate the load forecast value. Finally, the load forecast value is expanded by time steps to generate a load sequence for future periods.
[0009] Furthermore, it also includes: performing time-scale decomposition on the future load sequence to obtain a multi-period load matrix; constructing a power grid purchase cost function based on the multi-period load matrix to obtain a cost term; mapping the equipment adjustment range to an energy consumption loss function to obtain a loss term; constructing a comfort evaluation function based on indoor environmental parameters to obtain a comfort term; setting adaptive weight coefficients for the cost term, loss term, and comfort term to generate a set of objective equations; and extracting equipment operation boundary conditions based on the set of objective equations to obtain a set of constraint variables. The constraint variable set is matched with the equipment dynamic model to obtain a model constraint group. Equipment physical limits are applied to the model constraint group to generate hard constraints. Environmental comfort constraints are constructed according to preset rules to obtain soft constraints. The hard constraints and soft constraints are fused to generate a constraint condition set. The feasibility of the constraint condition set is verified to obtain a multi-scenario control strategy.
[0010] Furthermore, it also includes: evaluating the target value of the multi-scenario control strategy to obtain a performance index matrix; calculating the scenario priority based on the performance index matrix to obtain a weight distribution map; constructing an adaptive weight function based on the weight distribution map to generate a fusion coefficient group; performing a weighted combination operation on the fusion coefficient group and the multi-scenario control strategy to obtain a fusion control instruction sequence; and performing a timing consistency check on the fusion control instruction sequence to obtain a check result table. Based on the verification result table, the first time step data is extracted from the fusion control instruction sequence to obtain the control parameter group. The control parameter group is then subjected to device constraint verification to generate an execution instruction. The execution instruction is converted into a device control message according to the control protocol. The device control message is then distributed to the corresponding execution device according to the device communication address to complete the instruction issuance.
[0011] Furthermore, it also includes: reading the real-time operating status of the execution equipment through the equipment monitoring interface to obtain a status data stream; parsing the status data stream to obtain a load data group and a parameter data group; cleaning the load data group according to preset rules to generate an actual load value; extracting equipment operating characteristics from the parameter data group to obtain an operating parameter table; and merging the actual load value and the operating parameter table to generate a feedback data group. The actual load values in the feedback data set are aligned with the time window to obtain the measured sequence. The measured sequence and the predicted load values are mapped according to the timestamp to generate data pairs. Based on the data pairs, multi-dimensional error indicators are calculated to obtain error feature vectors. The error feature vectors are weighted and fused to generate prediction deviation values.
[0012] Furthermore, it also includes: performing time-series analysis on the predicted deviation values to obtain a deviation feature group; inputting the deviation feature group into a recurrent neural network to train an error compensation model; generating a prediction correction amount based on the error compensation model to obtain a compensation parameter table; performing threshold screening on the compensation parameter table to obtain effective compensation items; performing correction operations on the effective compensation items and the original predicted values to generate corrected predicted values; and performing parameter sensitivity analysis on the digital twin model based on the corrected predicted values to obtain a sensitivity matrix. Based on the sensitivity matrix, the key parameters of the digital twin model are sorted by importance to obtain a parameter priority table. The prediction deviation values guided by the parameter priority table are mapped to the model parameter space to generate a parameter deviation vector. The parameter deviation vector is used to identify parameters through recursive least squares to obtain an updated parameter set. The updated parameter set is mapped and written into the corresponding position of the digital twin model according to the model structure to complete the adaptive adjustment.
[0013] Secondly, this application provides a building energy consumption optimization management device based on digital twins, comprising: The building data acquisition module is used to collect temperature and humidity data, energy consumption measurement data, and personnel density data uploaded by sensors in the building to obtain a multi-source sensing data stream. The multi-source sensing data stream is subjected to anomaly detection and data alignment to obtain a synchronous data group. A digital twin model is constructed based on the synchronous data group to obtain a twin state vector. The twin state vector is fused with preset forecast data in a time series to generate a prediction input matrix. Load prediction calculation is performed on the prediction input matrix to obtain the load sequence for future periods. The scenario strategy formulation module is used to construct a multi-objective optimization function based on the future time period load sequence to obtain a set of objective equations, apply model constraints and physical limit constraints to the set of objective equations to generate a set of constraint conditions, input the set of constraint conditions into a rolling optimization solver to calculate a multi-scenario control strategy, perform weight allocation on the multi-scenario control strategy to obtain a fusion control command sequence, extract the control parameters of the first time step from the fusion control command sequence to generate an execution command and send it to the building execution equipment; The energy consumption optimization management module is used to collect the actual load value and operating parameters of the execution equipment to obtain a feedback data set, calculate the error between the feedback data set and the predicted load value to obtain a prediction deviation value, construct an error compensation model based on the prediction deviation value to complete the prediction correction, identify the key parameters of the digital twin model online according to the prediction deviation value to generate an updated parameter set, and write the updated parameter set into the digital twin model to complete the adaptive adjustment.
[0014] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the digital twin-based building energy consumption optimization management method.
[0015] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the digital twin-based building energy consumption optimization management method.
[0016] Fifthly, this application provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the aforementioned digital twin-based building energy consumption optimization management method.
[0017] As can be seen from the above technical solution, this application provides a building energy consumption optimization management method and device based on digital twins. Through twin modeling and load forecasting, accurate state analysis is achieved. An optimization mechanism is constructed, combining multi-objective optimization and rolling solution to establish a reliable control strategy. Adaptive adjustment is introduced, and through error compensation and parameter identification, continuous model optimization is ensured. This method effectively solves the shortcomings of traditional technologies in state prediction, strategy optimization, and model adjustment, providing technical support for building energy consumption optimization. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the building energy consumption optimization management method based on digital twins in the embodiments of this application; Figure 2 This is a structural diagram of the building energy consumption optimization management device based on digital twins in the embodiments of this application. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0021] The acquisition, storage, use, and processing of data in this application comply with relevant laws and regulations.
[0022] In view of the problems existing in the prior art, this application provides a building energy consumption optimization management method and device based on digital twins. Through twin modeling and load forecasting, accurate state analysis is achieved. An optimization mechanism is constructed, combining multi-objective optimization and rolling solution to establish a reliable control strategy. Adaptive adjustment is introduced, and through error compensation and parameter identification, continuous model optimization is ensured. This method effectively solves the shortcomings of traditional technologies in state prediction, strategy optimization, and model adjustment, providing technical support for building energy consumption optimization.
[0023] To effectively address the shortcomings of traditional technologies in state prediction, strategy optimization, and model adjustment, and to provide technical support for building energy consumption optimization, this application provides an embodiment of a building energy consumption optimization management method based on digital twins. See [link to embodiment]. Figure 1 The building energy consumption optimization management method based on digital twins specifically includes the following: Step S101: Collect temperature and humidity data, energy consumption data and personnel density data uploaded by sensors in the building to obtain a multi-source sensing data stream. Perform anomaly detection and data alignment on the multi-source sensing data stream to obtain a synchronous data group. Construct a digital twin model based on the synchronous data group to obtain a twin state vector. Perform time-series fusion of the twin state vector and preset forecast data to generate a prediction input matrix. Perform load prediction calculation on the prediction input matrix to obtain the load sequence for future periods. First, data streams from building temperature and humidity sensors, energy consumption metering devices, and personnel counting terminals are input and written into a buffer queue according to a unified sampling period. Then, the data is split into three sub-streams: temperature and humidity, energy consumption, and personnel density. For each sub-stream, amplitude DC removal, out-of-threshold value removal, and gap interpolation are performed, and timestamp drift is calculated at the channel level. Subsequently, cross-channel alignment is completed based on the timestamp mapping relationship, and a multi-source sensing data stream is output as input for anomaly detection.
[0024] Based on the multi-source sensing data stream, autocorrelation and cross-correlation features are calculated using a sliding window approach, and input into an anomaly detector to generate an anomaly label matrix. This matrix records the correspondence between window numbers and channel labels, and is used to remove outliers and trigger local resampling alignment. After removal and compensation, a synchronized data set is obtained, and the start and end times of the window and quality labels are recorded, providing a reliable time period selection basis for subsequent twin modeling.
[0025] Based on the synchronized data set, the building equipment topology is mapped to the equipment status table, and the physical characteristics of the equipment and environmental boundaries are extracted to generate a model parameter set. This model parameter set is then assembled into the building physics model and the equipment performance model to establish a digital twin, and steady-state initial values are obtained, outputting the twin's state vector. This vector is organized in the order of equipment nodes and includes fields such as heat capacity estimation, heat transfer coefficient, and current operating point, which are subsequently used for time-series fusion with forecast data.
[0026] Based on the twin state vector, preset forecast data, including time series of future external weather and usage schedules, is loaded. The two are aligned along the time axis and then standardized, with unified scale and missing bit markers. During fusion, the twin state and forecast features are concatenated at each time step to form a prediction input matrix, while retaining time indices to maintain traceability with the synchronized data set.
[0027] Based on the predicted input matrix, a load prediction network is invoked for forward inference; this network, named Load Time Series Predictor, reads the feature columns of each time step and outputs estimates of cooling load, heating load, and electrical power at the corresponding time, passing step dependencies through the hidden states. To constrain short-term smoothness and peak response, an objective function is introduced for training: Ξ = ρ·E + σ·R, Where Ξ is the single-batch training objective, E is the aggregated time error between prediction and measurement, R is the magnitude penalty of the prediction difference between adjacent time steps, and ρ and σ are non-negative weights used to balance fitting and smoothing. This objective is not calculated at the inference end, but its training output affects the stability of the current inference.
[0028] Based on the inference results of the load time series predictor, the outputs of each time step are aggregated to form the load sequence for the future period. To ensure consistency with the upstream time axis, the time index attached to the sequence is written back to the prediction record, and the source window and quality flag are saved together to facilitate subsequent rolling optimization reading of the confidence interval and boundary position.
[0029] Based on the future load sequence, the operable range of the equipment and scenario identifiers are marked so that the objective equations in the next step can read the load levels for different time periods. This sequence will serve as the input source for the objective function and constraint set in subsequent steps. The predicted value of the first time step will participate in the generation of the first step control parameters in the rolling solution, forming a direct mapping relationship between the parameters and the execution of equipment commands.
[0030] Step S102: Based on the future load sequence, construct a multi-objective optimization function to obtain a set of objective equations. Apply model constraints and physical limit constraints to the set of objective equations to generate a set of constraint conditions. Input the set of constraint conditions into a rolling optimization solver to calculate a multi-scenario control strategy. Perform weight allocation on the multi-scenario control strategy to obtain a fusion control command sequence. Extract the control parameters of the first time step from the fusion control command sequence to generate an execution command and send it to the building execution equipment. First, the aforementioned future load sequence and time index are read and divided into several continuous windows according to the optimization time domain. Each window is then assigned upper and lower limits for temperature and humidity, as well as a personnel density level. Next, a set of operable variables is established at the equipment level, including supply air temperature settings, chilled water supply and return temperature difference settings, and fan speed ratios, serving as components of the optimization decision vector. Based on the equipment topology, a power calculation path and thermodynamic coupling relationship are mapped, forming a differentiable mapping from decision to load response, used for the joint invocation of the objective function and constraints.
[0031] Based on the aforementioned set of decision vectors, a multi-objective optimization function is constructed and organized into a system of objective equations. The cost term is accumulated in the time domain as the product of the grid-purchased power and the electricity price; the adjustment term is accumulated as the magnitude of decision changes in adjacent time steps; and the comfort term is accumulated as the deviation of the indoor predicted state from the comfort zone. To avoid abstract descriptions, learning weights are not introduced outside the training period; instead, adjustable coefficients are set during the optimization phase to reflect the focus. For ease of explanation, a scalar objective can be used in the internal solver: Ω = a·C + b·D + c·S, Where Ω represents the overall objective of the current solution window, C represents the cumulative electricity purchase cost, D represents the cumulative decision change, S represents the cumulative comfort deviation, and a, b, and c are non-negative coefficients used for switching between different operating strategies. These three terms of the objective are calculated on the same time grid to avoid cross-domain trade-offs.
[0032] Based on the objective equations, constraint variables are generated and model constraints and physical limit constraints are applied to form a constraint set. Model constraints are given by the equipment dynamic equations of the digital twin, describing the temporal propagation relationship of decisions on load and state. Physical limit constraints cover the upper and lower bounds of equipment frequency, heat transfer capacity boundaries, and valve position ranges. To handle acceptable deviations from the comfort range, soft constraints are set, penalizing short-term, minor boundary breaches rather than vetoing them. The aforementioned hard and soft constraints are recorded within the same constraint set with different penalty levels, allowing the solver to make compromises near infeasible boundaries.
[0033] Based on the set of constraints, a rolling optimization solver is invoked. The solver uses a fixed time-domain length and only executes the strategy deployment for the first time step. The solver performs a joint gradient and feasibility search on the objective function, prioritizing the satisfaction of hard constraints and then minimizing the comprehensive objective. In each iteration, the twin state actuator is read to calculate the next state, ensuring that the energy flow and load response triggered by the decision are consistent in the time domain. After solving, a set of candidate control solutions in time-series form is obtained, and the feasible region distance and constraint activity are labeled as references for subsequent scenario weight allocation.
[0034] Based on the candidate control solutions, multi-scenario control strategies are generated. Scenarios originate from different weight combinations and comfort-priority rules; for example, scenarios emphasizing cost and scenarios emphasizing comfort will yield different control trajectories within the same window. Each scenario includes performance metric entries, comprising a comprehensive target value, accumulated comfort deviation, and adjustment smoothness, all uniformly aligned to the same time index for easy subsequent gradual fusion.
[0035] Based on the multi-scenario control strategy, weight allocation is performed to obtain a fused control command sequence. Weight allocation references scenario performance indicators and operational status labels, which are derived from the degree of load sequence fluctuation and personnel density level. When load fluctuations are large, the proportion of smoothing-priority scenarios is increased; when personnel density increases, the proportion of comfort-priority scenarios is increased. After normalization, the weights are multiplied hourly with the corresponding scenario's control vector and summed to obtain the fused time-series control commands, while retaining the contribution ratio at each time step for post-analysis.
[0036] Based on the fused control command sequence, the control parameters for the first time step are extracted, and device-level verification is performed. The verification reads the current device state and safety boundaries, checks whether command transitions exceed the allowed step size; if so, the transition is truncated along the feasible direction and the truncation marker is written back. The verified control parameters are encoded into device control messages and distributed to the corresponding execution devices according to their communication addresses. After distribution, a timestamp and parameter version number are registered so that the execution results can be read back in the next rolling window and compared with the prediction.
[0037] Based on the issued records, an open interface is provided for subsequent feedback steps to read, including the basis for the generation of the initial instruction, constraint activity, and scenario contribution ratio. The next step reads these fields for error calculation and online parameter identification, ensuring a closed-loop correlation between rolling optimization, feedback correction, and twin adaptation.
[0038] Step S103: Collect the actual load value and operating parameters of the execution device to obtain a feedback data set, calculate the error between the feedback data set and the predicted load value to obtain a prediction deviation value, construct an error compensation model based on the prediction deviation value to complete the prediction correction, identify the key parameters of the digital twin model online according to the prediction deviation value to generate an updated parameter set, and write the updated parameter set into the digital twin model to complete the adaptive adjustment.
[0039] First, the real-time samples from the executing device after the initial command are read, connected to the power meter and status acquisition port, and the actual load value and operating parameters are parsed to obtain the data. This data is then aggregated into a feedback data group based on timestamps and device identifiers. To ensure consistency with the preceding scrolling window, the feedback data group is aligned to the time index registered in step S102, and the scenario contribution ratio and constraint activity fields are backfilled as context information for error analysis.
[0040] Based on the feedback data set, a mapping pair is established between the predicted load value and the time step and device dimension. Differences in power, heating / cooling volume, and critical state quantities are calculated to obtain error characteristics. Simultaneously, the device safety boundary is read during the difference calculation; samples exceeding the boundary are marked as low confidence and their weights are reduced to prevent outliers from dominating subsequent corrections. The prediction deviation value is output after weighted aggregation, comprising a time-series vector and a statistical summary, and is consistent with the start and end times of the rolling window.
[0041] Based on the predicted deviation value, an error compensation model, named the Deviation Corrector, is trained and invoked. The Deviation Corrector takes the short-term error sequence and changes in operating parameters as input and outputs a prediction correction amount of the same dimension. To prevent overcorrection, the model reads the constraint activity at the inference end and lowers the correction magnitude for time steps under tight constraints. The correction amount is added to the original prediction hourly to form the corrected load sequence, which is then written back to the optimization cache for use in the next round of decision-making.
[0042] Based on the correction results, online parameter identification of the digital twin model is initiated. First, sensitivity assessments are established for key model parameters, a set of candidate parameters that contribute significantly to the current error is selected, and a one-to-one mapping is established between these parameters and their corresponding components in the device topology. Then, a minimization problem is constructed, with the residual between the corrected prediction and the actual measurement as the objective. Constraints are derived from the physical upper bound of the device and the rate of change limit, ensuring that parameter updates remain gradual.
[0043] Based on the identified problem, a recursive method is used to progressively update candidate parameters, outputting an updated parameter set. To ensure time consistency, updates only apply to components participating in the calculation within the current window, and the effective time and version number are recorded for each parameter. Parameters with abnormal convergence speeds are marked as frozen, and after being unfrozen in the next window, a small update is attempted again to avoid oscillations.
[0044] Based on the updated parameter set, it is written into the corresponding position in the digital twin model and a forward verification is performed. The forward verification reuses the standardized rules and state initialization process of step S101 to confirm that the deviation between the model output and the corrected load sequence converges under the same input. If the deviation does not meet the convergence condition, it reverts to the previous stable version and only retains the incremental terms with limited amplitude to ensure the continuous usability of the model.
[0045] Based on the aforementioned writing and verification results, a parameter update record is generated, containing the prediction deviation value of the update source, the identifier of the updated component, and the parameter increment range. This record is exposed as a feedback interface for the next round of steps S101 and S102 to read, and is used to call the latest parameters when generating the prediction input matrix and setting optimization constraints, thus completing the closed-loop connection of "prediction-optimization-execution-correction".
[0046] As described above, the building energy consumption optimization management method based on digital twins provided in this application can achieve accurate state analysis through twin modeling and load forecasting. An optimization mechanism is constructed, combining multi-objective optimization and rolling solution to establish a reliable control strategy. Adaptive adjustment is introduced, and continuous model optimization is ensured through error compensation and parameter identification. This method effectively solves the shortcomings of traditional technologies in state prediction, strategy optimization, and model adjustment, providing technical support for building energy consumption optimization.
[0047] In one embodiment of the building energy consumption optimization management method based on digital twins in this application, the method may further include the following: Step S201: The data acquisition gateway reads the analog signal output by the sensor at a preset sampling frequency to obtain the raw signal stream. The raw signal stream is separated to generate channel data groups. The channel data groups are subjected to signal quality detection to obtain data reliability index. Based on the data reliability index, each channel signal is preprocessed to generate a multi-source sensing data stream. Step S202: Based on the multi-source sensing data stream, calculate the signal autocorrelation value according to the sliding window to obtain the correlation feature group, input the correlation feature group into the anomaly detector to generate the anomaly label matrix, remove the abnormal data points according to the anomaly label matrix to obtain the effective data group, calculate the time delay deviation between the multi-channel signals through the timestamp alignment algorithm, and perform time delay compensation on the effective data group to generate the synchronization data group.
[0048] First, the sampling frequency and channel mapping are configured on the data acquisition gateway. Analog signals from the temperature and humidity probe, energy consumption meter, and personnel counter are read periodically and aggregated into a raw signal stream. This raw signal stream is then separated based on channel identifiers and physical wiring sequence, forming channel data groups for temperature and humidity, energy consumption, and personnel density. To facilitate subsequent quality assessment, the timestamp and acquisition sequence number of each frame are recorded simultaneously during separation, serving as a reference field for cross-channel comparison.
[0049] Based on the aforementioned channel data sets, signal quality detection is performed to generate a data reliability index. The detection process includes three categories of rules: first, amplitude range comparison, identifying saturation and under-range based on equipment calibration range; second, short-window variance and step comparison, identifying sudden jumps and sensor lag; and third, packet loss rate statistics, quantifying the proportion of gaps in the time series. These three types of results generate separate scores and anomaly markers for each channel, which are then summarized into a data reliability index. This index is backfilled into the timestamp sequence of the corresponding channel to guide subsequent preprocessing intensity and interpolation strategies.
[0050] Guided by the data reliability metrics, preprocessing is performed on each channel signal to generate a multi-source sensing data stream. The preprocessing sequence is DC removal, amplitude limiting and suppression, gap interpolation, and low-pass smoothing. The gap interpolation method is selected based on the anomaly type in the reliability metrics; for example, linear interpolation is used for stable segments, and local regression interpolation based on adjacent patterns is used for high-fluctuation segments. Preprocessing also preserves the interpolation mask and marks the interpolation interval to reduce the weight of that interval during the modeling stage. After processing, each channel is output with a unified sampling frequency and timestamp queue, and then merged into a multi-source sensing data stream.
[0051] Based on the multi-source sensing data stream, a sliding window with a fixed length and overlap ratio is set, and the autocorrelation value of the signal is calculated window by window to obtain a correlation feature group. This feature group is organized by channel and window number, and the fields include the main peak position, peak amplitude, and sidelobe ratio, which are used to reflect the periodicity and signal-to-noise ratio within the window. The cross-channel mutual information statistics within the same window are added as a reference term and input together with the autocorrelation value into the anomaly detector to improve the ability to identify common-mode faults.
[0052] Based on the aforementioned correlation feature group, an anomaly detector is invoked to generate an anomaly labeling matrix. The anomaly detector employs a hybrid judgment based on rules and statistical threshold conditions: when the autocorrelation main peak shifts abnormally and the mutual information drops sharply, the channel corresponding to that window is labeled as an anomaly; when only a single channel exhibits a slight amplitude anomaly while the mutual information remains intact, it is labeled as a repairable anomaly. The anomaly labeling matrix uses windows as rows and channels as columns, with each element recording the anomaly type code and confidence interval, corresponding one-to-one with the timestamp of the multi-source sensing data stream.
[0053] Based on the anomaly marker matrix, corresponding outlier data points are removed to obtain valid data groups. The removal strategy is to directly remove strong anomalies and replace weak anomalies with weighted replacements from adjacent windows, preserving the original timestamp sequence to ensure the continuity of the time base for subsequent alignment. Valid data groups inherit window numbers, and the proportion of replacements and the source window are recorded in the metadata for easy traceability and reprocessing.
[0054] Based on the valid data set, a timestamp alignment algorithm is executed to calculate the time delay deviation between multiple channels. The alignment algorithm estimates the relative delay by the peak position of the cross-correlation within the window and performs robust regression across the window dimension to suppress the bias of isolated windows. The obtained time delay deviation is registered in channel pairs and accompanied by a confidence level, which serves as an upper limit constraint on the compensation strength to avoid over-alignment.
[0055] Under the aforementioned time delay deviation constraint, time delay compensation is performed on the effective data set to generate a synchronized data set. The compensation action performs time axis shifting and necessary resampling interpolation on each channel to ensure that data from all three types of channels at the same timestamp can be directly spliced and used. The synchronized data set retains the interpolation mask and alignment residual statistics. These two types of metadata are read in the subsequent step S101 when constructing the twin state vector, and are used to reduce the impact of unstable regions and indicate the confidence level of the model input.
[0056] In one embodiment of the building energy consumption optimization management method based on digital twins in this application, the method may further include the following: Step S301: Group the synchronous data group according to the building equipment topology to obtain the equipment status table, extract physical characteristic parameters from the equipment status table to obtain the model parameter group, construct the equipment performance model based on the model parameter group to obtain the component model set, modularly assemble the component model set with the building physical model to generate the twin state vector, and calculate the steady-state response of the system based on the twin state vector to obtain the initial state of the model. Step S302: Perform data standardization processing on the initial state of the model and the preset forecast data to obtain a normalized feature group. Use the normalized feature group to generate a state sequence matrix through a time series feature extractor. Perform sliding window segmentation on the state sequence matrix to obtain a sample sequence group. Input the sample sequence group into a deep prediction network to calculate the load forecast value. Perform time step expansion on the load forecast value to generate a load sequence for future periods.
[0057] First, the aforementioned future load sequence and time index are read. A decomposition method combining wavelet packets and moving averages with a fixed center frequency is used to split the sequence into baseline components, daily periodic components, and high-frequency disturbance components. These components are then stacked in alignment according to time steps to form a multi-period load matrix. This matrix uses rows to represent time and columns to represent load items at different time scales. The subsequent objective function directly reads the contributions at different scales according to the column index, avoiding overfitting to short-term fluctuations at a single scale.
[0058] Based on the multi-period load matrix, a power grid purchase cost function is constructed as a cost item. Real-time electricity prices and baseline load components are read, and the product of purchased power and price is accumulated over time steps and recorded in the cost channel. To characterize the additional energy consumption caused by equipment operation, the changes in control variables in adjacent time steps are mapped to energy loss functions, forming a loss item. The losses of different components are accumulated separately using equipment type as the key. Both functions share the same time grid, facilitating weighting with the comfort item.
[0059] Based on the aforementioned cost and loss structure, and combined with the predicted trajectories of indoor temperature, humidity, and occupant density, a comfort evaluation function is established. This function is defined as the sum of positive and negative deviations from the target range. A penalty coefficient is added to the portion exceeding the range based on its duration, generating a comfort term. To avoid excessive penalties triggered by short-term disturbances, an attenuation factor is set on the high-frequency components of the comfort term, retaining higher weights only for persistent deviations. All three indicators are backfilled with time indices and source scales to ensure subsequent interpretability.
[0060] Based on the three indicators, adaptive weighting coefficients are set to generate the objective equation system. The weights are selected from a preset range according to the degree of load fluctuation and the personnel density level; the weight of the loss term is increased when fluctuations increase, and the weight of the comfort term is increased when personnel density increases. To facilitate unified processing within the solver, a window-level comprehensive objective is defined: Φ = κ·U + λ·V + μ·W, Where Φ is the target scalar for the current window, U is the cumulative cost term, V is the cumulative loss term, W is the cumulative comfort term, and κ, λ, and μ are non-negative coefficients given by the running state selection logic. The target is minimized by the solver in each window, and the gradient direction of the control variables at each time step is output.
[0061] Based on the objective equations, the equipment operating boundary conditions are extracted, generating a set of constraint variables. The boundary conditions are obtained from the equipment nameplate and historical stable operating condition statistics, including the upper limit of frequency, valve position limit, adjustable temperature range, and minimum start / stop hold time. The boundary conditions are registered at the equipment level and correspond one-to-one with the control variables, extending along the time axis to the current optimization window.
[0062] Based on the set of constraint variables, parameter matching is performed with the equipment dynamic model to obtain the model constraint set. The matching process injects each control variable into the corresponding component state equation in the digital twin, generating the state transition relationship from the current state to the next moment. Subsequently, equipment physical limits are applied to the model constraint set to form hard constraints, ensuring that no solution crosses the safety boundary and structural limits.
[0063] Based on the hard constraints, environmental comfort constraints are constructed according to preset rules to obtain soft constraints. Soft constraints allow limited out-of-bounds behavior within a short time window and are mapped to the objective equations with penalty coefficients, avoiding overall infeasibility due to instantaneous unavailability. Hard and soft constraints are integrated in a unified structure, recording constraint activity and relaxation amounts for priority scheduling during solution processing.
[0064] Based on the constraint fusion results, a feasibility verification is performed. First, a rapid screening is conducted using linear relaxation, followed by a simulation using a twin state actuator to check if the state falls within the operable domain. After successful verification, multi-scenario control strategies are generated for different weight configurations and load disturbance amplitudes. Each scenario includes a target value, constraint activity, and time index. The multi-scenario output is read by the weight allocation module in step S102 and further synthesized into a sequence of detachable fusion control commands.
[0065] First, after the synchronized data sets arrive, the data from each channel is mapped to device nodes according to the building equipment topology, forming an equipment status table. The mapping uses device identifiers and pipeline connection relationships as keys, aggregating temperature, humidity, energy consumption, and personnel density data to nodes such as air conditioning units, chillers, cooling towers, fan coil units, and area spaces. To ensure subsequent traceability, each record is appended with a time index and source alignment residual, and operating status tags are generated at the node level to distinguish between start-up / shutdown and partial load conditions.
[0066] Based on the equipment status table, characteristic quantities reflecting physical properties are extracted to form a model parameter set. Different rules are applied to different components during the extraction process. For example, at the air conditioning unit node, the heat transfer coefficient is fitted using the inlet / outlet air temperature difference and the power ratio; at the chiller node, the equivalent efficiency parameters are estimated using the inlet / outlet water temperature difference and flow rate; and at building envelope-related nodes, historical regression is used to obtain the equivalent heat capacity and heat transfer coefficient. The model parameter set corresponds one-to-one with each node, and the parameter reliability and update timestamp are recorded for incremental replacement during subsequent online identification.
[0067] Based on the model parameter set, performance relationships are established for each type of equipment, generating a component model set. The component model takes the current control variables and boundary conditions as inputs, and outputs heat exchange, power, and state transitions. Subsequently, the component model set and the building physics model are modularly assembled according to topology to form the overall structure of a digital twin. Given the current operating state and boundary conditions, the energy balance and material balance of each node are calculated, and the resulting state vector of the digital twin is obtained. Based on this vector, the steady-state response is solved to obtain the initial state of the model.
[0068] Based on the initial state of the model, preset forecast data covering outdoor weather and usage schedules for future periods are loaded. Both types of data are standardized using a unified field to obtain normalized feature groups. The standardization process reuses the interpolation mask and alignment residuals from previous records, reducing the weight of low-confidence segments to prevent the subsequently extracted temporal structure from being dominated by local anomalies. The normalized results are stacked in chronological order and indexed with node identifiers.
[0069] Based on the normalized feature set, a temporal feature extractor is invoked to output a state sequence matrix. This extractor encodes local trends and short-term periodic components at each time step and appends a derivative term of population density change to the step dimension to enhance the response to sudden load increases. The resulting state sequence matrix is divided into sample sequence groups using a fixed-length sliding window, while retaining the window start and end indices for alignment and reading by the prediction network.
[0070] Based on the sample sequence set, a deep prediction network, named Load Sequence Predictor, is input for inference. This network takes the sequence of each window as input and outputs estimates of cooling load, heating load, and electrical power for the corresponding window's future multiple steps. During inference, node indices are read to enable multi-channel output in multi-region scenarios. The network is calibrated during training using smoothing and boundary consistency constraints; here, only forward inference is used to generate multi-step prediction results for each window.
[0071] Based on the multi-step prediction results, the outputs of each window are expanded and overlapped according to the time index to eliminate duplicates at the window edges, thus obtaining the load sequence for future periods. During expansion, predictions at the center position are retained first, while weighted transitions are used at the edge positions to avoid jumps across windows. The final load sequence for future periods maintains a reference relationship with the initial state of the model and will be read in step S102 to construct the objective equation set and constraint set, and will be used as direct input for load boundary and cost calculations in the rolling optimization solution.
[0072] In one embodiment of the building energy consumption optimization management method based on digital twins in this application, the method may further include the following: Step S401: Decompose the future load sequence into a multi-period load matrix by time scale, construct a power grid purchase cost function based on the multi-period load matrix to obtain the cost term, map the equipment adjustment range to an energy consumption loss function to obtain the loss term, construct a comfort evaluation function based on indoor environmental parameters to obtain the comfort term, set adaptive weight coefficients for the cost term, loss term and comfort term to generate a set of objective equations, and extract the equipment operation boundary conditions based on the set of objective equations to obtain a set of constraint variables; Step S402: Match the set of constraint variables with the dynamic model of the equipment to obtain a model constraint group, apply physical limits of the equipment to the model constraint group to generate hard constraints, construct environmental comfort constraints according to preset rules to obtain soft constraints, fuse the hard constraints and soft constraints to generate a constraint condition set, and verify the feasibility of the constraint condition set to obtain a multi-scenario control strategy.
[0073] First, the aforementioned future load sequences and their time indices are read. Time scale decomposition channels are set with a fixed window length. For each window, the moving average, daily periodic, and high-frequency disturbance terms are calculated in parallel, and weighted transitions are applied at the boundaries to avoid abrupt splicing. The decomposition results are stacked with time steps as rows and scale types as columns to form a multi-period load matrix. The mapping relationship between window numbers and source sequences is preserved for subsequent target construction by column selection.
[0074] Based on the multi-period load matrix, a power grid purchase cost function is constructed as a cost term. This term reads the baseline load column step by step and multiplies it with the electricity price trajectory to obtain a window-level cost value. At the same time, the marginal cost increment at each step is recorded to facilitate the solver's calculation of the gradient direction. To avoid excessive dilution of short-term spikes, the cost term applies a reduction weight to the high-frequency disturbance column, retaining only its contribution to the peak segment.
[0075] Based on the decomposition results, the equipment adjustment amplitude is mapped to an energy consumption loss function, forming a loss term. Specifically, the absolute value of the time step difference between adjacent control variables is used as the action amplitude, mapped to additional energy consumption according to equipment type, and accumulated on the time axis to obtain a window-level loss value. This term also outputs a smoothness index for each control channel, which is subsequently used to limit jumps in constraint fusion.
[0076] Based on the parallel construction of the cost and loss terms, a comfort evaluation function is established by combining the predicted trajectory of indoor environmental parameters, resulting in a comfort term. The comfort term is based on the positive and negative deviations of temperature and humidity from the target range, superimposed with the influence factor of personnel density level, and a duration-weighted approach is applied to the continuous out-of-bounds range to distinguish short-term disturbances from continuous deviations in terms of dimensionality. Both the stepwise and cumulative values of the comfort term are retained for use by different solution strategies.
[0077] Based on the three indicators, adaptive weight coefficients are set to generate a set of objective equations. The weights are selected from the rule base according to load fluctuation and personnel density level, and are kept constant within a window to facilitate convergence. For ease of explanation, a window-level objective is defined: Ψ1 = χ1·U1 + χ2·V1 + χ3·W1, Wherein Ψ1 is the target scalar of the current window, U1 is the cumulative cost term, V1 is the cumulative loss term, W1 is the cumulative comfort term, and χ1, χ2, and χ3 are non-negative coefficients determined by the running state trigger logic. After reading Ψ1, the solver returns the descent direction of each control variable for subsequent feasibility search.
[0078] Based on the objective equations, the equipment operation boundary conditions are extracted to form a set of constraint variables. These boundary conditions include upper and lower bounds of frequency, valve position range, adjustable range of supply and return water temperature difference, and start / stop duration, and are mapped one-to-one with the control variables. The constraint variable set is expanded step-by-step, synchronously recording equipment node identifiers to ensure the correct components are located in the dynamic model.
[0079] Based on the set of constraint variables, parameter matching is performed with the device dynamic model to obtain the model constraint set. The matching process injects control variables into the state transition equations of the digital twin, generating a recursive relationship from the current state to the next state, and outputting a balance equation for energy and mass conservation. Subsequently, physical limits of the device are applied to the model constraint set, forming hard constraints. These hard constraints are labeled in a non-relaxable form to ensure that the solution always lies within the safe and operable domain.
[0080] Based on the hard constraints, soft constraints are constructed according to the comfort range and operational tolerance. Soft constraints allow for limited deviations within a short timeframe and are mapped back to the objective equations with a penalty coefficient. To avoid conflicts, a cooling window is set for the soft constraint terms in time to prevent trajectory drift caused by simultaneous relaxation in multiple consecutive steps. Soft and hard constraints are aggregated in the same structure, recording constraint activity and relaxation amount for priority scheduling during solution processing.
[0081] Based on the constraint fusion results, a feasibility verification is performed. The verification step first performs relaxation detection on the linear portion to eliminate significantly infeasible weight combinations. Then, it calls the twin state actuator to simulate a single-step response, checking whether the state falls within the operable domain and calculating constraint activity. The verified weight configurations and control trajectories are archived as multi-scenario control strategies. Each scenario includes a target value, constraint activity curve, and time index, which are then read by the weight allocation step in step S102 to generate a fusion control command sequence that can be directly issued.
[0082] In one embodiment of the building energy consumption optimization management method based on digital twins in this application, the method may further include the following: Step S501: Evaluate the target value of the multi-scenario control strategy to obtain a performance index matrix, calculate the scenario priority based on the performance index matrix to obtain a weight distribution map, construct an adaptive weight function based on the weight distribution map to generate a fusion coefficient group, perform a weighted combination operation on the fusion coefficient group and the multi-scenario control strategy to obtain a fusion control instruction sequence, and perform a timing consistency check on the fusion control instruction sequence to obtain a check result table. Step S502: Based on the verification result table, extract the first time step data from the fusion control instruction sequence to obtain the control parameter group, perform device constraint verification on the control parameter group to generate execution instructions, convert the execution instructions according to the control protocol to obtain device control messages, and distribute the device control messages to the corresponding execution devices according to the device communication address to complete the instruction issuance.
[0083] First, the aforementioned multi-scenario control strategies and time indices are read, and the target value, cumulative comfort deviation, and control smoothness are calculated for each scenario, and then organized into a performance index matrix. This matrix is arranged with time steps as rows and scenarios as columns. Each cell contains three items: comprehensive target, constraint activity, and jump degree, and the source weight configuration is backfilled to facilitate subsequent priority determination and comparison within the same context.
[0084] Based on the performance index matrix, scenario priorities are calculated and a weight distribution map is generated. Priority rules read the relative ranking of the overall objective and penalize scenarios with high constraint activity, while reducing the weight cap for scenarios with high control jumps. The weight distribution map outputs the weight share of each scenario at the time step level and records the normalization factor to ensure the weighted sum is one. This map shares a time index with the performance index matrix, forming an input pair that can be directly accessed hourly.
[0085] Based on the weight distribution map, an adaptive weight function is constructed to generate a fusion coefficient set. The adaptive weight function reads real-time operation labels, which are derived from load fluctuation level and personnel density level. Smoothing and lower limit constraints are applied to the weight distribution map accordingly to avoid frequent scene switching caused by short-term fluctuations. The fusion coefficient set is arranged with scenes as columns and time steps as rows, perfectly aligned with the multi-scene control strategy in terms of dimensions.
[0086] Based on the fusion coefficient set, a weighted combination of multi-scenario control strategies is performed to obtain a fused control command sequence. During combination, the control vector of each scenario is multiplied by its corresponding weight at each time step and then summed to output a control trajectory of consistent length. The contribution ratio of each scenario at each step is retained as metadata. To facilitate diagnosis, low-weight scenarios that did not participate in the combination are recorded with a sparse index for later playback.
[0087] Based on the fused control command sequence, timing consistency verification is performed, and a verification result table is generated. The verification reads the allowable step and rate limits, and corrective suggestions are provided for control variables exceeding these limits. Simultaneously, logical conflicts between interlocked variables are detected, such as the ratio range of valve position and pump frequency, and feasible adjustment intervals are provided. The verification result table is written back to the corresponding time step of the fused control command sequence, forming a one-to-one mapping.
[0088] Based on the verification result table, the control parameters for the first time step are extracted to obtain the control parameter group. Correction suggestions are read during extraction; if any exceedances are found, the range is truncated according to the feasible interval and a truncation flag is recorded. A mapping relationship is established between the control parameter group and the device nodes to ensure that the same control variable points to only one executing component, avoiding duplicate issuance.
[0089] Based on the control parameter set, device constraint verification is performed and execution instructions are generated. The verification process involves single-step execution using the digital twin to confirm that the state from the current state to the next moment falls within the operable domain. If it fails, the least sensitive control variable amplitude is rolled back according to priority until feasibility is achieved. Verified instructions are encapsulated as execution instructions, accompanied by a timestamp and version number, for the communication layer to read.
[0090] Based on the execution instructions, device control messages are generated according to the control protocol. The message format includes the device address, function code, data field, and check field. The data field contains control parameter values and truncation flags. Subsequently, the messages are distributed according to the device communication address and sent to the corresponding execution device. After distribution, the sending time, acknowledgment receipt, and message hash are recorded to form a traceable entry, providing the initial execution basis and readback verification entry for the next scrolling window.
[0091] In one embodiment of the building energy consumption optimization management method based on digital twins in this application, the method may further include the following: Step S601: Read the real-time operating status of the execution device through the device monitoring interface to obtain a status data stream, parse the status data stream to obtain a load data group and a parameter data group, clean the load data group according to a preset rule to generate an actual load value, extract the device operating characteristics from the parameter data group to obtain an operating parameter table, and merge the actual load value and the operating parameter table to generate a feedback data group. Step S602: Align the actual load values in the feedback data group with time windows to obtain the measured sequence, map the measured sequence and the predicted load values according to timestamps to generate data pairs, calculate multi-dimensional error indicators based on the data pairs to obtain error feature vectors, and perform weighted fusion operations on the error feature vectors to generate prediction deviation values.
[0092] First, the real-time operating status of the chiller, air conditioning unit, fan coil unit, pump valve, and other actuators is polled through the equipment monitoring interface to obtain the raw messages from power meters, flow meters, and temperature and humidity probes, which are then aggregated into a status data stream. Based on the device address and function code parsing fields, the data is split according to the measurement type and device node to obtain load data groups and parameter data groups, and the sampling timestamp and communication receipt mark are retained for subsequent verification of source consistency.
[0093] Based on the aforementioned load data set, data cleaning is performed to generate actual load values. Cleaning rules include range verification, instantaneous spike suppression, and gap interpolation. The interpolation strategy selects linear or local regression methods based on the intra-segment stability label. Records with communication failures or abnormal receipts are directly discarded. After cleaning, multi-channel power and heating / cooling data are unified to the same time grid, forming actual load values arranged by time step. The interpolation mask and discard ratio are then backfilled as a reliability indicator.
[0094] Based on the parameter data set, equipment operating characteristics are extracted, and an operating parameter table is output. Extracted items include valve position percentage, pump frequency, supply and return water temperature difference, and supply air temperature setting, and the rate of change between adjacent time steps is calculated to reflect operational intensity. The operating parameter table shares the time index and equipment node key with the actual load values to ensure consistent positioning during subsequent merging.
[0095] Based on the actual load values and operating parameter table, data is merged according to timestamps and device keys to generate a feedback data group. During merging, the source mask and confidence score of each field are retained and uniformly written to the metadata area. The feedback data group serves as the direct input for error calculation and establishes a reference relationship with the initial distribution record registered in step S102, facilitating the location of the corresponding prediction time.
[0096] Based on the feedback data set, the actual load values are aligned with time windows to obtain the measured sequence. A fixed-length sliding window is used for alignment, maintaining the same step size as the prediction side. Gaps within the window are weighted using the aforementioned masking method to avoid offsets caused by secondary interpolation. The measured sequence retains the window number for reuse in error statistics.
[0097] Based on the measured sequence and the predicted load value generated in step S101, data pairs are generated according to timestamp mapping. For each time step, corresponding entries containing cooling load, heating load, and electrical power are constructed. Samples with time misalignment or inconsistent sources are removed, and the reasons for removal are recorded. After the data pairs are formed, they enter the error calculation process.
[0098] Based on the data pairs, a multi-dimensional error index is calculated to obtain an error feature vector. The error dimensions include absolute deviation, relative deviation, and sliding residual, with an additional sensitivity term for the rate of change in the operating parameter table to distinguish deviations caused by operational jumps. Errors in each dimension are aggregated at the window level, while retaining the original time-series values for subsequent weight allocation.
[0099] Based on the error feature vector, a weighted fusion operation is performed to output the prediction deviation value. The weights are set according to three types of information: first, the confidence score of the measured sequence, used to suppress the contribution of dense interpolation regions; second, the rate of change of operating parameters, used to improve the sensitivity to operational abrupt changes; and third, the constraint activity reference, used to reduce the risk of over-correction under tight constraints. The weighted result generates a prediction deviation time series consistent with the time index, with an accompanying statistical summary, which can be directly read by the deviation corrector and online identification module in step S103 to complete subsequent prediction correction and parameter updates.
[0100] In one embodiment of the building energy consumption optimization management method based on digital twins in this application, the method may further include the following: Step S701: Perform time series analysis on the predicted deviation values to obtain a deviation feature group, input the deviation feature group into a recurrent neural network to train an error compensation model, generate a prediction correction amount based on the error compensation model to obtain a compensation parameter table, perform threshold screening on the compensation parameter table to obtain effective compensation items, perform correction operation on the effective compensation items and the original predicted values to generate corrected predicted values, and perform parameter sensitivity analysis on the digital twin model based on the corrected predicted values to obtain a sensitivity matrix; Step S702: Based on the sensitivity matrix, the key parameters of the digital twin model are sorted by importance to obtain a parameter priority table. The prediction deviation values guided by the parameter priority table are mapped to the model parameter space to generate a parameter deviation vector. The parameter deviation vector is used to identify parameters through recursive least squares to obtain an updated parameter set. The updated parameter set is mapped and written into the corresponding position of the digital twin model according to the model structure to complete the adaptive adjustment.
[0101] First, after the predicted deviation value is reached, a sliding window is established with a fixed step size and overlap ratio. For each window sequence, the trend slope, local variance, duration of continuous out-of-bounds movement, and kurtosis are extracted, and synchronous statistics on the rate of change of operating parameters are added to form a deviation feature group. This feature group corresponds one-to-one with the time index and device node key, and the confidence score from step S602 is backfilled to allocate sample weights during the training phase.
[0102] Based on the aforementioned bias feature set, a recurrent neural network, named the bias compensator, is constructed and trained. The training input is a window-level bias feature sequence, and the training objective is the bias prediction for subsequent time steps within the same window. A robust term for large jumps is introduced into the loss function and weighted by sample confidence. After training convergence, the inference end uses the real-time feature sequence as input and outputs a prediction correction aligned with the time step. These corrections are compiled into a compensation parameter table, and the uncertainty estimate for each step is recorded for subsequent screening.
[0103] According to the compensation parameter table, threshold screening is performed to obtain effective compensation terms. The screening rules refer to uncertainty estimation and constraint activity, and the correction amount is reduced or frozen for time steps with high uncertainty or tight constraints. The effective compensation terms are added to the original predicted values hourly to generate corrected predicted values, and the corrected residuals and screening masks are archived together for subsequent sensitivity assessment.
[0104] Based on the corrected predicted values, parameter sensitivity analysis of the digital twin model is triggered, and a sensitivity matrix is output. During the analysis, perturbations are applied to each candidate parameter one by one, and the output changes are compared by forward propagation of the twin to obtain approximate partial derivatives of the corrected predictions with respect to each parameter. The sensitivity matrix is organized by dual indexes of device node and parameter name and inherits the same time grid to ensure alignment with the deviation time axis.
[0105] Based on the sensitivity matrix, key parameters are ranked by importance to obtain a parameter priority table. Importance is comprehensively considered considering partial derivative amplitude, parameter adjustable band, and historical stability label, prioritizing parameters that significantly impact correction prediction and are allowed to vary. The parameter priority table is mapped to the equipment topology, limiting subsequent identification to within the corresponding component and avoiding cross-component crosstalk.
[0106] Based on the parameter priority table, the predicted bias values are mapped to the model parameter space to generate a parameter bias vector. The mapping rule allocates the bias share according to the column normalization result of the sensitivity matrix, and sets the frozen parameters to zero. To form an iterative identification input, the parameter bias vector is smoothed on the time axis to suppress the interference of isolated outliers on the update direction.
[0107] Based on the parameter deviation vector, online parameter identification is performed using recursive least squares to obtain an updated parameter set. The identification state includes recursive values for parameter estimates and covariance matrices. Gain scheduling is adaptively scaled based on sample reliability and constraint activity to ensure that the convergence step size decreases when data quality deteriorates. Each item in the updated parameter set includes its effective time and version number.
[0108] Based on the updated parameter set, parameters are written into the corresponding positions of the digital twin model according to the model structure to complete adaptive adjustment. Immediately after writing, a single-step consistency check is performed, using the corrected predicted value as the target output to verify whether the model's deviation under the current input has converged to an acceptable range. If not, amplitude limiting is applied to the updated parameter set while retaining the increment, and iteration continues in the next window. The final parameter update record is read by the aforementioned steps S101 and S102 to generate a new prediction input matrix and constraint boundaries, closing the online self-calibration loop of this method.
[0109] To effectively address the shortcomings of traditional technologies in state prediction, strategy optimization, and model adjustment, and to provide technical support for building energy consumption optimization, this application provides an embodiment of a digital twin-based building energy consumption optimization management device for implementing all or part of the aforementioned digital twin-based building energy consumption optimization management method. See [link to embodiment]. Figure 2 The building energy consumption optimization management device based on digital twins specifically includes the following components: The building data acquisition module 10 is used to collect temperature and humidity data, energy consumption measurement data and personnel density data uploaded by sensors in the building to obtain a multi-source sensing data stream. The multi-source sensing data stream is subjected to anomaly detection and data alignment to obtain a synchronous data group. A digital twin model is constructed based on the synchronous data group to obtain a twin state vector. The twin state vector is fused with preset forecast data in a time series to generate a prediction input matrix. Load prediction calculation is performed on the prediction input matrix to obtain the load sequence for future periods. The scenario strategy formulation module 20 is used to construct a multi-objective optimization function based on the future time period load sequence to obtain a set of objective equations, apply model constraints and physical limit constraints to the set of objective equations to generate a set of constraint conditions, input the set of constraint conditions into a rolling optimization solver to calculate a multi-scenario control strategy, perform weight allocation on the multi-scenario control strategy to obtain a fusion control instruction sequence, extract the control parameters of the first time step from the fusion control instruction sequence to generate an execution instruction and send it to the building execution device; The energy consumption optimization management module 30 is used to collect the actual load value and operating parameters of the execution equipment to obtain a feedback data set, calculate the error between the feedback data set and the predicted load value to obtain a prediction deviation value, construct an error compensation model based on the prediction deviation value to complete the prediction correction, identify the key parameters of the digital twin model online according to the prediction deviation value to generate an updated parameter set, and write the updated parameter set into the digital twin model to complete the adaptive adjustment.
[0110] As described above, the building energy consumption optimization management device based on digital twins provided in this application can achieve accurate state analysis through twin modeling and load forecasting. An optimization mechanism is constructed, combining multi-objective optimization and rolling solution to establish a reliable control strategy. Adaptive adjustment is introduced, and continuous model optimization is ensured through error compensation and parameter identification. This method effectively solves the shortcomings of traditional technologies in state prediction, strategy optimization, and model adjustment, providing technical support for building energy consumption optimization.
[0111] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the building energy consumption optimization management method based on digital twins.
[0112] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described building energy consumption optimization management method based on digital twins.
[0113] This invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the above-described building energy consumption optimization management method based on digital twins.
[0114] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0115] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0116] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0117] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0118] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A building energy consumption optimization management method based on digital twins, characterized in that, The method includes: Multi-source sensing data streams are obtained by collecting temperature and humidity data, energy consumption data, and personnel density data uploaded by sensors within the building. Anomaly detection and data alignment are performed on the multi-source sensing data streams to obtain synchronized data groups. A digital twin model is constructed based on the synchronized data groups to obtain a twin state vector. The twin state vector is fused with preset forecast data in a time series to generate a prediction input matrix. Load prediction calculations are performed on the prediction input matrix to obtain the load sequence for future periods. Based on the future load sequence, a multi-objective optimization function is constructed to obtain a set of objective equations. Model constraints and physical limit constraints are applied to the set of objective equations to generate a set of constraint conditions. The set of constraint conditions is input into a rolling optimization solver to calculate a multi-scenario control strategy. The multi-scenario control strategy is weighted to obtain a fusion control command sequence. The control parameters of the first time step are extracted from the fusion control command sequence to generate an execution command and send it to the building execution equipment. The actual load value and operating parameters of the execution equipment are collected to obtain a feedback data set. The error between the feedback data set and the predicted load value is calculated to obtain a prediction deviation value. An error compensation model is constructed based on the prediction deviation value to complete the prediction correction. The key parameters of the digital twin model are identified online according to the prediction deviation value to generate an updated parameter set. The updated parameter set is written into the digital twin model to complete the adaptive adjustment.
2. The building energy consumption optimization management method based on digital twins according to claim 1, characterized in that, The collection of temperature and humidity data, energy consumption data, and personnel density data uploaded by sensors within the building yields a multi-source sensing data stream. Anomaly detection and data alignment are performed on this multi-source sensing data stream to obtain a synchronized data group, including: The data acquisition gateway reads the analog signal output by the sensor at a preset sampling frequency to obtain the raw signal stream. The raw signal stream is then separated to generate channel data groups. The channel data groups are then subjected to signal quality detection to obtain data reliability indicators. Based on the data reliability indicators, each channel signal is preprocessed to generate a multi-source sensing data stream. Based on the multi-source sensing data stream, the autocorrelation value of the signal is calculated using a sliding window to obtain a correlation feature group. The correlation feature group is then input into an anomaly detector to generate an anomaly label matrix. Anomaly data points are removed from the anomaly label matrix to obtain a valid data group. The time delay deviation between the multi-channel signals is calculated using a timestamp alignment algorithm. Time delay compensation is then performed on the valid data group to generate a synchronization data group.
3. The building energy consumption optimization management method based on digital twins according to claim 1, characterized in that, The process of constructing a digital twin model based on the synchronized data set to obtain a twin state vector, time-series fusion of the twin state vector with preset forecast data to generate a prediction input matrix, and performing load forecasting calculations on the prediction input matrix to obtain a future time period load sequence includes: The synchronized data group is grouped according to the building equipment topology to obtain the equipment status table. Physical characteristic parameters are extracted from the equipment status table to obtain the model parameter group. Based on the model parameter group, the equipment performance model is constructed to obtain the component model set. The component model set is modularly assembled with the building physics model to generate a twin state vector. The steady-state response of the system is calculated based on the twin state vector to obtain the initial state of the model. The model's initial state and preset forecast data are standardized to obtain a normalized feature set. The normalized feature set is then used to generate a state sequence matrix through a time-series feature extractor. The state sequence matrix is then divided into a sliding window to obtain a sample sequence set. The sample sequence set is then input into a deep prediction network to calculate the load forecast value. Finally, the load forecast value is expanded by time steps to generate a load sequence for future periods.
4. The building energy consumption optimization management method based on digital twins according to claim 1, characterized in that, The process involves constructing a multi-objective optimization function based on the future load sequence to obtain a set of objective equations. Model constraints and physical limit constraints are then applied to the objective equations to generate a constraint set. This constraint set is then input into a rolling optimization solver to calculate multi-scenario control strategies, including: The load sequence for future periods is decomposed into a multi-period load matrix. Based on the multi-period load matrix, a power grid purchase cost function is constructed to obtain a cost term. The equipment adjustment range is mapped to an energy consumption loss function to obtain a loss term. A comfort evaluation function is constructed based on indoor environmental parameters to obtain a comfort term. Adaptive weight coefficients are set for the cost term, loss term, and comfort term to generate a set of objective equations. Based on the set of objective equations, the equipment operation boundary conditions are extracted to obtain a set of constraint variables. The constraint variable set is matched with the equipment dynamic model to obtain a model constraint group. Equipment physical limits are applied to the model constraint group to generate hard constraints. Environmental comfort constraints are constructed according to preset rules to obtain soft constraints. The hard constraints and soft constraints are fused to generate a constraint condition set. The feasibility of the constraint condition set is verified to obtain a multi-scenario control strategy.
5. The building energy consumption optimization management method based on digital twins according to claim 1, characterized in that, The process of weighting the multi-scenario control strategy to obtain a fused control instruction sequence, extracting the control parameters of the first time step from the fused control instruction sequence to generate an execution instruction, and sending it to the building execution device includes: A performance index matrix is obtained by evaluating the target value of the multi-scenario control strategy. A weight distribution map is obtained by calculating the scenario priority based on the performance index matrix. An adaptive weight function is constructed according to the weight distribution map to generate a fusion coefficient group. The fusion coefficient group and the multi-scenario control strategy are weighted and combined to obtain a fusion control instruction sequence. The timing consistency of the fusion control instruction sequence is checked to obtain a check result table. Based on the verification result table, the first time step data is extracted from the fusion control instruction sequence to obtain the control parameter group. The control parameter group is then subjected to device constraint verification to generate an execution instruction. The execution instruction is converted into a device control message according to the control protocol. The device control message is then distributed to the corresponding execution device according to the device communication address to complete the instruction issuance.
6. The building energy consumption optimization management method based on digital twins according to claim 1, characterized in that, The actual load value and operating parameters of the acquisition and execution device are used to obtain a feedback data set. The error between the feedback data set and the predicted load value is calculated to obtain a prediction deviation value, including: The real-time operating status of the execution equipment is read through the equipment monitoring interface to obtain a status data stream. The status data stream is parsed to obtain a load data group and a parameter data group. The load data group is cleaned according to a preset rule to generate an actual load value. The equipment operating characteristics are extracted from the parameter data group to obtain an operating parameter table. The actual load value and the operating parameter table are merged to generate a feedback data group. The actual load values in the feedback data set are aligned with the time window to obtain the measured sequence. The measured sequence and the predicted load values are mapped according to the timestamp to generate data pairs. Based on the data pairs, multi-dimensional error indicators are calculated to obtain error feature vectors. The error feature vectors are weighted and fused to generate prediction deviation values.
7. The building energy consumption optimization management method based on digital twins according to claim 1, characterized in that, The process of constructing an error compensation model based on the prediction deviation value to complete prediction correction, identifying key parameters of the digital twin model online based on the prediction deviation value to generate an updated parameter set, and writing the updated parameter set into the digital twin model to complete adaptive adjustment includes: A time series analysis is performed on the predicted deviation values to obtain a deviation feature group. The deviation feature group is then input into a recurrent neural network for training to obtain an error compensation model. Based on the error compensation model, a prediction correction amount is generated to obtain a compensation parameter table. The compensation parameter table is then subjected to threshold screening to obtain effective compensation items. The effective compensation items are then compared with the original predicted values to generate corrected predicted values. Based on the corrected predicted values, a parameter sensitivity analysis is performed on the digital twin model to obtain a sensitivity matrix. Based on the sensitivity matrix, the key parameters of the digital twin model are sorted by importance to obtain a parameter priority table. The prediction deviation values guided by the parameter priority table are mapped to the model parameter space to generate a parameter deviation vector. The parameter deviation vector is used to identify parameters through recursive least squares to obtain an updated parameter set. The updated parameter set is mapped and written into the corresponding position of the digital twin model according to the model structure to complete the adaptive adjustment.
8. A building energy consumption optimization management device based on digital twins, characterized in that, The device includes: The building data acquisition module is used to collect temperature and humidity data, energy consumption measurement data, and personnel density data uploaded by sensors in the building to obtain a multi-source sensing data stream. The multi-source sensing data stream is subjected to anomaly detection and data alignment to obtain a synchronous data group. A digital twin model is constructed based on the synchronous data group to obtain a twin state vector. The twin state vector is fused with preset forecast data in a time series to generate a prediction input matrix. Load prediction calculation is performed on the prediction input matrix to obtain the load sequence for future periods. The scenario strategy formulation module is used to construct a multi-objective optimization function based on the future time period load sequence to obtain a set of objective equations, apply model constraints and physical limit constraints to the set of objective equations to generate a set of constraint conditions, input the set of constraint conditions into a rolling optimization solver to calculate a multi-scenario control strategy, perform weight allocation on the multi-scenario control strategy to obtain a fusion control command sequence, extract the control parameters of the first time step from the fusion control command sequence to generate an execution command and send it to the building execution equipment; The energy consumption optimization management module is used to collect the actual load value and operating parameters of the execution equipment to obtain a feedback data set, calculate the error between the feedback data set and the predicted load value to obtain a prediction deviation value, construct an error compensation model based on the prediction deviation value to complete the prediction correction, identify the key parameters of the digital twin model online according to the prediction deviation value to generate an updated parameter set, and write the updated parameter set into the digital twin model to complete the adaptive adjustment.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the building energy consumption optimization management method based on digital twins as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the building energy consumption optimization management method based on digital twins as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method and system for predicting climatic environment of power grid transmission line and medium
CN115545361A
River water quality prediction method and system based on feature screening and weight distribution
CN116720057A
Intelligent building energy conservation and emission reduction digital twin management system and method
CN120295260A
Sodium aluminate solution concentration prediction method and system based on dynamic weight, processor and storage medium
CN121415902A
Intelligent control building energy consumption monitoring data management method and system fusing digital twinning
CN121680108A