CN111651332A - Large-scale heterogeneous equipment integrated control method based on message middleware - Google Patents

Large-scale heterogeneous equipment integrated control method based on message middleware Download PDF

Info

Publication number
CN111651332A
CN111651332A CN202010742158.1A CN202010742158A CN111651332A CN 111651332 A CN111651332 A CN 111651332A CN 202010742158 A CN202010742158 A CN 202010742158A CN 111651332 A CN111651332 A CN 111651332A
Authority
CN
China
Prior art keywords
service
equipment
attribute
database
client
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010742158.1A
Other languages
Chinese (zh)
Other versions
CN111651332B (en
Inventor
余冰
安宝冉
曾司凤
孙黎
李立
邓金华
刘子龙
吴淮
任强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
COMPUTER APPLICATION RESEARCH INST CHINA ACADEMY OF ENGINEERING PHYSICS
Original Assignee
COMPUTER APPLICATION RESEARCH INST CHINA ACADEMY OF ENGINEERING PHYSICS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by COMPUTER APPLICATION RESEARCH INST CHINA ACADEMY OF ENGINEERING PHYSICS filed Critical COMPUTER APPLICATION RESEARCH INST CHINA ACADEMY OF ENGINEERING PHYSICS
Publication of CN111651332A publication Critical patent/CN111651332A/en
Application granted granted Critical
Publication of CN111651332B publication Critical patent/CN111651332B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM]
    • G05B19/4185Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS], computer integrated manufacturing [CIM] characterised by the network communication
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0208Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterized by the configuration of the monitoring system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3041Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is an input/output interface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/10Plc systems
    • G05B2219/11Plc I-O input output
    • G05B2219/1113Address setting
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Abstract

The invention discloses a large-scale heterogeneous equipment integrated control method based on message middleware, wherein all controlled objects in large-scale heterogeneous equipment are abstracted into an equipment consistency access model which has a uniform interface and is irrelevant to position; the control system adopting the access model is configured to comprise a service end for providing equipment service, a database end for providing database service and a client; and the command and attribute read-write function of a plurality of devices is realized through the publish/subscribe mechanism of the message middleware. The invention provides a large-scale heterogeneous equipment integrated control method based on message middleware, which can conveniently and flexibly realize the rapid integration and group monitoring of large-scale heterogeneous equipment when a device is scientifically arranged in a control system by setting a consistency access model and a control system matched with the consistency access model, and has good coupling, expandability and maintainability so as to meet the requirement of long-period operation of the device.

Description

