A Real-Time Synchronization Method for LonWorks Networks Based on Digital Twin Variables

By combining a digital twin variable manager and a LonTalk protocol processing module, the computational performance bottleneck of LonWorks nodes and the problem of network variable rigidity are solved, enabling high-performance and flexible LonWorks network applications. It supports standard C/C++ development, reduces development costs, and maintains interoperability with existing networks.

CN122093005APending Publication Date: 2026-05-26ZHEJIANG PUZHAO TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG PUZHAO TECH CO LTD
Filing Date
2026-04-21
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Traditional LonWorks nodes suffer from performance bottlenecks, rigid network variable management, and closed development environments, limiting their application in high-performance, highly flexible IoT edge computing scenarios.

Method used

The method employs a real-time synchronization approach for LonWorks networks based on digital twin variables. It utilizes an ARM Cortex-M series or RISC-V microcontroller equipped with a digital twin variable manager, combined with a LonTalk protocol processing module and a high-speed serial communication bus, to achieve dynamic registration, mapping, and real-time synchronization of digital twin variables and network variables. It supports standard C/C++ development and shields hardware differences.

Benefits of technology

Enhance node computing power, enable flexible management of network variables, lower the development threshold, support modern development paradigms, balance high performance and low cost, and ensure interoperability with existing LonWorks networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122093005A_ABST
    Figure CN122093005A_ABST
Patent Text Reader

Abstract

This invention relates to the field of industrial automation and control network technology, and discloses a real-time synchronization method system for LonWorks networks based on digital twin variables. Applied to LonWorks fieldbus networks, it is implemented based on a heterogeneous node system consisting of a general-purpose processing module, a LonTalk protocol processing module, and a high-speed serial communication bus. The general-purpose processing module carries a manager, the LonTalk protocol processing module maintains standard LonWorks network variables and has a built-in LonTalk protocol stack, and the high-speed serial communication bus transmits DTVP data frames. This invention achieves a significant leap in node computing power, freeing nodes from the limitations of dedicated communication chips and allowing them to directly utilize the high performance of industry-leading general-purpose microcontrollers to easily handle complex control algorithms, real-time data filtering, lightweight artificial intelligence inference, and other complex tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial automation and control network technology, and more specifically, to a real-time synchronization method system for LonWorks networks based on digital twin variables. Background Technology

[0002] LonWorks technology is an open fieldbus standard widely used in building automation, industrial control, and other fields. Its core relies on communication chips (such as neural network chips) equipped with dedicated neural network processors and running the LonTalk protocol stack. However, LonWorks nodes based on traditional architectures have long suffered from inherent bottlenecks that have severely limited their application in modern high-performance, high-flexibility IoT edge computing scenarios. Computing performance bottleneck: Traditional neural network chips (such as the FT3120, FT3150, and FT5000 series) have low-frequency processors and limited computing resources, making it difficult to handle complex control algorithms, real-time data filtering, protocol conversion, or lightweight artificial intelligence inference and other modern edge computing tasks, thus limiting the level of node intelligence.

[0003] Inflexible network variable management: Network variables are crucial for LonWorks interoperability. In traditional development models (using Neuron C), the number, data type, direction, and binding relationships of network variables must be statically defined before compilation and embedded in the chip program. The system cannot dynamically create, delete, or refactor variables at runtime, lacking flexibility and unable to adapt to application scenarios requiring dynamic configuration or scalable functionality.

[0004] Closed development environment: Traditional chip development heavily relies on the dedicated NeuronC language. This environment, along with its accompanying, typically licensed, compilation and debugging toolchain, is isolated from the modern mainstream embedded development ecosystem based on standard C / C++. Its outdated toolchain does not support modern software engineering practices, increasing the development threshold, cycle time, and maintenance costs.

[0005] While next-generation chips like the FT6050 employ more powerful processor cores and support standard C programming, their general-purpose processing capabilities may still become a bottleneck when handling extremely computationally intensive tasks, given their single integrated solution status. Furthermore, their cost may be too high for a large number of simple I / O nodes. Therefore, the industry urgently needs an innovative architecture that can balance high performance, flexibility, and cost, while remaining compatible with both new and existing chip ecosystems. Summary of the Invention

[0006] This invention provides a real-time synchronization method system for LonWorks networks based on digital twin variables, which solves the technical problems mentioned in the background art.

[0007] This invention provides a real-time synchronization method for LonWorks networks based on digital twin variables, applied to LonWorks fieldbus networks. It is implemented using a heterogeneous node system consisting of a general processing module, a LonTalk protocol processing module, and a high-speed serial communication bus. The general processing module carries a manager, the LonTalk protocol processing module manages network variables and has a built-in LonTalk protocol stack, and the high-speed serial communication bus transmits DTVP data frames. The steps are as follows: S1. Initialize the heterogeneous node system, start the manager of the general processing module, the DTVP protocol layer, the LonTalk protocol stack of the LonTalk protocol processing module, and the network variable resource pool, and establish a bidirectional communication connection; S2. Based on the initialization of S1 and the establishment of a two-way communication connection, the manager performs dynamic registration and unique mapping of digital twin variables and network variables. The manager creates digital twin variables according to the application layer request, assembles and sends DTVP configuration frames to the LonTalk protocol processing module, the LonTalk protocol processing module allocates the corresponding network variables and provides feedback, and the manager establishes the mapping relationship. S3. Based on the S2 mapping relationship, perform forward synchronization: After the manager captures the modification of the digital twin variable value, it assembles and sends the DTVP write frame. The LonTalk protocol processing module updates the corresponding network variable according to the mapping relationship and sends it to the LonWorks network through the LonTalk protocol stack. S4. Based on the S2 mapping relationship, perform backward real-time synchronization: After the LonTalk protocol processing module captures the network variable update triggered by the LonWorks network, it assembles and sends the DTVP asynchronous notification frame. The manager updates the corresponding digital twin variable according to the mapping relationship, synchronizing and maintaining data consistency. S5. In S1 to S4, the LonTalk protocol layer maintains real-time data consistency with the existing LonWorks network and devices.

[0008] Furthermore, step S1 includes: S11, the general processing module uses a microcontroller with ARM Cortex-M series or dual-core RISC-V architecture, starts the digital twin variable manager and DTVP protocol layer, and completes the initialization of the computing environment to support edge computing, complex control algorithms, real-time data filtering and lightweight artificial intelligence inference tasks; S12: The LonTalk protocol processing module starts the built-in standard LonTalk protocol stack and initializes the network variable resource pool, completing the basic environment setup for network communication and network variable management. S13. Configure the high-speed serial communication bus to SPI or high-speed UART interface mode, establish a full-duplex bidirectional communication connection between the general processing module and the LonTalk protocol processing module, and realize stable real-time transmission of DTVP data frames.

