CN111651332B - Message middleware-based large-scale heterogeneous equipment integrated control method - Google Patents

Message middleware-based large-scale heterogeneous equipment integrated control method Download PDF

Info

Publication number
CN111651332B
CN111651332B CN202010742158.1A CN202010742158A CN111651332B CN 111651332 B CN111651332 B CN 111651332B CN 202010742158 A CN202010742158 A CN 202010742158A CN 111651332 B CN111651332 B CN 111651332B
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.)
Active
Application number
CN202010742158.1A
Other languages
Chinese (zh)
Other versions
CN111651332A (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] or 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] or 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Mathematical Physics (AREA)
  • Automation & Control Theory (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Manufacturing & Machinery (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a large-scale heterogeneous device integrated control method based on message middleware, which abstracts all controlled objects in the large-scale heterogeneous device into a device consistency access model with a unified interface and irrelevant positions; 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 reading and writing functions of a plurality of devices are realized through a publishing/subscribing mechanism of the message middleware. The invention provides a large-scale heterogeneous equipment integrated control method based on message middleware, which is characterized in that a consistency access model and a control system matched with the consistency access model are arranged, so that when the method is scientifically installed in a control system, the rapid integration and group monitoring of the large-scale heterogeneous equipment can be conveniently and flexibly realized, and the method has good coupling, expandability and maintainability, thereby meeting the requirement of long-period operation of the device.

Description

Message middleware-based large-scale heterogeneous equipment integrated control method
Technical Field
The invention relates to the field of complex device control systems. More particularly, the invention relates to a message middleware-based integrated control method for large-scale heterogeneous devices.
Background
The main task of the scientific device control system is system integration, a large number of instruments and meters and self-grinding equipment exist in the control system, and meanwhile, the complex control requirements of experimental data transmission, scientific calculation and the like are 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, and requires the integrated control software to have good coupling, maintainability and expandability, so that the rapid development and simulation verification of the scientific device control system are ensured, and the efficient, safe and reliable operation of the device and the control system in a long life cycle is ensured.
Traditional SCADA software is convenient to use, but is difficult to realize the requirements of rapid integration and complex control of various heterogeneous devices; the integration of the control system can be completed quickly by directly based on the distributed software framework of the object-oriented middleware, but the coupling is strong, the reusability is poor, and the software upgrading is difficult; the distributed software framework based on the SOA architecture has good coupling, expandability and maintainability, but can not meet the requirements of mass equipment group control and monitoring. That is, the prior art can not realize integration
Disclosure of Invention
It is an object of the present invention to address at least the above problems and/or disadvantages and to provide at least the advantages described below.
The invention also aims to provide a large-scale heterogeneous equipment integrated control method based on the message middleware, which can conveniently and flexibly realize the rapid integration and group monitoring of the large-scale heterogeneous equipment when the method is scientifically installed in a control system by arranging a consistency access model and a control system matched with the consistency access model, and has good coupling, expandability and maintainability, thereby meeting the requirement of long-period operation of the device.
To achieve these objects and other advantages and in accordance with the purpose of the invention, there is provided a message middleware-based integrated control method for a large-scale heterogeneous device, comprising:
abstracting all controlled objects in the large-scale heterogeneous equipment into an equipment consistency access model with a unified interface and irrelevant positions;
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 device consistency access model, the database service realizes the persistence of device configuration parameters, authority control and naming service; the equipment service is used as an equipment container, and the consistency access, alarming, archiving and log-related general functions of the equipment are realized; the client API accesses the equipment through parameterized equipment names and provides synchronous/asynchronous, publishing/subscribing and group calling related functions so as to realize point-to-point and one-to-many communication;
the control system is configured to implement multi-device command and attribute read-write functions through a 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 rapid integration and real-time monitoring of the large-scale heterogeneous equipment through a client application programming API interface.
Preferably, the access model is configured to implement consistent access of heterogeneous devices by adopting a serialization and reflection mechanism, so as to abstract all the heterogeneous devices into abstract interfaces with the same attribute and command, and further implement corresponding relations of command names, command pointers and specific function implementation by means of key values, so that users implement corresponding functions by corresponding execution code segments.
Preferably, the device service periodically polls the device attribute to determine whether the attribute triggers a corresponding alarm and archiving event, and issues the data in the form of an event, and meanwhile, the relevant configuration parameters are stored in a sustainable database.
Preferably, the control system is configured to use zeromq as a communication middleware to implement synchronous/asynchronous, publish/subscribe and group call functions of clients through request, response, publish/subscribe communication modes and pipeline modes 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, each device object comprises an object command and an object attribute, so that a function calling function is realized through the object command, and an attribute value reading and writing function is realized 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, the service ID and the device ID are permanently 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 services and devices in the same database is ensured, and a client retrieves the network address of the device service from the database service according to the device name address and establishes a connection relationship with the system service.
Preferably, the database service provides a multi-device control interface for the client, and the database issues control commands to the device service through an event mechanism and realizes control of a plurality of devices; reading of multiple device values of a single process is achieved by a device service process.
Preferably, the device service is a process, and when the device service is started, the class name and the device name contained 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 corresponding relation between the device name and the device class is created in a key-value form according to the information.
Preferably, the client encapsulates the device object into a device proxy, and establishes contact with the device object through a device name, anonymous access, or through a user name and password access;
the client command realizes a plurality of input parameters and not more than 1 output parameter in a reloading mode;
the client encapsulates the group command operation into a group proxy class to realize multiple or layered device object commands and attribute operations through the class;
the client obtains the network address of the equipment object through the database service and connects the equipment object according to the network address.
Preferably, when the control system controls the group device, a user adds a plurality of device names through a group device proxy, the client registers a subscription function for related device service according to the device names, and sets a unique ID for the group, the group device realizes naming and issuing of a plurality of devices in a release mode, and the system service simultaneously updates attribute information of a plurality of devices through an event mechanism so as to realize control and monitoring of the group device.
The invention at least comprises the following beneficial effects: firstly, the control method of the invention can meet the requirements of rapid integration of various hardware devices and rapid control of multiple devices of scientific devices or other complex devices. According to the method, all hardware devices, business logic, algorithms, buses and the like are packaged into soft device objects with the same commands and attributes, a user can realize rapid integration and real-time monitoring of large-scale heterogeneous devices through an API (application program interface) of a client, and meanwhile, a software framework adopts an SOA (service oriented architecture) framework, 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 efficient control and real-time monitoring of a plurality of devices through an event mechanism, thereby meeting the requirement of parallel control of a scientific device control system, and the loose coupling framework also ensures the efficient, 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 of the architecture of a message-middleware-based integrated control method for a large-scale heterogeneous device in accordance with one embodiment of the present invention;
FIG. 2 is a block diagram of an integrated control connection of a heterogeneous device according to the present invention;
FIG. 3 is a hierarchical distribution model diagram of a device service object in the control method of the present invention;
FIG. 4 is a diagram of a device service object model in the control method of the present invention;
FIG. 5 is a flow chart of 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 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 schematic diagram of a multi-device control communication mechanism in the control method of the present invention.
Detailed Description
The present invention is described in further detail below with reference to the drawings to enable those skilled in the art to practice the invention by referring to the description.
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 should be noted that, in the description of the present invention, the orientation or positional relationship indicated by the term is based on the orientation or positional relationship shown in the drawings, which are merely for convenience of describing the present invention and simplifying the description, and are not indicative or implying that the apparatus or element to be referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be construed as limiting the present invention. In addition, the first and second embodiments shown herein are all distinctive descriptions of the same or similar devices and apparatuses.
Fig. 1 shows an implementation form of a message-middleware-based integrated control method for a large-scale heterogeneous device according to the present invention, which includes:
abstracting all controlled objects in the large-scale heterogeneous equipment into a uniform interface-free equipment consistency access model, and carrying out 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 device consistency access model, the database service realizes the persistence of device configuration parameters, authority control and naming service; the equipment service is used as an equipment container, and the universal functions of consistency access, alarming, archiving, log correlation and the like of the equipment are realized; the client API accesses the equipment through parameterized equipment names and provides synchronous/asynchronous, publishing/subscribing and group calling related functions so as to realize various communication modes such as point-to-point, one-to-many and the like, and a functional foundation is provided for real-time monitoring of large-scale equipment;
the control system is configured to realize the command and attribute read-write functions of multiple devices through a message middleware publishing/subscribing mechanism and is used for meeting the group control requirement and meeting the group control requirement 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 rapid integration and real-time monitoring of the large-scale heterogeneous equipment through a client application programming API interface. The invention provides a large-scale heterogeneous equipment integrated control method based on message middleware, which can meet the requirements of rapid integration of various hardware equipment and rapid control of multiple equipment of scientific devices or other complex devices. The control method in the scheme encapsulates all hardware devices, business logic, algorithms, buses and the like into soft device objects with the same commands and attributes, a user can realize the rapid integration and real-time monitoring of large-scale heterogeneous devices through an API (application programming interface) interface of a client, 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 the 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 adopting a serialization and reflection mechanism, so as to abstract all the heterogeneous devices into abstract interfaces with the same attribute and command, and further implement corresponding relations of command names, command pointers and specific function implementation by means of key values, so that users implement corresponding functions by corresponding execution code segments.
In another example, the device service has the functions of logging, alarming, archiving and the like, and by periodically polling the device attribute, the device service judges whether the attribute triggers a corresponding alarming and archiving event and issues data in the form of the event, and meanwhile, the related configuration parameters can be stored in a durable database.
In another example, the control system is configured to use ZeroMQ as a communication middleware to implement synchronous/asynchronous, publish/subscribe and group call functions of clients through request, reply, publish/subscribe communication modes, pipe modes provided by the control system, ZMQ (ZeroMQ ZMQ hereinafter) is a simple and convenient transmission layer, and is a Socket library like a frame, which makes Socket programming simpler, more concise and higher in performance. ZMQ is a message processing queue library, which can be elastically stretched and contracted among a plurality of threads, cores and host boxes, compared with other message middleware, ZMQ is not like a message queue server in the traditional sense, in fact, it is not a server at all, it is more like a network communication library of the bottom layer, a layer of packaging is made on a Socket API, network communication, process communication and thread communication are abstracted into uniform API interfaces, and control software consists of database service, equipment service and client API, wherein the database service realizes persistence of configuration parameters and naming service; the equipment service is used as an equipment container, and the universal functions of consistency access, alarming, archiving, journaling and the like of the equipment are realized; the client API accesses the device through parameterized device names and provides synchronous/asynchronous, publish/subscribe, group call and other functions; the log information stores field information such as a log source, log generation time, log level, log background and the like, and can be output in the form of text files, consoles or events by referring to a log4j log format;
the control system packages the middleware into a communication class, so that a user does not need to care about middleware calling details, packages the database into a data access class, the user can select a data storage mode according to requirements, packages the data type into a device data class, packages the abnormal information into an abnormal class, comprises information such as an abnormal code, a reason, description and a generation position, and can record a plurality of abnormal information;
each device in the control system comprises a persistent device attribute, a device command and a device attribute, wherein parameters such as the persistent device attribute, the device command and the device attribute can be persistent to 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 call function through the object command and realize an attribute value read-write function through the object attribute, and the input and output parameters of the device command adopt any data class to transfer data; the equipment attribute comprises field information such as data type, data format, readability, attribute name, data value and the like;
the data types are packaged into equipment data types, the C++ common data types are supported, scalar, one-dimensional array, two-dimensional array or composite data types such as list, map and the like are supported, and meanwhile, the data can be serialized/deserialized 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, the service ID and the device ID are permanently 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 services and devices in the same database is ensured, and a client retrieves the network address of the device service from the database service according to the device name address and establishes a connection relationship with the system service.
The control system may set the device properties as periodic, relative change, and absolute change events.
The control system can set the upper and lower alarm limits and the upper and lower alarm limits of the equipment attribute when alarming, and generate alarm events.
The control system supports access rights control based on role control.
The control system can be in a persistent database of the relevant configuration information.
Specifically, in this scheme, the control software framework defines the unique IDL base class of the software framework, and the client and the server communicate according to the interface and ensure the forward compatibility of the software through the relation of version numbers and class inheritance. The interface includes functions such as command call, attribute call, command asynchronous call, command synchronous call, event configuration, event subscription, event cancellation, etc.
Enumeration defines the following data types CDataType: bool, int, char, uchar, int, int16, int32, int64, uint16, uint32, uint64, float, double, string, and the like. Enumeration defines the data format type CDataFormat, including scalar, one-bit array, and two-dimensional array. Enumeration defines the data operation attribute cdataop mode, including read-only, write-only, read-write, and the like.
The device data class CDeviceData is defined, as any data type, free conversion with the C++ data type can be realized, and the data can be converted into text type or binary type serialization data.
The device attribute value cdeviceattrtvalue is defined, and contains field information such as device data CDeviceData, data type CDataType, data format CDataFormat, readable and writable cdataop mode, attribute name and the like.
An exception class CDeviceException is defined, which comprises 4 fields of an exception code, a reason reflection, a description, a position information file and the like, and is stored in a list form to support the function of re-throwing exception and displaying exception information by a command line.
And defining a communication connection class CDeviceConnection, providing various access functions for the client and equipment service, and realizing the communication function of the zeroMQ through a derivative class CDeviceZmqConnection.
And defining an event class CDeviceEvent, defining an abstract callback interface call_back, integrating the class by a user, and realizing processing logic of attribute event data.
The log class is defined in log4j format, and the system automatically adds the field information of log source, log generation time, generation position, etc. by providing relative character serial stream interface.
The structural body defines an alarm configuration parameter CAlarmPara, and comprises an alarm upper limit, an alarm lower limit, a warning upper limit, a warning lower limit, a relative change value, a relative change event and other field information.
The structure body defines an access authority configuration parameter CAccessPara, and comprises field information such as an ip address, a role, a user name, a process name, a class name, a device name, a function name, a read-write attribute, default non-setting and the like.
The structure body defines an archiving configuration parameter, namely, the CArchivePara, and comprises field information such as a relative change value, an absolute change value, a polling period and the like.
In another example, as shown in fig. 2, the database service provides data persistence functions for implementing service registration, device archiving/alerting/event configuration functions, rights configuration, and historical operating 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 control commands 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 the device service process, and the setting of the access authority of the client user through the levels of ip addresses, roles, user names, process names, class names, device names, function names, read-write attributes and the like is supported. Specifically, in this scheme, the database base class service provides the user with functions of adding, deleting and modifying information, such as a device service name, a device service attribute, a device attribute and the like, start-stop information and state information of the device, device attribute archiving information, alarm information and other configuration data, defines a function interface as CDBServer, and defines a database abstract access interface CDBClient at the same time, and different databases integrate the base class to realize related database operations, such as CDBClientMysql, CDBClientSqlite and the like. When the database service is started, the service realizes the dynamic switching of the database according to the dynamic library name of the configuration database and the database connection parameters, and binds the port numbers related to the computer.
The database service provides a naming service analysis function, and the client can obtain the state information of the equipment through the equipment name, including information of whether the equipment is started, equipment network address and the like.
The database service provides access right control function, and judges whether the client has control function or not through information such as ip address, role, user name, process name, class name, device name, function name, read-write attribute and the like.
And defining a public class CDBUTIl, and realizing issuing of group control commands and other commands to equipment services through zeromqpubsocket.
In another example, the device service is a process, which 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 device abstract base class. Each equipment class can be generated into an executable file with a unified interface, when the 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 created in a key-value mode according to the information. The server device class stores the function command in the form of a key-function base class pointer into a device command list, and the attribute in the form of a key-attribute base class pointer into an attribute command list. 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 dynamically create a plurality of attributes or commands in a soft coding mode.
And the server side judges whether the client side allows the information such as question and access permission time according to the user permission configuration information.
The server side can judge whether the client side has function access rights or not through the equipment state or the user-defined condition, and if the client side does not have the function access rights, the server side throws out the abnormality.
The server side judges whether the attribute triggers functions of archiving, alarming, event and the like through one or more threads.
The server side configures process parameters through the public class and achieves functions of archiving, releasing events and the like.
When the server receives the group control command, the quick response of the command is realized through a plurality of threads in the thread pool.
Specifically, in this scheme, as shown in fig. 3-5, the device service defines a command base class CCmdBase, mainly including a class name, whether access is allowed and whether a function calls two virtual functions; the attribute base class CattrBase is defined, which mainly includes attribute name, whether access is allowed and whether attribute call two virtual functions.
The device class base class CDevicClassBase is defined and mainly comprises a device list, a command list and an attribute list, and a mapping relation between the device list and the device base class is established according to the device name and the attribute/command name.
The CDeviceBase of the device basic class is defined, and mainly comprises a general function and an initialization virtual function of device operation, and the derivative class realizes a specific function and an initialization function.
And defining a device process class CDeviceServer to realize the management of devices in the process, such as setting the functions of attribute polling time, log archiving mode and the like.
Defining a public class CServerutil, receiving database events through the zeromqsubsocket, releasing the events through the zeromqpubsocket, and providing various public functions for equipment service. The event list receives periodic events from equipment service or events actively pushed by functions, and the related events are released through a thread; and receiving a group event from the client and realizing parallel control of a plurality of devices through the thread pool. And judging whether to trigger events such as archiving, publishing and the like through the periodic polling attribute of the thread, and issuing the events, and if the events are triggered, adding the related events into an event list.
The event data contains the following field information: event name, event attribute.
In another example, the client encapsulates the device object as a device proxy, establishing contact with the device object by device name, anonymous access, or by username, password access;
the client command realizes a plurality of input parameters and not more than 1 output parameter in a reloading mode, a user inputs a command name and input parameters to access a device function through an API interface, and the input and output parameter data types are device data types, so that synchronous call and asynchronous call are supported;
the client side attribute calling function provides an attribute reading and writing function. The attribute value is written by the attribute name and the attribute value, and the attribute value is read by the attribute name.
The client can set event types through an API interface and subscribe equipment attributes; setting alarm parameters and subscribing alarm events; setting equipment archiving parameters, storing archiving information and the like.
The client encapsulates the group command operation into a group proxy class, and can realize multiple or layered device object command and attribute operations through the group proxy class, namely, support a point-to-point calling function and support a function of concurrently calling the device command and the attribute through broadcasting.
The client can access the database through the database proxy, and configure the device configuration information and the user authority configuration information.
The client configures the client parameters and event reception through the common class.
The client obtains the network address of the equipment object through the database service and connects the equipment object according to the network address.
Specifically, in this scenario, as shown in fig. 6-8, the client defines a device proxy cdeviceroxy, creates the device proxy by device name, and provides the user with functions of commands, synchronous invocation of attribute reading and writing, event configuration, and the like. The equipment agent obtains equipment information and access right information from the database service according to the equipment name, and if the equipment is not started, the equipment throws out an abnormality; if the device service ip address and the port number are started, connection with the device service process is established according to the device service ip address and the port number, and if the establishment fails, the abnormality is thrown out. If the connection is established, when the reconnection fails, the equipment information is read from the database service again, and if the connection cannot be established, the abnormality is thrown out.
When a user uses the device agent, the user accesses the related function of the device service through the command name, and inputs one or more parameters in a reloading mode, wherein the input parameters are C++ built-in data types, and the output data types are CDeviceData; writing the attribute value by the attribute name and the attribute value, and inputting parameters by using a C++ built-in data type; and reading the attribute value through the attribute name, wherein the returned data is CdeviceAttrevalue.
Defining a client common class CClientUtil, subscribing a server event through a zeromqsubsocket, filtering event data through an event name by an event thread, and realizing a callback function of the event through a callback pointer.
The client agent provides interfaces to the outside as follows:
a) CDeviceDatacommand (function name, input parameters); instruction execution/execution
b) CDeviceData command (function name, input parameter 1, input parameter 2); instruction execution/execution
c) CDeviceData command (function name, input parameter 1, input parameter 2); instruction execution/execution
d) Void write_value (attribute name, attribute value); values of the write/write attributes
e) CdeviceAttrValue read _value (attribute name)// read attribute value.
In another example, when the control system controls group equipment, a user adds a plurality of equipment names through a group equipment proxy, a client registers a subscription function for related equipment service according to the equipment names, a unique ID is set for the group, the group equipment realizes naming and issuing of a plurality of pieces of equipment in a release mode, and the system service simultaneously updates a plurality of pieces of equipment attribute information through an event mechanism so as to realize control and monitoring of the group equipment. The group device control and monitoring mechanism implementation is shown in fig. 9, where the client CGroupProxy implements the device group control interface through the group control interface of the database service, and the database service provides interfaces for command, attribute reading and attribute writing to the outside, and the input parameters include a function attribute name, a device name list and an input parameter value. When the function is called or the attribute value is written, the database distributes data to the system service by an event mechanism, and the system service calls related equipment to realize and play a control function through a thread pool; when the function calls the write attribute, the database service reads a plurality of device attribute values through the device service process interface and returns the read values to the client.
When the control command is issued, the array field of the control command comprises a function name, a device name list and input parameters.
The client agent provides a group control interface to the outside as follows.
Input parameter output parameter of/(function name)
a) Cdevicedatalistgroup_command (…); the/(string-function name, cdeviceData-device name list, cdeviceData-input parameters;
b) Void group_write_value (…); the/(string-attribute name, cdeviceData-device name list, cdeviceData-data value;
c) Cdeviceattrvuelistgroup_read_value (); the/(string-attribute name, cdeviceData-device name list).
The above is merely illustrative of preferred embodiments, but is not limited thereto. In practicing the present invention, appropriate substitutions and/or modifications may be made according to the needs of the user.
The number of equipment and the scale of processing described herein are intended to simplify the description of the present invention. Applications, modifications and variations of the present invention will be readily apparent to those skilled in the art.
Although embodiments of the invention have been disclosed above, they are not limited to the use listed in the specification and embodiments. It can be applied to various fields suitable for the present invention. Additional modifications will readily occur to those skilled in the art. Therefore, the invention is not to be limited to the specific details and illustrations shown and described herein, without departing from the general concepts defined in the claims and their equivalents.

