Building protocol data processing method, apparatus, and system
By converting Bip2JSON protocol data into BACnet protocol data in the protocol construction controller, the unified management problem caused by differences in protocols of different smart devices is solved, and the unified processing of multiple protocols in the building system and the convenient docking of Internet applications are realized, improving improve management efficiency.
Patent Information
- Application Number
- PCT/CN2024/071164
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-07
- Filing Date
- 2024-01-08
- Publication Date
- 2024-09-12
AI Technical Summary
Existing technology makes it difficult to uniformly manage smart devices from different suppliers, especially in the transformation of temperature and humidity control, water treatment and lighting systems in buildings. Due to the different communication protocols of each device, data aggregation and unified management are difficult.
Build a controller through the protocol, convert the Bip2JSON protocol data in JSON format into BACnet protocol data, and perform functional responses based on the BACnet protocol data to achieve unified processing of building protocol data, reduce the difficulty of BACnet protocol access, and support the unification of multiple protocols chemical treatment.
It realizes the unified processing of multiple protocols in the building system, reduces the difficulty of BACnet protocol access, supports the convenient connection between Internet applications and building information, and improves the management and control efficiency of the system.
Smart Images

Figure CN2024071164_12092024_PF_FP_ABST
Abstract
Description
Building protocol data processing method, device and system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to Chinese patent application No. 202310217638.X filed in China on March 7, 2023, the entire contents of which are incorporated herein by reference. Technical Field
[0003] The present disclosure relates to the field of communication technology, and in particular to a building protocol data processing method, device, system, computer-readable storage medium, computer program product, and computer program. Background Art
[0004] With the development of information technology, the intelligent functions in buildings are constantly enhanced. It is inevitable that multiple smart devices from different suppliers are used simultaneously in the same building. Multiple smart devices from different manufacturers may have different communication protocols, which brings many inconveniences to unified management.
[0005] When renovating a building's air-conditioning system, hot and cold water system, lighting system, etc., the renovation mainly involves temperature and humidity control, water treatment, and lighting system start and stop. Due to the wide variety and discrete distribution of the smart devices to be renovated, and the different communication protocols of multiple smart devices, it is difficult to aggregate the data of all smart devices for the entire building and conduct unified management.
[0006] Therefore, it is necessary to develop a building protocol data processing method, device, system, computer-readable storage medium, computer program product and computer program that can perform unified management.
[0007] Summary of the Invention
[0008] The purpose of the present disclosure is to provide a building protocol data processing method, device, system, computer-readable storage medium, computer program product and computer program, which realize the functional response corresponding to the request operation in the building protocol data by performing protocol conversion on Bip2JSON protocol data in JSON format.
[0009] In a first aspect, an embodiment of the present disclosure provides a building protocol data processing method, which is applied to a protocol construction controller, wherein the protocol construction controller is connected to at least one upper-layer application through an MQTT server, and the protocol construction controller is also connected to at least one BACnet device, and the method includes: receiving first Bip2JSON protocol data sent by the target upper-layer application through the MQTT server, wherein the first Bip2JSON protocol data is a JSON format text carrying a first request operation, a request application identifier, a target device identifier and a first point information; converting the first Bip2JSON protocol data into BACnet protocol data; and performing a functional response corresponding to the first request operation based on the BACnet protocol data.
[0010] In an embodiment of the present disclosure, converting the first Bip2JSON protocol data into BACnet protocol data includes: determining APDU application layer data based on the first request operation and the first point information in the first Bip2JSON protocol data; determining NPDU network layer data and BVLC virtual link control information based on the target device identifier and the network layer information corresponding to the target device identifier in the first Bip2JSON protocol data; and determining BACnet protocol data based on the APDU application layer data, NPDU network layer data and BVLC virtual link control information.
[0011] In an embodiment of the present disclosure, performing a functional response corresponding to a first request operation based on BACnet protocol data includes: in response to a target device corresponding to a target device identifier being a third-party BACnet device, sending the BACnet protocol data to the third-party BACnet device so that the third-party BACnet device performs a functional response corresponding to the first request operation according to the BACnet protocol data; in response to a target device corresponding to the target device identifier being a virtual BACnet device corresponding to a private protocol agent, performing a functional response corresponding to the first request operation according to the BACnet protocol data.
[0012] In an embodiment of the present disclosure, the above-mentioned protocol construction controller caches device data corresponding to multiple device identifiers, and performs a functional response corresponding to a first request operation according to the BACnet protocol data, including: responding to the first request operation in the BACnet protocol data as an information acquisition operation, searching for target device data corresponding to the target device identifier from the device data corresponding to the multiple device identifiers, and responding based on the target device data, wherein the information acquisition operation includes one of the following: searching for BACnet devices in the network, obtaining a point list of the device, reading the point attributes of the device, and subscribing to the point changes of the device; responding to the first request operation in the BACnet protocol data as a device control operation, sending a control instruction to the target virtual BACnet device corresponding to the target device identifier according to the BACnet protocol data, so that the target virtual BACnet device performs a corresponding functional response, wherein the device control operation includes: writing the point attributes of the device.
[0013] In an embodiment of the present disclosure, the device data corresponding to each device identifier is updated by: receiving second Bip2JSON protocol data sent by a private protocol agent, wherein the second Bip2JSON protocol data is a JSON text carrying a request device identifier and a second request operation obtained by the private protocol agent converting the private protocol data of the virtual BACnet device; according to the second request operation, updating the device data of the virtual BACnet device corresponding to the request device identifier, wherein the second request operation includes one of the following: adding a virtual BACnet device, deleting a virtual BACnet device, adding a point in a virtual BACnet device, updating a point in a virtual BACnet device, and deleting a point in a virtual BACnet device.
[0014] In the disclosed embodiment, the device data includes basic information and data information; the basic information includes a BACnet device identifier and BACnet point information; and the data information includes a point current value and a point status.
[0015] In the embodiment of the present disclosure, the above-mentioned private protocol agent includes at least one of the following: Modbus protocol agent, Zigbee protocol agent, and KNX protocol agent; and the virtual BACnet device includes at least one of the following: Modbus device, Zigbee device, and KNX device.
[0016] In the embodiment of the present disclosure, the above-mentioned upper layer application includes at least one of the following: a third-party application, a Web application, a configuration application, and a protocol forwarding agent.
[0017] In the second aspect, the embodiment of the present disclosure also provides a building protocol data processing device, which is applied to a protocol construction controller, wherein the protocol construction controller is connected to at least one upper-layer application through an MQTT server, and the protocol construction controller is also connected to at least one BACnet device, and the device includes: a protocol receiving module, used to receive the first Bip2JSON protocol data sent by the target upper-layer application through the MQTT server, wherein the first Bip2JSON protocol data is a JSON format text carrying a first request operation, a request application identifier, a target device identifier and a first point information; a protocol conversion module, used to convert the first Bip2JSON protocol data into BACnet protocol data; and a function response module, used to perform a function response corresponding to the first request operation based on the BACnet protocol data.
[0018] In a third aspect, an embodiment of the present disclosure also provides a building protocol data processing system, which includes: a protocol construction controller, an MQTT server and at least one BACnet device, wherein the protocol construction controller is connected to at least one upper-layer application through the MQTT server, and the protocol construction controller is also connected to at least one BACnet device, and the protocol construction controller is used to execute the building protocol data processing method as described in any embodiment of the first aspect.
[0019] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the building protocol data processing method described in any embodiment of the first aspect above.
[0020] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the building protocol data processing method described in any embodiment of the first aspect.
[0021] In a sixth aspect, an embodiment of the present disclosure further provides a computer program, comprising computer program code, which, when executed on a computer, enables the computer to execute the building protocol data processing method described in any one of the embodiments of the first aspect.
[0022] In the building protocol data processing method, device, system, computer-readable storage medium, computer program product, and computer program provided in the embodiments of the present disclosure, the method is applied to a protocol construction controller, the protocol construction controller is connected to at least one upper-layer application via an MQTT server, and the protocol construction controller is also connected to at least one BACnet device, and the method includes: receiving first Bip2JSON protocol data sent by the target upper-layer application via the MQTT server, wherein the first Bip2JSON protocol data is a JSON format text carrying a first request operation, a request application identifier, a target device identifier, and first point information; converting the Bip2JSON protocol data into BACnet protocol data; and performing a functional response corresponding to the first request operation based on the BACnet protocol data. The embodiments of the present disclosure implement a functional response corresponding to the request operation in the building protocol data by performing protocol conversion on the Bip2JSON protocol data in JSON format, providing a unified processing method for multiple protocols in a building system, reducing the difficulty of BACnet protocol access to facilitate secondary development, and thus achieving convenient docking between Internet applications and building information. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0024] FIG1 is a flow chart of a method for processing building protocol data provided by an embodiment of the present disclosure;
[0025] FIG2 is a schematic diagram of a building protocol data processing process provided by an embodiment of the present disclosure;
[0026] FIG3 is a schematic diagram of another building protocol data processing process provided by an embodiment of the present disclosure;
[0027] FIG4 is a schematic diagram of a building protocol data processing system provided by an embodiment of the present disclosure;
[0028] FIG5 is a schematic diagram of a building protocol data processing interface provided by an embodiment of the present disclosure;
[0029] FIG6 is a structural block diagram of a building protocol data processing device provided by an embodiment of the present disclosure;
[0030] FIG7 is a schematic structural diagram of a building protocol data processing system provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] The following will clearly and completely describe the technical solutions of the present disclosure in conjunction with the embodiments. Obviously, the embodiments described are only a part of the embodiments of the present disclosure, not all of them. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.
[0032] In related technologies, the management of multiple protocols in building systems involves unifying them into the BACnet protocol, which allows intelligent building systems to communicate using the BACnet communication protocol. This protocol is defined by the International Organization for Standardization (ISO) and the American Society of Heating, Ventilation, Air-Conditioning, and Refrigeration Engineers (ASHRAE). Designed for heating, ventilation, air-conditioning, and refrigeration control equipment, the BACnet protocol also provides a foundational principle for the integration of other building control systems, such as lighting, security, and fire protection systems.
[0033] However, the BACnet protocol has certain shortcomings. First, the protocol structure is complex and difficult to access, requiring a BACnet client to obtain protocol information. Second, the BACnet application layer APDUs are poorly readable, making secondary development difficult and preventing the "what you see is what you get" (WYSIWYG) model. Third, the BACnet protocol's integration with internet applications is poor, preventing direct controller operation via web applications, making it unsuitable for modern applications.
[0034] Based on this, the embodiments of the present disclosure provide a building protocol data processing method, device, system, computer-readable storage medium, computer program product and computer program. By performing protocol conversion on Bip2JSON protocol data in JSON format, functional responses corresponding to request operations in the building protocol data are realized, providing a unified processing method for multiple protocols in a building system, reducing the difficulty of BACnet protocol access to facilitate secondary development, thereby realizing convenient docking between Internet applications and building information.
[0035] To facilitate understanding of this embodiment, a building protocol data processing method disclosed in an embodiment of the present disclosure is first introduced in detail.
[0036] Figure 1 is a flowchart of a building protocol data processing method provided by an embodiment of the present disclosure. The method is applied to a protocol construction controller; the protocol construction controller is connected to at least one upper-layer application via an MQTT server; the upper-layer application connected to the protocol construction controller via the MQTT server includes at least one of the following: a third-party application, a web application, a configuration application, and a protocol forwarding agent. The protocol construction controller is also connected to at least one BACnet device; the BACnet device here can be a third-party BACnet device or a virtual BACnet device corresponding to a private protocol agent; the private protocol agent includes at least one of the following: a Modbus protocol agent, a Zigbee protocol agent, or a KNX protocol agent; the virtual BACnet device includes at least one of the following: a Modbus device, a Zigbee device, or a KNX device. The method specifically includes steps S102 to S106.
[0037] Step S102: Receive first Bip2JSON protocol data sent by the target upper-layer application through the MQTT server; the first Bip2JSON protocol data is a JSON format text carrying a first request operation, a request application identifier, a target device identifier, and first point information.
[0038] The first request operation may be a request for the target upper layer application to obtain device data of the target device corresponding to the target device identifier, or a request for the target upper layer application to control the target device corresponding to the target device identifier to perform a certain action. The request application identifier is the identifier corresponding to the target upper layer application initiating the request.
[0039] First, Bip2JSON protocol data is formatted as JSON text, using JSON as the data carrier, which is highly readable and easy to develop. At the same time, the protocol conversion method combines the various capabilities of the BACnet protocol, including the ability to automatically discover devices, obtain the services that devices can provide, and read and write device objects and properties.
[0040] Step S104: convert the first Bip2JSON protocol data into BACnet protocol data.
[0041] The specific protocol conversion process can be performed based on the format characteristics of the two protocols. For example, the corresponding data is extracted from the first Bip2JSON protocol data and converted into APDU application layer data, NPDU network layer data, and BVLC virtual link control information corresponding to the BACnet protocol, thereby obtaining BACnet protocol data.
[0042] Step S106: Perform a functional response corresponding to the first request operation based on the BACnet protocol data.
[0043] In response to the target device corresponding to the target device identifier being a third-party BACnet device, BACnet protocol data is sent to the third-party BACnet device, so that the third-party BACnet device performs a functional response corresponding to the first request operation according to the BACnet protocol data.
[0044] In response to the target device corresponding to the target device identifier being a virtual BACnet device corresponding to the private protocol agent, a functional response corresponding to the first request operation is performed directly according to the BACnet protocol data.
[0045] The building protocol data processing method provided in the disclosed embodiments is applied to a protocol construction controller, wherein the protocol construction controller is connected to at least one upper-layer application via an MQTT server, and the protocol construction controller is also connected to at least one BACnet device. The method includes first receiving first Bip2JSON protocol data sent by the target upper-layer application via the MQTT server, wherein the first Bip2JSON protocol data is JSON-formatted text carrying a first request operation, a requesting application identifier, a target device identifier, and first point information; then converting the Bip2JSON protocol data into BACnet protocol data; and finally, performing a functional response corresponding to the first request operation based on the BACnet protocol data. The disclosed embodiments implement functional responses corresponding to the request operations in the building protocol data by performing protocol conversion on the JSON-formatted Bip2JSON protocol data, providing a unified processing method for multiple protocols in a building system, reducing BACnet protocol access requirements to facilitate secondary development, and thus enabling convenient connection between internet applications and building information.
[0046] The disclosed embodiment also provides another building protocol data processing method, which is implemented on the basis of the above embodiment; this embodiment focuses on describing the protocol conversion process and the request response process.
[0047] The structure of BIP2JSON protocol data is as follows:
[0048] 1.op: The operation of this request, which can be whois (search BACnet devices), readprop (read point properties), writeprop (write point properties) and other operations;
[0049] 2.seq: The sequence number of this request (a positive integer), used to mark the reply frame from the server;
[0050] 3.callerId: The requester ID of this request, which is used to mark the request source so that the server can send the reply frame to the correct recipient;
[0051] 4.device: The BACnet device number for this request;
[0052] 5.prop: The BACnet property number for which this request is being made;
[0053] 6.data: The BACnet point information targeted by this request, including the point address and point type.
[0054] For example: The goal is to read the current value (85) of the point at device 77030, type 1, and address 65;
[0055] The client sends:
[0056] {"op":"readprop","seq":998,"callerId":235,"device":77030,"prop":85,"arrayIndex":-1,"data":[{"type":1,"instance":65}]};
[0057] The protocol construction controller returns:
[0058] {"op":"readprop","ack":1,"seq":998,"callerId":235,"tokenId":1228,"device":77030,"data":[{"type":1,"instance":65,"prop":85,"value":11}],"timeStamp":1639862034}.
[0059] The target upper-layer application packages the BIP2JSON protocol data based on the required device and point information, taking the above protocol data structure as an example, and sends the data to the protocol construction controller through the MQTT client.
[0060] The protocol construction controller converts the first Bip2JSON protocol data into BACnet protocol data, specifically including:
[0061] (1) determining APDU application layer data according to the first request operation and the first point information in the first Bip2JSON protocol data;
[0062] (2) determining NPDU network layer data and BVLC virtual link control information based on the target device identifier in the first Bip2JSON protocol data and the network layer information corresponding to the target device identifier;
[0063] (3) Determine BACnet protocol data based on APDU application layer data, NPDU network layer data and BVLC virtual link control information.
[0064] The step of the protocol constructing controller performing a functional response corresponding to the first request operation based on the BACnet protocol data includes the following two cases.
[0065] The first method: In response to the target device corresponding to the target device identifier being a third-party BACnet device, the BACnet protocol data is sent to the third-party BACnet device, so that the third-party BACnet device performs a functional response corresponding to the first request operation according to the BACnet protocol data. In other words, when the target device is a third-party BACnet device, only the BACnet protocol data needs to be sent to the third-party BACnet device, and the specific response process is completed by the third-party BACnet device.
[0066] Second: In response to the target device corresponding to the target device identifier being a virtual BACnet device corresponding to the private protocol agent, performing a functional response corresponding to the first request operation according to the BACnet protocol data.
[0067] In specific implementation, the above protocol constructs a controller cache with device data corresponding to multiple device identifiers; for example, device data corresponding to Modbus devices, Zigbee devices and KNX devices respectively; device data includes: basic information and data information; basic information includes: BACnet device identifier, BACnet point information; data information includes: point current value and point status.
[0068] When the target device is a virtual BACnet device corresponding to a proprietary protocol agent, the step of the protocol construction controller performing a functional response corresponding to the first request operation according to the BACnet protocol data includes the following two cases:
[0069] (1) in response to the first request operation in the BACnet protocol data being an information acquisition operation, searching for target device data corresponding to the target device identifier from device data corresponding to multiple device identifiers, and responding based on the target device data, wherein the information acquisition operation includes one of the following: searching for BACnet devices in the network, obtaining a device point list, reading a device point attribute, and subscribing to a device point change;
[0070] (2) In response to the first request operation in the BACnet protocol data being a device control operation, a control instruction is sent to a target virtual BACnet device corresponding to the target device identifier according to the BACnet protocol data, so that the target virtual BACnet device performs a corresponding functional response, wherein the device control operation includes: writing a point attribute of the device.
[0071] Update the device data corresponding to each device ID as follows:
[0072] Receive second Bip2JSON protocol data sent by the private protocol agent, wherein the second Bip2JSON protocol data is a JSON text carrying a requesting device identifier and a second requested operation, obtained by converting the private protocol data of the virtual BACnet device by the private protocol agent;
[0073] According to a second request operation, device data of a virtual BACnet device corresponding to the requesting device identifier is updated, where the second request operation includes one of the following: adding a virtual BACnet device, deleting a virtual BACnet device, adding a point in a virtual BACnet device, updating a point in a virtual BACnet device, and deleting a point in a virtual BACnet device.
[0074] As shown in Figure 2, the B-BC module stands for BACnet-Building Controller. The B-BC module is the core module in this solution, carrying the BACnet server functionality after converting other proprietary protocols to BACnet. The B-BC module communicates with upper-layer applications and protocol proxies using the BIP2JSON protocol. It can also communicate directly with third-party BACnet devices or BACnet clients using the BACnet protocol.
[0075] The MQTT server transmits the BIP2JSON protocol data sent by the upper-layer application to the B-BC module. If the upper-layer application needs to communicate with the Bip2JSON protocol through MQTT, it must first connect to the MQTT server through the MQTT client and then interact with the data through a specific TOPIC.
[0076] Private protocol agents, such as the Modbus protocol agent, Zigbee protocol agent, and KNX protocol agent, are modules for developing various private protocols. They connect to various private protocol devices in the southbound direction, such as Modbus devices, Zigbee devices, and KNX devices; in the northbound direction, they convert protocol data into the Bip2JSON protocol and pass it to the B-BC module.
[0077] As shown in Figure 3, the protocol data processing process is as follows:
[0078] After the B-BC module is started, it starts to listen to data from the UDP port and the MQTT port. When the port obtains the relevant function commands of the Bip2JSON protocol, it responds accordingly according to the content requested by the command.
[0079] After the protocol agent is started, it begins querying data from southbound devices, adding devices and points to the B-BC via the Bip2JSON protocol, and continuously updating through polling. This allows the B-BC to store real-time, updated device data corresponding to various device identifiers, allowing it to respond normally to queries from BACnet clients and other applications.
[0080] Upper-layer applications can search, read, write, and subscribe to devices within B-BC through the Bip2JSON protocol.
[0081] Figure 4 shows a specific implementation method, which uses a computer with an embedded system as the hardware basis. The computer hardware also includes a Modbus module, a Zigbee network module, an Ethernet module, and a Wi-Fi module to access the private protocol, and has an Ethernet module or a Wi-Fi module as the data export of the Bip2JSON protocol.
[0082] The computer is installed with B-BC module, proxy services of various protocols and MQTT server as software support for protocol conversion.
[0083] If users need to view or control these devices in the building, they can query and modify the data through the web application (MQTT client + Bip2JSON protocol), as shown in Figure 5. At the same time, they can also connect to the cloud platform through the MQTT protocol to open up the path for data to the cloud.
[0084] In a feasible solution, hardware and software will no longer be confined to one computer. The protocol acquisition agent, B-BC, and MQTT server can be installed on different computers and connected through the network. Communication between them is carried out through MQTT and Bip2JSON protocols.
[0085] The building protocol data processing method provided by the embodiment of the present disclosure can achieve the following functions: searching for BACnet devices in the network, responding to search commands in the network, obtaining a list of device points, reading device point attributes, writing device point attributes, subscribing to device point changes, adding virtual BACnet devices, deleting virtual BACnet devices, adding points to BACnet devices, deleting points in BACnet devices, and updating points in BACnet devices. The Bip2JSON protocol in JSON format alleviates the problem in related technologies that the BACnet protocol is complex in structure, difficult to access, and protocol information can only be obtained through a BACnet client. The Bip2JSON protocol application layer APDU has good readability, low difficulty in secondary development, and can achieve what you see is what you get. The Bip2JSON protocol is well connected with Internet applications, and can directly operate the controller through web applications, which is suitable for the needs of modern applications.
[0086] Based on the above method embodiment, the disclosed embodiment further provides a building protocol data processing device, which is applied to a protocol construction controller, wherein the protocol construction controller is connected to at least one upper-layer application via an MQTT server, and the protocol construction controller is also connected to at least one BACnet device. Referring to FIG6 , the device includes: a protocol receiving module 62 for receiving first Bip2JSON protocol data sent by a target upper-layer application via an MQTT server, wherein the first Bip2JSON protocol data is a JSON-formatted text containing a first request operation, a requesting application identifier, a target device identifier, and first point information; a protocol conversion module 64 for converting the first Bip2JSON protocol data into BACnet protocol data; and a function response module 66 for performing a function response corresponding to the first request operation based on the BACnet protocol data.
[0087] In an embodiment of the present disclosure, the above-mentioned protocol conversion module 64 is used to determine the APDU application layer data based on the first request operation and the first point information in the first Bip2JSON protocol data; determine the NPDU network layer data and the BVLC virtual link control information based on the target device identifier and the network layer information corresponding to the target device identifier in the first Bip2JSON protocol data; and determine the BACnet protocol data based on the APDU application layer data, the NPDU network layer data and the BVLC virtual link control information.
[0088] In the embodiment of the present disclosure, the above-mentioned function response module 66 is used to: in response to the target device corresponding to the target device identifier being a third-party BACnet device, send BACnet protocol data to the third-party BACnet device, so that the third-party BACnet device performs a function response corresponding to the first request operation according to the BACnet protocol data; in response to the target device corresponding to the target device identifier being a virtual BACnet device corresponding to the private protocol agent, perform a function response corresponding to the first request operation according to the BACnet protocol data.
[0089] In an embodiment of the present disclosure, the above-mentioned protocol construction controller caches device data corresponding to multiple device identifiers; the function response module 66 is used to: respond to the first request operation in the BACnet protocol data as an information acquisition operation, search for target device data corresponding to the target device identifier from the device data corresponding to the multiple device identifiers, and respond based on the target device data, wherein the information acquisition operation includes one of the following: searching for BACnet devices in the network, obtaining a point list of the device, reading the point attributes of the device, and subscribing to the point changes of the device; respond to the first request operation in the BACnet protocol data as a device control operation, send a control instruction to the target virtual BACnet device corresponding to the target device identifier according to the BACnet protocol data, so that the target virtual BACnet device performs a corresponding functional response, wherein the device control operation includes: writing the point attributes of the device.
[0090] In an embodiment of the present disclosure, the above-mentioned device also includes: a data update module, which is used to execute the following device data update process corresponding to each device identifier: receiving second Bip2JSON protocol data sent by the private protocol agent, wherein the second Bip2JSON protocol data is a JSON text carrying a request device identifier and a second request operation obtained by the private protocol agent converting the private protocol data of the virtual BACnet device; according to the second request operation, updating the device data of the virtual BACnet device corresponding to the request device identifier, wherein the second request operation includes one of the following: adding a virtual BACnet device, deleting a virtual BACnet device, adding a point in the virtual BACnet device, updating a point in the virtual BACnet device, and deleting a point in the virtual BACnet device.
[0091] In the disclosed embodiment, the device data includes basic information and data information; the basic information includes a BACnet device identifier and BACnet point information; and the data information includes a point current value and a point status.
[0092] In the embodiment of the present disclosure, the above-mentioned private protocol agent includes at least one of the following: Modbus protocol agent, Zigbee protocol agent, and KNX protocol agent; and the virtual BACnet device includes at least one of the following: Modbus device, Zigbee device, KNX device.
[0093] In the embodiment of the present disclosure, the upper layer application includes one of the following: a third-party application, a Web application, a configuration application, and a protocol forwarding agent.
[0094] The device provided in the embodiment of the present disclosure has the same implementation principle and technical effects as those in the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the device, reference may be made to the corresponding content in the aforementioned method embodiment.
[0095] Based on the above method embodiments, the embodiments of the present disclosure also provide a building protocol data processing system, as shown in Figure 7, the system includes: a protocol construction controller 72, an MQTT server 74 and at least one BACnet device 76; the protocol construction controller 72 is connected to the upper-layer application 78 through the MQTT server 74; the protocol construction controller 72 is also connected to at least one BACnet device 76; and the protocol construction controller 72 is used to execute the building protocol data processing method as described in any embodiment of the first aspect. The specific implementation can be referred to the above method embodiments, which will not be repeated here.
[0096] The system provided by the embodiment of the present disclosure has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the system, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0097] Based on the above method embodiments, the embodiments of the present disclosure further provide a computer-readable storage medium, which stores computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the building protocol data processing method as described in any embodiment of the first aspect. The specific implementation can be found in the above method embodiments and will not be repeated here.
[0098] The computer-readable storage medium provided in the embodiment of the present disclosure has the same implementation principle and technical effects as those of the aforementioned method embodiment. For the sake of brief description, for matters not mentioned in the embodiment of the computer-readable storage medium, reference may be made to the corresponding contents in the aforementioned method embodiment.
[0099] Based on the above method embodiments, the embodiments of the present disclosure further provide a computer program product, including a computer program. When the computer program is executed by a processor, it implements the building protocol data processing method described in any embodiment of the above first aspect. For specific implementation, please refer to the above method embodiments and will not be repeated here.
[0100] The computer program product provided by the embodiments of the present disclosure has the same implementation principle and technical effects as those of the aforementioned method embodiments. For the sake of brief description, for matters not mentioned in the embodiments of the computer program product, reference may be made to the corresponding contents in the aforementioned method embodiments.
[0101] Based on the above method embodiments, the embodiments of the present disclosure further provide a computer program, including computer program code. When the computer program code is run on a computer, the computer executes the building protocol data processing method described in any embodiment of the above first aspect. For specific implementation, please refer to the above method embodiments and will not be repeated here.
[0102] The computer program provided in the embodiments of the present disclosure has the same implementation principles and technical effects as those of the aforementioned method embodiments. For the sake of brief description, for matters not mentioned in the embodiment of the computer program, reference may be made to the corresponding contents in the aforementioned method embodiments.
[0103] Unless otherwise specifically stated, the relative steps, numerical expressions and numerical values of the components and steps set forth in these embodiments do not limit the scope of the present disclosure.
[0104] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0105] In the description of this disclosure, it should be noted that terms such as "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" indicate positions or locations based on those shown in the accompanying drawings. These terms are intended solely to facilitate and simplify the description of this disclosure and are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limitations on this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0106] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.
Claims
1. A building protocol data processing method, the method is applied to a protocol construction controller, wherein the protocol construction controller is connected to at least one upper layer application through an MQTT server, the protocol construction controller is also connected to at least one BACnet device, and the method comprises: Receiving first Bip2JSON protocol data sent by the target upper layer application through the MQTT server, wherein the first Bip2JSON protocol data is a JSON format text carrying a first request operation, a request application identifier, a target device identifier, and first point information; Convert the first Bip2JSON protocol data into BACnet protocol data; and A functional response corresponding to the first request operation is performed based on the BACnet protocol data.
2. The method according to claim 1, wherein: Converting the first Bip2JSON protocol data into BACnet protocol data includes: Determine APDU application layer data according to the first request operation and the first point information in the first Bip2JSON protocol data; Determine NPDU network layer data and BVLC virtual link control information according to the target device identifier in the first Bip2JSON protocol data and the network layer information corresponding to the target device identifier; and The BACnet protocol data is determined based on the APDU application layer data, the NPDU network layer data and the BVLC virtual link control information.
3. The method according to claim 1 or 2, wherein: Performing a functional response corresponding to the first request operation based on the BACnet protocol data includes: In response to the target device corresponding to the target device identifier being a third-party BACnet device, sending the BACnet protocol data to the third-party BACnet device, so that the third-party BACnet device performs a functional response corresponding to the first request operation according to the BACnet protocol data; In response to the target device corresponding to the target device identifier being a virtual BACnet device corresponding to a private protocol agent, a functional response corresponding to the first request operation is performed according to the BACnet protocol data.
4. The method according to claim 3, wherein: The protocol construction controller caches device data corresponding to a plurality of device identifiers, and performs a functional response corresponding to the first request operation according to the BACnet protocol data, including: In response to the first request operation in the BACnet protocol data being an information acquisition operation, searching for target device data corresponding to the target device identifier in the device data corresponding to the target device identifier, and responding based on the target device data, wherein the information acquisition operation includes one of the following: searching for bacnet devices in the network, acquiring a device point list, reading a device point attribute, and subscribing to a device point change; In response to the first request operation in the BACnet protocol data being a device control operation, a control instruction is sent to a target virtual BACnet device corresponding to the target device identifier according to the BACnet protocol data, so that the target virtual BACnet device performs a corresponding functional response, wherein the device control operation includes: writing a point attribute of the device.
5. The method according to claim 4, wherein: Update the device data corresponding to each device ID as follows: Receiving second Bip2JSON protocol data sent by the private protocol agent, wherein the second Bip2JSON protocol data is a JSON text carrying a request device identifier and a second request operation obtained by the private protocol agent converting the private protocol data of the virtual BACnet device; The device data of the virtual BACnet device corresponding to the request device identifier is updated according to the second request operation, wherein the second request operation includes one of the following: adding a virtual BACnet device, deleting a virtual BACnet device, adding a point in a virtual BACnet device, updating a point in a virtual BACnet device, and deleting a point in a virtual BACnet device.
6. The method according to claim 4 or 5, wherein: The device data includes: basic information and data information; the basic information includes: BACnet device identification and BACnet point information; and the data information includes: point current value and point status.
7. The method according to any one of claims 3 to 6, wherein: The private protocol agent includes at least one of the following: a Modbus protocol agent, a Zigbee protocol agent, and a KNX protocol agent; and the virtual BACnet device includes at least one of the following: a Modbus device, a Zigbee device, and a KNX device.
8. The method according to any one of claims 1 to 7, wherein: The upper layer application includes at least one of the following: a third-party application, a Web application, a configuration application, and a protocol forwarding agent.
9. A building protocol data processing device, the device is applied to a protocol construction controller, wherein the protocol construction controller is connected to at least one upper layer application through an MQTT server, the protocol construction controller is also connected to at least one BACnet device, and the device comprises: A protocol receiving module, configured to receive first Bip2JSON protocol data sent by a target upper layer application through the MQTT server, wherein the first Bip2JSON protocol data is a JSON format text carrying a first request operation, a request application identifier, a target device identifier, and first point information; A protocol conversion module, used for converting the first Bip2JSON protocol data into BACnet protocol data; and A function response module is used to perform a function response corresponding to the first request operation based on the BACnet protocol data.
10. A building protocol data processing system, comprising: A protocol construction controller, an MQTT server and at least one BACnet device, wherein the protocol construction controller is connected to at least one upper-layer application through the MQTT server, the protocol construction controller is also connected to at least one BACnet device, and the protocol construction controller is used to execute the building protocol data processing method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the building protocol data processing method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, wherein the computer program implements the building protocol data processing method according to any one of claims 1 to 8 when executed by a processor.
13. A computer program, comprising computer program codes, wherein when the computer program codes are run on a computer, the computer is enabled to execute the building protocol data processing method according to any one of claims 1 to 8.
Citation Information
Patent Citations
KNX-BACnet / IP protocol conversion gateway based on Cortex-M processor
CN105607527A
Protocol configuration method, protocol conversion method and building control system
CN115314565A
Data processing method, device and equipment of intelligent building system and storage medium
CN115514827A
Building protocol data processing method, device and system
CN116320059A
BACnet protocol converting system applied to intelligent building control system
CN204272170U