[0009] Furthermore, step S11, which involves activating the digital twin variable manager, includes the following development layer adaptation steps: S111. The manager initializes a standardized application layer API interface, which supports standard C / C++ language calls and is compatible with mainstream embedded development IDEs and open source development ecosystems. S112. Perform low-level encapsulation on the API interface to shield the underlying technical details of the DTVP protocol, LonTalk protocol, and hardware chip; S113. Establish application layer operation specifications to ensure that the application layer's operations on creating, reading, writing, and recycling digital twin variables are consistent with the logic of local variable operations. This architecture allows developers to use standard C / C++ to develop complex applications on general processing modules, freeing them from dependence on Neuron C and dedicated toolchains.

[0010] Furthermore, the initialization of the network variable resource pool in step S12 includes the following differentiated adaptation steps for different chips: S121. If the LonTalk protocol processing module uses the FT6050 smart transceiver, the dynamic resource management environment is initialized through the official IzoTSDK, supporting the runtime dynamic creation, allocation and release of network variables. S122. If the LonTalk protocol processing module uses the FT3120, FT3150 and FT5000 classic neuron chips, initialize the pre-compiled static network variable resource pool and mapping lookup table to complete the pre-allocation and address mapping of static resources. S123. By encapsulating the above two adaptation logics through a unified software interface, the differences in hardware and development interfaces of different chips are shielded, thereby achieving compatibility and flexible selection of high-performance and low-cost chip solutions.

[0011] Furthermore, the DTVP data frames transmitted in steps S2, S3, and S4 are all assembled and generated using the following steps: S61. Add a two-byte preamble to the beginning of the frame, which is fixed as (0xA5, 0x5A), for frame start synchronization and frame header identification. S62. Add a single-byte length field and assign it the value of the total number of bytes from the start of the length byte to the CRC checksum. S63. Add a single-byte type field and assign values ​​according to the frame function: 0x01 corresponds to variable configuration function, 0x02 corresponds to variable writing function, 0x03 corresponds to variable reading function, 0x04 corresponds to variable update asynchronous notification function, and 0x05 corresponds to heartbeat keep-alive function. S64. Add a variable-length data payload field to load business data including variable index, variable value, variable handle, and configuration parameters; S65. Add a two-byte 16-bit CRC checksum to the end of the frame to perform integrity verification on all valid data in the frame and generate a complete DTVP data frame.

[0012] Furthermore, step S2 specifically includes: S21. The digital twin variable manager of the general processing module receives the digital twin variable creation request from the application layer and extracts the configuration information of the variable, including data type, data length, transmission direction, and function identifier. S22. Based on the extracted configuration information, the manager assembles a DTVP configuration frame with type code 0x01 and sends it to the LonTalk protocol processing module via a high-speed serial communication bus. S23, the LonTalk protocol processing module parses the DTVP configuration frame, allocates a unique corresponding network variable from the network variable resource pool according to the chip adaptation mode, and records the variable configuration information; The S24 and LonTalk protocol processing modules assemble DTVP response frames and feed back the allocated network variable index and allocation results to the digital twin variable manager. S25. The digital twin variable manager establishes a one-to-one mapping relationship between digital twin variables and network variable indexes, completes dynamic registration of variables, and realizes on-demand creation and lifecycle management of network variables during runtime.

[0013] Furthermore, step S3 specifically includes the following sub-steps: S31. The digital twin variable manager of the general processing module captures the application layer's numerical modification operations on the digital twin variables in real time. S32. The manager extracts the network variable index corresponding to the target digital twin variable according to the pre-established mapping relationship, assembles the DTVP write frame with type code 0x02 and sends it through the high-speed serial communication bus. The S33 and LonTalk protocol processing modules parse the DTVP write frames, match the corresponding network variables through mapping relationships, and complete the real-time update of variable values. The S34 and LonTalk protocol processing modules use the built-in LonTalk protocol stack to send the updated network variable values ​​to the LonWorks network, completing the forward data synchronization from the application layer to the network layer.

[0014] Furthermore, step S4 specifically includes the following sub-steps: The S41 LonTalk protocol processing module monitors downlink data from the LonWorks network in real time and captures network variable value update events triggered by network data. For classic neural network chips, updates are captured through the when(nv_update_occurs) event branch; for FT6050, updates are captured through SDK callback functions. S42 and LonTalk protocol processing modules extract the updated network variable index and the latest value, assemble a DTVP asynchronous notification frame with type code 0x04, and send it through the high-speed serial communication bus. S43, the digital twin variable manager of the general processing module parses the DTVP asynchronous notification frame and matches the corresponding digital twin variable through the pre-established mapping relationship; S44. The manager updates the values ​​of the matched digital twin variables in real time and synchronously triggers the preset application layer callback function to achieve real-time data synchronization from the network layer to the application layer, maintaining data consistency between the digital twin variables and the network variables throughout the process.

[0015] Furthermore, step S5 includes: S51 and the LonTalk protocol processing module always interact with the existing LonWorks network through the standard LonTalk protocol stack, so that the heterogeneous node system appears as a standard LonWorks device at the network layer. S52. Throughout the entire process from S1 to S4, the communication data format and interaction logic of the heterogeneous node system strictly follow the LonWorks bus standard, achieving 100% interoperability with existing LonWorks networks and devices. S53. During the synchronization process, only the data interaction between the digital twin variables within this node and the network variables is completed. The operation rules of the existing LonWorks network and the data transmission of other nodes in the network are not modified or interfered with. The real-time consistency of the network layer data is maintained throughout the process.

[0016] This invention provides a real-time synchronization system for LonWorks networks based on digital twin variables, applied to LonWorks fieldbus networks. It is implemented using a heterogeneous node system comprised of a general-purpose processing module, a LonTalk protocol processing module, and a high-speed serial communication bus. The general-purpose processing module carries a manager, the LonTalk protocol processing module manages network variables and has a built-in LonTalk protocol stack, and the high-speed serial communication bus transmits DTVP data frames, including: Initialize the heterogeneous node system, start the manager and DTVP protocol layer of the general processing module, the LonTalk protocol stack and network variable resource pool of the LonTalk protocol processing module, and establish a bidirectional communication connection; Initialization and bidirectional communication connection establishment, dynamic registration and unique mapping of digital twin variables and network variables are performed. The manager creates digital twin variables according to the application layer request, assembles and sends DTVP configuration frames to the LonTalk protocol processing module, the LonTalk protocol processing module allocates the corresponding network variables and provides feedback, and the manager establishes the mapping relationship. After performing forward synchronization, the manager captures the changes in the digital twin variable values, assembles and sends a DTVP write frame, and the LonTalk protocol processing module updates the corresponding network variables according to the mapping relationship and sends them to the LonWorks network through the LonTalk protocol stack. After performing back-to-back real-time synchronization, the LonTalk protocol processing module captures the network variable updates triggered by the LonWorks network, assembles and sends DTVP asynchronous notification frames, and the manager updates the corresponding digital twin variables according to the mapping relationship to synchronize and maintain data consistency. It maintains real-time data consistency with existing LonWorks networks and devices at the LonTalk protocol layer.