Large-scale heterogeneous equipment integrated control method based on message middleware
Technical Field
The invention relates to the field of control systems for complex devices. More particularly, the invention relates to a large-scale heterogeneous device integration control method based on message middleware.
Background
The main task of the scientific device control system is system integration, a large number of instrument instruments and self-research equipment exist in the control system, and meanwhile, complex control requirements such as experimental data transmission, scientific calculation and the like need to be met. The control system has the characteristics of various controlled devices, complex communication protocols, large control scale, long operation period, variable control requirements and the like, requires integrated control software to have good coupling, maintainability and expandability, ensures the rapid development and simulation verification of the scientific device control system, and ensures the efficient, safe and reliable operation of the device and the control system in a long life cycle.
The traditional SCADA software is convenient to use, but the requirements of quick integration and complex control of various heterogeneous devices are difficult to realize; the distributed software framework directly based on the object-oriented middleware can quickly complete the integration of the control system, but has strong coupling, poor reusability and difficult software upgrading; the distributed software framework based on the SOA framework has good coupling, expandability and maintainability, but cannot meet the requirements of large-scale equipment group control and monitoring. That is, none of the prior art can realize integration
Disclosure of Invention
An object of the present invention is to solve at least the above problems and/or disadvantages and to provide at least the advantages described hereinafter.
The invention also aims to provide a large-scale heterogeneous equipment integrated control method based on message middleware, which can conveniently and flexibly realize the rapid integration and group monitoring of large-scale heterogeneous equipment when a device control system is scientifically arranged by setting a consistency access model and a control system matched with the consistency access model, and has good coupling, expandability and maintainability so as to meet the requirement of long-period operation of the device.
To achieve these objects and other advantages in accordance with the present invention, there is provided a large-scale heterogeneous device integration control method based on message middleware, comprising:
abstracting all controlled objects in large-scale heterogeneous equipment into an equipment consistency access model which has a uniform interface and is independent of position;
the control system adopting the access model is configured to comprise a service end for providing equipment service, a database end for providing database service and a client;
under the equipment consistency access model, the database service realizes the persistence, the authority control and the naming service of the equipment configuration parameters; the equipment service is used as an equipment container to realize the consistency access of the equipment and the related general functions of alarming, filing and logging; the client API accesses the equipment through parameterizing the equipment name and provides related functions of synchronization/asynchronization, release/subscription and group calling so as to realize point-to-point and one-to-many communication;
the control system is configured to realize the command and attribute read-write function of the multiple devices through the publish/subscribe mechanism of the message middleware.
Preferably, the access model encapsulates all hardware devices, business logic, algorithms, buses, into soft device objects with the same commands and attributes;
the software framework of the access model is configured to adopt a service-oriented SOA architecture, so that a user can realize the rapid integration and real-time monitoring of large-scale heterogeneous equipment through a client application programming API (application programming interface).
Preferably, the access model is configured to implement consistent access of heterogeneous devices by using serialization and reflection mechanisms, so as to abstract all the heterogeneous devices into abstract interfaces with the same attribute and command, and further implement a corresponding relationship between a command name, a command pointer and a specific function implementation by using a key value, so that a user implements a corresponding function by using a corresponding execution code segment.
Preferably, the device service determines whether the attribute triggers a corresponding alarm or archive event by periodically polling the device attribute, and issues the data in the form of an event, and meanwhile, the relevant configuration parameters can be persisted in a database.
Preferably, the control system is configured to adopt zeromq as communication middleware to realize synchronous/asynchronous, publish/subscribe and group call functions of the client through the request, response, publish/subscribe communication mode and pipeline mode provided by the control system;
the control system packages the middleware into a communication class, packages the database into a data access class, packages the data type into an equipment data class and packages the abnormal information into an abnormal class;
each device in the control system comprises a persistent device attribute, a device command and a device attribute, and each device object comprises an object command and an object attribute so as to realize a function call function through the object command and realize an attribute value read-write function through the object attribute;
each device in the control system has a unique network address as a service ID, each device service has a unique service process name as a service ID and is persistently stored in a database, when the device service is started, the service ID and the device ID are registered in the database, the uniqueness of related device service and device in the same database is ensured, and the client retrieves the network address of the device service from the database service according to the device name address and establishes a connection relation with the system service.
Preferably, the database service provides a multi-device control interface for the client, and the database issues a control command to the device service through an event mechanism and realizes control of multiple devices; the reading of the multiple device values of a single process is realized through the device service process.
Preferably, the device service is a process, and when the device service is started, the class name and the device name included in the process are read from the database service according to the device service process ID, the related class dynamic library is called, and the correspondence between the device name and the device class is created in a key-value form according to the information.
Preferably, the client packages the device object as a device agent, and establishes contact with the device object through device name, anonymous access or user name and password access;
the client commands realize a plurality of input parameters and no more than 1 output parameter in a reloading mode;
the client packages the group command operation into a group agent class so as to realize a plurality of or hierarchical device object commands and attribute operations through the class;
the client obtains the network address of the equipment object through the database service and is connected with the equipment object according to the network address.
Preferably, when the group device is controlled by the control system, the user adds a plurality of device names through the group device proxy, the client registers the subscription function to the related device service according to the device names and sets a unique ID to the group, the group device realizes naming assignment of a plurality of devices in a release manner, and the system service updates a plurality of pieces of device attribute information simultaneously through an event mechanism so as to realize control and monitoring of the group device.
The invention at least comprises the following beneficial effects: first, the control method of the invention can meet the requirements of rapid integration and multi-equipment rapid control of various hardware equipment of scientific devices or other complex devices. According to the method, all hardware equipment, service logic, algorithms, buses and the like are packaged into soft equipment objects with the same commands and attributes, a user can realize the rapid integration and real-time monitoring of large-scale heterogeneous equipment through a client API (application program interface), and meanwhile, a software framework adopts an SOA (service oriented architecture), so that the method has the characteristics of loose coupling, standardization, coarse granularity, reusability and the like, and meets the control requirements of rapid integration and long-period operation of a scientific device control system.
Secondly, the control method of the invention allows a user to realize the rapid integration of various heterogeneous devices through control software, and realizes the high-efficiency control and real-time monitoring of a plurality of devices through an event mechanism, thereby meeting the requirement of the parallel control of a scientific device control system, and the loose coupling architecture also ensures the high-efficiency, safe and reliable operation of the control system in a long life cycle.
Additional advantages, objects, and features of the invention will be set forth in part in the description which follows and in part will become apparent to those having ordinary skill in the art upon examination of the following or may be learned from practice of the invention.
Drawings
Fig. 1 is a block diagram illustrating the structural components of a large-scale heterogeneous device integrated control method based on message middleware according to an embodiment of the present invention;
FIG. 2 is a block diagram of an integrated control connection for heterogeneous devices in accordance with the present invention;
FIG. 3 is a diagram of a hierarchical distribution model of equipment service objects in the control method of the present invention;
FIG. 4 is a model diagram of a service object of the equipment in the control method of the present invention;
FIG. 5 is a flowchart illustrating a device service initiation process in the control method of the present invention;
FIG. 6 is a process diagram of a client accessing a control object in the control method of the present invention;
FIG. 7 is a schematic diagram of a client request/response implementation mechanism in the control method of the present invention;
FIG. 8 is a diagram of a client publish/subscribe implementation mechanism in the control method of the present invention;
FIG. 9 is a diagram of a multi-device control communication mechanism in the control method of the present invention.
Detailed Description
The present invention is further described in detail below with reference to the attached drawings so that those skilled in the art can implement the invention by referring to the description text.
It will be understood that terms such as "having," "including," and "comprising," as used herein, do not preclude the presence or addition of one or more other elements or groups thereof.
It is to be understood that in the description of the present invention, the terms indicating orientation or positional relationship are based on the orientation or positional relationship shown in the drawings, and are used only for convenience in describing the present invention and for simplification of the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus, should not be construed as limiting the present invention. In addition, the first and second embodiments are different descriptions of the same or similar devices and apparatuses.
Fig. 1 shows an implementation form of a large-scale heterogeneous device integration control method based on message middleware according to the present invention, which includes:
abstracting all controlled objects in large-scale heterogeneous equipment into an equipment consistency access model which has a uniform interface and is irrelevant to position, and performing consistency access on the heterogeneous equipment;
the control system adopting the access model is configured to comprise a service end for providing equipment service, a database end for providing database service and a client;
under the equipment consistency access model, the database service realizes the persistence, the authority control and the naming service of the equipment configuration parameters; the equipment service is used as an equipment container to realize the general functions of consistent access, alarm, filing, log correlation and the like of the equipment; the client API accesses the equipment through the parameterized equipment name and provides related functions of synchronization/asynchronization, release/subscription and group calling so as to realize various communication modes such as point-to-point, one-to-many and the like and provide a functional foundation for real-time monitoring of large-scale equipment;
the control system is configured to realize the command and attribute read-write function of the multiple devices through the publish/subscribe mechanism of the message middleware, and is used for meeting the requirements of group control and meeting the requirements of group control of tens of thousands of devices.
In another example, the access model encapsulates all hardware devices, business logic, algorithms, buses, as soft device objects with the same commands and attributes;
the software framework of the access model is configured to adopt a service-oriented SOA architecture, so that a user can realize the rapid integration and real-time monitoring of large-scale heterogeneous equipment through a client application programming API (application programming interface). The invention provides a large-scale heterogeneous equipment integrated control method based on message middleware, which can meet the requirements of rapid integration and multi-equipment rapid control of various hardware equipment of scientific devices or other complex devices. According to the control method in the scheme, all hardware equipment, service logic, algorithms, buses and the like are packaged into soft equipment objects with the same command and attribute, a user can realize the rapid integration and real-time monitoring of large-scale heterogeneous equipment through a client API (application programming interface), and meanwhile, a software framework adopts an SOA (service oriented architecture), so that the control method has the characteristics of loose coupling, standardization, coarse granularity, reusability and the like, and meets the control requirements of rapid integration and long-period operation of a scientific device control system.
In another example, the access model is configured to implement consistent access of heterogeneous devices by using serialization and reflection mechanisms, so as to abstract all the heterogeneous devices into abstract interfaces with the same attribute and command, and further implement a corresponding relationship between a command name, a command pointer and a specific function implementation by using a key value, so that a user implements a corresponding function by using a corresponding execution code segment.
In another example, the device service has functions of logging, alarming, archiving and the like, and judges whether the attribute triggers corresponding alarming and archiving events or not by periodically polling the device attribute, and issues data in the form of events, and meanwhile, related configuration parameters can be persisted in a database.
In another example, the control system is configured to use ZeroMQ as communication middleware to implement synchronous/asynchronous, publish/subscribe, and group call functions of clients through request, response, publish/subscribe communication mode, and pipe mode provided by the control system, ZMQ (ZeroMQ is abbreviated as ZMQ hereinafter) is a simple and easy-to-use transport layer, and a Socket library like a framework, which makes Socket programming simpler, and higher in performance. ZMQ is a message processing queue library, can be flexible between multiple threads, kernel and host box, compared with other message middleware, ZMQ is not like a message queue server in traditional sense, in fact, it is not a server at all, it is more like a bottom network communication library, a layer of encapsulation is made on Socket API, network communication, process communication and thread communication are abstracted into uniform API interface, control software is composed of database service, equipment service and client API, wherein, the database service realizes persistence and naming service of configuration parameters; the equipment service is used as an equipment container to realize the general functions of consistent access, alarm, filing, log and the like of the equipment; the client API accesses the equipment through the parameterized equipment name and provides the functions of synchronization/asynchronization, release/subscription, group call and the like; the log information saves field information such as log source, log generation time, log level, log background and the like, referring to log4j log format, the log information can be output in the form of text file, console or event;
the control system packages the middleware into a communication class, so that a user does not need to care about the calling details of the middleware, packages the database into a data access class, can select a data storage mode according to requirements, packages the data type into an equipment data class, packages abnormal information into an abnormal class comprising information such as abnormal codes, reasons, description and generation positions and can record a plurality of pieces of abnormal information;
each device in the control system comprises a persistent device attribute, a device command and a device attribute, the parameters of the persistent device attribute, the device command, the device attribute and the like can be persisted in a database, a user can configure related parameters through a database API, each device object comprises an object command and an object attribute so as to realize a function calling function through the object command, a reading and writing function of an attribute value is realized through the object attribute, and the input and output parameters of the device command adopt any data type to transmit data; the device attribute simultaneously comprises field information such as data type, data format, read-write performance, attribute name and data value;
packaging the data type into an equipment data class, supporting a C + + common data type, a scalar, a one-dimensional array, a two-dimensional array or a composite data type, such as list, map and the like, and serializing/deserializing the data into json, msgpack and other formats;
each device in the control system has a unique network address as a service ID, each device service has a unique service process name as a service ID and is persistently stored in a database, when the device service is started, the service ID and the device ID are registered in the database, the uniqueness of related device service and device in the same database is ensured, and the client retrieves the network address of the device service from the database service according to the device name address and establishes a connection relation with the system service.
The control system may set the plant properties to periodic, relative change, and absolute change events.
When the control system gives an alarm, the upper and lower alarm limits and the upper and lower alarm limits of the equipment attribute can be set, and an alarm event is generated.
The control system supports access right control based on role control.
The control system can be in a database which can be persisted by the related configuration information.
Specifically, in the scheme, the control software framework defines an IDL base class unique to the software framework, the client and the server communicate according to the interface, and forward compatibility of the software is ensured through the relationship between the version number and class inheritance. The interface comprises functions of command calling, attribute calling, command asynchronous calling, command synchronous calling, event configuration, event subscription, event cancellation and the like.
The enumeration defines the following data type CDataType: bone, int, char, uchar, int16, int32, int64, uint16, uint32, uint64, float, double, string, etc. Enumeration defines a data format type, CDataFormat, which includes scalars, one-dimensional tuples, and two-dimensional tuples. Enumeration defines data operation attributes CDataOpMode, including read-only, write-only, read-write, and the like.
The device data class CDeviceData is defined, as any data type, free conversion with a C + + data type can be achieved, and the data can be converted into serialized data such as text type or binary type.
The device attribute value CDeviceAttrValue is defined, and includes field information such as device data CDeviceData, data type CDataType, data format CDataFormat, readability CDataOpMode, and attribute name.
Defining an exception class CDeviceException, including 4 fields of exception code, reason, description and position information file, etc., storing in a list form, and supporting the functions of re-throwing exceptions and displaying exception information in a command line.
Defining communication connection class CDeviceConnection, providing various access functions for client and equipment service, and realizing communication function of zeroMQ through derivation class CDeviceZmqConnection.
Defining an event class CDeviceEvent, defining an abstract callback interface call back, integrating the class by a user, and realizing the processing logic of attribute event data.
The log level is defined in the format of log4j, and related character string streaming interfaces are provided, and the system automatically adds the field information of log source, log generation time, log generation position and the like.
The structural body defines alarm configuration parameters CAlarmParara, including field information such as alarm upper and lower limits, relative change values and relative change events.
The structure body defines an access authority configuration parameter CAccesspara, which comprises field information such as an ip address, a role, a user name, a process name, a class name, an equipment name, a function name, read-write attributes and default non-setting.
The structure body defines an archiving configuration parameter CArchivePara and comprises field information such as a relative change value, an absolute change value and a polling period.
As shown in fig. 2, in another example, the database service provides data persistence functions such as service registration, device archiving/alarm/event configuration functions, authority configuration, and historical operation records;
the database service can switch the data storage format by setting configuration parameters;
the database service provides a multi-device control interface for the client, and the database issues a control command to the device service through an event mechanism and realizes the control of a plurality of devices; the reading of a plurality of device values of a single process is realized through a device service process, and the setting of client user access authority through ip addresses, roles, user names, process names, class names, device names, function names, read-write attributes and other hierarchies is supported. Specifically, in the scheme, the database base class service provides functions of adding, deleting and modifying following information for users, such as device service names, device service attributes, device attributes and the like, start-stop information and state information of devices, device attribute filing information, alarm information and other configuration data, defines a functional interface as CDBServer, defines a database abstract access interface CDBClient, and integrates different databases to realize related database operations, such as CDBClientMysql and CDBClientSqlite. When the database service is started, the service realizes the dynamic switching of the database according to the dynamic database name and the database connection parameters of the configuration database, and binds the related port numbers of the computer.
The database service provides a naming service resolving function, and the client can obtain the state information of the equipment through the equipment name, wherein the state information comprises information such as whether the equipment is started or not, the network address of the equipment and the like.
The database service provides an access authority control function, and judges whether the client has the control function or not according to the information such as ip address, role, user name, process name, class name, equipment name, function name, read-write attribute and the like.
Defining a public class CDBUtil, and realizing the issuing of a group control command and other commands to equipment services through a zeroqpubsocket.
In another example, the device service is a process, and is composed of a process class, a device base class, a command base class, and an attribute base class, and all the device classes and the device abstract classes are derived from the same device class base class and the same device abstract base class. Each equipment class can be generated into an executable file with a uniform interface, when equipment service is started, the class name and the equipment name contained in the process are read from the database service according to the equipment service process ID, a related class dynamic library is called, and the corresponding relation between the equipment name and the equipment class is established in a key-value mode according to the information. The server-side equipment class stores the function command into the equipment command list in the form of a key-function base class pointer and stores the attribute into the attribute command list in the form of a key-attribute base class pointer. The function base class pointer can call a function specific implementation class, the attribute base class pointer can call an attribute implementation class, and a user can also dynamically create a plurality of attributes or commands in a soft coding mode.
And the server judges whether the client side allows the information such as inquiry, access time and the like according to the user authority configuration information.
The server can judge whether the client has the function access authority through the equipment state or the user-defined condition, and if not, the server throws out the exception.
The server judges whether the attributes trigger functions such as archiving, alarming, events and the like through one or more threads.
The server configures process parameters through the public class, and realizes functions of archiving, event issuing and the like.
When the server receives the group control command, the server realizes the quick response of the command through a plurality of threads in the thread pool.
Specifically, in this scheme, as shown in fig. 3-5, the device service definition command base class CCmdBase mainly includes a class name, whether to allow access, and two virtual functions called by a function; defining an attribute base class CATtrBase, mainly comprising an attribute name, whether access is allowed or not and an attribute calling two virtual storage functions.
Defining a device class base class CDeviceClassBase, mainly comprising a device list, a command list and an attribute list, and establishing a mapping relation with the device class base class according to a device name and an attribute/command name.
Defining a device base class CDeviceBase, mainly comprising a general function and an initialization virtual storage function of device operation, and deriving classes to realize specific function functions and initialization functions.
Defining a device process class CDeviceServer, and realizing the management of devices in the process, such as setting the functions of attribute polling time, log filing mode and the like.
Defining a public class CServerutil, realizing the receiving of a database event through a zeromqsubsocket, realizing the issuing of the event through the zeromqpub socket, and providing various public functions for equipment services. The event list receives a periodic event from equipment service or an event actively pushed by a function, and realizes the release of a related event through a thread; and receiving group events from the client, and realizing the parallel control of a plurality of devices through the thread pool. And judging whether events such as archiving, releasing and the like are triggered or not through the thread periodic polling attribute, releasing the events, and adding the related events into an event list if the events are triggered.
The event data contains the following field information: event name, event attribute.
In another example, the client packages the device object as a device agent, and establishes contact with the device object through device name, anonymous access or user name and password access;
the client command realizes a plurality of input parameters and no more than 1 output parameter in a heavy-load mode, a user inputs a command name and the input parameters through an API (application program interface) interface to access an equipment function, and the data type of the input and output parameters is an equipment data type and supports synchronous calling and asynchronous calling;
and the client attribute calling function provides an attribute reading and writing function. And writing the attribute value through the attribute name and the attribute value, and reading the attribute value through the attribute name.
The client can set the event type through the API interface and subscribe the device attribute; setting alarm parameters and subscribing alarm events; setting equipment filing parameters, storing filing information and the like.
The client encapsulates the group command operation into a group proxy class, and can realize multiple or hierarchical device object command and attribute operation through the class, namely supporting a point-to-point calling function and also supporting a function of calling the device command and attribute concurrently through broadcasting.
The client can access the database through the database proxy to configure the device configuration information and the user permission configuration information.
And the client configures client parameters and event reception through the public class.
The client obtains the network address of the equipment object through the database service and is connected with the equipment object according to the network address.
Specifically, in this scheme, as shown in fig. 6-8, the client defines a device proxy cdevicepxy, creates a device proxy by a device name, and provides functions such as synchronous call of command, attribute reading and writing, event configuration, and the like for a user. The equipment agent obtains equipment information and access authority information from the database service according to the equipment name, and if the equipment is not started, the equipment agent throws out the exception; if the connection is started, connection with the equipment service process is established according to the equipment service ip address and the port number, and if the connection is failed, the exception is thrown out. If the connection is established, reading the equipment information from the database service again when the connection fails again, and if the connection cannot be established, throwing the exception.
When a user uses the equipment agent, the user accesses the equipment service related function through the command name and realizes the input of one or more parameters in a overloading mode, the input parameters only need to use a C + + built-in data type, and the output data type uses CDeviceData; writing attribute values through attribute names and attribute values, wherein input parameters only need to use a C + + built-in data type; and reading the attribute value through the attribute name, and returning the data as CdeviceAtttrValue.
The client public class CClientUtil is defined, a zeromqsubsocket is used for subscribing a server event, an event thread screens event data through an event name, and a call-back function of the event is realized through a call-back pointer.
The client agent provides an interface to the outside as follows:
a) CDeviceDatacommand (function name, input parameter); // execute command
b) CDeviceData command (function name, input parameter 1, input parameter 2); // execute command
c) CDeviceData command (function name, input parameter 1, input parameter 2); // execute command
d) Void write _ value (attribute name, attribute value); // write attribute value
e) CduviceAtttrValue read _ value (attribute name)// read attribute value.
In another example, when the group device is controlled by the control system, a user adds a plurality of device names through a group device agent, a client registers a subscription function to a related device service according to the device names, and sets a unique ID to the group, the group device realizes naming assignment of a plurality of devices in a release manner, and the system service updates a plurality of pieces of device attribute information simultaneously through an event mechanism to realize control and monitoring of the group device. As shown in fig. 9, the group device control and monitoring mechanism is implemented, the client CGroupProxy implements a device group control interface through a group control interface of a database service, the database service provides an interface for commands, attribute reading, and attribute writing to the outside, and input parameters of the database service include function attribute names, a device name list, and input parameter values. When a function calls or writes an attribute value, the database issues data to a system service by an event mechanism, and the system service calls related equipment to realize and control functions through a thread pool; when the function calls the write attribute, the database service realizes the reading of a plurality of equipment attribute values through an equipment service process interface and returns the values to the client.
When the control command is issued, the array field comprises a function name, a device name list and an input parameter.
The client agent provides a group control interface to the outside as follows.
// function name input parameter output parameter
a) CDeviceDataListgroup _ command (…); // string-function name, CdivviceData-device name list, CdivviceData-input parameter;
b) void group _ write _ value (…); // string-attribute name, CdviceData-device name List, CdviceData-data value;
c) cdeviceatttrvaluelitlisgroup _ read _ value (); // string-attribute name, CdiviceData-device name list.
The above scheme is merely illustrative of the preferred embodiment, but not limiting. When the invention is implemented, appropriate replacement and/or modification can be carried out according to the requirements of users.
The number of apparatuses and the scale of the process described herein are intended to simplify the description of the present invention. Applications, modifications and variations of the present invention will be apparent to those skilled in the art.
While embodiments of the invention have been disclosed above, it is not intended to be limited to the uses set forth in the specification and examples. It can be applied to all kinds of fields suitable for the present invention. Additional modifications will readily occur to those skilled in the art. It is therefore intended that the invention not be limited to the exact details and illustrations described and illustrated herein, but fall within the scope of the appended claims and equivalents thereof.