Claims (8)

1. The method for integrally controlling the large-scale heterogeneous equipment based on the message middleware is characterized by comprising the following steps of:
abstracting all controlled objects in the large-scale heterogeneous equipment into an equipment consistency access model with a unified interface and irrelevant positions;
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 device consistency access model, the database service realizes the persistence of device configuration parameters, authority control and naming service; the equipment service is used as an equipment container, and the consistency access, alarming, archiving and log-related general functions of the equipment are realized; the client API accesses the equipment through parameterized equipment names and provides synchronous/asynchronous, publishing/subscribing and group calling related functions 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 functions of the multiple devices through a publishing/subscribing mechanism of the message middleware;
the access model is configured to realize consistent access of heterogeneous devices by adopting a serialization and reflection mechanism so as to abstract all the heterogeneous devices into abstract interfaces with the same attribute and command, and further realize corresponding relations of command names, command pointers and specific function functions in a key value mode, so that a user realizes corresponding functions through corresponding execution code segments.
2. The message-middleware-based large-scale heterogeneous device integrated control method according to claim 1, wherein 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 rapid integration and real-time monitoring of the large-scale heterogeneous equipment through a client application programming API interface.
3. The method for integrated control of large-scale heterogeneous devices based on message middleware according to claim 1, wherein the device service determines whether the attribute triggers a corresponding alarm, archiving event by periodically polling the device attribute, and issues the data in the form of an event, while the relevant configuration parameters are in a sustainable database.
4. The message middleware-based heterogeneous device integrated control method according to claim 1, wherein the control system is configured to use zeromq as a communication middleware to implement synchronous/asynchronous, publish/subscribe and group call functions of clients through request, reply, publish/subscribe communication modes, pipe modes 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, each device object comprises an object command and an object attribute, so that a function calling function is realized through the object command, and an attribute value reading and writing function is realized 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, the service ID and the device ID are permanently 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 services and devices in the same database is ensured, and a client retrieves the network address of the device service from the database service according to the device name address and establishes a connection relationship with the system service.
5. The message middleware-based large-scale heterogeneous device integrated control method according to claim 1, wherein the database service provides a multi-device control interface for the client, and the database issues control commands to the device service through an event mechanism and realizes control of a plurality of devices; reading of multiple device values of a single process is achieved by a device service process.
6. The method for integrated control of large-scale heterogeneous devices based on message middleware according to claim 1, wherein the device service is a process, and when the device service is started, the class name and the device name contained 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.
7. The message-middleware-based large-scale heterogeneous device integrated control method according to claim 1, wherein the client encapsulates the device object as a device agent, and establishes contact with the device object through a device name, anonymous access, or access through a user name and password;
the client command realizes a plurality of input parameters and not more than 1 output parameter in a reloading mode;
the client encapsulates the group command operation into a group proxy class to realize multiple or layered device object commands and attribute operations through the class;
the client obtains the network address of the equipment object through the database service and connects the equipment object according to the network address.
8. The method for integrally controlling large-scale heterogeneous devices based on message middleware according to claim 1, wherein when the control system controls group devices, a user adds a plurality of device names through a group device agent, a client registers a subscription function to related device services according to the device names, and sets a unique ID to the group, the group devices realize naming of the plurality of devices in a release mode, and the system services update a plurality of pieces of device attribute information simultaneously through an event mechanism so as 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
CN202010112069.9A CN111367758A (en) 2020-02-24 2020-02-24 Large-scale heterogeneous equipment integrated control method based on message middleware
CN2020101120699 2020-02-24

Publications (2)

Publication Number Publication Date
CN111651332A CN111651332A (en) 2020-09-11
CN111651332B true 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)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377091B (en) * 2021-08-12 2022-01-25 星河动力(北京)空间科技有限公司 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
CN114296809B (en) * 2021-12-24 2023-05-05 深圳航天科技创新研究院 Object model construction method based on operating system and system call interface thereof
CN116249160B (en) * 2022-12-30 2024-01-26 天地上海采掘装备科技有限公司 Communication method and related device for mining mobile equipment networking

Citations (2)

* 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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107341223A (en) * 2017-06-29 2017-11-10 华泰证券股份有限公司 A kind of heterogeneous database real-time synchronization method based on message-oriented middleware
CN109547512B (en) * 2017-09-22 2021-09-03 中国移动通信集团浙江有限公司 NoSQL-based distributed Session management method and device
US10572319B2 (en) * 2017-11-03 2020-02-25 Dell Products, L.P. Optimization of message oriented middleware monitoring in heterogenenous computing environments
CN108446335B (en) * 2018-02-27 2021-04-16 广州港数据科技有限公司 Heterogeneous system data extraction and unified external data exchange method based on database
CN110096545A (en) * 2019-03-12 2019-08-06 国网辽宁省电力有限公司信息通信分公司 One kind being based on big data platform data processing domain architecting method

Patent Citations (2)

* 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

Also Published As

Publication number Publication date
CN111367758A (en) 2020-07-03
CN111651332A (en) 2020-09-11

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
US6044224A (en) Mechanism for dynamically associating a service dependent representation with objects at run time
CA2124720C (en) Integration of systems management services with an underlying system object model
US6895586B1 (en) Enterprise management system and method which includes a common enterprise-wide namespace and prototype-based hierarchical inheritance
US6349333B1 (en) Platform independent alarm service for manipulating managed objects in a distributed network management system
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
US6601072B1 (en) Method and system for distribution of application data to distributed databases of dissimilar formats
US6226690B1 (en) Method and apparatus for utilizing proxy objects to communicate with target objects
CN101277212B (en) Resource management platform and resource management method
Virta et al. SOA-Based integration for batch process management with OPC UA and ISA-88/95
US20030220963A1 (en) System and method for converting data structures
Galov et al. Design of semantic information broker for localized computing environments in the internet of things
JP4039800B2 (en) Data management method, object integrated management system
CN101276269B (en) Expandable resource management platform
Lu et al. Research on key technology of the address space for OPC UA Server
Bardram Design, implementation, and evaluation of the Java Context Awareness Framework (JCAF)
EP1122644A1 (en) A method and system for dynamically dispatching function calls from a first execution environment to a second execution environment
Little et al. Building configurable applications in Java
Butler et al. Architectural design of a common operating environment
Thompson et al. Comparisons between corba and dcom: architectures for distributed computing
Shibwabo et al. Repository integration: the disconnect and way forward through repository virtualization supporting business intelligence
Braubach et al. Macro Architecture for Microservices: Improving Internal Quality of Microservice Systems
Xiao et al. Experimental Design of Airborne Service Development Based on DIMA Architecture
JP2003303108A (en) Corba distributed process system, priority map management method for the same, and corba distributed program

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