A multi-time scale asynchronous parallel heat supply digital twin simulation method and system

By configuring an independent virtual clock and event buffer queue for the digital twin simulation method of the heating system, and combining it with a global event coordinator, asynchronous parallel simulation at multiple time scales was realized. This solved the problem of balancing simulation accuracy and efficiency in the heating system, and improved the simulation efficiency and online optimization capability of the heating system.

CN122347084APending Publication Date: 2026-07-07HUANENG WEIHAI POWER GENERATION CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUANENG WEIHAI POWER GENERATION CO LTD
Filing Date
2026-03-06
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing digital twin simulation methods for heating systems struggle to balance simulation accuracy and computational efficiency when dealing with multi-timescale processes, particularly in the coupling of hydraulic, thermal, and scheduling models, where redundant calculations and insufficient accuracy are prevalent.

Method used

A multi-timescale asynchronous parallel simulation method is adopted. By configuring independent virtual clocks and event buffer queues for each sub-model, asynchronous progress is achieved. A global event coordinator is introduced for coupling triggering and synchronization, and the simulation strategy is dynamically adjusted to match the steady-state and transient conditions of the heating system.

Benefits of technology

While ensuring the coupling accuracy of the entire process of hydraulic transients, heat transfer and scheduling optimization, redundant calculations are significantly reduced, simulation efficiency is significantly improved, and a dynamic balance between simulation accuracy and efficiency is achieved, providing technical support for real-time digital twins and online optimized scheduling of heating systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122347084A_ABST
    Figure CN122347084A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of digital twin simulation, and discloses a multi-time-scale asynchronous parallel heat supply digital twin simulation method, which comprises the following steps: constructing a digital twin model of a heat supply system; configuring an independent virtual clock and an event buffer queue for a sub-model in the digital twin model; the sub-models asynchronously advance the simulation process according to their respective optimal time steps, and real-time monitor key state variables output by the sub-models; when any sub-model detects a preset coupling trigger event, the event and a time stamp are written into a global event buffer queue; the event buffer queue of the sub-models is polled and time-aligned based on a global event coordinator; when it is detected that multiple sub-models generate events at the same coupling time, cross-sub-model state synchronization and data interaction are triggered; after the state synchronization is completed, the sub-models continue to asynchronously advance the simulation until the next coupling event is triggered or the simulation is completed. Efficient and high-precision collaborative simulation of multi-scale processes of the heat supply system is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of digital twin simulation technology, and more specifically, to a multi-timescale asynchronous parallel heating digital twin simulation method and system. Background Technology

[0002] As urban infrastructure, heating systems involve multi-timescale processes, including millisecond-level hydraulic transients, second-level heat transfer, and minute-level scheduling optimization. Existing digital twin simulation methods mainly employ two technical approaches: one is synchronous simulation with a unified time step, advancing all sub-models according to the smallest time scale. While this ensures hydraulic accuracy, it leads to a large amount of redundant calculations in the thermal and scheduling models, resulting in low efficiency. The other is loosely coupled offline simulation, where each sub-model calculates independently and then periodically exchanges data. Although this improves efficiency, it cannot capture the dynamic coupling relationships under transient conditions, leading to a significant decrease in accuracy.

[0003] To address the aforementioned issues, some studies have proposed multi-timescale simulation methods. However, these methods often employ fixed time step ratios and preset synchronization times, making them ill-suited to the complex and ever-changing operating conditions of heating systems. Excessive synchronization points in steady-state conditions lead to resource waste, while insufficient synchronization points in transient conditions compromise coupling accuracy. Furthermore, they lack dynamic monitoring and coordination mechanisms for events during asynchronous processes. Therefore, achieving efficient and high-precision collaborative simulation of multi-timescale processes has become a pressing technical challenge in this field. Summary of the Invention

[0004] This application provides a multi-timescale asynchronous parallel digital twin simulation method and system for heating systems, solving the technical problem of balancing simulation accuracy and computational efficiency caused by significant differences in the time scales of hydraulic, thermal, and scheduling processes in digital twin simulation of heating systems. By configuring independent virtual clocks and event buffer queues for each sub-model, asynchronous parallel execution across multiple time scales is achieved. Coupled trigger events are generated through real-time monitoring of key state variables, and a global event coordinator performs polling alignment and dynamic tolerance judgment, triggering cross-model state synchronization only when necessary. While ensuring the coupling accuracy of the entire process of hydraulic transients, heat transfer, and scheduling optimization, redundant computation and synchronization overhead are significantly reduced, significantly improving simulation efficiency. Simultaneously, through condition-adaptive monitoring templates and a dynamic synchronization tolerance mechanism, the simulation system can intelligently match the changing needs of steady-state and transient operating conditions of the heating system, achieving a dynamic balance between accuracy and efficiency, providing reliable technical support for real-time digital twin and online optimized scheduling of heating systems.

