Building energy-saving management system and method based on digital twinning

By using a dynamic confidence arbitration and state fusion framework based on digital twin technology, and combining historical user behavior with real-time environmental data, the problem of the inability to dynamically adjust the credibility of information sources in existing building energy conservation management systems is solved, enabling more accurate occupancy status judgment and energy-saving control.

CN121206647BActive Publication Date: 2026-02-24ZHEJIANG JIUSUO PHOTOELECTRIC ENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511767529.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-28
Publication Date
2026-02-24
Estimated Expiration
2045-11-28

AI Technical Summary

Technical Problem

Existing building energy management systems are unable to dynamically adjust the credibility of information sources based on context, leading to problems such as energy waste or reduced comfort.

Method used

By constructing a building energy-saving management system based on digital twins, and adopting a dynamic confidence arbitration and state fusion framework, the system combines user historical behavior sequences and real-time environmental data to dynamically adjust the weights of user profiles and sensor signals, generating the most reliable occupancy status.

Benefits of technology

It improves the accuracy and robustness of occupancy status judgment, realizes intelligent and precise air conditioning control, reduces energy waste and enhances user comfort.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121206647B_ABST
    Figure CN121206647B_ABST
Patent Text Reader

Abstract

The application discloses a building energy-saving management system and method based on digital twinning, and relates to the field of energy-saving management. Firstly, parallel and independent quantitative evaluation is performed on the two: on the one hand, a portrait static confidence is generated while predicting the state from the user historical behavior; on the other hand, a sensor signal quality score is synchronously evaluated when real-time environmental data is analyzed to infer the current state. When the conclusions of the two information sources conflict, a dynamic arbitration mechanism is started, the weights of the two are adjusted and judged in real time and dynamically according to the portrait static confidence and the sensor signal quality score, and finally a highest credibility occupancy state under the current situation is fused. In this way, the fuzzy and conflict scenes in the real world can be more intelligently and flexibly coped with, so that the accuracy and robustness of the occupancy state judgment are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of energy conservation management, and more specifically, to a building energy conservation management system and method based on digital twins. Background Technology

[0002] With increasing global focus on sustainable development, reducing building energy consumption, especially central air conditioning systems which are major energy consumers, has become a key aspect of achieving energy conservation and emission reduction goals. Traditional building automation systems rely heavily on fixed time strategies and cannot respond to actual indoor occupancy as needed, leading to significant energy waste. The emergence of digital twin technology offers an innovative solution. By constructing a virtual image of the physical building, it can simulate, predict, and optimize building energy use, enabling more refined and intelligent energy management. Therefore, developing a building energy management solution based on digital twins has significant practical implications and promising application prospects.

[0003] In exploring refined management, existing technologies typically attempt to integrate two information sources to determine indoor occupancy status: one is to create user profiles by analyzing historical data to predict their habitual on-and-off behavior; the other is to deploy environmental sensors such as PIR (passive infrared) and CO2 concentration sensors to perceive the spatial status in real time. However, both solutions have inherent drawbacks: user profiles cannot handle unplanned overtime or early departures, while environmental sensors are susceptible to signal noise interference or have difficulty distinguishing between long-term and short-term stays (such as a cleaner passing by). To compensate for their respective shortcomings, technology has naturally moved towards information fusion. However, current fusion methods mostly remain at a crude level using static priorities or fixed weights. For example, simply stipulating that sensor signals always have priority or assigning them an unchanging fusion weight. The fundamental limitation of this rigid strategy is that it ignores the dynamic change in the relative reliability of different information sources in different contexts. For example, during weekday working hours, the reliability of a profile predicting occupancy is extremely high; but late at night, when the profile predicts no one is there, a strong sensor signal indicating occupancy is obviously more trustworthy. Static fusion strategies cannot make such context-based dynamic adjustments, and lack a mechanism for quantifying and transmitting information uncertainty. This leads to overly simplistic decision-making behavior and poor robustness when faced with information conflicts, often resulting in unnecessary energy consumption or sacrificing user comfort.

[0004] Therefore, in order to overcome the bottlenecks of existing technologies, there is an urgent technical need for an intelligent arbitration mechanism that can transcend static rules to resolve the dynamic conflict between profile prediction and real-time perception, and to achieve intelligent and refined energy-saving control of air conditioning systems. Summary of the Invention

[0005] To address the aforementioned problems in the existing technology, this application provides a building energy conservation management method based on digital twins, which includes:

[0006] Obtain the user's historical behavior sequence and the current environment data frame;

[0007] Based on the current timestamp, the user's historical behavior sequence is used to predict the occupancy status and generate static confidence based on the user profile to obtain the profile prediction status and the profile static confidence.

[0008] The current environmental data frame is used to perform occupancy status inference and signal quality assessment based on real-time perception to obtain sensor inferred status and sensor signal quality score;

[0009] Dynamic confidence arbitration and state fusion are performed on the image prediction state, image static confidence, sensor inference state, and sensor signal quality score to obtain the fused state;

[0010] Based on the merged state, air conditioning control commands are generated.

[0011] This application also provides a building energy efficiency management system based on digital twins, which includes:

[0012] The multi-source data acquisition module is used to acquire user historical behavior sequences and current environment data frames;

[0013] The profile analysis module is used to predict the occupancy status and generate static confidence scores based on the user's historical behavior sequence based on the current timestamp, so as to obtain the profile prediction status and profile static confidence score.

[0014] The sensor state quality analysis module is used to perform real-time sensing-based occupancy state inference and signal quality assessment on the current environmental data frame to obtain the sensor inferred state and sensor signal quality score.

[0015] The dynamic confidence arbitration fusion module is used to perform dynamic confidence arbitration and state fusion on the profile prediction state, profile static confidence, sensor inference state and sensor signal quality score to obtain the fused state;

[0016] The air conditioning control command generation module is used to generate air conditioning control commands based on the fusion status.

[0017] Compared with existing technologies, this application provides a building energy-saving management system and method based on digital twins, which constructs a dynamic confidence arbitration and state fusion framework to replace the static and rigid rules for handling information conflicts in existing technologies. This method does not simply choose between user profiles and environmental perception as information sources, but first performs parallel and independent quantitative evaluations of both: on the one hand, it extracts the predicted state from the user's historical behavior and generates a static confidence score for the profile to measure the past reliability of the prediction; on the other hand, while parsing real-time environmental data to infer the current state, it simultaneously evaluates a sensor signal quality score to determine the validity of the current sensor signal. When the conclusions of the two information sources conflict, the system initiates a dynamic arbitration mechanism, adjusting and adjudicating the weights of the profile static confidence score and the sensor signal quality score in real time and dynamically, ultimately fusing them to arrive at the occupancy state with the highest credibility in the current context. This solves the fundamental defects of static fusion strategies in the background technology, such as the inability to dynamically adjust credibility according to context and the lack of quantification of uncertainty. It enables the system to respond more intelligently and flexibly to ambiguity and conflict scenarios in the real world, thereby significantly improving the accuracy and robustness of occupancy status judgment. Attached Figure Description

[0018] The above and other objects, features and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings.

[0019] Figure 1 This is a flowchart of a digital twin-based building energy conservation management method according to an embodiment of this application.

[0020] Figure 2 This is a schematic diagram of data flow in a digital twin-based building energy conservation management method according to an embodiment of this application.

[0021] Figure 3 This is a flowchart of step S1 in the digital twin-based building energy conservation management method according to an embodiment of this application.

[0022] Figure 4 This is a flowchart of step S4 in the digital twin-based building energy conservation management method according to an embodiment of this application.

[0023] Figure 5 This is a block diagram of a digital twin-based building energy efficiency management system according to an embodiment of this application. Detailed Implementation

[0024] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. It should be understood that the drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0025] In view of the shortcomings in the above-mentioned technical fields, this application proposes a building energy-saving management method based on digital twins. Figure 1 This is a flowchart of a digital twin-based building energy conservation management method according to an embodiment of this application. Figure 2 This is a schematic diagram of data flow in a building energy efficiency management method based on digital twins according to an embodiment of this application. Figure 1 and Figure 2 As shown, the building energy-saving management method based on digital twin according to an embodiment of this application includes: Step S1, acquiring a user's historical behavior sequence and a current environmental data frame; Step S2, based on the current timestamp, performing occupancy status prediction and static confidence generation on the user's historical behavior sequence based on user profile to obtain a profile prediction status and a profile static confidence level; Step S3, performing occupancy status inference and signal quality assessment on the current environmental data frame based on real-time perception to obtain a sensor inference status and a sensor signal quality score; Step S4, performing dynamic confidence level arbitration and state fusion on the profile prediction status, profile static confidence level, sensor inference status, and sensor signal quality score to obtain a fused status; Step S5, generating an air conditioning control command based on the fused status.

[0026] In other words, the energy-saving management method of this application achieves energy savings by determining the actual occupancy status of the central air-conditioned area. Its digital twin is embodied in a complete perception-decision-control closed loop: it is not a three-dimensional model, but rather a profile model containing user behavior habits (a digital twin of occupancy patterns) and a snapshot of real-time environmental data (a digital twin of the physical environment). The core of this digital twin is its intelligent decision-making capability. When the historical experience of the profile conflicts with the current facts of the sensors, a dynamic confidence arbitration mechanism intelligently determines the most credible occupancy status. Finally, the digital twin translates this decision into specific control commands and sends them to the physical air-conditioning system, achieving on-demand response and thus avoiding ineffective cooling or heating of vacant rooms.

