Disclosure of Invention
In order to overcome the problems in the related art at least to a certain extent, the application provides a distributed controller and a distributed automatic control system, which are beneficial to solving the problem that the monitoring management is hindered by the difference of a bottom heterogeneous system.
In order to achieve the purpose, the following technical scheme is adopted in the application:
in a first aspect,
the application provides a distributed controller, includes:
the hardware interface layer is configured with a plurality of drive library files which form corresponding relations with a plurality of hardware interfaces;
the protocol component layer is configured with a plurality of protocol template components;
the point location logic layer is configured with a database and a plurality of logic components;
wherein the content of the first and second substances,
the hardware interface layer is used for configuring an enabled hardware interface and sending an Inode identifier to the protocol component layer;
the protocol component layer is used for configuring a protocol template component for an enabled hardware interface, acquiring data corresponding to the enabled hardware interface through the Inode identifier and analyzing the data by using the corresponding protocol template component;
the point location logic layer is used for receiving the analysis data sent by the protocol component layer and the corresponding protocol template component and storing the analysis data and the corresponding protocol template component in the database; and marking the data bits of the corresponding analysis data according to the protocol template component to obtain a unique identifier corresponding to each functional point, and monitoring by utilizing various logic components based on the unique identifier.
Further, the hardware interface layer is configured to enable a hardware interface, including:
enabling the corresponding drive library file in response to an enabling request of a user for a specified hardware interface; and/or the presence of a gas in the gas,
and enabling the corresponding drive library file when detecting that the hardware interface forms electric connection.
Further, the protocol component layer is configured to configure a protocol template component for the enabled hardware interface, and includes:
responding to a protocol configuration request submitted by a user aiming at an enabled hardware interface, and configuring a protocol template component for the enabled hardware interface; and/or the presence of a gas in the gas,
and acquiring the protocol type information of the equipment connected with the enabled hardware interface through the Inode identifier, and configuring a protocol template component for the enabled hardware interface according to the acquired protocol type information.
Furthermore, the hardware interface layer is provided with a hardware interface library for storing various drive library files and carrying out unified call management on the various drive library files through a Daemon process;
the protocol component layer is provided with a protocol module library used for storing various protocol template components.
Further, the point location logic layer performs monitoring processing by using various logic components based on the unique identifier, including:
generating a corresponding service process according to the logic component, wherein the service process acquires point location data in the database through the unique identifier;
and carrying out logic judgment through the logic component according to the point location data, and issuing a corresponding control instruction to corresponding equipment through the unique identifier when a judgment condition is triggered.
Further, the issuing a corresponding control instruction to a corresponding device through the unique identifier includes:
and finding the protocol template component corresponding to the corresponding equipment through the unique identifier, and issuing the corresponding control instruction to the corresponding equipment through a corresponding hardware interface.
Further, the distributed controller further includes:
and the business service layer is configured with a plurality of platform protocol templates and is used for configuring corresponding platform protocol templates for the upper computer, responding to a data request of the upper computer and transmitting data in the database to the upper computer by using the configured platform protocol templates.
Further, the data in the database are transmitted to the upper computer by using the configured platform protocol template, and the method comprises the following steps:
and when the upper computer requests data through the unique identifier, acquiring corresponding point location data in the database according to the unique identifier, forming a new protocol frame according to a configured platform protocol template, and transmitting the point location data to the upper computer by using the new protocol frame.
In a second aspect of the present invention,
the application provides a distributed autonomous system, includes:
an upper computer; and
a plurality of the distributed controllers described in any one of the above, each connected to the upper computer.
Furthermore, the distributed automatic control system is a building distributed automatic control system.
This application adopts above technical scheme, possesses following beneficial effect at least:
through the function framework of the distributed controller, the driver library file and the protocol template component can be expanded and configured in the hardware interface layer and the protocol component layer, flexible configuration of the heterogeneous protocol template component can be achieved, different protocols of different subsystem equipment can be compatible, the unique identifier of each function point position can be obtained through the point position logic layer, monitoring and management can be conducted on the protocol heterogeneous subsystem equipment, and therefore the problem that monitoring and management are hindered by differences of a bottom heterogeneous system is facilitated to be solved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a functional architecture of a distributed controller according to an exemplary embodiment, and as shown in fig. 1, the distributed controller 11 includes:
the hardware interface layer is configured with a plurality of drive library files which form corresponding relations with a plurality of hardware interfaces;
the protocol component layer is configured with a plurality of protocol template components;
the point location logic layer is configured with a database and a plurality of logic components;
wherein the content of the first and second substances,
the hardware interface layer is used for configuring an enabled hardware interface and sending an Inode identifier to the protocol component layer;
the protocol component layer is used for configuring a protocol template component for an enabled hardware interface, acquiring data corresponding to the enabled hardware interface through the Inode identifier, analyzing the data by using the corresponding protocol template component, and storing the analyzed data and the corresponding protocol template component in the database;
the point location logic layer is used for marking data bits of corresponding data according to a protocol template to obtain a unique identifier corresponding to each functional point location, and monitoring by utilizing various logic components based on the unique identifier.
As shown in fig. 1, the present application provides a new function hierarchy architecture of a distributed controller, which helps to make the internal logic implementation of the distributed controller more flexible and the function extension of each hierarchy more excellent. The functional layer levels are further explained below.
As shown in fig. 1, in an embodiment, the hardware interface layer has a hardware interface library for storing various drive library files, and performs unified call management on the various drive library files through a Daemon process; the protocol component layer is provided with a protocol module library used for storing various protocol template components.
The hardware interface layer CAN be configured with a hardware interface library to store various drive library files corresponding to various hardware interfaces, taking a building controller as an example, common hardware interfaces of a building are CAN, RS485, ethernet interfaces and the like, each hardware interface forms a corresponding drive library file, a user CAN add the corresponding drive library file in the hardware interface layer by himself, for example, the RS485 communication interface generates librs485.so, the CAN communication interface generates libcan. so, the ethernet communication interface libeth. so and the like, and CAN carry out unified calling management through a Daemon process, so that the drive library files are not interfered with each other, each drive library file CAN be equivalent to a plug-in, the hardware interface layer CAN realize plug-in type management through the Daemon process, so that the enabled hardware interface is realized, and the data transmission function of the related hardware interface is configured and completed.
The protocol component layer may be configured with a protocol template library to store various protocol template components (specifically as shown in fig. 1), so as to implement various heterogeneous protocol integration. In practical application, a user can write a protocol template component into a jar packet through a java language and perform corresponding calling, the user can add the corresponding jar packet in a protocol component layer, for example, the Modbus protocol is used for communication in a heating and ventilation system, the data can be analyzed by calling the corresponding Modbus. Similarly, each protocol template component can be equivalent to a plug-in, and plug-in management of each protocol template component can be realized through a protocol component layer, so that flexible configuration of heterogeneous protocol template components can be realized, and different protocols of different subsystems are compatible.
In one embodiment, the hardware interface layer is to configure an enabled hardware interface, including:
and enabling the corresponding drive library file in response to an enabling request of a user for the specified hardware interface.
Specifically, the user may complete configuring the hardware interface layer by operating the enabled corresponding drive library file on the upper computer according to a specific interface of the access device. For example, the heating and ventilation system adopts an RS485 interface, a user can perform configuration operation on an upper computer, an enable request is sent to the RS485 interface where the controller is connected with the heating and ventilation system, and the hardware interface layer enables a corresponding drive library file through Daemon to enable the hardware interface to become an enable hardware interface.
In another embodiment, the hardware interface layer is to configure an enabled hardware interface, including:
and enabling the corresponding drive library file when detecting that the hardware interface forms electric connection.
The scheme is that the hardware interface layer carries out automatic enabling configuration according to the accessed hardware interface. Specifically, for example, when the user accesses the RS485 interface of the heating and ventilation system to the controller, the hardware interface layer detects that the hardware interface forms an electrical connection, and thus, the hardware interface layer enables the driver library file corresponding to the hardware interface through the Daemon process, and the hardware interface becomes an enabled hardware interface.
After the hardware interface layer is configured with an enabled hardware interface, the hardware interface layer correspondingly sends an Inode identifier to the protocol component layer.
In one embodiment, the protocol component layer is configured to configure a protocol template component for an enabled hardware interface, comprising:
the protocol template component is configured for the enabled hardware interface in response to a protocol configuration request submitted by a user for the enabled hardware interface.
Specifically, for example, the heating and ventilation system uses a Modbus protocol for communication, and a user configures a protocol component layer through an upper computer according to the Modbus protocol adopted by the heating and ventilation system, operates on the upper computer, submits a protocol configuration request to an enabling hardware interface corresponding to the heating and ventilation system, and configures a Modbus protocol template component to the enabling hardware interface corresponding to the heating and ventilation system.
In another embodiment, the protocol component layer is configured to configure a protocol template component for an enabled hardware interface, comprising:
and acquiring the protocol type information of the equipment connected with the enabled hardware interface through the Inode identifier, and configuring a protocol template component for the enabled hardware interface according to the acquired protocol type information.
Specifically, after the hardware interface layer is configured with an enabled hardware interface, the hardware interface layer correspondingly sends an Inode identifier to the protocol component layer. Still taking the example of using the Modbus protocol to perform communication in the heating and ventilation system, the protocol component layer determines the enabled hardware interface corresponding to the heating and ventilation system by receiving the Inode identifier to obtain some information of the heating and ventilation system, where the information includes protocol type information of the heating and ventilation system, and the like.
Different system devices transmit data through different transmission protocols, for example, a heating and ventilation system transmits data by using a Modbus protocol, and after a protocol component layer configures corresponding protocol template components for different enabled hardware interfaces, the protocol component layer can further determine corresponding enabled hardware interfaces according to the Inode identifier and acquire the data transmitted by the corresponding system devices. And acquiring data corresponding to the enabled hardware interface through the Inode identifier, and analyzing the data by using a corresponding protocol template component, thereby being beneficial to solving the problem of data acquisition caused by the difference of a bottom heterogeneous system.
And the protocol component layer sends the analysis data and the corresponding protocol template component to the point location logic layer, and the point location logic layer stores the analysis data and the corresponding protocol template component in a database. In practical applications, as shown in fig. 1, the database may be a Redis database.
In a specific application, a user may perform point location configuration on the function points of each subsystem device through the upper computer, where each function point of each subsystem device is described by a point location, for example, the on/off function of an air conditioner internal unit in the heating and ventilation system is described as one function point location in the distributed controller 11. Referring to fig. 2, fig. 2 is a schematic flow chart illustrating point location configuration according to an exemplary embodiment, where the point location configuration of each function point is completed through a unique identifier corresponding to each function point. The point location logic layer obtains the unique identifier of each functional point location of each system device by using the stored analysis data and the corresponding protocol template component. Specifically, the point location logic layer performs data bit marking on corresponding data according to the protocol template to obtain a unique identifier corresponding to each functional point location, please refer to fig. 3, where fig. 3 is a schematic diagram illustrating data bit marking under the Modbus protocol of the heating and ventilation system according to an exemplary embodiment. And after the point location logic layer obtains the unique identifier of each functional point location of each system device, logic monitoring is carried out on each bottom layer heterogeneous system device according to the unique identifier, and edge side monitoring management is carried out on each system device.
In the method, the point location logic layer marks corresponding data according to the protocol template to obtain unique identifiers corresponding to the functional point locations, logic monitoring is performed on the bottom heterogeneous system devices according to the unique identifiers, the problem that monitoring management is hindered by differences of the bottom heterogeneous system devices can be solved, interconnection and intercommunication of subsystem data can be achieved, multi-service data are concurrently processed, and accordingly regional data autonomy is achieved.
In one embodiment, the point location logic layer performs monitoring processing using a variety of logic components based on the unique identifier, including:
generating a corresponding service process according to the logic component, wherein the service process acquires point location data in the database through the unique identifier;
and carrying out logic judgment through the logic component according to the point location data, and issuing a corresponding control instruction to corresponding equipment through the unique identifier when a judgment condition is triggered.
Further, the issuing a corresponding control instruction to a corresponding device through the unique identifier includes:
and finding the protocol template component corresponding to the corresponding equipment through the unique identifier, and issuing the corresponding control instruction to the corresponding equipment through a corresponding hardware interface.
Specifically, as shown in fig. 1, the point location logic layer stores various logic components, which can be managed by logic processes in a unified manner, taking a logic component as an example, when detecting that there exists a py logic file, a corresponding service process is generated, the service process acquires point data in the Redis database through a unique identifier, the monitored point location is logically determined through the py logic file, when the building controller acquires input condition trigger in the logic condition, for example, when detecting trigger information of an infrared detector in a corridor, the building controller performs relevant control according to configuration logic output conditions, for example, automatically turning on equipment in a certain room, such as electric lamps, air conditioners and the like, the building controller finds out relevant subsystem equipment protocol component template information through the unique identifier, and completes control through a corresponding hardware interface and sends the information to relevant subsystem equipment, the logic control of the subsystem can be realized on the edge side of the building controller without the logic judgment of an upper computer platform.
Referring to fig. 1, in an embodiment, the distributed controller 11 further includes:
the service layer is used for configuring corresponding platform protocol templates for the upper computer, responding to a data request of the upper computer and transmitting data in the database to the upper computer by using the configured platform protocol templates.
Specifically, the business service layer is configured with a plurality of platform protocol templates, plug-in management can be performed on each platform protocol template according to the transmission protocol type of the upper computer, and then flexible configuration of heterogeneous platform protocol templates can be realized to enable the platform protocol templates to be upwards compatible with a specific transmission protocol of the upper computer, so that data in the point logic layer database is uploaded to the upper computer through a unified protocol interface.
In one embodiment, the transmitting data in the database to the upper computer by using the configured platform protocol template includes:
and when the upper computer requests data through the unique identifier, acquiring corresponding point location data in the database according to the unique identifier, forming a new protocol frame according to a configured platform protocol template, and transmitting the point location data to the upper computer by using the new protocol frame.
Referring to fig. 4, fig. 4 is a schematic structural diagram illustrating a distributed automation system according to an exemplary embodiment, and as shown in fig. 4, the distributed automation system 1 includes:
an upper computer 12; and
the distributed controllers 11 are connected to the upper computer 12.
With regard to the distributed automation system 1 in the above embodiment, the specific implementation thereof has been described in detail in the above related embodiment, and will not be elaborated herein.
Further, the distributed autonomous system 1 may be a building distributed autonomous system 1.
Specifically, the upper computer 12 is connected to each distributed controller 11, and each distributed controller 11 is connected to each corresponding subsystem (for example, a heating and ventilating subsystem, a lighting subsystem, etc.)
The distributed autonomous system 1 can also be applied to management of plant equipment and the like.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that, in the description of the present application, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In addition, in the description of the present application, the meaning of "plurality" means at least two unless otherwise specified.
It will be understood that when an element is referred to as being "secured to" or "disposed on" another element, it can be directly on the other element or intervening elements may also be present; when an element is referred to as being "connected" to another element, it can be directly connected to the other element or intervening elements may also be present, and further, as used herein, connected may include wirelessly connected; the term "and/or" is used to include any and all combinations of one or more of the associated listed items.
Any process or method descriptions in flow charts or otherwise described herein may be understood as: represents modules, segments or portions of code which include one or more executable instructions for implementing specific logical functions or steps of a process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present application may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.