Data transmission method and device for building control system
By using XML data in the building control system for data mapping and transmission between the server and IOM, the complex data transmission and protocol conversion problems in the prior art are solved, and data exchange is simplified and efficiency improvement is achieved.
Patent Information
- Application Number
- CN202411970012.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-08
AI Technical Summary
In the existing building control system, the data transmission between the server and the IOM is complex and requires multiple protocols to be converted. It is difficult for traditional protocols to adapt to the flexible and changeable needs of data types.
By constructing structured XML data, the server maps device ID and state parameter control information into IO port ID and control operations, and sends it to the IOM for parsing and execution, using XML as a standard format for information exchange to reduce data parsing and conversion requirements.
The data exchange mechanism between the server and the IOM is simplified, the efficiency of data management and communication speed are improved, and the flexible and changeable data transmission needs are adapted to.
Smart Images

Figure CN119788711A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method and device for a building control system. Background Art
[0002] With the continuous evolution of building automation technology, modern building systems are becoming increasingly complex. Modern building systems include many subsystems that integrate advanced intelligent devices, such as refined lighting management, environmentally adaptive air conditioning control systems, comprehensive security monitoring networks, and efficient fire alarm mechanisms. Although these subsystems have greatly improved the level of intelligence in buildings, they have also brought challenges to data integration and management. In particular, each subsystem is often provided by a different supplier and has a unique communication protocol and data model, which to a certain extent increases the complexity of system integration and maintenance.
[0003] In traditional building control systems, specific direct digital controllers (DDC) and input / output modules (IOM) serve as bridges between intelligent devices and upper-level control systems, responsible for collecting, processing and transmitting data from intelligent devices in different subsystems. Traditional DDC and IOM usually use relatively independent data formats and transmission methods. For example, one communication mode is: the server in the building control system sends the IOM data to be sent to DDC through the TCP / IP protocol, and DDC parses the TCP / IP data packet to extract the data, encapsulates it into Modbus PDU data through the Modbus protocol, and then sends it to IOM through the Modbus protocol. This communication mode shows that the data is sent from the server in the building control system to the IOM, and the protocol conversion needs to be performed through DDC. At least two protocols (TCP / IP and Modbus protocols) are required to realize data transmission. On the other hand, in actual applications, multiple IOMs will be connected under one DDC. When each IOM comes from a different manufacturer and supports different protocol standards (such as Modbus or Bacnet), the realization of such communication will become more complicated, and it will take a lot of time and resources to develop solutions. For example, a large amount of custom code needs to be written to realize data exchange and configuration between different protocols. In addition, with the gradual development of building intelligence, the types of data required to be transmitted are constantly improving, and the data format encapsulation of traditional protocols is also difficult to adapt to the flexible and changeable new requirements of these data.
[0004] Therefore, how to provide a transmission solution that can be applied to a variety of different devices, simplify the data transmission method between the server and IOM in the building control system, and make the type of transmitted data more flexible is a technical problem to be solved. Summary of the invention
[0005] In view of the above problems in the prior art, the present application provides a data transmission method and apparatus, a computing device and a storage medium for a building control system to simplify the data transmission between the server and the IOM in the building control system and use flexible and changeable data transmission requirements.
[0006] To achieve the above-mentioned object, the first aspect of the present application provides a data transmission method of a building control system, which is applied to a server in the building control system, comprising:
[0007] Acquire a device ID of a controlled device connected to an IOM in a building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data;
[0008] Based on the device ID of the controlled device, the mapping table is searched, the device ID and the state parameter control information of the controlled device are mapped to the IO port ID and the control operation connected to the controlled device in the IOM, and the IO port ID and the control operation are recorded in the second XML data;
[0009] The second XML data is sent to the IOM, so that the IOM parses the second XML data, obtains the IO port ID and the control operation, and outputs the control operation to the connected controlled device through the IO port.
[0010] From the above, the present application constructs a structured first XML data through the server in the building control system, and sends the second XML data to the IOM. In this way, the XML extensible markup language is used as the standard format for information exchange between the server and the IOM in the building control system, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and the IOM in the building control system, and simplifies data management and improves efficiency. In addition, the present application maps the device ID of the controlled device and the state parameter control information of the controlled device into the IO port ID and control operation connected to the controlled device in the IOM, further reducing the demand for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0011] As a possible implementation of the first aspect, the following also includes:
[0012] Receive and parse the third XML data sent by the IOM, wherein the third XML data records the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by the IOM through the IO port;
[0013] The mapping table is searched based on the IO port ID, and the IO port ID and the current state data of the controlled device are mapped into the device ID and state parameter information of the controlled device.
[0014] From the above, when the IOM uploads data to the server in the building control system, the third XML data is uploaded. The application uses XML extensible markup language as the standard format for information exchange, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and IOM in the building control system, and simplifies data management and improves efficiency. In addition, the application maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device, further reducing the need for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0015] As a possible implementation of the first aspect, at least one of the following is also included:
[0016] Parsing the first XML data, and displaying the device ID and the state parameter control information of the controlled device in a user-recognizable manner through a UI interface;
[0017] Parsing the first XML data, and displaying the device ID and the state parameter control information of the controlled device in a user-recognizable manner through a UI interface, and updating the first XML data in response to a user modifying the displayed content through the UI interface;
[0018] The device ID and status parameter information of the controlled device are displayed in a user-recognizable manner through the UI interface.
[0019] From the above, the present application can also display information to users through the UI interface of the server in the building control system, so that users can modify the displayed content through the UI interface.
[0020] To achieve the above-mentioned purpose, the second aspect of the present application provides a data transmission method for a building control system, which is applied to an IOM, comprising:
[0021] Receive second XML data sent by a server in a building control system, wherein the second XML data records an IO port ID and a control operation connected to the controlled device in the IOM; wherein the IO port ID and the control operation connected to the controlled device in the IOM are obtained by the server in the building control system acquiring a device ID of a controlled device connected to an IOM in the building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data, and a mapping table is searched based on the device ID of the controlled device to map the device ID of the controlled device and the state parameter control information;
[0022] Parsing the second XML data to obtain the IO port ID and control operation of the controlled device connected in the IOM;
[0023] The control operation is output to the connected controlled device through the IO port.
[0024] From the above, the present application constructs a structured first XML data through the server in the building control system, and sends the second XML data to the IOM. In this way, the XML extensible markup language is used as the standard format for information exchange between the server and the IOM in the building control system, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and the IOM in the building control system, and simplifies data management and improves efficiency. In addition, the present application maps the device ID of the controlled device and the state parameter control information of the controlled device into the IO port ID and control operation connected to the controlled device in the IOM, further reducing the demand for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0025] As a possible implementation of the second aspect, the following also includes:
[0026] Obtain the current status data of the controlled device through the IO port of the IOM;
[0027] Constructing third XML data, wherein the third XML data records the IO port ID of the corresponding controlled device and the current state data of the controlled device obtained by the IOM through the IO port;
[0028] The third XML data is sent to the server in the building control system. The server in the building control system receives and parses the third XML data, searches the mapping table based on the IO port ID, and maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device.
[0029] From the above, when the IOM uploads data to the server in the building control system, the third XML data is uploaded. The application uses XML extensible markup language as the standard format for information exchange, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and IOM in the building control system, and simplifies data management and improves efficiency. In addition, the application maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device, further reducing the need for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0030] As a possible implementation of the second aspect, outputting a control operation to a connected controlled device through the IO port includes:
[0031] Encapsulating the IO port ID and control operation connected in the IOM using a protocol supported by the IOM to obtain first encapsulated data;
[0032] The first encapsulated data is parsed using the protocol to obtain the IO port ID and control operation connected in the IOM, and the control operation is output to the connected controlled device through the IO port.
[0033] From the above, the present application is processed by the IOM by converting into the data format defined by the protocol supported by the IOM, which can be compatible with the protocol supported by the original IOM, thereby improving the compatibility and interoperability of the present method.
[0034] As a possible implementation of the second aspect, the following also includes:
[0035] Obtain the current status data of the controlled device through the IO port of the IOM;
[0036] Encapsulating the IO port ID and the current state data of the controlled device obtained by the IOM through the IO port in a protocol supported by the IOM to obtain second encapsulated data;
[0037] Parsing the second encapsulated data using the protocol to obtain the IO port ID and the current status data of the controlled device obtained by the IOM through the IO port;
[0038] Constructing third XML data, wherein the third XML data records the IO port ID of the corresponding controlled device and the current state data of the controlled device obtained by the IOM through the IO port;
[0039] The third XML data is sent to the server in the building control system. The server in the building control system receives and parses the third XML data, searches the mapping table based on the IO port ID, and maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device.
[0040] From the above, this method combines the process of constructing the third XML data of this application with the protocol originally supported by IOM, which is beneficial for IOM to use the format defined by the original protocol (such as Modbus PDU format) to obtain the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by IOM through the IO port, and then parse the data in the format defined by the original protocol (such as Modbus PDU), obtain the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by IOM through the IO port to construct the third XML data. This method is beneficial for IOM's original protocol to obtain the data of the controlled device, which greatly improves the compatibility and interoperability of the system.
[0041] As a possible implementation manner of the second aspect, constructing the third XML data includes:
[0042] An XML data template is obtained, and the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by the IOM through the IO port are filled into the corresponding position to generate the third XML data.
[0043] From the above, in this application, the XML data uploaded by the IOM to the server in the building control system can be generated by filling in the corresponding position of an XML data template, so that XML format data can be quickly constructed.
[0044] To achieve the above-mentioned purpose, the third aspect of the present application provides a data transmission device for a building control system, which is applied to a server in the building control system, including:
[0045] An acquisition module, used for acquiring a device ID of a controlled device connected to an IOM in a building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data;
[0046] A mapping module, configured to search a mapping table based on the device ID of the controlled device, map the device ID and the state parameter control information of the controlled device to the IO port ID and the control operation connected to the controlled device in the IOM, and record the IO port ID and the control operation into the second XML data;
[0047] The data sending module is used to send the second XML data to the IOM, so that the IOM parses the second XML data, obtains the IO port ID and the control operation, and outputs the control operation to the connected controlled device through the IO port.
[0048] To achieve the above-mentioned purpose, the fourth aspect of the present application provides a data transmission device for a building control system, which is applied to an IOM, and includes:
[0049] A receiving module, configured to receive second XML data sent by a server in a building control system, wherein the second XML data records an IO port ID and a control operation connected to the controlled device in the IOM; wherein the IO port ID and the control operation connected to the controlled device in the IOM are obtained by the server in the building control system acquiring a device ID of a controlled device connected to an IOM in the building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data, and a mapping table is searched based on the device ID of the controlled device to map the device ID of the controlled device and the state parameter control information;
[0050] A parsing module, used for parsing the second XML data to obtain the IO port ID and control operation of the controlled device connected in the IOM;
[0051] The output module is used to output the control operation to the connected controlled device through the IO port.
[0052] A fifth aspect of the present application provides a computing device, including:
[0053] processor, and
[0054] A memory having program instructions stored thereon, wherein when the program instructions are executed by the processor, the processor executes any of the methods described in the first aspect above.
[0055] In a sixth aspect, the present application provides a computer-readable storage medium having program instructions stored thereon, wherein when the program instructions are executed by a computer, the computer implements any of the methods described in the first aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A schematic diagram of a data transmission method for a building control system (downlink-sending perspective of a server in a building control system) provided in an embodiment of the present application Figure 1 ;
[0057] Figure 2 A schematic diagram of an XML data template provided in an embodiment of the present application;
[0058] Figure 3 A schematic diagram of a data transmission method for a building control system (server uplink-receiving angle in a building control system) provided in an embodiment of the present application Figure 2 ;
[0059] Figure 4 A schematic diagram of a device ID of a controlled device and state parameter control information of the controlled device displayed on a server in a building control system provided in an embodiment of the present application;
[0060] Figure 5 A schematic diagram of a data transmission method for a building control system provided in an embodiment of the present application (IOM receiving server downlink in a building control system - sending data perspective) Figure 1 ;
[0061] Figure 6 A schematic diagram of a data transmission method (IOM data uplink perspective) for a building control system provided in an embodiment of the present application Figure 2 ;
[0062] Figure 7 A flow chart of a data transmission method (IOM perspective) for a building control system provided in an embodiment of the present application Figure 3 ;
[0063] Figure 8 A schematic diagram of a data transmission method (IOM data uplink perspective) for a building control system provided in an embodiment of the present application Figure 4 ;
[0064] Fig. 9 It is a structural schematic diagram of a data transmission device (a server in a building control system) of a building control system provided in an embodiment of the present application;
[0065] Fig.10 It is a structural schematic diagram of a data transmission device (IOM) of a building control system provided in an embodiment of the present application;
[0066] Fig.11 It is a structural schematic diagram of a computing device provided in an embodiment of the present application.
[0067] It should be understood that the size and shape of each block diagram in the above structural diagram are for reference only and should not be encapsulated as an exclusive interpretation of the embodiment of the present invention. The relative positions and inclusion relationships between the blocks presented in the structural diagram are only schematic representations of the structural associations between the blocks, and do not limit the physical connection method of the embodiment of the present invention. DETAILED DESCRIPTION
[0068] The technical solution provided by the present application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of the present application are mainly to illustrate the possible implementation methods of the technical solution of the present application and should not be interpreted as the only limitation on the technical solution of the present application. It is known to those of ordinary skill in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.
[0069] It should be understood that the data transmission scheme of the building control system provided in the embodiments of the present application includes a data transmission method and device of the building control system. Since the principles of solving the problems in these technical solutions are the same or similar, some repetitive parts may not be repeated in the introduction of the following specific embodiments, but it should be regarded as that these specific embodiments have been referenced to each other and can be combined with each other.
[0070] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of this application. In the event of any inconsistency, the meaning described in this specification or the meaning derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application. In order to accurately describe the technical content in this application and to accurately understand the present invention, the following explanations or definitions are given to the terms used in this specification before describing the specific embodiments:
[0071] 1) Direct Digital Controller (DDC): Able to receive input signals from sensors, process data, and control actuators (such as valves, fans, etc.) according to preset programs or algorithms. DDC is usually used to implement complex control logic, such as temperature regulation, humidity control, etc.
[0072] 2) Input / Output Module (IOM): Responsible for collecting the status information of field devices (i.e. the controlled devices connected to the IOM) and sending instructions to the actuator. The IOM is the interface between the DDC and the actual physical world. It converts physical signals into digital signals for DDC processing, and also converts the control commands issued by the DDC into appropriate physical signals to drive external devices. A DDC may require multiple IOMs to expand its input and output capabilities to meet the needs of systems of different sizes. The DDC and IOM communicate through protocols such as Modbus or Bacnet.
[0073] In the present application, the building control system used includes a server in the building control system, and the server in the building control system is used to issue instructions to the IOM, and display the information of the device uploaded by the IOM, etc. The IOM is connected to the controlled device, and issues instructions or collects data for uploading. Among them, it can also include DDC. In the present application, DDC mainly serves as the transfer and transparent transmission of information between the server in the building control system and the IOM. Among them, transfer refers to determining the target IOM and forwarding the data to the target IOM. Transparent transmission means that the XML data itself does not undergo protocol conversion, and the XML data is sent to the IOM as data in the protocol packet. For example, when the server in the building control system transmits XML data to the IOM, when the TCP / IP protocol is used for transmission between the server in the building control system and the DDC, the XML data is packaged and transmitted. After the DDC parses the TCP / IP data packet, it sends the encapsulated XML data to the IOM without converting the XML to the protocol according to the format supported by the IOM and then sending it to the IOM. Since the DDC is only used as the transfer or transparent transmission of information, in the subsequent embodiments, if there is no special explanation, the transfer or transparent transmission of the DDC will not be described for simplicity of description.
[0074] [First embodiment of the data transmission method of the building control system]
[0075] The first embodiment of the present application provides a data transmission method for a building control system, which is applied to a server in a building control system, such as Figure 1 As shown, including:
[0076] S110: Acquire a device ID of a controlled device connected to an IOM in a building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data;
[0077] S120: searching a mapping table based on the device ID of the controlled device, mapping the device ID and state parameter control information of the controlled device to the IO port ID and control operation connected to the controlled device in the IOM, and recording the IO port ID and control operation into the second XML data;
[0078] S130: Send the second XML data to the IOM, so that the IOM parses the second XML data, obtains the IO port ID and the control operation, and outputs the control operation to the connected controlled device through the IO port.
[0079] This application constructs a structured first XML data through the server in the building control system, and sends the second XML data to the IOM. In this way, the XML extensible markup language is used as the standard format for information exchange between the server and the IOM in the building control system, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and the IOM in the building control system, and simplifies data management and improves efficiency. In addition, this application maps the device ID of the controlled device and the state parameter control information of the controlled device to the IO port ID and control operation connected to the controlled device in the IOM, further reducing the demand for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0080] In some embodiments, before implementing the method, a set of standardized XML data templates is first designed according to the requirements of the building automation system. The specific construction process of the standardized XML data template is as follows:
[0081] First, conduct a demand analysis of the building automation system to determine the various types of equipment involved in the automation system. For example, in a building automation system, it may include lighting equipment, air conditioning equipment, security monitoring equipment, etc.
[0082] Secondly, for each type of equipment, determine the required points, including the equipment point information (i.e. location identification information and / or equipment identification information, which can be understood as being used to identify the equipment), data type, read / write attributes, parameter information, etc. Taking lighting equipment as an example, it may include equipment number, brightness level, switch status, etc.; air conditioning equipment may have equipment number, current temperature, set temperature, operating mode, etc.
[0083] Finally, according to the device's point information, data type, read / write attributes, parameter information, etc., the structure of the XML data template is designed to specify the data type, structure, and naming conventions of each element. For example, tags can be used to represent different device types and parameters, such as <lightingdevice>Indicates lighting equipment. <brightnesslevel>Indicates the brightness level, <switchstate>Indicates status information, etc. Figure 2 A specific XML data template is given.
[0084] Different XML data templates can be set for the entire building automation system. One type of device or function corresponds to one XML data template, for example, a lighting control device corresponds to an XML data template for lighting control devices, an air conditioning control device corresponds to an XML data template for air conditioning control devices, and a security monitoring device corresponds to an XML data template for security monitoring devices. The XML data template corresponding to each device independently defines the specific parameters and status information of the device or function. The XML data templates corresponding to each device can use the same naming convention and data format, so that the structural consistency between the XML data templates corresponding to each device can be maintained, which is convenient for the overall management and expansion of the building automation system.
[0085] The standardized XML data template constructed in this way is a clear and standardized data structure, which provides a unified data description framework for the automation system, so that data from different devices can be managed and processed in a unified manner, avoiding data confusion and incompatibility, making it easier for developers to quickly understand and process data from various devices and improve development efficiency.
[0086] In subsequent use, the server in the building control system automatically parses and generates the required points in the software program by importing the XML data template of a certain device. By importing the XML data template file in this way, a large number of intelligent devices in the building automation system can be quickly deployed and configured, improving the efficiency of project implementation and ensuring compatibility with actual equipment.
[0087] Based on this, in S110, the first XML data can be constructed according to the XML data template provided above, in which the device ID of the controlled device connected to an IOM and the state parameter control information of the controlled device are recorded. The state parameter control information of the controlled device may include a control instruction, such as controlling the opening and closing of the fan switch of the air conditioner; the state parameter control information of the controlled device may include a control instruction and an instruction value (if necessary), such as controlling the fan of the air conditioner to be turned on for 10 minutes.
[0088] The device ID of the controlled device connected to an IOM and the state parameter control information of the controlled device are represented by tags in the first XML data. For example, if the device ID of the controlled device connected to an IOM is a lighting device ID, and the state parameter control information of the controlled device may be to adjust the brightness level of the lighting device, then the device ID of the controlled device connected to an IOM is identified as<LightingDevice ID> Lighting equipment ID, the state parameter control information of the controlled equipment is identified as <brightnesslevel>Brightness level and brightness level value.
[0089] The device ID of a controlled device connected to an IOM and the state parameter control information of the controlled device are recorded in a natural language format that is easy for humans to recognize.
[0090] In some embodiments, the method for obtaining the first XML data recording the device ID of the controlled device and the status parameter control information of the controlled device in S110 can be to obtain it by scanning a specified directory or network location, or by the user actively uploading it to the server in the building control system.
[0091] In some embodiments, after acquiring the first XML data, S110 parses and obtains the device ID of the controlled device and the state parameter control information of the controlled device, and the parsing is implemented by an XML parser. The XML parser can be an existing mature XML parsing library, or a custom XML parser developed by the present application, so that it can read the XML data template from the XML file path input by the user, and parse out the required device point information, data type, read-write attributes, parameter information, etc. This improves the efficiency and accuracy of data reading and parsing, ensures that the building automation system can quickly obtain the required device configuration information, and provides a reliable data basis for subsequent control and monitoring.
[0092] In some embodiments, the flexible extensibility based on XML can support the rapid access of new devices and the smooth upgrade of existing systems. When a new device type or function needs to be added, it is only necessary to define a new XML data template and the corresponding driver on the IOM side to implement the parsing of the defined XML data, which will not affect the existing XML data template, thereby reducing the complexity of maintenance.
[0093] In addition, during the configuration process, you can use XML data templates for quick configuration, which has the following advantages:
[0094] Unified data format: XML data template provides a standardized data format to ensure data consistency and interoperability of different devices in the building automation system.
[0095] Flexibility and scalability: XML data templates can be customized and expanded according to actual needs, making it easy to add new point types and parameters.
[0096] Automated processing: Use programming and automation tools to read and parse XML data templates to achieve automatic generation and configuration of points and improve work efficiency.
[0097] Easy to manage and maintain: XML data templates can be centrally stored and managed, facilitating version control and updates, reducing errors and duplication of work.
[0098] In some embodiments, in S120, each IO port has a unique port ID, which can be identified by an address associated with it, which is usually a register address. By reading and writing these register addresses, the corresponding IO port can be indirectly operated to control the connected external device. The control operation may include a function code to indicate the specific type of operation to be performed, such as reading a register, writing a register, or other specific types of commands. That is, the IO port ID and control operation of the controlled device connected in the IOM can be in the format described in the Modbus PDU. For example, the IO port ID of the controlled device connected in the IOM can be a register address of a lighting device that can write a brightness level, and the control operation can be a function code represented by writing the brightness level into the register. In short, by sending instructions to the specified register address, operations on the corresponding IO port and its connected devices can be implemented.
[0099] In some embodiments, the mapping table in S120 is designed and stored in a server in the building control system, and the mapping table includes a mapping relationship between the device ID of the controlled device and the IO port ID to which the controlled device is connected in the IOM, and also includes a mapping relationship between the state parameter control information of the controlled device and the control operation of the IO port. For example, the mapping table stores a mapping relationship between the lighting device ID and a digital output port (such as a register address) specified by the IOM port ID, and stores a mapping relationship between a brightness level adjustment parameter and a function code indicating a write register and a binary or hexadecimal parameter indicating a brightness level.
[0100] In some embodiments, when executing S110 and S120, syntax checking and structure verification can also be performed during the parsing of the XML file. For example, check the correctness of the XML tags, the integrity of the attributes, etc. When an XML file format error is found, a detailed error message is generated, including the location and cause of the error. An error code or text description can be used to indicate the error type. Mapping relationship conflict detection and resolution can also be performed. For example, if two device IDs are mapped to the same physical IO port, a warning is issued and the user is prompted to make adjustments. The present application provides a complete error handling mechanism to ensure that clear error prompts are given when the XML file format is erroneous or the mapping relationship conflicts. This improves the stability and reliability of the system, helps users to promptly discover and solve problems, and reduces system failures and performance degradation caused by incorrect configurations.
[0101] In some embodiments, Figure 3 As shown, it also includes:
[0102] S310: receiving and parsing third XML data sent by the IOM, wherein the third XML data records the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by the IOM through the IO port;
[0103] S320: searching a mapping table based on the IO port ID, mapping the IO port ID and current status data of the controlled device to the device ID and status parameter information of the controlled device.
[0104] Among them, the IOM can also feedback data to the server in the building control system, and the feedback data is also data in XML format, so that the data returned to the server in the building control system can be directly recognized. The feedback data can be the current status data of the controlled device obtained by the IOM through an IO port and the ID of the IO port. The IO port ID of the controlled device and the current status data of the controlled device obtained by the IOM through the IO port are in a format that the IOM can recognize, such as the format in ModbusPDU, that is, the IO port ID of the controlled device is the register address, and the current status data of the controlled device can be the function code and current status data value of the register to read. Then, after receiving the third XML data, the server in the building control system needs to perform reverse mapping. It can search the mapping table based on the IO port ID, and map the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device, so that the server in the building control system can recognize it.
[0105] From the above, when the IOM uploads data to the server in the building control system, the third XML data is uploaded. The application uses XML extensible markup language as the standard format for information exchange, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and IOM in the building control system, and simplifies data management and improves efficiency. In addition, the application maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device, further reducing the need for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0106] In some embodiments, at least one of the following is also included:
[0107] Parsing the first XML data, and displaying the device ID and the state parameter control information of the controlled device in a user-recognizable manner through a UI interface;
[0108] Parsing the first XML data, and displaying the device ID and the state parameter control information of the controlled device in a user-recognizable manner through a UI interface, and updating the first XML data in response to a user modifying the displayed content through the UI interface;
[0109] The device ID and status parameter information of the controlled device are displayed in a user-recognizable manner through the UI interface.
[0110] Among them, the present application can develop a user-friendly graphical interface on the server in the building control system to display the overall operation status of the building automation system, including equipment status, parameter settings, alarm information, etc., and can use charts, animations, etc. to display equipment data in an intuitive form to achieve data visualization, so that users can quickly understand the system status.
[0111] In addition, the XML data template is easy to understand and edit. After the server in the building control system imports the XML data template with one click and displays it, the user is allowed to modify the content displayed by the XML data template through the UI interface using a text editor or a special XML editing tool, thereby updating the first XML data in response to the modification, such as Figure 4 As shown, the upper box represents the device ID of the controlled device, and the dotted box below represents the state parameter control information of the controlled device, wherein the content in the dotted box on the left is the corresponding control instruction, which is preset and cannot be modified in advance, and the content in the dotted box on the right is the control instruction value, which can be modified, so there is no need to modify the program code. This gives users greater autonomy, enabling them to remotely control the controlled devices through the server in the building control system according to actual needs, and quickly adjust the building automation system configuration, for example, by sending control instructions to the corresponding equipment, adjusting device parameters or starting / stopping device operation. Without relying on developers to modify the code, the adaptability and ease of use of the building automation system are improved, and the maintenance cost of the building automation system is reduced. That is, this application can support remote access and control functions, and users can remotely view the system status, modify configuration parameters or perform fault diagnosis through the network to achieve remote monitoring.
[0112] In addition, the application can also encrypt the transmitted data (i.e., the data transmitted from the server in the building control system to the IOM and the data uploaded from the IOM to the server in the building control system) to ensure the security of the data during transmission. At the same time, a strict permission management mechanism is implemented to ensure that only authorized users can access and control the system.
[0113] In addition, the operating status and parameter changes of each device in the building are monitored in real time, and key information is recorded and displayed to users in XML format. At the same time, according to the preset alarm rules and thresholds, the alarm mechanism is automatically triggered, and alarm information is sent to relevant personnel through XML data.
[0114] [Second embodiment of the data transmission method of the building control system]
[0115] This application proposes a data transmission method for a building control system, which is applied to IOM, such as Figure 5 As shown, including:
[0116] S510: receiving second XML data sent by a server in a building control system, wherein the second XML data records the IO port ID and control operation of the controlled device connected in the IOM; wherein the IO port ID and control operation of the controlled device connected in the IOM are obtained by the server in the building control system acquiring the device ID of a controlled device connected to an IOM in the building control system and the state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data, and the mapping table is searched based on the device ID of the controlled device to map the device ID of the controlled device and the state parameter control information;
[0117] S520: Parse the second XML data to obtain the IO port ID and control operation of the controlled device connected in the IOM;
[0118] S530: Outputting the control operation to the connected controlled device through the IO port.
[0119] In some embodiments, the present application selects or designs a hardware interface card (i.e., in the IOM) that supports multiple communication protocols according to the hardware architecture and equipment requirements of the building automation system, ensuring that the hardware interface card can support multiple communication protocols, such as Modbus, Bacnet, etc., so as to connect and communicate with different types of devices. This improves the compatibility and versatility of the building automation system, can adapt to the communication requirements of different devices, reduces the complexity and cost of hardware equipment, and improves the integration and reliability of the building automation system.
[0120] In addition, a corresponding driver has been developed for IOM to enable it to parse XML data and generate XML-compliant data. In other words, the interface driver needs to be able to read the instruction information of the XML parser from the server in the building control system, which is written in a specific XML format. The interface driver can correctly parse the XML document and extract the necessary information so that the IOM can execute the command. Conversely, when the IOM needs to send status updates or other information to the server in the building control system, the interface driver should be able to organize this information according to the predefined XML data template to form a structured XML document to send to the server in the building control system. Among them, the interface driver can read the current status of the device using timed polling or interrupt triggering. This achieves efficient collaboration between software and hardware, ensuring that the building control system can accurately control the device and obtain device status information. It improves the stability and reliability of the system and reduces the difficulty of developing and maintaining the building control system.
[0121] Based on this, after receiving the second XML data sent by the server in the building control system, the IOM can parse and obtain the IO port ID and control operation of the controlled device connected in the IOM, wherein the IO port ID of the controlled device connected in the IOM can be the register address corresponding to the port (for example, a register address of a lighting device that can write the brightness level), and the control operation can be a function code (for example, a function code represented by writing the brightness level into the register), so that the IOM can directly output the control operation to the connected controlled device through the IO port (for example, writing the brightness level of the lighting device into the register, thereby controlling the lighting device to become brighter or darker).
[0122] From the above, the present application constructs a structured first XML data through the server in the building control system, and sends the second XML data to the IOM. In this way, the XML extensible markup language is used as the standard format for information exchange between the server and the IOM in the building control system, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and the IOM in the building control system, and simplifies data management and improves efficiency. In addition, the present application maps the device ID of the controlled device and the state parameter control information of the controlled device into the IO port ID and control operation connected to the controlled device in the IOM, further reducing the demand for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0123] In some embodiments, Figure 6 As shown, it also includes:
[0124] S610: Obtain current status data of the controlled device through the IO port of the IOM;
[0125] S620: construct third XML data, wherein the third XML data records the IO port ID of the corresponding controlled device and the current state data of the controlled device obtained by the IOM through the IO port;
[0126] S630: Send the third XML data to the server in the building control system. The server in the building control system receives and parses the third XML data, searches the mapping table based on the IO port ID, and maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device.
[0127] Among them, this application proposes a real-time feedback mechanism for device status, which can convert the device status into XML format data for monitoring and analysis by the server in the building control system, so that users can understand the operating status of the device in real time, find problems in time and take corresponding measures. It provides a rich data source for the monitoring and analysis of the building automation system, which helps to improve the performance and reliability of the building automation system.
[0128] Specifically, the current status data of the controlled device (such as a sensor or a controlled device, etc.) connected to the input end of the IOM can be read in real time. For example, for lighting equipment, its switch status and brightness level can be read; for air-conditioning equipment, the current temperature and operating mode can be read. Among them, the current status data of the controlled device is in the second format, which is a format that the IOM can directly recognize (i.e., register address and function code). Then construct the third XML data, and record the IO port ID of the controlled device and the current status data of the controlled device obtained by the IOM through the IO port into the third XML data. Then send the constructed third XML data to the server in the building control system for the server in the building control system to monitor and analyze after reverse mapping.
[0129] From the above, when the IOM uploads data to the server in the building control system, the third XML data is uploaded. The application uses XML extensible markup language as the standard format for information exchange, which reduces the data parsing and conversion work caused by format differences, optimizes the data exchange mechanism between the server and IOM in the building control system, and simplifies data management and improves efficiency. In addition, the application maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device, further reducing the need for data parsing and conversion and improving the communication speed. In addition, the format of the data transmitted by the structured description of XML is more suitable for flexible and changeable data transmission requirements.
[0130] In some embodiments, the control operation is output to the connected controlled device through the IO port, such as Figure 7 As shown, including:
[0131] S710: Encapsulate the IO port ID and control operation connected in the IOM using a protocol supported by the IOM to obtain first encapsulated data;
[0132] S720: Use the protocol to parse the first encapsulated data to obtain the IO port ID and control operation connected in the IOM, and output the control operation to the connected controlled device through the IO port.
[0133] In this embodiment, this method can be compatible with the protocol originally supported by the IOM, that is, the IO port ID and control operation connected in the IOM are encapsulated into a data packet specified by the protocol (i.e., the first encapsulated data) according to the protocol that the IOM can support. For example, assuming that the IOM supports the Modbus protocol, it can be encapsulated into the Modbus PDU format, and at the same time, the necessary additional information in the protocol supported by the IOM can be added, such as adding verification information, etc. Thus, the IOM can use the supported protocol (for example, it can be the Modbus protocol) to identify and parse the first encapsulated data to obtain the IO port ID and control operation connected in the IOM, and output the control operation to the connected controlled device through the IO port.
[0134] As described above, the method of this embodiment can achieve compatibility with the original IOM protocol format, greatly improving the compatibility and interoperability of the method.
[0135] In some embodiments, Figure 8 As shown, it also includes:
[0136] S810: Obtain current status data of the controlled device through the IO port of the IOM;
[0137] S820: Encapsulate the IO port ID and the current state data of the controlled device obtained by the IOM through the IO port using a protocol supported by the IOM to obtain second encapsulated data;
[0138] S830: using the protocol to parse the second encapsulated data to obtain the IO port ID and the current status data of the controlled device obtained by the IOM through the IO port;
[0139] S840: construct third XML data, wherein the third XML data records the IO port ID of the corresponding controlled device and the current state data of the controlled device obtained by the IOM through the IO port;
[0140] S850: Send the third XML data to the server in the building control system. The server in the building control system receives and parses the third XML data, searches the mapping table based on the IO port ID, and maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device.
[0141] In this example, compatibility with the protocol originally supported by the IOM is achieved. For example, the IO port of the IOM obtains the current status data of the controlled device, and first uses the original protocol processing method of the IOM (such as the Modbus protocol) to process the data, that is, the IO port ID and the current status data are encapsulated based on the protocol supported by the IOM, and the necessary additional information in the protocol supported by the IOM can be added, such as adding verification information, etc., and then the second encapsulated data defined by the protocol supported by the IOM is obtained, such as the IO port ID and the current status data can be in the Modbus PDU format (i.e., the register address and function code format). Then, the second encapsulated data is parsed using the protocol to obtain the IO port ID and the current status data of the controlled device obtained by the IOM through the IO port, and the IO port ID and the current status data of the corresponding controlled device are recorded in the constructed third XML data, and the third XML data is sent to the server in the building control system for the server in the building control system to monitor and analyze after reverse mapping.
[0142] From the above, in this example, the process of constructing the third XML data of this application is combined with the protocol originally supported by the IOM, which is beneficial for the IOM to use the format defined by the original protocol (such as Modbus PDU format) to obtain the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by the IOM through the IO port, and then parse the data in the format defined by the original protocol (such as Modbus PDU), obtain the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by the IOM through the IO port to construct the third XML data. This method uses the original protocol of the IOM to obtain the data of the controlled device, which greatly improves the compatibility and interoperability of the system.
[0143] In some embodiments, constructing the third XML data includes:
[0144] An XML data template is obtained, and the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by the IOM through the IO port are filled into the corresponding position to generate the third XML data.
[0145] Among them, an XML data template is also constructed on the IOM. When constructing the third XML data, the IO port ID and the current status data of the controlled device can be filled into the corresponding position of the XML data template to generate the third XML data, so that XML format data can be quickly obtained.
[0146] In summary, the data transmission method of a building control system proposed in this application can achieve the following beneficial effects:
[0147] 1. XML (Extensible Markup Language) is introduced as a standard format for information exchange to achieve efficient and flexible data interaction between the server and IOM in the building control system. The application of XML greatly simplifies the data exchange process between these key components and reduces the data parsing and conversion work caused by format differences through standardized data structures.
[0148] 2. Because XML has good readability and scalability, it reserves flexible interfaces for new functions or devices that may be added in the future, reducing the difficulty of system upgrades and expansions.
[0149] 3. Use XML extensible markup language to optimize the data exchange mechanism between the server and IOM in the building control system, thereby simplifying data management and improving efficiency in specific areas.
[0150] [First specific implementation method of the data transmission method of the building control system]
[0151] The present application provides a data transmission method for a building control system, which is applied to a data transmission system of a building control system. The system includes a server, a DDC and an IOM in the building control system. Each IOM can be connected to multiple controlled devices, and each IO port of the IOM is connected to a controlled device.
[0152] The following describes the data transmission method of the building control system of the present application by taking the controlled device as an air-conditioning control system and heating the air-conditioning control system as an example, wherein the XML data template of the air-conditioning control system is stored on the server in the building control system, including information such as device number, current temperature, set temperature, and operation mode. The server in the building control system also stores a mapping table and an XML parser. An IO port AC_Temperature_Setpoint of the IOM is connected to the air-conditioning processor (i.e., the controlled device). The IO port ID is represented by the register address 40001 of the air-conditioning temperature set point. This time, the target temperature of the air-conditioning is controlled to be set to 26°C. The specific process of the method is as follows:
[0153] 1. The server in the building control system reads and displays the XML data template of the air-conditioning control system. The user sets the temperature of the air-conditioning to 26° C., and generates the first XML data based on the user's setting.
[0154] 2. The server in the building control system reads the first XML data, which includes the device ID of the air conditioner and the state parameter control information of the air conditioner (ie, the temperature is raised to 26° C.).
[0155] 3. The server in the building control system finds the mapping table based on the device ID of the air conditioner, maps the device ID of the air conditioner to the IO port ID connected to the air conditioner in the IOM (i.e., register address 40001), and maps the state parameter control information of heating to 26°C to the function code of writing to the register (for example, function code 06 of writing a 16-bit value to a single holding register) and the control operation of data value 26. In this way, the original device ID of the air conditioner and the state parameter control information of the air conditioner are converted into data in a format that can be recognized by the IOM, and the second XML data is generated.
[0156] 4. The server in the building control system sends the generated second XML data to the IOM. The second XML data may be encapsulated in the TCP / IP protocol and sent to the DDC. The DDC parses the second XML data of the TCP / IP protocol, obtains the second XML data and the IOM identifier, and then sends the second XML data to the corresponding IOM based on the IOM identifier.
[0157] 5. The IOM receives and parses the second XML data, and obtains the IO port ID (i.e., register address 40001), the function code written to the register (e.g., function code 06), and the data value 26. When the idea of the IOM development is to use these data directly, the IOM outputs the value 26 in the register written to the address 40001 through the IOM port AC_Temperature_Setpoint, thus completing the adjustment of the temperature set point of the air conditioner.
[0158] Or, 6. IOM receives and parses the second XML data to obtain the IO port ID (i.e., register address 40001), the function code written to the register (e.g., function code 06), and the data value 26. If the idea of IOM development is to send instructions to the controlled device with the help of the protocol originally supported by IOM, then it is necessary to convert the IO port ID (i.e., register address 40001), the function code written to the register (e.g., function code 06), and the data value 26 into the Modbus PDU format defined by the Modbus protocol according to the communication protocol currently supported by IOM, and encapsulate to obtain the first encapsulated data. For example, the format of constructing a request (first encapsulated data) to write a single register (function code 06) based on Modbus PDU is:
[0159] [Function code][Register address high byte][Register address low byte][Write data high byte][Write data low byte][CRC check low byte][CRC check high byte]
[0160] 06 9C 41 00 1A XX XX
[0161] Register address 40001 is converted to hexadecimal as 9C41, so the high byte is 9C and the low byte is 41;
[0162] 26 is converted to hexadecimal as 1A. For a 16-bit register, if two bytes need to be filled, it is 001A.
[0163] XX XX represents the low byte and high byte of the CRC check value.
[0164] The IOM will then use the supported Modbus protocol to parse the first packaged data, obtain the IO port ID (i.e., register address 40001), the function code written to the register (e.g., function code 06), and the data value 26, and then the IOM outputs the value 26 in the register written to the address 40001 through the IOM's port AC_Temperature_Setpoint, thereby completing the adjustment of the temperature set point of the air conditioner, and the air conditioner starts to work according to the new temperature set point.
[0165] 7. After a period of time, the IOM will also regularly collect the latest status data from the air conditioner through the IOM port AC_Temperature_Setpoint, including the current indoor temperature 25.
[0166] 8. When the IOM development idea corresponds to the above method 6, the ID of the IOM port AC_Temperature_Setpoint and the current indoor temperature 25 can be directly recorded in the third XML data in the form of register address 40001 and the function code for reading the register (for example, function code 03, used to read the value of one or more holding registers) and data value 25, and the third XML data is sent to the server in the building control system. The third XML data can be sent to the DDC first, and the DDC is encapsulated in the TCP / IP protocol and sent to the server in the building control system.
[0167] Or, 9. If the IOM development idea follows the idea in 7 above, then the ID of the IOM port AC_Temperature_Setpoint and the current indoor temperature 25 need to be encapsulated into the second encapsulated data in the form of register address 40001 and the function code for reading the register (for example, function code 03) and data value 25 according to the communication protocol Modbus currently supported by the IOM. For example, construct a request for reading a register (function code 03) based on Modbus RTU (i.e., the second encapsulated data):
[0168] [Function code][Register address high byte][Register address low byte][Read data high byte][Read data low byte][CRC check low byte][CRC check high byte]
[0169] 01 03 9C 41 00 19XX XX
[0170] Register address 40001 is converted to hexadecimal as 9C41, so the high byte is 9C and the low byte is 41;
[0171] 25 is converted to hexadecimal 19. For a 16-bit register, if two bytes need to be filled, it is 00 19.
[0172] XX XX represents the low byte and high byte of the CRC check value.
[0173] The IOM will then use the Modbus protocol to parse the second encapsulated data, obtain the register address 40001 of the air conditioner temperature set point, the function code for reading the register (e.g., function code 03) and the data value 25, and then construct the third XML data, which records the register address 40001 and the function code for reading the register (e.g., function code 03) and the data value 25, and send the third XML data to the server in the building control system. The third XML data may be first sent to the DDC, which is then encapsulated in the TCP / IP protocol and sent to the server in the building control system.
[0174] 10. The server in the building control system parses the third XML data, obtains the register address 40001 and the function code for reading the register (for example, function code 03) and the data value 25, and can find the mapping table based on the register address 40001, and de-map the register address 40001 into the device ID of the air conditioner, and de-map the function code for reading the register (for example, function code 03) and the data value 25 into the current indoor temperature 25, and display the temperature data of the air-conditioning equipment through a graphical interface, and display the temperature change curve with a chart.
[0175] The data flowing between the server and IOM in the building control system can be encrypted.
[0176] [The first embodiment of the data transmission device of the building control system of the present application]
[0177] like Fig. 9 As shown, an embodiment of the present application provides a data transmission device for a building control system. The data transmission device for the building control system is applied to a server in the building control system and can be used to implement the data transmission method for the building control system in the first embodiment above, such as Fig. 9 As shown, the data transmission device of the building control system includes an acquisition module 101 , a mapping module 102 , and a data sending module 103 .
[0178] An acquisition module, used for acquiring a device ID of a controlled device connected to an IOM in a building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data;
[0179] A mapping module, configured to search a mapping table based on the device ID of the controlled device, map the device ID and the state parameter control information of the controlled device to the IO port ID and the control operation connected to the controlled device in the IOM, and record the IO port ID and the control operation into the second XML data;
[0180] The data sending module is used to send the second XML data to the IOM, so that the IOM parses the second XML data, obtains the IO port ID and the control operation, and outputs the control operation to the connected controlled device through the IO port.
[0181] For details, please refer to the detailed description in the first embodiment of the method, which will not be repeated here.
[0182] [Second embodiment of the data transmission device of the building control system of the present application]
[0183] like Fig.10 As shown, the embodiment of the present application provides a data transmission device for a building control system. The data transmission device for the building control system is applied to the IOM and can be used to implement the data transmission method for the building control system in the second embodiment above, such as Fig.10 As shown, the data transmission device of the building control system comprises a receiving module 201 , a parsing module 202 , and an output module 203 .
[0184] A receiving module, configured to receive second XML data sent by a server in a building control system, wherein the second XML data records an IO port ID and a control operation connected to the controlled device in the IOM; wherein the IO port ID and the control operation connected to the controlled device in the IOM are obtained by the server in the building control system acquiring a device ID of a controlled device connected to an IOM in the building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data, and a mapping table is searched based on the device ID of the controlled device to map the device ID of the controlled device and the state parameter control information;
[0185] A parsing module, used for parsing the second XML data to obtain the IO port ID and control operation of the controlled device connected in the IOM;
[0186] The output module is used to output the control operation to the connected controlled device through the IO port.
[0187] For details, please refer to the detailed description in the second embodiment of the method, which will not be repeated here.
[0188] [Embodiment of the computing device of the present application]
[0189] Fig.11 900 is a schematic structural diagram of a computing device 900 provided in an embodiment of the present application. The computing device can be used as a data transmission device of a building control system, and executes each optional embodiment of the data transmission method of the building control system. The computing device can be a terminal, or a chip or chip system inside a terminal. Fig.11 As shown, the computing device 900 includes: a processor 910 , a memory 920 , and a communication interface 930 .
[0190] It should be understood that Fig.11 The communication interface 930 in the computing device 900 shown may be used to communicate with other devices, and may specifically include one or more transceiver circuits or interface circuits.
[0191] The processor 910 may be connected to a memory 920. The memory 920 may be used to store the program code and data. Therefore, the memory 920 may be a storage unit inside the processor 910, or an external storage unit independent of the processor 910, or a component including a storage unit inside the processor 910 and an external storage unit independent of the processor 910.
[0192] Optionally, the computing device 900 may further include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 via the bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig.11 A line without an arrow is used to represent the bus, but this does not mean that there is only one bus or one type of bus.
[0193] It should be understood that in the embodiment of the present application, the processor 910 may adopt a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Alternatively, the processor 910 may adopt one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiment of the present application.
[0194] The memory 920 may include a read-only memory and a random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include a nonvolatile random access memory. For example, the processor 910 may also store information on the device type.
[0195] When the computing device 900 is running, the processor 910 executes the computer-executable instructions in the memory 920 to perform any operation step of the above method and any optional embodiment thereof.
[0196] It should be understood that the computing device 900 according to the embodiment of the present application can correspond to the corresponding subjects in the methods according to the embodiments of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 900 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0197] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0198] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0199] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0200] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0201] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0202] 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 computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. 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.
[0203] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to execute the above method, which includes at least one of the solutions described in the above embodiments.
[0204] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0205] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0206] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0207] Computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0208] In addition, the words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0209] In the above description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps will be executed in this manner. If permitted, the order of the steps can be interchanged or they can be executed simultaneously.
[0210] The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the features, integers, steps or components mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "a device comprising means A and B" should not be limited to a device consisting of components A and B only.
[0211] References to "one embodiment" or "an embodiment" in this specification mean that a particular feature, structure, or characteristic described in conjunction with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in one or more embodiments, the particular features, structures, or characteristics can be combined in any appropriate manner, as would be apparent to one of ordinary skill in the art from this disclosure.
[0212] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present application, all of which belong to the scope of protection of the present application.< / brightnesslevel> < / switchstate> < / brightnesslevel> < / lightingdevice>
Claims
1. A data transmission method for a building control system, characterized in that: Servers used in building control systems include: Acquire a device ID of a controlled device connected to an IOM in a building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data; Based on the device ID of the controlled device, the mapping table is searched, the device ID and the state parameter control information of the controlled device are mapped to the IO port ID and the control operation connected to the controlled device in the IOM, and the IO port ID and the control operation are recorded in the second XML data; The second XML data is sent to the IOM, so that the IOM parses the second XML data, obtains the IO port ID and the control operation, and outputs the control operation to the connected controlled device through the IO port.
2. The method according to claim 1, characterized in that: Also includes: Receive and parse the third XML data sent by the IOM, wherein the third XML data records the IO port ID of the corresponding controlled device and the current state data of the controlled device obtained by the IOM through the IO port; The mapping table is searched based on the IO port ID, and the IO port ID and the current state data of the controlled device are mapped into the device ID and state parameter information of the controlled device.
3. The method according to claim 2, characterized in that Also includes at least one of the following: Parsing the first XML data, and displaying the device ID and the state parameter control information of the controlled device in a user-recognizable manner through a UI interface; Parsing the first XML data, and displaying the device ID and the state parameter control information of the controlled device in a user-recognizable manner through a UI interface, and updating the first XML data in response to the user modifying the displayed content through the UI interface; The device ID and status parameter information of the controlled device are displayed in a user-recognizable manner through the UI interface.
4. A data transmission method for a building control system, characterized in that: Applicable to IOM, including: Receive second XML data sent by a server in a building control system, wherein the second XML data records an IO port ID and a control operation connected to the controlled device in the IOM; wherein the IO port ID and the control operation connected to the controlled device in the IOM are obtained by the server in the building control system acquiring a device ID of a controlled device connected to an IOM in the building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data, and a mapping table is searched based on the device ID of the controlled device to map the device ID of the controlled device and the state parameter control information; Parsing the second XML data to obtain the IO port ID and control operation connected to the controlled device in the IOM; The control operation is output to the connected controlled device through the IO port.
5. The method according to claim 4, characterized in that Also includes: Obtain the current status data of the controlled device through the IO port of the IOM; Constructing third XML data, wherein the third XML data records the IO port ID of the corresponding controlled device and the current state data of the controlled device obtained by the IOM through the IO port; The third XML data is sent to the server in the building control system. The server in the building control system receives and parses the third XML data, searches the mapping table based on the IO port ID, and maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device.
6. The method according to claim 4, characterized in that Outputting control operations to the connected controlled device through the IO port includes: Encapsulating the IO port ID and control operation connected in the IOM using a protocol supported by the IOM to obtain first encapsulated data; The first encapsulated data is parsed using the protocol to obtain the IO port ID and control operation connected in the IOM, and the control operation is output to the connected controlled device through the IO port.
7. The method according to claim 6, characterized in that Also includes: Obtain the current status data of the controlled device through the IO port of the IOM; Encapsulating the IO port ID and the current state data of the controlled device obtained by the IOM through the IO port in a protocol supported by the IOM to obtain second encapsulated data; Parsing the second encapsulated data using the protocol to obtain the IO port ID and the current status data of the controlled device obtained by the IOM through the IO port; Constructing third XML data, wherein the third XML data records the IO port ID of the corresponding controlled device and the current state data of the controlled device obtained by the IOM through the IO port; The third XML data is sent to the server in the building control system. The server in the building control system receives and parses the third XML data, searches the mapping table based on the IO port ID, and maps the IO port ID and the current status data of the controlled device to the device ID and status parameter information of the controlled device.
8. The method according to claim 5 or 7, characterized in that: The constructing of the third XML data includes: An XML data template is obtained, and the IO port ID of the corresponding controlled device and the current status data of the controlled device obtained by the IOM through the IO port are filled into the corresponding position to generate the third XML data.
9. A data transmission device for a building control system, characterized in that: Servers used in building control systems include: An acquisition module, used for acquiring a device ID of a controlled device connected to an IOM in a building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data; A mapping module, configured to search a mapping table based on the device ID of the controlled device, map the device ID and the state parameter control information of the controlled device to the IO port ID and the control operation connected to the controlled device in the IOM, and record the IO port ID and the control operation into the second XML data; The data sending module is used to send the second XML data to the IOM, so that the IOM parses the second XML data, obtains the IO port ID and the control operation, and outputs the control operation to the connected controlled device through the IO port.
10. A data transmission device for a building control system, characterized in that: Applicable to IOM, including: A receiving module, configured to receive second XML data sent by a server in a building control system, wherein the second XML data records an IO port ID and a control operation connected to the controlled device in the IOM; wherein the IO port ID and the control operation connected to the controlled device in the IOM are obtained by the server in the building control system acquiring a device ID of a controlled device connected to an IOM in the building control system and state parameter control information of the controlled device, wherein the device ID of the controlled device and the state parameter control information of the controlled device are recorded in the first XML data, and a mapping table is searched based on the device ID of the controlled device to map the device ID of the controlled device and the state parameter control information; A parsing module, used for parsing the second XML data to obtain the IO port ID and control operation of the controlled device connected in the IOM; The output module is used to output the control operation to the connected controlled device through the IO port.