[0027] In step S1, the user's historical behavior sequence and the current environmental data frame are acquired. It should be understood that the core challenge in devising an advanced building energy management solution lies in accurately determining the actual occupancy status within the building. This requires integrating two distinct information dimensions: one is user profile information extracted from long-term data reflecting user habits, and the other is real-time perception information of instantaneous changes in the physical space. Only by acquiring and processing these two information sources with high quality can a solid foundation be provided for subsequent intelligent decision-making. Therefore, in order to construct two parallel information flows—user behavior prediction and environmental state inference—and provide the necessary high-quality raw data input for subsequent dynamic confidence arbitration and state fusion, this application first needs to acquire the user's historical behavior sequence and the current environmental data frame.

[0028] Figure 3 This is a flowchart of step S1 in the digital twin-based building energy efficiency management method according to an embodiment of this application. Figure 3 As shown, an exemplary implementation of step S1 of this application, obtaining a user's historical behavior sequence and current environment data frame, includes: step S11, obtaining raw HR attendance data and raw WiFi connection logs; step S12, performing data cleaning and anonymization processing on the raw HR attendance data and raw WiFi connection logs to obtain anonymous user identifiers, anonymous HR data, and anonymous WiFi logs; step S13, fusing and discretizing the anonymous user identifiers, anonymous HR data, and anonymous WiFi logs into spatiotemporal event streams to obtain a unified anonymous event stream; and step S14, constructing the user's historical behavior sequence based on the unified anonymous event stream.

[0029] An exemplary implementation of step S1 of this application, which involves acquiring a user's historical behavior sequence and a current environmental data frame, further includes: step S15, acquiring the original PIR sensor signal, the original CO2 concentration signal, the original indoor temperature signal, and the current timestamp; step S16, performing median filtering and normalization on the original CO2 concentration signal and the original indoor temperature signal to obtain a CO2 normalized signal and a temperature normalized signal; step S17, performing debouncing on the original PIR sensor signal to obtain a debouncing PIR signal; and step S18, performing data frame alignment and encapsulation on the current timestamp, the CO2 normalized signal, the temperature normalized signal, and the debouncing PIR signal to obtain the current environmental data frame.

[0030] Specifically, step S1 of this application is performed as follows: In an office building environment, to construct a user profile that reflects user access habits, step S11 must first be performed. The raw HR attendance data comes from the building's access control or attendance management equipment. It exists in the form of structured records, each containing key information. For example, a record might be: Employee ID: 1024, Attendance Time: October 27, 2025, 08:55:12, Attendance Event Type: Attendance. This data directly reflects the precise activity time of employees at specific entrances and exits. Meanwhile, the raw WiFi connection logs are obtained from the backend of the wireless network access points (APs) deployed within the building. These logs record the activity of devices in the network. For example, a log might be: Device Media Access Control (MAC) Address: A1-B2-C3-D4-E5-F6, Connection Time: October 27, 2025, 09:01:45, Connected AP Location Information: Third Floor East Conference Room. While wireless network connection logs are not as precise as access control data, they provide a broader overview of user movement and dwell time within the building, offering crucial spatial information for determining occupancy status. These two data sources together constitute a raw profile of user spatiotemporal activity within the building.

[0031] After obtaining the raw data containing sensitive personal information, the next step is step S12. This step protects user privacy and unifies user identities across different data sources. First, data cleaning is performed, including identifying and removing invalid or erroneous records, such as data items with incorrect timestamp formats or missing key fields, and processing duplicate attendance or connection records. Then, crucial anonymization processing is performed. Employee IDs are extracted from the raw HR attendance data, and device MAC addresses are extracted from the raw WiFi connection logs; these are direct or indirect personal identifiers. To sever the association between these identifiers and real individuals, a preset, irreversible hash function, such as the Secure Hash Algorithm 256 (SHA-256), is used to calculate a fixed-length, unreverse-cryptoblind string for each unique identifier, serving as the user's anonymous identifier. For example, employee ID 1024 and its associated device MAC addresses A1-B2-C3-D4-E5-F6, after being confirmed as belonging to the same user through mapping, both generate the same anonymous identifier using the SHA-256 function, such as "fd8a839e...". After processing, replace the employee ID: 1024 in the original data with the anonymous user identifier: fd8a839e..., and similarly replace the device MAC address: A1-B2-C3-D4-E5-F6 with the anonymous user identifier: fd8a839e..., thus obtaining anonymous HR data and anonymous WiFi logs that retain all time and event information. The output of this step is two independent datasets with the same content as the original data, but all personal identifiers have been replaced with secure anonymous identifiers.

[0032] Next, step S13 is executed. This process integrates data from different sources but belonging to the same anonymous user into a single event sequence in chronological order. Specifically, using the anonymous user identifier as the key, all records in the anonymous HR data and anonymous WiFi logs are aggregated. Then, all event records for each anonymous user are strictly sorted in ascending order according to the timestamp of the event. For example, for a user with the anonymous user identifier "fd8a839e...", there is a work attendance record in the anonymous HR data for October 27, 2025, at 08:55:12; and a connection record in the anonymous WiFi log at 09:01:45. After merging, the user's unified anonymous event stream will contain two events arranged chronologically: (Time: 08:55:12, Event Type: HR Work Attendance), followed by (Time: 09:01:45, Event Type: WiFi Connection). In this way, fragmented information describing the same user behavior, originally scattered across different datasets, was integrated into a coherent, unified, and time-evolving event stream. This unified anonymous event stream fully depicts the entire trajectory of each anonymous user's interactions with the building throughout the day.

[0033] Next, step S14 is executed. First, a fixed time resolution Δt needs to be set to discretize the continuous time axis. This value needs to balance precision and computational complexity; a value of 15 minutes is acceptable. Under this setting, a 24-hour day is evenly divided into N = 24 * (60 / 15) = 96 consecutive time slices, i.e., time slice 0 (00:00-00:15), time slice 1 (00:15-00:30), up to time slice 95 (23:45-24:00). Then, the unified anonymous event stream for each anonymous user is traversed. For the event data of a particular anonymous user on a given day, the processing program checks whether any activity records of that user exist within each time slice. If at least one event record for the user (such as a check-in record at 08:55:12) can be found within the time interval represented by the i-th time slice (e.g., time slice 35 represents 08:45-09:00), then the i-th position of the corresponding 96-dimensional binary vector for that day is marked as present and assigned a value of 1; conversely, if there are no activity records within the time slice, the corresponding position is marked as absent and assigned a value of 0. For example, for a user with the identifier "fd8a839e...", the check-in event at 08:55 sets the 35th element of their historical behavior vector representing 08:45-09:00 to 1, and their wireless network connection event at 09:01 sets the 36th element representing 09:00-09:15 to 1. After iterating through all 96 time slices of a day, the user's historical behavior vector for that day is obtained. This is a sequence of 96 digits consisting of 0s and 1s, for example, [0,0,...,0,1,1,1,...,1,0,...,0]. Applying this process to the data of all anonymous users across all historical days aggregates the data to form the final user historical behavior sequence. This sequence is a large dataset, and its structure can be viewed as an M×N matrix, where M is the total number of anonymous users, N is the total number of time slices per day (96), and each value (0 or 1) in the matrix precisely reflects the historical presence of a specific user within a specific time slice.

[0034] In a private office within an office building environment, passive infrared (PIR) sensors, carbon dioxide (CO2) concentration sensors, and indoor temperature sensors are deployed, forming the infrastructure for environmental sensing. When a control decision is needed for the office's air conditioning, a data acquisition and processing flow is triggered. The first step is S15, capturing a snapshot of the raw environment at the moment of the decision. The current timestamp serves as the starting point and baseline for the entire real-time processing flow. It is a high-precision time stamp provided by the central control unit and synchronized via Network Time Protocol (NTP). For example, the current timestamp for a decision trigger is 14:30:00 on October 27, 2025. At this timestamp, the latest signal readings are acquired from the corresponding sensor hardware interfaces or data buses. The raw PIR sensor signals originate from passive infrared sensors installed at the room entrance or on the ceiling. These sensors detect changes in infrared radiation emitted by the human body to determine if someone is moving. Their output is a binary time-series signal, where a value of 1 represents detected movement and a value of 0 represents no movement detected. These signals are continuously acquired and uploaded at a certain frequency (e.g., 1 Hz). Therefore, the acquired raw PIR sensor signal is a series of timestamped binary values, such as (...(14:29:58,0),(14:29:59,1),(14:30:00,1)). The raw CO2 concentration signal comes from a non-dispersive infrared (NDIR) carbon dioxide sensor deployed indoors. This sensor calculates the CO2 concentration in the air by measuring the degree to which CO2 molecules absorb infrared light of a specific wavelength, in parts per million (ppm). Human respiration is the main source of indoor CO2 concentration, so this signal is an important basis for determining whether there are people and the number of people. Its output is a continuous time series signal. For example, if sampled at a frequency of once every 10 seconds, the acquired raw CO2 concentration signal is a series of timestamped concentration values, such as (...(14:29:50,810.5),(14:30:00,812.2),(14:30:10,813.9)). The raw indoor temperature signal is collected by indoor temperature sensors (such as thermistors). It reflects the current thermal comfort level of the environment, expressed in degrees Celsius (°C). This signal not only provides direct feedback for air conditioning control, but its trend is also related to human activity to some extent. Similar to the CO2 signal, it is also a continuous time series signal sampled at a certain frequency, for example (...(14:29:50,24.5),(14:30:00,24.6),(14:30:10,24.6)).