[0017] The beneficial effects of this invention are as follows: This invention achieves a leapfrog improvement in node computing power, freeing nodes from the limitations of dedicated communication chips. It allows direct utilization of the high performance of industry-leading general-purpose microcontrollers to easily handle complex tasks such as complex control algorithms, real-time data filtering, and lightweight AI inference. It also makes network variable management more flexible, breaking through the limitations of traditional static compilation and enabling dynamic lifecycle management of network variables at runtime. This supports an on-demand mode for variable creation, binding, and recycling, greatly enhancing the system's configurability and scenario adaptability. Simultaneously, it promotes the modernization of the LonWorks node development paradigm, eliminating reliance on the dedicated NeuronC language and licensed compilation and debugging toolchains. Developers can now conduct development work in familiar mainstream embedded IDEs, using standard... The system is written in C / C++ and fully leverages the rich open-source development ecosystem, significantly reducing the learning cost and effectively improving development efficiency and code maintainability. Furthermore, this invention balances excellent network compatibility with flexible cost control. The heterogeneous node system achieves 100% interoperability with existing LonWorks networks and devices at the LonTalk protocol layer, functioning entirely as a standard LonWorks device within the network. It can be seamlessly deployed without interfering with the normal operation of existing networks. Simultaneously, the system design allows for flexible selection between high-performance FT6050 solutions and low-cost solutions such as FT5000, based on actual project needs and budget. A unified software interface also shields the hardware and development interface differences between different chips, achieving compatibility between new and old chip ecosystems. Attached Figure Description

[0018] Figure 1 This is an overall flowchart of the present invention; Figure 2 This is a flowchart of the heterogeneous node system initialization process of the present invention; Figure 3 This is a flowchart illustrating the standardization and assembly process of the DTVP data frame of the present invention. Figure 4 This is a flowchart of the forward synchronous subdivision process of the present invention; Figure 5 This is a flowchart of the backward real-time synchronization subdivision process of the present invention. Detailed Implementation

[0019] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.

[0020] like Figures 1-5 As shown, a real-time synchronization method for LonWorks networks based on digital twin variables is applied to LonWorks fieldbus networks. It is implemented using a heterogeneous node system consisting of a general processing module, a LonTalk protocol processing module, and a high-speed serial communication bus. The general processing module carries a manager, the LonTalk protocol processing module manages network variables and has a built-in LonTalk protocol stack, and the high-speed serial communication bus transmits DTVP data frames. The steps are as follows: S1. Initialize the heterogeneous node system, start the manager of the general processing module, the DTVP protocol layer, the LonTalk protocol stack of the LonTalk protocol processing module, and the network variable resource pool, and establish a bidirectional communication connection; S2. Based on the initialization of S1 and the establishment of a two-way communication connection, the manager performs dynamic registration and unique mapping of digital twin variables and network variables. The manager creates digital twin variables according to the application layer request, assembles and sends DTVP configuration frames to the LonTalk protocol processing module, the LonTalk protocol processing module allocates the corresponding network variables and provides feedback, and the manager establishes the mapping relationship. S3. Based on the S2 mapping relationship, perform forward synchronization: After the manager captures the modification of the digital twin variable value, it assembles and sends the DTVP write frame. The LonTalk protocol processing module updates the corresponding network variable according to the mapping relationship and sends it to the LonWorks network through the LonTalk protocol stack. S4. Based on the S2 mapping relationship, perform backward real-time synchronization: After the LonTalk protocol processing module captures the network variable update triggered by the LonWorks network, it assembles and sends the DTVP asynchronous notification frame. The manager updates the corresponding digital twin variable according to the mapping relationship, synchronizing and maintaining data consistency. S5. In S1 to S4, the LonTalk protocol layer maintains real-time data consistency with the existing LonWorks network and devices.

[0021] Specifically, to overcome the limitations of traditional LonWorks nodes in terms of computing power and rigid network variable management, this invention proposes a complete solution consisting of a heterogeneous node system and a real-time synchronization method. The aforementioned method is implemented based on this heterogeneous node system. The general-purpose processing module serves as the node's main control and intelligent core, and can utilize high-performance commercial microcontrollers such as the ARM Cortex-M series STM32F4 or the dual-core RISC-V architecture ESP32 series. Its built-in manager is a digital twin variable manager, a core software component responsible for the full lifecycle management of digital twin variables and the encapsulation and parsing of DTVP protocol frames. The DTVP protocol layer runs on the general-purpose processing module and is a dedicated software functional layer for handling the transmission, reception, and parsing of digital twin variable protocol data frames. The LonTalk protocol processing module is the node's dedicated network communication engine, and can flexibly select the FT6050 smart transceiver or the classic FT3120, FT3150, or FT5000 neural network chips. Its built-in standard LonTalk protocol stack ensures compatibility with existing LonWorks systems. The network variable resource pool is the foundation of LonWorks network communication. It is a collection of memory resources within the general processing module used to store and manage network variables. Network variables are the core data units in the LonWorks protocol that enable inter-node interoperability. The high-speed serial communication bus is the physical channel connecting the first two modules. It is usually configured as an SPI or high-speed UART interface and is the only carrier for DTVP data frame transmission. The aforementioned five steps form a complete closed loop from system initialization to variable mapping, and then to bidirectional data synchronization, ensuring network compatibility throughout the process. Each step is interconnected. S1 lays the hardware and software foundation for the implementation of the entire synchronization method. S2 is the prerequisite for achieving consistency between digital twin variables and network variables. S3 and S4 respectively realize bidirectional real-time data synchronization from the application layer to the network layer and from the network layer to the application layer. S5 is the key to ensuring that this method can be implemented in the existing LonWorks network without affecting the original network operation. Through this method, real-time mirror synchronization of digital twin variables and network variables can be achieved, while making heterogeneous node systems fully compatible with the existing LonWorks network.

[0022] In one embodiment of the present invention, step S1 includes: S11, the general processing module uses a microcontroller with ARM Cortex-M series or dual-core RISC-V architecture, starts the digital twin variable manager and DTVP protocol layer, and completes the initialization of the computing environment to support edge computing, complex control algorithms, real-time data filtering and lightweight artificial intelligence inference tasks; S12: The LonTalk protocol processing module starts the built-in standard LonTalk protocol stack and initializes the network variable resource pool, completing the basic environment setup for network communication and network variable management. S13. Configure the high-speed serial communication bus to SPI or high-speed UART interface mode, establish a full-duplex bidirectional communication connection between the general processing module and the LonTalk protocol processing module, and realize stable real-time transmission of DTVP data frames.

[0023] Specifically, step S1 consists of three sub-steps that perform targeted initialization of the three core components of the heterogeneous node system, forming a coordinated overall operating environment. S11 initializes the computing power and core software of the general-purpose processing module, using an ARM Cortex-M series or dual-core RISC-V architecture microcontroller. This completely breaks through the computing power bottleneck of traditional LonWorks node neural chip, enabling it to handle intelligent tasks such as edge computing and complex control algorithms that traditional nodes cannot achieve. Furthermore, the startup of the digital twin variable manager and DTVP protocol layer lays the software foundation for subsequent digital twin variable management and DTVP data frame interaction. S12 initializes network communication and variable resources for the LonTalk protocol processing module. After the built-in standard LonTalk protocol stack starts, it ensures that the general-purpose processing module can work with existing LonWorks nodes. Standardized data interaction onWorks networks is crucial for ensuring network compatibility. The initialization of the network variable resource pool completes the allocation and management mechanism of network variable storage resources, providing resource support for subsequent dynamic allocation or static mapping of network variables. S13 completes the interface configuration and communication link construction for the high-speed serial communication bus. Both SPI and high-speed UART interfaces are universal standardized interfaces in the embedded field, featuring high transmission rate and strong anti-interference capability. After being configured in full-duplex bidirectional communication mode, it can achieve low-latency, lossless transmission of DTVP data frames between the general processing module and the LonTalk protocol processing module, providing a stable physical channel for instruction and data interaction between the two modules. After the three sub-steps are synchronized, the heterogeneous node system has all the basic conditions to perform subsequent mapping and synchronization of digital twin variables and network variables.

[0024] In one embodiment of the present invention, step S11, which involves activating the digital twin variable manager, includes the following development layer adaptation steps: S111: The manager initializes a standardized application-layer API interface. The API interface supports standard C / C++ language calls and is compatible with mainstream embedded development IDEs and the open-source development ecosystem. S112. Perform low-level encapsulation on the API interface to shield the underlying technical details of the DTVP protocol, LonTalk protocol, and hardware chip; S113. Establish application layer operation specifications to ensure that the application layer's operations on creating, reading, writing, and recycling digital twin variables are consistent with the logic of local variable operations. This architecture allows developers to use standard C / C++ to develop complex applications on general processing modules, freeing them from dependence on Neuron C and dedicated toolchains.

[0025] Specifically, the development layer adaptation steps aim to address the technical pain points of the traditional LonWorks node development environment being closed and isolated from the modern embedded development ecosystem, achieving a modern upgrade of the development paradigm. The three sub-steps, from interface construction and low-level shielding to operational specifications, form a complete development layer adaptation system. S111 initializes standardized application layer API interfaces, using the industry-standard C / C++ language as the calling language, directly compatible with mainstream embedded development IDEs such as KeilMDK and STM32CubeIDE, while also connecting to a rich embedded open-source development ecosystem. This eliminates the need for developers to learn specialized programming languages, significantly lowering the learning curve. S112 provides low-level encapsulation of the API interfaces. The complex DTVP protocol interaction logic, LonTalk protocol communication details, and technical differences between different hardware chips are all encapsulated within the digital twin variable manager, completely shielding application layer developers. Developers do not need to master the underlying protocols and hardware knowledge to perform related operations through the API interface, greatly simplifying the development process. The application layer operation specifications established by S113 ensure that the entire lifecycle operations of digital twin variables, such as creation, reading, writing, and recycling, are consistent with the operation logic of local general variables. This completely eliminates the dependence on the dedicated NeuronC language and commercially licensed compilation and debugging toolchains, supports modern software engineering practices such as agile development and code reuse, and significantly improves development efficiency and code maintainability and portability.

[0026] In one embodiment of the present invention, the initialization of the network variable resource pool in step S12 includes the following differentiated adaptation steps for different chips: S121. If the LonTalk protocol processing module uses the FT6050 smart transceiver, the dynamic resource management environment is initialized through the official IzoTSDK, supporting the runtime dynamic creation, allocation and release of network variables. S122. If the LonTalk protocol processing module uses the FT3120, FT3150 and FT5000 classic neuron chips, initialize the pre-compiled static network variable resource pool and mapping lookup table to complete the pre-allocation and address mapping of static resources. S123. By encapsulating the above two adaptation logics through a unified software interface, the differences in hardware and development interfaces of different chips are shielded, thereby achieving compatibility and flexible selection of high-performance and low-cost chip solutions.

[0027] Specifically, the differentiated adaptation steps are designed to take into account the technical characteristics of different chip selections for the LonTalk protocol processing module, achieving full compatibility between the old and new chip ecosystems. This also allows developers to flexibly choose solutions based on project needs. Specifically, S121, for the FT6050 smart transceiver, fully leverages its support for standard C language development. By initializing a dynamic resource management environment through the official IzoTSDK, network variables can be dynamically created, allocated, and released at runtime according to actual business needs, eliminating the need for pre-definition before compilation. This perfectly adapts to high-performance, highly scalable applications with frequent feature iterations. S122, for the FT3120, FT3150, and FT5000 classic neural network chips, fully considers their requirement for development using Neuron C language and their inability to dynamically manage resources at runtime. Overcoming the technical limitations of variable creation, a static network variable resource pool is pre-defined in the chip firmware through pre-compilation, and a mapping lookup table is initialized to complete the pre-allocation and address mapping of static resources. Without changing the inherent characteristics of traditional chips, dynamic mapping and on-demand allocation of network variables are achieved, adapting to cost-sensitive and functionally stable large-scale deployment scenarios. The S123 encapsulates the above two adaptation logics through a unified software interface, so that the upper-layer general processing modules do not need to be aware of the hardware differences, development interface differences, and resource management differences of different chips. The upper-layer application does not need to make any modifications for different chips. Developers can flexibly choose between the high-performance FT6050 solution and the low-cost classic neural chip solution according to the performance requirements and cost budget of the project, realizing flexible configuration of the solution.

[0028] In one embodiment of the present invention, the DTVP data frames transmitted in steps S2, S3, and S4 are all assembled and generated using the following steps: S61. Add a two-byte preamble to the beginning of the frame, which is fixed as (0xA5, 0x5A), for frame start synchronization and frame header identification. S62. Add a single-byte length field and assign it the value of the total number of bytes from the start of the length byte to the CRC checksum. S63. Add a single-byte type field and assign values ​​according to the frame function: 0x01 corresponds to variable configuration function, 0x02 corresponds to variable writing function, 0x03 corresponds to variable reading function, 0x04 corresponds to variable update asynchronous notification function, and 0x05 corresponds to heartbeat keep-alive function. S64. Add a variable-length data payload field to load business data including variable index, variable value, variable handle, and configuration parameters; S65. Add a two-byte 16-bit CRC checksum to the end of the frame to perform integrity verification on all valid data in the frame and generate a complete DTVP data frame.

[0029] Specifically, the assembly steps define a standardized frame structure and generation process for DTVP data frames, ensuring consistent communication format and parsing between the general processing module and the LonTalk protocol processing module. The assembled DTVP data frames are both concise and reliable, adapting to the real-time data transmission requirements between the two modules. The fixed two-byte preamble (0xA5, 0x5A) added in S61 serves as a unique identifier for frame start synchronization and frame header identification. The receiving end can quickly determine the start position of the data frame by detecting the fixed sequence, effectively avoiding frame misalignment and garbled characters caused by transmission interference in serial communication, ensuring the reliability of frame synchronization. The single-byte length field added in S62 accurately indicates the effective length boundary of the data frame. The receiving end can accurately read the complete frame data based on the field value, while also adapting to the transmission requirements of subsequent variable-length data payload fields. The single-byte type field added in S63 defines five... The core functions cover the configuration, reading, writing, update notification, and heartbeat keep-alive between the digital twin variables and network variables. The receiving end can automatically match the corresponding processing logic according to the value of the type field, realizing standardized scheduling of different functions. The variable-length data payload field added in S64 is the core business carrier part of the DTVP data frame. Its length can be dynamically adjusted according to actual business needs, and it can flexibly load different business data such as variable indexes and variable values, realizing flexible configuration of one frame for multiple uses. The two-byte 16-bit CRC check code added in S65 uses the standard cyclic redundancy check algorithm to perform integrity verification on all valid data after the preamble and before the CRC check code in the frame. After receiving the data frame, the receiving end will first perform the verification operation, and only the frames that pass the verification will be parsed and processed, while the frames that fail the verification will be directly discarded, effectively detecting bit errors in the data transmission process and ensuring the accuracy and reliability of data transmission between the two modules.

[0030] In one embodiment of the present invention, step S2 specifically includes: S21. The digital twin variable manager of the general processing module receives the digital twin variable creation request from the application layer and extracts the configuration information of the variable, including data type, data length, transmission direction, and function identifier. S22. Based on the extracted configuration information, the manager assembles a DTVP configuration frame with type code 0x01 and sends it to the LonTalk protocol processing module via a high-speed serial communication bus. S23, the LonTalk protocol processing module parses the DTVP configuration frame, allocates a unique corresponding network variable from the network variable resource pool according to the chip adaptation mode, and records the variable configuration information; The S24 and LonTalk protocol processing modules assemble DTVP response frames and feed back the allocated network variable index and allocation results to the digital twin variable manager. S25. The digital twin variable manager establishes a one-to-one mapping relationship between digital twin variables and network variable indexes, completes dynamic registration of variables, and realizes on-demand creation and lifecycle management of network variables during runtime.

[0031] Specifically, step S2 is the core step in achieving a unique binding between digital twin variables and network variables. This completely solves the technical defect that traditional LonWorks node network variables must be statically defined before compilation and cannot be modified at runtime. The five sub-steps form a complete process from application layer request to variable mapping completion. Among them, S21 is the starting point of variable registration. The digital twin variable manager acts as an intermediate bridge between the application layer and the LonTalk protocol processing module, accurately receiving the application layer's creation request and extracting core configuration information such as data type, data length, and transmission direction, providing a basis for the accurate allocation of subsequent network variables. S22 assembles a DTVP configuration frame with type code 0x01 based on the extracted configuration information and sends it, realizing the effective transmission of the application layer's variable creation requirements to the LonTalk protocol processing module. In S23, LonTalk... After the k-protocol processing module completes the parsing of the DTVP configuration frame, it selects either dynamic allocation or static mapping based on its chip adaptation mode. It then allocates a unique corresponding network variable from the network variable resource pool and records the variable configuration information to ensure that the network variable and digital twin variable configurations match. The DTVP response frame assembled in S24 feeds back the network variable index and allocation result to the digital twin variable manager, allowing the manager to accurately know the allocation status of the network variable. In S25, the digital twin variable manager establishes a one-to-one mapping relationship between the digital twin variable and the network variable index based on the feedback information, completing the dynamic registration of the variable. This mapping relationship is the core basis for subsequent bidirectional data synchronization, while the runtime dynamic registration method enables on-demand creation and full lifecycle management of network variables, significantly improving the configurability and scenario adaptability of nodes.

[0032] In one embodiment of the present invention, step S3 specifically includes the following sub-steps: S31. The digital twin variable manager of the general processing module captures the application layer's numerical modification operations on the digital twin variables in real time. S32. The manager extracts the network variable index corresponding to the target digital twin variable according to the pre-established mapping relationship, assembles the DTVP write frame with type code 0x02 and sends it through the high-speed serial communication bus. The S33 and LonTalk protocol processing modules parse the DTVP write frames, match the corresponding network variables through mapping relationships, and complete the real-time update of variable values. The S34 and LonTalk protocol processing modules use the built-in LonTalk protocol stack to send the updated network variable values ​​to the LonWorks network, completing the forward data synchronization from the application layer to the network layer.

[0033] Specifically, step S3 implements forward data synchronization from the application layer to the LonWorks network. It is the core process for nodes to send collected data and execute control commands to the network. The four sub-steps form a complete data transmission link from modification of digital twin variables to broadcast at the network layer. In S31, the digital twin variable manager captures the application layer value modification operation in real time through underlying encapsulation logic. Application layer developers do not need to write any additional communication code. They only need to modify the value of the digital twin variable as if it were a local general variable to trigger the subsequent synchronization process, which greatly simplifies the workload of application development. In S32, the manager accurately extracts the network variable index corresponding to the target digital twin variable according to the one-to-one mapping relationship pre-established in S2, assembles a DTVP write frame with type code 0x02, and sends it. This enables precise transmission of application-layer numerical modification commands to the LonTalk protocol processing module. In S33, after parsing the DTVP write frame, the LonTalk protocol processing module matches the corresponding network variable using the network variable index and updates the value, ensuring real-time consistency between the network variable and the digital twin variable. In S34, the LonTalk protocol processing module sends the updated network variable value to the LonWorks network using the built-in standard LonTalk protocol stack and according to the standard communication rules of the LonWorks bus. Other standard LonWorks nodes in the network can receive and respond to the value update, ultimately completing the forward data synchronization from the application layer to the network layer, ensuring that the node's control commands and acquired data can be synchronized to the LonWorks network in real time.

[0034] In one embodiment of the present invention, step S4 specifically includes the following sub-steps: The S41 LonTalk protocol processing module monitors downlink data from the LonWorks network in real time and captures network variable value update events triggered by network data. For classic neural network chips, updates are captured through the when(nv_update_occurs) event branch; for FT6050, updates are captured through SDK callback functions. S42 and LonTalk protocol processing modules extract the updated network variable index and the latest value, assemble a DTVP asynchronous notification frame with type code 0x04, and send it through the high-speed serial communication bus. S43, the digital twin variable manager of the general processing module parses the DTVP asynchronous notification frame and matches the corresponding digital twin variable through the pre-established mapping relationship; S44. The manager updates the values ​​of the matched digital twin variables in real time and synchronously triggers the preset application layer callback function to achieve real-time data synchronization from the network layer to the application layer, maintaining data consistency between the digital twin variables and the network variables throughout the process.