[0005] To achieve the above objectives, this invention provides a multi-timescale asynchronous parallel digital twin simulation method for heating, comprising:

[0006] Constructing a digital twin model of the heating system; Each sub-model in the digital twin model is configured with an independent virtual clock and event buffer queue, and the sub-models advance the simulation process asynchronously according to their respective optimal time steps; During the simulation, the key state variables output by the sub-model are monitored in real time. When any sub-model detects a preset coupling trigger event, the event and timestamp are written to the global event buffer queue. Based on the global event coordinator, the event buffer queue of the sub-model is polled and time-aligned. When multiple sub-models are detected to generate events at the same coupling moment, cross-sub-model state synchronization and data interaction are triggered. After state synchronization is completed, the sub-model continues to advance the simulation asynchronously until the next coupling event is triggered or the simulation ends.

[0007] Furthermore, the digital twin model specifically includes: The hydraulic sub-model is used to simulate the millisecond-level hydraulic transient processes of fluids in heating pipe networks, including pressure wave propagation, flow distribution changes, and water hammer phenomena. The thermal sub-model is used to simulate the second-level heat transfer process of the heat medium in the heating network, including heat loss, temperature field distribution and delay effect; The system scheduling sub-model is used to simulate the minute-level scheduling optimization process of the heating system, including heat source load allocation, pump start-stop control, and operation strategy adjustment.

[0008] Furthermore, the independent virtual clock and event buffer queue specifically include: Each sub-model is configured with an independent virtual clock, which advances independently according to the simulation time scale corresponding to the sub-model, without interfering with each other; The sub-model is configured with an independent event buffer queue to cache unprocessed events generated by the sub-model during simulation. The advancement speed of the virtual clock is related to the event processing status of the event buffer queue. When the event buffer queue is empty, the virtual clock continues to advance according to a preset step size. When a coupling trigger event is detected, the virtual clock pauses its advance until cross-sub-model state synchronization is completed.

[0009] Furthermore, the advancement speed of the virtual clock is related to the event processing status of the event buffer queue, specifically including: The virtual clock adopts a hybrid propagation mode that combines event-driven and time-driven approaches; When the event buffer queue is not empty, the virtual clock jumps directly to the timestamp of the next event in the queue, prioritizing the processing of events that have already arrived; When the event buffer queue is empty, the virtual clock continues to advance according to the preset optimal time step, and re-checks the event queue status at the end of each advance step. The virtual clock's advance speed is dynamically adjustable. The advance step size is adjusted in real time based on the event queue length, event processing time, and the frequency of coupled events to balance simulation accuracy and computational efficiency.

[0010] Furthermore, during the simulation, the key state variables output by the sub-model are monitored in real time, specifically including: A list of key state variables to be monitored and their corresponding coupling triggering conditions; During the simulation of the sub-model, the current values ​​of key state variables are collected in real time at the sampling frequency corresponding to the virtual clock of the sub-model. The collected state variable values ​​are dynamically compared with preset trigger conditions. When any trigger condition is met, a coupled trigger event is automatically generated and the current virtual timestamp is recorded. The monitoring process is dynamically managed, and the weight parameters of the monitoring list, sampling frequency and triggering conditions are adaptively adjusted according to the simulation stage and changes in operating conditions.

[0011] Furthermore, a pre-defined monitoring list of key state variables and corresponding coupling triggering conditions are established, specifically including: Based on the physical characteristics and simulation objectives of the heating system, a list of key state variables is determined. The key state variables include at least the node pressure and pipeline flow rate in the hydraulic sub-model, the supply and return water temperature and heat load in the thermal sub-model, and the equipment start-up and shutdown status and valve opening in the system scheduling sub-model. Configure one or more coupled triggering conditions for each key state variable in the monitoring list, including threshold triggering, rate of change triggering, time triggering, and combinational logic triggering; For different simulation stages and operating conditions, multiple sets of monitoring lists and trigger condition combination templates are preset, and a mapping relationship between the templates and operating condition characteristics is established; The priority of coupling triggering conditions is set in a hierarchical manner. When multiple triggering conditions are met at the same time, coupling triggering events are generated in order of priority.