[0035] After acquiring the raw signal, since continuous signals are easily interfered with by factors such as ambient airflow and sensor noise, resulting in irregular spikes or peaks, the process proceeds to step S16. This step includes two sub-processes: filtering and noise reduction, and data normalization. The first is median filtering, a non-linear digital filtering technique particularly effective at eliminating isolated impulse noise (peaks) in the signal. In practice, a filter window size w needs to be preset. An optimal balance needs to be struck between effectively filtering signal noise and maintaining a sufficiently fast response speed to changes in the real environment, based on empirical analysis of historical sensor data; for example, w=5. For the current timestamp, i.e., the CO2 concentration value at 14:30:00, w consecutive sampling points around it are selected, including the current point. If the CO2 sensor sampling period is 10 seconds, then five sampling points from 14:29:40 to 14:30:20 are selected. The original CO2 concentration readings at these five points are [808.1, 809.5, 855.4, 811.2, 812.3]. The 855.4 ppm reading might be an invalid spike caused by airflow changes at the moment the window is opened. After sorting these five values ​​to obtain [808.1, 809.5, 811.2, 812.3, 855.4], the median value of 811.2 is taken as the CO2 filtered signal value for the current timestamp. Compared to mean filtering, median filtering effectively removes outliers without affecting the signal's edge characteristics. Similarly, the same filtering operation is performed on the original indoor temperature signal to obtain the temperature filtered signal. After filtering, minimum-maximum normalization is performed. This aims to eliminate the dimensional differences between different physical quantities (ppm and ℃) and map their values ​​uniformly to a standard, dimensionless [0,1] interval, facilitating subsequent fusion calculations and model processing. Normalization requires pre-setting reasonable operating ranges for each signal, i.e., minimum value X{min} and maximum value X{max}. These values ​​can be set based on building design standards, historical operating data statistics (e.g., taking the 5th and 95th percentiles of historical data), or expert experience. For example, for CO2 concentration in an office environment, X{min} can be set to 400 ppm (close to the outdoor atmospheric background concentration), and X{max} to 2500 ppm (as a relatively high threshold for indoor air quality). For the CO2 filtered signal value of 811.2 ppm obtained in the previous step, its normalized CO2 signal value is calculated as: (811.2-400) / (2500-400)=411.2 / 2100≈0.1958. For indoor temperature, X{min} can be set to 18℃, and X{max} to 30℃. If the filtered temperature value is 24.6℃, its normalized temperature signal value is calculated as: (24.6-18) / (30-18)=6.6 / 12=0.5500.

[0036] Meanwhile, for the raw binary PIR sensor signal, step S17 is executed. The output of the PIR sensor has switching characteristics, making it highly susceptible to brief, invalid trigger signals caused by rapidly passing figures, small animals, or fluctuations in the power grid, known as jitter or bounce. The purpose of de-jitter processing is to filter out these false, transient signals and only confirm persistent state changes. An effective implementation method is to set a time threshold, such as 2 seconds. This threshold is a balance point determined through repeated trials based on actual scenarios, aiming to effectively filter out brief invalid signals caused by people passing by or objects shaking, while ensuring a sufficiently fast response speed to the actual entry and stay of people. When the PIR signal state changes from 0 to 1, the presence of someone is not immediately confirmed. Instead, a timer is started. Only when the 1 state is maintained for more than 2 seconds is the output state officially updated to 1. If the signal jumps back to 0 within 2 seconds, the previous 1 is considered jitter, and this state change is ignored. Similarly, the same logic applies to the change from 1 to 0. For example, at the current timestamp of 14:30:00, although the original PIR signal is 1, by tracing its historical signal sequence, it is found that this 1 state started at 14:29:57 and has continued to the present, lasting for 3 seconds, exceeding the preset threshold of 2 seconds. Therefore, at 14:30:00, the output debouncing PIR signal is confirmed as 1, indicating a valid occupancy event. If the PIR signal becomes 1 at 14:29:59.5 and then changes back to 0 at 14:30:00, the duration of 1 is less than 2 seconds, and the output debouncing PIR signal will still remain 0.

[0037] Finally, all preprocessed signals are aggregated in step S18. Alignment involves strictly binding all signal values ​​processed upstream from different sensors to the unique current timestamp that triggered this decision. This ensures that all data accurately describes the environmental state at the same physical moment, avoiding timestamp misalignment caused by data transmission delays or processing speed differences. Encapsulation combines these aligned, scattered data points into a structured data object, facilitating subsequent program calls and parsing as a whole. In specific implementation, using the current timestamp of October 27, 2025, 14:30:00 as the index, the CO2 normalized signal value 0.1958 and the temperature normalized signal value 0.5500 generated in step S16, as well as the debouncing PIR signal value 1 generated in step S17, are extracted. Then, this information is encapsulated into a data frame. The data frame can be a JSON object or a similar structured format, such as: {"Current Timestamp":"2025-10-27T14:30:00.000Z","Signal":{"CO2 Normalized Signal":0.1958,"Temperature Normalized Signal":0.5500,"Debouncing PIR Signal":1}}.

[0038] In step S2, based on the current timestamp, the occupancy status prediction and static confidence score generation are performed on the user's historical behavior sequence to obtain the predicted occupancy status and static confidence score. Correspondingly, after constructing standardized user historical behavior sequences and current environmental data frames, the entire energy-saving management method enters the core analysis and prediction stage. Simply possessing massive amounts of historical data has no direct value; the key lies in how to extract common, predictable behavioral patterns from these seemingly chaotic sequences of 0s and 1s and apply these patterns to judge future occupancy status. Therefore, this application, based on the current timestamp, performs occupancy status prediction and static confidence score generation on the user's historical behavior sequence using a user profile. This can transform unstructured historical behavior data into a probabilistic prediction of the occupancy status at any future time through a rigorous statistical learning model, and provide a quantified and reliable confidence score for this prediction. This provides a profile information input with deep insights and uncertainty measurement for subsequent dynamic arbitration with real-time perception.

[0039] An exemplary implementation of step S2 of this application involves predicting the occupancy status and generating static confidence scores based on the user's historical behavior sequence using a user profile, based on the current timestamp, to obtain the profile prediction status and the profile static confidence score. This includes: step S21, training a GMM profile model based on the user's historical behavior sequence to obtain a trained GMM profile model; step S22, mapping the current timestamp to a time slice index to obtain a time slice index; step S23, calculating the presence probability based on the time slice index and the trained GMM profile model; and step S24, generating the profile prediction status and the profile static confidence score based on a comparison between the presence probability and a presence determination threshold.

[0040] Specifically, step S2 of this application is performed as follows: The process of this embodiment begins with step S21. This is the cornerstone of the entire profile prediction and is an offline, one-time modeling process. The input is the user historical behavior sequence that has been constructed in the previous steps. This sequence is a huge M×N binary matrix, where M represents the total number of anonymized users in the building and N represents the total number of time slices divided into a day at a fixed time resolution. In this embodiment, if historical data of 500 users has been collected, i.e., M=500, and the time resolution is set to 15 minutes, then the total number of time slices N per day is 96. Therefore, the input data is a 500×96 matrix, and each row is a binary vector of length 96, representing the presence (1) or absence (0) of a user from 0:00 to 24:00 on a certain day in the past. The first step of the processing is model initialization. The profile model selected here is the Gaussian Mixture Model (GMM), which is a powerful probability density estimation method. Its idea is that all data samples are generated by a mixture containing K Gaussian distributions, also called components or clusters. In this scenario, each Gaussian component represents a typical, common daily behavioral pattern. Therefore, a key hyperparameter needs to be preset: the number of clusters, K. The value of K directly determines the granularity of the profile. If the value of K is too small, meaningful differentiated behavioral patterns cannot be distinguished, such as the difference between early arrivals and late departures; if the value of K is too large, overfitting may occur, generating some meaningless and overly fragmented patterns. The value of K can be determined using model selection criteria, such as the Bayesian Information Criterion (BIC) or the Akaike Information Criterion (AIC), or it can be set based on prior knowledge of the work nature of the people in the target building. For example, through preliminary research on office building personnel, it is known that the employees are mainly divided into three categories: those with standard working hours, those who arrive early and leave early, and those who work overtime and leave late. Therefore, in this embodiment, K=3 is set, with the aim of discovering and extracting these three most representative behavioral patterns from the data. The second step in model initialization is to set an initial value for the parameters of these K Gaussian components to initiate subsequent iterative optimization. The complete parameter set of a Gaussian mixture model consists of three parts: mixture weights πk, mean vector μk, and covariance matrix Σk, where k ranges from 1 to K. Before training begins, these parameters can be initially estimated by performing a fast K-means clustering on the data, or simply initialized randomly. Next, the core model training phase begins. This phase uses M row vectors from the user's historical behavior sequence matrix (each vector representing a user's behavior for one day) as training samples, and iteratively trains the parameters of the Gaussian mixture model using the Expectation-Maximization (EM) algorithm. The EM algorithm is a powerful tool for parameter estimation in the presence of latent variables. Here, the specific behavior pattern (Gaussian component) to which each sample, i.e., each user's daily behavior vector, belongs is a latent variable that cannot be directly observed.The EM algorithm gradually approximates the optimal model parameters by alternately executing two steps: expectation (E) and maximization (M). In the E step (expectation step), based on the current parameter estimates (using the initialized parameters from the first iteration), the posterior probability generated by each Gaussian component for each data sample is calculated. That is, the probability that sample i belongs to pattern k is calculated. In the M step (maximization step), the model parameters {πk, μk, Σk} are recalculated and updated using the posterior probabilities calculated in the E step, with the goal of maximizing the log-likelihood function of the entire set of parameters for generating all observed user historical behavior sequence data. This process iterates continuously, alternating between the E and M steps, with each iteration bringing the model parameters closer to the state that best explains the data. When the growth of the model's log-likelihood function value falls below a preset small threshold, or when the preset maximum number of iterations is reached, the algorithm converges, and training ends. After convergence, a set of fixed, optimal model parameters is obtained, which themselves constitute the trained GMM profile model. Specifically, the mixed weight πk is a scalar representing the proportion or prior probability of the k-th behavioral pattern among all user behaviors, and the sum of all πk values ​​is 1. For example, the π obtained after training might be [0.60, 0.15, 0.25]. This means that approximately 60% of the user behavior patterns in the data conform to the first type of pattern, i.e., the standard work pattern; 15% conform to the second type of pattern, i.e., the early arrival and early departure pattern; and 25% conform to the third type of pattern, i.e., the late departure and overtime pattern. The mean vector μk is an N-dimensional (96-dimensional in this case) vector, representing the center or average profile of the k-th behavioral pattern. The j-th element μk{j} in the vector μk takes a value between 0 and 1, which can be intuitively interpreted as the probability that a user following the k-th behavioral pattern is present in the j-th time slice. For example, in the standard work pattern (k=1), the element values ​​in the mean vector μ1 corresponding to the time slices from 9 AM to 5 PM (e.g., time slices 36 to 68) will be very close to 1 (e.g., 0.98), while the element values ​​corresponding to the time slices late at night or early morning will be very close to 0 (e.g., 0.01). For the late-night / overtime pattern (k=3), the element values ​​in the mean vector μ3 corresponding to the time slices from 6 PM to 9 PM (e.g., time slices 72 to 84) may be significantly higher than in other patterns, for example, reaching 0.85. The covariance matrix Σk is an N×N (96×96 in this case) matrix that describes the correlation between the presence states of different time slices within the k-th behavior pattern. The diagonal elements represent the variance of the presence probability of a single time slice, while the off-diagonal elements represent the covariance of the presence states between two different time slices. If, for simplicity, the different time slices are assumed to be independent, the covariance matrix Σk degenerates into a diagonal matrix.For example, a strong positive covariance exists between 9:00 AM and 9:15 AM, meaning that under this pattern, if a user is present at 9:00 AM, they are also highly likely to be present at 9:15 AM, which aligns with the continuity of behavior. When the training process ends, these three sets (K parameters per set) {πk, μk, Σk} are completely saved and solidified. This solidified set of parameters constitutes the trained GMM profile model.

[0041] After the portrait model is trained and solidified, it can enter the online prediction stage. When it is necessary to predict the occupancy status at a specific moment, step S22 is executed first. The input is the trained GMM portrait model (although only its time resolution setting is used here) and a precise current timestamp, which is passed in from the previous step S1. The current timestamp is 14:30:00 on October 27, 2025. Based on the same 15-minute time resolution used during training in step S21, this consecutive timestamp is mapped to its corresponding discrete time slice index j. There are 96 15-minute time slices in a day, with indices starting from 0. 14:30 is located in the (14*60+30) / 15=58th 15-minute segment of the day. Therefore, the time slice index j mapped to by the current timestamp is 58. The output of this step is a simple integer index value: 58.

[0042] After obtaining the time slice index, step S23 is executed, which involves performing the core prediction using the established model. The goal here is to calculate the overall probability of a random user being present in the 58th time slice (14:30-14:45). According to the law of total probability, this overall presence probability is derived after comprehensively considering all K possible behavioral patterns. It is a weighted average of the presence probability of each behavioral pattern at that moment and the prior probability of that behavioral pattern occurring itself. The specific calculation process is as follows: From the model parameters, we already know the prior probability πk of each pattern and the average presence probability μk{j} of each pattern in any time slice j. Therefore, the overall presence probability P{j} in time slice j can be calculated using the following formula: P{j}=Σ(k=1toK)[πk*μk{j}]. Substituting the previously hypothetical parameters, we perform an instance calculation. K=3, time slice index j=58. Pattern 1 (standard working mode): π1=0.60. At 2:30 PM, these users are highly likely to be present, so the 58th element μ1,58 of their mean vector might be 0.98. Pattern 2 (Early Arrival / Early Departure): π2 = 0.15. These users are still working at 2:30 PM, but their presence probability might be slightly lower than the standard pattern; μ2,58 might be 0.95. Pattern 3 (Late Departure / Overtime): π3 = 0.25. These users are at the core of the work period, with the highest presence probability; μ3,58 might be 0.99. Substituting these values ​​into the formula: P{58} = (0.60 * 0.98) + (0.15 * 0.95) + (0.25 * 0.99) = 0.978, meaning the output presence probability is 0.978. This value represents the probability that there are people present in the office area during the current time period of 14:30-14:45, based on accumulated historical experience and identified multiple behavioral patterns.

[0043] Finally, step S24 is executed, transforming the continuous probability value obtained in the previous step into a discrete, decision-making-friendly occupancy status label, and simultaneously providing a quantitative assessment of the certainty of this decision. First, a status determination is performed. A decision threshold, namely the presence determination threshold, needs to be preset, set to 0.5. This is a neutral choice, meaning that when the model predicts a presence probability exceeding 50%, it is determined to be occupied. The calculated presence probability of 0.978 is compared with the presence determination threshold of 0.5. Because 0.978 is much greater than 0.5, the determination result is true. Based on this, a portrait prediction status is generated, with the value being occupied. Next, static confidence is calculated. The portrait static confidence is the degree of certainty the portrait model has regarding its predictions. Its calculation method is related to the final predicted status: if the final determined portrait prediction status is occupied, then the portrait static confidence is directly equal to the calculated presence probability itself. If the final determined portrait prediction status is not occupied, then the portrait static confidence is equal to 1 minus the presence probability, i.e., the probability of leaving. This definition ensures that the static confidence score always falls within the range of [0.5, 1]. The closer the value is to 1, the more confident the model is in its judgment. In this embodiment, since the final determination is an occupied state, the static confidence score of the portrait is equal to the probability of presence, 0.978.

[0044] In step S3, the current environmental data frame is subjected to real-time perception-based occupancy status inference and signal quality assessment to obtain the sensor inferred status and sensor signal quality score. It is understandable that after completing the pattern mining and profile prediction of user historical behavior, another key information pathway in the entire energy-saving management method—real-time environmental perception—also needs to be rigorously processed and interpreted. Physical sensors are the nerve endings connecting digital twins and physical space, but the raw electrical signals transmitted back from these endings naturally contain a mixture of valid information and noise, and may even output completely erroneous information due to equipment aging or environmental interference. If these raw readings are directly adopted without discrimination, not only will it be impossible to accurately respond to occasional occupancy behavior, but it may also lead to more serious energy waste than traditional timing control due to signal misjudgment. Therefore, performing real-time perception-based occupancy status inference and signal quality assessment on the current environmental data frame can achieve a parallel, dual-objective precision processing: on the one hand, it quickly provides an inference conclusion on the instantaneous occupancy status based on the latest data and through a set of preset logic; on the other hand, and more importantly, it performs a deep examination and quantitative scoring of the overall working status and data reliability of the sensor group at this moment by tracing back the signal history over a period of time.

[0045] An exemplary implementation of step S3 of this application involves performing real-time sensing-based occupancy state inference and signal quality assessment on the current environmental data frame to obtain the sensor inferred state and sensor signal quality score, including: step S31, performing time-series window aggregation on historical environmental data frames and the current environmental data frame based on the assessment time window to obtain a sensor data window; step S32, performing multi-dimensional signal quality feature extraction and comprehensive scoring on the sensor data window to obtain a sensor signal quality score; and step S33, performing instantaneous occupancy state inference on the current environmental data frame to obtain the sensor inferred state.

[0046] Specifically, step S3 of this application is implemented in an exemplary manner as follows: The process begins with step S31. This step is to collect sufficient data to analyze the dynamic characteristics of the sensor signal, rather than relying solely on an isolated instantaneous value. It includes three parts: the current environmental data frame is {"Current Timestamp":"2025-10-27T14:30:00.000Z","Signal":{"CO2 Normalized Signal":0.1958,"Temperature Normalized Signal":0.5500,"De-jitter PIR Signal":1}}. The sensor history database is a continuously running archive that stores all historical environmental data frames collected and processed at every past moment (at a preset sampling frequency). The evaluation time window is a preset time length parameter, set based on the time range within which the stability and dynamic changes of the signal need to be examined to be representative. Too short a time window will fail to reflect the trend, while too long a time window will introduce outdated information. In this embodiment, this parameter is set to 1 hour, a typical value that balances trend analysis and response speed. The processing procedure is as follows: Taking the current timestamp of October 27, 2025, at 14:30:00 as the end point, and the evaluation time window spanning one hour, a time interval to be retrieved is determined as [13:30:00, 14:30:00]. Then, a query request is initiated to the sensor historical database to retrieve all historical environmental data frames stored within this one-hour interval. Next, these retrieved historical data frames are merged with the latest current environmental data frames in timestamp order to obtain the sensor data window data structure. It is a dataset containing a complete time series of multiple sensor signals within one hour. Specifically, it may contain: a sequence of 360 normalized CO2 concentration values ​​with a CO2 sampling period of 10 seconds; a sequence of 360 normalized temperature values; and a sequence of 3600 de-jittered PIR binary signal values ​​with a PIR sampling period of 1 second. This data window completely records the dynamic trajectory of environmental changes over the past hour and serves as the data foundation for subsequent signal quality assessment.

[0047] After obtaining the data window containing historical dynamics, the process proceeds to step S32. This step does not treat the sensor signal as an always correct truth value, but rather performs a quantitative assessment of its health status and reliability. An exemplary embodiment of step S32 of this application involves extracting and comprehensively scoring multi-dimensional signal quality features from the sensor data window to obtain a sensor signal quality score, including: step S321, extracting a CO2 signal sequence and a PIR signal sequence from the sensor data window; step S322, extracting stability and abrupt change features from the CO2 signal sequence, and determining the CO2 quality score based on the stability and abrupt change features; step S323, extracting jitter features from the PIR signal sequence, and determining the PIR quality score based on the jitter features; and step S324, calculating the sensor signal quality score based on the CO2 quality score and the PIR quality score.

[0048] First, proceed to step S321. This is essentially a data selection process, separating the two signal time series most directly related to occupancy status judgment from the large data structure generated in the previous step. Next, the quality of each signal is independently evaluated. Step S322 is then executed, which aims to assess the reliability of the CO2 sensor readings. Stability characteristics: Calculate the standard deviation of the CO2 signal sequence for this hour (using raw ppm values ​​here for better understanding of the physical meaning). During the afternoon working hours, the number of people in the office is relatively stable, and the CO2 concentration will remain at a high level but with little fluctuation. A normally functioning sensor should have readings that change smoothly. In this embodiment, by calculating the data within the time window [13:30:00, 14:30:00], the standard deviation of the CO2 concentration is obtained as 15.5 ppm, indicating good signal stability. Abrupt change characteristics: Calculate the first difference of the signal sequence (i.e., the rate of change between two adjacent sampling points) and take the maximum absolute value. This feature aims to capture physically unreasonable instantaneous changes. During working hours, people entering and leaving or opening doors for ventilation may cause small, rapid changes in concentration. In this embodiment, calculations revealed that the absolute value of the maximum single change in CO2 concentration (within 10 seconds) over the past hour was 25 ppm, which is well within a reasonable range. After acquiring the features, a preset formula is used to calculate the CO2 mass fraction. An exemplary embodiment of step S322 of this application involves extracting stability and mutation features from the CO2 signal sequence and determining the CO2 mass fraction based on these features, including: determining the CO2 mass fraction using the following formula:

[0049]

[0050] in, For stability characteristics, It is a mutation characteristic. and The preset attenuation coefficient, This is the CO2 quality score. The formula is a negative exponential function, capable of mapping eigenvalues ​​greater than or equal to 0 to the interval (0,1], making it very suitable as a quality score. It is a natural exponential function. and These are the two feature values ​​extracted above. and These are two preset attenuation coefficients, greater than 0, which control the penalty applied to the final score by stability and mutability characteristics, respectively. These coefficients need to be determined through offline experiments and calibration, and their values ​​define how much fluctuation or how fast a change is unacceptable. For example, the attenuation coefficients are set through calibration. =0.01, =0.005. Substitute the values ​​for calculation: =exp(-0.01*15.5-0.005*25)≈0.7558, where 0.7558 is the real-time mass score of the CO2 sensor, indicating that its current reading has a confidence level of about 75.6% and is in a healthy and reliable working state.

[0051] In parallel, step S323 is executed. Jitter characteristic: This characteristic directly counts the total number of state transitions (from 0 to 1 or from 1 to 0) in the de-jittered PIR signal sequence within the evaluation time window (1 hour). During the afternoon work hours, it is normal for people to be active in the office, which will trigger a certain number of state transitions. In this embodiment, examining the PIR sequence over the past hour revealed a total of 8 state transitions, corresponding to several instances of people getting up or moving around slightly. Then, a similar negative exponential function is used to calculate the PIR quality score: ,in, This is the preset PIR jitter attenuation factor, which also needs to be calibrated to determine which frequency jumps are unacceptable. For example, setting... =0.05 means that the quality score will decay to about 0.36 after jumping about 20 times per hour. Substituting the values ​​into the calculation: =exp(-0.05*8)≈0.6703, where 0.6703 is the current quality score of the PIR sensor.

[0052] Finally, step S324 is executed to obtain the overall reliability score of the sensor group at the current moment by weighted averaging of the quality scores of each individual sensor. The formula is: The weights and These are pre-defined values ​​that reflect the relative importance and inherent reliability of different sensor types in determining occupancy status, and the sum of both is 1. Generally, CO2 concentration is considered a more robust long-term occupancy indicator than PIR, and therefore can be given a higher weight. For example, setting... =0.7, =0.3. Substitute the values ​​to calculate the final sensor signal quality score: =0.7*0.7558+0.3*0.6703≈0.7302, the final output of this step is a scalar value between [0,1]: the sensor signal quality score, which is 0.7302 in this example. This score highly summarizes the performance of the sensor group over the past hour, quantifying the overall reliability of the information they provide at this moment.

[0053] While completing the in-depth assessment of signal quality, it is also necessary to provide an instantaneous occupancy judgment based on the current reading. This is accomplished through step S33, which involves inferring the instantaneous occupancy status of the current environmental data frame to obtain the sensor's inferred status. The input is the current environmental data frame (using only the latest sensor reading) and a preset CO2 occupancy threshold. This threshold is determined with reference to international or domestic indoor air quality standards. For example, the ASHRAE standard recommends that indoor CO2 concentration should not exceed outdoor concentration by 350-700 ppm for extended periods. If the outdoor concentration is 450 ppm, then a threshold of 800 ppm is a reasonable and sensitive setting for determining occupancy. The latest sensor reading is input into a predefined, simple, and efficient logical decision rule. This rule combines the advantages of both sensors: fast and sensitive PIR response, and long-term CO2 indication. The rule is as follows: IF (PIR signal value in the current environmental data frame == 1) OR (CO2 concentration value in the current environmental data frame > CO2 occupancy threshold) THEN sensor inferred status = 'occupancy status' ELSE sensor inferred status = 'non-occupancy status' END IF. In this embodiment, the PIR signal value in the current environmental data frame is 1. Simultaneously, the normalized CO2 value of 0.1958 needs to be restored to its original value, 811.2 ppm. The PIR signal value is checked to be 1, which is true. The CO2 concentration value of 811.2 ppm is checked to be greater than the CO2 occupancy threshold of 800 ppm, which is also true. Since it's an OR logic, only one condition needs to be met. Therefore, the output of the logic rule is the occupancy status. The final output is a string: Sensor Inferred Status, with the value indicating occupancy.

[0054] In step S4, dynamic confidence arbitration and state fusion are performed on the profile prediction state, profile static confidence, sensor inference state, and sensor signal quality score to obtain the fused state. It should be understood that in the preceding steps, two parallel information pathways aimed at exploring building occupancy status have been established separately: one is a probabilistic prediction of user habits formed through deep learning historical data, i.e., a profile; the other is a direct inference of the current environment obtained by processing instantaneous physical signals, i.e., perception. However, these two information sources are generated based on completely different principles—one focusing on statistical laws, and the other based on physical facts. Therefore, conflicting conclusions between them are inevitable, even commonplace. Traditional fusion methods often employ static priority rules; this one-size-fits-all strategy cannot adapt to complex and ever-changing real-world scenarios, leading to rigid decision-making. Therefore, this application performs dynamic confidence arbitration and state fusion on the image prediction state, image static confidence, sensor inference state, and sensor signal quality score. This means that it no longer follows fixed, black-and-white rules, but instead uses the confidence and quality scores that have been carefully quantified in the previous steps as evidence to conduct a dynamic and quantitative weighted game, and finally decides on the fusion state with the highest comprehensive credibility in the current specific situation, thereby ensuring the accuracy and robustness of the control command.

[0055] Figure 4 This is a flowchart of step S4 in the digital twin-based building energy efficiency management method according to an embodiment of this application. Figure 4 As shown, an exemplary implementation of step S4 of this application involves dynamic confidence arbitration and state fusion of the image prediction state, image static confidence, sensor inference state, and sensor signal quality score to obtain a fused state, including: step S41, identifying and quantizing conflict states of the image prediction state and sensor inference state to obtain conflict flag bits; step S42, dynamically modulating the image static confidence and sensor signal quality score based on the conflict flag bits to obtain image dynamic weights and sensor dynamic weights; and step S43, performing a final state adjudication based on weight advantage of the image prediction state and sensor inference state based on the image dynamic weights and sensor dynamic weights to obtain a fused state.

[0056] The following two specific embodiments will be used to describe in detail the aforementioned dynamic confidence arbitration and state fusion process. This process is the brain of the entire method, responsible for making the final intelligent decision on the conclusions of the two heterogeneous information streams. The first embodiment will demonstrate the processing flow when there is no information conflict, and the second embodiment will focus on the process when information conflict occurs.

[0057] Specifically, step S4 of this application is executed as follows: In a conflict-free scenario, the context is completely consistent with the preceding steps. That is, the current timestamp is 14:30:00 on October 27, 2025. At this time, the input of the entire arbitration fusion step (step S4) comes from the outputs of steps S2 and S3: Step S2 (profile prediction): The profile prediction state is occupied, and the profile static confidence score is 0.978. Step S3 (real-time perception): The sensor inference state is occupied, and the sensor signal quality score is 0.7302. The process begins at step S41, quickly determining whether the conclusions of the two information sources are consistent. The processing involves comparing the logical equivalence of the two input state strings, namely the profile prediction state and the sensor inference state. In this example, 'occupied state' is compared with 'occupied state'. Since the two are completely equal, it indicates that the profile prediction is consistent with the sensor perception conclusion. Therefore, a binary conflict flag is instantiated and assigned the value 0, and the output is the conflict flag with the value of integer 0. This 0 signal indicates that the current information is in a harmonious state, and there is no need to activate the conflict resolution mechanism. Next, the process proceeds to step S42, where the speaking weight of the two information sources in the final decision is dynamically adjusted based on whether a conflict exists. First, the dynamic weight of the profile is calculated. The calculation of this weight reflects a context-aware mechanism. Its base value is the static confidence level of the profile itself, but it is adjusted based on the presence of conflicts. The complete calculation formula is as follows: ,in, The static confidence level of the portrait is 0.978. It is the conflict flag bit 0 obtained in the previous step, and This is a preset conflict penalty coefficient greater than 0. The magnitude of this coefficient reflects the severity of the reduction in trust level when the profile prediction contradicts the facts (sensor signals). Its value can be optimized through analysis of historical misjudgment cases. Here, it is set... =0.5. Substitute the value to perform the calculation: =0.978×exp(-0.5×0)=0.978. The calculation results show that, in the absence of conflict, the penalty factor is 1, the dynamic weight of the profile is equal to its static confidence, and its original judgment based on historical data is completely preserved. Then, the dynamic weight of the sensor is calculated. In this application, the dynamic weight of the sensor is directly set as its signal quality score. This is an asymmetric design, the underlying logic of which is that the sensor signal quality score... The reliability assessment, derived in step S3 through in-depth analysis of the signal's inherent physical characteristics such as stability and jitter, is already a dynamic and real-time assessment and requires no further adjustment based on conflicts with other information sources. The calculation formula is: Substitute the values: =0.7302. The final output consists of two context-adjusted weight values: the image dynamic weight is 0.978, and the sensor dynamic weight is 0.7302. Finally, the process proceeds to step S43. First, the two dynamic weight values ​​are directly compared. In this example, 0.978 (image) and 0.7302 (sensor) are compared. Obviously, the image dynamic weight is greater than the sensor dynamic weight. Subsequently, the decision rule of the largest weight is applied. The rule is as follows: IF Image dynamic weight > Sensor dynamic weight THEN Select the predicted state of the image ('occupied state') as the final fusion state. ELSE Select the inferred state of the sensor as the final fusion state. Since 0.978 > 0.7302 in this example, the IF condition is satisfied, so the image predicted state is selected as the final result. The final output is a deterministic state value: the fusion state, which is the occupied state.

[0058] In an information conflict scenario, the current timestamp is set to 21:30:00 on October 27, 2025. This is a typical non-working time, but an employee is unexpectedly working overtime in the office. In this scenario, steps S2 and S3 are re-executed to obtain the input for step S4: Step S2 (Profile Prediction): At the time slice of 21:30, according to the trained GMM profile model, the probability of presence for almost all behavioral patterns (standard, early departure, overtime) is very low. After weighted averaging using the full probability formula, the calculated probability of presence is only 0.04. Since 0.04 is much smaller than the presence determination threshold of 0.5, the profile prediction state is an unoccupied state. Its static confidence level is 1-0.04=0.96, indicating that the profile model predicts with extremely high certainty that no one is present at this moment. From step S3 (Real-time Perception): Due to the employee working overtime, the indoor PIR sensor is continuously triggered, and the CO2 concentration also rises and remains at a high level, such as 980ppm. After processing in step S3, the sensor infers that the state is occupied. Meanwhile, due to the clear and stable signal, the sensor signal quality score obtained after quality assessment is a high value, such as 0.88. Step S41 involves conflict state identification. The process compares the non-occupied state with the occupied state. Since the two are not equal, it indicates a clear conflict between the image prediction and real-time perception. Therefore, the conflict flag is assigned a value of 1, and this 1 signal will activate the subsequent conflict arbitration and penalty mechanism. Next, the process proceeds to step S42, where dynamic weight modulation is performed. First, the dynamic weights of the image are calculated. Using the same formula: Substitute the values ​​for this scenario: =0.96, =1, =0.5. =0.96×exp(-0.5×1)≈0.5822, where a crucial change occurs: the portrait model initially had a high confidence of 0.96 in its judgment of no one, but simply because its conclusion conflicted with the sensor's, its final decision influence (dynamic weight) was drastically reduced to 0.5822 by the exponential penalty function. This reflects the core idea of ​​dynamically reducing the trust in historical experience when faced with contradictions between historical experience and current facts. Then, the dynamic weight of the sensor is calculated. : Substitute the values: =0.88, the sensor's weight is still determined by its own signal quality, and its high quality score of 0.88 means that its reading at this moment is very reliable. Finally, the process enters step S43 for the final state decision. The process compares the two dynamic weights: 0.5822 (image) and 0.88 (sensor). At this time, the sensor's dynamic weight is greater than the image's dynamic weight. Applying the decision rule that the one with the largest weight wins, since 0.5822 < 0.88 in this example, the IF condition is not met, and the process enters the ELSE branch. According to the rule, the sensor's inferred state is selected as the final fusion state. The final output is the fusion state, and its value is the occupied state. That is, although the image model trained based on a large amount of historical data gives a prediction of no one with an extremely high confidence of 96%, the dynamic arbitration mechanism does not simply adopt this seemingly authoritative conclusion. Instead, by identifying conflicts and imposing a reasonable penalty on the image's confidence, while fully trusting the high reliability of the quality-verified sensor signal, it ultimately makes a judgment that someone is present, which is consistent with the physical facts. The fusion result of this occupancy status will be transmitted to the downstream air conditioning control module, thereby ensuring the comfort of employees working overtime and avoiding user experience degradation and complaints caused by incorrect air conditioning shutdown. This perfectly solves the fundamental defect of the static fusion strategy in the background technology that cannot cope with occasional and unplanned occupancy behavior.

[0059] An exemplary preferred embodiment of step S4 of this application involves dynamic confidence arbitration and state fusion of the image prediction state, image static confidence, sensor inference state, and sensor signal quality score to obtain a fused state. This includes: step S4-1, identifying and quantizing conflict states in the image prediction state and sensor inference state to obtain conflict flags; step S4-2, based on the conflict flags, calculating dynamic weights for the image static confidence and sensor signal quality score using symmetric cross-penalty and Softmax normalization to obtain image dynamic weights and sensor dynamic weights; and step S4-3, based on the image dynamic weights and sensor dynamic weights, making a final state decision based on weight advantage to obtain the fused state. Specifically, steps S4-1 and S4-3 are identical to steps S41 and S43 in the above embodiments and will not be described further. Here, a detailed implementation of step S4-2 will be described.

[0060] It is understandable that a core challenge in fusing profiling predictions and real-time sensing to determine building occupancy status lies in handling conflicts arising from inconsistencies between the two approaches. Directly comparing the static confidence score of the profiling (a probability value) with the sensor's signal quality score (a heuristic score) may reveal incommensurability—their scales, distributions, and intrinsic meanings differ, making the reliability of the comparison difficult to guarantee. More seriously, employing a simple asymmetric penalty mechanism, penalizing only the profiling confidence score in cases of conflict, implicitly assumes that the sensor is always more reliable than the profiling. However, in the real world, conflicts can arise from both a highly reliable profiling model and a low-quality, near-failure sensor; such asymmetric penalty can mislead decisions based on erroneous sensor data. Therefore, to overcome these shortcomings, a fairer and more intelligent dynamic weighting calculation method is urgently needed. This application introduces a dynamic weight calculation based on conflict flags for the static confidence score of the profile and the quality score of the sensor signal, which establishes a fair and symmetrical game framework. It abandons static rules and one-way penalties, and by allowing the two sources to weaken each other based on the strength of each other's evidence when there is a conflict, and transforming the game result to a unified and comparable scale, it can more robustly and logically determine the final decision weights of the two in the current specific situation.

[0061] An exemplary implementation of step S4-2 of this application involves calculating dynamic weights for the image static confidence score and sensor signal quality score based on a conflict flag, using symmetric cross-penalty and Softmax normalization to obtain the image dynamic weights and sensor dynamic weights. This includes:

