Building intelligent control method, device and system, storage medium and electronic equipment
By obtaining the access protocol and parsing script of the target device, analyzing the access data and storing it into the database, the problem of the need to customize the code to process data in the prior art when accessing the device, and improving the device access efficiency.
Patent Information
- Application Number
- CN202411831416.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-04-04
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The existing building intelligent control system requires separate custom codes to process data when accessing the equipment, resulting in huge workload.
By obtaining the access protocol of the target device to be accessed into the building system, determining the parsing script corresponding to the protocol, using the parsing script to parse the access data, and saving the result data into the database.
This achieves the effect of not having to customize codes for each device to process data, and improves device access efficiency.
Smart Images

Figure CN119766586A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of building intelligent control, and in particular to a building intelligent control method, device, system, storage medium and electronic device. Background Art
[0002] The building intelligent control system is a system that realizes automatic control of buildings. It is a professional automation control system that realizes centralized monitoring and management of building electromechanical equipment (such as HVAC). With the development of intelligence and digitalization, the building intelligent control system has changed from independent control of each system to digital operation. It is necessary to further realize intelligent regulation and digital operation. It is necessary to collect data from each building equipment and send control instructions to each building equipment to control the corresponding building equipment. Therefore, there is a large demand for data transmission, acquisition, storage, processing, etc.
[0003] In the existing technology, the manufacturers, models, and types of devices that need to be connected to the building intelligent control system vary greatly. Even for the same device, the use and processing requirements of data vary with different user scenarios and usage requirements. If the corresponding code is customized to process the data when the device is connected, the workload is huge. Summary of the invention
[0004] The present application provides a building intelligent control method, device, system, storage medium and electronic device to solve the technical problem that a device needs to have a separate customized code to process data when it is connected to a building intelligent control system.
[0005] In a first aspect, the present application provides a building intelligent control method, including: obtaining an access protocol of a target device to be connected to a building system; determining a parsing script corresponding to the access protocol based on the access protocol; using the parsing script to parse access data of the target device; and storing the result data obtained by parsing the access data into a database.
[0006] In the second aspect, the present application provides a building intelligent control device, including: an acquisition module, used to obtain the access protocol of the target device to be connected to the building system; a determination module, used to determine the parsing script corresponding to the above access protocol based on the above access protocol; a parsing module, used to use the above parsing script to parse the access data of the above target device; a storage module, used to store the result data obtained by parsing the above access data into a database.
[0007] On the third aspect, the present application provides a building intelligent control system, including: a digital base, used to obtain the access protocol of the target device to be connected to the building system; based on the above access protocol, determine the parsing script corresponding to the above access protocol; use the above parsing script to parse the access data of the above target device; store the result data obtained by parsing the above access data into a database; a visual editor, used to edit the above parsing script; a management terminal, used to view the data in the above database.
[0008] In a fourth aspect, the present application provides a building intelligent control device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to execute a building intelligent control method by executing executable instructions in the memory.
[0009] In a fifth aspect, the present application also provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute any of the above-mentioned building intelligent control methods of the present application.
[0010] The above-mentioned technical scheme provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application obtains the access protocol of the target device to be connected to the building system; determines the parsing script corresponding to the above-mentioned access protocol according to the above-mentioned access protocol; uses the above-mentioned parsing script to parse the access data of the above-mentioned target device; stores the result data obtained by parsing the above-mentioned access data into a database, so that when any device is connected to the building intelligent control system, the corresponding parsing script can be determined by the access protocol used when the device is connected, and the access data of the target device is parsed using the parsing script to obtain the result data, and the result data is stored in the database, thereby achieving the effect of not having to customize the code for each device to process the data, thereby improving the device access efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0012] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0013] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0014] Figure 1 A flow chart of a building intelligent control method provided in an embodiment of the present application;
[0015] Figure 2 A system architecture diagram provided for an embodiment of the present application;
[0016] Figure 3 A schematic diagram of a protocol parser provided in an embodiment of the present application;
[0017] Figure 4 A flowchart of creating a script provided in an embodiment of the present application;
[0018] Figure 5 A schematic diagram of a selection page provided in an embodiment of the present application;
[0019] Figure 6 A schematic diagram of an editing interface for an HTTP data set provided in an embodiment of the present application;
[0020] Figure 7 A schematic diagram of a dynamic parameter configuration interface provided in an embodiment of the present application;
[0021] Figure 8 A schematic diagram of an output field configuration interface provided in an embodiment of the present application;
[0022] Fig. 9 A schematic diagram of a request header and request parameter configuration interface provided in an embodiment of the present application;
[0023] Fig.10 A schematic diagram of a request script interface provided in an embodiment of the present application;
[0024] Fig.11 A schematic diagram of a response script interface provided in an embodiment of the present application;
[0025] Fig.12 A schematic diagram of an editing interface for a JSON data set provided in an embodiment of the present application;
[0026] Fig.13 A schematic diagram of an editing interface for an MQTT data set provided in an embodiment of the present application;
[0027] Fig.14 A schematic diagram of a building intelligent control device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0029] The disclosure below provides many different embodiments or examples to implement different structures of the present invention. In order to simplify the disclosure of the present invention, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present invention. In addition, the present invention can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.
[0030] In order to solve the technical problem in the prior art that devices need to be individually customized to process data when connected to a building intelligent control system, the present application provides a building intelligent control method that can achieve the effect of improving device access efficiency without the need to customize code for each device to process data.
[0031] Figure 1 A flow chart of a building intelligent control method provided in an embodiment of the present application, such as Figure 1 As shown, including:
[0032] S102, obtaining an access protocol of a target device to be connected to the building system;
[0033] S104, determining a parsing script corresponding to the access protocol according to the access protocol; and parsing access data of the target device using the parsing script;
[0034] S106, storing result data obtained by parsing the access data into a database.
[0035] The building system in this embodiment can be a system for controlling the equipment in the building. There are many devices that can be connected to the building, such as air conditioners, lights, sensors (such as temperature sensors, humidity sensors, smoke sensors), smart access control, cameras, HVAC equipment, water flow monitoring equipment, elevators, etc. In addition, it can also include devices not mentioned above that can be connected to the building system for use, thereby providing functions or services for the building.
[0036] When a device is to be connected to a building system, the protocol used by the device can be determined. Because different devices use different protocols, the specific protocol used is determined based on the protocol supported by the device. For example, a lamp can use a communication component with a supported protocol to transmit data to the building system, while an elevator uses a communication component with a supported protocol to transmit data to the building system. Since the two support different protocols, the protocols used are different.
[0037] In this embodiment, different parsing scripts can be pre-configured for different access protocols. The parsing script is used to parse the access data of the target device that uses the protocol to access the building system. Different devices use the same or different protocols, and the parsing scripts used are the same or different. For example, for temperature sensors and humidity sensors, the same protocol is used, so the same parsing script can be used, while for temperature sensors and lights, different transmission protocols are used, so different parsing scripts are used.
[0038] For a transmission protocol, there may be multiple parsing scripts. Multiple parsing scripts may be scripts for parsing different devices under the same transmission protocol, or they may be parsing scripts with different functions under the same transmission protocol, used to parse and obtain different data. For example, for a lamp, there may be multiple parsing scripts, some of which may be used to parse the normal and faulty states of the lamp, some of which may be used to parse the power consumption of the lamp, and some of which may be used to parse the lighting time period of the lamp. Of course, these functions may also be put into one parsing script.
[0039] In this embodiment, for the target device to access the building system, the corresponding parsing script is determined according to the protocol used by the target device, and the parsing script is used to parse the access data of the target device. The access data can be the data generated by the target device during operation, such as whether it is abnormal, the power consumption during operation, and various device parameters during operation. The parsing script is used to parse this part of the data and obtain the content that matches the parsing script. For example, if the parsing script is used to parse the power consumption, other data may not be saved, and only the power consumption data is saved. The result data obtained by parsing is stored in the database.
[0040] The method provided in the embodiment of the present application obtains the access protocol of the target device to be connected to the building system; determines the parsing script corresponding to the access protocol according to the access protocol; uses the parsing script to parse the access data of the target device; and stores the result data obtained by parsing the access data in a database. Therefore, when any device is connected to the building intelligent control system, the corresponding parsing script can be determined according to the access protocol used when the device is connected, and the access data of the target device can be parsed using the parsing script to obtain the result data, which is stored in the database, thereby achieving the effect of not needing to customize the code for each device to process the data, thereby improving the efficiency of device access.
[0041] In one embodiment, when determining the parsing script corresponding to the access protocol according to the access protocol, a parsing script set corresponding to the access protocol can be determined, and each script in the parsing script set corresponds to the access protocol; and a script is selected from the parsing script set as the parsing script.
[0042] That is to say, in this embodiment, each protocol may correspond to a parsing script set, and the parsing script set includes at least one parsing script. In the case of multiple parsing scripts, multiple parsing scripts may be used for parsing the protocol.
[0043] The scripts in each parsing script set can also be further classified. That is, they can be classified according to the parsing function. Parsing scripts with the same parsing function are placed in the same subset, and parsing scripts with different functions are placed in different subsets. When determining the parsing script for parsing the target device, you can first determine the parsing function to be used. For example, for a lamp, you need to parse the power consumption of the target device, or parse the lighting time of the target device, and then you can select the parsing script from the corresponding subset.
[0044] In this embodiment, the relationship between parsing scripts can be constructed in the parsing script set of the same protocol. The parsing script with the most complete functions is used as the root node, and the parsing scripts that include the same functions but incomplete functions are used as child nodes of the root node. In this way, the parsing scripts of the functions to be used can be quickly traversed according to the tree structure of the root node and the child nodes.
[0045] In one embodiment, when the result data obtained by parsing the access data is stored in a database, data features of the result data may be determined; a target database may be determined from a plurality of databases based on the data features; and the result data may be stored in the target database.
[0046] That is to say, in this embodiment, it can be determined in which database the data is stored according to the difference in data parsed by the parsing script. The above-mentioned data features can be features obtained by analyzing the data. For example, for the collected result data, after analysis, the result data is evenly distributed according to the time law, such as being collected once in each time period, or the result data has multiple attributes, and the multiple attributes are related, or the result data is irregularly distributed, or the result data is jumpy and fluctuating, etc. With the different data features of the result data, the result data can be stored in different databases.
[0047] In one embodiment, when determining the target database from multiple databases based on data features, there may be multiple methods. For example, when the data features of the result data indicate that the result data is data recorded according to a time period, the result data may be stored in a time series database; or, when the data features of the result data indicate that the result data is multi-attribute data, the result data may be stored in a relational database; or, when the data features of the result data indicate that the result data is irregular data, the result data may be stored in a distributed database; or, when the result data is state data of a target device, the result data may be stored in a memory database.
[0048] In this embodiment, after the result data is obtained by parsing the script, the result data can be identified. For example, the result data is data that is regularly distributed according to time. Taking the target device as a lamp as an example, the result data is the power consumption of the lamp every day and the lighting time period of the lamp every day. For the lamp, since the power consumption is recorded by day and the lighting time period is also recorded by day, there is an obvious time regularity, so the data can be stored in the time database. In addition, since the data obtains the power consumption and the lighting time period at the same time, the two can also be regarded as multi-attribute data and stored in the relational database. In other words, the same result data can be stored in different databases at the same time. For example, in the case where the target device is an elevator, the result data can be the running time point (time period) of the elevator. The result data has obvious irregularity, so the data can be stored in a distributed database. Distributed databases are used to store a large amount of irregular data. Some result data are state data, for example, one identifier represents state 1, such as representing that the device is normal, and another identifier represents state 2, such as indicating that the device is abnormal. This part of the result data can be stored in the memory database.
[0049] In this embodiment, the result data is classified according to the difference of the result data, and thus classified into different databases. In addition, for the result data of the same target device, if it contains both data with strong time regularity and data with no regularity, the data can also be divided into different parts and then stored in different databases respectively.
[0050] In one embodiment, before determining the parsing script corresponding to the access protocol according to the access protocol, a data set can be created through a script editing interface; the request header and request parameters of the data set can be determined; and script code corresponding to the request header and request parameters can be added to form a parsing script.
[0051] In this embodiment, a script editing interface can be provided. The script editing interface can be displayed in the form of a client, a web page, a small program, etc. installed on the terminal. On the script editing interface, multiple editing items can be provided, such as a data set editing item, which can be used to create a data set. The created data set includes the name of the data set, the calling method, the request type, the request address, etc. For example, the data set can include a Hypertext Transfer Protocol (HTTP) data set, an object representation (JavaScript Object Notation, JavaScript, JSON) data set, a message queue telemetry transport (Message Queuing Telemetry Transport, MQTT) data set, etc. After the target device is connected to the building intelligent control system, it can access the corresponding data set according to the protocol and store the data in the corresponding data set. For example, for an HTTP data set, a configuration script editing item can also be provided in the script editing interface. By configuring the script editing item, the request header, request parameters, etc. can be configured. The request header and request parameters are the corresponding contents of the HTTP network address request connection. The request header affects the access resources, access code, and token authentication information required for HTTP requests. The request parameter is the specific value that needs to be passed in the HTTP request process. If it is a GET request, it is the key-value field. If it is a POST request, the object can be passed, but the purpose is to pass the value. The setting of the character encoding in the request header affects the parsing encoding of the transmitted data by the request script. The authentication token information in the request header allows the request script to obtain user information and pass this message for the next request. Different ways of requesting parameters will make the request script obtain values in different ways. Then you can edit the request script and response script. The request script and response script can be written in code, and the specific code is not limited here. After writing the request script and response script, you will get a parsing script.
[0052] There are multiple parsing scripts in this embodiment. In one embodiment, adding scripts corresponding to request headers and request parameters to form a parsing script includes: writing a collection script for periodically collecting data, wherein the collection script is used to collect data of request parameters of the target device once every predetermined period of time; and determining the collection script, request header, and request parameters as the parsing script.
[0053] In this embodiment, the written parsing script is a script used to parse the access data and obtain periodic result data. For example, in the case where the target device is a lamp, a parsing script can be written, and the parsing script is a collection script. The code in the collection script is to collect the lamp data once every predetermined time, and what data to collect. For example, data is collected once a day, and the collected data is the power consumption and lighting time of the lamp. Then, the collected data is the daily power consumption and lighting time of the lamp. The data is periodic (with days as the period). Therefore, the collected data has a periodic pattern and can be stored in a time series database when stored.
[0054] In one example, adding scripts corresponding to request headers and request parameters to form a parsing script includes: writing a collection script for collecting associated data, wherein the collection script is used to associate the data of each request parameter with the data of other request parameters among multiple collected request parameters; and determining the collection script, request header, and request parameters as a parsing script.
[0055] In this embodiment, for a target device, there may be multiple data that are interrelated. For example, for a central air conditioner, the collected data may be cooling capacity, water temperature of the water inlet and outlet, motor speed, temperature, etc., and the data are related to each other. Therefore, when writing the collection script in the parsing script, it is necessary to write a collection script that collects multiple data of the target device at the same time. If it is periodic collection, then in combination with the above example, periodic collection is performed. If it is non-periodic collection, it can be real-time monitoring, real-time collection, or irregular collection. Taking the above central air conditioner as an example, the collected data includes cooling capacity, water temperature of the water inlet and outlet, motor speed, and temperature. These parts of data are interrelated and establish a connection relationship with each other as the result data of the central air conditioner. The central air conditioner can also have other data, but the collection script may not collect it. The data not collected means that it is not used. For the collected data, since it is a variety of data with an associated relationship, it can be stored in a relational database.
[0056] In one embodiment, adding scripts corresponding to the request header and request parameters to form a parsing script can be used to write a collection script that traverses the collected data, wherein the collection script is used to collect data of the request parameters each time the request parameters generate new data; the collection script, request header and request parameters are determined as the parsing script.
[0057] In this embodiment, for a target device, the data that may need to be collected may not be generated at any time, but may be generated irregularly. For example, for an elevator, the people riding the elevator and the floors of the elevator are not fixed, and there is a lot of randomness. Therefore, the running time and floor data can be collected after the elevator runs. At this time, the collection script written is a script that collects running data after the elevator runs, and collects the running time point and the running floor after the elevator runs. For this part of the data, since the data is random, it can be stored in a distributed database. And since there are multiple items of collected data, which are multiple related data of the elevator, they can also be stored in a relational database. If multiple elevator data are collected, such as collecting three items of data, two of which are related, they can be stored in a relational database, and the remaining one item of data is not related and is random, then the data of the elevator can be separated separately and stored in a distributed database.
[0058] In one embodiment, adding scripts corresponding to the request header and request parameters to form a parsing script can be used to write a data monitoring type collection script, wherein the collection script is used to monitor the status of the request parameters, and when the status changes, the changed status is collected; the collection script, request header and request parameters are determined as a parsing script.
[0059] In this embodiment, when writing a collection script, a script for collecting the status of the target device can be written. The purpose of the script is to collect the status of the target device so as to perform status monitoring. The script can be used in scenarios where the status of devices is to be monitored in batches. For example, smoke alarms, cameras, etc. in a building can be monitored in batches through the script. When any smoke alarm and camera are connected to the building intelligent control system, the status can be monitored through the script.
[0060] Figure 2It is the system architecture diagram of this embodiment. It includes management terminal, visual editor, digital base and electromechanical equipment. Electromechanical equipment may include but is not limited to air conditioning, lighting, elevators, sensors and other equipment, which are directly connected to the digital base through a network cable or indirectly connected to the digital base through a gateway, and are controlled objects and data sources. The gateway is used to convert the device protocol into the Transmission Control Protocol (TCP), such as Modbus TCP, communication protocol (Building Automation and Control Networks, BACnet protocol) / Internet Protocol (Internet Protocol, IP), MQTT, etc., to realize the device access to the network. The digital base can realize data access, analysis, processing, and storage, and provide business services to the user side, such as account verification, data display, statistical analysis, control logic and other functions. The management terminal, including but not limited to web pages, mobile phone software, WeChat applets, clients, etc., presents the user management interface to realize data monitoring and control. The visual editor can be connected to the digital base to visually arrange the access equipment, analysis logic, and processing mechanism of the digital base, so as to realize the ready-to-use analysis script.
[0061] Figure 3 : is a schematic diagram of the protocol parser of this embodiment. The script parser is used to identify the script content and convert it into a program that can be run on the digital base. The supported script languages include but are not limited to the above-mentioned JSON, the above-mentioned MQTT, Can4Net gateway, HTTP, etc. The general protocol parsing module is used to parse general protocols. The general protocols include HTTP, MQTT, Modbus, BACnet, Can4Net, etc. The parsing module unifies the above-mentioned general protocols and extracts the valid data part. The parsing script matching module can match the parsing script of the object according to data allocation and device category, and perform a data processor after matching, and synchronously store the original data in the database. The database can include multiple types, such as the time series database TimescaleDB, the relational database PostgreSQL, the distributed database MongoDB, and the memory database Redis.
[0062] In this embodiment, there are three ways for the device to access the data base: ① Direct access to the network by the device; ② Access after the device accesses the protocol gateway for data conversion; ③ Access through the software platform through the protocol. When accessing, select the access device protocol, and automatically filter the parsing script according to the selected device protocol. If there are multiple scripts, the user needs to select the parsing script; if the parsing script does not exist, create a new parsing script. The method of creating a new script is described in the following embodiment. Get the access data, process the data according to the parsing script, obtain valid data, that is, result data, through the parsing script, and select the storage strategy according to the data characteristics. For time series data: data that is strongly related to time, such as electricity consumption and water consumption, and needs to be filtered or statistically analyzed by time during use, it is automatically stored in the TimescaleDB database. For relational data: for data with clear data structure and multiple attribute definitions, it is automatically stored in the PostgreSQL database. For example, air-conditioning equipment has parameters such as address, device ID, and device type, which can be filtered by the above parameters on the user side. For non-relational data: for modeless structure storage, documents are similar to JSON objects, and field values can contain other documents, arrays, and document arrays, which are automatically stored in the MongoDB database. For cached data: Real-time data of devices required by the business, such as operating status and online status, are automatically stored in Redis. Open the management software on the computer or mobile phone to control the access device. Obtain data from different databases or business interfaces according to business needs.
[0063] The flowchart for creating a script is as follows Figure 4 Step 1: Create a script set and select the script type. Support but not limited to JSON script, HTTP script, MQTT script, the selection page is as follows Figure 5 Step 2: Edit the dataset script and configure the name, parameters and other properties. If it is an HTTP dataset, the editing interface is as follows Figure 6 The dynamic parameter configuration interface is shown as Figure 7 The output field configuration interface is as follows. Figure 8 The data type selection includes: relational data, time data, non-relational data, cache data, and the request header and request parameter configuration interface is as follows Fig. 9 The request script interface is as shown. Fig.10 As shown. The script editing page displays examples, and you can refer to the examples to write scripts. The response script interface is as follows Fig.11 If it is a JSON dataset, the editing interface is as follows Fig.12 If it is an MQTT dataset, the editing interface is as follows Fig.13 Step 3: Save the data set to complete the creation of the parsing script.
[0064] This embodiment also provides a building intelligent control device, including: an acquisition module, used to obtain the access protocol of the target device to be connected to the building system; a determination module, used to determine the parsing script corresponding to the access protocol according to the access protocol; a parsing module, used to use the parsing script to parse the access data of the target device; a storage module, used to store the result data obtained by parsing the access data into a database.
[0065] The building system in this embodiment can be a system for controlling the equipment in the building. There are many devices that can be connected to the building, such as air conditioners, lights, sensors (such as temperature sensors, humidity sensors, smoke sensors), smart access control, cameras, HVAC equipment, water flow monitoring equipment, elevators, etc. In addition, it can also include devices not mentioned above that can be connected to the building system for use, thereby providing functions or services for the building.
[0066] When a device is to be connected to a building system, the protocol used by the device can be determined. Because different devices use different protocols, the specific protocol used is determined based on the protocol supported by the device. For example, a lamp can use a communication component with a supported protocol to transmit data to the building system, while an elevator uses a communication component with a supported protocol to transmit data to the building system. Since the two support different protocols, the protocols used are different.
[0067] In this embodiment, different parsing scripts can be pre-configured for different access protocols. The parsing script is used to parse the access data of the target device that uses the protocol to access the building system. Different devices use the same or different protocols, and the parsing scripts used are the same or different. For example, for temperature sensors and humidity sensors, the same protocol is used, so the same parsing script can be used, while for temperature sensors and lights, different transmission protocols are used, so different parsing scripts are used.
[0068] For a transmission protocol, there may be multiple parsing scripts. Multiple parsing scripts may be scripts for parsing different devices under the same transmission protocol, or they may be parsing scripts with different functions under the same transmission protocol, used to parse and obtain different data. For example, for a lamp, there may be multiple parsing scripts, some of which may be used to parse the normal and faulty states of the lamp, some of which may be used to parse the power consumption of the lamp, and some of which may be used to parse the lighting time period of the lamp. Of course, these functions may also be put into one parsing script.
[0069] In this embodiment, for the target device to access the building system, the corresponding parsing script is determined according to the protocol used by the target device, and the parsing script is used to parse the access data of the target device. The access data can be the data generated by the target device during operation, such as whether it is abnormal, the power consumption during operation, and various device parameters during operation. The parsing script is used to parse this part of the data and obtain the content that matches the parsing script. For example, if the parsing script is used to parse the power consumption, other data may not be saved, and only the power consumption data is saved. The result data obtained by parsing is stored in the database.
[0070] The method provided in the embodiment of the present application obtains the access protocol of the target device to be connected to the building system; determines the parsing script corresponding to the access protocol according to the access protocol; uses the parsing script to parse the access data of the target device; and stores the result data obtained by parsing the access data in a database. Therefore, when any device is connected to the building intelligent control system, the corresponding parsing script can be determined according to the access protocol used when the device is connected, and the access data of the target device can be parsed using the parsing script to obtain the result data, which is stored in the database, thereby achieving the effect of not needing to customize the code for each device to process the data, thereby improving the efficiency of device access.
[0071] In one embodiment, when determining the parsing script corresponding to the access protocol according to the access protocol, a parsing script set corresponding to the access protocol can be determined, and each script in the parsing script set corresponds to the access protocol; and a script is selected from the parsing script set as the parsing script.
[0072] That is to say, in this embodiment, each protocol may correspond to a parsing script set, and the parsing script set includes at least one parsing script. In the case of multiple parsing scripts, multiple parsing scripts may be used for parsing the protocol.
[0073] The scripts in each parsing script set can also be further classified. That is, they can be classified according to the parsing function. Parsing scripts with the same parsing function are placed in the same subset, and parsing scripts with different functions are placed in different subsets. When determining the parsing script for parsing the target device, you can first determine the parsing function to be used. For example, for a lamp, you need to parse the power consumption of the target device, or parse the lighting time of the target device, and then you can select the parsing script from the corresponding subset.
[0074] In this embodiment, the relationship between parsing scripts can be constructed in the parsing script set of the same protocol. The parsing script with the most complete functions is used as the root node, and the parsing scripts that include the same functions but incomplete functions are used as child nodes of the root node. In this way, the parsing scripts of the functions to be used can be quickly traversed according to the tree structure of the root node and the child nodes.
[0075] In one embodiment, when the result data obtained by parsing the access data is stored in a database, data features of the result data may be determined; a target database may be determined from a plurality of databases based on the data features; and the result data may be stored in the target database.
[0076] That is to say, in this embodiment, it can be determined in which database the data is stored according to the difference in data parsed by the parsing script. The above-mentioned data features can be features obtained by analyzing the data. For example, for the collected result data, after analysis, the result data is evenly distributed according to the time law, such as being collected once in each time period, or the result data has multiple attributes, and the multiple attributes are related, or the result data is irregularly distributed, or the result data is jumpy and fluctuating, etc. With the different data features of the result data, the result data can be stored in different databases.
[0077] In one embodiment, when determining the target database from multiple databases based on data features, there may be multiple methods. For example, when the data features of the result data indicate that the result data is data recorded according to a time period, the result data may be stored in a time series database; or, when the data features of the result data indicate that the result data is multi-attribute data, the result data may be stored in a relational database; or, when the data features of the result data indicate that the result data is irregular data, the result data may be stored in a distributed database; or, when the result data is state data of a target device, the result data may be stored in a memory database.
[0078] In this embodiment, after the result data is obtained by parsing the script, the result data can be identified. For example, the result data is data that is regularly distributed according to time. Taking the target device as a lamp as an example, the result data is the power consumption of the lamp every day and the lighting time period of the lamp every day. For the lamp, since the power consumption is recorded by day and the lighting time period is also recorded by day, there is an obvious time regularity, so the data can be stored in the time database. In addition, since the data obtains the power consumption and the lighting time period at the same time, the two can also be regarded as multi-attribute data and stored in the relational database. In other words, the same result data can be stored in different databases at the same time. For example, in the case where the target device is an elevator, the result data can be the running time point (time period) of the elevator. The result data has obvious irregularity, so the data can be stored in a distributed database. Distributed databases are used to store a large amount of irregular data. Some result data are state data, for example, one identifier represents state 1, such as representing that the device is normal, and another identifier represents state 2, such as indicating that the device is abnormal. This part of the result data can be stored in the memory database.
[0079] In this embodiment, the result data is classified according to the difference of the result data, and thus classified into different databases. In addition, for the result data of the same target device, if it contains both data with strong time regularity and data with no regularity, the data can also be divided into different parts and then stored in different databases respectively.
[0080] In one embodiment, before determining the parsing script corresponding to the access protocol according to the access protocol, a data set can be created through a script editing interface; the request header and request parameters of the data set can be determined; and script code corresponding to the request header and request parameters can be added to form a parsing script.
[0081] In this embodiment, a script editing interface can be provided. The script editing interface can be displayed in the form of a client, a web page, a small program, etc. installed on the terminal. On the script editing interface, multiple editing items can be provided, such as a data set editing item, which can be used to create a data set. The created data set includes the name of the data set, the calling method, the request type, the request address, etc. For example, the data set can include a Hypertext Transfer Protocol (HTTP) data set, an object representation (JavaScript Object Notation, JavaScript, JSON) data set, a message queue telemetry transport (Message Queuing Telemetry Transport, MQTT) data set, etc. After the target device is connected to the building intelligent control system, it can access the corresponding data set according to the protocol and store the data in the corresponding data set. For example, for an HTTP data set, a configuration script editing item can also be provided in the script editing interface. By configuring the script editing item, the request header, request parameters, etc. can be configured. The request header and request parameters are the corresponding contents of the HTTP network address request connection. The request header affects the access resources, access code, and token authentication information required for HTTP requests. The request parameter is the specific value that needs to be passed in the HTTP request process. If it is a GET request, it is the key-value field. If it is a POST request, the object can be passed, but the purpose is to pass the value. The setting of the character encoding in the request header affects the parsing encoding of the transmitted data by the request script. The authentication token information in the request header allows the request script to obtain user information and pass this message for the next request. Different ways of requesting parameters will make the request script obtain values in different ways. Then you can edit the request script and response script. The request script and response script can be written in code, and the specific code is not limited here. After writing the request script and response script, you will get a parsing script.
[0082] There are multiple parsing scripts in this embodiment. In one embodiment, adding scripts corresponding to request headers and request parameters to form a parsing script includes: writing a collection script for periodically collecting data, wherein the collection script is used to collect data of request parameters of the target device once every predetermined period of time; and determining the collection script, request header, and request parameters as the parsing script.
[0083] In this embodiment, the written parsing script is a script used to parse the access data and obtain periodic result data. For example, in the case where the target device is a lamp, a parsing script can be written, and the parsing script is a collection script. The code in the collection script is to collect the lamp data once every predetermined time, and what data to collect. For example, data is collected once a day, and the collected data is the power consumption and lighting time of the lamp. Then, the collected data is the daily power consumption and lighting time of the lamp. The data is periodic (with days as the period). Therefore, the collected data has a periodic pattern and can be stored in a time series database when stored.
[0084] In one example, adding scripts corresponding to request headers and request parameters to form a parsing script includes: writing a collection script for collecting associated data, wherein the collection script is used to associate the data of each request parameter with the data of other request parameters among multiple collected request parameters; and determining the collection script, request header, and request parameters as a parsing script.
[0085] In this embodiment, for a target device, there may be multiple data that are interrelated. For example, for a central air conditioner, the collected data may be cooling capacity, water temperature of the water inlet and outlet, motor speed, temperature, etc., and the data are related to each other. Therefore, when writing the collection script in the parsing script, it is necessary to write a collection script that collects multiple data of the target device at the same time. If it is periodic collection, then in combination with the above example, periodic collection is performed. If it is non-periodic collection, it can be real-time monitoring, real-time collection, or irregular collection. Taking the above central air conditioner as an example, the collected data includes cooling capacity, water temperature of the water inlet and outlet, motor speed, and temperature. These parts of data are interrelated and establish a connection relationship with each other as the result data of the central air conditioner. The central air conditioner can also have other data, but the collection script may not collect it. The data not collected means that it is not used. For the collected data, since it is a variety of data with an associated relationship, it can be stored in a relational database.
[0086] In one embodiment, adding scripts corresponding to the request header and request parameters to form a parsing script can be used to write a collection script that traverses the collected data, wherein the collection script is used to collect data of the request parameters each time the request parameters generate new data; the collection script, request header and request parameters are determined as the parsing script.
[0087] In this embodiment, for a target device, the data that may need to be collected may not be generated at any time, but may be generated irregularly. For example, for an elevator, the people riding the elevator and the floors of the elevator are not fixed, and there is a lot of randomness. Therefore, the running time and floor data can be collected after the elevator runs. At this time, the collection script written is a script that collects running data after the elevator runs, and collects the running time point and the running floor after the elevator runs. For this part of the data, since the data is random, it can be stored in a distributed database. And since there are multiple items of collected data, which are multiple related data of the elevator, they can also be stored in a relational database. If multiple elevator data are collected, such as collecting three items of data, two of which are related, they can be stored in a relational database, and the remaining one item of data is not related and is random, then the data of the elevator can be separated separately and stored in a distributed database.
[0088] In one embodiment, adding scripts corresponding to the request header and request parameters to form a parsing script can be used to write a data monitoring type collection script, wherein the collection script is used to monitor the status of the request parameters, and when the status changes, the changed status is collected; the collection script, request header and request parameters are determined as a parsing script.
[0089] In this embodiment, when writing a collection script, a script for collecting the status of the target device can be written. The purpose of the script is to collect the status of the target device so as to perform status monitoring. The script can be used in scenarios where the status of devices is to be monitored in batches. For example, smoke alarms, cameras, etc. in a building can be monitored in batches through the script. When any smoke alarm and camera are connected to the building intelligent control system, the status can be monitored through the script.
[0090] This embodiment also provides a building intelligent control system, including: a digital base, used to obtain the access protocol of the target device to be connected to the building system; according to the access protocol, determine the parsing script corresponding to the access protocol; use the parsing script to parse the access data of the target device; store the result data obtained by parsing the access data into a database; a visual editor, used to edit the parsing script; and a management terminal, used to view the data in the database.
[0091] The building system in this embodiment can be a system for controlling the equipment in the building. There are many devices that can be connected to the building, such as air conditioners, lights, sensors (such as temperature sensors, humidity sensors, smoke sensors), smart access control, cameras, HVAC equipment, water flow monitoring equipment, elevators, etc. In addition, it can also include devices not mentioned above that can be connected to the building system for use, thereby providing functions or services for the building.
[0092] When a device is to be connected to a building system, the protocol used by the device can be determined. Because different devices use different protocols, the specific protocol used is determined based on the protocol supported by the device. For example, a lamp can use a communication component with a supported protocol to transmit data to the building system, while an elevator uses a communication component with a supported protocol to transmit data to the building system. Since the two support different protocols, the protocols used are different.
[0093] In this embodiment, different parsing scripts can be pre-configured for different access protocols. The parsing script is used to parse the access data of the target device that uses the protocol to access the building system. Different devices use the same or different protocols, and the parsing scripts used are the same or different. For example, for temperature sensors and humidity sensors, the same protocol is used, so the same parsing script can be used, while for temperature sensors and lights, different transmission protocols are used, so different parsing scripts are used.
[0094] For a transmission protocol, there may be multiple parsing scripts. Multiple parsing scripts may be scripts for parsing different devices under the same transmission protocol, or they may be parsing scripts with different functions under the same transmission protocol, used to parse and obtain different data. For example, for a lamp, there may be multiple parsing scripts, some of which may be used to parse the normal and faulty states of the lamp, some of which may be used to parse the power consumption of the lamp, and some of which may be used to parse the lighting time period of the lamp. Of course, these functions may also be put into one parsing script.
[0095] In this embodiment, for the target device to access the building system, the corresponding parsing script is determined according to the protocol used by the target device, and the parsing script is used to parse the access data of the target device. The access data can be the data generated by the target device during operation, such as whether it is abnormal, the power consumption during operation, and various device parameters during operation. The parsing script is used to parse this part of the data and obtain the content that matches the parsing script. For example, if the parsing script is used to parse the power consumption, other data may not be saved, and only the power consumption data is saved. The result data obtained by parsing is stored in the database.
[0096] The method provided in the embodiment of the present application obtains the access protocol of the target device to be connected to the building system; determines the parsing script corresponding to the access protocol according to the access protocol; uses the parsing script to parse the access data of the target device; and stores the result data obtained by parsing the access data in a database. Therefore, when any device is connected to the building intelligent control system, the corresponding parsing script can be determined according to the access protocol used when the device is connected, and the access data of the target device can be parsed using the parsing script to obtain the result data, which is stored in the database, thereby achieving the effect of not needing to customize the code for each device to process the data, thereby improving the efficiency of device access.
[0097] In one embodiment, when determining the parsing script corresponding to the access protocol according to the access protocol, a parsing script set corresponding to the access protocol can be determined, and each script in the parsing script set corresponds to the access protocol; and a script is selected from the parsing script set as the parsing script.
[0098] That is to say, in this embodiment, each protocol may correspond to a parsing script set, and the parsing script set includes at least one parsing script. In the case of multiple parsing scripts, multiple parsing scripts may be used for parsing the protocol.
[0099] The scripts in each parsing script set can also be further classified. That is, they can be classified according to the parsing function. Parsing scripts with the same parsing function are placed in the same subset, and parsing scripts with different functions are placed in different subsets. When determining the parsing script for parsing the target device, you can first determine the parsing function to be used. For example, for a lamp, you need to parse the power consumption of the target device, or parse the lighting time of the target device, and then you can select the parsing script from the corresponding subset.
[0100] In this embodiment, the relationship between parsing scripts can be constructed in the parsing script set of the same protocol. The parsing script with the most complete functions is used as the root node, and the parsing scripts that include the same functions but incomplete functions are used as child nodes of the root node. In this way, the parsing scripts of the functions to be used can be quickly traversed according to the tree structure of the root node and the child nodes.
[0101] In one embodiment, when the result data obtained by parsing the access data is stored in a database, data features of the result data may be determined; a target database may be determined from a plurality of databases based on the data features; and the result data may be stored in the target database.
[0102] That is to say, in this embodiment, it can be determined in which database the data is stored according to the difference in data parsed by the parsing script. The above-mentioned data features can be features obtained by analyzing the data. For example, for the collected result data, after analysis, the result data is evenly distributed according to the time law, such as being collected once in each time period, or the result data has multiple attributes, and the multiple attributes are related, or the result data is irregularly distributed, or the result data is jumpy and fluctuating, etc. With the different data features of the result data, the result data can be stored in different databases.
[0103] In one embodiment, when determining the target database from multiple databases based on data features, there may be multiple methods. For example, when the data features of the result data indicate that the result data is data recorded according to a time period, the result data may be stored in a time series database; or, when the data features of the result data indicate that the result data is multi-attribute data, the result data may be stored in a relational database; or, when the data features of the result data indicate that the result data is irregular data, the result data may be stored in a distributed database; or, when the result data is state data of a target device, the result data may be stored in a memory database.
[0104] In this embodiment, after the result data is obtained by parsing the script, the result data can be identified. For example, the result data is data that is regularly distributed according to time. Taking the target device as a lamp as an example, the result data is the power consumption of the lamp every day and the lighting time period of the lamp every day. For the lamp, since the power consumption is recorded by day and the lighting time period is also recorded by day, there is an obvious time regularity, so the data can be stored in the time database. In addition, since the data obtains the power consumption and the lighting time period at the same time, the two can also be regarded as multi-attribute data and stored in the relational database. In other words, the same result data can be stored in different databases at the same time. For example, in the case where the target device is an elevator, the result data can be the running time point (time period) of the elevator. The result data has obvious irregularity, so the data can be stored in a distributed database. Distributed databases are used to store a large amount of irregular data. Some result data are state data, for example, one identifier represents state 1, such as representing that the device is normal, and another identifier represents state 2, such as indicating that the device is abnormal. This part of the result data can be stored in the memory database.
[0105] In this embodiment, the result data is classified according to the difference of the result data, and thus classified into different databases. In addition, for the result data of the same target device, if it contains both data with strong time regularity and data with no regularity, the data can also be divided into different parts and then stored in different databases respectively.
[0106] In one embodiment, before determining the parsing script corresponding to the access protocol according to the access protocol, a data set can be created through a script editing interface; the request header and request parameters of the data set can be determined; and script code corresponding to the request header and request parameters can be added to form a parsing script.
[0107] In this embodiment, a script editing interface can be provided. The script editing interface can be displayed in the form of a client, a web page, a small program, etc. installed on the terminal. On the script editing interface, multiple editing items can be provided, such as a data set editing item, which can be used to create a data set. The created data set includes the name of the data set, the calling method, the request type, the request address, etc. For example, the data set can include a Hypertext Transfer Protocol (HTTP) data set, an object representation (JavaScript Object Notation, JavaScript, JSON) data set, a message queue telemetry transport (Message Queuing Telemetry Transport, MQTT) data set, etc. After the target device is connected to the building intelligent control system, it can access the corresponding data set according to the protocol and store the data in the corresponding data set. For example, for an HTTP data set, a configuration script editing item can also be provided in the script editing interface. By configuring the script editing item, the request header, request parameters, etc. can be configured. The request header and request parameters are the corresponding contents of the HTTP network address request connection. The request header affects the access resources, access code, and token authentication information required for HTTP requests. The request parameter is the specific value that needs to be passed in the HTTP request process. If it is a GET request, it is the key-value field. If it is a POST request, the object can be passed, but the purpose is to pass the value. The setting of the character encoding in the request header affects the parsing encoding of the transmitted data by the request script. The authentication token information in the request header allows the request script to obtain user information and pass this message for the next request. Different ways of requesting parameters will make the request script obtain values in different ways. Then you can edit the request script and response script. The request script and response script can be written in code, and the specific code is not limited here. After writing the request script and response script, you will get a parsing script.
[0108] There are multiple parsing scripts in this embodiment. In one embodiment, adding scripts corresponding to request headers and request parameters to form a parsing script includes: writing a collection script for periodically collecting data, wherein the collection script is used to collect data of request parameters of the target device once every predetermined period of time; and determining the collection script, request header, and request parameters as the parsing script.
[0109] In this embodiment, the written parsing script is a script used to parse the access data and obtain periodic result data. For example, in the case where the target device is a lamp, a parsing script can be written, and the parsing script is a collection script. The code in the collection script is to collect the lamp data once every predetermined time, and what data to collect. For example, data is collected once a day, and the collected data is the power consumption and lighting time of the lamp. Then, the collected data is the daily power consumption and lighting time of the lamp. The data is periodic (with days as the period). Therefore, the collected data has a periodic pattern and can be stored in a time series database when stored.
[0110] In one example, adding scripts corresponding to request headers and request parameters to form a parsing script includes: writing a collection script for collecting associated data, wherein the collection script is used to associate the data of each request parameter with the data of other request parameters among multiple collected request parameters; and determining the collection script, request header, and request parameters as a parsing script.
[0111] In this embodiment, for a target device, there may be multiple data that are interrelated. For example, for a central air conditioner, the collected data may be cooling capacity, water temperature of the water inlet and outlet, motor speed, temperature, etc., and the data are related to each other. Therefore, when writing the collection script in the parsing script, it is necessary to write a collection script that collects multiple data of the target device at the same time. If it is periodic collection, then in combination with the above example, periodic collection is performed. If it is non-periodic collection, it can be real-time monitoring, real-time collection, or irregular collection. Taking the above central air conditioner as an example, the collected data includes cooling capacity, water temperature of the water inlet and outlet, motor speed, and temperature. These parts of data are interrelated and establish a connection relationship with each other as the result data of the central air conditioner. The central air conditioner can also have other data, but the collection script may not collect it. The data not collected means that it is not used. For the collected data, since it is a variety of data with an associated relationship, it can be stored in a relational database.
[0112] In one embodiment, adding scripts corresponding to the request header and request parameters to form a parsing script can be used to write a collection script that traverses the collected data, wherein the collection script is used to collect data of the request parameters each time the request parameters generate new data; the collection script, request header and request parameters are determined as the parsing script.
[0113] In this embodiment, for a target device, the data that may need to be collected may not be generated at any time, but may be generated irregularly. For example, for an elevator, the people riding the elevator and the floors of the elevator are not fixed, and there is a lot of randomness. Therefore, the running time and floor data can be collected after the elevator runs. At this time, the collection script written is a script that collects running data after the elevator runs, and collects the running time point and the running floor after the elevator runs. For this part of the data, since the data is random, it can be stored in a distributed database. And since there are multiple items of collected data, which are multiple related data of the elevator, they can also be stored in a relational database. If multiple elevator data are collected, such as collecting three items of data, two of which are related, they can be stored in a relational database, and the remaining one item of data is not related and is random, then the data of the elevator can be separated separately and stored in a distributed database.
[0114] In one embodiment, adding scripts corresponding to the request header and request parameters to form a parsing script can be used to write a data monitoring type collection script, wherein the collection script is used to monitor the status of the request parameters, and when the status changes, the changed status is collected; the collection script, request header and request parameters are determined as a parsing script.
[0115] In this embodiment, when writing a collection script, a script for collecting the status of the target device can be written. The purpose of the script is to collect the status of the target device so as to perform status monitoring. The script can be used in scenarios where the status of devices is to be monitored in batches. For example, smoke alarms, cameras, etc. in a building can be monitored in batches through the script. When any smoke alarm and camera are connected to the building intelligent control system, the status can be monitored through the script.
[0116] like Fig.14 As shown, the embodiment of the present application provides a building intelligent control device, including a processor 111, a communication interface 112, a memory 113 and a communication bus 114, wherein the processor 111, the communication interface 112, and the memory 113 communicate with each other through the communication bus 114.
[0117] Memory 113, used for storing computer programs;
[0118] In one embodiment of the present application, the processor 111 is used to implement the building intelligent control method provided by any one of the aforementioned method embodiments when executing the computer program stored in the memory 113.
[0119] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the building intelligent control method provided in any of the aforementioned method embodiments are implemented.
[0120] The device embodiments described above are merely illustrative, wherein 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 modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0122] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0123] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A building intelligent control method, characterized in that: include: Obtain the access protocol of the target device to be connected to the building system; According to the access protocol, determining a parsing script corresponding to the access protocol; Parsing the access data of the target device using the parsing script; The result data obtained by parsing the access data is stored in a database.
2. The method according to claim 1, characterized in that The determining, according to the access protocol, a parsing script corresponding to the access protocol comprises: Determine a parsing script set corresponding to the access protocol, wherein each script in the parsing script set corresponds to the access protocol; A script is selected from the parsing script set as the parsing script.
3. The method according to claim 1, characterized in that The storing the result data obtained by parsing the access data into a database comprises: Determining data characteristics of the result data; According to the data characteristics, determining a target database from a plurality of databases; The result data is stored in the target database.
4. The method according to claim 3, characterized in that Determining a target database from a plurality of databases according to the data characteristics includes: When the data characteristics of the result data indicate that the result data is data recorded according to a time period, storing the result data in a time series database; or, When the data characteristics of the result data indicate that the result data is multi-attribute data, storing the result data in a relational database; or, When the data characteristics of the result data indicate that the result data is irregular data, storing the result data in a distributed database; or, When the result data is the status data of the target device, the result data is stored in a memory database.
5. The method according to claim 4, characterized in that Before determining a parsing script corresponding to the access protocol according to the access protocol, the method further includes: Create a dataset through the script editing interface; Determine a request header and request parameters of the data set; Add a script corresponding to the request header and the request parameter to form a parsing script.
6. The method according to claim 5, characterized in that The adding of the script corresponding to the request header and the request parameter to form a parsing script includes: Writing a collection script for periodically collecting data, wherein the collection script is used to collect data of the request parameters of the target device once every predetermined period of time; The collection script, the request header and the request parameters are determined as the parsing script.
7. The method according to claim 5, characterized in that The adding of the script corresponding to the request header and the request parameter to form a parsing script includes: Writing a collection script for collecting associated data, wherein the collection script is used to associate the data of each request parameter with the data of other request parameters among the collected multiple request parameters; The collection script, the request header and the request parameters are determined as the parsing script.
8. The method according to claim 5, characterized in that The adding of the script corresponding to the request header and the request parameter to form a parsing script includes: Writing a collection script for traversing and collecting data, wherein the collection script is used to collect data of the request parameter each time the request parameter generates new data; The collection script, the request header and the request parameters are determined as the parsing script.
9. The method according to claim 5, characterized in that The adding of the script corresponding to the request header and the request parameter to form a parsing script includes: Writing a data monitoring collection script, wherein the collection script is used to monitor the state of the request parameter, and when the state changes, collect the changed state; The collection script, the request header and the request parameters are determined as the parsing script.
10. A building intelligent control device, characterized in that: include: An acquisition module, used to acquire an access protocol of a target device to be connected to a building system; A determination module, configured to determine a parsing script corresponding to the access protocol according to the access protocol; A parsing module, used for parsing the access data of the target device using the parsing script; The storage module is used to store the result data obtained by parsing the access data into a database.
11. A building intelligent control system, characterized in that: include: A digital base is used to obtain the access protocol of the target device to be connected to the building system; According to the access protocol, determining a parsing script corresponding to the access protocol; Parsing the access data of the target device using the parsing script; Storing result data obtained by parsing the access data in a database; A visual editor for editing the parsing script; The management terminal is used to view the data in the database.
12. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; The memory is used to store a computer program; and the processor is used to implement the method according to any one of claims 1 to 9 when executing the computer program.
13. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Intelligent Internet of Things platform
CN110601876A
Protocol analysis method and device for Internet of Things equipment
CN111447227A
Multi-source heterogeneous industrial protocol message analysis method, system, equipment and medium
CN114827306A
Protocol data conversion method and device, storage medium and electronic equipment
CN115550462A
Cloud based IoT Middleware System
KR1020170089119A