[0012] Furthermore, the mapping relationship between templates and operating condition characteristics specifically includes: Extract characteristic parameters of the heating system's operating conditions, including at least outdoor temperature, heat load rate, time period attribute, seasonal attribute, and system operating mode; Construct a working condition feature space, and discretize the continuous feature parameters to form a finite number of working condition feature intervals; Establish a template library for combining monitoring lists and trigger conditions, and label the applicable operating condition characteristic range for each template; During the simulation, the current working condition feature value is calculated in real time, the current working condition interval is determined by the feature matching algorithm, and the corresponding combination template is automatically loaded. Set a hysteresis interval for template switching to avoid frequent template switching when the operating characteristics fluctuate near the boundary.

[0013] Furthermore, the event buffer queue of the sub-model is polled and time-aligned based on the global event coordinator, specifically including: The global event coordinator accesses the event buffer queue of the sub-model sequentially according to a preset polling cycle and reads the timestamp of the event at the head of the queue. The timestamps of the events read from the head of each queue are compared to identify events with the same timestamp or whose time difference is within the preset synchronization tolerance range. When multiple sub-models are detected to generate events at the same coupling moment, the global event coordinator sends a synchronization command to the corresponding sub-model and pauses the simulation. For events whose timestamps are not completely consistent but are within the synchronization tolerance range, time alignment is performed based on the earliest timestamp, and the virtual clocks of the relevant sub-models are adjusted.

[0014] Furthermore, the events within the preset synchronization tolerance range specifically include: Based on the time scale characteristics of the sub-models, differentiated basic synchronization tolerance values ​​are set for the hydraulic sub-model, thermal sub-model, and system scheduling sub-model, respectively. The synchronization tolerance is dynamically adjusted based on the coupling strength between sub-models. The higher the coupling strength, the smaller the tolerance value, in order to ensure the synchronization accuracy of strongly coupled variables. The synchronization tolerance is adaptively adjusted based on the operating conditions of the current simulation stage, tightening the tolerance during transient processes and appropriately loosening the tolerance during steady-state processes. When the timestamp difference of multiple events is less than or equal to the above tolerance value, these events are determined to be within the synchronization tolerance range and are regarded as alignable coupled events.

[0015] To achieve the above objectives, the present invention also provides a multi-timescale asynchronous parallel heating digital twin simulation system, comprising: The model building module is used to build digital twin models of heating systems; An asynchronous simulation module is used to configure independent virtual clocks and event buffer queues for the sub-models in the digital twin model, and the sub-models advance the simulation process asynchronously according to their respective optimal time steps; The event monitoring module is used to monitor the key state variables output by the sub-model in real time during the simulation process. When any sub-model detects a preset coupling trigger event, the event and timestamp are written to the global event buffer queue. The event coordination module is used to poll and time-align the event buffer queue of the sub-model based on the global event coordinator. When multiple sub-models are detected to generate events at the same coupling moment, cross-sub-model state synchronization and data interaction are triggered. The loop control module is used to allow the sub-model to continue the simulation asynchronously after the state synchronization is completed, until the next coupling event is triggered or the simulation ends.

[0016] Compared with existing technologies, the advantages of this invention are as follows: By constructing a multi-timescale asynchronous parallel simulation architecture, efficient collaborative simulation of the hydraulic, thermal, and scheduling processes of the heating system is achieved. While ensuring the dynamic coupling accuracy of the entire process of millisecond-level hydraulic transients, second-level heat transfer, and minute-level scheduling optimization, redundant calculations and synchronization overhead are significantly reduced, and simulation efficiency is significantly improved. By introducing an event-driven coupling triggering mechanism and a global event coordinator, state synchronization is triggered only when key state variables change or cross-model coupling occurs, avoiding the resource waste caused by fixed-step synchronization in traditional methods. Through the operating condition adaptive monitoring template and dynamic synchronization tolerance mechanism, the simulation system can intelligently identify the steady-state and transient operating conditions of the heating system and automatically adjust the monitoring strategy and synchronization accuracy, achieving a dynamic balance between simulation accuracy and computational efficiency. Attached Figure Description

[0017] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating a multi-timescale asynchronous parallel digital twin simulation method for heating is shown in an embodiment of the present invention. Figure 2 A schematic diagram of a multi-timescale asynchronous parallel heating digital twin simulation system is shown in an embodiment of the present invention. Detailed Implementation

[0018] The specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples. The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.

[0019] In the description of this application, it should be understood that the terms "center", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application.

[0020] The terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, unless otherwise stated, "a plurality of" means two or more.

[0021] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0022] The following is a description of preferred embodiments of the present invention in conjunction with the accompanying drawings.

[0023] like Figure 1 As shown, an embodiment of the present invention discloses a multi-timescale asynchronous parallel digital twin simulation method for heating, comprising: S110: Construct a digital twin model of the heating system; In this embodiment, the digital twin model specifically includes: The hydraulic sub-model is used to simulate the millisecond-level hydraulic transient processes of fluids in heating pipe networks, including pressure wave propagation, flow distribution changes, and water hammer phenomena. The thermal sub-model is used to simulate the second-level heat transfer process of the heat medium in the heating network, including heat loss, temperature field distribution and delay effect; The system scheduling sub-model is used to simulate the minute-level scheduling optimization process of the heating system, including heat source load allocation, pump start-stop control, and operation strategy adjustment.

[0024] In this embodiment, the hydraulic sub-model transmits pipeline flow rate and node pressure to the thermal sub-model in real time, while the thermal sub-model provides feedback on temperature distribution (affecting fluid density and viscosity) to the hydraulic sub-model. The scheduling sub-model issues control commands (valve opening, pump speed, and load setpoint) to the hydraulic and thermal sub-models and receives status information from both sub-models for the next round of optimization decisions. Data exchange between the sub-models occurs through a unified global event buffer queue, and scheduling is performed by the system scheduling sub-model.

[0025] The beneficial effects of the above technical solution are as follows: by constructing a digital twin model that includes hydraulic, thermal, and system scheduling sub-models, a refined simulation of multiple physical processes in the heating system is achieved. The hydraulic sub-model captures millisecond-level transients, the thermal sub-model tracks second-level transmissions, and the scheduling sub-model performs minute-level optimizations. Through real-time data interaction between sub-models and unified event buffer queue scheduling, dynamic coupling and collaborative simulation of cross-scale processes are ensured. This provides a high-fidelity digital image for the state prediction, fault diagnosis, and optimized scheduling of the heating system, significantly improving the reliability, energy efficiency, and intelligent operation and maintenance capabilities of the system.

[0026] S120: Configure independent virtual clocks and event buffer queues for the sub-models in the digital twin model, and the sub-models asynchronously advance the simulation process according to their respective optimal time steps; In some embodiments of the present invention, the independent virtual clock and event buffer queue specifically include: Each sub-model is configured with an independent virtual clock, which advances independently according to the simulation time scale corresponding to the sub-model, without interfering with each other; The sub-model is configured with an independent event buffer queue to cache unprocessed events generated by the sub-model during simulation. The advancement speed of the virtual clock is related to the event processing status of the event buffer queue. When the event buffer queue is empty, the virtual clock continues to advance according to a preset step size. When a coupling trigger event is detected, the virtual clock pauses its advance until cross-sub-model state synchronization is completed.

[0027] In this embodiment, the advancement speed of the virtual clock is related to the event processing status of the event buffer queue, specifically including: The virtual clock adopts a hybrid propagation mode that combines event-driven and time-driven approaches; When the event buffer queue is not empty, the virtual clock jumps directly to the timestamp of the next event in the queue, prioritizing the processing of events that have already arrived; When the event buffer queue is empty, the virtual clock continues to advance according to the preset optimal time step, and re-checks the event queue status at the end of each advance step. The virtual clock's advance speed is dynamically adjustable. The advance step size is adjusted in real time based on the event queue length, event processing time, and the frequency of coupled events to balance simulation accuracy and computational efficiency.

[0028] In this embodiment, the optimal time step is based on the stability requirements of the numerical solution method, ensuring that the step size does not exceed the critical value jointly determined by the spatial discrete scale and the propagation speed of physical quantities, thus preventing computational divergence. Secondly, based on the inherent time constant of the physical process simulated by each sub-model, a sufficient number of sampling points are ensured within each physical cycle to accurately capture transient changes. Thirdly, based on the preset simulation accuracy index, the maximum step size that meets the maximum permissible error limit is selected through step size sensitivity analysis. At the same time, dynamic adjustments are made in conjunction with the currently available computing resources, appropriately increasing the tolerance when resources are scarce in exchange for simulation speed.

[0029] In this embodiment, the virtual clock's step size is dynamically and adaptively adjusted based on the simulation's running state. When the event buffer queue length exceeds a preset threshold, it indicates a backlog of events to be processed, and the system automatically shortens the step size to improve the timeliness of event response. When increased event processing time leads to a heavier computational burden, the step size is appropriately increased to reduce the number of steps per unit time, avoiding computational resource overload. When the frequency of coupled events increases, it indicates that the system is in a phase of rapid transient changes, requiring more intensive sampling to capture dynamic characteristics; in this case, the step size is proactively reduced to improve simulation accuracy. Conversely, when coupled events are sparse and the system tends towards a steady state, the step size is gradually increased to improve computational efficiency. Through this dynamic adjustment mechanism, the simulation process can minimize redundant computation while ensuring the accuracy of critical transient processes, achieving an adaptive balance between accuracy and efficiency.

[0030] The beneficial effects of the above technical solution are as follows: By configuring independent virtual clocks and event buffer queues for each sub-model, asynchronous parallel advancement of multi-timescale processes is achieved, avoiding redundant calculations caused by traditional uniform step-size simulations; the hybrid advancement mode combining event-driven and time-driven approaches enables the virtual clock to dynamically adjust its advancement strategy according to the event queue status, prioritizing responses during event-intensive periods and continuously advancing at the optimal step size when there are no events, significantly improving simulation efficiency; simultaneously, by comprehensively determining the optimal step size based on multiple factors such as stability conditions, physical time constants, accuracy indicators, and computational resources, and by adjusting the advancement step size in real time in conjunction with event queue length, processing time, and coupling event frequency, a dynamic balance between simulation accuracy and computational efficiency is achieved. While ensuring the coupling accuracy of the entire process of hydraulic transients, heat transfer, and scheduling optimization, it significantly reduces invalid calculations and synchronization overhead, providing efficient and reliable technical support for real-time digital twins and online optimization scheduling of heating systems.

[0031] S130: During the simulation, the key state variables output by the sub-model are monitored in real time. When any sub-model detects a preset coupling trigger event, the event and timestamp are written into the global event buffer queue. In some embodiments of the present invention, during the simulation process, key state variables output by the sub-model are monitored in real time, specifically including: A list of key state variables to be monitored and their corresponding coupling triggering conditions; During the simulation of the sub-model, the current values ​​of key state variables are collected in real time at the sampling frequency corresponding to the virtual clock of the sub-model. The collected state variable values ​​are dynamically compared with preset trigger conditions. When any trigger condition is met, a coupled trigger event is automatically generated and the current virtual timestamp is recorded. The monitoring process is dynamically managed, and the weight parameters of the monitoring list, sampling frequency and triggering conditions are adaptively adjusted according to the simulation stage and changes in operating conditions.

[0032] In this embodiment, the pre-defined monitoring list of key state variables and the corresponding coupling triggering conditions specifically include: Based on the physical characteristics and simulation objectives of the heating system, a list of key state variables is determined. The key state variables include at least the node pressure and pipeline flow rate in the hydraulic sub-model, the supply and return water temperature and heat load in the thermal sub-model, and the equipment start-up and shutdown status and valve opening in the system scheduling sub-model. Configure one or more coupled triggering conditions for each key state variable in the monitoring list, including threshold triggering, rate of change triggering, time triggering, and combinational logic triggering; For different simulation stages and operating conditions, multiple sets of monitoring lists and trigger condition combination templates are preset, and a mapping relationship between the templates and operating condition characteristics is established; The priority of coupling triggering conditions is set in a hierarchical manner. When multiple triggering conditions are met at the same time, coupling triggering events are generated in order of priority.

[0033] In this embodiment, the mapping relationship between the template and the working condition features specifically includes: Extract characteristic parameters of the heating system's operating conditions, including at least outdoor temperature, heat load rate, time period attribute, seasonal attribute, and system operating mode; Construct a working condition feature space, and discretize the continuous feature parameters to form a finite number of working condition feature intervals; Establish a template library for combining monitoring lists and trigger conditions, and label the applicable operating condition characteristic range for each template; During the simulation, the current working condition feature value is calculated in real time, the current working condition interval is determined by the feature matching algorithm, and the corresponding combination template is automatically loaded. Set a hysteresis interval for template switching to avoid frequent template switching when the operating characteristics fluctuate near the boundary.

[0034] In this embodiment, combinational logic triggering achieves intelligent identification of complex operating conditions by combining Boolean logic operations with temporal logic judgments. At the Boolean logic level, it supports AND, OR, NOT, and their nested combinations, constructing multiple basic triggering conditions (such as thresholds, rates of change, and time conditions) into compound expressions. For example, "pressure below the lower limit and flow rate of change exceeding the limit" jointly determines pipeline leakage, and "valve opening greater than zero and flow rate zero" identifies valve malfunction. At the temporal logic level, an advanced judgment mechanism based on the time dimension is introduced, including sequential triggering (detecting event B within a set time window after event A occurs), duration triggering (state maintenance exceeding a set time), frequency triggering (event count exceeding the limit per unit time), and temporal pattern matching (predefined time sequence patterns). Through the above combinational logic, it is possible to accurately identify complex transient processes and fault modes in the heating system that cannot be characterized by a single condition, such as pump start-up and shutdown characteristics, water hammer propagation, valve jamming, and system oscillation, significantly improving the accuracy and scenario coverage of coupled event triggering.

[0035] The beneficial effects of the above technical solution are as follows: By constructing a multi-dimensional coupled event monitoring mechanism that includes thresholds, rates of change, time, and combined logic triggers, and combining it with dynamic loading and priority-based processing of monitoring templates that are adaptive to operating conditions, the system achieves accurate and intelligent identification of complex transient processes and fault modes in the heating system, significantly improving the accuracy of event triggering and scenario coverage. At the same time, by using template matching and hysteresis switching strategies based on operating condition characteristics, the system avoids frequent fluctuations in monitoring parameters, effectively reducing computational overhead while ensuring real-time response to critical states, and providing a reliable guarantee for efficient collaborative simulation and accurate state perception of the heating digital twin model.

[0036] S140: Based on the global event coordinator, the event buffer queue of the sub-model is polled and time-aligned. When multiple sub-models are detected to generate events at the same coupling moment, cross-sub-model state synchronization and data interaction are triggered. In some embodiments of the present invention, polling and time-aligning the event buffer queue of the sub-model based on a global event coordinator specifically includes: The global event coordinator accesses the event buffer queue of the sub-model sequentially according to a preset polling cycle and reads the timestamp of the event at the head of the queue. The timestamps of the events read from the head of each queue are compared to identify events with the same timestamp or whose time difference is within the preset synchronization tolerance range. When multiple sub-models are detected to generate events at the same coupling moment, the global event coordinator sends a synchronization command to the corresponding sub-model and pauses the simulation. For events whose timestamps are not completely consistent but are within the synchronization tolerance range, time alignment is performed based on the earliest timestamp, and the virtual clocks of the relevant sub-models are adjusted.

[0037] In this embodiment, the events within the preset synchronization tolerance range specifically include: Based on the time scale characteristics of the sub-models, differentiated basic synchronization tolerance values ​​are set for the hydraulic sub-model, thermal sub-model, and system scheduling sub-model, respectively. The synchronization tolerance is dynamically adjusted based on the coupling strength between sub-models. The higher the coupling strength, the smaller the tolerance value, in order to ensure the synchronization accuracy of strongly coupled variables. The synchronization tolerance is adaptively adjusted based on the operating conditions of the current simulation stage, tightening the tolerance during transient processes and appropriately loosening the tolerance during steady-state processes. When the timestamp difference of multiple events is less than or equal to the above tolerance value, these events are determined to be within the synchronization tolerance range and are regarded as alignable coupled events.

[0038] The beneficial effects of the above technical solution are as follows: By polling and aligning the event buffer queues of each sub-model through a global event coordinator, and introducing a dynamic synchronization tolerance mechanism based on time scale characteristics, coupling strength, and operating condition characteristics, accurate identification and adaptive alignment of multi-source coupled events are achieved. While ensuring high-precision synchronization of strongly coupled variables, tolerance is appropriately relaxed for weakly coupled or steady-state processes to reduce unnecessary synchronization overhead. By using the earliest timestamp as the basis for time alignment and adjusting the virtual clock, causal consistency and computational efficiency of cross-sub-model state synchronization are ensured, effectively solving the event coordination problem in multi-time-scale asynchronous simulation and providing key support for the collaborative operation of the heating digital twin model.

[0039] S150: After completing state synchronization, the sub-model continues to advance the simulation asynchronously until the next coupling event is triggered or the simulation ends.

[0040] To further illustrate the technical concept of this invention, the technical solution of this invention will now be described in conjunction with specific application scenarios.

[0041] Correspondingly, such as Figure 2 As shown, this application also provides a multi-timescale asynchronous parallel digital twin simulation system for heating to achieve the above objectives, comprising: The model building module is used to build digital twin models of heating systems; An asynchronous simulation module is used to configure independent virtual clocks and event buffer queues for the sub-models in the digital twin model, and the sub-models advance the simulation process asynchronously according to their respective optimal time steps; The event monitoring module is used to monitor the key state variables output by the sub-model in real time during the simulation process. When any sub-model detects a preset coupling trigger event, the event and timestamp are written to the global event buffer queue. The event coordination module is used to poll and time-align the event buffer queue of the sub-model based on the global event coordinator. When multiple sub-models are detected to generate events at the same coupling moment, cross-sub-model state synchronization and data interaction are triggered. The loop control module is used to allow the sub-model to continue the simulation asynchronously after the state synchronization is completed, until the next coupling event is triggered or the simulation ends.

[0042] In the description of the above embodiments, specific features, structures, materials, or characteristics may be combined in any suitable manner in one or more embodiments or examples.

[0043] Although the invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the embodiments disclosed in this invention can be combined with each other in any way. The fact that not all of these combinations are described in this specification is merely for the sake of brevity and resource conservation.

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

Claims

1. A multi-timescale asynchronous parallel digital twin simulation method for heating, characterized in that, include: Constructing a digital twin model of the heating system; Each sub-model in the digital twin model is configured with an independent virtual clock and event buffer queue, and the sub-models advance the simulation process asynchronously according to their respective optimal time steps; During the simulation, the key state variables output by the sub-model are monitored in real time. When any sub-model detects a preset coupling trigger event, the event and timestamp are written to the global event buffer queue. Based on the global event coordinator, the event buffer queue of the sub-model is polled and time-aligned. When multiple sub-models are detected to generate events at the same coupling moment, cross-sub-model state synchronization and data interaction are triggered. After state synchronization is completed, the sub-model continues to advance the simulation asynchronously until the next coupling event is triggered or the simulation ends.

2. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 1, characterized in that, Digital twin models specifically include: The hydraulic sub-model is used to simulate the millisecond-level hydraulic transient processes of fluids in heating pipe networks, including pressure wave propagation, flow distribution changes, and water hammer phenomena. The thermal sub-model is used to simulate the second-level heat transfer process of the heat medium in the heating network, including heat loss, temperature field distribution and delay effect; The system scheduling sub-model is used to simulate the minute-level scheduling optimization process of the heating system, including heat source load allocation, pump start-stop control, and operation strategy adjustment.

3. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 1, characterized in that, Independent virtual clock and event buffer queue, specifically including: Each sub-model is configured with an independent virtual clock, which advances independently according to the simulation time scale corresponding to the sub-model, without interfering with each other; The sub-model is configured with an independent event buffer queue to cache unprocessed events generated by the sub-model during simulation. The advancement speed of the virtual clock is related to the event processing status of the event buffer queue. When the event buffer queue is empty, the virtual clock continues to advance according to a preset step size. When a coupling trigger event is detected, the virtual clock pauses its advance until cross-sub-model state synchronization is completed.

4. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 3, characterized in that, The advancement speed of the virtual clock is related to the event processing status of the event buffer queue, specifically including: The virtual clock adopts a hybrid propagation mode that combines event-driven and time-driven approaches; When the event buffer queue is not empty, the virtual clock jumps directly to the timestamp of the next event in the queue, prioritizing the processing of events that have already arrived; When the event buffer queue is empty, the virtual clock continues to advance according to the preset optimal time step, and re-checks the event queue status at the end of each advance step. The virtual clock's advance speed is dynamically adjustable. The advance step size is adjusted in real time based on the event queue length, event processing time, and the frequency of coupled events to balance simulation accuracy and computational efficiency.

5. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 1, characterized in that, During the simulation, the key state variables output by the sub-model are monitored in real time, specifically including: A list of key state variables to be monitored and their corresponding coupling triggering conditions; During the simulation of the sub-model, the current values ​​of key state variables are collected in real time at the sampling frequency corresponding to the virtual clock of the sub-model. The collected state variable values ​​are dynamically compared with preset trigger conditions. When any trigger condition is met, a coupled trigger event is automatically generated and the current virtual timestamp is recorded. The monitoring process is dynamically managed, and the weight parameters of the monitoring list, sampling frequency and triggering conditions are adaptively adjusted according to the simulation stage and changes in operating conditions.

6. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 5, characterized in that, A list of key state variables to be monitored and their corresponding coupling triggering conditions is pre-defined, specifically including: Based on the physical characteristics and simulation objectives of the heating system, a list of key state variables is determined. The key state variables include at least the node pressure and pipeline flow rate in the hydraulic sub-model, the supply and return water temperature and heat load in the thermal sub-model, and the equipment start-up and shutdown status and valve opening in the system scheduling sub-model. Configure one or more coupled triggering conditions for each key state variable in the monitoring list, including threshold triggering, rate of change triggering, time triggering, and combinational logic triggering; For different simulation stages and operating conditions, multiple sets of monitoring lists and trigger condition combination templates are preset, and a mapping relationship between the templates and operating condition characteristics is established; The priority of coupling triggering conditions is set in a hierarchical manner. When multiple triggering conditions are met at the same time, coupling triggering events are generated in order of priority.

7. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 6, characterized in that, The mapping relationship between templates and operating condition characteristics specifically includes: Extract characteristic parameters of the heating system's operating conditions, including at least outdoor temperature, heat load rate, time period attribute, seasonal attribute, and system operating mode; Construct a working condition feature space, and discretize the continuous feature parameters to form a finite number of working condition feature intervals; Establish a template library for combining monitoring lists and trigger conditions, and label the applicable operating condition characteristic range for each template; During the simulation, the current working condition feature value is calculated in real time, the current working condition interval is determined by the feature matching algorithm, and the corresponding combination template is automatically loaded. Set a hysteresis interval for template switching to avoid frequent template switching when the operating characteristics fluctuate near the boundary.

8. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 1, characterized in that, The event buffer queue of the sub-model is polled and time-aligned based on the global event coordinator, specifically including: The global event coordinator accesses the event buffer queue of the sub-model sequentially according to a preset polling cycle and reads the timestamp of the event at the head of the queue. The timestamps of the events read from the head of each queue are compared to identify events with the same timestamp or whose time difference is within the preset synchronization tolerance range. When multiple sub-models are detected to generate events at the same coupling moment, the global event coordinator sends a synchronization command to the corresponding sub-model and pauses the simulation. For events whose timestamps are not completely consistent but are within the synchronization tolerance range, time alignment is performed based on the earliest timestamp, and the virtual clocks of the relevant sub-models are adjusted.

9. The multi-timescale asynchronous parallel digital twin simulation method for heating according to claim 8, characterized in that, Events within the preset synchronization tolerance range, specifically including: Based on the time scale characteristics of the sub-models, differentiated basic synchronization tolerance values ​​are set for the hydraulic sub-model, thermal sub-model, and system scheduling sub-model, respectively. The synchronization tolerance is dynamically adjusted based on the coupling strength between sub-models. The higher the coupling strength, the smaller the tolerance value, in order to ensure the synchronization accuracy of strongly coupled variables. The synchronization tolerance is adaptively adjusted based on the operating conditions of the current simulation stage, tightening the tolerance during transient processes and appropriately loosening the tolerance during steady-state processes. When the timestamp difference of multiple events is less than or equal to the above tolerance value, these events are determined to be within the synchronization tolerance range and are regarded as alignable coupled events.

10. A multi-timescale asynchronous parallel heating digital twin simulation system, applied to any one of the multi-timescale asynchronous parallel heating digital twin simulation methods as described in claims 1-9, characterized in that, include: The model building module is used to build digital twin models of heating systems; An asynchronous simulation module is used to configure independent virtual clocks and event buffer queues for the sub-models in the digital twin model, and the sub-models advance the simulation process asynchronously according to their respective optimal time steps; The event monitoring module is used to monitor the key state variables output by the sub-model in real time during the simulation process. When any sub-model detects a preset coupling trigger event, the event and timestamp are written to the global event buffer queue. The event coordination module is used to poll and time-align the event buffer queue of the sub-model based on the global event coordinator. When multiple sub-models are detected to generate events at the same coupling moment, cross-sub-model state synchronization and data interaction are triggered. The loop control module is used to allow the sub-model to continue the simulation asynchronously after the state synchronization is completed, until the next coupling event is triggered or the simulation ends.