Building automation communication protocol architecture and building automation communication method
By encapsulating the information of the BACnetIP protocol into the packets of the message queue/advanced message queue protocol and reconstructing the network hierarchy, the defects of the BACnetIP protocol in cross-net segments, reliability and maximum word length are solved, and more efficient communication and data exchange between devices in building automation systems are achieved.
Patent Information
- Application Number
- CN202510526716.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-25
- Publication Date
- 2025-05-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing building automation control network communication protocol BACnetIP is based on UDP, and has problems such as insufficient security, low communication efficiency and limited system scalability, especially when cross-network communication cannot be implemented.
Using a building automation communication protocol architecture, the application layer, network layer and link layer information of the BACnetIP architecture is encapsulated into the application layer data packets of the message queue/advanced message queue protocol, and the application layer, network layer and link layer of the building automation and control network are reconstructed, and the message queue is used to provide message caching and subscription services to achieve efficient communication and data exchange.
It solves the shortcomings of the BACnetIP protocol in cross-net segments, reliability and maximum word length, ensures more efficient communication and data exchange between devices in building automation systems, and improves the scalability and reliability of the system.
Smart Images

Figure CN120075208A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of network communication technologies, and in particular, to a building automation communication protocol architecture and a building automation communication method. Background Art
[0002] A building automation control system can automatically control and manage the interrelated mechanical and electrical equipment in a building, such as lighting, fire protection, and electricity. In recent years, due to the wide application of building automation control systems, the market demand for connecting the main equipment in a building to a building automation control system has been increasing day by day.
[0003] Currently, building automation control devices generally communicate with devices in a building automation control network by using the Building Automation and Control Network Communication Protocol over Internet Protocol (BACnet over IP, BACnetIP) and the User Datagram Protocol (UDP). However, BACnetIP communicates in plain text based on UDP, and the security is insufficient. BACnetIP is encapsulated based on UDP packets. However, due to the non-long connection characteristic of UDP, it is impossible to perform sub-packet transmission at the network layer and sub-packets need to be divided at the application layer, so the communication efficiency is limited. BACnetIP performs broadcast and point-to-point communication based on UDP packets. When broadcasting across network segments, the original address will be replaced by the gateway address, resulting in the inability to implement functions and limited system scalability.
[0004] Therefore, how to achieve efficient communication is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the Invention
[0005] The embodiments of the present invention provide a building automation communication protocol architecture and building automation communication to solve the defects of the Building Automation and Control Network Communication Protocol over Internet Protocol in terms of cross-network segments and reliability, and ensure more efficient communication and data exchange between devices in a building automation system.
[0006] In a first aspect, the embodiments of the present invention provide a building automation communication protocol architecture. The communication protocol architecture includes a target communication protocol network model that integrates a building automation control network data communication protocol and a message queue. The target communication protocol network model is a mesh structure centered around an Advanced Message Queuing Protocol node. The mesh structure includes at least two central nodes and end nodes. At least two data links are constructed based on the at least two central nodes to communicate through the at least two data links. The target communication protocol network model includes a message queue, a data link layer, a network layer, and an application layer. Among them, The network layer has functions of packet selection, forwarding, and congestion control to forward packets from the publishing queue of the first device to the subscription message queue of the second device; The application layer is used to define the rules and data formats of the communication protocol; The message queue replaces the functions of the physical layer and part of the data link layer in the original building automation control network data communication protocol, providing message caching and subscription services.
[0007] Optionally, the target communication protocol network model communicates using the Advanced Message Queuing Protocol and the Message Queuing Telemetry Transport Protocol.
[0008] Optionally, the communication protocol architecture further includes: When two-way communication is performed between the central node and the end node, the central node constructs a first message queue with its own Universally Unique Identifier (UUID) to receive messages sent by the end node; the end node accesses the second message of the central node according to its own UUID for message subscription and consumption; wherein, the central node constructs a second message queue with the UUID of the end node to provide message caching and subscription services; When two-way communication is performed between the first central node and the second central node, the first central node and the second central node each construct message queues with their own UUIDs to subscribe to and consume messages from each other.
[0009] Optionally, the communication protocol architecture further includes: When the current message cannot be routed to the task message queue of the current switch, any one of the operations of determining that the current message enters the standby switch for specified routing, enters the dead letter queue, or is abandoned for processing is performed according to the node policy.
[0010] Optionally, the communication protocol architecture further includes: The capacity of the communication protocol device is expanded according to the target communication protocol network model for point-to-point protocol communication across network segments; wherein, the building automation control devices are identified using UUIDs according to their physical addresses.
[0011] Optionally, the communication protocol architecture further includes: When the system starts, each central node initializes an empty routing table; wherein, the routing table is used to store the UUIDs of other nodes and the corresponding connection information; When a new central node joins the system, the new central node needs to register its own UUID and the corresponding connection information with other central nodes that actively connect to it; When the state of a node changes, the routing table is dynamically updated according to real-time information and predefined rules, and the routing table is maintained based on the connection status of the connected nodes.
[0012] Optionally, the communication protocol architecture further includes: Set access control list rules based on the source, destination, and content of the data packet to block the transmission of invalid or malicious data; Mark each data packet and set a check mechanism in the access control list to identify and discard duplicate data packets.
[0013] Optionally, the communication protocol architecture further includes: Convert the communication format of the building automation and control network communication protocol based on the Internet protocol into the message format of the Message Queuing Telemetry Transport (MQTT) protocol, while retaining the address information and routing information related to the building automation and control network communication protocol based on the Internet protocol, to be compatible with routing the building automation and control network communication protocol based on the Internet protocol; Convert the communication format of the Multiple Spanning Tree Protocol (MSTP) into the message format of the Message Queuing Telemetry Transport (MQTT) protocol, while retaining the Virtual Link Control (VLC) address information and routing information related to the Multiple Spanning Tree Protocol (MSTP), to be compatible with routing the Multiple Spanning Tree Protocol (MSTP).
[0014] In a second aspect, an embodiment of the present invention further provides a building automation communication method. The building automation communication method is applied to a building automation communication protocol architecture, and the method includes: Construct a target communication protocol network model that integrates the building automatic control network data communication protocol and the message queue; Encapsulate the message to be sent according to the target communication protocol format, and publish the encapsulated message to be sent to the target switch according to the optimal path in the routing table; Restore the data structure of the encapsulated message received in the target switch, and send the restored data structure to the target building automation control device; Control the target building automation control device to perform corresponding operations according to the restored data structure.
[0015] An embodiment of the present invention provides a building automation communication protocol architecture and a building automation communication method. The communication protocol architecture includes a target communication protocol network model based on the integration of the building automation control network data communication protocol and the message queue. The target communication protocol network model is a mesh structure centered around the Advanced Message Queuing Protocol (AMQP) node. The mesh structure includes at least two central nodes and end nodes. At least two data links are constructed based on the at least two central nodes for communication through the at least two data links. The target communication protocol network model includes a message queue, a data link layer, a network layer, and an application layer. Among them, the network layer has functions of packet selection, forwarding, and congestion control to forward packets from the publish queue of the first device to the subscription message queue of the second device. The application layer is used to define the rules and data formats of the communication protocol. The message queue replaces the functions of the physical layer and part of the data link layer in the original building automation control network data communication protocol, providing message caching and subscription services. With this solution, the target communication protocol network model encapsulates the application layer, network layer, and link layer information of the BACnet / IP architecture into the application layer packets of the message queue / Advanced Message Queuing Protocol, and reconstructs the application layer, network layer, and link layer of the building automation and control network, solving the defects of the UDP-based BACnet / IP protocol in aspects such as cross-network segment, reliability, and maximum word length, and ensuring more efficient communication and data exchange between devices in the building automation system. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Other features, objects, and advantages of the present invention will become more apparent by reading the detailed description of the non-limiting embodiments with reference to the following drawings. The drawings are only for the purpose of showing the preferred embodiments and are not considered as limiting the present invention. Moreover, throughout the drawings, the same reference numerals are used to represent the same components. In the drawings: Figure 1 is a schematic structural diagram of a building automation communication protocol architecture provided in an embodiment of the present invention.
[0017] Figure 2 is a simplified schematic structural diagram of a target communication protocol network model provided in an embodiment of the present invention.
[0018] Figure 3 is a schematic structural diagram of an Open Systems Interconnection (OSI) seven-layer reference model provided in an embodiment of the present invention.
[0019] Figure 4 is a comparison schematic diagram of the Advanced Message Queuing Protocol and the Message Queuing Telemetry Transport (MQTT) protocol provided in an embodiment of the present invention.
[0020] Figure 5 is a schematic diagram of a network topology structure provided in an embodiment of the present invention.
[0021] Figure 6 It is a schematic structural diagram of a node logical topology architecture provided in an embodiment of the present invention.
[0022] Figure 7 It is a schematic diagram of a mesh network structure composed of virtual switches provided in an embodiment of the present invention.
[0023] Figure 8 It is a schematic structural diagram of bidirectional communication between a central node and an end node provided in an embodiment of the present invention.
[0024] Figure 9 It is a schematic structural diagram of bidirectional communication between central nodes provided in an embodiment of the present invention.
[0025] Figure 10 It is a schematic structural diagram of message encapsulation provided in an embodiment of the present invention.
[0026] Figure 11 It is a schematic flowchart of a building automation communication method provided in an embodiment of the present invention. Detailed implementation manners
[0027] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that for the sake of description, only parts related to the present invention rather than all structures are shown in the drawings.
[0028] Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the operations (or steps) as sequential processes, many of the operations (or steps) can be implemented in parallel, concurrently, or simultaneously. In addition, the order of the operations can be rearranged. The process can be terminated when its operations are completed, but it can also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0029] Among them, the acquisition, storage, use, and processing of data in the technical solution of the present application all comply with the relevant regulations of laws and regulations. It should be noted that in the embodiments of the present application, some industry-existing solutions such as certain software, components, or models may be mentioned. They should be regarded as exemplary, and their purpose is only to illustrate the feasibility in the implementation of the technical solution of the present application, but it does not mean that the applicant has already or necessarily used this solution.
[0030] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of the present invention are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. Embodiment 1
[0031] Figure 1 It is a schematic structural diagram of a building automation communication protocol architecture provided in an embodiment of the present invention. The communication protocol architecture includes a target communication protocol network model based on the integration of a building automation control network data communication protocol and a message queue. The target communication protocol network model is a mesh structure centered around an Advanced Message Queuing Protocol node. The mesh structure includes at least two central nodes and end nodes. At least two data links are constructed based on the at least two central nodes for communication through the at least two data links; the target communication protocol network model 100 includes a message queue 110, a data link layer 120, a network layer 130, and an application layer 140; wherein, The network layer 130 has functions of packet selection, forwarding, and congestion control to forward packets from the publish queue of a first device to the subscription message queue of a second device; The application layer 140 is used to define the rules and data formats of the communication protocol; The message queue 110 replaces the functions of the physical layer and part of the data link layer in the original building automation control network data communication protocol, providing message caching and subscription services.
[0032] Among them, the target communication protocol network model constructed in the embodiment of the present invention is based on the network architecture of Building Automation and Control networks (BACnet), and a four-layer simplified architecture model is established. These four layers are equivalent to the physical layer, data link layer, network layer, and application layer in the Open System Interconnection (OSI) model, as Figure 2 shown. The target communication protocol network model (BACnet / MQ) standard defines the application layer and a simple network layer. For the data link layer and physical layer, on the basis of BACnet, the technology of the Internet of Things - Message Queue (MQ) is combined. MQ is used to replace the functions of the BACnet physical layer and part of the data connection layer, and at the same time continue to provide routing and forwarding information of the BACnet / IP type to ensure that it can be routed to slave bus devices.
[0033] The BACnet / MQ protocol encapsulates the application layer, network layer, and link layer information of the original BACnet / IP architecture into the application layer data packets of the MQ / AMQP protocol. Then, the virtualized network formed by virtual switches in the OSI application layer reconstructs the BACnet application layer, network layer, and link layer. This solves the deficiencies of the UDP-based BACnet / IP protocol in aspects such as cross-network segment, reliability, and maximum word length; based on these characteristics, it ensures more efficient communication and data exchange between devices in the building automation system. Among them, the Advanced Message Queuing Protocol (AMQP) is a network protocol for passing asynchronous messages between processes.
[0034] Among them, the network layer should be responsible for functions such as packet routing, forwarding, and congestion control. In the BACnet / MQ virtualized network, the network layer should be responsible for forwarding packets from the publish queue of one BACnet / MQ device to the subscription message queue of another BACnet / MQ device.
[0035] The application layer defines the rules and data formats of the communication protocol, including but not limited to content in aspects such as the object model, communication services, and network management.
[0036] In an alternative solution of the embodiment of the present invention, the building automation communication protocol architecture constructed in the embodiment of the present invention is constructed on the basis of OSI. Among them, the basic reference model of OSI should define different computer communication protocol standards and should comply with the requirements of ISO 7498. The OSI basic reference model divides complex problems into seven smaller and more manageable sub-problems. Each sub-problem is only related to a specific communication function and is called a layer in the protocol architecture. The seven-layer architecture is as Figure 3 shown and should comply with the following requirements: a) Each specific layer provides relevant services to the layers above it based on the services provided by the layers below; b) Each layer can be regarded as a black box, and the interfaces defined above and below the black box; c) An application process is connected to the application layer of OSI and communicates with a second remote application process, directly through the application layer interfaces of the two communication parties; d) In the same way, each layer provides communication services based on the layers below and establishes a virtual peer communication of the same layer with another system; e) Only the physical layer provides the actual communication connection.
[0037] The OSI model addresses communication between computers from a general perspective to solve the network communication problems between computers in a large and complex network. In the envisioned application scenario, for computers communicating over long distances, messages need to be transmitted through some intermediate media points, which may need to implement routing, parsing, complex synchronization, and error recovery mechanisms.
[0038] When only the required layers in the OSI model are selected to simplify the seven-layer architecture, the OSI model is a good choice for building automation protocols. In the simplified architecture, only the selected layers of the OSI model are included, and the other layers are empty, thus reducing the message length and the communication processing overhead. This simplified architecture is beneficial for the building automation industry to utilize low-cost, mass-produced processors and local area network technologies developed for process control and office automation industries. Making full use of existing, easy-to-use, and widely applied technologies, including but not limited to Ethernet, ARCNET, and LonTalk, will reduce costs, improve performance, and open up new ways for system integration.
[0039] An embodiment of the present invention provides a building automation communication protocol architecture. The communication protocol architecture includes a target communication protocol network model based on the integration of the building automation network data communication protocol and the message queue. The target communication protocol network model includes a message queue, a data link layer, a network layer, and an application layer. Among them, the network layer has the functions of packet selection, forwarding, and congestion control to forward packets from the publish queue of the first device to the subscription message queue of the second device. The application layer is used to define the rules and data formats of the communication protocol. The message queue replaces the functions of the physical layer and part of the data link layer in the original building automation network data communication protocol, providing message caching and subscription services. By adopting the technical solution of the embodiment of the present invention, the BACnet / MQ protocol encapsulates the application layer, network layer, and link layer information of the original BACnetIP architecture into the application layer packets of the MQ / AMQP protocol and reconstructs the application layer, network layer, and link layer of BACnet, solving the defects of the UDP-based BACnetIP protocol in aspects such as cross-network segment, reliability, and maximum word length, and ensuring more efficient communication and data exchange between devices in the building automation system. Embodiment 2
[0040] The embodiment of the present invention further optimizes the foregoing embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with each optional solution in one or more of the above embodiments. The building automation communication protocol architecture provided in the embodiment of the present invention further includes: The target communication protocol network model communicates using the Advanced Message Queuing Protocol and the Message Queuing Telemetry Transport Protocol.
[0041] Among them, referring to Figure 4 , the Advanced Message Queuing Protocol (AMQP) is more suitable for enterprise-level applications, especially in scenarios that require high reliability, security, and interoperability, such as financial transactions, inventory control, etc. Its design takes into account complex scenarios such as message transactions, queue management, and error handling, and supports multiple message routing methods to ensure the integrity and correctness of messages.
[0042] The Message Queuing Telemetry Transport (MQTT) protocol, due to its lightweight, efficient, and low-latency characteristics, is widely used in the Internet of Things field, especially for resource-constrained devices and low-bandwidth environments. Its simple design results in less data traffic in the network, making it very suitable for scenarios with limited bandwidth. At the same time, MQTT provides three different levels of Quality of Service (QoS), allowing developers to balance the delivery reliability of data and bandwidth utilization according to specific situations.
[0043] As an optional but non-limiting implementation manner, the target communication protocol network model is a mesh structure centered around AMQP nodes; the mesh structure includes at least two central nodes and end nodes, and at least two data links are constructed based on the at least two central nodes for communication through the at least two data links.
[0044] Among them, referring to Figure 5 , the implementation architecture of BACnet / MQ should be a mesh structure centered around AMQP nodes, rather than the tree structure of traditional BACnetIP or the chain structure of BACnet MSTP. Multiple logical channels can be formed between end-to-end in the mesh network; among them, MSTP is the Multiple Spanning Tree Protocol.
[0045] Optionally, referring to Figure 6 , the central node supports both the AMQP protocol and the MQTT protocol, and can also be compatible with the BACnetIP / MSTP communication mode. Use the MQTT protocol to access end low-computing devices / sensors and forward the messages into its own AMQP message routing network; use the AMQP protocol to establish a channel with peer central nodes, interact with data, forward messages, and perform local broadcasts in the virtual message routing network.
[0046] The end node supports the MQTT protocol and is compatible with BACnetIP / MSTP communication modes. It publishes BACNET messages to the specified server public input TOPIC and subscribes to the TOPIC channel based on its own UUID to achieve two-way communication of BACNET data packets.
[0047] The key parameters of the node include the universally unique identifier, heartbeat, and the issued topic / listening topic. Among them, the universally unique identifier sets the unique identification name of the node, which generally supports Chinese characters, English letters, numbers, and underscores (_), with a length not exceeding 30 characters. The heartbeat (Keep Alive) sets the keep-alive time to ensure that the connection to the MQTT broker remains active; it is recommended to take a value of more than 300 seconds. If the network is unstable, the heartbeat time can be set higher. The issued Topic / listening Topic specifies the MQTT topic to be published or subscribed to, and supports the use of wildcards (such as # and +) to achieve batch operations.
[0048] As an optional but non-limiting implementation method, the communication protocol architecture further includes: Expand the communication protocol device capacity according to the target communication protocol network model for point-to-point protocol communication across network segments; among them, according to the physical address of the building automation control device, the building automation control device is identified by a universally unique identifier.
[0049] Among them, the BACnet network based on MQ / AMQP greatly expands the device capacity of BACnet / IP, solves the limitation of the network segment / IP on the BACnet protocol, and does not require the BBMD mechanism, and can directly implement point-to-point BACnet protocol communication across network segments, achieving the goal of coexistence of a large number of devices in the same network. In order to uniquely identify devices in the MQ virtual network, it is necessary to generate a unique ID based on the MAC address of the building automation control device, and it is agreed that the unique ID used = UUID (MAC).
[0050] Optionally, there are mainly five versions of UUID algorithms, which generate UUIDs in different ways. Among them, using the current timestamp, the machine MAC address, and a random number to generate UUIDs can ensure uniqueness globally, but the use of MAC may pose security issues. Generating UUIDs based on the distributed computing environment DCE has the same algorithm as that based on the timestamp, but the first 4 bits of the timestamp need to be replaced with the POSIX UID. Obtaining UUIDs by calculating the MD5 hash value of the name and the namespace ensures the uniqueness of different names in the same namespace and the uniqueness of different namespaces. Using pseudo-random numbers to generate UUIDs has a certain probability of repetition, but the probability is extremely low and can be calculated. Generating UUIDs based on the SHA-1 hash value of the name has the same algorithm as obtaining UUIDs by calculating the MD5 hash value of the name and the namespace, but uses the SHA-1 algorithm instead of MD5.
[0051] The embodiment of the present invention is constructed and applicable to the Advanced Message Queuing Protocol and the Message Queuing Telemetry Transport Protocol; it expands the capacity of communication protocol devices to achieve point-to-point protocol communication across network segments, solves the defect of the BACnetIP protocol based on UDP in terms of crossing network segments, and ensures more efficient communication and data exchange between devices in the building automation system. Embodiment III
[0052] The embodiment of the present invention further optimizes the foregoing embodiment on the basis of the above embodiment, and the embodiment of the present invention can be combined with each optional solution in one or more of the above embodiments. The building automation communication protocol architecture provided in the embodiment of the present invention further includes: Among them, referring to Figure 7 , a self-organizing mesh data network can be formed based on the mechanism of central node interconnection. The data links from node A to F include ABEF, ACF, and ADF, etc. Multi-path is more conducive to the availability and stability of the data network. Nodes in the Mesh network can forward data through multiple intermediate nodes, thereby expanding the coverage of the network. Devices in the Mesh network can automatically form and join the network without manual intervention. When a certain line is blocked or unresponsive, the mesh network can select other lines for data relay to ensure the reliability of the network. When a network failure occurs, the mesh network can automatically repair itself to ensure the high-speed and smooth operation of the WiFi network.
[0053] As an optional but non-limiting implementation manner, the communication protocol architecture further includes: When two-way communication is carried out between the central node and the end node, the central node constructs a first message queue with its own universally unique identifier to receive messages sent by the end node; the end node accesses the second message of the central node according to its own universally unique identifier for message subscription and consumption; wherein, the central node constructs a second message queue with the universally unique identifier of the end node to provide message caching and subscription services.
[0054] Among them, referring to Figure 8 , when two-way communication is carried out between the central node and the end node, all message queues are deployed on the central node, and the end node only sends and subscribes messages by accessing the message queues of the central node, which is suitable for the end node to be used in resource-limited devices or network environments. The message queue with its own UUID as the ID on the central node uniformly receives the messages sent to it. The message queue with the end node UUID as the ID on the central node assists in message caching and provides subscription services, and the end node can subscribe and consume according to its own UUID.
[0055] As an optional but non-limiting implementation manner, the communication protocol architecture further includes: When two-way communication is carried out between the first central node and the second central node, the first central node and the second central node respectively construct message queues with their own universally unique identifiers to subscribe to and consume messages from each other.
[0056] Among them, referring to Figure 9 , when two-way communication is carried out between central nodes, each declares a message queue with its own UUID as the ID to subscribe to and consume messages, and publishes messages to the UUID queues of each other to achieve two-way communication.
[0057] As an optional but non-limiting implementation manner, the communication protocol architecture further includes: When the current message cannot be routed to the task message queue of the current switch, determine any one of the operations of the current message to enter the standby switch for specified routing, enter the dead letter queue, or give up processing according to the node policy.
[0058] Among them, when a message cannot be routed to any queue of the current switch, these messages will be re-routed to a standby switch. At the same time, appropriate routing logic can be configured for the standby switch, such as routing the message to a special "dead-letter queue". A dead-letter queue is a special queue used to handle messages that cannot be processed normally due to certain reasons (such as message expiration, queue full, rejecting the message and setting requeue=false). When an unroutable BACnet / MQ message appears, it is decided according to the BACnet / MQ node policy whether to direct it to the standby switch for specified routing, or directly into the dead-letter queue or simply discard it. The messages in the standby switch and the dead-letter queue can ultimately be received by a dedicated host and further logical processing can be performed to maintain the status, etc. Note that if a broadcast packet with the same timestamp enters the message queue of the same central node for the second time, it will be directly discarded and will not enter the dead-letter queue / standby switch.
[0059] The building automation communication protocol architecture provided by the embodiments of the present invention can form a self-organizing mesh data network based on the mechanism of central node interconnection, and data can be forwarded through multiple intermediate nodes, thus expanding the network coverage; devices can automatically form and join the network without manual intervention; when a certain line is blocked or unresponsive, the mesh network can select other lines for data relay to ensure network reliability; when a network failure occurs, the mesh network can automatically repair itself to ensure high-speed and smooth network operation. Embodiment 4
[0060] The embodiments of the present invention further optimize the foregoing embodiments on the basis of the above embodiments, and the embodiments of the present invention can be combined with each optional solution in one or more of the above embodiments. The building automation communication protocol architecture provided in the embodiments of the present invention, the communication protocol architecture further includes: Among them, the routing mechanism of the mesh network needs to consider the cooperation between multiple central nodes, the construction and maintenance of the routing table, and the structure of the routing information. The central node is allowed to dynamically update the routing table according to real-time information and predefined rules to ensure that messages can be accurately sent to the target node, and each central node will maintain a dynamic routing table in real time to guide the message forwarding path.
[0061] Routing can refer to the path information that guides messages from the source address to the destination, or it can be understood as the process by which data packets move from the source node to the target node. To isolate broadcast and access rules, it is necessary to block the passing of broadcasts, and traffic can be controlled by setting up an access control list (ACL). Self-healing ability means that when the connection of a device in the network is disconnected or damaged, the mesh network can automatically repair the connection to ensure network connectivity. Load balancing can refer to the ability of a mesh router network to automatically distribute the network load among multiple nodes, providing a more stable and reliable network connection.
[0062] As an optional but non-limiting implementation, the communication protocol architecture further includes: When the system starts up, each central node will initialize an empty routing table; wherein, the routing table is used to store the universally unique identifier of other nodes and the corresponding connection information; When a new central node joins the system, the new central node needs to register its own universally unique identifier and the corresponding connection information with other central nodes that it actively connects to; When the state of a node changes, the routing table is dynamically updated according to real-time information and predefined rules, and the routing table is maintained based on the connection status of the connected nodes.
[0063] Among them, the structure of the routing information should include the target node ID, connection information, status, and the last update time. Among them, the target node ID is used to identify the target recipient of the message. The connection information includes the IP address, port number of the target node, and other necessary connection parameters. The status indicates the current state of the target node (such as online, offline, faulty, etc.). The last update time records the last update time of the routing information, which is used to judge the timeliness of the information.
[0064] The process of creating and maintaining routing includes: initializing the routing table, discovery and registration, dynamic update, and heartbeat detection and fault recovery. Specifically, when the system starts up, each central node will initialize an empty routing table, which will be used to store the IDs of other nodes and the corresponding connection information. When a new central node joins the system, it needs to register its node UUID and connection information with other central nodes that it actively connects to, and the central node regularly broadcasts the latest node list to the central nodes in its routing list. When the state of a node changes (such as going online, going offline, faulty, etc.), it is directly updated; after other nodes detect these changes, they will automatically update their routing tables to ensure the accuracy of the routing information. To ensure the validity of the routing table, nodes can maintain the routing table according to the connection status of the connected nodes; if a certain node is in a disconnected state, it can be removed from the routing table or marked as unavailable; once the faulty node recovers, it can re-register and update the routing table.
[0065] Routing algorithms include distance vector routing algorithms and link state routing algorithms. Among them, the distance vector routing algorithm can refer to the Ad-hoc On-demand Distance Vector Routing (AODV) algorithm that realizes route discovery by periodically broadcasting route requests and replying with route update information. In AODV, when a source node needs to communicate with a destination node, it initiates a route request. This request is broadcast throughout the network until a path to the destination node is found; once a path is found, a route reply is sent along this path to establish a communication link. The link state routing algorithm can refer to relying on the network topology and link state information maintained by each node for route selection; each node periodically exchanges link state information to understand the overall network situation. Based on this information, each node can construct a global view of the network and use a shortest path algorithm (such as Dijkstra's algorithm) to calculate the best path to other nodes.
[0066] As an optional but non-limiting implementation manner, the communication protocol architecture further includes: Set access control list rules based on the source, destination, and content of the data packet to block the transmission of invalid or malicious data; Mark each data packet and set a checking mechanism in the access control list to identify and discard duplicate data packets.
[0067] Among them, the specific rules of access control include: restricting the number of broadcasts of each node within a specific time window (such as within 1 minute). Mark each data packet (such as timestamp, sequence number, etc.) and set a checking mechanism in the ACL to identify and discard duplicate data packets, especially those that are looped and forwarded repeatedly. Set ACL rules according to the source, destination, or content of the data packet to block the transmission of potential malicious or invalid data.
[0068] Optionally, the embodiments of the present invention ensure network security based on national cryptographic algorithms. The MQTT and AMQP protocols operate based on the TLS security mechanism at the bottom layer. TLS (Transport Layer Security) is a protocol for protecting communication security. It is built on top of the underlying transport protocol (such as TCP) and provides protection mechanisms such as encryption, integrity, and authentication for communication. In national cryptographic algorithms, SM2, SM3, and SM4 are three important components.
[0069] Specifically, SM2 can be used for key exchange and authentication in TLS. For example, during the TLS handshake process, the server can use the SM2 algorithm to send its public key certificate. After the client verifies the certificate, it can use the SM2 algorithm to negotiate keys with the server.
[0070] SM3 can be used for message authentication and integrity verification in TLS. During the TLS handshake process, both the client and the server calculate and exchange some hash values to ensure that the messages are not tampered with during transmission. These hash values can be calculated using the SM3 algorithm.
[0071] SM4 can be used as an encryption algorithm in TLS to encrypt the data transmitted over the TLS connection. During the TLS handshake process, the client and the server negotiate which encryption algorithm (including SM4) to use to protect the subsequent data transmission.
[0072] The building automation communication protocol architecture provided by the embodiments of the present invention also needs to consider the cooperation among multiple nodes, the construction and maintenance of the routing table, and the structure of the routing information. The central node dynamically updates the routing table according to the real-time information and predefined rules to ensure that the messages can be accurately sent to the target node. According to the isolation broadcast and access rules, the passing of broadcasts is blocked, and the traffic can be controlled by setting up an access control list. When the connection of the devices in the network is disconnected or damaged, the mesh network can automatically repair the connection to ensure the connectivity of the network; and the national cryptographic algorithm is adopted to ensure the network security. Embodiment Five
[0073] The embodiments of the present invention further optimize the foregoing embodiments on the basis of the above embodiments, and the embodiments of the present invention can be combined with each optional solution in one or more of the above embodiments. The building automation communication protocol architecture provided in the embodiments of the present invention, the communication protocol architecture further includes: Convert the communication format of the building automation and control network communication protocol based on the Internet protocol into the message format of the Message Queuing Telemetry Transport protocol, while retaining the address information and routing information related to the building automation and control network communication protocol based on the Internet protocol, so as to be compatible with the routing of the building automation and control network communication protocol based on the Internet protocol.
[0074] Among them, in order for BACnet / MQ to route local BACnetIP messages, it is necessary to convert the communication of BACnet IP into the message format of MQTT, while retaining the address information and routing information related to BACnet / IP as the basis for the corresponding src / dst. For example, if BACnet / IP node A and BACnet / MQ node B compatible with BACnetIP are in the same network segment, and BACnet / MQ node C is in another network segment, and the two networks can be connected, then: When node A communicates with node B, the BACnetIP protocol is executed between A and B; When node B communicates with node C, the BACnet / MQ protocol is executed between B and C; When node C communicates with node A, the BACnetIP protocol and the BACnet / MQ protocol are converted by router B.
[0075] In an optional but non-limiting implementation, the communication protocol architecture further includes: Converting the communication format of the Multiple Spanning Tree Protocol to the message format of the Message Queuing Telemetry Transport Protocol, while retaining the virtual link control address information and routing information related to the Multiple Spanning Tree Protocol to be compatible with the routed Multiple Spanning Tree Protocol.
[0076] Among them, in order for BACnet / MQ to route local BACnet MSTP messages, it is necessary to convert the communication of BACnet MSTP into the message format of MQTT, while retaining the BVLC address information and routing information related to BACnet MSTP. The src / dst section is filled with the local IP or signature, and it is marked as no IP forwarding requirement. For example, if BACnet MSTP node A and BACnet / MQ node B compatible with BACnet MSTP are connected on the same bus, and BACnet / MQ node C is in another network segment and the two networks can be connected, then: When node A communicates with node B, the BACnet MSTP protocol is executed between A and B; When node B communicates with node C, the BACnet / MQ protocol is executed between B and C; When node C communicates with node A, the BACnetIP protocol and the BACnet MSTP protocol are converted by router B.
[0077] In an optional but non-limiting implementation, the communication protocol architecture further includes: See Figure 10 , the message encapsulation of BACnet data packets on the BACnet / MQ network, including the Universally Unique Identifier, the IP address and port number of the message originator / receiver, virtual link control, network protocol data unit, and application protocol data unit. Among them, the Universally Unique Identifier (UUID) represents the UUID of the BACnet / MQ node accessed by BACnet / IP; src / dst IP+Port represents the IP address and port number of the message originator / receiver; virtual link control (BACnet Virtuallink BACnet, BVLC) Continues to use the BVLC of BACnet IP; the network protocol data unit (NPDU) carries the information of the network layer and continues to use the NPDU of BACnet IP; the application protocol data unit (APDU) contains the information of the BACnet application layer and continues to use the APDU of BACnet IP.
[0078] The building automation communication protocol architecture provided by the embodiments of the present invention improves compatibility by converting the protocol message format to be compatible with routing multiple protocols. Embodiment Six
[0079] Figure 11 It is a flowchart of a building automation communication method provided by the embodiments of the present invention. The embodiments of the present invention are applicable to the situation of building automation communication using the building automation communication protocol architecture, and this method can be executed by the building automation communication protocol architecture provided in any embodiment of the present invention. As Figure 11 shown, the building automation communication method provided by the embodiments of the present invention specifically includes the following steps: S1010. Construct a target communication protocol network model based on the integration of the building automation control network data communication protocol and the message queue.
[0080] S1020. Package the message to be sent according to the target communication protocol format, and publish the packaged message to be sent to the target switch according to the optimal path in the routing table.
[0081] S1030. Restore the data structure of the packaged message received in the target switch, and send the restored data structure to the target building automation control device.
[0082] S1040. Control the target building automation control device to perform corresponding operations according to the restored data structure.
[0083] Among them, the BACnet / MQ architecture allows the use of MQTT / AMQP as the transport protocol to build a virtualized mesh network to transmit the BACnet data structure; by converting the BACnet data structure into an application layer message and parsing and restoring it at the subscription end, data interaction and transmission between BACnet and MQTT / AMQP are realized. In specific implementation, it is recommended to select the MQTT / AMQP protocol as the communication basis according to the hardware resources and network resources.
[0084] Specifically, a target communication protocol network model based on the integration of the building automation control network data communication protocol and the message queue is constructed. In the target communication protocol network model, the BACnet data structure is encapsulated into data conforming to the MQTT / AMQP message format and published; the MQTT / AMQP protocol is used to publish the message to the specified switch / message queue according to the optimal path in the routing table; the Mesh network routes the message to the receiving message queue of the target node according to the routing table forwarding rule; the node parses the received message and restores the BACnet data structure; the node passes the restored BACnet data structure to the corresponding BACnet device; the BACnet device uses the received data to perform control, monitoring, or execute corresponding operations.
[0085] The building automation communication method provided in the embodiments of the present invention can be applied to the building automation communication protocol architecture provided in any of the above embodiments of the present invention, and has the corresponding functions and beneficial effects of the building automation communication protocol architecture. For the technical details not described in detail in the above embodiments, reference can be specifically made to the building automation communication protocol architecture provided in any embodiment of the present application.
[0086] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitations are imposed herein.
[0087] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub - combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A building automation communication protocol architecture, characterized in that: The communication protocol architecture includes a target communication protocol network model based on the fusion of the building automatic control network data communication protocol and the message queue. The target communication protocol network model is a mesh structure developed around the advanced message queue protocol node. The mesh structure includes at least two central nodes and terminal nodes. At least two data links are constructed based on the at least two central nodes to communicate through the at least two data links. The target communication protocol network model includes a message queue, a data link layer, a network layer and an application layer. The network layer has data packet selection, forwarding and congestion control functions to forward data packets from the publishing queue of the first device to the subscription message queue of the second device; The application layer is used to define the rules of the communication protocol and the data format; The message queue replaces the functions of the physical layer and part of the data link layer in the original building automation network data communication protocol, and provides message caching and subscription services.
2. The building automation communication protocol architecture according to claim 1, characterized in that: The target communication protocol network model uses the Advanced Message Queuing Protocol and the Message Queuing Telemetry Transport Protocol for communication.
3. The building automation communication protocol architecture according to claim 1, characterized in that: The communication protocol architecture also includes: When the central node and the end node perform two-way communication, the central node constructs a first message queue with its own universal unique identification code to receive messages sent by the end node; the end node accesses the second message of the central node according to its own universal unique identification code to subscribe to and consume messages; wherein the central node constructs a second message queue with the universal unique identification code of the end node to provide message caching and subscription services; When the first central node and the second central node perform bidirectional communication, the first central node and the second central node each construct a message queue with their own universal unique identification code to subscribe to and consume messages from each other.
4. The building automation communication protocol architecture according to claim 1, characterized in that: The communication protocol architecture also includes: When the current message cannot be routed to the task message queue of the current switch, the node strategy is used to determine whether the current message enters the standby switch for designated routing, enters the dead letter queue, or abandons processing.
5. The building automation communication protocol architecture according to claim 1, characterized in that: The communication protocol architecture also includes: The capacity of the communication protocol equipment is expanded according to the target communication protocol network model to perform point-to-point protocol communication across network segments; wherein the building automation control equipment is identified by a universal unique identification code according to the physical address of the building automation control equipment.
6. The building automation communication protocol architecture according to claim 1, characterized in that: The communication protocol architecture also includes: When the system starts, each central node will initialize an empty routing table; wherein the routing table is used to store the universal unique identification codes of other nodes and the corresponding connection information; When a new central node joins the system, the new central node needs to register its own universal unique identification code and corresponding connection information with other central nodes that actively connect; When the state of a node changes, the routing table is dynamically updated based on real-time information and predefined rules, and the routing table is maintained based on the connection status of the connected nodes.
7. The building automation communication protocol architecture according to claim 1, characterized in that: The communication protocol architecture also includes: Set access control list rules based on the source, destination and content of the data packet to prevent the transmission of invalid or malicious data; Each packet is tagged and a check mechanism is set up in the access control list to identify and discard duplicate packets.
8. The building automation communication protocol architecture according to claim 1, characterized in that: The communication protocol architecture also includes: Converting the communication format of the Internet Protocol-based building automation and control network communication protocol to the message format of the message queue telemetry transmission protocol, while retaining address information and routing information related to the Internet Protocol-based building automation and control network communication protocol to be compatible with routing the Internet Protocol-based building automation and control network communication protocol; The communication format of the multiple spanning tree protocol is converted into the message format of the message queue telemetry transmission protocol, while retaining the virtual link control address information and routing information related to the multiple spanning tree protocol to be compatible with the routing multiple spanning tree protocol.
9. A building automation communication method, characterized in that: The building automation communication method is applied to a building automation communication protocol architecture, and the method comprises: Construct a target communication protocol network model based on the fusion of building automation network data communication protocol and message queue; Encapsulate the message to be sent according to the target communication protocol format, and publish the encapsulated message to be sent to the target switch according to the optimal path of the routing table; Restoring the data structure of the encapsulated message to be sent received in the target switch, and sending the restored data structure to the target building automation control device; The target building automation control device is controlled to perform corresponding operations according to the restored data structure.
Citation Information
Patent Citations
Intelligent building energy consumption monitoring system based on wireless sensor network
CN102176149A
Conversion and scheduling method among profinet, FF Hi, CAN and profibus protocols
CN108809949A
Building edge side equipment data management method and device, electronic equipment and storage medium
CN118784647A