Claims (9)

1. A large-scale heterogeneous equipment integrated control method based on message middleware is characterized by comprising the following steps:
abstracting all controlled objects in large-scale heterogeneous equipment into an equipment consistency access model which has a uniform interface and is independent of position;
the control system adopting the access model is configured to comprise a service end for providing equipment service, a database end for providing database service and a client;
under the equipment consistency access model, the database service realizes the persistence, the authority control and the naming service of the equipment configuration parameters; the equipment service is used as an equipment container to realize the consistency access of the equipment and the related general functions of alarming, filing and logging; the client API accesses the equipment through parameterizing the equipment name and provides related functions of synchronization/asynchronization, release/subscription and group calling so as to realize point-to-point and one-to-many communication;
the control system is configured to realize the command and attribute read-write function of the multiple devices through the publish/subscribe mechanism of the message middleware.
2. The message middleware-based large-scale heterogeneous device integration control method according to claim 1, wherein the access model encapsulates all hardware devices, business logic, algorithms, buses, as soft device objects having the same commands and attributes;
the software framework of the access model is configured to adopt a service-oriented SOA architecture, so that a user can realize the rapid integration and real-time monitoring of large-scale heterogeneous equipment through a client application programming API (application programming interface).
3. The message middleware-based large-scale heterogeneous device integration control method as claimed in claim 1, wherein the access model is configured to implement consistent access of heterogeneous devices by using serialization and reflection mechanisms, so as to abstract all heterogeneous devices into abstract interfaces with the same attribute and command, and further implement the corresponding relation of command names, command pointers and specific function implementation by means of key values, so that users can implement corresponding functions through corresponding execution code segments.
4. The message middleware-based large-scale heterogeneous device integration control method of claim 1, wherein the device service judges whether the attribute triggers a corresponding alarm and archive event by periodically polling the device attribute, and issues the data in the form of an event, and meanwhile, the related configuration parameters can be persisted in a database.
5. The message middleware-based large-scale heterogeneous device integration control method according to claim 1, wherein the control system is configured to adopt zeromq as communication middleware to implement synchronous/asynchronous, publish/subscribe and group call functions of clients through request, response, publish/subscribe communication mode and pipeline mode provided by the control system;
the control system packages the middleware into a communication class, packages the database into a data access class, packages the data type into an equipment data class and packages the abnormal information into an abnormal class;
each device in the control system comprises a persistent device attribute, a device command and a device attribute, and each device object comprises an object command and an object attribute so as to realize a function call function through the object command and realize an attribute value read-write function through the object attribute;
each device in the control system has a unique network address as a service ID, each device service has a unique service process name as a service ID and is persistently stored in a database, when the device service is started, the service ID and the device ID are registered in the database, the uniqueness of related device service and device in the same database is ensured, and the client retrieves the network address of the device service from the database service according to the device name address and establishes a connection relation with the system service.
6. The message middleware-based large-scale heterogeneous device integration control method according to claim 1, wherein a database service provides a multi-device control interface to a client, the database issues a control command to the device service through an event mechanism, and realizes control of a plurality of devices; the reading of the multiple device values of a single process is realized through the device service process.
7. The message middleware-based large-scale heterogeneous device integration control method as claimed in claim 1, wherein the device service is a process, and when the device service is started, the class name and the device name included in the process are read from the database service according to the device service process ID, the related class dynamic library is called, and the correspondence between the device name and the device class is created in a key-value form according to the information.
8. The message middleware-based large-scale heterogeneous device integration control method according to claim 1, wherein the client packages the device object as a device agent, and establishes contact with the device object through device name, anonymous access or access through user name and password;
the client commands realize a plurality of input parameters and no more than 1 output parameter in a reloading mode;
the client packages the group command operation into a group agent class so as to realize a plurality of or hierarchical device object commands and attribute operations through the class;
the client obtains the network address of the equipment object through the database service and is connected with the equipment object according to the network address.
9. The message middleware-based large-scale heterogeneous device integration control method according to claim 1, wherein when the control system is controlling group devices, a user adds a plurality of device names through a group device agent, the client registers a subscription function to a related device service according to the device names and sets a unique ID to the group, the group devices realize naming assignment of the plurality of devices in a publishing manner, and the system service simultaneously updates a plurality of pieces of device attribute information through an event mechanism to realize control and monitoring of the group devices.
CN202010742158.1A 2020-02-24 2020-07-29 Message middleware-based large-scale heterogeneous equipment integrated control method Active CN111651332B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2020101120699 2020-02-24
CN202010112069.9A CN111367758A (en) 2020-02-24 2020-02-24 Large-scale heterogeneous equipment integrated control method based on message middleware

Publications (2)

Publication Number Publication Date
CN111651332A true CN111651332A (en) 2020-09-11
CN111651332B CN111651332B (en) 2023-04-25

Family

ID=71209691

Family Applications (2)

Application Number Title Priority Date Filing Date
CN202010112069.9A Pending CN111367758A (en) 2020-02-24 2020-02-24 Large-scale heterogeneous equipment integrated control method based on message middleware
CN202010742158.1A Active CN111651332B (en) 2020-02-24 2020-07-29 Message middleware-based large-scale heterogeneous equipment integrated control method

Family Applications Before (1)

Application Number Title Priority Date Filing Date
CN202010112069.9A Pending CN111367758A (en) 2020-02-24 2020-02-24 Large-scale heterogeneous equipment integrated control method based on message middleware

Country Status (1)

Country Link
CN (2) CN111367758A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377091A (en) * 2021-08-12 2021-09-10 星河动力(北京)空间科技有限公司 Carrier rocket test launch control system
CN113918132A (en) * 2021-12-13 2022-01-11 珠海市新德汇信息技术有限公司 Equipment standardization management method, system, working method, device and storage medium
CN114296809A (en) * 2021-12-24 2022-04-08 深圳航天科技创新研究院 Object model construction method based on operating system and system calling interface thereof

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116249160B (en) * 2022-12-30 2024-01-26 天地上海采掘装备科技有限公司 Communication method and related device for mining mobile equipment networking

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815338A (en) * 2016-12-25 2017-06-09 北京中海投资管理有限公司 A kind of real-time storage of big data, treatment and inquiry system
CN106843851A (en) * 2016-12-28 2017-06-13 上海大汉三通数据通信有限公司 Implementation method and device based on ActiveMQ isomery Classloader unserializings
CN107341223A (en) * 2017-06-29 2017-11-10 华泰证券股份有限公司 A kind of heterogeneous database real-time synchronization method based on message-oriented middleware
CN108446335A (en) * 2018-02-27 2018-08-24 广州港数据科技有限公司 Heterogeneous system data pick-up based on database and unified outbound data exchange method
CN109547512A (en) * 2017-09-22 2019-03-29 中国移动通信集团浙江有限公司 A kind of method and device of the distributed Session management based on NoSQL
US20190138375A1 (en) * 2017-11-03 2019-05-09 Dell Products L. P. Optimization of message oriented middleware monitoring in heterogenenous computing environments
CN110096545A (en) * 2019-03-12 2019-08-06 国网辽宁省电力有限公司信息通信分公司 One kind being based on big data platform data processing domain architecting method

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106815338A (en) * 2016-12-25 2017-06-09 北京中海投资管理有限公司 A kind of real-time storage of big data, treatment and inquiry system
CN106843851A (en) * 2016-12-28 2017-06-13 上海大汉三通数据通信有限公司 Implementation method and device based on ActiveMQ isomery Classloader unserializings
CN107341223A (en) * 2017-06-29 2017-11-10 华泰证券股份有限公司 A kind of heterogeneous database real-time synchronization method based on message-oriented middleware
CN109547512A (en) * 2017-09-22 2019-03-29 中国移动通信集团浙江有限公司 A kind of method and device of the distributed Session management based on NoSQL
US20190138375A1 (en) * 2017-11-03 2019-05-09 Dell Products L. P. Optimization of message oriented middleware monitoring in heterogenenous computing environments
CN108446335A (en) * 2018-02-27 2018-08-24 广州港数据科技有限公司 Heterogeneous system data pick-up based on database and unified outbound data exchange method
CN110096545A (en) * 2019-03-12 2019-08-06 国网辽宁省电力有限公司信息通信分公司 One kind being based on big data platform data processing domain architecting method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王重楠 等: ""发布/订阅模式测控消息中间件系统设计"" *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377091A (en) * 2021-08-12 2021-09-10 星河动力(北京)空间科技有限公司 Carrier rocket test launch control system
CN113918132A (en) * 2021-12-13 2022-01-11 珠海市新德汇信息技术有限公司 Equipment standardization management method, system, working method, device and storage medium
CN114296809A (en) * 2021-12-24 2022-04-08 深圳航天科技创新研究院 Object model construction method based on operating system and system calling interface thereof
CN114296809B (en) * 2021-12-24 2023-05-05 深圳航天科技创新研究院 Object model construction method based on operating system and system call interface thereof

Also Published As

Publication number Publication date
CN111651332B (en) 2023-04-25
CN111367758A (en) 2020-07-03

Similar Documents

Publication Publication Date Title
CN111651332B (en) Message middleware-based large-scale heterogeneous equipment integrated control method
Sun et al. An open IoT framework based on microservices architecture
JP3949180B2 (en) Integration of system management services with base system object model
US6044224A (en) Mechanism for dynamically associating a service dependent representation with objects at run time
US5327559A (en) Remote and batch processing in an object oriented programming system
CN100418057C (en) Method and system for grid-enabled virtual machines with distributed management of applications
US6349333B1 (en) Platform independent alarm service for manipulating managed objects in a distributed network management system
JP3782477B2 (en) Event architecture for operating system system management
US6282568B1 (en) Platform independent distributed management system for manipulating managed objects in a network
US5475817A (en) Object oriented distributed computing system processing request to other object model with code mapping by object managers located by manager of object managers
US6895586B1 (en) Enterprise management system and method which includes a common enterprise-wide namespace and prototype-based hierarchical inheritance
US6601072B1 (en) Method and system for distribution of application data to distributed databases of dissimilar formats
CN111033481B (en) Direct mapped buffer cache on non-volatile memory
US6226690B1 (en) Method and apparatus for utilizing proxy objects to communicate with target objects
US6466974B1 (en) Environment for creating and managing network management software objects
EP1117033A1 (en) Dynamic dispatch function
EP3198424B1 (en) System and method for supporting dynamic deployment of executable code in a distributed computing environment
WO2001073551A2 (en) System and method of providing an asynchronous interface between a client system and an enterprise javabeans-enabled server
US20030220963A1 (en) System and method for converting data structures
CN107615260A (en) System and method for providing distributed cache in transaction processing environment
US20030236925A1 (en) Interactive portable object adapters support in an integrated development environment
US20070214113A1 (en) Method to support multiple data sources connecting to a persistent object
US6751796B1 (en) Integration of systems management services with an underlying system object model
US7146414B1 (en) Object bridge for providing access to operations-level control of a data processing system
US6292824B1 (en) Framework and method for facilitating client-server programming and interactions

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant