Real-time simulation combustion and interaction control system based on cremation process
By combining communication, simulation rendering, data processing, and interactive control modules, the high cost and safety risks of cremation machine training equipment are solved, achieving high-fidelity, real-time simulation and closed-loop control of the cremation process, thus improving teaching effectiveness and operational fluency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING YUHUA INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-12
AI Technical Summary
Existing cremator operation training equipment is expensive and poses significant safety risks. Furthermore, the simulation system has shortcomings in communication, visual effects, and system architecture, resulting in poor teaching effectiveness and clunky operation.
A communication module is used to achieve full-duplex data connection, a simulation rendering module dynamically renders flame effects, a data processing module manages data flow, and an interactive control module coordinates module responses. By combining an event-driven mechanism and multi-threaded asynchronous execution, a high-fidelity real-time simulation and closed-loop interactive control system is constructed.
It achieves a high degree of synchronization between equipment status and simulation data, improves visual realism and operational smoothness, enhances system scalability and maintainability, and ensures high-fidelity, high-real-time simulation and control of the cremation process.
Smart Images

Figure CN122018356A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial automation control and computer simulation technology, and in particular to a real-time simulation combustion and interactive control system based on the cremation process. Background Technology
[0002] In current professional skills teaching and competitions in civil affairs-related higher education institutions and industries, training in the operation of large-scale special equipment such as cremation machines is a core component. Traditional training models heavily rely on physical equipment, but the equipment itself is expensive, requires a large area, and has high maintenance costs, making it difficult for teaching units to equip themselves on a large scale, thus limiting students' hands-on opportunities. More importantly, the actual cremation process involves high-temperature, high-pressure, and open flames, posing significant safety risks and making it unsuitable for beginners to operate directly. Furthermore, key parameters such as the internal combustion state and pressure changes of the equipment are difficult to display intuitively and in real time, resulting in a lack of transparency in the teaching process and insufficient data support for evaluating teaching effectiveness.
[0003] The use of virtual simulation systems to assist teaching has become a trend, but existing solutions suffer from significant technical bottlenecks: At the communication level, many rely on simple, one-way, or unstable protocols, making it difficult to achieve stable, real-time, and bidirectional data synchronization between the server, client, and peripheral hardware, resulting in a disconnect between simulation status and control commands. At the visual level, combustion effects are simplistic and static, often consisting of static textures or pre-rendered animations, failing to dynamically and realistically simulate continuous changes in flame shape based on operating parameters. The 3D equipment models also lack detailed mechanical motion feedback, resulting in insufficient immersion. At the system architecture level, the functional modules are tightly coupled, with poor scalability, making it difficult to flexibly integrate new hardware or expand to new subjects. At the real-time level, the lack of efficient resource scheduling and data processing mechanisms easily leads to interface lag during complex calculations or multi-channel communication, affecting operational smoothness and training rhythm. Summary of the Invention
[0004] In view of this, the present invention aims to provide a real-time simulation combustion and interactive control system based on the cremation process to solve or alleviate the technical problems existing in the prior art.
[0005] The technical solution of this invention is implemented as follows: a real-time simulation combustion and interactive control system based on the cremation process, comprising:
[0006] The communication module is used to establish and maintain full-duplex data connections between the server, client, and control hardware devices based on the industrial bus protocol, enabling the issuance of control commands and the uploading of status feedback.
[0007] The simulation rendering module is connected to the communication module and is used to generate and dynamically render the combustion particle effects and 3D equipment model animation of the cremator in real time according to the received instructions and data.
[0008] The data processing module interacts with the communication module and the simulation rendering module respectively. It is based on a data layer, interaction layer, control layer and service layer to build an architecture. It is used to encapsulate, store, verify and process cremator equipment events, data distribution, control commands, protocol data and special effects configuration parameters, and provide a unified data source for other modules.
[0009] The interactive control module is connected to the data processing module and the simulation rendering module respectively. It is used to provide a user interface, capture operation commands, schedule data processing and view updates, and coordinate the response and linkage between the modules through an event-driven mechanism.
[0010] The architecture support module provides underlying service support for the communication module, data processing module, and interactive control module, including encapsulating algorithm and data parsing services, and handling communication monitoring and computationally intensive tasks through a multi-threaded asynchronous execution mechanism;
[0011] The system, under the scheduling of the architecture support module, achieves hardware-in-the-loop control through the communication module, state synchronization through the data processing module, visual simulation through the simulation rendering module, and human-computer interaction through the interactive control module, together completing high-fidelity real-time simulation and closed-loop interactive control of the cremation process.
[0012] The embodiments of this invention, by adopting the above technical solutions, have the following advantages: A stable and reliable bidirectional data link is constructed by integrating a TCP communication unit with heartbeat monitoring and automatic reconnection mechanisms and an industrial bus communication unit, solving the problem of asynchronous simulation and control commands caused by unstable communication in existing technologies; A high-fidelity, continuously changing flame and equipment motion simulation is achieved by using a particle system based on a game engine that can dynamically map combustion intensity and a 3D model with skeletal animation and PBR rendering, overcoming the shortcomings of traditional systems such as dull visual effects and insufficient immersion; Based on a decoupled architecture of MVC and event-driven architecture, asynchronous coordination between modules is achieved through global event scheduling, improving system scalability and maintainability, facilitating the integration of new hardware and expansion of training subjects; and through a multi-threaded asynchronous mechanism, communication monitoring and complex calculation tasks are separated into independent threads, ensuring the smooth response of the main thread and effectively avoiding interface lag and operation delays, thus achieving high-fidelity, high-real-time, and high-interactivity cremation process simulation and closed-loop control as a whole. Attached Figure Description
[0013] To more clearly illustrate the technical solutions in this embodiment, the accompanying drawings used in the description of the embodiment will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a diagram of the overall system architecture of the present invention;
[0015] Figure 2 This is a diagram showing the internal structure of the communication module of the present invention;
[0016] Figure 3 This is a diagram showing the internal structure of the simulation rendering module of the present invention;
[0017] Figure 4 This is a diagram showing the internal structure of the data processing module of the present invention;
[0018] Figure 5 This is a structural diagram of the internal structure of the interactive control module of the present invention. Detailed Implementation
[0019] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.
[0020] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0021] This invention proposes a real-time simulation combustion and interactive control system based on the cremation process. The system includes a communication module, a simulation rendering module, a data processing module, an interactive control module, and an architecture support module. Under the scheduling of the architecture support module, the system achieves hardware-in-the-loop control through the communication module, state synchronization through the data processing module, visual simulation through the simulation rendering module, and human-computer interaction through the interactive control module, collectively completing high-fidelity real-time simulation and closed-loop interactive control of the cremation process.
[0022] It's important to note that the data layer, interaction layer, control layer, and service layer architecture is a software design pattern that divides an application into four core components: data layer, interaction layer, control layer, and service layer. The data layer encapsulates business logic and data; the interaction layer handles the visualization of data; the control layer processes user input and coordinates the interaction between the model and the view; and the service layer handles software communication and event handling. This architecture contributes to modularity, maintainability, and scalability.
[0023] Event-driven programming is a programming paradigm whose core idea is that program flow is determined by the occurrence of events. When a specific event (such as user action, data update, or system notification) occurs, the system triggers the corresponding processing function or callback, thereby achieving decoupled communication and asynchronous response between modules.
[0024] Multithreaded asynchronous execution refers to creating multiple independent execution threads within a single application. These threads can execute tasks concurrently or in parallel without blocking the main program. This mechanism is often used to handle time-consuming or computationally intensive tasks to improve system responsiveness and overall performance.
[0025] Hardware-in-the-loop (HIL) control is a simulation technology that integrates actual hardware devices (such as airflow control hardware) into a simulation loop. Through real-time data exchange with the hardware devices via a communication module, the simulation system can simulate the impact of the real physical environment on the hardware and receive actual feedback from the hardware, thereby achieving precise control and verification of the physical process.
[0026] State synchronization refers to the process of ensuring that the data states of different components or nodes remain consistent in a distributed system or simulation environment. By using a data processing module to uniformly manage and update device operating parameters, communication protocol data, and special effect configuration parameters, it is possible to ensure that the data views of various modules within the simulation system and with external hardware devices remain consistent in real time.
[0027] Closed-loop interactive control refers to a system that can generate control commands based on user input or preset targets, apply them to the controlled object, receive feedback data from the controlled object in real time, and then adjust the control strategy based on the feedback data, forming a continuous and adaptive control loop. This mechanism ensures that the simulation system can accurately and in real time intervene and adjust the cremation process.
[0028] In this embodiment, the communication module is used to establish and maintain bidirectional data connections between the server, client, and external airflow control hardware devices, enabling the issuance of control commands and the uploading of status feedback. The communication module employs various methods, such as using a TCP-based socket connection to send control commands and upload status feedback. Alternatively, it can use a standard industrial bus communication protocol (such as Modbus-RTU) to exchange structured data with hardware devices supporting the protocol via a master-slave query-response method.
[0029] Furthermore, the system includes a simulation rendering module connected to the communication module. This module generates and dynamically renders the combustion particle effects and 3D equipment model animations of the crematorium in real time, based on received instructions and data. For example, a particle system with fixed parameters is used to simulate flame effects, and a preset animation sequence is used to drive the mechanical movements of the 3D model.
[0030] In addition, a data processing module is included, which interacts with both the communication module and the simulation rendering module. Based on the model layer of the model-view-controller service architecture, it encapsulates, stores, verifies, and processes the cremator equipment's operating parameters, communication protocol data, and special effects configuration parameters, and provides a unified data source for other modules. For example, equipment operating parameters are stored in a simple structure in memory, communication protocol data is defined using hard-coding, and special effects configuration parameters are stored in text files and undergo basic type validation.
[0031] In a preferred embodiment, the system also includes an interactive control module connected to both the data processing module and the simulation rendering module. This module provides a user interface, captures operation commands, schedules data processing and view updates, and coordinates the responses and interactions between modules through an event-driven mechanism. For example, the user interface consists of a series of static buttons and text boxes; user operation commands are captured through timed polling; and view updates are achieved by directly calling the rendering function.
[0032] Furthermore, the system is also equipped with an architecture support module, providing underlying service support for the communication module, data processing module, and interactive control module. This includes encapsulating algorithm and data parsing services, as well as handling communication monitoring and computationally intensive tasks through a multi-threaded asynchronous execution mechanism. For example, the communication service only provides basic sending and receiving functions, the data parsing service uses a simple string matching method, and the multi-threaded processing creates the corresponding number of threads as needed to handle predefined tasks.
[0033] Therefore, under the scheduling of the architecture support module, the system achieves hardware-in-the-loop control through the communication module, state synchronization through the data processing module, visual simulation through the simulation rendering module, and human-machine interaction through the interactive control module. These modules work together to achieve high-fidelity real-time simulation and closed-loop interactive control of the cremation process. For example, the communication module connects to the actual airflow controller, the data processing module updates combustion parameters in real time, the simulation rendering module displays corresponding flame changes, and the interactive control module allows users to adjust the airflow, thus forming a complete simulation and control loop.
[0034] The system proposed in this embodiment, through its modular design, effectively solves problems such as unstable data connections, poor simulation effects, low data processing efficiency, and clunky human-computer interaction in traditional cremation process simulations. This system enables precise hardware-in-the-loop control, ensuring a high degree of synchronization between simulation data and the actual equipment status. Simultaneously, high-fidelity visual rendering and intuitive interactive operation enhance users' understanding and control of the cremation process, providing a reliable and efficient solution for training, operation, and remote monitoring of cremation equipment.
[0035] In some of the above embodiments, the communication module is used to establish and maintain bidirectional data connections between the server, client, and external airflow control hardware devices, enabling the issuance of control commands and the uploading of status feedback. However, in practical applications, ensuring the reliability of communication between different types of devices, the integrity of data transmission, and the stability of connections are key challenges in achieving high-precision real-time simulation and closed-loop control.
[0036] Therefore, this invention further proposes a communication module, including a TCP communication unit, which establishes a reliable network link between the server and client based on a full-duplex communication protocol for transmitting cremation process control commands and equipment status data, and integrates a heartbeat packet monitoring and automatic reconnection mechanism to maintain link activity; and an industrial bus communication unit, which connects to control hardware devices such as air volume and valves based on the Modbus-RTU protocol, for encapsulating control commands into standard Modbus protocol data frames and sending them, while simultaneously polling and reading feedback data from slave stations (hardware devices) in master station mode, realizing digital command issuance and status acquisition of the control system. The Modbus-RTU protocol follows publicly available industrial standards, and its data frame structure includes slave device address, function code, data field, and cyclic redundancy check (CRC) field. Commonly used function codes include the 03H function code for reading holding registers and the 06H function code for writing to a single register. The data field carries the specific register address, read / write data length, and control setpoint or status feedback value.
[0037] Specifically, the TCP communication unit is a software component responsible for implementing network communication based on the TCP / IP protocol. It establishes connections with both the server and client through standard socket interfaces, leveraging the characteristics of the TCP protocol to ensure ordered data packet transmission, error detection, and retransmission, thereby providing a reliable data stream. Full-duplex communication allows the server and client to send and receive data simultaneously, improving communication efficiency. To cope with network fluctuations or connection interruptions, the TCP communication unit integrates a heartbeat monitoring mechanism, periodically sending small data packets to check the connection's liveness. If a heartbeat response is not received consecutively, the connection is considered abnormal, and a reconnection process is automatically triggered, such as through an exponential backoff algorithm or fixed-interval retries, to ensure the continuous transmission of control commands and status data, preventing system malfunction or data loss due to brief network issues.
[0038] The industrial bus communication unit is a software module used to manage and support communication between industrial hardware devices and the Modbus-RTU protocol. As a Modbus master, this unit is responsible for converting high-level control commands (such as target airflow) into standard Modbus write register commands (function codes 06H or 16H) according to a preset register address mapping table, and sending them via a physical serial port or RS-485 bus. Simultaneously, according to a configured polling cycle, this unit actively sends read register commands (function code 03H) to the hardware devices to obtain the device's operating status (such as actual airflow, temperature, etc.), and parses the received raw Modbus data frames into engineering data that the system can understand. The use of the standard Modbus-RTU protocol offers advantages in its universality and reliability. Device addresses are used to distinguish different slave devices on the bus; function codes clearly define the operation type; the data field format is unified; and the CRC check field uses a 16-bit cyclic redundancy check algorithm, providing strong verification capabilities and effectively ensuring the integrity of data transmission. This allows the system to easily connect to various industrial devices compliant with the Modbus standard, enhancing system compatibility and scalability.
[0039] Through the above technical solutions, this invention employs customized communication mechanisms for different communication scenarios (high-level client / server and industrial field hardware devices), significantly improving the communication reliability and data integrity of the entire simulation and control system. The TCP communication unit, through its inherent reliability, heartbeat packet monitoring, and automatic reconnection mechanisms, ensures the stability and continuity of control command and status data transmission between the server and client, effectively avoiding service interruptions caused by momentary network failures and guaranteeing the overall real-time response capability of the system. Simultaneously, the industrial bus communication unit, by adopting the standard Modbus-RTU protocol and utilizing its clearly defined device address, function code, register address mapping, and strong CRC check mechanism, provides standardized data integrity guarantees for communication with industrial hardware devices such as airflow control. This allows control commands such as airflow adjustment to be accurately sent to the hardware as standard Modbus write commands, while the master station polling mechanism reliably reads hardware status feedback data, thereby achieving precise digital setting and closed-loop feedback of control parameters. This layered (TCP / IP network and industrial fieldbus) and optimized (standard protocol and customized strategy combination) communication strategy not only solves the compatibility and interoperability problems of communication between heterogeneous devices, but also provides a reliable and universal data transmission foundation for high-fidelity real-time simulation and closed-loop interactive control of the cremation process, ensuring the accuracy of simulation results and the effectiveness of control commands.
[0040] In addition, as a preferred enhancement, the communication module of the present invention can also adopt an architecture based on DDS middleware to provide a higher level of module decoupling and system expansion capabilities.
[0041] The DDS middleware is implemented based on the OMGDDS standard and includes the following core components:
[0042] 1. DDS Domains and Participants:
[0043] The system uses a unified DDS domain (DomainID:0), and all modules join the domain as domain participants;
[0044] Each module creates a DomainParticipant instance, which is responsible for managing the DDS resources of that module;
[0045] Domain participants establish connections through DDS's automatic discovery mechanism, eliminating the need for manual configuration of communication endpoints.
[0046] 2. Data Subject Definition:
[0047] The system defines the following core data topics, each corresponding to a data type:
[0048] DeviceControlTopic: The topic for device control instructions, with data type DeviceControlData, is used to publish instructions such as airflow adjustment and ignition control.
[0049] DeviceStatusTopic: Device status feedback topic, data type is DeviceStatusData, used to publish the real-time status collected by sensors;
[0050] SimulationParamTopic: Simulation parameter topic, data type SimulationParamData, used to publish combustion intensity, special effect parameters, etc.
[0051] UserActionTopic: User interaction topic, with data type UserActionData, used to publish user action events;
[0052] SystemStatusTopic: A system status topic with data type SystemStatusData, used to publish the running status of each module.
[0053] 3. Service Quality Strategy Configuration:
[0054] Configure corresponding QoS policies according to the different requirements of data types:
[0055] Control command data: Configure RELIABLE reliability, TRANSIENT_LOCAL persistence, and DEADLINE (100ms) deadline;
[0056] Status feedback data: Configure BEST_EFFORT reliability, VOLATILE durability, and TIME_BASED_FILTER (50ms) time filtering;
[0057] Simulation parameter data: Configure RELIABLE reliability and TRANSIENT_LOCAL durability;
[0058] User operation data: Configure RELIABLE reliability, TRANSIENT_LOCAL durability, and DEADLINE (50ms) deadline.
[0059] 4. Protocol adaptation and bridging:
[0060] To ensure compatibility with existing hardware devices, the system provides a protocol adapter unit:
[0061] Modbus-DDS Adapter: As a Modbus master station, it polls the hardware device, converts the read status data into DDS data samples, and publishes them to DeviceStatusTopic; at the same time, it subscribes to DeviceControlTopic and converts control commands into standard Modbus-RTU protocol frames to send to the hardware device.
[0062] TCP-DDS Gateway: Performs bidirectional data conversion between TCP connections and DDS topics, supporting traditional TCP clients / servers to access the DDS network.
[0063] 5. DDS implementation of event scheduling:
[0064] The event scheduling unit can be implemented based on the publish-subscribe mechanism of DDS:
[0065] Map each event type managed by the event center to a DDS topic;
[0066] Each module receives event notifications by subscribing to topics of interest;
[0067] The event publishing module writes event data to the corresponding topic, and the DDS middleware is responsible for distributing it to all subscribers;
[0068] Conditional subscription is supported through DDS's ContentFilteredTopic, allowing you to receive only events that meet specific conditions.
[0069] 6. System monitoring and management:
[0070] DDS middleware provides rich monitoring interfaces and can be used for system status monitoring:
[0071] Monitor the data traffic of each entity using the built-in statistical functions of DDS;
[0072] The operational status of each module is monitored through a survival detection mechanism;
[0073] The system state is saved and restored through persistent services.
[0074] The DDS-based implementation has the following advantages:
[0075] 1. Loosely coupled architecture: Each module communicates through topics, reducing dependencies between modules and improving system maintainability;
[0076] 2. High scalability: New modules can be integrated into the system simply by subscribing to / publishing relevant topics, supporting dynamic expansion;
[0077] 3. Quality of Service Assurance: Provide differentiated quality of service for different data through QoS policies;
[0078] 4. Better real-time performance: DDS is designed specifically for real-time systems, providing deterministic transmission latency;
[0079] 5. Standardized Interfaces: Based on international standards, improve system interoperability and portability.
[0080] In practical applications, the system can adopt a hybrid communication mode, combining the advantages of traditional communication methods and DDS middleware:
[0081] Key real-time data channels: Control commands, real-time status feedback, and other data with high real-time requirements are transmitted through the DDS middleware;
[0082] Traditional data channels: Non-real-time data such as file transfers and batch synchronization of historical data are transmitted via traditional TCP connections;
[0083] Industrial fieldbus channel: Communication with industrial hardware devices supporting protocols such as Modbus-RTU is achieved directly through the industrial bus communication unit, while data is bridged to the DDS network through a Modbus-DDS adapter.
[0084] This hybrid architecture retains the maturity and stability of traditional communication methods while also gaining the advanced features of DDS middleware, and can be flexibly configured according to actual needs.
[0085] It accurately and dynamically represents the complex and ever-changing flame patterns in the combustion chamber, as well as the mechanical movements of the furnace components in response to control commands, in order to achieve a high-fidelity visual experience that truly reflects the cremation process.
[0086] Therefore, this invention further proposes a specific implementation method for the simulation rendering module to enhance the visual realism and interactive experience of the system. The simulation rendering module includes a particle effects unit and a 3D model processing unit.
[0087] The particle effects unit, built upon the game engine's particle system, responds to state change events from the data processing module, dynamically adjusting particle emission rate, color gradient, direction, size, and lifecycle parameters to simulate the flame patterns of the main and auxiliary combustion chambers at different combustion stages. Specifically, the particle effects unit utilizes particle system components provided by the game engine, configuring modules such as emitters, shapes, lifecycles, color changes over time, and size changes over time to generate and control a large number of tiny particles, thereby simulating complex natural phenomena such as flames and smoke. When the data processing module detects a change in the combustion state (e.g., combustion intensity, fuel type, airflow), it triggers a corresponding state change event. The particle effects unit subscribes to these events and updates various parameters of the particle system in real time based on the data carried by the events. For example, by adjusting the initial velocity, gravity effects, and collision behavior of the particles, it simulates the rising, spreading, and dissipating process of the flame; by adjusting the color gradient, it transitions the flame from bright yellow to orange-red at the edges, and then to smoky gray at the top, thus presenting a more layered and realistic flame visual effect.
[0088] The 3D model processing unit integrates a 3D model of the crematorium with a skeletal animation structure and uses next-generation texture mapping technology based on physically based rendering for material representation. This allows the model to drive the mechanical movements of corresponding components according to equipment control commands and present visual effects that conform to physical laws under different operating conditions. Skeletal animation technology allows the complex crematorium model to be decomposed into independently movable components (such as furnace doors, air valves, burner nozzles, etc.), and the geometric deformation of these components is driven by the rotation and translation of virtual skeletons to achieve smooth and natural mechanical movements. For example, when the user sends a "open furnace door" command through the interactive control module, the 3D model processing unit will receive the command and drive the furnace door model to open according to a preset animation path. Meanwhile, next-generation texture mapping technologies based on Physical Rendering (PBR), such as Albedo, Metallic, Roughness, and Normal Map, are used to accurately simulate the optical properties of different materials (such as metal, refractory bricks, and glass) under different lighting conditions, making the cremator model more visually realistic. Whether it is the reflection of the furnace body, the wear and tear of the materials, or the scorching heat of the high-temperature areas, they can all be presented in detail.
[0089] To achieve accurate simulation of flame morphology, the process of dynamically adjusting the particle emission rate is mapped based on the combustion intensity I (dimensionless, range [0,1]), and the emission rate R... emit The calculation follows the following relationship:
[0090] R emit (I)=R min +(Rmax -R min )·I γ .
[0091] Among them, R min With E max The preset minimum and maximum emission rates (particles per second) define the intensity range of the flame's visual representation. I represents the current combustion intensity, typically calculated by the data processing module based on actual fuel / gas flow, oxygen concentration, temperature, and other parameters, and normalized to between 0 and 1. γ is a non-linear adjustment coefficient (γ>0), used to control the curve shape of the emission rate as a function of combustion intensity. When γ>1, the emission rate increases more rapidly at higher combustion intensities, resulting in a more significant and impactful visual effect for high-intensity flames. When 0<γ<1, the emission rate increases faster at lower combustion intensities, allowing even weak flames to have a good visual representation. When γ=1, the emission rate has a linear relationship with combustion intensity. By adjusting the γ value, the dynamic response characteristics of flames under different fuels or combustion conditions can be flexibly simulated, making the visual changes of the simulated flame more consistent with actual physical laws.
[0092] Through the above technical solution, this invention overcomes the limitations of traditional simulations, such as monotonous visual effects and insufficient dynamic response. The introduction of particle effects units and 3D model processing units enables the system to generate highly realistic and dynamically changing flame shapes and mechanical movements, greatly enhancing the visual realism of the simulation process. In particular, the nonlinear mapping relationship between combustion intensity and particle emission rate allows the visual representation of the flame to accurately and hierarchically reflect changes in the actual combustion state, thus providing users with a more intuitive and immersive interactive experience. By combining high-fidelity visual feedback with real-time data streams provided by the communication and data processing modules, a closed-loop, realistic simulation control environment is constructed, enabling operators to more accurately understand and predict the dynamic changes in the cremation process, thereby effectively improving the efficiency of human-computer interaction and the accuracy of decision-making.
[0093] To address this, the present invention receives data from hardware devices via a communication module, which is then processed by a data processing module to drive the simulation rendering module and the interactive control module. However, in actual operation, the data fed back by the hardware devices may contain outliers, format mismatches, or logical inconsistencies. If these raw data cannot be effectively managed, verified, and converted, the system will struggle to ensure the accuracy of simulation results, the reliability of control commands, and the overall stability of operation, thus affecting the effectiveness of high-fidelity real-time simulation and closed-loop interactive control.
[0094] To address the aforementioned issues, this invention further proposes a data processing module that encapsulates and maintains three core data models: an equipment parameter model, a communication protocol model, and a special effect parameter model. The equipment parameter model includes at least real-time data on main combustion chamber temperature and pressure, auxiliary combustion chamber temperature, and fuel / gas flow. The communication protocol model defines the mapping relationship between the TCP command structure, Modbus-RTU protocol data frame format, and register addresses. The special effect parameter model stores a set of particle system attribute configurations corresponding to different combustion states. The data processing module is also responsible for validating the input data and performing state transitions and parameter mappings according to business logic, providing data support for control command generation and simulation effect updates. The validity verification includes a threshold judgment on the main combustion chamber temperature and pressure data P, which must satisfy a physical constraint: P... min ≤P≤P max And logical consistency constraints: when the auxiliary combustion chamber status flag S aux When it is "off", its associated fuel and gas flow data F aux It must be zero, that is: =0. Where, P min P max The lower and upper pressure limits are set based on the physical characteristics of the cremator.
[0095] Specifically, the equipment parameter model is a collection of data structures within the data processing module used to abstract and manage various operating parameters of the cremator. It structurally encapsulates real-time status and sensor readings of the physical equipment, making them easily accessible and processable by other modules in the system. The model is designed using an object-oriented approach, for example, defining a `CrematorParameters` class containing attributes such as `mainChamberPressure` (main combustion chamber temperature and pressure), `auxChamberStatus` (auxiliary combustion chamber temperature), and `fuelFlowRate` (fuel and gas flow rate). These attributes are basic data types (such as floating-point numbers and boolean values) or more complex enumeration types. The model internally includes methods for data updating, reading, and serialization / deserialization, thereby uniformly managing equipment operating parameters and providing a consistent and reliable data source for simulation rendering, interactive control, and control command generation.
[0096] The communication protocol model is an abstract definition used by the data processing module to standardize and parse the communication data formats inside and outside the system. It ensures that the system can correctly encode sent control commands and decode received device status data. This model is defined as a series of data structures or classes, such as the TCPCommand class to describe the fields of TCP commands (e.g., command type, parameter payload), and the ModbusRTUFrame class and RegisterMapping configuration table to describe the structure of Modbus-RTU data frames and the mapping relationship between internal system variables and device register addresses (e.g., device address, function code, register address, data value, CRC checksum). These definitions strictly correspond to the actual communication protocol, ensuring that the data sent and received by the communication module can be correctly constructed and parsed.
[0097] The special effects parameter model is a dataset used by the data processing module to store and manage particle system attribute configurations corresponding to different combustion states. It allows the system to dynamically adjust the visual simulation effects based on the actual operating state of the cremator. This model is a dictionary or mapping table containing multiple preset configuration items, each corresponding to a specific combustion state (e.g., "ignition stage," "stable combustion," "flameout stage"), and storing parameters such as the particle system's emission rate, color gradient, size, lifespan, and texture under that state. These configurations can be loaded from external configuration files (such as JSON or XML) and maintained by the data processing module at runtime, thereby enabling dynamic and precise adjustment of particle effects in the simulation rendering module, ensuring that the visual effects remain highly consistent with the equipment's operating state.
[0098] Input data validity verification refers to the series of checks performed on raw data by the data processing module after receiving it, to ensure that the data conforms to preset physical constraints and logical rules, and to prevent invalid or erroneous data from entering the system. For example, for the main combustion chamber temperature and pressure P, the system will check whether it falls within the preset physical validity range [P]. min ,P max [Within.] If the sensor reading P is less than P... min or greater than P max If the data is invalid, it can be discarded, an alarm can be triggered, or the last valid value can be used. For the auxiliary combustion chamber state S... aux and fuel gas flow rate F aux The system will examine the logical relationships between them. For example, if S aux It is "off", but F aux If the value is not zero, it indicates a logical conflict in the data, requiring further diagnosis or correction. This verification mechanism improves the reliability and accuracy of the data, avoiding simulation distortion or control errors caused by erroneous data.
[0099] State transition and parameter mapping refer to the process by which the data processing module, based on business logic, transforms raw equipment parameters into abstract states used internally by the system, or maps one parameter form to another. For example, based on multiple equipment parameters such as main combustion chamber temperature and pressure, temperature, and oxygen content, a certain algorithm or rule (such as fuzzy logic or state machines) is used to determine the current combustion intensity or combustion stage (e.g., "weak combustion," "medium combustion," "strong combustion"). Then, these abstract combustion states are mapped to the corresponding particle system attribute configurations in the special effects parameter model. This allows low-level equipment data to be abstracted into high-level business states, providing unified, processed data for control command generation and simulation effect updates.
[0100] By encapsulating equipment parameter models, communication protocol models, and special effect parameter models within the data processing module, the system enables unified and structured management of the cremator's operating parameters, communication data formats, and simulation effect configurations. This ensures that each module adheres to clear specifications during data interaction, improving data consistency and maintainability. In particular, by validating the input data, including threshold judgments for main combustion chamber temperature and pressure data and logical consistency constraints on auxiliary combustion chamber status and fuel / gas flow, the system can promptly detect and handle abnormal or unreasonable data from hardware devices. This data verification mechanism effectively prevents erroneous data from entering subsequent processing flows, ensuring a high degree of consistency between the visual effects presented by the simulation rendering module and the actual equipment status, preventing simulation distortion caused by data errors. Simultaneously, the verified and converted reliable data provides a solid foundation for the interactive control module to generate accurate control commands, significantly improving the accuracy, stability, and reliability of the entire system in real-time simulation and closed-loop interactive control processes.
[0101] In some of the above implementations, the system lays the foundation for real-time simulation, data processing, and rendering. However, it still has certain shortcomings in effectively managing the complex interactions between user interaction, system state changes, and visual feedback. Without a clearly defined and decoupled mechanism to handle user input and coordinate module responses, the system's responsiveness, maintainability, and scalability may be affected, especially when dealing with diverse control commands and dynamic visual updates.
[0102] Therefore, the present invention further proposes an interactive control module, which includes a view unit, a control unit, and an event scheduling unit.
[0103] The view unit is the core component of the interactive control module, providing users with an intuitive interface and real-time visual feedback. This unit includes a two-dimensional virtual control panel and a three-dimensional scene visualization window. The two-dimensional virtual control panel simulates the control interface of the physical equipment, integrating various interactive elements such as buttons, knobs, and indicator lights. It displays real-time parameters of the cremator (such as main combustion chamber temperature and pressure, auxiliary combustion chamber temperature, fuel and gas flow rates) and the current status of the buttons. It also captures user clicks, drags, and settings. The three-dimensional scene visualization window displays a three-dimensional model of the cremator and combustion particle effects generated by the simulation rendering module, allowing users to immerse themselves in the dynamic changes of the cremation process. Through this design, the view unit ensures that users can easily obtain system information and issue operational commands.
[0104] The control unit acts as the controller in the overall system architecture, handling user operation events from the view unit and coordinating updates between the data processing module and the simulation rendering module. When the view unit captures a user's operation command (such as clicking the "ignition" button or adjusting the "fan speed" knob), the control unit responds immediately. Based on the type and content of the event, it invokes the data processing module to perform corresponding status updates (such as modifying settings in the device parameter model) or generates specific control commands. Simultaneously, the control unit drives the view unit to update its display content and notifies the simulation rendering module to synchronously update the visual effects, ensuring that user operations are reflected in the system status and visual simulation in real time.
[0105] The event scheduling unit is a key mechanism for decoupled communication between system modules. It serves as the central hub for maintaining global events, responsible for defining and managing event types within the system, such as ignition command events, airflow adjustment events, and effect update events. Functional modules communicate by publishing and subscribing to events, rather than directly calling each other's interfaces. When a module's state changes or it needs to notify other modules, it publishes a corresponding event. Upon receiving the event, the event scheduling unit dispatches it to all subscribed modules according to predefined subscription relationships. This mechanism significantly reduces coupling between modules, improving the system's flexibility, scalability, and maintainability.
[0106] The event triggering and response processes managed by the event scheduling unit constitute a discrete event system, which is a formal event processing model. In this model, a set of event types ε and a set of modules are defined. The subscription relationship Sub is represented as a mapping, i.e. It explicitly indicates which set of modules will subscribe to each event e∈ε. When a module When event e is published, the event dispatch unit will call the pre-registered callback functions of all modules m′ that have subscribed to the event in a preset order. m′ (e, data). Here, data is the data payload carried by the event, containing specific information related to the event. Through this mechanism, the system can achieve non-blocking asynchronous communication, ensuring that the system can still maintain efficient and stable response when handling complex, concurrent events.
[0107] By introducing a view unit, a control unit, and an event scheduling unit, this invention constructs an efficient and decoupled interactive control mechanism. The view unit provides an intuitive user interface, enabling users to easily set device parameters and input operation commands. The control unit, as the core coordinator, accurately captures user intent and transforms it into status updates for the data processing module or the generation of control commands, while simultaneously driving synchronous updates in the view unit and simulation rendering module, ensuring real-time feedback in human-computer interaction. The event scheduling unit, through a publish-subscribe model, achieves loose coupling between modules, effectively avoiding direct dependencies and significantly improving the system's maintainability, scalability, and response speed. In particular, the precise management of event triggering and response processes through a discrete event system ensures predictable system behavior and non-blocking asynchronous communication in complex interactive scenarios, thereby significantly optimizing the user experience and guaranteeing the system's stability and efficiency during real-time simulation and control.
[0108] In some embodiments of the present invention described above, the system achieves real-time simulation and closed-loop control of the cremation process through a communication module, a data processing module, a simulation rendering module, and an interactive control module. However, in actual operation, the system may face tasks such as monitoring and parsing large amounts of data streams, frequent Modbus device data polling, and computationally intensive tasks such as batch processing of historical data or calculation of complex special effects parameters. If these time-consuming operations are all executed synchronously in the user interface thread, it can easily lead to sluggish interface response and user operation stuttering, thereby seriously affecting the system's real-time performance, smoothness, and overall user experience.
[0109] To address this, the present invention further proposes an architecture support module, which includes a service layer unit and a multi-threaded processing unit. The service layer unit, as the service layer in the model-view controller service architecture, encapsulates TCP communication services, Modbus communication services, data parsing services, and event dispatch services, providing a unified underlying service interface for upper-layer business logic. The multi-threaded processing unit creates worker threads independent of the user interface, specifically for performing tasks such as listening to and parsing TCP data streams, polling and reading Modbus device data, and batch processing of historical data or real-time calculation of complex effect parameters. The processing results are then callbacks to the main thread via the event scheduling unit's event mechanism. The processing efficiency of the batch processing task for historical data is improved through parallelization. Assuming the time complexity of processing N records with a single thread is O(N), when k worker threads are used for parallel processing, the processing time T... parallel The relationship with the number of threads k can be approximated as:
[0110]
[0111] Among them, T serial For the total processing time of a single thread, C overhead This covers the fixed overhead incurred by thread creation, task allocation, and result synchronization. By appropriately setting the value of k (not exceeding the number of physical CPU cores), the overall system response efficiency can be optimized.
[0112] Specifically, the service layer unit is implemented as a set of abstract interfaces or service classes. For example, an `ICommunicationService` interface is defined, containing methods such as `SendTcpData`, `ReceiveTcpData`, `SendModbusData`, and `PollModbusData`, and an `IDataParsingService` interface is defined to encapsulate the data parsing logic for different protocols. The concrete implementation classes of these service interfaces are responsible for interacting with the underlying operating system APIs or third-party libraries. For instance, the TCP communication service encapsulates the creation, connection, sending, and receiving of sockets and handles network exceptions; the Modbus communication service encapsulates the opening, closing, and configuration of serial or network ports, as well as the assembly, sending, receiving, and parsing of Modbus protocol frames, and manages polling tasks for multiple slave devices; the data parsing service performs structured parsing of the raw byte stream according to a predefined communication protocol model, extracting meaningful device parameters or control commands; and the event dispatch service manages the registration, publication, and subscription of events, ensuring decoupled communication between modules. Through this encapsulation, the upper-layer business logic modules do not need to worry about the complex details of the underlying communication and data processing. They only need to call the unified interface provided by the service layer, thereby improving the modularity and maintainability of the system.
[0113] The implementation of the multi-threaded processing unit utilizes the thread management mechanisms provided by the operating system, such as the `std::thread` or `boost::thread` library in C++, and thread pools in the `java.lang.Thread` or `java.util.concurrent` package in Java. When the system starts, the multi-threaded processing unit pre-creates or dynamically creates a set of worker threads as needed. For example, one or more threads are specifically allocated to continuously listen for data streams received by the TCP communication unit. Once data arrives, this thread is responsible for reading it from the buffer, performing preliminary parsing, and then placing the parsed data or events into a thread-safe queue. Similarly, another worker thread is configured to periodically poll feedback data from hardware devices such as airflow control via the industrial bus communication unit. For historical data batch processing tasks, such as statistical analysis, report generation, or data archiving of long-accumulated cremator operation logs, these tasks are typically computationally intensive and time-consuming. The multi-threaded processing unit can decompose these batch processing tasks into multiple subtasks and assign them to different worker threads for parallel execution. For example, a dataset containing millions of records can be divided into several subsets, with each thread processing one subset, and finally the processing results from each thread can be aggregated. For real-time calculation tasks involving complex special effects parameters, such as flame morphology simulation calculations based on simplified fluid dynamics equations, these calculations can be performed asynchronously in independent threads to avoid blocking the user interface thread. When a worker thread completes its task, it does not directly update the user interface or modify core data. Instead, it publishes an event through the event scheduling unit, such as a "TCP data parsed event," a "batch processing completed event," or a "special effects parameter updated event." Upon receiving these events, the event scheduling unit triggers pre-registered callback functions in the main thread to process the results, such as updating the display content in the view unit, storing the processed data, or passing new special effects parameters to the simulation rendering module, thereby ensuring thread safety and user interface responsiveness. By reasonably configuring the number of worker threads k, for example, ensuring it does not exceed the number of physical CPU cores, the overhead of thread switching can be minimized, thereby optimizing the overall system response efficiency.
[0114] By introducing service layer units and multi-threaded processing units, this invention effectively decouples low-level communication, data parsing, and computationally intensive tasks from the user interface thread, allocating them to independent worker threads for asynchronous execution. The service layer unit provides a unified and decoupled interface for upper-level business logic, simplifying the invocation of complex low-level operations. The use of multi-threaded processing units, particularly for the parallel processing of historical data batch processing tasks, significantly improves data processing efficiency and ensures the real-time performance of complex effect parameter calculations without blocking the main thread. This architectural design greatly enhances the system's concurrent processing capabilities and response speed, avoids user interface lag, and guarantees the real-time performance, smoothness, and stability of the system during high-fidelity simulation and closed-loop interactive control, thereby significantly improving the user experience.
[0115] To address this issue, this invention proposes a real-time simulation combustion and interactive control system based on the cremation process. Under the scheduling of the architecture support module, this system achieves hardware-in-the-loop control through a communication module, state synchronization through a data processing module, visual simulation through a simulation rendering module, and human-machine interaction through an interactive control module, collectively completing high-fidelity real-time simulation and closed-loop interactive control of the cremation process. The communication module includes a TCP communication unit and an industrial bus communication unit. The TCP communication unit establishes a reliable network link between the server and client based on a full-duplex communication protocol for transmitting cremation process control commands and equipment status data, and integrates a heartbeat packet monitoring and automatic reconnection mechanism to maintain link activity. However, in real-world network environments, communication links may be interrupted or become unresponsive due to various reasons (such as network congestion, equipment failure, or application crashes on the other end). If the system cannot detect and recover from these communication anomalies in a timely and effective manner, control commands will not be issued promptly, and equipment status will not be fed back in real time, severely affecting the continuity, real-time performance, and reliability of the entire simulation and control system.
[0116] To address the aforementioned issues, this invention further proposes a heartbeat monitoring mechanism within the aforementioned TCP communication unit, specifically: the server and client communicate at a fixed period T. heartbeat Interactive heartbeat data packets; if no heartbeat response is received from the other party for N consecutive cycles, the connection is deemed abnormal, and a reconnection process, including socket reconstruction and identity re-authentication, is automatically triggered to ensure the continuity and real-time nature of control command transmission. Wherein, T heartbeat The preset heartbeat packet sending period is set based on network latency stability; N is the maximum allowed number of lost heartbeat packets, used to avoid false positives during brief network fluctuations; and T is the connection anomaly detection time. timeout Satisfy: T timeout =N×T heartbeat +ΔT, where ΔT is the redundancy time margin used to absorb network transmission jitter from a single heartbeat packet.
[0117] Specifically, the heartbeat monitoring mechanism in TCP communication units is a technique for actively detecting the active status of the communication link. When there is no business data transmission, both communicating parties periodically send lightweight heartbeat packets to confirm that the other party is still online and the connection is available. This mechanism can promptly detect situations such as half-open connections or unresponsive peer applications that the TCP protocol itself cannot actively detect, thereby improving the robustness of communication.
[0118] The server and client communicate at a fixed period T. heartbeat An interactive heartbeat packet refers to the process within a TCP communication unit where a timer is started or a periodic task is scheduled. When a preset period T is reached... heartbeat If no other business data is currently being transmitted through the TCP link, the server and client will each send a predefined formatted heartbeat packet to each other. Upon receiving the heartbeat packet, the receiver will update an internal timer or send an acknowledgment response. heartbeat The settings need to take into account the stability of network latency, the timeliness of detection, and the usage of network resources.
[0119] If no heartbeat response is received from the other party for N consecutive cycles, the connection is considered abnormal. Within each heartbeat cycle, if one party fails to receive a heartbeat data packet or heartbeat response from the other party, an internal counter is incremented. When this counter continuously reaches a preset threshold N, the system considers that a substantial abnormality has occurred in the communication link, rather than a simple network jitter or loss of a single heartbeat packet. The setting of the N value provides the system with a certain degree of fault tolerance, avoiding frequent reconnection triggered by occasional network problems, thereby improving system stability.
[0120] Automatically triggering a reconnection process, including socket reconstruction and identity re-authentication, means that once a connection anomaly is detected, the system will immediately initiate a preset automatic recovery mechanism. First, it will close the currently invalid TCP socket, releasing related network resources. Then, the system will attempt to create a new TCP socket and re-initiate a connection request with the peer. After a successful connection, to ensure the security and legitimacy of communication, identity re-authentication will be performed; for example, the client will resubmit its identity credentials to the server, which will then verify them. Only after successful identity re-authentication is the new communication link considered fully established and usable for business data transmission. heartbeat The preset heartbeat packet sending period is T, whose value is set according to network latency stability. heartbeat It is not fixed but configurable, and its configuration is based on the characteristics of the actual network environment. For example, in a low-latency, high-stability LAN environment, T heartbeatIt can be set to a smaller value for fast response; however, in high-latency, volatile wide area network environments, T... heartbeat It may be necessary to set it to a larger value to avoid misjudgments due to frequent timeouts.
[0121] N is the maximum allowed number of lost heartbeat packets, used to avoid misjudgments during brief network fluctuations, further emphasizing the role of N in the fault tolerance mechanism. In real-world networks, packet loss is common. The existence of N allows the system to tolerate a certain degree of packet loss; only when a certain number of consecutive packets are lost is the connection considered truly interrupted, thus avoiding misjudgments and unnecessary reconnection operations caused by momentary network jitter.
[0122] The connection anomaly determination time T timeout satisfy:
[0123] T timeout =N×T heartbeat +ΔT
[0124] Where ΔT is the redundancy time margin, used to absorb network transmission jitter from a single heartbeat packet. This formula precisely defines the total waiting time required for the system to determine a connection anomaly. timeout It is the actual time from when the system first detects a connection anomaly to when it finally triggers the reconnection process. The introduction of ΔT takes into account the nondeterminism of network transmission. Even if no response is received within N heartbeat cycles, ΔT provides an additional buffer time to cope with the possible large delay in the last heartbeat packet, further improving the accuracy of determining connection anomalies.
[0125] The above technical solution introduces a heartbeat monitoring mechanism into the TCP communication unit, and sets the server and client to communicate at a fixed period T. heartbeat The system uses interactive heartbeat data packets to proactively and continuously probe the activity status of the communication link. When no heartbeat response is received from the other party for N consecutive cycles, the system can accurately and promptly determine a connection anomaly and quickly restore the communication link by automatically triggering socket reconstruction and identity re-authentication processes. This mechanism effectively avoids communication interruptions caused by brief network fluctuations or lack of response from the other end, ensuring the continuity and real-time transmission of control commands and status data. In particular, by appropriately setting T... heartbeat With the addition of N and a redundancy time tolerance ΔT, the system can effectively avoid misjudgments caused by network jitter while ensuring timely detection of connection anomalies. This significantly improves the robustness and reliability of the entire real-time simulation combustion and interactive control system, ensuring efficient and safe control of the cremation process. It also enables the system to maintain a high level of performance and user experience even when facing unstable network environments.
[0126] In some embodiments of the present invention described above, the system can generate and dynamically render combustion particle effects and 3D equipment model animations of the crematorium in real time, and encapsulate, store, verify, and process the operating parameters and effect configuration parameters of the crematorium equipment. However, in actual operation, ensuring that the visual effects of combustion accurately and in real time reflect the actual operating state of the crematorium combustion chamber, especially when the combustion state changes, and avoiding lag or inconsistency between the visual presentation and the actual logical state, is a key challenge in achieving high-fidelity simulation.
[0127] To address this, the present invention further proposes that the special effects parameter model be stored in the form of a configuration file, and that the particle special effects unit preload multiple parameter configurations corresponding to typical combustion states; when the combustion chamber state in the equipment parameter model changes, the event scheduling unit issues a special effects update event, triggering the particle special effects unit to dynamically switch and apply the corresponding parameter configuration, thereby achieving precise synchronization between the flame visual effect and the equipment operating state; the state synchronization process can be modeled as a discrete event-driven system: assuming the system has m predefined combustion states S = {s1, s2, ..., s...} m}, each state s i Corresponding to a set of special effects parameters P i ={p i1 ,p i2 ,...,p m When the device state changes from s k Leap to s l Event E is triggered at that time. kl The system response function R(E) kl Execute parameter switching operation:
[0128] R(E kl ):P current ←P l
[0129] Among them, P current This represents the set of parameters currently in effect for the particle system. The left arrow (←) indicates an assignment operation, thus ensuring the visual parameter P... current With logical state s l Consistent in real time.
[0130] The particle effects unit preloads multiple parameter configurations corresponding to typical combustion states. This means that during system startup or initialization, the particle effects unit reads and parses all predefined configuration files, loading the particle effect parameters contained within into memory. These parameter configurations can be stored in efficient data structures, such as hash tables or arrays, for fast lookup and access via combustion state identifiers. This preloading mechanism avoids reading disk files only when combustion states change in real time, significantly reducing latency and ensuring the immediacy and smoothness of visual effect transitions, which is crucial for achieving high real-time simulation performance.
[0131] Furthermore, when the combustion chamber state in the equipment parameter model changes, the event scheduling unit issues an effects update event, triggering the particle effects unit to dynamically switch and apply the corresponding parameter configuration. This achieves precise synchronization between the flame visual effects and the equipment operating state, describing the core mechanism of the linkage between visual effects and equipment state. Specifically, the data processing module continuously monitors key operating parameters in the equipment parameter model, such as main combustion chamber temperature and pressure, auxiliary combustion chamber temperature, and fuel / gas flow rate. Once changes in these parameters meet preset conditions, indicating a change in the logical state of the combustion chamber (e.g., from "ignition" to "stable combustion"), the data processing module notifies the event scheduling unit. The event scheduling unit then issues an "effects update event" containing a new state identifier. As a subscriber to this event, the particle effects unit, upon receiving the event, retrieves the corresponding particle effects parameter set from its pre-loaded parameter configuration based on the new state identifier carried in the event and immediately applies it to the current particle system. This dynamically adjusts the flame's shape, color, intensity, and other visual attributes, ensuring a high degree of consistency between the visual presentation and the actual operating state of the equipment.
[0132] Meanwhile, the state synchronization process can be modeled as a discrete event-driven system, further formalizing the aforementioned synchronization mechanism. This model defines a finite set of discrete combustion states S, such as "preheating," "ignition," "primary combustion," "secondary combustion," and "extinguishing." Each state s... i Each corresponds uniquely to a pre-configured set of special effects parameters P i This set of parameters defines in detail the visual appearance of the flame in this state. When the cremator's equipment state changes from state s... k (e.g., "preheating") transitions to another state. l (For example, during "ignition"), the system will trigger a specific event E. kl The event scheduling unit is responsible for managing and distributing this event. The response function R(E) within the particle effects unit... kl The function is called to perform a parameter switch: changing the current parameter set P of the particle system to the current one. current Updated to the new state si The corresponding parameter set P l This mechanism, based on discrete events and explicit state mapping, ensures the visual parameter P of the particle system. current Always related to the logical state s of the cremator i It maintains real-time and accurate consistency, thus providing highly predictable and reliable visual simulation results.
[0133] By employing the aforementioned technical solution, the special effects parameter model is stored in a configuration file format, and the particle effects unit preloads multiple parameter configurations corresponding to typical combustion states, significantly improving the system's flexibility in visual effect configuration and runtime efficiency. When the combustion chamber state in the equipment parameter model changes, the event scheduling unit issues a special effects update event, triggering the particle effects unit to dynamically switch and apply the corresponding parameter configuration, achieving precise synchronization between the flame visual effects and the equipment's operating state. This state synchronization mechanism based on a discrete event-driven system ensures the accuracy of the particle system's visual parameters P. current Always related to the logical state s of the cremator l Real-time consistency effectively solves the problem of lag or inconsistency between visual effects and actual equipment status that may exist in traditional simulations. This allows users to intuitively and accurately observe subtle changes in the shape, color, and intensity of flames during the cremation process, greatly enhancing the physical realism and interactive experience of the simulation system. It provides operators with more reliable visual feedback, helping them to better understand and control the cremation process.
[0134] In some embodiments of the present invention described above, the system achieves real-time simulation and human-computer interaction of the cremation process through a communication module, a simulation rendering module, a data processing module, an interactive control module, and an architecture support module. However, in actual operation, simply providing a user interface and capturing operation commands may not be sufficient to ensure the intuitiveness of user operations, the consistency with physical equipment, and the precise, stable, and responsive closed-loop control of cremation process parameters. Especially when fine-tuning key parameters is required, how to seamlessly and efficiently convert the user's virtual operations into actual hardware control commands, and ensure a high degree of synchronization between simulation and actual control, remains a problem that needs to be solved.
[0135] To address this, the present invention further proposes an optimized solution. Specifically, the view unit in the interactive control module is designed to include a virtual operation panel. The layout of this panel is consistent with the physical cremator control panel, and it includes corresponding interactive elements. This design allows users to intuitively understand and operate the virtual interface based on their familiarity with the physical equipment, greatly reducing the learning cost and operational threshold. For example, if the physical cremator control panel has a knob for adjusting the airflow, the virtual operation panel will also have a virtual knob with a similar position, appearance, and function. When the user operates by clicking the virtual button or rotating the virtual knob, these operation events are first captured and processed by the control unit.
[0136] When processing user interaction events, the control unit immediately drives the simulation rendering module to update the local visual effects. This means that every user action on the virtual interface provides instant, visible feedback within the simulation environment. For example, when a user clicks the virtual ignition button, the simulation rendering module immediately displays the visual effect of a flame igniting in the 3D scene; when the user adjusts the virtual fan speed knob, the flame's shape (such as particle emission rate and direction) in the simulation dynamically changes accordingly. This instant feedback mechanism significantly enhances the smoothness and immersion of the user experience.
[0137] Simultaneously, the control unit will also send corresponding control commands to a remote server or hardware device via the communication module. For example, after the user sets the airflow to a certain value on the virtual panel, the control unit will encapsulate this setting value into a command conforming to the communication protocol and send it out through a TCP communication unit or an industrial bus communication unit. After receiving the command, the remote server or hardware device will execute the corresponding physical operation according to the command content, such as adjusting the fan speed. In this way, virtual operation, simulated visual feedback, and actual hardware control are closely integrated, forming an interactive closed loop that integrates operation simulation control.
[0138] To ensure the accuracy and stability of control command generation, the closed-loop interactive control command generation process employs a PID (Proportional-Integral-Derivative) control algorithm. Specifically, the generated control command u(t) is calculated based on the current error e(t), the cumulative integral of the error, and the rate of change of the error de(t) / dt. Here, u(t) represents the control command vector generated at time t, such as the target airflow or ignition signal; e(t) is the error vector, equal to the difference between the user-defined target value r(t) and the actual state value y(t) fed back from the hardware or server. p ,K i ,K dThese are the proportional gain coefficient matrix, integral gain coefficient matrix, and differential gain coefficient matrix, used to adjust the system's response speed, steady-state accuracy, and anti-interference capability. By adjusting these gain coefficients, the system can quickly respond to changes in user settings, while avoiding overshoot and oscillation, and effectively suppressing external interference to ensure the smooth operation of the cremation process.
[0139] Through the above technical solution, this invention effectively solves the problems of insufficient intuitiveness, disconnect from physical equipment operation, and difficulty in guaranteeing control accuracy and stability in traditional simulation systems. The consistency between the layout of the virtual operation panel and the physical control panel allows operators to seamlessly transition from physical operation experience to virtual operation, significantly reducing operational difficulty and the risk of misoperation. Local visual updates triggered by user operation events provide immediate and immersive feedback, enhancing the user's perception of system response. More importantly, by tightly integrating user operations with the generation of actual hardware control commands and introducing a PID control algorithm, the system can translate user intentions into precise, stable, and rapidly responsive physical control actions. This not only ensures a high degree of synchronization and consistency between the simulation environment and the actual cremation process but also greatly improves the adjustment accuracy of key parameters in the cremation process (such as airflow) and the overall operational stability of the system, thus achieving a perfect combination of high-fidelity simulation and efficient, reliable closed-loop control.
[0140] In some embodiments of the present invention, a real-time simulation and interactive control of the cremation process is proposed, and the flame shape is simulated through particle effect units. However, relying solely on preset particle parameters or simple rule adjustments may result in a lack of sufficient physical realism and dynamism in the visual effects of the flames, making it difficult to accurately simulate the complex rising, turbulence, and diffusion behaviors of the flames, thereby affecting the immersive experience and accuracy of the visual feedback in the simulation system.
[0141] To address this, the present invention further proposes that the complex special effects parameter calculation task executed by the multi-threaded processing unit includes flame morphology simulation calculation based on simplified fluid dynamics equations; the flame morphology simulation calculation is performed asynchronously in an independent thread, and the calculation results are used to update the particle force field parameters and motion trajectories in the particle special effects unit in real time, thereby improving the physical realism of combustion simulation while ensuring the real-time interactivity of the system; the simplified fluid dynamics equations adopt the two-dimensional vortex particle method or the simplified Navier-Stokes equations. For example, a simplified momentum equation for driving the evolution of the particle velocity field v can be expressed as:
[0142]
[0143] In the equation, v represents the same velocity field vector. This represents the rate of change of the velocity field with time. The fluid convective acceleration term is represented by t, where t is time, ρ is the fluid density (approximately constant), p is the pressure field, g is the gravitational acceleration vector, and f is the velocity vector. buoyancy (T)=β(TT ambient g is the buoyancy term, β is the coefficient of thermal expansion, and T is the local temperature. ambient The ambient temperature is represented by the equation. After being numerically solved in a separate thread, the resulting velocity field v is used to update the force and direction of motion of each particle in the particle system, thereby simulating the rising, turbulent, and diffusion patterns of the flame.
[0144] Specifically, the complex special effects parameter calculation tasks performed by the multi-threaded processing unit include flame morphology simulation calculations based on simplified fluid dynamics equations. That is, the system no longer relies solely on preset particle behavior rules, but simulates the dynamic morphology of flames by solving physical equations describing fluid motion. These equations can capture complex behaviors such as flame rise, diffusion, and turbulence, thereby generating more physically realistic visual effects. The flame morphology simulation calculations are performed asynchronously in independent threads to separate the computationally intensive fluid dynamics solution process from the user interface thread. By executing these complex calculations in independent threads, the main thread can be prevented from being blocked due to long-term computation, thus ensuring that the responsiveness of the user interface and the overall real-time interactivity of the system are not affected. The calculation results are used to update the particle force field parameters and motion trajectories in the particle effects unit in real time. That is, the velocity field, pressure field, and other data generated by the fluid dynamics simulation are directly used as input to dynamically adjust the force and motion path of each particle in the particle effects unit. For example, the simulated airflow velocity and direction directly determine the direction and velocity of the particles, thus ensuring that the overall motion of the particle swarm is consistent with the simulated flame morphology. Simplified fluid dynamics equations are derived using the two-dimensional vortex particle method or a simplified Navier-Stokes equation. The two-dimensional vortex particle method simulates fluid motion using discrete vortex particles, making it particularly suitable for simulating fluids with vortex structures such as smoke and flames. The simplified Navier-Stokes equations, based on classical fluid dynamics equations, reduce computational complexity by simplifying certain terms (such as viscous and pressure terms) or reducing dimensionality (e.g., from three-dimensional to two-dimensional), enabling real-time or near-real-time solutions while preserving key physical properties of flames. For example, the simplified momentum equation, by considering the effects of convection, pressure gradient, viscosity, gravity, and buoyancy on the velocity field, effectively simulates the rising, turbulent, and diffusion patterns of flames. After numerically solving this equation in an independent thread, the resulting velocity field *v* is used to update the forces and motion directions of each particle in the particle system, thereby simulating the rising, turbulent, and diffusion patterns of flames. Numerical solution refers to approximating these differential equations on a computer using discretization methods (such as the finite difference method or the finite volume method) to obtain velocity field data at different time and space points. This velocity field data was then precisely mapped to each particle in the particle effects unit, guiding its movement so that the visual representation of the flames could highly conform to the laws of physics.
[0145] By employing the aforementioned technical solution, the task of simulating flame morphology based on simplified fluid dynamics equations is assigned to an independent thread for asynchronous execution, effectively resolving the system interaction lag issue that arises when providing highly realistic flame visual effects. The calculation results are applied in real-time to update the particle force field parameters and motion trajectories in the particle effects unit, enabling the accurate simulation of the rising, turbulent, and diffusion patterns of the flames, significantly enhancing the physical realism of the combustion simulation. This method, while maintaining the real-time interactivity of the system, greatly enhances the immersiveness and accuracy of the visual simulation of the combustion process, providing users with more realistic and dynamic visual feedback, thereby optimizing the performance of the entire real-time simulation combustion and interactive control system.
[0146] The present invention also provides an embodiment of a practical application of the method of the present invention:
[0147] I. Application Scenarios:
[0148] This embodiment selects a crematorium operation training room at a funeral home training center. This training room is equipped with a real-time simulation combustion and interactive control system based on this invention, used for trainees to conduct full-process practical training in cremation operations. The system hardware environment includes:
[0149] The system includes a cremator simulation control console (with a virtual operation panel), realistic airflow control hardware (simulating a fan, supporting 0-100% airflow adjustment), a high-performance graphics workstation (equipped with a game engine rendering system), a dual-screen display system (displaying a two-dimensional operation interface and a three-dimensional simulation scene respectively), and a TCP network communication server and client architecture.
[0150] II. Specific Implementation and Numerical Calculations at Each Stage:
[0151] (I) System Initialization and Hardware Connection:
[0152] 1. Establishing a TCP communication connection
[0153] Server IP: 192.168.1.100, Port: 8888;
[0154] Client (simulation console) IP: 192.168.1.101;
[0155] Heart rate monitoring parameters: T heartbeat =2s, N=5, ΔT=1s;
[0156] Connection anomaly detection time: T timeout =5×2+1=11s;
[0157] 2. Modbus-RTU Industrial Bus Communication Parameter Configuration:
[0158] Airflow control hardware port: COM3; Baud rate: 115200bps; Data bits: 8; Stop bits: 1; Even parity;
[0159] Slave device address: 0x01;
[0160] Register address mapping: Target airflow setpoint -> Hold register 40001 (0x0000); Actual airflow feedback value -> Hold register 40002 (0x0001).
[0161] 3. Particle effect parameters preloading:
[0162] Table 1: Special Effects Parameter Configurations Corresponding to Typical Combustion States
[0163]
[0164] Note: Colors are represented using RGB, with values ranging from [0,1].
[0165] As an enhanced implementation of the communication module, the system can be configured to operate in a DDS middleware-based mode:
[0166] DDS domain configuration:
[0167] Domain ID: DomainID = 0;
[0168] Discovery configuration: Use static discovery configuration to reduce automatic discovery time;
[0169] Transmission configuration: Shared memory transmission is preferred, and zero-copy communication is used between modules on the same host.
[0170] Topic definition example:
[0171] Table 2: DDS Theme Configuration Examples
[0172]
[0173] DDS performance monitoring data:
[0174] In DDS operating mode, the system can monitor the following performance metrics:
[0175] End-to-end latency: control commands < 10ms, status feedback < 20ms;
[0176] Data transmission reliability: critical commands >99.99%;
[0177] Topic discovery time: New module integration <500ms;
[0178] Data throughput: Supports a publishing rate of >1000 data samples / second.
[0179] DDS fault recovery mechanism:
[0180] Liveness detection: DDS's built-in liveness detection mechanism can automatically detect node failures;
[0181] Persistent recovery: Through TRANSIENT_LOCAL persistence, the most recent state can be restored after the module restarts;
[0182] Automatic reconnection: DDS supports automatic rediscovery and reconnection without application layer intervention.
[0183] (II) Practical Training Operation Procedures and System Response:
[0184] 1. Operation Phase One: System Startup and Parameter Initialization
[0185] Student Operation: Click the "System Startup" button in the virtual control panel.
[0186] System response:
[0187] The interactive control module captures click events and publishes a "system start" event. The event scheduling unit calls the control unit to generate initialization instructions.
[0188] The data processing module loads the device's default parameters:
[0189] Main combustion chamber temperature and pressure: P init =0.2MPa (range: P) min =0.1MPa, P max =0.8MPa);
[0190] Auxiliary combustion chamber status: S aux ='OFF';
[0191] Fuel gas flow rate: F main =0 L / min, F aux =0 L / min;
[0192] The communication module establishes a TCP connection and sends Modbus communication test commands to the air volume control hardware; the simulation rendering module loads the 3D model and displays the crematorium in standby mode.
[0193] Data validation:
[0194] Logical consistency constraint verification: Verification passed;
[0195] Pressure threshold verification: P min ≤P init ≤P max The verification passed;
[0196] 2. Operation Phase Two: Ignition Operation and Initial Combustion Simulation
[0197] Trainee operation: Turn the "Main Combustion Chamber Fuel Gas Flow" knob to 15L / min, and click the "Ignition" button;
[0198] System response:
[0199] The control unit receives knob value change events and updates the device parameter model: F main =15L / min;
[0200] Clicking the "Ignition" button triggers an ignition command event, and the control unit generates ignition control commands.
[0201] The ignition command is sent to the server via the TCP communication unit;
[0202] The data processing module calculates the combustion intensity:
[0203] According to the empirical formula:
[0204]
[0205] Where: k is the combustion efficiency coefficient (taken as 0.8), F max =50L / min is the maximum fuel gas flow rate;
[0206] The simulation rendering module responds to effects update events:
[0207] Particle emission rate calculation using ignition stage parameter configuration:
[0208] R emit (I)=R min +(R max -R min )×I γ
[0209] R emit (0.24) = 500 + (2000 - 500) × 0.24 1.5
[0210] ≈500 + 1500 × 0.117 ≈ 676 particles / second
[0211] The 3D model processing unit drives the animation of the ignition components, displaying the actions of the ignition mechanism.
[0212] The industrial bus communication unit sends an initial airflow setting command:
[0213] Construct a Modbus-RTU write single register instruction frame (function code 06H): target address is register 40001 (0x0000), write value is 50 (corresponding to 50% airflow). The standard frame format is: [Device address][Function code][High 8 bits of register address][Low 8 bits of register address][High 8 bits of register value][Low 8 bits of register value][Low 8 bits of CRC][High 8 bits of CRC].
[0214] Example byte stream (hexadecimal): 01 06 00 00 00 32CRC16 (where 00 32 is the hexadecimal representation of decimal 50, and CRC16 is the two-byte CRC checksum calculated from the preceding bytes).
[0215] Hardware response:
[0216] The airflow control hardware (slave address 0x01) receives the instruction, performs a write operation, and returns the same data frame as a response. Simultaneously, the hardware adjusts the fan speed to 50%, and the actual feedback airflow value is 45% (with a slight deviation). The communication unit periodically reads the actual value of 45 from register 40002 via register read requests (function code 03H), parses it, and updates the device parameter model.
[0217] 3. Operation Phase Three: Simulation of Vigorous Combustion Phase
[0218] Trainee Operation: Gradually adjust the fuel / gas flow rate in the main combustion chamber to 35L / min, and adjust the airflow knob to 70% system response:
[0219] Data processing:
[0220] Fuel gas flow rate update: F main =35L / min, recalculate combustion intensity:
[0221] The equipment status transitioned from the "ignition stage" to the "vigorous combustion" stage.
[0222] Event triggered:
[0223] The event scheduling unit publishes a state transition event, ignition is vigorous (E). 点火→旺盛 ;
[0224] Particle effects unit response event, execution parameter switching: Vigorous Combustion P current ←P 旺盛燃烧 ;
[0225] Particle effects updated:
[0226] Application of vigorous combustion stage parameter configuration
[0227] Particle emission rate calculation:
[0228] R emit (0.56) = 10000 + (20000 - 10000) × 0.56 0.8
[0229] =10000 + 10000 × 0.56 0.8 ≈10000+10000×0.61≈16100 pieces / second; color gradient switching from blue-white to orange-yellow gradient.
[0230] The particle size range has been adjusted to 0.15-0.5.
[0231] Control command generation:
[0232] Airflow setting: 70%;
[0233] The control unit uses a PID algorithm to generate precise control commands:
[0234]
[0235] Where: K p =0.8,K i =0.2,K d =0.1;
[0236] Error e(t) = r(t) - y(t) = 70% - 45% = 25%;
[0237] Integral term (cumulative error of the last 3 iterations):
[0238] ∑e = 5% + 10% + 25% = 40%
[0239] Differential term (rate of change of error in this instance):
[0240]
[0241] Control quantity:
[0242] u(t)=0.8×25%+0.2×40%+0.1×7.5%≈20%+8%+0.75%
[0243] =28.75%
[0244] Final airflow setting command value:
[0245] 45% + 28.75% ≈ 74%
[0246] Communication transmission:
[0247] The air volume control command (74%) is encapsulated into a Modbus-RTU write register command frame and sent through the industrial bus communication unit;
[0248] Example of a command frame: 01 06 00 00 00 4A CRC16 (where 00 4A is the hexadecimal representation of decimal 74);
[0249] Multithreaded processing:
[0250] The architecture support module creates an independent thread to perform flame pattern simulation calculations.
[0251] Simplified fluid dynamics equations (two-dimensional vortex particle method) are used:
[0252]
[0253] Calculation parameter: ρ = 1.2 kg / m 3 (Air density), v = 1.5 × 10 -5 m 2 Buoyancy term / s (kinematic viscosity): f buoyancy (T)=β(TT ambient )g, where β=0.0034 / K, ℃T=850℃, ℃
[0254] T ambient =25℃
[0255] The calculation results are used to update the particle force field and simulate the rising flames and turbulence effects.
[0256] 4. Operation Phase Four: Abnormal Situation Handling and System Self-Recovery
[0257] Simulated anomaly: Manually disconnecting the TCP network connection to simulate a network failure;
[0258] System response:
[0259] Heart rate monitoring mechanism triggered:
[0260] If a TCP communication unit fails to receive a heartbeat response from the server for 5 consecutive cycles (10 seconds), the connection is considered abnormal. Time: T timeout =11s, triggering the automatic reconnection process;
[0261] Reconnection process:
[0262] Close the currently invalid socket, release resources, and attempt to re-establish the TCP connection (exponential backoff retries: 1s, 2s, 4s, 8s intervals). The second retry (2-second interval) succeeds in establishing the connection, and identity re-authentication is performed (the client sends an authentication token, which the server verifies).
[0263] State synchronization restored:
[0264] The client requests the server to send the current complete device status. The data processing module updates the local parameter model to ensure status consistency. The simulation rendering module re-renders the scene based on the latest status. Reconnection time statistics: From disconnection to full recovery, it takes approximately 15 seconds. During this period:
[0265] The local simulation continues to run (based on the last valid state). Hardware control commands are temporarily stored in the queue and sent in batches after recovery. The user interface displays a "Connection restored" message, with no lag.
[0266] (III) Training effectiveness evaluation data:
[0267] 1. System performance indicators:
[0268] Table 3: System Performance Data
[0269]
[0270] 2. Training operation data recording:
[0271] Table 4: Record of a Trainee's Complete Operation Process
[0272]
[0273] 3. Training Effectiveness Evaluation
[0274] Operational accuracy assessment:
[0275] Fuel gas flow control error: The student sets the flow rate to 35L / min, and the system's actual response is 34.8L / min, with an error of 0.57%.
[0276] Air volume control error: The student sets 70%, and the system actually controls 74%. Considering the characteristics of PID regulation, the error is within a reasonable range.
[0277] III. Summary of Key Technical Points of the Implementation Examples:
[0278] 1. System integration verification:
[0279] This embodiment verifies the collaborative working capability of the five modules:
[0280] Communication module: Implements stable communication between TCP and Modbus industrial bus channel, and heartbeat mechanism ensures network reliability.
[0281] Simulation rendering module: Implements high-fidelity flame rendering based on a game engine; particle emission rate formula R emit (I)=R min +(R max -R min )×I γ It effectively simulates different combustion intensities.
[0282] Data processing module: Successfully encapsulated three types of data models and implemented data validation (such as...). ) and state transitions.
[0283] Interactive control module: Coordinates various modules through an event-driven mechanism, using a PID control algorithm.
[0284]
[0285] Precise control has been achieved.
[0286] Architecture support module: Multi-threaded processing ensures system smoothness, and complex computational tasks (such as solving fluid dynamics equations) are executed in independent threads.
[0287] 2. Key technical indicators achieved:
[0288] Real-time performance: Control command response latency <120ms, screen refresh rate >55FPS;
[0289] Reliability: Network disconnection automatically recovers within 15 seconds; data verification mechanism prevents error propagation.
[0290] Realism: Based on a physically based particle system and PBR material rendering, the flame shape conforms to the law of change in combustion intensity;
[0291] 3. The value of training applications:
[0292] This system successfully simulated the entire cremation process, from ignition to vigorous combustion and then to completion, providing:
[0293] Safety training environment: completely virtual operation, zero risk;
[0294] High-fidelity visual feedback: lifelike flame shapes and mechanical movements;
[0295] Real-time data monitoring: Parameters such as pressure, flow rate, and air volume are displayed in real time;
[0296] Anomaly handling training: Simulation and recovery from abnormal situations such as network failures.
[0297] IV. To verify the enhancement implementation method based on DDS middleware, a comparative test experiment was conducted:
[0298] 1. Test environment configuration:
[0299] Traditional mode: using the TCP+Modbus communication method described in claim 2;
[0300] Hybrid mode: Critical data goes through the DDS channel, while non-real-time data goes through the TCP channel.
[0301] 2. Performance comparison data:
[0302] Table 5: Performance Comparison of Different Communication Modes
[0303] Performance indicators Traditional model DDS mode Hybrid mode Test conditions Control command delay 25-50ms 5-15ms 8-20ms Average of 1000 instructions State synchronization delay 30-60ms 10-25ms 12-30ms Multi-module data synchronization Module extension time Restart required <500ms <500ms Add 1 simulation module CPU utilization 15-25% 10-20% 12-22% Full load operation status Memory usage lower higher medium Includes DDS runtime Network jitter tolerance Poor excellent good Simulate a 5% packet loss rate
[0304] 3. Key points for implementing DDS mode:
[0305] DDS Middleware Selection: Use commercial or open-source implementations that conform to the OMGDDS standard;
[0306] Theme design principles: Divide themes reasonably according to data type and QoS requirements;
[0307] Data serialization: Use efficient serialization formats (such as CDR) to reduce transmission overhead;
[0308] Resource management: Properly allocate DDS resources (participants, topics, readers) to prevent resource leaks;
[0309] Monitoring Integration: Integrate with the system monitoring module using the DDS monitoring interface.
[0310] 4. Hybrid deployment recommendations:
[0311] For large-scale deployment scenarios, a hybrid communication mode is recommended:
[0312] Control commands and real-time status: Transmitted via DDS, ensuring real-time performance and reliability;
[0313] File transfer and configuration data: Transmit via TCP to reduce the load on the DDS middleware;
[0314] Hardware device communication: Direct connection via Modbus-RTU fieldbus, combined with DDS adapter to access the system network.
[0315] 5. Implementation Conclusion:
[0316] The DDS-based enhanced implementation significantly outperforms traditional communication modes in terms of real-time performance, scalability, and reliability, making it particularly suitable for multi-module, distributed simulation training systems. For resource-constrained or small-scale deployment scenarios, traditional communication modes still offer advantages in simplicity and stability. The system provided by this invention supports multiple communication implementation methods, allowing users to flexibly choose according to their actual needs.
[0317] V. Conclusion:
[0318] This application example fully demonstrates the application of "A Real-Time Simulation Combustion and Interactive Control System Based on the Cremation Process" in a practical training scenario. Through modular architecture, event-driven mechanisms, high-fidelity rendering, and intelligent control algorithms, the system achieves real-time simulation and closed-loop interactive control of the entire cremation process. Key technical indicators have all met or exceeded expected targets, verifying the feasibility and practicality of the system design. It provides an efficient, safe, and immersive cremation operation training solution for civil affairs colleges and universities, funeral home training centers, and other similar institutions.
[0319] This system is not only suitable for operation training, but can also be extended to scenarios such as remote equipment monitoring, fault diagnosis simulation, and operation process optimization, and has broad application prospects and industrialization value.
[0320] 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 person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in the present invention, and these should all be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A real-time simulation combustion and interactive control system based on the cremation process, characterized in that, include: The communication module is used to establish and maintain full-duplex data connections between the server, client, and control hardware devices based on the industrial bus protocol, enabling the issuance of control commands and the uploading of status feedback. The simulation rendering module is connected to the communication module and is used to generate and dynamically render the combustion particle effects and 3D equipment model animation of the cremator in real time according to the received instructions and data. The data processing module interacts with the communication module and the simulation rendering module respectively. It is based on a data layer, interaction layer, control layer and service layer to build an architecture. It is used to encapsulate, store, verify and process cremator equipment events, data distribution, control commands, protocol data and special effects configuration parameters, and provide a unified data source for other modules. The interactive control module is connected to the data processing module and the simulation rendering module respectively. It is used to provide a user interface, capture operation commands, schedule data processing and view updates, and coordinate the response and linkage between the modules through an event-driven mechanism. The architecture support module provides underlying service support for the communication module, data processing module, and interactive control module, including encapsulating algorithm and data parsing services, and handling communication monitoring and computationally intensive tasks through a multi-threaded asynchronous execution mechanism; The system, under the scheduling of the architecture support module, achieves hardware-in-the-loop control through the communication module, state synchronization through the data processing module, visual simulation through the simulation rendering module, and human-computer interaction through the interactive control module, together completing high-fidelity real-time simulation and closed-loop interactive control of the cremation process.
2. The real-time simulation combustion and interactive control system based on the cremation process according to claim 1, characterized in that, The communication module includes: The TCP communication unit establishes a reliable network link between the server and the client based on the full-duplex communication protocol. It is used to transmit cremation process control instructions and equipment status data, and integrates a heartbeat packet monitoring and automatic reconnection mechanism to maintain link activity. The industrial bus communication unit, based on the Modbus-RTU protocol, connects to the air volume and valve control hardware devices. It is used to encapsulate control commands into standard Modbus protocol data frames and send them, while polling and receiving feedback data from the hardware devices, so as to realize the digital command issuance and status acquisition of the control system. The Modbus-RTU protocol's data frame structure follows a standard definition, including a device address, function code, data field, and cyclic redundancy check field. The function code includes at least a 03H function code for reading holding registers and a 06H function code for writing to a single register. The data field carries specific register addresses, control settings, or status feedback values.
3. The real-time simulation combustion and interactive control system based on the cremation process according to claim 2, characterized in that, The simulation rendering module: The particle effects unit, based on the particle system of the game engine, can respond to state change events from the data processing module and dynamically adjust the emission rate, color gradient, direction and size of the particles to simulate the flame shape of the main combustion chamber and the auxiliary combustion chamber at different combustion stages. The 3D model processing unit integrates a 3D model of a cremator with a skeletal animation structure and uses next-generation texture mapping technology based on physical rendering for material representation. This enables the model to drive the mechanical movements of corresponding parts according to equipment control commands and present visual effects that conform to physical laws under different working conditions. The process of dynamically adjusting the particle emission rate is mapped based on the combustion intensity I (dimensionless, range [0,1]), and the emission rate R... emit The calculation follows the following relationship: R emit (I)=R min +(R max -R min )·I γ Among them, R min With R max These are the preset minimum and maximum emission rates (particles / second); γ is a nonlinear adjustment coefficient (γ>0), used to control the curve shape of the emission rate as a function of combustion intensity. When γ>1, the emission rate increases faster under high combustion intensity.
4. The real-time simulation combustion and interactive control system based on the cremation process according to claim 3, characterized in that, The data processing module encapsulates and maintains three core data models: The equipment parameter model should include at least real-time data on the temperature and pressure of the main combustion chamber, the temperature of the auxiliary combustion chamber, and the flow rate of fuel oil and gas. The communication protocol model defines the TCP instruction structure and the mapping relationship between the Modbus-RTU protocol data frame format and register addresses. Special effects parameter model, storing a set of particle system attribute configurations corresponding to different combustion states; The data processing module is also responsible for validating the input data and performing state transitions and parameter mappings according to business logic, providing data support for the generation of control instructions and the updating of simulation effects. The validity verification includes a threshold judgment on the main combustion chamber temperature and pressure data P, which must meet physical constraints: P min ≤P≤P max And logical consistency constraints: when the auxiliary combustion chamber status flag S aux When it is "off", its associated fuel and gas flow data F aux It must be zero, that is: Among them, P min P max The lower and upper pressure limits are set based on the physical characteristics of the cremator.
5. The real-time simulation combustion and interactive control system based on the cremation process according to claim 4, characterized in that, The interactive control module includes: The view unit includes a two-dimensional virtual operation panel and a three-dimensional scene visualization window, which are used to display device parameters and button status in real time, and capture user clicks and settings. The control unit, as the controller in the model-view controller service architecture, responds to user operation events transmitted from the view unit, calls the data processing module to update the status or generate control commands, and drives the view unit to update synchronously with the simulation rendering module. The event scheduling unit is the center for maintaining global events. It is responsible for defining and managing the event types within the system, including ignition command events, air volume adjustment events, and special effect update events. Each functional module communicates decoupledly through publishing and subscribing to events. The event triggering and response processes managed by the event scheduling unit constitute a discrete event system, where the event type set is ε and the module set is... A subscription relationship can be represented as a mapping. Indicates which set of modules subscribes to each event e∈ε; when a module When event e is published, the system calls all pre-registered callback functions (Callback) of m′∈Sub(e) in sequence. m′ (e,data), where data is the data payload carried by the event, thereby realizing non-blocking asynchronous communication.
6. The real-time simulation combustion and interactive control system based on the cremation process according to claim 5, characterized in that, The architecture support module includes: The service layer unit, as the service layer in the model-view controller service architecture, encapsulates TCP communication services, Modbus communication services, data parsing services, and event dispatch services, providing a unified underlying service interface for upper-layer business logic; The multi-threaded processing unit is used to create worker threads independent of the user interface, which are dedicated to listening to and parsing TCP data streams, polling and reading Modbus device data, and performing tasks such as batch processing of historical data or real-time calculation of complex special effects parameters. The processing results are called back to the main thread through the event scheduling unit's event mechanism. The multi-threaded processing unit improves the processing efficiency of batch processing tasks for historical data through parallelization. Assuming the time complexity of processing N records with a single thread is O(N), when k worker threads are used for parallel processing, the ideal processing time T is... parallel The relationship with the number of threads k can be approximated as: Among them, T serial For the total processing time of a single thread, C overhead This covers the fixed overhead incurred by thread creation, task allocation, and result synchronization. By appropriately setting the value of k (usually not exceeding the number of physical CPU cores), the overall system response efficiency can be optimized.
7. A real-time simulation combustion and interactive control system based on the cremation process according to claim 2 or 6, characterized in that, The heartbeat monitoring mechanism in the TCP communication unit is specifically as follows: the server and client communicate at a fixed period T. heartbeat Interactive heartbeat data packets; if no heartbeat response is received from the other party for N consecutive cycles, the connection is determined to be abnormal, and a reconnection process including socket reconstruction and identity re-authentication is automatically triggered to ensure the continuity and real-time performance of control command transmission. Among them, T heartbeat The preset heartbeat packet sending period is set based on network latency stability; N is the maximum allowed number of lost heartbeat packets, used to avoid false positives during brief network fluctuations; and T is the connection anomaly detection time. timeout satisfy: T timeout =N×T heartbeat +S ΔT is the redundancy time tolerance, used to absorb network transmission jitter from a single heartbeat packet.
8. A real-time simulation combustion and interactive control system based on the cremation process according to claim 4, characterized in that, The special effects parameter model is stored in the form of a configuration file, and the particle special effects unit preloads multiple parameter configurations corresponding to typical combustion states; when the combustion chamber state in the equipment parameter model changes, the event scheduling unit issues a special effects update event, triggering the particle special effects unit to dynamically switch and apply the corresponding parameter configuration, so as to achieve precise synchronization between the flame visual effect and the equipment operating state. The state synchronization process can be modeled as a discrete event-driven system: Assume the system has m predefined combustion states S = {s1, s2, ..., sm}. m }, each state s i Corresponding to a set of special effects parameters P i ={p i1 ,p i2 ,...,p in When the device state changes from s k Leap to s l Event E is triggered at that time. kl The system response function R(E) kl Execute parameter switching operation: R(E kl ):P current ←P l Among them, P current This represents the set of parameters currently in effect for the particle system. The left arrow (←) indicates an assignment operation, thus ensuring the visual parameter P... current With logical state s l Consistent in real time.
9. A real-time simulation combustion and interactive control system based on the cremation process according to claim 5, characterized in that, The virtual operation panel in the view unit is equipped with interactive elements that are consistent with the layout of the physical cremator control panel. After the user's operation events on the virtual buttons and knobs are processed by the control unit, the simulation rendering module is driven to update the local visual effects. At the same time, the control commands are sent to the remote server or hardware device through the communication module, forming an interactive closed loop that integrates operation simulation control. The process of generating control commands for the closed-loop interaction can be represented as follows: Where u(t) is the control command vector generated at time t (such as target airflow, ignition signal), e(t) = r(t) - y(t) is the error vector, r(t) is the user-defined value or target state, and y(t) is the actual state vector fed back from the hardware or server. K p ,K i ,K d These are proportional, integral, and derivative gain coefficient matrices, used to adjust the system's response speed, steady-state accuracy, and anti-interference capability; the control command u(t) is written into the corresponding holding register of the hardware device by the industrial bus communication unit according to the Modbus-RTU protocol format.
10. A real-time simulation combustion and interactive control system based on the cremation process according to claim 6, characterized in that, The complex special effects parameter calculation task executed by the multi-threaded processing unit includes flame shape simulation calculation based on simplified fluid dynamics equations. The flame shape simulation calculation is performed asynchronously in an independent thread, and the calculation results are used to update the particle force field parameters and motion trajectory in the particle special effects unit in real time, thereby improving the physical realism of combustion simulation while ensuring the real-time interactivity of the system. The simplified fluid dynamics equations employ the two-dimensional vortex particle method or the simplified Navel-Stokes equations. For example, a simplified momentum equation driving the evolution of the particle velocity field v can be expressed as: In the equation, v represents the same velocity field vector. This represents the rate of change of the velocity field with respect to time. The fluid convective acceleration term is represented by t, where t is time, ρ is the fluid density (approximately constant), p is the pressure field, g is the gravitational acceleration vector, and f is the velocity vector. buoyancy (T)=β(TT ambient g is the buoyancy term, β is the coefficient of thermal expansion, and T is the local temperature. ambient The ambient temperature is represented by the equation. After being numerically solved in a separate thread, the resulting velocity field v is used to update the force and direction of motion of each particle in the particle system, thereby simulating the rising, turbulent, and diffusion patterns of the flame.