CN105204812A - Plugin-based multi-interface display control system and integrating method thereof - Google Patents
Plugin-based multi-interface display control system and integrating method thereof Download PDFInfo
- Publication number
- CN105204812A CN105204812A CN201510631979.7A CN201510631979A CN105204812A CN 105204812 A CN105204812 A CN 105204812A CN 201510631979 A CN201510631979 A CN 201510631979A CN 105204812 A CN105204812 A CN 105204812A
- Authority
- CN
- China
- Prior art keywords
- plug
- display
- user
- control
- module
- 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
Links
Landscapes
- Computer And Data Communications (AREA)
Abstract
一种基于插件的多界面显控系统及其集成方法,系统包括任务处理设备、客户端和管理端,任务处理设备、客户端和管理端之间通过网络设备连接,任务处理设备用于对数据进行计算和处理;客户端主要用于收集用户登录信息、接收用户权限信息、加载及运行对应的显控插件;管理端主要用于对用户以及插件进行管理。集成方法采用插件化开发机制,并结合基于主题“订阅-发布”的实时通信机制实现显控系统集成、消息传输及数据共享。本发明各个插件独立开发,动态调用,降低了界面各个组成模块之间的耦合度,提高了显控系统可维护性和可扩展性,降低了系统维护成本。
A plug-in-based multi-interface display and control system and its integration method, the system includes a task processing device, a client and a management terminal, the task processing device, the client and the management terminal are connected through a network device, and the task processing device is used to process data Perform calculation and processing; the client is mainly used to collect user login information, receive user permission information, load and run the corresponding display and control plug-in; the management end is mainly used to manage users and plug-ins. The integration method adopts the plug-in development mechanism, combined with the real-time communication mechanism based on the topic "subscription-publishing", to realize the integration of the display and control system, message transmission and data sharing. Each plug-in of the present invention is independently developed and called dynamically, which reduces the coupling degree between each component module of the interface, improves the maintainability and expandability of the display and control system, and reduces the system maintenance cost.
Description
技术领域technical field
本发明属于显控系统技术领域,具体涉及一种基于插件的多界面显控系统及其集成方法,尤其用于采用插件化设计思想的多界面显控系统开发与集成。The invention belongs to the technical field of display and control systems, and in particular relates to a plug-in-based multi-interface display and control system and an integration method thereof, especially for the development and integration of a multi-interface display and control system adopting a plug-in design idea.
背景技术Background technique
传统的显控系统集成方法是将所有的界面和功能逻辑统一开发,显控界面的各个组成部分之间高度依赖,随着技术的进步和业务需求的增加,显控系统正在承担着越来越多的功能,不同模块之间的关联也日趋复杂,暴露了以下一些问题:The traditional display and control system integration method is to develop all interfaces and functional logic in a unified manner. The components of the display and control interface are highly dependent on each other. With the advancement of technology and the increase of business requirements, the display and control system is taking on more and more With more functions, the relationship between different modules is becoming more and more complicated, which exposes the following problems:
(1)显控界面不支持模块化重构。程序一经发布,就意味着界面和功能已经定型,用户在使用中不能对界面和功能的组合进行定制,也不能扩展,因此开发出来的显控系统难以应对频繁变更的应用需求,不能胜任多样化的任务;(1) The display and control interface does not support modular reconstruction. Once the program is released, it means that the interface and functions have been finalized, and the user cannot customize the combination of the interface and functions during use, nor can it be expanded. Therefore, the developed display and control system is difficult to cope with frequently changing application requirements and is not capable of diversification. task;
(2)网络通信复杂。在传统开发模式下,显控系统同一台主机内的各个模块之间的消息传输和数据共享往往是通过彼此函数之间的调用来实现,主机与主机之间的模块普遍采用基于Socket的网络通信方式来实现。随着业务的增加,函数的调用也越来越复杂,各个功能模块的数据难以共享,并且,数据缺乏明显标记,往往需要程序单独对数据的主题内容进行解析,造成代码量的增加和逻辑复杂化;(2) The network communication is complicated. In the traditional development mode, the message transmission and data sharing between the various modules in the same host of the display and control system are often realized by calling each other's functions, and the modules between the host and the host generally use Socket-based network communication way to achieve. With the increase of business, the function calls become more and more complicated, and the data of each functional module is difficult to share. Moreover, the data lacks obvious marks, and the program often needs to analyze the subject content of the data separately, resulting in an increase in the amount of code and complex logic. change;
(3)显示层和计算层没有解耦,业务庞杂。传统显控系统的各个客户端主机都具备相当的计算能力,可以独立计算,但这样会产生业务关联复杂和重复计算的现象,各个显控设备之间紧密依赖,用户难以调整;(3) The display layer and the computing layer are not decoupled, and the business is complex. Each client host of the traditional display and control system has considerable computing power and can calculate independently, but this will cause complex business associations and repeated calculations. Each display and control device is closely dependent on each other, making it difficult for users to adjust;
(4)不利于维护和扩展。在传统开发模式下,各个功能模块之间高度依赖,显控系统难以维护和扩展,当需要进行功能修改和添加时,往往需要大量的人力,项目维护成本高昂。(4) It is not conducive to maintenance and expansion. In the traditional development mode, each functional module is highly dependent, and the display and control system is difficult to maintain and expand. When it is necessary to modify and add functions, it often requires a lot of manpower, and the project maintenance cost is high.
发明内容Contents of the invention
本发明要解决的问题是,针对现有显控系统存在的上述不足,提供一种基于插件的多界面显控系统及其集成方法,采用插件化开发机制,并结合基于主题“订阅-发布”的实时通信机制实现显控系统集成、消息传输及数据共享。The problem to be solved by the present invention is to provide a plug-in-based multi-interface display and control system and its integration method for the above-mentioned deficiencies in the existing display and control systems. Real-time communication mechanism realizes display and control system integration, message transmission and data sharing.
本发明解决上述问题采用的技术方案是:The technical solution adopted by the present invention to solve the above problems is:
一种基于插件的多界面显控系统,包括任务处理设备、客户端和管理端,任务处理设备、客户端和管理端之间通过网络设备连接,其中:A plug-in-based multi-interface display and control system, including a task processing device, a client and a management terminal, the task processing device, the client and the management terminal are connected through a network device, wherein:
所述任务处理设备包含后台计算处理模块,用于对数据进行计算和处理,以及对用户操作指令进行计算和反馈;The task processing device includes a background computing and processing module for computing and processing data, and computing and feeding back user operation instructions;
所述客户端包含用户登录模块、显控主框架模块、插件加载模块和显控插件模块,所述用户登录模块用于用户合法性验证并得到该用户的权限信息,所述显控主框架模块用于接收该用户权限信息和插件配置信息,为显控界面分配应用程序窗口并调用插件加载模块,所述插件加载模块用于动态加载显控插件模块,所述显控插件模块由多组显控插件及显控界面组成,各显控界面用于完成对应显控插件的人机交互功能;The client includes a user login module, a display and control main frame module, a plug-in loading module and a display and control plug-in module. The user login module is used to verify the user's legitimacy and obtain the user's authority information. It is used to receive the user authority information and plug-in configuration information, allocate an application program window for the display and control interface and call the plug-in loading module, and the plug-in loading module is used to dynamically load the display and control plug-in module, and the display and control plug-in module consists of multiple groups of display Control plug-in and display and control interface, each display and control interface is used to complete the human-computer interaction function of the corresponding display and control plug-in;
所述管理端包含用户管理模块和插件管理模块,用户管理模块、插件管理模块分别具有相应的用户配置文件、插件配置文件,所述用户管理模块用于对用户信息进行配置和管理,并针对客户端发送的用户登录请求进行处理,核对用户身份标识,并查询该用户的对应权限,最后将权限返回相应的客户端;所述插件管理模块用于对显控插件进行配置管理,包括新增插件、修改插件信息、查询插件信息和删除插件;The management terminal includes a user management module and a plug-in management module. The user management module and the plug-in management module have corresponding user configuration files and plug-in configuration files respectively. The user management module is used to configure and manage user information, and to The user login request sent by the terminal is processed, the user identity is checked, and the corresponding authority of the user is inquired, and finally the authority is returned to the corresponding client; the plug-in management module is used to configure and manage the display and control plug-ins, including new plug-ins , Modify plug-in information, query plug-in information and delete plug-ins;
所述任务处理设备、客户端和管理端均采用基于主题“订阅-发布”的实时通信机制进行消息传输和数据共享。The task processing device, the client terminal and the management terminal all adopt the real-time communication mechanism based on the topic "subscribe-publish" to carry out message transmission and data sharing.
按上述方案,所述插件是一种动态链接库文件,统一对外提供调用接口,由显控主框架模块动态进行加载和启动,一个插件对应一个显控界面,各个插件由显控主框架模块按需动态加载和调用。According to the above scheme, the plug-in is a dynamic link library file, which uniformly provides a call interface externally, and is dynamically loaded and started by the display control main frame module. One plug-in corresponds to a display control interface, and each plug-in is controlled by the display control main frame module It needs to be dynamically loaded and called.
按上述方案,所述插件作为用户权限的基本单位,即一项权限对应一个插件,不同的用户角色对应不同的插件集。According to the above scheme, the plug-in is used as the basic unit of user authority, that is, one authority corresponds to one plug-in, and different user roles correspond to different sets of plug-ins.
按上述方案,所述插件分为四类:综合信息显示类插件、主控面板类插件、公共信息类插件、表格信息类插件。According to the above scheme, the plug-ins are divided into four categories: comprehensive information display plug-ins, main control panel plug-ins, public information plug-ins, and form information plug-ins.
本发明还提供了一种上述基于插件的多界面显控系统的集成方法,将任务处理设备、客户端和管理端之间的网络通信采用基于主题“订阅-发布”的实时通信机制,首先,该通信机制确定了各类消息的主题、长度和组成类型,消息的发送方和消息的接收方采用“订阅-发布”某种特定主题消息的方式进行消息传输和数据共享;接下来对客户端和任务处理设备进行隔离,通过对用户权限配置在一个客户端上接收显示多源信息,客户端的显控插件模块不进行复杂计算,仅用于收发数据以及提供用户操控界面,所有后台计算处理均通过后台的任务处理设备完成,计算结果通过网络传输到客户端的显控界面上;最后,客户端显控主框架模块根据管理员配置动态加载插件,使用时结合实际需求进行多种配置,用于完成不同任务,插件根据配置信息显示在不同的显控界面上,形成多界面显控系统。The present invention also provides an integration method of the above plug-in-based multi-interface display and control system. The network communication between the task processing device, the client and the management terminal adopts a real-time communication mechanism based on the theme "subscribe-publish". First, The communication mechanism determines the subject, length and composition type of various messages, and the sender and receiver of the message use the method of "subscribing-publishing" a specific topic message for message transmission and data sharing; next, the client It is isolated from the task processing equipment. By configuring user permissions to receive and display multi-source information on a client, the display and control plug-in module of the client does not perform complex calculations, but is only used to send and receive data and provide user control interfaces. All background calculations are processed It is completed by the task processing equipment in the background, and the calculation results are transmitted to the display and control interface of the client through the network; finally, the main frame module of the display and control of the client dynamically loads plug-ins according to the configuration of the administrator. After completing different tasks, the plug-ins are displayed on different display and control interfaces according to the configuration information, forming a multi-interface display and control system.
按上述方案,所述集成方法具体包括如下步骤:According to the above scheme, the integration method specifically includes the following steps:
1)显控系统配置步骤,在此步骤中,由系统管理员配置插件信息、角色信息和用户信息,对于插件,由系统管理员指定插件在界面中的显示位置;对于角色,由系统管理员指定该角色能够使用哪些插件;对于用户,由系统管理员指定各个用户所具有的显控角色;1) Display and control system configuration step, in this step, the system administrator configures the plug-in information, role information and user information, for the plug-in, the system administrator specifies the display position of the plug-in in the interface; for the role, the system administrator Specify which plug-ins can be used by this role; for users, the system administrator specifies the display and control roles of each user;
2)显控系统登录步骤,该步骤需要经过三个阶段,即用户验证阶段、权限分配阶段及权限接收阶段;2) The login step of the display and control system, which needs to go through three stages, namely the user verification stage, the authority distribution stage and the authority receiving stage;
第一阶段,用户验证阶段,主要由用户在客户端登录界面上输入用户名和密码信息并发送给管理端,用户管理模块首先对用户的输入信息进行验证以判断该用户是否合法,如果不合法则给予相应的提示;The first stage is the user verification stage. The user mainly enters the user name and password information on the client login interface and sends them to the management end. The user management module first verifies the user's input information to determine whether the user is legal. If not, give corresponding tips;
第二阶段,权限分配阶段,在用户合法的前提下,由管理端查询该用户的角色信息,再根据其角色信息进一步查询其对应的权限信息,因此得到了该用户能够使用的插件集合,并获取各自插件的配置信息,最后以列表形式将权限信息和插件配置信息返回给客户端;In the second stage, the authority allocation stage, on the premise that the user is legal, the management side queries the user's role information, and then further inquires the corresponding authority information according to the role information, so the plug-in set that the user can use is obtained, and Obtain the configuration information of the respective plug-ins, and finally return the permission information and plug-in configuration information to the client in the form of a list;
第三阶段,权限接收阶段,由显控主框架模块接收当前用户权限所对应的插件列表以及插件配置信息,这些信息在用户登录成功后由用户登录模块通过权限信息发送至显控主框架模块;In the third stage, the authority receiving stage, the main framework module of Display Control receives the plug-in list and plug-in configuration information corresponding to the current user authority, and the information is sent to the main framework module of Display Control through the authority information after the user login is successful;
3)插件加载步骤,该步骤需要经过三个阶段,即插件初始化阶段、插件实例获取阶段及插件运行阶段;3) The plug-in loading step, which needs to go through three stages, namely the plug-in initialization stage, the plug-in instance acquisition stage and the plug-in running stage;
第一阶段,插件初始化阶段,插件加载模块以显控界面为单位进行遍历,只要发现该显控界面有插件需要显示则为其分配一个应用程序窗口,在该应用程序窗口中,由插件加载模块对插件加载区域进行初始化,包括初始化基本显示样式、Tab页按钮的位置信息;The first stage is the plug-in initialization stage. The plug-in loading module traverses the display and control interface as a unit. As long as there is a plug-in to be displayed on the display and control interface, an application window is allocated for it. In this application window, the plug-in loading module Initialize the plug-in loading area, including initializing the basic display style and the position information of the tab page button;
第二阶段,插件实例获取阶段,插件加载模块根据插件路径依次读入插件,为其分配内存空间,并检索其接口函数,如果定位到了接口函数起始地址就开始对其进行调用并获取该插件的对象实例;In the second stage, the plug-in instance acquisition stage, the plug-in loading module reads the plug-in sequentially according to the plug-in path, allocates memory space for it, and retrieves its interface function. If the start address of the interface function is located, it starts to call it and obtain the plug-in object instance of
第三阶段,插件运行阶段,插件加载模块将插件显示在应用程序窗口指定位置,根据插件配置信息来决定以何种方式显示在何区域,插件加载模块对插件中的通信子模块进行初始化,刷新应用程序窗口,并启动通信线程。The third stage is the plug-in running stage. The plug-in loading module displays the plug-in in the specified position of the application window, and decides in which way to display it in which area according to the plug-in configuration information. The plug-in loading module initializes the communication sub-module in the plug-in and refreshes it. application window, and starts a communication thread.
按上述方案,所述步骤3)中插件根据配置信息以不同的方式呈现,有的插件以区域的方式独立呈现,有的插件以Tab页的方式呈现,形成两种不同的显示模式。According to the above solution, the plug-ins in step 3) are presented in different ways according to the configuration information, some plug-ins are presented independently in the form of regions, and some plug-ins are presented in the form of tab pages, forming two different display modes.
按上述方案,对于以Tab页方式显示的插件,配置该插件的显示优先级,优先级高的插件显示在优先级低的插件的左边。According to the above scheme, for the plug-ins displayed in tab page mode, configure the display priority of the plug-ins, and the plug-ins with higher priority are displayed on the left of the plug-ins with lower priority.
本发明的工作原理:(1)利用插件化开发机制实现显控系统集成,插件是一种动态链接库文件,它在程序运行过程中按需加载和运行,利用这种特性,根据显控界面将显控系统分解成独立的子模块,这些子模块通过插件方式来进行开发,不同的插件由不同单位分别进行开发。在本发明中,各插件对外提供统一接口,它们通过显控主框架模块加载并运行,这样在不同场景下加载不同的插件,从而实现显控界面重构,同时也可利用这种特性对不同显控插件分别进行技术升级,或者开发新插件,能够在不修改其他插件和显控主框架模块的前提下实现显控系统的功能维护和扩展;(2)利用基于主题“订阅-发布”的实时通信机制实现消息传输和数据共享,该机制使通信各方不依赖固定IP地址,提高了通信的灵活度。在显控系统中,各个模块独立工作,不互相紧密依赖,因此采用这种通信机制使各个模块完成消息传输和数据共享。本发明采用了基于主题“订阅-发布”的实时通信机制,能够将不同的消息用不同的主题来进行标识,参与通信的成员只需要声明自身发送或接收的消息主题,并约定好通信协议,就能进行网络通信。The working principle of the present invention: (1) use the plug-in development mechanism to realize the integration of the display and control system. The display and control system is decomposed into independent sub-modules, and these sub-modules are developed through plug-ins, and different plug-ins are developed by different units. In the present invention, each plug-in provides a unified interface to the outside, and they are loaded and run through the display and control main frame module, so that different plug-ins are loaded in different scenarios, thereby realizing the reconstruction of the display and control interface. Display and control plug-ins are upgraded separately, or new plug-ins are developed, which can realize the function maintenance and expansion of the display and control system without modifying other plug-ins and the main frame module of the display and control; The real-time communication mechanism realizes message transmission and data sharing. This mechanism makes communication parties independent of fixed IP addresses and improves the flexibility of communication. In the display and control system, each module works independently and does not depend closely on each other. Therefore, this communication mechanism is used to enable each module to complete message transmission and data sharing. The present invention adopts a real-time communication mechanism based on the topic "subscription-publishing", which can identify different messages with different topics. Members participating in the communication only need to declare the topic of the message they send or receive, and agree on a communication protocol. network communication is possible.
本发明以插件为单位对显控系统进行开发和集成,达到以下有益效果:The invention develops and integrates the display and control system with the plug-in as a unit, and achieves the following beneficial effects:
1、从用户权限的角度来看,管理端对不同用户角色配置不同权限,实现了显控功能对用户的隔离;1. From the perspective of user permissions, the management terminal configures different permissions for different user roles, realizing the isolation of users from the display and control function;
2、从插件加载的角度来看,管理端根据实际情况来对插件进行配置,包括插件的类别配置、显示位置配置和显示方式配置等,通过对用户权限和插件不同的配置能够产生不同的显控界面,实现了多界面显控系统的功能重构;2. From the perspective of plug-in loading, the management side configures the plug-in according to the actual situation, including plug-in category configuration, display location configuration and display mode configuration, etc. Different configurations of user permissions and plug-ins can produce different display The control interface realizes the functional reconstruction of the multi-interface display and control system;
3、从显控与计算分离的角度看,有利于将前端和后台进行业务分离,形成结构清晰的系统程序,一个显控客户端上显示多个不同来源的数据;3. From the perspective of separation of display control and computing, it is beneficial to separate the front-end and back-end services, forming a system program with a clear structure, and displaying multiple data from different sources on one display control client;
4、从网络通信的角度来看,由于采用了基于主题的“订阅-发布”的实时通信机制,消息接收、发送双方不再紧密依赖,某一方进行修改或升级都不影响对方工作,因此消息传输和数据共享的编码复杂度大大降低,进而提高开发效率,提高了网络通信的灵活度;4. From the perspective of network communication, due to the adoption of the topic-based "subscribe-publish" real-time communication mechanism, the message receiving and sending parties are no longer closely dependent, and the modification or upgrade of one party will not affect the work of the other party, so the message The coding complexity of transmission and data sharing is greatly reduced, thereby improving development efficiency and improving the flexibility of network communication;
5、从项目的可维护性上看,由于各个插件独立开发,动态调用,插件与插件之间不再紧密依赖,降低了界面各个组成模块之间的耦合度,提高了显控系统的可维护性和可扩展性。5. From the maintainability of the project, due to the independent development of each plug-in and dynamic call, the plug-ins are no longer closely dependent on each other, which reduces the coupling between the various components of the interface and improves the maintainability of the display and control system. and scalability.
附图说明Description of drawings
图1是本发明基于插件的多界面显控系统的硬件及网络连接示意图;Fig. 1 is the hardware and network connection schematic diagram of the plug-in-based multi-interface display and control system of the present invention;
图2是本发明基于插件的多界面显控系统的架构图;Fig. 2 is a structure diagram of the plug-in-based multi-interface display and control system of the present invention;
图3是本发明基于插件的多界面显控系统的插件工作原理示意图;Fig. 3 is a schematic diagram of the plug-in working principle of the plug-in-based multi-interface display and control system of the present invention;
图4是本发明基于插件的多界面显控系统的客户端启动流程图;Fig. 4 is the client startup flowchart of the plug-in-based multi-interface display and control system of the present invention;
图5是本发明基于插件的多界面显控系统的客户端插件加载模块的加载流程图;Fig. 5 is a loading flowchart of the client plug-in loading module of the plug-in-based multi-interface display and control system of the present invention;
图6是本发明基于插件的多界面显控系统的客户端在不同用户登录后的界面示意图;Fig. 6 is a schematic diagram of the interface of the client of the plug-in-based multi-interface display and control system of the present invention after different users log in;
图7是本发明基于插件的多界面显控系统基于主题“订阅-发布”的通信模块开发流程图;Fig. 7 is a development flow chart of the communication module based on the topic "subscription-publishing" of the plug-in-based multi-interface display and control system of the present invention;
图8是传统显控系统的通信机制示意图;FIG. 8 is a schematic diagram of a communication mechanism of a traditional display and control system;
图9是本发明基于插件的多界面显控系统及其集成方法的通信机制示意图。FIG. 9 is a schematic diagram of the communication mechanism of the plug-in-based multi-interface display and control system and its integration method of the present invention.
具体实施方式Detailed ways
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,以LinuxQt4.8.6为开发环境,对本发明做进一步详细说明。应当理解,此处描述的具体实施例仅用以解释本发明,并不用于限定本发明。In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the drawings and embodiments, using LinuxQt4.8.6 as the development environment. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
如图1所示,本发明基于插件的多界面显控系统及其集成方法主要包含三类硬件设备,分别是任务处理设备、管理端、客户端,它们通过网络设备如路由器互相连接。其中任务处理设备对硬件的计算能力要求较高,以高性能服务器为宜。管理端对硬件要求较低,配置以中等性能PC计算机为准,满足日常管理人员的使用要求。客户端根据显控程序的运行要求进行配置,可以结合实际需要配置多块屏幕。As shown in Figure 1, the plug-in-based multi-interface display and control system and its integration method of the present invention mainly include three types of hardware devices, namely task processing devices, management terminals, and clients, which are connected to each other through network devices such as routers. Among them, the task processing equipment requires high computing power of the hardware, and a high-performance server is suitable. The management terminal has low hardware requirements, and the configuration is based on a medium-performance PC computer, which meets the requirements of daily management personnel. The client is configured according to the operating requirements of the display and control program, and multiple screens can be configured according to actual needs.
如图2所示,本发明实施例基于插件的多界面显控系统,包括任务处理设备、客户端和管理端,任务处理设备主要包含后台的计算处理模块,用于对数据进行计算和处理;客户端主要用于收集用户登录信息,接收用户权限信息,加载对应的插件,其中插件完成显控的全部功能,包括数据显示、用户操作响应和网络通信等功能;管理端主要用于对用户和插件进行管理。As shown in Figure 2, the embodiment of the present invention is based on a plug-in multi-interface display and control system, including a task processing device, a client and a management terminal, and the task processing device mainly includes a background computing and processing module for computing and processing data; The client is mainly used to collect user login information, receive user authority information, and load the corresponding plug-ins, among which the plug-ins complete all the functions of the display and control, including data display, user operation response and network communication; the management end is mainly used for user and Plugins are managed.
如图4所示,本发明基于插件的多界面显控系统及其集成方法在显控系统运行之前需要经过三个阶段:用户验证阶段、权限分配阶段和插件加载阶段。其中用户验证阶段主要由用户在客户端登录界面上输入用户名和密码等信息并发送给管理端,管理端上的用户管理模块首先对用户的输入信息进行验证以判断该用户是否合法,如果不合法则给予相应的提示并拒绝该用户进入显控系统;在权限分配阶段,由管理端查询该用户的角色信息,再根据其角色信息进一步查询其对应的权限信息,并获取对应插件的配置信息(包括插件的文件路径、所属显控界面、显示位置以及优先级等信息),最后以列表的形式将权限信息和插件配置信息返回给客户端;在插件加载阶段,客户端首先根据当前用户的权限动态加载插件,调用各个插件的接口函数,并根据插件配置信息将插件显示在指定的位置,这样一个基于插件的多界面显控系统就启动完毕。As shown in FIG. 4 , the plug-in-based multi-interface display and control system and its integration method of the present invention need to go through three stages before the display and control system runs: user verification stage, authority assignment stage and plug-in loading stage. In the user verification stage, the user mainly inputs information such as user name and password on the client login interface and sends it to the management terminal. The user management module on the management terminal first verifies the user’s input information to determine whether the user is legal. If not, then Give corresponding prompts and refuse the user to enter the display and control system; in the permission assignment stage, the management side queries the user's role information, and then further queries the corresponding permission information according to the role information, and obtains the configuration information of the corresponding plug-in (including The file path of the plug-in, the display and control interface to which it belongs, the display position, and the priority, etc.), and finally returns the permission information and plug-in configuration information to the client in the form of a list; in the plug-in loading stage, the client first dynamically Load the plug-in, call the interface function of each plug-in, and display the plug-in at the specified position according to the configuration information of the plug-in, so that a multi-interface display and control system based on the plug-in is started.
本发明基于插件的多界面显控系统及其集成方法,所述插件是一种动态链接库文件,在Windows平台下表现为.dll文件,在Linux平台下表现为.so文件,它可能含有一组在特定情况下使用的功能。从广义上将库分为两种类型:SharedLibrary(共享库)和StaticLibrary(静态库)。本发明所述插件指共享库。共享库是程序在运行时可以被加载的库,使用这种方式进行项目维护,对某个插件的修改和更新编译都无需重新编译应用程序,因此提高了大型显控项目的可维护性。The plug-in-based multi-interface display and control system and its integration method of the present invention, the plug-in is a dynamic link library file, which is represented as a .dll file under the Windows platform and a .so file under the Linux platform, which may contain a Groups of functions used in specific situations. In a broad sense, the library is divided into two types: SharedLibrary (shared library) and StaticLibrary (static library). The plug-in in the present invention refers to a shared library. The shared library is a library that can be loaded when the program is running. Using this method for project maintenance, there is no need to recompile the application program for modification and update compilation of a certain plug-in, thus improving the maintainability of large-scale display control projects.
本发明基于插件的多界面显控系统及其集成方法以插件为单位对显控功能进行开发和集成。在进行显控插件模块开发时,可以在QtCreator中创建一个C++库工程,该工程可以生成Linux操作系统下的Qt共享库。如图3所示,显控插件模块至少包含两个类:插件主类和插件界面类,其中插件主类对外提供统一接口函数,表明显控主框架模块可以通过该函数来获取本插件实例,具体函数名称可以另行约定。插件界面类主要定义插件的界面和行为,因此其界面设计和功能实现主要在插件界面类中实现,其中插件的UI界面可以在Qt界面设计器中实现,可以使用程序代码来实现,也可以根据实际需要进行混合实现。插件主类需要以公有方式继承Qt控件类QWidget。此外,源代码字符编码格式需要指定为UTF-8。The plug-in-based multi-interface display and control system and its integration method of the present invention use the plug-in as a unit to develop and integrate display and control functions. When developing the display control plug-in module, you can create a C++ library project in QtCreator, which can generate a Qt shared library under the Linux operating system. As shown in Figure 3, the display control plug-in module contains at least two classes: the main plug-in class and the plug-in interface class. The main plug-in class provides a unified interface function to the outside, indicating that the display control main frame module can obtain this plug-in instance through this function. The specific function name can be agreed separately. The plug-in interface class mainly defines the interface and behavior of the plug-in, so its interface design and function realization are mainly realized in the plug-in interface class, and the UI interface of the plug-in can be realized in the Qt interface designer, can be realized by program code, or can be realized according to A hybrid implementation is actually required. The plug-in main class needs to inherit the Qt control class QWidget in a public way. In addition, the source code character encoding format needs to be specified as UTF-8.
如图5所示,本发明在客户端登录成功后,就会根据当前用户权限信息来动态加载插件。第一步,由显控主框架模块获得当前用户权限所对应的插件列表以及插件配置信息,这些信息在用户登录成功后会由用户登录模块通过权限信息发送至显控主框架模块。第二步,插件加载模块以显控界面为单位进行遍历,如果该显控界面有插件需要显示则为其分配一个应用程序窗口。第三步,在当前应用程序窗口中,插件加载模块对插件加载区域进行初始化,包括初始化基本显示样式(界面字体、背景颜色、控件默认样式)等信息。第四步,插件加载模块根据插件路径依次读入插件,为其分配内存空间。第五步,插件加载模块检索插件的接口函数,如果定位到了接口函数起始地址就开始对其进行调用并获取该插件实例。第六步,插件加载模块将插件显示在应用程序窗口指定位置,根据插件配置信息来决定显示在何区域,如果该插件以Tab方式显示还需要根据其配置的优先级来确定其显示次序。第七步,更新应用程序窗口,使插件的界面能够显示在屏幕上。第八步,由插件加载模块更新应用程序窗口并启动网络通信模块。这样,一个显控客户端就启动完毕。As shown in FIG. 5 , after the client successfully logs in, the present invention dynamically loads the plug-in according to the current user authority information. The first step is to obtain the plug-in list and plug-in configuration information corresponding to the current user permissions by the main frame module of the display control. After the user logs in successfully, the information will be sent to the main frame module of the display control through the permission information by the user login module. In the second step, the plug-in loading module traverses the display and control interface as a unit, and if the display and control interface has a plug-in to be displayed, it allocates an application window for it. In the third step, in the current application window, the plug-in loading module initializes the plug-in loading area, including initializing information such as basic display styles (interface font, background color, and default style of controls). In the fourth step, the plug-in loading module sequentially reads the plug-ins according to the plug-in paths, and allocates memory space for them. In the fifth step, the plug-in loading module retrieves the interface function of the plug-in, and if the start address of the interface function is located, it starts to call it and obtain the plug-in instance. In the sixth step, the plug-in loading module displays the plug-in at the designated position of the application window, and determines the display area according to the configuration information of the plug-in. If the plug-in is displayed in Tab mode, its display order needs to be determined according to its configuration priority. The seventh step is to update the application window so that the interface of the plug-in can be displayed on the screen. In the eighth step, the plug-in loading module updates the application program window and starts the network communication module. In this way, a display and control client is started.
如图6所示,本发明基于插件的多界面显控系统及其集成方法在客户端启动后,如果当前用户的角色是系统管理员,显控界面可能显示成图6(a)样式,如果当前用户角色为某一类普通用户,则显控界面可能显示成图6(b)样式。可以看出图6(a)反映了系统管理员角色的权限,系统管理员能够使用系统中所有的插件;图6(b)反映了普通用户角色的权限,普通用户能够使用部分插件。As shown in Figure 6, after the client starts the plug-in-based multi-interface display and control system and its integration method of the present invention, if the role of the current user is a system administrator, the display and control interface may be displayed in the style of Figure 6(a), if If the current user role is a certain type of ordinary user, the display and control interface may be displayed in the style shown in Figure 6(b). It can be seen that Figure 6(a) reflects the permissions of the system administrator role, and the system administrator can use all plug-ins in the system; Figure 6(b) reflects the permissions of the common user role, and common users can use some plugins.
如图7所示,本发明基于插件的多界面显控系统及其集成方法在采用基于主题“订阅-发布”的实时通信机制进行消息传输和数据共享时,需要开发人员首先约定消息主题和对应数据结构,通常为每一类消息设置一个主题名称,其数据结构可以用结构体来表示,并且允许进行结构体嵌套;接下来需要在程序中注册主题,注册主题的方式可以通过XML配置文件来进行,也可以在代码段中进行,注册主题时需要声明该程序需要使用的主题名称,以及该程序对于该主题的身份(订阅者/发布者/订阅且发布者),同一个程序可以以多种身份注册多个主题;最后可以在程序代码段中进行消息订阅或发布,此时需要配置主题名称作为参数。需要注意的是,消息订阅属于异步传输,即通信模块订阅到相关消息就会自动开始执行相关函数进行处理,软件开发人员只需要实现相应的功能逻辑即可。As shown in Figure 7, when the plug-in-based multi-interface display and control system and its integration method of the present invention adopt the real-time communication mechanism based on the topic "subscribe-publish" for message transmission and data sharing, developers need to first agree on the message topic and corresponding Data structure, usually a topic name is set for each type of message, its data structure can be represented by a structure, and structure nesting is allowed; next, the topic needs to be registered in the program, and the way to register the topic can be through the XML configuration file It can also be done in the code segment. When registering a topic, you need to declare the topic name that the program needs to use, and the identity of the program for the topic (subscriber/publisher/subscriber and publisher). The same program can be used as Multiple identities register multiple topics; finally, you can subscribe or publish messages in the program code segment, and you need to configure the topic name as a parameter. It should be noted that message subscription belongs to asynchronous transmission, that is, the communication module will automatically start to execute related functions for processing after subscribing to relevant messages, and software developers only need to implement the corresponding functional logic.
传统的显控系统在进行网络通信时,一般采用基于Socket的通信方式,其主要思想是预先设置好网络中各个节点的IP地址,根据IP地址建立连接进行通信,其优点是技术成熟、应用广泛,但该方法存在的主要问题是:一旦通信方数量增多、消息类别复杂就会产生程序耦合度高的现象,造成开发复杂,维护不便,如果IP地址作了更改则必须由系统管理员重新对系统进行配置,因此在使用中如果某个部分发生了故障不容易及时修复。而本发明采用基于主题“订阅-发布”的实时通信机制则解决了这个问题,首先,参与通信的各方不需要规定IP地址等信息,也不需要与固定的主机建立连接,各方只接收或发送与自身相关的消息,消息的传输由通信中间件来完成,通信中间件对消息采用主题进行标识,以区别消息属性,这样不论通信方的数量有多大,各方程序都可以做到非常简洁,如果某个部分发生了故障可以通过在异地启动备份应用程序的方式来进行临时接替,确保可以实现不间断通信,提高了系统的整体可靠性。其次,在通信过程中往往需要对某些数据进行共享,采用这种机制能够通过订阅主题和发布主题来实现数据共享,无需编写额外程序代码。最后,当某个通信模块需要修改时,能将修改的范围限制在最小,降低系统维护复杂度。图8和图9说明了传统基于Socket的通信机制和本发明所采用的基于主题“订阅-发布”的实时通信机制之间的差异,图中采用了三种类别的消息(TopicA、TopicB和TopicC),可以明显看出传统方法对主机的依赖度高、耦合紧、结构复杂,在发生故障后不容易及时修复,维护成本较高,而基于主题“订阅-发布”的实时通信机制则简单清晰,在故障发生时可以在异地启动程序来恢复系统运转,便于维护。The traditional display and control system generally adopts a socket-based communication method when performing network communication. The main idea is to pre-set the IP address of each node in the network, and establish a connection for communication according to the IP address. The advantage is that the technology is mature and widely used. , but the main problem of this method is: Once the number of communication parties increases and the message types are complex, the phenomenon of high program coupling will occur, resulting in complex development and inconvenient maintenance. If the IP address is changed, it must be re-configured by the system administrator. The system is configured, so it is not easy to repair in time if a certain part fails during use. However, the present invention solves this problem by adopting the real-time communication mechanism based on the topic "subscription-publishing". Or send a message related to itself. The transmission of the message is completed by the communication middleware. The communication middleware uses the theme to identify the message to distinguish the message attribute. In this way, no matter how large the number of communication parties is, the programs of all parties can be very Concise, if a failure occurs in a certain part, it can be replaced temporarily by starting the backup application program in a different place, ensuring uninterrupted communication and improving the overall reliability of the system. Secondly, some data often needs to be shared during the communication process. With this mechanism, data sharing can be realized by subscribing to topics and publishing topics without writing additional program codes. Finally, when a certain communication module needs to be modified, the scope of modification can be limited to the minimum, reducing the complexity of system maintenance. Fig. 8 and Fig. 9 have illustrated the difference between the traditional communication mechanism based on Socket and the real-time communication mechanism based on topic "subscription-publishing" adopted by the present invention, three types of messages (TopicA, TopicB and TopicC have been adopted in the figure ), it can be clearly seen that the traditional method has high dependence on the host, tight coupling, and complex structure. It is not easy to repair in time after a failure occurs, and the maintenance cost is high. However, the real-time communication mechanism based on the topic "subscribe-publish" is simple and clear , When a failure occurs, the program can be started in a different place to restore the system operation, which is convenient for maintenance.
应理解,上述实施例仅用于说明本发明而不用于限制本发明的范围。此外应理解,在阅读了本发明讲授的内容之后,本领域技术人员可以对本发明作各种改动或修改,而不脱离本发明技术方案的精神和范围,其均应涵盖在本发明的权利要求范围中。It should be understood that the above-mentioned embodiments are only used to illustrate the present invention and are not intended to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention without departing from the spirit and scope of the technical solutions of the present invention, which should be covered by the claims of the present invention. in range.
Claims (8)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510631979.7A CN105204812B (en) | 2015-09-29 | 2015-09-29 | A kind of multiple solutions display & control system and its integrated approach based on plug-in unit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510631979.7A CN105204812B (en) | 2015-09-29 | 2015-09-29 | A kind of multiple solutions display & control system and its integrated approach based on plug-in unit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105204812A true CN105204812A (en) | 2015-12-30 |
| CN105204812B CN105204812B (en) | 2018-06-12 |
Family
ID=54952528
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510631979.7A Active CN105204812B (en) | 2015-09-29 | 2015-09-29 | A kind of multiple solutions display & control system and its integrated approach based on plug-in unit |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105204812B (en) |
Cited By (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105741047A (en) * | 2016-02-18 | 2016-07-06 | 南京国电南自美卓控制系统有限公司 | CLR class library technology based generator-transformer set protection device managing system and method |
| CN106210049A (en) * | 2016-07-12 | 2016-12-07 | Tcl集团股份有限公司 | A kind of cluster communication method based on Message Queuing and system |
| CN109542539A (en) * | 2018-11-22 | 2019-03-29 | 郑州云海信息技术有限公司 | The method and system of script argument in a kind of configuration Web system |
| CN109683924A (en) * | 2017-10-18 | 2019-04-26 | 株洲中车时代电气股份有限公司 | Application software updating method, system, equipment and computer readable storage medium |
| CN110221834A (en) * | 2019-06-12 | 2019-09-10 | 武汉海云空间信息技术有限公司 | The development approach and device of streetscape map |
| CN110362366A (en) * | 2018-04-02 | 2019-10-22 | 青岛海信移动通信技术股份有限公司 | A kind of application interface display methods and device |
| CN111381741A (en) * | 2020-03-05 | 2020-07-07 | 山东浪潮通软信息科技有限公司 | Toolbar plug-in method, device and system |
| CN111443963A (en) * | 2018-12-27 | 2020-07-24 | 沈阳高精数控智能技术股份有限公司 | Numerical control system of reconfigurable formula |
| CN111857929A (en) * | 2020-07-23 | 2020-10-30 | 杭州海康威视数字技术股份有限公司 | Method, device and computer equipment for displaying application program interface |
| CN112799732A (en) * | 2020-12-30 | 2021-05-14 | 深圳市捷顺科技实业股份有限公司 | A plug-in-based display method and related device |
| CN113129933A (en) * | 2019-12-31 | 2021-07-16 | 中移(成都)信息通信科技有限公司 | Terminal display control method, device, equipment and computer readable storage medium |
| CN113342297A (en) * | 2021-06-22 | 2021-09-03 | 中国船舶重工集团公司第七0七研究所 | Integrated management display control system and method based on platform and application |
| CN114547875A (en) * | 2022-02-09 | 2022-05-27 | 青岛海尔科技有限公司 | Method and device for calling Teamcenter parts |
| CN114579326A (en) * | 2020-12-01 | 2022-06-03 | 上海宝信软件股份有限公司 | Method and system for plug-in of distributed job scheduling and executing method |
| CN114595004A (en) * | 2022-03-14 | 2022-06-07 | 成都佳发安泰教育科技股份有限公司 | A smart screen system and working method based on encrypted modular plug-in technology |
| CN115586895A (en) * | 2022-09-08 | 2023-01-10 | 浙江讯盟科技有限公司 | Big data processing system and method for cooperative office |
| CN119883432A (en) * | 2025-01-25 | 2025-04-25 | 三微电子科技(苏州)有限公司 | Python plug-in loading method based on EDA software |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104090785A (en) * | 2014-06-19 | 2014-10-08 | 小米科技有限责任公司 | Method, device and system for providing application program |
| CN104239037A (en) * | 2014-08-25 | 2014-12-24 | 中国电子科技集团公司第二十九研究所 | Software framework with reconfigurable business function |
| CN104506628A (en) * | 2014-12-25 | 2015-04-08 | 深圳市科漫达智能管理科技有限公司 | Plugin repository management method and system |
| CN104516750A (en) * | 2013-09-29 | 2015-04-15 | 中国石油天然气股份有限公司 | A method and device for implementing plug-in integration and management in a SCADA system |
-
2015
- 2015-09-29 CN CN201510631979.7A patent/CN105204812B/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104516750A (en) * | 2013-09-29 | 2015-04-15 | 中国石油天然气股份有限公司 | A method and device for implementing plug-in integration and management in a SCADA system |
| CN104090785A (en) * | 2014-06-19 | 2014-10-08 | 小米科技有限责任公司 | Method, device and system for providing application program |
| CN104239037A (en) * | 2014-08-25 | 2014-12-24 | 中国电子科技集团公司第二十九研究所 | Software framework with reconfigurable business function |
| CN104506628A (en) * | 2014-12-25 | 2015-04-08 | 深圳市科漫达智能管理科技有限公司 | Plugin repository management method and system |
Cited By (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN105741047A (en) * | 2016-02-18 | 2016-07-06 | 南京国电南自美卓控制系统有限公司 | CLR class library technology based generator-transformer set protection device managing system and method |
| CN106210049A (en) * | 2016-07-12 | 2016-12-07 | Tcl集团股份有限公司 | A kind of cluster communication method based on Message Queuing and system |
| CN109683924A (en) * | 2017-10-18 | 2019-04-26 | 株洲中车时代电气股份有限公司 | Application software updating method, system, equipment and computer readable storage medium |
| CN110362366B (en) * | 2018-04-02 | 2022-06-24 | 青岛海信移动通信技术股份有限公司 | Application interface display method and device |
| CN110362366A (en) * | 2018-04-02 | 2019-10-22 | 青岛海信移动通信技术股份有限公司 | A kind of application interface display methods and device |
| CN109542539A (en) * | 2018-11-22 | 2019-03-29 | 郑州云海信息技术有限公司 | The method and system of script argument in a kind of configuration Web system |
| CN111443963A (en) * | 2018-12-27 | 2020-07-24 | 沈阳高精数控智能技术股份有限公司 | Numerical control system of reconfigurable formula |
| CN110221834A (en) * | 2019-06-12 | 2019-09-10 | 武汉海云空间信息技术有限公司 | The development approach and device of streetscape map |
| CN113129933B (en) * | 2019-12-31 | 2023-07-14 | 中移(成都)信息通信科技有限公司 | Terminal display control method, device, equipment, and computer-readable storage medium |
| CN113129933A (en) * | 2019-12-31 | 2021-07-16 | 中移(成都)信息通信科技有限公司 | Terminal display control method, device, equipment and computer readable storage medium |
| CN111381741A (en) * | 2020-03-05 | 2020-07-07 | 山东浪潮通软信息科技有限公司 | Toolbar plug-in method, device and system |
| CN111857929A (en) * | 2020-07-23 | 2020-10-30 | 杭州海康威视数字技术股份有限公司 | Method, device and computer equipment for displaying application program interface |
| CN114579326A (en) * | 2020-12-01 | 2022-06-03 | 上海宝信软件股份有限公司 | Method and system for plug-in of distributed job scheduling and executing method |
| CN112799732A (en) * | 2020-12-30 | 2021-05-14 | 深圳市捷顺科技实业股份有限公司 | A plug-in-based display method and related device |
| CN113342297A (en) * | 2021-06-22 | 2021-09-03 | 中国船舶重工集团公司第七0七研究所 | Integrated management display control system and method based on platform and application |
| CN114547875A (en) * | 2022-02-09 | 2022-05-27 | 青岛海尔科技有限公司 | Method and device for calling Teamcenter parts |
| CN114595004A (en) * | 2022-03-14 | 2022-06-07 | 成都佳发安泰教育科技股份有限公司 | A smart screen system and working method based on encrypted modular plug-in technology |
| CN115586895A (en) * | 2022-09-08 | 2023-01-10 | 浙江讯盟科技有限公司 | Big data processing system and method for cooperative office |
| CN119883432A (en) * | 2025-01-25 | 2025-04-25 | 三微电子科技(苏州)有限公司 | Python plug-in loading method based on EDA software |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105204812B (en) | 2018-06-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN105204812B (en) | A kind of multiple solutions display & control system and its integrated approach based on plug-in unit | |
| US20240015071A1 (en) | Method and apparatus for holistic rendering of cloud network configuration | |
| CN111277647B (en) | Block chain network member management method, device, equipment and medium | |
| CN106022007A (en) | Cloud platform system and method oriented to biological omics big data calculation | |
| CN102270125A (en) | Device and method for developing Web application | |
| CN111277432A (en) | Configuration information updating method and device, electronic equipment and storage medium | |
| CN108279882B (en) | Framework generation method, device, equipment and computer readable medium | |
| US12348599B2 (en) | Techniques for distributed interface component generation | |
| CN111245634A (en) | A virtualization management method and device | |
| US9935830B1 (en) | Cloud management system and method for disparate computing nodes in a cloud computing environment | |
| US11677620B2 (en) | Declarative specification based override mechanism for customizing data centers deployed on cloud platforms | |
| CN114579250B (en) | Method, device and storage medium for constructing virtual cluster | |
| CN109117127A (en) | Program code generation method, device and computer readable storage medium | |
| CN112988879A (en) | Method, system, device, storage medium and processor for accessing database | |
| CN111027221B (en) | A modular integrated avionics simulation training system based on components | |
| CN110599112B (en) | Network page development and maintenance method and device | |
| CN113439418A (en) | Method, system, terminal and storage medium for changing resource state | |
| CN115913959A (en) | Template-based device configuration method, device and electronic device | |
| Xiaohua et al. | Design and implementation of OpenDayLight manager application | |
| CN113472745A (en) | Selinux-based openstack public cloud multi-tenant isolation method, system and terminal | |
| CN113904859A (en) | Security group source group information management method and device, storage medium and electronic equipment | |
| CN115857878A (en) | A development framework generation method and application method | |
| CN115550425B (en) | A business process orchestration method for microservices | |
| CN116346779B (en) | Container IP network configuration method and device based on container cloud platform | |
| CN115129367B (en) | Instruction response method and device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |