Building full-factor mapping management and control method based on digital twin model
Patent Information
- Application Number
- CN202610773753.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-01
- Publication Date
- 2026-08-28
AI Technical Summary
[0005]有鉴于此,本发明提供一种基于数字孪生模型的建筑全要素映射管控方法,能够解决现有技术中存在建筑全要素数字孪生平台在突发告警引发大量并发推理任务时,固定资源分配策略无法同时保障三维渲染帧率与实时推理响应速度的技术问题
[0026]本发明通过构建全要素状态自适应映射模型,以跨模态注意力融合机制将渲染负载感知与算力资源调度耦合为统一决策过程,解决了固定资源分配策略无法动态平衡三维渲染与实时推理算力需求的技术问题。
Smart Images

Figure CN122657368A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of digital twin technology, and specifically relates to a method for mapping and managing all elements of a building based on a digital twin model. Background Technology
[0002] The field of building digital twins has widely adopted the fusion of 3D models and IoT data to achieve visualized management and control of all elements of a building, including equipment, space, and energy consumption. Current platforms typically allocate graphics processor memory and CPU thread pool resources in a fixed ratio to 3D rendering tasks and AI inference tasks, and control model accuracy through static hierarchical detail algorithms to maintain stable frame rates and inference response during daily operation.
[0003] However, while the aforementioned fixed resource allocation strategy can function under normal loads, in sudden scenarios such as fire alarms or equipment malfunctions, the surge in alarm concurrency leads to a rapid buildup in the AI inference task queue. At this time, 3D rendering tasks still occupy a large amount of pre-allocated video memory and thread resources, and inference tasks cannot obtain sufficient computing power in a timely manner, resulting in a significant increase in real-time response latency. Conversely, in low-load scenarios, the computing power reserved for inference tasks remains idle for a long time, causing the 3D rendering accuracy to fail to fully utilize the remaining resources, resulting in a waste of computing power.
[0004] In existing technologies, the lack of a mechanism for jointly sensing and dynamically reallocating computing resources between rendering and inference loads leads to irreconcilable resource competition between rendering and inference tasks when both alarm concurrency and GPU memory usage increase simultaneously. Fixed allocation strategies fail to either reduce the allocation of rendering resources to inference tasks or restore high-precision rendering after load reduction, resulting in a dual performance imbalance: inference queuing during high loads and rendering limitations during low loads. In other words, existing technologies present a technical problem where fixed resource allocation strategies cannot dynamically balance the computing power demands of 3D rendering and real-time inference in sudden high-concurrency inference scenarios for building full-element digital twin platforms. Summary of the Invention
[0005] In view of this, the present invention provides a method for mapping and managing all building elements based on a digital twin model, which can solve the technical problem in the prior art where the fixed resource allocation strategy cannot simultaneously guarantee the 3D rendering frame rate and the real-time inference response speed when a sudden alarm triggers a large number of concurrent inference tasks in the digital twin platform for all building elements.
[0006] This invention is implemented as follows: This invention provides a method for mapping and managing all building elements based on a digital twin model, comprising the following steps:
[0007] A three-dimensional digital twin model is constructed for all elements of the building, and a unique identity and full attribute information database are configured for each independent element to achieve a one-to-one mapping between the physical building and the three-dimensional digital twin model;
[0008] Establish standardized data access interfaces, unify time stamps through a hybrid logical clock mechanism, use sliding window buffer sorting to repair disordered data, and accurately bind multi-source heterogeneous real-time data with corresponding elements in the three-dimensional digital twin model;
[0009] An octree spatial index adaptive hierarchical detail algorithm is adopted, combined with view frustum culling and occlusion removal, dynamically loading models of different precision according to view distance, and jointly adjusting rendering precision level parameters and resource allocation strategies through a full-element state adaptive mapping model.
[0010] The multidimensional joint distribution of historical building energy consumption data is extracted using a sliding time window. The second-order Wasserstein distance is calculated using the Sinkhorn iterative algorithm, and a second-order Wasserstein distance time series curve is constructed. The statistical process change point is detected by the cumulative sum control chart method, and the energy consumption control strategy is adjusted according to the interval to which the second-order Wasserstein distance belongs.
[0011] A heterogeneous computing resource pool is built based on Kubernetes, and independent graphics processor nodes are allocated to real-time inference tasks and preemptive scheduling strategies are configured. Priority queues are used to distinguish between emergency alarm inference tasks and background analysis tasks.
[0012] The full-attribute information database contains comprehensive information on equipment model, installation location, commissioning time, maintenance records, real-time operating data address, and control command interface. The unique identifier serves as the core index key for data binding and work order flow.
[0013] The hybrid logic clock mechanism refers to superimposing a logic counter on top of a physical clock, so that data packets from the same device arriving at the platform through different transmission paths all carry a monotonically increasing composite timing stamp, thereby achieving timing consistency repair in scenarios such as out-of-order arrival, clock drift, and data retransmission.
[0014] The sliding window buffer sorting refers to maintaining a fixed-length time window within the data access buffer, rearranging the data within the window according to composite time stamps, and then submitting it to the state machine of the three-dimensional digital twin model. The device parameter update adopts an eventual consistency model plus an event sourcing mechanism.
[0015] The octree spatial index adaptive hierarchical detail algorithm refers to recursively dividing the three-dimensional building space into hierarchical subspaces according to the octree structure. The geometry in each subspace corresponds to different pre-generated facet precision versions under different viewing distance conditions. The platform dynamically selects the loading precision based on the distance between the current viewpoint and the center of the subspace.
[0016] The full-element state adaptive mapping model consists of three parts: an input encoding layer, a cross-modal attention fusion layer, and a resource allocation decision layer. The input encoding layer receives five types of input parameters: the number of elements, the histogram of viewpoint distance distribution, the graphics processor memory usage rate, the CPU thread pool queue depth, and the number of alarm concurrency. These parameters are mapped into fixed-dimensional embedding vectors through independent fully connected encoders.
[0017] The cross-modal attention fusion layer uses each embedded vector as a key-value pair and calculates the dynamic weights of different input parameter dimensions on resource allocation decisions through a multi-head self-attention mechanism. The attention weights of graphics processor memory utilization and alarm concurrency are automatically increased by the attention mechanism in high-concurrency scenarios.
[0018] The resource allocation decision layer outputs three branches: the first branch outputs the rendering accuracy level parameter; the second branch outputs the graphics processor memory allocation ratio; and the third branch outputs the work-stealing algorithm trigger threshold of the rendering thread and the rule engine thread in the central processing unit thread pool.
[0019] The overall load index is calculated by weighted summation of GPU memory utilization, CPU thread pool queue depth, and alarm concurrency. When the overall load index is not lower than the high load threshold, the lowest rendering accuracy level is output, and the upper limit of 3D rendering memory usage in the GPU memory allocation ratio is compressed to a low proportion. When the overall load index is not lower than the medium load threshold and lower than the high load threshold, the medium rendering accuracy level is output, and the upper limit of 3D rendering memory usage is a medium proportion. When the overall load index is lower than the medium load threshold, the high rendering accuracy level is output, and the upper limit of 3D rendering memory usage is a high proportion.
[0020] The training of the all-element state adaptive mapping model uses a weighted sum of cross-entropy loss and mean squared error loss as the total loss function. The rendering accuracy level parameter branch uses cross-entropy loss, while the graphics processor memory allocation ratio branch and the work-stealing algorithm trigger threshold branch use mean squared error loss. An adaptive moment estimation optimization algorithm is used to update the parameters.
[0021] The Sinkhorn iterative algorithm refers to introducing an entropy regularization term into the objective function of the optimal transmission problem, transforming the original linear programming problem into a form that is solved iteratively by matrix scaling; the second-order Wasserstein distance refers to the inter-distribution distance defined by the squared Euclidean distance as the basic cost function under the optimal transmission framework.
[0022] The cumulative sum control chart method refers to the cumulative summation of the deviation of the second-order Wasserstein distance time series. When the cumulative sum exceeds the statistical control upper limit, it is determined as a drift point. The normal interval and the drift warning threshold are determined by fitting the base period distribution of at least 12 months of building historical energy consumption data.
[0023] When the second-order Wasserstein distance exceeds the drift warning threshold, the energy consumption distribution drift diagnosis process is automatically triggered. The optimal transmission plan matrix is analyzed to identify which regions or systems the energy consumption is shifting to which modes, locate the source of the drift, and then adjust the energy consumption control parameters of the corresponding region or system.
[0024] This also includes: based on a five-dimensional hierarchical permission control system, recording the entire process of all user operations in a log, automatically triggering warnings for unauthorized access, and incorporating the extension and revocation of temporary permissions in emergency scenarios into log auditing; the five-dimensional hierarchical permission control system performs cross-authorization configuration for all control objects on the platform from five orthogonal dimensions: functional dimension, data dimension, spatial dimension, device dimension, and operational dimension.
[0025] The high load threshold is 0.85 times the standard reference value of the comprehensive load index, and the medium load threshold is 0.6 times the standard reference value of the comprehensive load index. The low ratio is 30% of the currently available video memory, the medium ratio is 55% of the currently available video memory, and the high ratio is 80% of the currently available video memory. The initial learning rate ranges from 0.0001 to 0.001, and is dynamically decayed using a cosine annealing scheduling strategy. The total number of training samples is not less than 50,000, and they are divided into training set, validation set, and test set in a ratio of 8:1:1.
[0026] This invention solves the technical problem that fixed resource allocation strategies cannot dynamically balance the computing power requirements of 3D rendering and real-time inference by constructing a full-element state adaptive mapping model and coupling rendering load perception and computing power resource scheduling into a unified decision-making process through a cross-modal attention fusion mechanism.
[0027] The full-feature state adaptive mapping model takes GPU memory utilization, CPU thread pool queue depth, alarm concurrency, feature quantity, and viewpoint distance distribution histogram as input. Through a cross-modal attention fusion layer, it automatically identifies the priority of inference tasks in high-concurrency scenarios and outputs three-way decisions: rendering accuracy level parameters, GPU memory allocation ratio, and workload-stealing algorithm trigger threshold. This drives the platform to proactively compress rendering resources and prioritize inference response during sudden alarms, while reversing the computing power allocation to high-precision rendering under low load. The introduction of the attention mechanism automatically gives higher weight to the two most sensitive indicators, GPU memory utilization and alarm concurrency, under high concurrency, ensuring that resource reallocation decisions match actual load changes in real time, rather than relying on manually preset fixed thresholds.
[0028] In summary, this invention solves the technical problem mentioned in the background art that the fixed resource allocation strategy of the building full-element digital twin platform cannot dynamically balance the computing power requirements of 3D rendering and real-time inference in sudden high-concurrency inference scenarios. Attached Figure Description
[0029] Figure 1 This is a flowchart of the method of the present invention.
[0030] Figure 2 This is a graph showing the relationship between the number of concurrent alarms, the overall load index, and the percentage of rendering video memory in a fire alarm linkage scenario over time.
[0031] Figure 3 This is a graph showing the overlay relationship between the second-order Wasserstein distance time series curves and the cumulative sum control chart for each month.
[0032] Figure 4 This is a graph showing the distribution of video memory usage and task queue depth for real-time inference and 3D rendering tasks under different comprehensive load index ranges. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0034] like Figure 1 The diagram shown is a flowchart of a building full-element mapping and control method based on a digital twin model provided by the present invention. This method includes the following steps:
[0035] S01. Construct a three-dimensional digital twin model for all building elements, and assign a unique identity and full attribute information database to each independent element to achieve a one-to-one mapping between the physical building and the three-dimensional digital twin model;
[0036] S02. Establish a standardized data access interface, unify the time stamp through a hybrid logical clock mechanism, use a sliding window to buffer and sort out disordered data, and accurately bind multi-source heterogeneous real-time data with corresponding elements in the three-dimensional digital twin model.
[0037] S03. The Octree Spatial Index Adaptive Hierarchical Details Algorithm is adopted, which combines view frustum culling and occlusion removal. Different precision models are dynamically loaded according to the view distance, and the rendering precision level parameters and resource allocation strategies are jointly adjusted through the full-element state adaptive mapping model.
[0038] S04. Extract the multidimensional joint distribution of building historical energy consumption data using a sliding time window, calculate the second-order Wasserstein distance using the Sinkhorn iterative algorithm, construct the second-order Wasserstein distance time series curve, detect statistical process change points using the cumulative sum control chart method, and adjust the energy consumption control strategy according to the interval to which the second-order Wasserstein distance belongs.
[0039] S05. Build a heterogeneous computing resource pool based on Kubernetes, allocate independent graphics processor nodes for real-time inference tasks and configure a preemptive scheduling strategy, and distinguish between emergency alarm inference tasks and background analysis tasks through priority queues.
[0040] Optional features include: based on a five-dimensional hierarchical access control system, recording the entire process of all user operations in a log, automatically triggering warnings for unauthorized access, and incorporating the extension and revocation of temporary permissions in emergency scenarios into log auditing to achieve closed-loop traceability of the mapping and control of all building elements.
[0041] The full-attribute information database contains comprehensive information on equipment model, installation location, commissioning time, maintenance records, real-time operating data address, and control command interface. The unique identifier serves as the core index key for subsequent data binding and work order transfer.
[0042] The hybrid logic clock mechanism refers to superimposing a logic counter on top of a physical clock, so that data packets from the same device arriving at the platform through different transmission paths all carry a monotonically increasing composite time stamp, thereby achieving time consistency repair in scenarios such as out-of-order arrival, clock drift, and data retransmission at the data access layer; the sliding window buffer sorting refers to maintaining a fixed-length time window within the data access buffer, rearranging the data within the window according to the composite time stamp, and then submitting it to the state machine of the 3D digital twin model. Device parameter updates adopt an eventual consistency model plus an event tracing mechanism to ensure that the state of the 3D digital twin model is monotonically increasing and traceable; the multi-source heterogeneous real-time data sources include IoT sensing devices, building equipment management systems, security management systems, and energy management systems; the end-to-end latency refers to the entire link time from the generation of data from IoT sensing devices to the completion of the state display of the 3D digital twin model, and the end-to-end latency is controlled within 200ms.
[0043] The octree spatial index adaptive hierarchy of details algorithm refers to recursively dividing the 3D architectural space into hierarchical subspaces according to an octree structure. The geometry in each subspace corresponds to a pre-generated version with different face count precision under different viewing distances. The platform dynamically selects the loading precision based on the distance between the current viewpoint and the center of the subspace, compressing the actual number of rendered faces to within 2 million, thereby ensuring stable frame rate in the WebGL environment. The view frustum culling refers to submitting rendering calls only for geometry within the view frustum of the current camera, and geometry outside the view frustum does not participate in rendering calculations. The occlusion culling refers to skipping rendering calls for background geometry that is completely occluded by foreground geometry, further reducing the computational load on the graphics processor. The hierarchy of details switching threshold is determined through multiple rounds of comparative experiments on frame rate and visual distortion under different face count preset schemes. Finally, the switching distance range with a frame rate of not less than 30fps and imperceptible visual jumps is selected as the formal parameter.
[0044] The specific structure of the all-factor state adaptive mapping model is as follows: the all-factor state adaptive mapping model consists of three parts: an input encoding layer, a cross-modal attention fusion layer, and a resource allocation decision layer. The input encoding layer receives five types of input parameters: the number of features in the current frame, the histogram of viewpoint distance distribution, the GPU memory utilization, the CPU thread pool queue depth, and the number of alarm concurrency. These are mapped to fixed-dimensional embedding vectors through independent fully connected encoders. The cross-modal attention fusion layer uses each embedding vector as a key-value pair and calculates the dynamic weights of different input parameter dimensions on resource allocation decisions through a multi-head self-attention mechanism. The attention weights of GPU memory utilization and alarm concurrency are automatically increased by the attention mechanism in high-concurrency scenarios, thus tilting resource allocation decisions towards ensuring real-time inference tasks. The resource allocation decision layer outputs three branches: the first outputs rendering precision level parameters to drive the precision switching of the octree spatial index adaptive hierarchical detail algorithm; the second outputs the GPU memory allocation ratio to control the memory partition boundary between 3D rendering tasks and AI inference tasks; and the third outputs the work-stealing algorithm trigger threshold for rendering threads and rule engine threads in the CPU thread pool. When the rule engine thread queue depth exceeds the work-stealing algorithm trigger threshold, the rendering thread actively contributes idle computing power to the rule engine thread pool. The three outputs are synchronously distributed to the Kubernetes heterogeneous computing resource pool via a unified scheduler, enabling on-demand allocation of weight calculation resources between neurons, priority isolation of gradient propagation between layers, and task affinity binding between different unified computing device architectures. The GPU memory utilization rate is obtained in real-time by the GPU driver layer, with a sampling period of 100ms to 500ms; the CPU thread pool queue depth is obtained in real-time by the thread pool scheduler; the alarm concurrency is obtained in real-time by the rule engine alarm counter; and the histogram of feature quantity and viewpoint distance distribution is calculated per frame by the 3D digital twin model rendering engine. The rendering accuracy level parameter is output to the accuracy selection module of the octree spatial index adaptive hierarchical detail algorithm; the GPU memory allocation ratio is output to the GPU memory partition manager; and the work-stealing algorithm trigger threshold is output to the CPU thread pool scheduler.
[0045] The steps for establishing the training dataset of the full-element state adaptive mapping model specifically include: stress simulating the platform in a test environment with different combinations of alarm concurrency, different number of elements, and different graphics processor memory usage. Each simulation lasts for no less than 30 minutes. Record the five types of input parameters for each frame and the corresponding optimal rendering accuracy level, optimal graphics processor memory allocation ratio, and optimal job stealing algorithm trigger threshold. Using the manually labeled optimal resource allocation scheme as the supervision label, construct a labeled sample set covering high, medium, and low load scenarios. The total number of samples is no less than 50,000, which are divided into training set, validation set, and test set in an 8:1:1 ratio.
[0046] The specific steps for training the full-element state adaptive mapping model include: using the weighted sum of cross-entropy loss and mean squared error loss as the total loss function, where the rendering accuracy level parameter branch uses cross-entropy loss, and the graphics processor memory allocation ratio branch and the work-stealing algorithm trigger threshold branch use mean squared error loss; using an adaptive moment estimation optimization algorithm to update parameters, with an initial learning rate between 0.0001 and 0.001, dynamically decaying through a cosine annealing scheduling strategy; evaluating the comprehensive error of the three outputs on the validation set every 100 training rounds, terminating training when the comprehensive error does not decrease for 5 consecutive rounds, and saving the model weights with the smallest comprehensive error as the official deployment version.
[0047] The full-element state adaptive mapping model couples rendering load perception and computing resource scheduling into a unified decision-making process through a cross-modal attention fusion mechanism. This enables the platform to adaptively compress the video memory and thread usage of 3D rendering when a sudden alarm triggers a large number of concurrent inferences, prioritizing the released computing power for real-time inference tasks. At the same time, in low-load scenarios, computing power is tilted towards high-precision rendering. Thus, without increasing hardware costs, a dynamic balance between rendering experience and inference response speed is achieved, fundamentally eliminating rendering stuttering or inference queuing caused by fixed resource allocation strategies.
[0048] The dynamic adjustment function for rendering accuracy level is calculated as follows: Comprehensive load index Graphics processor memory usage Central Processing Unit Thread Pool Queue Depth , number of alarms The formula for calculating using the weighted summation method is as follows:
[0049] ;
[0050] in , , , These are the standard reference values for the overall load index, graphics processor memory utilization, CPU thread pool queue depth, and alarm concurrency, respectively. , , The weighting coefficients and The weighting coefficients were determined through sensitivity analysis of frame rate and inference latency using multiple stress experiments; when At that time, the full-element state adaptive mapping model outputs the lowest rendering precision level, the work-stealing algorithm trigger threshold is reduced to the minimum value, and the upper limit of 3D rendering video memory usage in the graphics processor memory allocation ratio is compressed to 30% of the currently available video memory; when At that time, the full-element state adaptive mapping model outputs a medium rendering accuracy level, the work-stealing algorithm trigger threshold is set to the median value, and the upper limit of 3D rendering video memory usage in the graphics processor memory allocation ratio is 55% of the currently available video memory; when At that time, the full-element state adaptive mapping model outputs a high rendering accuracy level, the work-stealing algorithm trigger threshold is set to the maximum value, and the upper limit of the 3D rendering video memory usage ratio in the graphics processor video memory allocation ratio is 80% of the currently available video memory; the above two threshold coefficients of 0.85 and 0.6 were determined by repeated simulations under 20 different hardware configurations and load combinations and joint evaluation of inference latency and frame rate. The coefficient corresponding to the lowest comprehensive load index when the inference latency exceeds the millisecond limit and the frame rate is lower than 30fps is taken as the upper threshold coefficient, and the coefficient corresponding to the highest comprehensive load index when the inference latency is stable and the frame rate is sufficient is taken as the lower threshold coefficient.
[0051] The Sinkhorn iterative algorithm introduces an entropy regularization term into the objective function of the optimal transmission problem, transforming the original linear programming problem into a form that can be solved iteratively through matrix scaling. The second-order Wasserstein distance refers to the distance between distributions defined by the squared Euclidean distance as the basic cost function under the optimal transmission framework, exhibiting high sensitivity to changes in the geometric shape of the energy consumption distribution support set. The multidimensional joint distribution of historical building energy consumption data refers to a vector distribution composed of energy consumption items by region, system, and time period, with the historical energy consumption data originating from historical data collection records of energy consumption metering devices throughout the building area. The cumulative sum control chart method involves accumulating and summing the deviations of the second-order Wasserstein distance time series. When the energy consumption exceeds the statistical control limit, it is determined as a drift point. The normal range and drift warning threshold are determined by fitting the base period distribution of at least 12 months of building historical energy consumption data, and then performing statistical analysis on the second-order Wasserstein distance sequence of subsequent months. The upper control limit is the mean plus three times the standard deviation. The final value is determined after alignment and verification with actual known drift events. When the second-order Wasserstein distance is within the normal range, the current energy consumption control strategy is maintained. When the second-order Wasserstein distance exceeds the drift warning threshold, the energy consumption distribution drift diagnosis process is automatically triggered. The optimal transmission plan matrix is analyzed to identify which regions or systems the energy consumption is transferred from to which modes, locate the source of drift, and then adjust the energy consumption control parameters of the corresponding regions or systems.
[0052] The quantitative diagnosis of energy consumption distribution drift in multiple building scenarios based on the optimal transmission theory of Wasserstein distance incorporates the overall geometric structure of energy consumption distribution into the drift measurement, rather than relying solely on low-order statistics such as mean and variance. This allows abnormal patterns of gradual changes in distribution morphology, such as decreased equipment efficiency and altered energy consumption structure, to be captured in advance before the statistical process triggers the upper limit of traditional control charts. The analysis of the optimal transmission plan matrix further pinpoints the source of drift to specific regions or systems, providing spatial resolution support for targeted adjustments to energy consumption management strategies. This fundamentally changes the traditional coarse-grained dependence of energy consumption management on total indicators, shifting the discovery of energy consumption anomalies from post-hoc statistics to proactive diagnosis based on distribution perception.
[0053] The five-dimensional hierarchical permission control system refers to cross-authorization configuration of all controllable objects on the platform from five orthogonal dimensions: functional dimension, data dimension, spatial dimension, device dimension, and operational dimension. This ensures that the permission scope of different roles is precisely limited to the minimum intersection required by their business responsibilities, avoiding the risk of unauthorized access caused by single-dimensional authorization. The temporary permission extension in emergency scenarios refers to the system automatically granting emergency command personnel the corresponding device control permissions and broadcast command permissions required for handling when a fire alarm or security incident is triggered. After the incident is handled, the temporary permissions are automatically revoked and the normal permission configuration is restored. The entire process is included in the operation log audit.
[0054] Optionally, the present invention also provides a computer-based approach to form a building full-element mapping and control system, wherein the computer is equipped with a readable storage medium that stores program instructions, which are used to execute the above-described method when the computer is run.
[0055] The specific implementation of step S01 is as follows: Based on Building Information Modeling (BIM), the platform performs 3D digital twin modeling of all elements within the building, including structural components, electromechanical equipment, pipeline systems, and spatial units. Each independent element is assigned a globally unique identifier during the modeling stage. This identifier is generated using multi-level coding rules to ensure no collisions occur within the same platform. The full-attribute information database is stored in a structured database format, containing full-dimensional fields such as equipment model, installation location, commissioning time, maintenance records, real-time operating data address, and control command interface. The identifier serves as the primary key of the database and also as the core index key for subsequent data binding and work order flow, thereby establishing a strict one-to-one correspondence between physical building elements and 3D digital twin model elements.
[0056] The specific implementation of step S02 is as follows: The platform provides standardized data access interfaces to support the access of heterogeneous data from multiple sources, such as IoT sensing devices, building equipment management systems, security management systems, and energy management systems. A hybrid logical clock mechanism superimposes a logical counter on top of the physical clock. Each data packet is appended with a composite time stamp composed of a physical timestamp and a logical sequence number at the generation side, ensuring that data packets from the same device arriving at the platform via different transmission paths have a monotonically increasing composite time stamp, thus restoring the correct event sequence even in clock drift and network out-of-order scenarios. A sliding window buffer sorting maintains a fixed-length time window within the access buffer. After sorting all data packets within the window according to the composite time stamp, they are submitted to the 3D digital twin model state machine for state updates. Device parameter updates adopt an eventual consistency model combined with an event sourcing mechanism to ensure that the 3D digital twin model state is monotonically increasing and traceable, with end-to-end latency controlled within 200ms.
[0057] The specific implementation of step S03 is as follows: The platform recursively divides the 3D architectural space into multi-level subspaces using an octree structure. Within each subspace, geometry is pre-generated in high, medium, and low detail versions. During rendering, the platform calculates the distance between the current viewpoint and the center of each subspace in real time, automatically selecting the corresponding detail version based on the level detail switching threshold, compressing the actual number of rendered faces to within 2 million, ensuring stable frame rates in the WebGL environment. View frustum culling only submits rendering calls for geometry within the camera's view frustum; geometry outside the view frustum is directly discarded. Occlusion culling skips rendering calls for background geometry completely occluded by foreground geometry, further reducing the computational load on the graphics processor. The full-feature state adaptive mapping model receives five types of real-time parameters: the number of features, the histogram of viewpoint distance distribution, the GPU memory utilization rate, the CPU thread pool queue depth, and the number of concurrent alarms. After processing by the input encoding layer, the cross-modal attention fusion layer, and the resource allocation decision layer, it outputs three decision parameters: rendering accuracy level parameters, GPU memory allocation ratio, and the work-stealing algorithm trigger threshold. These three outputs are synchronously distributed to the Kubernetes heterogeneous computing resource pool via a unified scheduler, enabling dynamic reallocation of rendering and inference resources. (Comprehensive load index) in accordance with Calculate, when Output the lowest rendering precision level at any time, and compress the maximum VRAM usage for 3D rendering to 30% of available VRAM; when When outputting medium rendering precision, the maximum video memory usage is 55%; It outputs high rendering precision at any time, with a maximum video memory usage of 80%.
[0058] The specific implementation of step S04 is as follows: The platform extracts a multi-dimensional vector distribution of energy consumption by region, system, and time period from the historical records of energy consumption metering devices using a sliding time window. The energy consumption distributions of adjacent time windows are used as two marginal distributions for the optimal transmission problem. An entropy regularization term is introduced into the objective function using the Sinkhorn iterative algorithm, transforming the original linear programming into a matrix scaling iterative form, efficiently solving for the second-order Wasserstein distance. The second-order Wasserstein distance uses the squared Euclidean distance as the basic cost function and is highly sensitive to the asymptotic changes in the geometric shape of the energy consumption distribution support set. The platform arranges the second-order Wasserstein distances corresponding to each time window in chronological order to construct a time-series curve. Then, the cumulative sum control chart method is used to accumulate and sum the deviations of the time-series curves. When the cumulative sum exceeds the statistical control upper limit determined by the mean plus three times the standard deviation, it is judged as a drift point. The normal range and drift warning threshold are determined by fitting the baseline distribution of at least 12 months of historical energy consumption data. When the second-order Wasserstein distance exceeds the drift warning threshold, the platform automatically analyzes the optimal transmission plan matrix, identifies which regions or systems the energy consumption is shifting to which modes, locates the source of the drift, and adjusts the energy consumption control parameters of the corresponding regions or systems accordingly.
[0059] The specific implementation of step S05 is as follows: The platform constructs a heterogeneous computing resource pool based on Kubernetes, including graphics processing unit (GPU) nodes and central processing unit (CPU) nodes. Independent GPU nodes are allocated for real-time inference tasks, and a preemptive scheduling strategy is configured so that alarm inference tasks can preempt resources from lower-priority tasks when resources are scarce. A priority queue categorizes tasks into emergency alarm inference tasks and background analysis tasks, with emergency alarm inference tasks always receiving priority scheduling. The three-way decision output from the full-element state adaptive mapping model in step S03 is distributed to the Kubernetes resource pool through a unified scheduler. Rendering accuracy degradation, memory partition adjustment, and workload stealing triggering take effect synchronously within the same scheduling cycle, eliminating resource inconsistency windows caused by step-by-step adjustments and achieving a dynamic balance between rendering experience and inference response speed.
[0060] It should be noted that the key technologies of this invention include: the all-element state adaptive mapping model, through a cross-modal attention fusion mechanism, unifies rendering load perception and computing resource scheduling into an end-to-end decision-making process, enabling the platform to perceive the joint load status of the rendering side and the inference side in real time and automatically adjust resource boundaries, breaking through the architectural limitations of the insurmountable resource boundaries between the two subsystems in traditional fixed resource allocation strategies; the second-order Wasserstein distance based on optimal transmission theory incorporates the overall geometric structure of energy consumption distribution into the drift metric, compared with traditional methods that only rely on low-order statistics such as mean and variance, it can capture asymptotic distribution anomalies caused by equipment efficiency decline and changes in energy consumption structure before the statistical process triggers the upper limit of the traditional control chart, and locate the source of drift to a specific region or system through the optimal transmission plan matrix; the hybrid logic clock mechanism and sliding window buffer sorting work together to ensure the temporal consistency of multi-source heterogeneous data in clock drift and network disorder scenarios, providing a data layer foundation for the monotonically increasing traceability of the state of the three-dimensional digital twin model. The synergistic effect of these three key technologies enables the platform to possess adaptive error correction, load-aware dynamic allocation, and distribution-aware proactive diagnosis capabilities in the three core aspects of data access, rendering scheduling, and energy consumption diagnosis. Overall, this represents a leap from static configuration to dynamic adaptive management and control of traditional building digital twin platforms.
[0061] It should be noted that after long-term operation of a building digital twin platform, energy consumption distribution will gradually drift due to aging equipment, adjustments in energy consumption structure, or seasonal load changes. This drift often cannot be detected in the early stages by traditional control chart methods based on total mean or variance. Once the drift accumulates to the point of triggering the upper limit of traditional control charts, the relevant equipment or system is often already in a severely abnormal state, missing the optimal window for preventative intervention. The reason for this technical problem is that traditional energy consumption monitoring methods use scalar statistics (such as total energy consumption mean, peak power, and variance) as monitoring objects. These low-order statistics are not sensitive to local changes in the geometric structure of the energy consumption distribution support set. The gradual decline in equipment efficiency or the structural shift in energy consumption periods manifests as a slow drift in total indicators, failing to trigger alarm mechanisms based on fixed thresholds, thus masking anomalies within normal fluctuation noise. The usual solutions to the aforementioned technical problems are to increase the sampling frequency, add monitoring points, or refine the statistics of individual energy consumption items. However, these methods are essentially still refinements of low-order statistics and do not change the monitoring dimension. The refined mean or variance indicators are also insensitive to gradual changes in the distribution geometry and cannot be effectively detected in the early stages of drift. Moreover, a large increase in monitoring points leads to a significant increase in data processing overhead and engineering implementation complexity, which is only a temporary solution. This invention effectively solves this technical problem by extracting the multidimensional joint distribution of energy consumption data using a sliding time window. The individual energy consumption vector of each time window is regarded as a probability distribution. The Sinkhorn iterative algorithm is used to efficiently calculate the second-order Wasserstein distance between adjacent distributions, thereby raising the monitoring dimension from low-order scalar statistics to the level of distribution geometry. The second-order Wasserstein distance uses the square of the Euclidean distance as the basic cost function and is highly sensitive to the positional shift and morphological changes of the distribution support set. It can generate observable distance increments when there are small but continuous geometric shifts in the individual energy consumption structure, triggering the upper limit of traditional control charts much earlier than the total mean. The cumulative and control chart method accumulates the deviation of the second-order Wasserstein distance time series curve, amplifying the gradual drift signal under the cumulative effect and triggering change point detection early, thus solving the problem of single distance value fluctuations masking the drift trend. After detecting the drift, the platform further analyzes the optimal transmission plan matrix to identify which regions or systems energy consumption is transferred to which modes, locating the source of the drift to a specific space or system. This provides spatial resolution support for the targeted adjustment of energy consumption management strategies, thereby realizing the transformation from post-event statistical alarms to distributed sensing and proactive diagnosis.
[0062] Specifically, the principle of this invention is:
[0063] The fundamental reason why this invention can solve the above-mentioned technical problems is that the full-element state adaptive mapping model unifies the rendering load perception and computing resource scheduling into an end-to-end multi-input multi-output decision problem, breaking the architectural limitations of the traditional platform where the rendering subsystem and inference subsystem operate independently and the resource boundaries are fixed and insurmountable.
[0064] In traditional solutions, the 3D rendering engine and the AI inference engine each request resources from the operating system, and there is no channel for them to perceive each other's load status. When the number of concurrent alarms increases sharply, the inference engine cannot proactively obtain computing power from the rendering engine and can only wait in a queue within its pre-allocated resource share, which is the root cause of the technical problem. The full-element state adaptive mapping model of this invention uses five types of real-time sampling parameters as input to construct a unified perception channel across the boundaries of the two subsystems. This allows the model to simultaneously observe the real-time load status of both the rendering and inference sides and output resource reallocation instructions across the two subsystems accordingly.
[0065] The core function of the cross-modal attention fusion layer lies in its approach: instead of assigning fixed weights to the five types of input parameters, it dynamically calculates the contribution weight of each parameter to the decision-making process during each forward inference step based on the actual numerical relationship of the current input. In high-concurrency scenarios, the values of GPU memory utilization and alarm concurrency increase significantly compared to other parameters. The attention mechanism automatically increases the weights of these two dimensions, tilting resource allocation decisions towards ensuring the inference task is prioritized. In low-load scenarios, the values of these two parameters decrease, and the attention weights decrease accordingly, automatically shifting the decision towards high-precision rendering. This dynamic weight adjustment process is entirely calculated online by the model, requiring no manual intervention or rule configuration, thus achieving continuous adaptive response to any load state.
[0066] The comprehensive load index, by weighting and normalizing memory utilization, thread pool queue depth, and alarm concurrency, compresses three-dimensional discrete indicators into one-dimensional continuous indicators. This provides a unified quantitative basis for discrete switching of rendering precision levels, avoiding decision conflicts that occur when multiple indicators trigger their own thresholds. The three outputs are synchronously distributed to the Kubernetes heterogeneous computing resource pool via a unified scheduler, ensuring that rendering precision degradation, memory partition adjustment, and work-stealing triggers take effect within the same scheduling cycle, eliminating the brief resource inconsistency window caused by step-by-step adjustments. These mechanisms together constitute a closed-loop, load-aware dynamic resource management system, eliminating the adaptability defects of fixed resource allocation strategies under extreme loads at the mechanism level.
[0067] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0068] The specific implementation of step S01 involves establishing a three-dimensional digital twin model for each independent element in the building, and configuring a unique identification code and a full-attribute information database for each element. The full-attribute information database covers all dimensions of information such as equipment model, installation location, commissioning time, maintenance records, real-time operation data address, and control command interface. The unique identification code serves as the core index key for subsequent data binding and work order flow, realizing a one-to-one mapping between the physical building and the three-dimensional digital twin model.
[0069] The specific implementation of step S02 involves establishing a standardized data access interface and unifying the timing stamp through a hybrid logic clock mechanism. The hybrid logic clock superimposes a logic counter onto the physical clock. Data packets generated by the device along different transmission paths all carry a monotonically increasing composite timing stamp. The calculation formula is as follows:
[0070] ;
[0071] In the formula, It is a dimensionless composite time stamp. The sampling time of the physical clock (unit: s). This is the standard reference value for physical clocks (unit: seconds). This is the current value of the logic counter (unit: count). This is the standard reference value for the logic counter (unit: count). , The weighting coefficients and The empirical values are 0.7 and 0.3 respectively. The sliding window buffer sort maintains a fixed length within the data access buffer. Timing window ( (This refers to the length of the sliding window, in units of 50 to 200; an empirical value is 50 to 200). Data within the window is then processed according to... After rearrangement, the data is submitted to the 3D digital twin model state machine. Device parameter updates employ an eventual consistency model combined with an event sourcing mechanism to ensure the model state monotonically increases and is traceable. End-to-end latency. (Unit: ms) Must meet That is, the entire link time from the generation of data from IoT sensing devices to the completion of the status display of the 3D digital twin model does not exceed 200 ms.
[0072] The specific implementation of step S03 involves using an octree spatial index adaptive hierarchical detail algorithm to recursively divide the 3D building space into hierarchical subspaces according to an octree structure. Each subspace corresponds to a pre-generated version with different face count precision at different viewing distances. Combined with view frustum clipping and occlusion culling, the actual number of rendered faces is compressed to less than 2 million, with a frame rate of no less than 30 fps. The full-feature state adaptive mapping model consists of three parts: an input encoding layer, a cross-modal attention fusion layer, and a resource allocation decision layer. The input encoding layer receives five types of input parameters, namely the number of features. (Unit: number of points) Histogram of viewpoint distance distribution Graphics processor memory usage (Unit: %), CPU thread pool queue depth (Unit: number) Concurrent alarms (Unit: number), each parameter is mapped to a fixed-dimensional embedding vector through an independent fully connected encoder, the first... Embedding vector of class parameters The calculation is as follows:
[0073] ;
[0074] In the formula, For the first Embedding vector of class parameters, The embedding vector dimension (unit: dimension, empirical value is 64 to 256). For the first Normalized scalar values (dimensionless) of class input parameters. For the first The weight matrix of the encoder-like system. For the corresponding bias vector The activation function is a linear rectified function. The cross-modal attention fusion layer uses each... For key-value pairs, dynamic weights are calculated using a multi-head self-attention mechanism, resulting in an attention weight matrix. The calculation is as follows:
[0075] ;
[0076] In the formula, For querying the matrix, The key matrix, For value matrices, For the input embedding matrix, , , These are the projection matrices for the query, key, and value, respectively. The dimension of the key vector (unit: dimension). For normalized exponential functions, This is the dimensionless attention weight matrix. The fused representation vector. for:
[0077] ;
[0078] The resource allocation decision layer outputs three branches, the first of which is the rendering precision level parameter. The output is calculated as follows:
[0079] ;
[0080] Second-path graphics processor memory allocation ratio The output is calculated as follows:
[0081] ;
[0082] Third-path work-stealing algorithm trigger threshold The output is calculated as follows:
[0083] ;
[0084] In the formula, , , These are the weight matrices for the three decision branches. , , For the corresponding bias vector It is the sigmoid activation function. Standard reference value for the proportion of video memory allocated to the graphics processor (unit: %). The standard reference value for the trigger threshold of the job theft algorithm (unit: number of jobs). Outputs are discrete categories (dimensionless). Retrieve the index of the largest response category. Overall load index. The calculation formula is as follows:
[0085] ;
[0086] In the formula, Comprehensive load index (unit: ) same), This is a standard reference value for the comprehensive load index. This is a standard reference value for graphics processor memory usage (unit: %). This is a standard reference value for the CPU thread pool queue depth (unit: queues). The standard reference value for the number of concurrent alarms (unit: alarms). , , The weighting coefficients and The weighting coefficients were determined through sensitivity analysis of frame rate and inference latency using multiple stress experiments. At that time, output the lowest rendering precision level. , Reduced to the minimum value; when At that time, the output is at a medium rendering precision level. , Set as the median value; when At that time, output a high rendering precision level. , Set to the maximum value. The training of the full-feature state adaptive mapping model uses cross-entropy loss. With mean square error loss , The weighted sum is the total loss function. The calculation is as follows:
[0087] ;
[0088] In the formula, This is the standard reference value for the total loss function. This serves as a standard reference value for cross-entropy loss. This is the standard reference value for mean squared error loss. Mean squared error loss for the proportional branch of the graphics processor's video memory allocation. The mean squared error loss for triggering the threshold branch in the work-stealing algorithm. , , The loss weight coefficients for each branch and An adaptive moment estimation optimization algorithm is used for parameter updates, with an initial learning rate between 0.0001 and 0.001. The learning rate is dynamically decayed using a cosine annealing scheduling strategy. The overall error is evaluated on the validation set every 100 training epochs, and training terminates if the error does not decrease for five consecutive epochs. The training dataset is constructed through stress simulation, covering high, medium, and low load scenarios, with a total sample size of no less than 50,000, divided into training, validation, and test sets in an 8:1:1 ratio.
[0089] The specific implementation of step S04 is to extract the multidimensional joint distribution of historical building energy consumption data using a sliding time window. Let the energy consumption vector distribution within the current time window be... The base period distribution is The second-order Wasserstein distance is calculated using the Sinkhorn iterative algorithm with an entropy regularization term. The entropy-regularized optimal transport objective function of the Sinkhorn iterative algorithm is as follows:
[0090] ;
[0091] In the formula, To determine the optimal transmission objective function value using entropy regularization, Its standard reference value, For the transmission plan matrix, for No. Line number Column elements, representing the number of columns starting from the first column. The source node directs to the first The transmission quality of each target node, For , The set of joint distributions of marginal distributions. For the first From the source node to the first The squared cost of the Euclidean distance to each target node. This is the entropy regularization coefficient (empirical value is 0.01 to 0.1). The information entropy of the transmission plan matrix. The Sinkhorn iterative algorithm solves for the optimal transmission plan matrix through alternating matrix scaling. The iteration format is as follows:
[0092] , ;
[0093] In the formula, The first of the Gibbs kernel matrix Line number Column elements, The Gibbs kernel matrix, and For the first The left and right scaling vectors of the iterations are used to reconstruct the optimal transport plan matrix after the iterations converge. ,in Represented by vector A diagonal matrix consisting of diagonal elements. Similarly, the second-order Wassstein distance The calculation is as follows:
[0094] ;
[0095] In the formula, For the optimal transmission plan matrix No. Line number Column elements, This is the standard reference value for the second-order Wassstein distance. (For...) The cumulative sum control chart method is used to detect change points in statistical processes of time series data, and the cumulative sum statistic is used. The calculation is as follows:
[0096] ;
[0097] In the formula, For the first Cumulative and statistical values at each time window For cumulative sum statistics, standard reference values, This is the current time window number (unit: window). For the first The second-order Wasserstein distance over a time window This is the reference normalized value of the second-order Wassstein distance in the time series. For reference drift tolerance, This is their standard reference value; since both have the same dimensions, the terms within the parentheses are dimensionless. Statistical control upper limit. The calculation is as follows:
[0098] ;
[0099] In the formula, The mean of the second-order Wassstein distance sequence for the baseline period. The standard deviation of the second-order Wassstein distance series for the baseline period is given; both are determined by fitting at least 12 months of historical energy consumption data. and They have the same dimensions. When Exceeding When this is detected as a drift point, the energy consumption distribution drift diagnosis process is automatically triggered. The analysis identifies the source region or system of the drift, and the energy consumption control parameters of the corresponding region or system are then adjusted.
[0100] The specific implementation of step S05 is based on building a heterogeneous computing resource pool using Coopernetis. Independent graphics processor nodes are allocated to real-time inference tasks, and a preemptive scheduling strategy is configured. Priority queues differentiate between emergency alarm inference tasks and background analysis tasks, achieving on-demand allocation and priority isolation of computing resources. The five-dimensional hierarchical permission control system performs cross-authorization configuration for all controlled objects from five orthogonal dimensions: functional, data, spatial, device, and operational. All user operations are logged throughout the entire process. Automatic warnings are triggered for unauthorized access. Temporary permission extensions and revocations in emergency scenarios are included in log auditing, achieving closed-loop traceability of the mapping and control of all building elements.
[0101] To better understand and implement this invention, the following is a specific application scenario of the invention, Example 2: To verify the effect of the invention, the technicians built a test environment and selected a complex building with a building area of approximately 80,000 square meters, including multiple functional areas such as offices, conference rooms, data centers, and commercial areas, as the test object. All the method steps of the invention were deployed on the three-dimensional digital twin platform of the building's full elements, and the platform's resource scheduling performance and long-term energy consumption drift detection capability under high-concurrency alarm scenarios were systematically tested.
[0102] During the implementation of step S01, technicians modeled a total of 4,237 independent elements within the building, covering categories such as air conditioning units, power distribution cabinets, lighting circuits, fire-fighting equipment, and access control terminals. Each element was assigned a globally unique identifier, and its equipment model, installation location, commissioning time, maintenance records, real-time operating data address, and control command interface information were fully entered into the full attribute information database. The total number of records in the full attribute information database was 4,237, and the identifier served as the core index key throughout all subsequent data binding and work order transfer processes.
[0103] During the implementation of step S02, the platform connects to 12 heterogeneous data sources from IoT sensing devices, building equipment control systems, security management systems, and energy management systems, totaling 18,560 real-time data points. A hybrid logic clock mechanism adds a composite time stamp to each data packet, and a sliding window buffer sorting method rearranges the data within the window before submitting it to the state machine. The measured end-to-end average latency is 143ms, meeting the requirement of being within 200ms.
[0104] During the implementation of step S03, the 3D digital twin model contains all the geometric elements of the building, with a total of approximately 120 million faces. The octree spatial index adaptive hierarchical detail algorithm dynamically compresses the actual number of rendered faces, keeping the number of rendered faces stable below 1.8 million under normal browsing conditions, and maintaining a frame rate above 45fps. Technicians simulated a fire alarm linkage scenario, in which the number of concurrent fire alarms surged from 0 to 387 within 20 seconds, the graphics processor memory usage increased from 41% to 89%, and the CPU thread pool queue depth increased from 12 to 156. The changes in input parameters and output decisions of the full-element state adaptive mapping model are shown in Table 1.
[0105] Table 1 Input-output record of the all-element state adaptive mapping model under fire alarm linkage scenario
[0106]
[0107] As shown in Table 1, the overall load index increases with the rise in both the number of concurrent alarms and the GPU memory utilization. As the rendering accuracy level successively crosses the thresholds of 0.6 and 0.85, the full-element state adaptive mapping model correspondingly reduces the rendering accuracy level from high to medium and then to low, compressing the 3D rendering memory usage from 80% to 30%, with the freed memory prioritized for real-time inference tasks. After alarm handling is completed, the overall load index drops, and the rendering accuracy level and memory usage automatically return to high accuracy. Figure 2 As shown, Figure 2 The diagram illustrates the interrelationship between alarm concurrency, overall load index, and rendering memory ratio over time, intuitively reflecting the dynamic adjustment process of the all-element state adaptive mapping model.
[0108] In step S04, technicians used 14 consecutive months of historical energy consumption data for the entire building as input. Using each month as a time window, they extracted a multi-dimensional vector distribution of energy consumption by region, system, and time period. The second-order Wasserstein distance between adjacent monthly distributions was calculated using the Sinkhorn iterative algorithm to construct a time-series curve. The distribution was then fitted to the baseline period data from the previous 12 months to determine the upper limit of the normal range. The energy consumption distribution drift detection results are shown in Table 2.
[0109] Table 2. Results of Second-Order Wasserstein Distance and Cumulative Sum Control Charts for Each Month
[0110]
[0111] Table 2 shows that the second-order Wasserstein distance gradually increased from month 6 to month 12, but the monthly distance values did not exceed the upper limit of the traditional control chart based on the mean plus three standard deviations. If only the traditional mean control chart is relied upon, this drift trend will not trigger an alarm before month 12. The cumulative sum control chart method accumulates the deviations of each month, causing the cumulative sum statistic of the gradual drift signal to exceed the control upper limit in month 13, triggering change point detection. The platform then analyzes the optimal transmission plan matrix and identifies a continuous shift in the energy consumption of the air conditioning system in the data center area towards the atypical pattern during nighttime hours. This is identified as an increase in nighttime cooling compensation caused by the efficiency degradation of the air conditioning units, and the air conditioning control parameters in the data center area are adjusted accordingly. Figure 3 As shown, Figure 3 The superposition relationship between the time series curves of the second-order Wasserstein distance for each month and the cumulative sum control chart is shown, clearly demonstrating the amplification effect of gradual drift on the cumulative sum statistic.
[0112] During the implementation of step S05, the platform allocates two independent GPU nodes for the real-time inference task based on Kubernetes, configures a preemptive scheduling strategy, and sets the fire alarm inference task as the highest priority and the background energy consumption analysis task as a low priority in the priority queue. In the above fire linkage alarm scenario, the average response latency of the emergency alarm inference task is 78ms, which meets the millisecond-level real-time inference requirements. Figure 4 As shown, Figure 4 The study demonstrates the distribution of GPU memory ratio and task queue depth for real-time inference and 3D rendering tasks in the Kubernetes heterogeneous computing resource pool under different comprehensive load index ranges, reflecting the synergistic effect of preemptive scheduling and dynamic GPU memory allocation.
[0113] Compared to traditional building digital twin platforms, this invention brings the following technological advancements. First, traditional platforms have fixed resource boundaries between their rendering and inference subsystems, lacking a channel for perceiving each other's load status. This invention establishes a unified perception and decision-making channel across the two subsystems through a full-element state adaptive mapping model, enabling the platform to automatically reallocate computing resources based on real-time load status. This eliminates the adaptability defects of fixed allocation strategies under extreme loads at the mechanism level. Second, traditional energy consumption monitoring relies on low-order statistics such as total mean or variance, failing to perceive gradual changes in the distribution geometry. This invention elevates the monitoring dimension to the distribution geometry level, utilizing the high sensitivity of second-order Wasserstein distance to distribution drift, combined with the cumulative amplification effect of cumulative and control charts, to achieve early detection of gradual energy consumption anomalies. This shifts the discovery of energy consumption anomalies from reactive statistics to proactive diagnosis based on distribution perception.
[0114] It should be noted that the variables involved in this invention are explained in detail in Tables 3 and 4.
[0115] Table 3. Variable Explanation Table (Part 1)
[0116]
[0117] Table 4. Variable Explanation Table (Part Two)
[0118]
[0119] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for mapping and controlling all building elements based on a digital twin model, characterized in that, Includes the following steps: A three-dimensional digital twin model is constructed for all elements of the building, and a unique identity and full attribute information database are configured for each independent element to achieve a one-to-one mapping between the physical building and the three-dimensional digital twin model; Establish standardized data access interfaces, unify time stamps through a hybrid logical clock mechanism, use sliding window buffer sorting to repair disordered data, and accurately bind multi-source heterogeneous real-time data with corresponding elements in the three-dimensional digital twin model; An octree spatial index adaptive hierarchical detail algorithm is adopted, combined with view frustum culling and occlusion removal, dynamically loading models of different precision according to view distance, and jointly adjusting rendering precision level parameters and resource allocation strategies through a full-element state adaptive mapping model. The multidimensional joint distribution of historical building energy consumption data is extracted using a sliding time window. The second-order Wasserstein distance is calculated using the Sinkhorn iterative algorithm, and a second-order Wasserstein distance time series curve is constructed. The statistical process change point is detected by the cumulative sum control chart method, and the energy consumption control strategy is adjusted according to the interval to which the second-order Wasserstein distance belongs. A heterogeneous computing resource pool is built based on Kubernetes, and independent graphics processor nodes are allocated to real-time inference tasks and preemptive scheduling strategies are configured. Priority queues are used to distinguish between emergency alarm inference tasks and background analysis tasks.
2. The building full-element mapping and control method based on a digital twin model according to claim 1, characterized in that, The full-attribute information database contains comprehensive information including equipment model, installation location, commissioning time, maintenance records, real-time operating data address, and control command interface. The unique identifier serves as the core index key for data binding and work order flow.
3. The method for mapping and controlling all building elements based on a digital twin model according to claim 2, characterized in that, The hybrid logic clock mechanism refers to superimposing a logic counter on top of a physical clock, so that data packets from the same device arriving at the platform through different transmission paths all carry a monotonically increasing composite timing stamp, thereby achieving timing consistency repair in scenarios such as out-of-order arrival, clock drift, and data retransmission.
4. The building full-element mapping and control method based on a digital twin model according to claim 3, characterized in that, The sliding window buffer sorting refers to maintaining a fixed-length time window within the data access buffer, rearranging the data within the window according to composite time stamps, and then submitting it to the state machine of the three-dimensional digital twin model. The device parameter update adopts an eventual consistency model plus an event sourcing mechanism.
5. The method for mapping and controlling all building elements based on a digital twin model according to claim 4, characterized in that, The octree spatial index adaptive hierarchical detail algorithm refers to recursively dividing the three-dimensional building space into hierarchical subspaces according to the octree structure. The geometry in each subspace corresponds to different pre-generated facet precision versions under different viewing distance conditions. The platform dynamically selects the loading precision based on the distance between the current viewpoint and the center of the subspace.
6. The method for mapping and controlling all building elements based on a digital twin model according to claim 5, characterized in that, The full-element state adaptive mapping model consists of three parts: an input encoding layer, a cross-modal attention fusion layer, and a resource allocation decision layer. The input encoding layer receives five types of input parameters: the number of elements, the histogram of viewpoint distance distribution, the graphics processor memory usage rate, the CPU thread pool queue depth, and the number of alarm concurrency. These parameters are mapped into fixed-dimensional embedding vectors through independent fully connected encoders.
7. The method for mapping and controlling all building elements based on a digital twin model according to claim 6, characterized in that, The cross-modal attention fusion layer uses each embedded vector as a key-value pair and calculates the dynamic weights of different input parameter dimensions on resource allocation decisions through a multi-head self-attention mechanism. The attention weights of graphics processor memory utilization and alarm concurrency are automatically increased by the attention mechanism in high-concurrency scenarios.
8. The method for mapping and controlling all building elements based on a digital twin model according to claim 7, characterized in that, The resource allocation decision layer outputs three branches: the first branch outputs rendering accuracy level parameters; The second output shows the graphics processor memory allocation ratio; the third output shows the threshold for triggering the work-stealing algorithm between the rendering thread and the rule engine thread in the central processing unit thread pool.
9. The method for mapping and controlling all building elements based on a digital twin model according to claim 8, characterized in that, The overall load index is calculated by weighted summation of GPU memory utilization, CPU thread pool queue depth, and alarm concurrency. When the overall load index is not lower than the high load threshold, the lowest rendering accuracy level is output, and the upper limit of 3D rendering memory usage in the GPU memory allocation ratio is compressed to a low proportion. When the overall load index is not lower than the medium load threshold and lower than the high load threshold, the medium rendering accuracy level is output, and the upper limit of 3D rendering memory usage is a medium proportion. When the overall load index is lower than the medium load threshold, the high rendering accuracy level is output, and the upper limit of 3D rendering memory usage is a high proportion.
10. The method for mapping and controlling all building elements based on a digital twin model according to claim 9, characterized in that, The training of the all-element state adaptive mapping model uses a weighted sum of cross-entropy loss and mean squared error loss as the total loss function. The rendering accuracy level parameter branch uses cross-entropy loss, while the graphics processor memory allocation ratio branch and the work-stealing algorithm trigger threshold branch use mean squared error loss. An adaptive moment estimation optimization algorithm is used to update the parameters.