[0035] Specifically, step S4 is the core link to achieve real-time backward synchronization from the LonWorks network layer to the application layer of the general processing module. It is also a key step to ensure bidirectional data consistency between digital twin variables and network variables. The entire process is adapted to different chip types of LonTalk protocol processing modules with differentiated event capture and processing. The entire process adopts a passive asynchronous notification mechanism, which does not require active polling by the application layer, greatly improving the real-time performance of synchronization and system operating efficiency. At the same time, all operations are limited to the heterogeneous node system and do not interfere with the normal communication of the existing LonWorks network.

[0036] In S41, the LonTalk protocol processing module, acting as the node's dedicated network communication engine, continuously and uninterruptedly monitors downlink data from the LonWorks network in real time through its built-in standard LonTalk protocol stack. It accurately captures network variable update events triggered by broadcast commands from other nodes in the network. The capture method varies depending on the chip type. For the FT6050 smart transceiver, a unified SDK callback function centrally captures all network-side variable update events. For the FT3120, FT3150, and FT5000 classic neural network chips, pre-compiled independent `when(nv_update_occurs)` event handling clauses capture the update actions of each network variable separately, ensuring accurate and complete capture of network-side variable updates across different chip ecosystems. In S42, after capturing a network variable update event, the general processing module immediately extracts the index of the updated variable from its managed network variable resource pool and obtains its latest updated value, strictly adhering to DTV. The standardized frame structure assembly rules of the P protocol generate a DTVP asynchronous notification frame with type code 0x04. The variable index and the latest value are loaded into the variable-length data payload field of the frame. After data integrity verification by a two-byte 16-bit CRC checksum, the frame is sent to the general processing module via a high-speed serial communication bus configured in SPI or high-speed UART mode. The high transmission rate and full-duplex communication characteristics of the high-speed serial communication bus ensure low latency and lossless transmission of the asynchronous notification frame. In S43, after the general processing module receives the DTVP asynchronous notification frame, the core software component, the digital twin variable manager, runs on it to complete the frame parsing. The manager first performs a CRC integrity check on the frame. After the check passes, it extracts the network variable index within the frame. Based on the one-to-one mapping relationship between the digital twin variables and network variables pre-established in step S2, it accurately matches the corresponding digital twin variable in the digital twin variable set of the general processing module. Through the index matching rules, the accuracy and uniqueness of variable matching are ensured, avoiding data synchronization misalignment problems.In step S44, the digital twin variable manager performs real-time updates on the matched digital twin variables to ensure they are completely consistent with the latest values ​​of the network variables in the LonTalk protocol processing module. Simultaneously, it triggers a pre-set callback function in the application layer, proactively notifying the application layer program of the network variable update event. The application layer can respond promptly and execute corresponding business logic through the callback function, such as real-time data display, complex algorithm calculations, and device control command adjustments. This entire process achieves passive real-time data synchronization from the network layer to the application layer, eliminating the need for active polling operations in the application layer program. This reduces the computational power consumption of the general processing module and improves the real-time performance of data synchronization. Furthermore, all synchronization operations are completed only between the general processing module and the LonTalk protocol processing module of the heterogeneous node system, without modifying or interfering with the existing LonWorks network operating rules or the data transmission of other nodes within the network. It maintains data consistency between the digital twin variables and the network variables throughout the process, forming a complete bidirectional real-time synchronization closed loop in conjunction with the forward synchronization in step S3.

[0037] In one embodiment of the present invention, step S5 includes: S51 and the LonTalk protocol processing module always interact with the existing LonWorks network through the standard LonTalk protocol stack, so that the heterogeneous node system appears as a standard LonWorks device at the network layer. S52. Throughout the entire process from S1 to S4, the communication data format and interaction logic of the heterogeneous node system strictly follow the LonWorks bus standard, achieving 100% interoperability with existing LonWorks networks and devices. S53. During the synchronization process, only the data interaction between the digital twin variables within this node and the network variables is completed. The operation rules of the existing LonWorks network and the data transmission of other nodes in the network are not modified or interfered with. The real-time consistency of the network layer data is maintained throughout the process.

[0038] Specifically, step S5 is the core step in ensuring that the heterogeneous node system of this invention is fully compatible with the existing LonWorks network and can be seamlessly deployed. It achieves bidirectional data synchronization of the node without changing or interfering with the normal operation of the existing LonWorks network, effectively protecting the user's existing investment. In S51, the LonTalk protocol processing module always interacts with the existing network through the standard LonTalk protocol stack, which is the foundation for ensuring network compatibility. This design allows the heterogeneous node system of this invention to behave completely as a standard LonWorks device at the network layer. Other nodes in the existing network can be identified, bound, and interact with the node without any modification, and can be directly deployed without any changes to the existing network; in S52, the heterogeneous node system... Throughout the entire process from S1 to S4, the system strictly adheres to the LonWorks bus standard in designing the communication data format and interaction logic, ensuring 100% interoperability with existing LonWorks networks and devices without any compatibility issues, and fully adapting to existing LonWorks network application scenarios. S53 clarifies that all synchronization operations in this invention are limited to the general processing module and LonTalk protocol processing module within this node, only completing the data interaction between digital twin variables and network variables. It will not cause any modification to the operating rules or communication mechanisms of the existing LonWorks network, nor will it interfere with the data transmission of other nodes within the network, ensuring that while data synchronization is achieved at this node, the existing network can maintain its original operating state, guaranteeing real-time consistency of network layer data throughout the entire process.

[0039] In one embodiment of the present invention, it is applied to a LonWorks fieldbus network and implemented based on a heterogeneous node system consisting of a general processing module, a LonTalk protocol processing module, and a high-speed serial communication bus; the general processing module carries a manager, the LonTalk protocol processing module manages network variables and has a built-in LonTalk protocol stack, and the high-speed serial communication bus transmits DTVP data frames, including: Initialize the heterogeneous node system, start the manager and DTVP protocol layer of the general processing module, the LonTalk protocol stack and network variable resource pool of the LonTalk protocol processing module, and establish a bidirectional communication connection; Initialization and bidirectional communication connection establishment, dynamic registration and unique mapping of digital twin variables and network variables are performed. The manager creates digital twin variables according to the application layer request, assembles and sends DTVP configuration frames to the LonTalk protocol processing module, the LonTalk protocol processing module allocates the corresponding network variables and provides feedback, and the manager establishes the mapping relationship. After performing forward synchronization, the manager captures the changes in the digital twin variable values, assembles and sends a DTVP write frame, and the LonTalk protocol processing module updates the corresponding network variables according to the mapping relationship and sends them to the LonWorks network through the LonTalk protocol stack. After performing back-to-back real-time synchronization, the LonTalk protocol processing module captures the network variable updates triggered by the LonWorks network, assembles and sends DTVP asynchronous notification frames, and the manager updates the corresponding digital twin variables according to the mapping relationship to synchronize and maintain data consistency. It maintains real-time data consistency with existing LonWorks networks and devices at the LonTalk protocol layer.

[0040] Specifically, this embodiment corresponds to a heterogeneous node system that implements the aforementioned real-time synchronization method. The heterogeneous node system is the hardware carrier of the complete solution of this invention, fundamentally reconstructing the single-chip design of traditional LonWorks nodes. It decouples them into a functionally defined, collaborative general-purpose processing module and a LonTalk protocol processing module, and connects the two modules through a high-speed serial communication bus. The general-purpose processing module serves as the main control and intelligent core, and can be a microcontroller using an STM32F407, ARM Cortex-M series, or dual-core RISC-V architecture. The manager mounted on it is a digital twin variable manager, which is the core software component responsible for digital twin variable management and DTVP protocol frame encapsulation and parsing. The TVP protocol layer provides the general processing module with the ability to interact with DTVP data frames; the LonTalk protocol processing module, as a dedicated network communication engine, can flexibly select the FT6050 smart transceiver or the classic neural network chips FT3120, FT3150, and FT5000. Its built-in standard LonTalk protocol stack is the basis for communication with the existing LonWorks network, and the network variable resource pool realizes centralized management of network variables, which can realize dynamic or static variable management according to the chip type; the high-speed serial communication bus, as the digital nervous system of the two modules, is configured in SPI or high-speed UART interface mode and is dedicated to transmitting DTVP data frames. It is the only channel for instruction and data interaction between the two modules.

[0041] The core execution logic of this system corresponds completely to the aforementioned real-time synchronization method. The five core logical links are interconnected. The initialization link builds a complete operating and communication environment for the system. The dynamic registration and unique mapping link establishes the core variable matching relationship for bidirectional data synchronization. The forward synchronization and backward real-time synchronization links realize bidirectional data interaction between the application layer and the network layer. The network layer compatibility link ensures seamless deployment of the system in the existing LonWorks network. The collaborative work of each link allows the system to overcome the computing power, development, and management bottlenecks of traditional LonWorks nodes, achieve real-time synchronization of digital twin variables and network variables, and be 100% compatible with existing LonWorks networks and devices. At the same time, developers can flexibly choose chip solutions according to project needs, balancing high performance and cost flexibility. It can be widely used in various LonWorks fieldbus application scenarios such as building automation and industrial control.

[0042] This invention achieves a leapfrog improvement in node computing power, freeing nodes from the limitations of dedicated communication chips. It allows direct utilization of the high performance of industry-leading general-purpose microcontrollers to easily handle complex tasks such as complex control algorithms, real-time data filtering, and lightweight AI inference. It also makes network variable management more flexible, breaking through the limitations of traditional static compilation and enabling dynamic lifecycle management of network variables at runtime. This supports an on-demand mode for variable creation, binding, and recycling, greatly enhancing the system's configurability and scenario adaptability. Simultaneously, it promotes the modernization of the LonWorks node development paradigm, eliminating reliance on the dedicated NeuronC language and licensed compilation and debugging toolchains. Developers can now conduct development work in familiar mainstream embedded IDEs, using standard... The system is written in C / C++ and fully leverages the rich open-source development ecosystem, significantly reducing the learning cost and effectively improving development efficiency and code maintainability. Furthermore, this invention balances excellent network compatibility with flexible cost control. The heterogeneous node system achieves 100% interoperability with existing LonWorks networks and devices at the LonTalk protocol layer, functioning entirely as a standard LonWorks device within the network. It can be seamlessly deployed without interfering with the normal operation of existing networks. Simultaneously, the system design allows for flexible selection between high-performance FT6050 solutions and low-cost solutions such as FT5000, based on actual project needs and budget. A unified software interface also shields the hardware and development interface differences between different chips, achieving compatibility between new and old chip ecosystems.

[0043] The embodiments of this example have been described above. However, this example is not limited to the specific implementation methods described above. The specific implementation methods described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of this example, and all of them are within the protection scope of this example.

Claims

1. A LonWorks network real-time synchronization method based on digital twin variables, applied to a LonWorks field bus network, implemented based on a heterogeneous node system composed of a general processing module, a LonTalk protocol processing module, and a high-speed serial communication bus; the general processing module is equipped with a manager, the LonTalk protocol processing module manages network variables and is internally provided with a LonTalk protocol stack, and the high-speed serial communication bus transmits DTVP data frames, characterized in that, The steps are as follows: S1, initialize the heterogeneous node system, start the manager of the general processing module, the DTVP protocol layer, the LonTalk protocol stack of the LonTalk protocol processing module, the network variable resource pool, and establish a bidirectional communication connection; S2, based on S1 initialization and bidirectional communication connection establishment, perform dynamic registration and unique mapping of digital twin variables and network variables, the manager creates digital twin variables according to the application layer request, assembles and sends a DTVP configuration frame to the LonTalk protocol processing module, the LonTalk protocol processing module allocates corresponding network variables and feeds back, and the manager establishes a mapping relationship; S3, based on the mapping relationship of S2, perform forward synchronization: the manager captures the digital twin variable value modification, assembles and sends a DTVP write frame, and the LonTalk protocol processing module updates the corresponding network variable according to the mapping relationship and sends it to the LonWorks network through the LonTalk protocol stack; S4, based on the mapping relationship of S2, perform backward real-time synchronization: the LonTalk protocol processing module captures the network variable update caused by the LonWorks network, assembles and sends a DTVP asynchronous notification frame, and the manager updates the corresponding digital twin variable according to the mapping relationship, synchronizes and keeps the data consistent; S5, in S1 to S4, the LonTalk protocol layer always maintains real-time data consistency with the existing LonWorks network and devices.

2. The LonWorks network real-time synchronization method based on digital twin variable according to claim 1, characterized in that, The step S1 comprises: S11, the general processing module selects an ARM Cortex-M series or dual-core RISC-V architecture microcontroller, starts the digital twin variable manager and DTVP protocol layer, and completes the initialization of the computing power environment supporting edge computing, complex control algorithm, real-time data filtering, and lightweight artificial intelligence inference task; S12, the LonTalk protocol processing module starts the built-in standard LonTalk protocol stack, and initializes the network variable resource pool at the same time, to complete the basic environment construction of network communication and network variable management; S13, configure the high-speed serial communication bus as SPI or high-speed UART interface mode, establish full-duplex bidirectional communication connection between the general processing module and the LonTalk protocol processing module, and realize stable real-time transmission of DTVP data frames.

3. The LonWorks network real-time synchronization method based on digital twin variable of claim 2, wherein, In the step S11, starting the digital twin variable manager comprises the following development layer adaptation steps: S111, the manager initializes the standardized application layer API interface, which supports standard C / C++ language calling and is compatible with mainstream embedded development IDE and open source development environment; S112, encapsulate the API interface at the bottom layer to shield the underlying technical details of the DTVP protocol, LonTalk protocol and hardware chip; S113, establish application layer operation specifications to make the creation, reading and writing, and recycling operations of the application layer on the digital twin variable consistent with the local variable operation logic, so that the developer can use standard C / C++ to develop complex applications on the general processing module, and get rid of the dependence on Neuron C and special tool chain.

4. The LonWorks network real-time synchronization method based on digital twin variable of claim 2, wherein, The initialization of the network variable resource pool in step S12 includes the following differentiated adaptation steps for different chips: S121. If the LonTalk protocol processing module uses the FT6050 smart transceiver, the dynamic resource management environment is initialized through the official IzoTSDK, supporting the runtime dynamic creation, allocation and release of network variables. S122. If the LonTalk protocol processing module uses the FT3120, FT3150 and FT5000 classic neuron chips, initialize the pre-compiled static network variable resource pool and mapping lookup table to complete the pre-allocation and address mapping of static resources. S123. By encapsulating the above two adaptation logics through a unified software interface, the differences in hardware and development interfaces of different chips are shielded, thereby achieving compatibility and flexible selection of high-performance and low-cost chip solutions.

5. The LonWorks network real-time synchronization method based on digital twin variable of claim 1, wherein, The DTVP data frames transmitted in steps S2, S3, and S4 are all assembled using the following steps: S61. Add a two-byte preamble to the beginning of the frame, which is fixed as (0xA5, 0x5A), for frame start synchronization and frame header identification. S62. Add a single-byte length field and assign it the value of the total number of bytes from the start of the length byte to the CRC checksum. S63. Add a single-byte type field and assign values ​​according to the frame function: 0x01 corresponds to variable configuration function, 0x02 corresponds to variable writing function, 0x03 corresponds to variable reading function, 0x04 corresponds to variable update asynchronous notification function, and 0x05 corresponds to heartbeat keep-alive function. S64. Add a variable-length data payload field to load business data including variable index, variable value, variable handle, and configuration parameters; S65. Add a two-byte 16-bit CRC checksum to the end of the frame to perform integrity verification on all valid data in the frame and generate a complete DTVP data frame.

6. The LonWorks network real-time synchronization method based on digital twin variable of claim 1, wherein, Step S2 specifically includes: S21. The digital twin variable manager of the general processing module receives the digital twin variable creation request from the application layer and extracts the configuration information of the variable, including data type, data length, transmission direction, and function identifier. S22. Based on the extracted configuration information, the manager assembles a DTVP configuration frame with type code 0x01 and sends it to the LonTalk protocol processing module via a high-speed serial communication bus. S23, the LonTalk protocol processing module parses the DTVP configuration frame, allocates a unique corresponding network variable from the network variable resource pool according to the chip adaptation mode, and records the variable configuration information; The S24 and LonTalk protocol processing modules assemble DTVP response frames and feed back the allocated network variable index and allocation results to the digital twin variable manager. S25. The digital twin variable manager establishes a one-to-one mapping relationship between digital twin variables and network variable indexes, completes dynamic registration of variables, and realizes on-demand creation and lifecycle management of network variables during runtime.

7. The LonWorks network real-time synchronization method based on digital twin variable of claim 1, wherein, Step S3 specifically includes the following sub-steps: S31. The digital twin variable manager of the general processing module captures the application layer's numerical modification operations on the digital twin variables in real time. S32. The manager extracts the network variable index corresponding to the target digital twin variable according to the pre-established mapping relationship, assembles the DTVP write frame with type code 0x02 and sends it through the high-speed serial communication bus. The S33 and LonTalk protocol processing modules parse the DTVP write frames, match the corresponding network variables through mapping relationships, and complete the real-time update of variable values. The S34 and LonTalk protocol processing modules use the built-in LonTalk protocol stack to send the updated network variable values ​​to the LonWorks network, completing the forward data synchronization from the application layer to the network layer.

8. The LonWorks network real-time synchronization method based on digital twin variable of claim 1, wherein, Step S4 specifically includes the following sub-steps: The S41 LonTalk protocol processing module monitors downlink data from the LonWorks network in real time and captures network variable value update events triggered by network data. For classic neural network chips, updates are captured through the when(nv_update_occurs) event branch; for FT6050, updates are captured through SDK callback functions. S42 and LonTalk protocol processing modules extract the updated network variable index and the latest value, assemble a DTVP asynchronous notification frame with type code 0x04, and send it through the high-speed serial communication bus. S43, the digital twin variable manager of the general processing module parses the DTVP asynchronous notification frame and matches the corresponding digital twin variable through the pre-established mapping relationship; S44. The manager updates the values ​​of the matched digital twin variables in real time and synchronously triggers the preset application layer callback function to achieve real-time data synchronization from the network layer to the application layer, maintaining data consistency between the digital twin variables and the network variables throughout the process.

9. The LonWorks network real-time synchronization method based on digital twin variable of claim 1, wherein, Step S5 includes: S51 and the LonTalk protocol processing module always interact with the existing LonWorks network through the standard LonTalk protocol stack, so that the heterogeneous node system appears as a standard LonWorks device at the network layer. S52. Throughout the entire process from S1 to S4, the communication data format and interaction logic of the heterogeneous node system strictly follow the LonWorks bus standard, achieving 100% interoperability with existing LonWorks networks and devices. S53. During the synchronization process, only the data interaction between the digital twin variables within this node and the network variables is completed. The operation rules of the existing LonWorks network and the data transmission of other nodes in the network are not modified or interfered with. The real-time consistency of the network layer data is maintained throughout the process.

10. A LonWorks network real-time synchronization system based on digital twin variables, which is used to execute the method according to any one of claims 1 to 9, and is applied to a LonWorks fieldbus network and is realized based on a heterogeneous node system composed of a general processing module, a LonTalk protocol processing module and a high-speed serial communication bus; the general processing module is equipped with a manager, the LonTalk protocol processing module manages network variables and is internally provided with a LonTalk protocol stack, and the high-speed serial communication bus transmits DTVP data frames, characterized in that, include: Initialize the heterogeneous node system, start the manager and DTVP protocol layer of the general processing module, the LonTalk protocol stack and network variable resource pool of the LonTalk protocol processing module, and establish a bidirectional communication connection; Initialization and bidirectional communication connection establishment, dynamic registration and unique mapping of digital twin variables and network variables are performed. The manager creates digital twin variables according to the application layer request, assembles and sends DTVP configuration frames to the LonTalk protocol processing module, the LonTalk protocol processing module allocates the corresponding network variables and provides feedback, and the manager establishes the mapping relationship. After performing forward synchronization, the manager captures the changes in the digital twin variable values, assembles and sends a DTVP write frame, and the LonTalk protocol processing module updates the corresponding network variables according to the mapping relationship and sends them to the LonWorks network through the LonTalk protocol stack. After performing back-to-back real-time synchronization, the LonTalk protocol processing module captures the network variable updates triggered by the LonWorks network, assembles and sends DTVP asynchronous notification frames, and the manager updates the corresponding digital twin variables according to the mapping relationship to synchronize and maintain data consistency. It maintains real-time data consistency with existing LonWorks networks and devices at the LonTalk protocol layer.