[0062] A cross-penalty factor is preset based on the static confidence level of the image, the sensor signal quality score, and the collision flag. The purpose of this step is to introduce an adjustable hyperparameter to set the overall strength of the subsequent cross-penalty mechanism. This cross-penalty factor is denoted as... It is a real number greater than 0. Its function is similar to an adjustment knob. The larger the value, the heavier the punishment for each party due to the strength of the other party's evidence when a conflict occurs, and the more intense the game. The smaller the value, the milder the penalty. Determining this factor requires optimization through offline simulation testing or analysis of massive amounts of historical conflict case data, aiming to find the optimal balance point that maximizes the accuracy of the final decision. For example, in a typical office building scenario, testing can determine a suitable cross-penalty factor. The value is 0.8.

[0063] The competition score is calculated based on the static confidence level of the profile, the sensor signal quality score, the conflict flag, and the cross-penalty factor to obtain the profile competition score and the sensor competition score. This is the core manifestation of the symmetric cross-penalty mechanism, which aims to calculate the intermediate competitiveness score of the two information sources before entering the final weight allocation. This score dynamically reflects the strength of each in the current conflict game. This process is executed through the following two symmetric formulas: The formula for calculating the profile competition score is: ,in, Static confidence level for the portrait. For sensor signal quality, For conflict flags and crossover penalty factors, The competition score for the image is calculated using the following formula: ,in, The competition score is the score for each sensor source. In both formulas, the competition score for each source is based on its initial evidence strength (portrait static confidence level or sensor signal quality score), but its score is reduced only when a conflict occurs (i.e., when the conflict flag is 1). The amount of reduction is proportional to the cross-penalty factor. And the strength of the opponent's evidence. That is, if a source with weak evidence challenges an opponent with extremely strong evidence, its own competition score will be severely penalized, and vice versa. This allows the balance of decision-making to truly tilt towards the side with more sufficient evidence in the current situation. This also greatly enhances the sensitivity of decision-making to the strength of evidence from both sides. In a conflict, the influence of the side with weaker evidence (whether it's a low-confidence profile or a low-quality sensor) will be significantly suppressed, allowing the side with stronger evidence to dominate the final decision. For example, consider the opposite scenario: a highly credible profile (with a static confidence level of 0.95) conflicts with a low-quality sensor (with a sensor signal quality score of 0.6). The profile's competition score will only be slightly penalized (due to the opponent's weak evidence), while the sensor's competition score will be severely penalized for challenging authority, thus correctly suppressing the interference of the low-quality source in subsequent normalization. To illustrate this more clearly, we will continue with the data from the aforementioned Example 2: Information Conflict Scenario. The input for this scenario is: the static confidence level of the profile. =0.96, sensor signal quality score =0.88, conflict flag bit =1. Preset crossover penalty factor. =0.8, substitute into the formula to calculate: Portrait Competition Score =0.96 - 0.8 × 0.88 × 1 = 0.256; Sensor competition score =0.88-0.8×0.96×1=0.112. It can be seen that although the initial confidence level of the portrait (0.96) and the quality score of the sensor (0.88) are very high, their competitiveness scores are significantly reduced under the intense cross-penalty. Moreover, the absolute advantage of the portrait with the higher initial value is reduced, which reflects the balancing effect of the game.

[0064] The image competition score and sensor competition score are normalized using Softmax to obtain the image dynamic weight and sensor dynamic weight. To address the aforementioned incommensurability issue, this application transforms the two competition scores, which differ in dimension and scale, onto a unified scale with clear probabilistic meaning. The Softmax function can transform an arbitrary real number vector into a probability distribution vector with elements ranging from 0 to 1 and a sum of 1. In specific implementation, the image competition score and sensor competition score obtained in the previous step are used as inputs, and their Softmax values ​​are calculated respectively. The formulas are as follows: Image dynamic weight = exp(image competition score) / [exp(image competition score) + exp(sensor competition score)]; Sensor dynamic weight = exp(sensor competition score) / [exp(image competition score) + exp(sensor competition score)], where exp() is the natural exponential function. This function has the characteristic of amplifying differences; that is, small differences in input values ​​are amplified by exponential operations, making the output probability distribution more discriminative and the decision more explicit. Continuing with the calculations from the example above: the profile competition score is 0.256, and the sensor competition score is 0.112. The calculated dynamic weights are: Profile dynamic weight = 1.2917 / 2.4102 ≈ 0.5359; Sensor dynamic weight = 1.1185 / 2.4102 ≈ 0.4641. The sum of these two weights is 1, which can be directly interpreted as follows: given all the current evidence, the posterior probability of the profile predicting the correct source is 53.59%, while the posterior probability of the sensor inferring the correct source is 46.41%. Compared to the original asymmetric scheme, this result more reasonably reflects the evenly matched strength of the two high-confidence sources in the conflict, but the profile side wins by a slight advantage, avoiding the erroneous decision of completely favoring the sensor. This scheme makes the final arbitration process more sensitive to the strength of evidence from both sides, and the decision-making process is more intelligent and logically intuitive. Therefore, the final state decision is made based on the dynamic weights obtained in this step, ensuring that the final output fusion state is no longer a simple choice based on static rules, but a quantitative assessment and optimal judgment of which side is more credible in the current conflict situation, thereby greatly improving the robustness and accuracy of the decision.

[0065] In step S5, air conditioning control commands are generated based on the fused state. That is, after a series of complex and precise steps—from the collection and cleaning of raw data, to dual-path parallel profiling and real-time perception, and finally to the core dynamic conflict arbitration—the entire information processing flow ultimately converges to a unique, high-confidence fused state. However, this occupancy or non-occupancy logical state itself is merely an abstract concept for the air conditioning equipment in the physical world. The air conditioning equipment cannot understand the meaning of occupancy; it can only respond to specific, quantified operational commands, such as setting the temperature to 24 degrees Celsius or turning off the fan. Therefore, generating air conditioning control commands based on the fused state is the final link connecting digital intelligence and physical execution. It is responsible for accurately transforming the qualitative conclusions refined by the upstream decision-making center into a set of specific, operable control parameters that the downstream building automation system can understand and execute, thereby truly transforming the intelligent analysis conclusions of the digital twin model into actual building energy-saving actions.

[0066] Specifically, an exemplary implementation of step S5 of this application is as follows: a control instruction is generated in the output of an information conflict-free scenario, in which the timestamp is 14:30:00 on October 27, 2025, and the final decision output is in an occupied state.

[0067] The core of the process is the application of a pre-defined control logic mapping table. This mapping table defines the operating mode that the air conditioning system should enter under different fusion states, along with its corresponding key parameters. The design of this logic mapping table is based on building type, functional area, season, and corporate energy-saving policies, and must comply with industry comfort standards. This control logic can be concretized into the following rule set: Rule 1: If the fusion state is occupied, activate the comfort mode. In this mode, all control parameter settings prioritize ensuring the thermal comfort of indoor occupants. The temperature setpoint is set to an industry-recognized comfort temperature. For example, in summer cooling conditions, it is set to 24.0 degrees Celsius. This value is based on extensive thermal comfort research and aims to meet the needs of most sedentary office workers. The fan speed is set to automatic or medium. Automatic mode allows air conditioning terminal equipment (such as fan coil units) to automatically adjust the fan speed based on the difference between the indoor temperature and the setpoint, achieving and maintaining the set temperature with maximum efficiency; medium fan speed strikes a balance between ensuring circulation efficiency and avoiding drafts and noise. The operating mode is set to cooling, heating, or ventilation based on the current season and the indoor-outdoor temperature difference. In the scenario of the afternoon of October 27th, if the demand is for cooling, then cooling is selected. Rule 2: If the fusion state is unoccupied, then the energy-saving mode is activated. In this mode, the goal is to maximize energy savings. A wide temperature dead zone is set for the temperature setpoint. For example, in summer, the cooling trigger temperature setpoint is significantly increased to 28.0 degrees Celsius; in winter, the heating trigger temperature setpoint is significantly decreased to 18.0 degrees Celsius. This means that as long as the indoor temperature is within this dead zone, the air conditioning unit and fan do not need to be started. The fan speed is set to off or minimum. The operating mode is set to off, or an automatic protection mode that is only triggered at extreme temperatures (beyond the "dead zone" range). In this embodiment, the input fusion state is occupied. According to the above control logic, rule 1 is matched. The processor then generates a set of parameter instructions for the comfort mode, such as a set of structured air conditioning control instructions as the output. This instruction set can be in JSON format or the BACnet protocol object commonly used in the building automation field, so that it can be parsed and executed by the downstream building management system (BMS) or the direct device controller. The specific content is: {"Instruction Set":{"Temperature Setpoint":24.0,"Fan Speed ​​Setting":"Auto","Operating Mode":"Cooling"}}. After this set of instructions is sent, the building automation system will immediately execute it: adjusting the temperature setpoint of the air conditioning terminal unit located in the office to 24.0 degrees Celsius, switching the fan speed control logic to automatic, and ensuring it is in cooling operation mode. This provides a comfortable environment when someone is in the office.

[0068] In the information conflict scenario, the output generates control instructions with a timestamp of 21:30:00 on October 27, 2025. After dynamic arbitration, the output merged state also shows an occupied state. Although the background of this scenario (late-night overtime) is completely different from the above scenario, and the upstream undergoes a complex conflict resolution process, the processing logic of step S5 is highly modular and consistent. Therefore, when the input merged state is occupied, the processor again applies the aforementioned control logic mapping table and matches rule 1. This reflects the universality of the control logic: as long as it is determined that there is someone in the space, a comfortable environment should be provided, regardless of whether the person is present during normal working hours or unexpectedly working overtime late at night. The processor then generates a completely identical set of parameter instructions oriented towards the comfort mode. The output is also a set of structured air conditioning control instructions, the content of which is completely consistent with the above scenario. After this set of instructions is sent to the building automation system, it will ensure that comfortable cooling services are resumed or continued for employees working overtime at 21:30, a time when the air conditioning would have been turned off in traditional control strategies. This result stands in stark contrast to traditional fixed-time control strategies that shut off air conditioning at specific times, leading to unattended comfort, and to simple, conflict-intolerant fusion strategies that might incorrectly rely on user profile predictions and similarly shut off the air conditioning. It perfectly demonstrates that this invention, through end-to-end intelligent analysis and decision-making, ultimately achieves advanced functionality by providing on-demand services even during unplanned occupancy periods. This avoids ineffective energy waste (when truly unattended) while ensuring users' basic comfort needs under all circumstances, thus achieving the ultimate goal of intelligent and refined energy-saving management.

[0069] In summary, the digital twin-based building energy-saving management method based on the embodiments of this application is explained. It constructs a dynamic confidence arbitration and state fusion framework to replace the static and rigid rules used in the prior art to handle information conflicts. This method does not simply choose between user profiles and environmental perception as information sources, but first performs parallel and independent quantitative evaluation of both: on the one hand, it extracts the predicted state from the user's historical behavior and generates a static confidence score for the profile to measure the past reliability of the prediction; on the other hand, when parsing real-time environmental data to infer the current state, it simultaneously evaluates a sensor signal quality score to determine the validity of the current sensor signal. When the conclusions of the two information sources conflict, the system initiates a dynamic arbitration mechanism, adjusting and adjudicating the weights of the profile static confidence score and the sensor signal quality score in real time and dynamically, ultimately fusing an occupancy state with the highest credibility in the current context. This solves the fundamental defects of static fusion strategies in the background technology, such as the inability to dynamically adjust credibility according to context and the lack of quantification of uncertainty. It enables the system to respond more intelligently and flexibly to ambiguity and conflict scenarios in the real world, thereby significantly improving the accuracy and robustness of occupancy status judgment.

[0070] Figure 5 This is a block diagram of a digital twin-based building energy efficiency management system according to an embodiment of this application. Figure 5 As shown, the building energy-saving management system 100 based on digital twin according to an embodiment of this application includes: a multi-source data acquisition module 110, used to acquire user historical behavior sequences and current environmental data frames; a profile analysis module 120, used to perform user profile-based occupancy status prediction and static confidence generation on the user historical behavior sequences based on the current timestamp to obtain profile prediction status and profile static confidence; a sensor status quality analysis module 130, used to perform real-time perception-based occupancy status inference and signal quality assessment on the current environmental data frames to obtain sensor inference status and sensor signal quality score; a dynamic confidence arbitration and fusion module 140, used to perform dynamic confidence arbitration and status fusion on the profile prediction status, profile static confidence, sensor inference status, and sensor signal quality score to obtain a fused status; and an air conditioning control command generation module 150, used to generate air conditioning control commands based on the fused status.

[0071] Here, those skilled in the art will understand that the specific operations of each step in the above-described digital twin-based building energy efficiency management system have been referenced above. Figures 1 to 4 The description of the digital twin-based building energy efficiency management method is detailed here, and therefore, its repeated description will be omitted.

Claims

1. A building energy conservation management method based on digital twins, characterized in that, include: Obtain the user's historical behavior sequence and the current environment data frame; Based on the current timestamp, the user's historical behavior sequence is used to predict the occupancy status and generate static confidence based on the user profile to obtain the profile prediction status and the profile static confidence. The current environmental data frame is used to perform occupancy status inference and signal quality assessment based on real-time perception to obtain sensor inferred status and sensor signal quality score; Dynamic confidence arbitration and state fusion are performed on the image prediction state, image static confidence, sensor inference state, and sensor signal quality score to obtain a fused state. This includes: identifying and quantizing conflict states in the image prediction state and sensor inference state to obtain conflict flags; dynamically modulating the image static confidence and sensor signal quality score based on the conflict flags to obtain image dynamic weights and sensor dynamic weights; and performing a final state adjudication based on weight advantage on the image prediction state and sensor inference state based on the image dynamic weights and sensor dynamic weights to obtain the fused state. Based on the merged state, air conditioning control commands are generated.

2. The building energy conservation management method based on digital twins according to claim 1, characterized in that, Obtain the user's historical behavior sequence and the current environment data frame, including: Obtain raw HR attendance data and raw WiFi connection logs; Data cleaning and anonymization were performed on the raw HR attendance data and raw WiFi connection logs to obtain anonymous user identifiers, anonymous HR data, and anonymous WiFi logs. To obtain a unified anonymous event stream, spatiotemporal event stream is obtained by fusing and discretizing anonymous user identifiers, anonymous HR data, and anonymous WiFi logs. The user's historical behavior sequence is constructed based on a unified anonymous event stream.

3. The building energy conservation management method based on digital twins according to claim 1, characterized in that, Acquiring user historical behavior sequences and current environment data frames also includes: Acquire the raw PIR sensor signal, raw CO2 concentration signal, raw indoor temperature signal, and current timestamp; The original CO2 concentration signal and the original indoor temperature signal were subjected to median filtering and normalization to obtain the CO2 normalized signal and the temperature normalized signal. The original PIR sensor signal is de-jittered to obtain the de-jittered PIR signal; The current timestamp, CO2 normalized signal, temperature normalized signal, and debouncing PIR signal are aligned and encapsulated to obtain the current environment data frame.

4. The building energy conservation management method based on digital twins according to claim 1, characterized in that, Based on the current timestamp, the occupancy status prediction and static confidence score generation are performed on the user's historical behavior sequence to obtain the profile prediction status and profile static confidence score, including: Based on the user's historical behavior sequence, the GMM profile model is trained to obtain a trained GMM profile model. Map the current timestamp to a time slice index to obtain the time slice index; Based on the time slice index and the trained GMM profile model, the probability of presence is calculated. Based on the comparison between the probability of presence and the threshold for determining presence, the predicted state of the portrait and the static confidence level of the portrait are generated.

5. The building energy conservation management method based on digital twins according to claim 1, characterized in that, The current environmental data frame is used to perform occupancy state inference and signal quality assessment based on real-time perception to obtain sensor inferred state and sensor signal quality score, including: Based on the evaluation time window, the historical environmental data frames and the current environmental data frames are aggregated into a time-series window to obtain the sensor data window. Multidimensional signal quality feature extraction and comprehensive scoring are performed on the sensor data window to obtain the sensor signal quality score; Instantaneous occupancy status is inferred from the current environmental data frame to obtain the sensor inferred status.

6. The building energy conservation management method based on digital twins according to claim 5, characterized in that, Multidimensional signal quality feature extraction and comprehensive scoring are performed on the sensor data window to obtain the sensor signal quality score, including: Extract the CO2 signal sequence and PIR signal sequence from the sensor data window; Stability and mutation characteristics were extracted from the CO2 signal sequence, and the CO2 mass fraction was determined based on these characteristics. Jitter features are extracted from PIR signal sequences, and PIR quality scores are determined based on these jitter features; The sensor signal quality score is calculated based on the CO2 quality score and the PIR quality score.

7. The building energy conservation management method based on digital twins according to claim 6, characterized in that, The stability and abrupt change features are extracted from the CO2 signal sequence, and the CO2 mass score is determined based on these features, including: determining the CO2 mass score using the following formula, wherein the formula is: in, For stability characteristics, It is a mutation characteristic. and The preset attenuation coefficient, This represents the mass fraction of CO2.

8. A building energy-saving management system based on digital twins, characterized in that, include: The multi-source data acquisition module is used to acquire user historical behavior sequences and current environment data frames; The profile analysis module is used to predict the occupancy status and generate static confidence scores based on the user's historical behavior sequence based on the current timestamp, so as to obtain the profile prediction status and profile static confidence score. The sensor state quality analysis module is used to perform real-time sensing-based occupancy state inference and signal quality assessment on the current environmental data frame to obtain the sensor inferred state and sensor signal quality score. The dynamic confidence arbitration and fusion module is used to perform dynamic confidence arbitration and state fusion on the image prediction state, image static confidence, sensor inference state, and sensor signal quality score to obtain a fused state. This includes: identifying and quantizing conflict states in the image prediction state and sensor inference state to obtain conflict flags; dynamically modulating the image static confidence and sensor signal quality score based on the conflict flags to obtain dynamic image weights and dynamic sensor weights; and performing a final state adjudication based on weight advantage on the image prediction state and sensor inference state based on the dynamic image weights and dynamic sensor weights to obtain the fused state. The air conditioning control command generation module is used to generate air conditioning control commands based on the fusion status.

Citation Information

Patent Citations

  • Intelligent building energy conservation and emission reduction digital twin management system and method

    CN120295260A

  • Dynamic substrate management for digital twin models

    US20250036827A1