[go: up one dir, main page]

CN102196409A - Method and system for monitoring terminal equipment as well as subscribing/publishing device - Google Patents

Method and system for monitoring terminal equipment as well as subscribing/publishing device Download PDF

Info

Publication number
CN102196409A
CN102196409A CN2011101246791A CN201110124679A CN102196409A CN 102196409 A CN102196409 A CN 102196409A CN 2011101246791 A CN2011101246791 A CN 2011101246791A CN 201110124679 A CN201110124679 A CN 201110124679A CN 102196409 A CN102196409 A CN 102196409A
Authority
CN
China
Prior art keywords
subscription
information
management device
publishing
management
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2011101246791A
Other languages
Chinese (zh)
Other versions
CN102196409B (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CN201110124679.1A priority Critical patent/CN102196409B/en
Publication of CN102196409A publication Critical patent/CN102196409A/en
Application granted granted Critical
Publication of CN102196409B publication Critical patent/CN102196409B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Computer And Data Communications (AREA)

Abstract

本发明提供了一种终端设备的监控方法、系统和订阅发布装置,其中,终端设备的监控方法包括:订阅发布装置接收用户接口(UI)管理装置发送的订阅信息,所述订阅信息中包含有所订阅的终端设备的信息;以及所述订阅发布装置根据所述订阅信息从设备管理装置获得所述终端设备的监控信息,并将所述终端设备的监控信息发送给所述UI管理装置。上述终端设备的监控方法、系统和订阅发布装置,可以为用户订阅感兴趣的信息,从而减少了不必要的通信数据量。

The present invention provides a terminal equipment monitoring method, system, and subscription publishing device, wherein the terminal equipment monitoring method includes: the subscription publishing device receives subscription information sent by a user interface (UI) management device, and the subscription information includes The information of the subscribed terminal equipment; and the subscription publishing means obtains the monitoring information of the terminal equipment from the equipment management means according to the subscription information, and sends the monitoring information of the terminal equipment to the UI management means. The monitoring method and system of the terminal equipment and the device for subscription and publication can subscribe interested information for the user, thereby reducing the amount of unnecessary communication data.

Description

终端设备的监控方法、系统和订阅发布装置Terminal equipment monitoring method, system and subscription publishing device

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种终端设备的监控方法、系统和订阅发布装置。The present invention relates to the field of communication technologies, and in particular to a terminal device monitoring method, system and subscription publishing device.

背景技术Background technique

通用串行总线(USB)移动终端是指带有USB接口的移动通信终端,比如带USB接口的智能手机、无线数据卡等,具体的USB接口种类有虚拟USB串口、虚拟USB调制解调(Modem)口或者虚拟USB以太网口等等。随着移动终端的处理能力和硬件标配的大幅提高,某些固定宽带业务也逐步在移动终端上实现。比如某些移动终端都已经具备路由功能。其它像拍照、摄像、全球定位系统(GPS)、收音机(FM)都已经成为非常普通的功能了。The Universal Serial Bus (USB) mobile terminal refers to a mobile communication terminal with a USB interface, such as a smart phone with a USB interface, a wireless data card, etc. The specific USB interface types include a virtual USB serial port, a virtual USB modem (Modem ) port or virtual USB Ethernet port and so on. With the substantial improvement of the processing capability and hardware standard configuration of mobile terminals, some fixed broadband services are gradually implemented on mobile terminals. For example, some mobile terminals already have a routing function. Other functions such as taking pictures, video cameras, global positioning systems (GPS), and radios (FM) have become very common functions.

尽管移动终端已经非常普及,但是PC还是占据主导地位,离PC被淘汰还需要较长时间。所以移动终端和PC还是要长期共存,在云计算垄断之前,他们之间还有必要进行很多的交互,诸如数据共享、无线猫、无线路由等,因此,也就有了需要在PC上使用的移动终端PC套件、用户管理(CM)管理软件(以下统称为用户接口(UI)管理软件)等来方便使用移动终端各种功能。所有这些UI管理软件都需要实现一个基本的功能就是USB设备管理,主要是让UI管理软件及时获取设备插入和拔出信息。而目前,每种UI管理软件提供的设备管理方法各不相同,比如使用高通的USB驱动,在驱动加载/卸载的过程中会对注册表进行操作,表明设备插入/拔出状态,所以该类设备可以通过对应注册表来实现对设备的监控。还有其它方法等等。另外不同的操作系统提供的设备监控接口也是不一样的,比如Windows就为每个服务或者窗口提供设备插拔信息的广播消息,而Linux却没有提供这样的广播消息,由于其把设备看作文件而存在,只能通过监测文件来监测设备插拔、电源变化等信息。Although mobile terminals have become very popular, PCs still occupy a dominant position, and it will take a long time before PCs are eliminated. Therefore, mobile terminals and PCs still have to coexist for a long time. Before the monopoly of cloud computing, there is still a lot of interaction between them, such as data sharing, wireless modem, wireless routing, etc. Mobile terminal PC suite, user management (CM) management software (hereinafter collectively referred to as user interface (UI) management software), etc. to facilitate the use of various functions of the mobile terminal. All these UI management software need to implement a basic function that is USB device management, mainly to allow the UI management software to obtain device insertion and removal information in a timely manner. At present, the device management methods provided by each UI management software are different. For example, when using Qualcomm’s USB driver, the registry will be operated during the driver loading/unloading process to indicate the device’s plugging/unplugging status, so this class The device can monitor the device through the corresponding registry. There are other methods and so on. In addition, the device monitoring interfaces provided by different operating systems are also different. For example, Windows provides broadcast messages for device plugging and unplugging information for each service or window, but Linux does not provide such broadcast messages because it regards devices as files. However, information such as device plugging and power supply changes can only be monitored through monitoring files.

另外,还有某些特殊用户(如测试用户等),需要进行批量操作,即需要对多设备进行操作。In addition, some special users (such as test users, etc.) need to perform batch operations, that is, they need to operate on multiple devices.

另外,目前的平台提供给UI管理软件的信息大多是固定的,提供信息多了就会增加通信数据量,而且有些不一定是UI管理软件感兴趣的。所以,如果UI管理软件可以订阅自己感兴趣的信息,可以极大地减少不必要的通信数据量,同时增强UI管理软件的可扩展性。In addition, most of the information provided by the current platform to UI management software is fixed. If more information is provided, the amount of communication data will increase, and some of them may not be of interest to UI management software. Therefore, if the UI management software can subscribe to the information it is interested in, it can greatly reduce the amount of unnecessary communication data, and at the same time enhance the scalability of the UI management software.

发明内容Contents of the invention

本发明提供了一种终端设备的监控方法、系统和订阅发布装置,以解决不能为用户实现感兴趣的信息订阅等问题。The present invention provides a terminal equipment monitoring method, system and subscription release device to solve the problem of not being able to subscribe interested information for users.

本发明提供了一种终端设备的监控方法,该方法包括:The present invention provides a monitoring method for terminal equipment, the method comprising:

订阅发布装置接收用户接口(UI)管理装置发送的订阅信息,所述订阅信息中包含有所订阅的终端设备的信息;以及The subscription publishing means receives the subscription information sent by the user interface (UI) management means, the subscription information includes the information of the subscribed terminal equipment; and

所述订阅发布装置根据所述订阅信息从设备管理装置获得所述终端设备的监控信息,并将所述终端设备的监控信息发送给所述UI管理装置。The subscription publishing means obtains the monitoring information of the terminal equipment from the equipment management means according to the subscription information, and sends the monitoring information of the terminal equipment to the UI management means.

优选地,在所述订阅发布装置根据所述订阅信息从设备管理装置获得所述终端设备的监控信息之前,所述方法还包括:Preferably, before the subscription publishing means obtains the monitoring information of the terminal device from the device management means according to the subscription information, the method further includes:

所述设备管理装置通过设备插拔变化和电源变化的广播消息或者内核通知事件获得所述终端设备的监控信息。The equipment management apparatus obtains the monitoring information of the terminal equipment through broadcast messages of equipment plug-in changes and power supply changes or kernel notification events.

优选地,所述订阅发布装置接收所述UI管理装置发送的订阅信息之后,所述方法还包括:Preferably, after the subscription publishing device receives the subscription information sent by the UI management device, the method further includes:

所述订阅发布装置保存发送所述订阅信息的UI管理装置的列表信息,所述列表信息中保存有所述UI管理装置及其所订阅的终端设备的对应关系;The subscription publishing device saves the list information of the UI management device that sends the subscription information, and the list information stores the corresponding relationship between the UI management device and the terminal equipment it subscribes to;

所述订阅发布装置将所述终端设备的监控信息发送给所述UI管理装置包括:The sending of the monitoring information of the terminal equipment to the UI management device by the subscription publishing device includes:

所述订阅发布装置根据所述对应关系识别订阅所述终端设备的监控信息的UI管理装置,并通过单独通讯的方式或者广播的方式将所述终端设备的监控信息发送给订阅其监控信息的UI管理装置。The subscription publishing device identifies the UI management device that subscribes to the monitoring information of the terminal device according to the corresponding relationship, and sends the monitoring information of the terminal device to the UI that subscribes to the monitoring information through separate communication or broadcasting. management device.

优选地,所述订阅发布装置接收UI管理装置发送的订阅信息之前,所述方法还包括:Preferably, before the subscription publishing device receives the subscription information sent by the UI management device, the method further includes:

所述UI管理装置进行初始化;The UI management device is initialized;

所述UI管理装置进行初始化包括:The initialization of the UI management device includes:

所述UI管理装置调用动态链接库(DLL),对所述DLL中设置的共享段中的所有信息进行初始化。The UI management device calls a dynamic link library (DLL) to initialize all information in the shared segment set in the DLL.

优选地,所述终端设备包括通用串行总线(USB)移动终端、USB虚拟调制解调(Modem)设备、USB虚拟网口设备和USB虚拟串口设备。Preferably, the terminal device includes a Universal Serial Bus (USB) mobile terminal, a USB virtual modem (Modem) device, a USB virtual network port device, and a USB virtual serial port device.

本发明还提供了一种订阅发布装置,该装置包括接收订阅模块和发布模块,其中:The present invention also provides a subscription publishing device, which includes a subscription receiving module and a publishing module, wherein:

所述接收订阅模块,用于接收用户接口(UI)管理装置发送的订阅信息,所述订阅信息中包含有所订阅的终端设备的信息;The receiving and subscribing module is configured to receive subscription information sent by a user interface (UI) management device, where the subscription information includes information about subscribed terminal devices;

所述发布模块,用于根据所述订阅信息从设备管理装置获得所述终端设备的监控信息,并将所述终端设备的监控信息发送给所述UI管理装置。The publishing module is configured to obtain monitoring information of the terminal device from the device management device according to the subscription information, and send the monitoring information of the terminal device to the UI management device.

优选地,所述装置还包括:Preferably, the device also includes:

保存模块,用于在所述接收订阅模块接收所述UI管理装置发送的订阅信息之后,保存发送所述订阅信息的UI管理装置的列表信息,所述列表信息中保存有所述UI管理装置及其所订阅的终端设备的对应关系;A saving module, configured to save the list information of the UI management device sending the subscription information after the subscription receiving module receives the subscription information sent by the UI management device, the list information stores the UI management device and The corresponding relationship of the terminal devices it subscribes to;

所述发布模块,是用于根据所述保存模块保存的列表信息中的所述对应关系识别订阅所述终端设备的监控信息的UI管理装置,并通过单独通讯的方式或者广播的方式将所述终端设备的监控信息发送给订阅其监控信息的UI管理装置。The publishing module is used to identify the UI management device for subscribing to the monitoring information of the terminal device according to the corresponding relationship in the list information saved by the saving module, and send the The monitoring information of the terminal equipment is sent to the UI management device subscribed to the monitoring information.

优选地,所述终端设备包括通用串行总线(USB)移动终端、USB虚拟调制解调(Modem)设备、USB虚拟网口设备和USB虚拟串口设备。Preferably, the terminal device includes a Universal Serial Bus (USB) mobile terminal, a USB virtual modem (Modem) device, a USB virtual network port device, and a USB virtual serial port device.

本发明还提供了一种终端设备的监控系统,该系统包括上述订阅发布装置,该系统还包括用户接口(UI)管理装置和设备管理装置,其中:The present invention also provides a monitoring system for terminal equipment, the system includes the above subscription publishing device, and the system also includes a user interface (UI) management device and a device management device, wherein:

所述UI管理装置,用于向所述订阅发布装置发送订阅信息和接收所述订阅发布装置发送的监控信息;The UI management device is configured to send subscription information to the subscription publishing device and receive monitoring information sent by the subscription publishing device;

所述设备管理装置,用于获得所述终端设备的监控信息。The device management device is configured to obtain monitoring information of the terminal device.

优选地,所述设备管理装置,是用于通过设备插拔变化和电源变化的广播消息或者内核通知事件获得所述终端设备的监控信息。Preferably, the device management device is configured to obtain the monitoring information of the terminal device through broadcast messages or kernel notification events of device plug-in changes and power supply changes.

优选地,所述UI管理装置,还用于进行初始化;Preferably, the UI management device is also used for initialization;

所述UI管理装置进行初始化是用于:调用动态链接库(DLL),对所述DLL中设置的共享段中的所有信息进行初始化。The initialization of the UI management device is used to: call a dynamic link library (DLL), and initialize all information in the shared segment set in the DLL.

上述终端设备的监控方法、系统和订阅发布装置,可以为用户订阅感兴趣的信息,从而减少了不必要的通信数据量。The monitoring method, system and subscription publishing device of the terminal equipment mentioned above can subscribe the interested information for the user, thereby reducing the amount of unnecessary communication data.

附图说明Description of drawings

图1是本发明监控系统实施例的结构示意图;Fig. 1 is the structural representation of monitoring system embodiment of the present invention;

图2是本发明实施例订阅/发布模式的类的关系图;Fig. 2 is the relationship diagram of the class of subscription/publishing mode of the embodiment of the present invention;

图3是本发明订阅发布装置单独通讯实施例的流程图;Fig. 3 is a flow chart of an embodiment of separate communication of the subscription publishing device of the present invention;

图4是本发明订阅发布装置广播通讯实施例的流程图;Fig. 4 is a flowchart of an embodiment of the broadcast communication of the subscription publishing device of the present invention;

图5是本发明实施例中动态库数据共享示意图。Fig. 5 is a schematic diagram of dynamic library data sharing in the embodiment of the present invention.

具体实施方式Detailed ways

为使本发明的目的、技术方案和优点更加清楚明白,下文中将结合附图对本发明的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the purpose, technical solution and advantages of the present invention more clear, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined arbitrarily with each other.

基于现有技术中存在的两方面因素,有必要在PC上提供一个统一的设备管理装置,无论是分别给单一UI管理用户提供所有的设备信息,还是给多UI管理用户提供单一的设备信息。Based on two factors existing in the prior art, it is necessary to provide a unified device management device on the PC, no matter providing all device information to a single UI management user or providing a single device information to a multi-UI management user.

本发明使用操作系统提供的设备插拔变化和电源变化的系统广播或者内核通知事件实现设备监控模块的通用,同时对所有上电的USB虚拟Modem设备、USB虚拟网口设备、USB虚拟串口设备等等USB设备实现统一管理,达到设备资源共享,然后基于订阅/发布方式实现一种多客户端和服务端的通信方式,提供统一的可供多UI同时使用的设备监控系统和方法。The present invention uses the system broadcast or kernel notification event provided by the operating system to realize the generalization of the device monitoring module, and at the same time, all powered-on USB virtual Modem devices, USB virtual network port devices, USB virtual serial port devices, etc. Wait for the unified management of USB devices to achieve device resource sharing, and then implement a multi-client and server-side communication method based on the subscription/publishing method, and provide a unified device monitoring system and method that can be used by multiple UIs at the same time.

本发明提供了一种订阅发布装置,该装置包括:The present invention provides a subscription publishing device, which includes:

接收订阅模块,用于接收用户接口(UI)管理装置发送的订阅信息,所述订阅信息中包含有所订阅的终端设备的信息;以及The receiving subscription module is used to receive the subscription information sent by the user interface (UI) management device, the subscription information includes the information of the subscribed terminal equipment; and

发布模块,用于根据所述订阅信息从设备管理装置获得所述终端设备的监控信息,并将所述终端设备的监控信息发送给所述UI管理装置。A publishing module, configured to obtain monitoring information of the terminal device from the device management device according to the subscription information, and send the monitoring information of the terminal device to the UI management device.

另外,所述装置还包括:保存模块,用于在所述接收订阅模块接收所述UI管理装置发送的订阅信息之后,保存发送所述订阅信息的UI管理装置的列表信息,所述列表信息中保存有所述UI管理装置及其所订阅的终端设备的对应关系;In addition, the device further includes: a saving module, configured to save the list information of the UI management device that sent the subscription information after the subscription receiving module receives the subscription information sent by the UI management device, in the list information storing the corresponding relationship between the UI management device and the terminal equipment it subscribes to;

所述发布模块,是用于根据所述保存模块保存的列表信息中的所述对应关系识别订阅所述终端设备的监控信息的UI管理装置,并通过单独通讯的方式或者广播的方式将所述终端设备的监控信息发送给订阅其监控信息的UI管理装置。The publishing module is used to identify the UI management device for subscribing to the monitoring information of the terminal device according to the corresponding relationship in the list information saved by the saving module, and send the The monitoring information of the terminal equipment is sent to the UI management device subscribed to the monitoring information.

上述订阅发布装置可以为用户订阅感兴趣的信息,从而减少了不必要的通信数据量。The above subscription publishing device can subscribe interested information for users, thereby reducing the amount of unnecessary communication data.

本发明提供了一种终端设备的监控系统,该系统包括上述订阅发布装置,还包括用户接口(UI)管理装置和设备管理装置,其中:The present invention provides a monitoring system for terminal equipment, the system includes the above subscription publishing device, and also includes a user interface (UI) management device and a device management device, wherein:

所述UI管理装置,用于向所述订阅发布装置发送订阅信息和接收所述订阅发布装置发送的监控信息;The UI management device is configured to send subscription information to the subscription publishing device and receive monitoring information sent by the subscription publishing device;

所述设备管理装置,用于获得所述终端设备的监控信息。The device management device is configured to obtain monitoring information of the terminal device.

具体地,所述设备管理装置是用于:通过设备插拔变化和电源变化的广播消息或者内核通知事件获得所述终端设备的监控信息。Specifically, the device management apparatus is configured to obtain monitoring information of the terminal device through broadcast messages of device plug-in changes and power supply changes or kernel notification events.

另外,所述UI管理装置,还用于进行初始化;所述UI管理装置进行初始化,是用于调用动态链接库(DLL),对所述DLL中设置的共享段中的所有信息进行初始化。In addition, the UI management device is also used for initialization; the UI management device for initialization is used to call a dynamic link library (DLL) to initialize all information in the shared segment set in the DLL.

如图1所示,是本发明监控系统实施例的结构示意图,该系统包括订阅发布装置11和设备管理装置12,其中,设备管理装置又包括设备监控模块、设备状态维护模块、设备控制模块、任务调度中心和I/O数据缓存模块,其中:As shown in Figure 1, it is a schematic structural diagram of an embodiment of the monitoring system of the present invention. The system includes a subscription publishing device 11 and a device management device 12, wherein the device management device further includes a device monitoring module, a device status maintenance module, a device control module, Task scheduling center and I/O data cache module, wherein:

设备管理装置,主要负责向UI管理装置提供统一的设备管理。主要涉及设备的打开、关闭、读写操作以及设备状态维护,同时为了统一管理,设备状态、设备端口信息必须为共享,以便所有UI管理装置都能访问。The device management device is mainly responsible for providing unified device management to the UI management device. It mainly involves the opening, closing, reading and writing operations of the device and the maintenance of the device status. At the same time, for unified management, the device status and device port information must be shared so that all UI management devices can access it.

订阅发布装置,主要负责保存和维护订阅UI的信息列表,同时向订阅UI提供两种通讯方式:单独通讯和广播通讯。系统可以根据具体需求自主选择消息发布方式。The subscription publishing device is mainly responsible for saving and maintaining the information list of the subscription UI, and at the same time provides two communication methods for the subscription UI: individual communication and broadcast communication. The system can independently choose the message publishing method according to specific needs.

上述订阅发布装置是基于发布/订阅(即Publish/Subscribe)模式实现的。发布/订阅设计模式又被称为主题/观察者设计模式:即订阅者向发布者注册某个事件,当发布者有订阅者感兴趣的行为发生时,就主动通知订阅者。The above subscription publishing apparatus is realized based on the publish/subscribe (ie, Publish/Subscribe) mode. The publish/subscribe design pattern is also known as the subject/observer design pattern: that is, the subscriber registers an event with the publisher, and when the publisher has a behavior that the subscriber is interested in, it will actively notify the subscriber.

设备监控模块,用于对所有的USB虚拟端口实现一种方式统一监控。The device monitoring module is used to implement unified monitoring of all USB virtual ports in one way.

其中,在Windows平台上:该设备监控模块主要负责监控设备插拔和电源状态等变化信息;其实现是借助操作系统提供设备在上电和断电两种变化情况下的广播消息(WM_DEVICECHANGE)和电源变化广播消息(WM_POWERBROADCAST),通过上述广播消息可以及时、统一地捕捉到所有USB设备插拔引起和电源状态等设备变化信息。Among them, on the Windows platform: the device monitoring module is mainly responsible for monitoring changes such as device plugging and power status; its realization is to use the operating system to provide broadcast messages (WM_DEVICECHANGE) and The power supply change broadcast message (WM_POWERBROADCAST), through the above broadcast message, can timely and uniformly capture all USB device plugging and unplugging and power status and other device change information.

具体地,要捕获上述操作系统提供的广播消息,其对象或者是一个服务,或者是一个窗口。在本发明中只选择窗口作为实施例来进行说明,由于该系统是一个平台,又不需要该实体窗口进行显示,所以需要把该窗口设置为隐藏。Specifically, to capture the broadcast message provided by the above operating system, the object is either a service or a window. In the present invention, only the window is selected as an embodiment for illustration. Since the system is a platform and does not need the physical window to be displayed, the window needs to be set as hidden.

进一步地,使用该隐藏窗口从捕获的广播消息中的参数中可以获取到设备在设备管理器中显示的设备名,该设备名是设备在该系统中的唯一标识,即使有两个同类设备插入同一个PC上,该设备名也是不一样的,因为系统会自动增加一个序号在最后以区别同类设备的不同实例;最后将该设备名加上其它辅助信息广播给订阅的UI。Further, the device name displayed in the device manager can be obtained from the parameters in the captured broadcast message by using this hidden window, which is the unique identifier of the device in the system, even if two devices of the same type are plugged in On the same PC, the device name is also different, because the system will automatically add a serial number at the end to distinguish different instances of the same device; finally, the device name plus other auxiliary information will be broadcast to the subscribed UI.

在Linux平台下:设备监控模块的实现主要由用户设备(udev)的守护进程来完成。当设备上电或者断电时,linux内核监测到之后,会生成一个通知事件,提供给如udev这样的守护进程。其效果等同于Windows下获得的设备插拔系统广播消息。Under the Linux platform: the realization of the device monitoring module is mainly completed by the daemon process of the user device (udev). When the device is powered on or powered off, the linux kernel will generate a notification event and provide it to daemon processes such as udev after monitoring. Its effect is equivalent to the system broadcast message of device plugging and unplugging obtained under Windows.

另外,由于本系统是以动态库(Dll)方式提供给UI管理装置调用。一般情况下,把变量设置成全局变量,放在BSS(Block Started by Symbol)段里边,达到数据共享的目的。但是由于每个UI管理装置调用动态库时,都需要把动态库的BSS段复制一份,这样就无法使用全局变量达到数据共享的目的。为此本发明实施例中使用预处理指令#pragma data_seg来设置一个共享段,并对该共享段中的所有信息进行初始化,以达到在动态库中共享的目的。In addition, since this system is provided in the form of a dynamic library (Dll) for calling by the UI management device. Under normal circumstances, set the variable as a global variable and put it in the BSS (Block Started by Symbol) segment to achieve the purpose of data sharing. However, when each UI management device calls the dynamic library, it is necessary to copy the BSS section of the dynamic library, so the purpose of data sharing cannot be achieved by using global variables. For this reason, in the embodiment of the present invention, a preprocessing instruction #pragma data_seg is used to set a shared segment, and all information in the shared segment is initialized to achieve the purpose of sharing in the dynamic library.

上述监控系统,通过使用Windows操作系统下的系统广播消息或者Linux操作系统下的内核通知事件使设备监控模块具有通用性,能够适用对各个厂商的USB虚拟设备进行监控,并实现对所有USB设备统一管理,可适用个人用户和批量用户(包括测试用户),并防止设备独占方式,提高电源切换下的系统稳定性。另外,使用发布/订阅(即Publish/Subscribe)模式为设备管理装置和UI管理装置之间提供一种具有单独通讯和广播通讯的通信方式,从而使该系统可以为目前PC机器上使用UI管理装置过程中遇到的各种场景提供通用的、统一的、可扩展的设备监控、设备管理和信息交互等功能。The above-mentioned monitoring system makes the device monitoring module universal by using the system broadcast message under the Windows operating system or the kernel notification event under the Linux operating system, which can be applied to monitor the USB virtual devices of various manufacturers, and realize the unified monitoring of all USB devices. Management, which is applicable to individual users and batch users (including test users), and prevents device monopoly, improving system stability under power switching. In addition, the Publish/Subscribe (i.e. Publish/Subscribe) mode is used to provide a communication method with separate communication and broadcast communication between the equipment management device and the UI management device, so that the system can use the UI management device on the current PC machine Various scenarios encountered in the process provide common, unified, and scalable functions such as device monitoring, device management, and information interaction.

如图2所示,是本发明实施例订阅/发布模式的类的关系图,一方面订阅/发布模式的订阅基类和发布基类同在一个文件中,即订阅基类和发布基类可以在一个文件中实现数据共享,这样订阅者的信息列表可以方便地被发布基类管理和维护。另一方面在同一个文件实现订阅基类和发布基类中方法的相互调用,相当于实现订阅和发布之间的通信。基于以上两个方面,可以方便地为实现客户端(订阅)和服务端(发布)之间的单独通讯和广播两种通信方式。As shown in Figure 2, it is the relationship diagram of the class of the subscription/publishing mode of the embodiment of the present invention. On the one hand, the subscription base class and the publishing base class of the subscription/publishing mode are in the same file, that is, the subscription base class and the publishing base class can be Realize data sharing in a file, so that the information list of subscribers can be easily managed and maintained by the publishing base class. On the other hand, the mutual invocation of methods in the subscription base class and the publishing base class is implemented in the same file, which is equivalent to the communication between subscription and publication. Based on the above two aspects, it is convenient to implement two communication modes: separate communication and broadcast between the client (subscription) and the server (publish).

其中,订阅基类提供订阅/取消订阅函数、向发布基类注册函数,以及接收消息通知函数。发布基类提供实现订阅/取消订阅用户管理函数,处理订阅注册函数,以及向订阅用户提供单独通讯和广播函数。Among them, the subscription base class provides subscription/unsubscription functions, registration functions to the publishing base class, and functions for receiving message notifications. The publishing base class provides functions to implement subscription/unsubscription user management, handle subscription registration functions, and provide individual communication and broadcast functions to subscribers.

另外,从上述文件的订阅基类中继承,并重载基类中的接收消息通知函数。通知的具体内容可以从重载函数的参数中获取。从上述文件的发布基类中继承,并重载发布基类中的处理注册函数。注册通知的具体内容可以从重载函数的参数中获取。消息通知函数和广播函数根据实际情况被调用。In addition, inherit from the subscription base class of the above file, and overload the notification function of receiving messages in the base class. The specific content of the notification can be obtained from the parameters of the overloaded function. Inherit from the publishing base class of the above file, and overload the processing registration function in the publishing base class. The specific content of the registration notification can be obtained from the parameters of the overloaded function. Message notification function and broadcast function are called according to the actual situation.

本发明还提供了一种终端设备的监控方法,该方法包括:The present invention also provides a monitoring method for terminal equipment, the method comprising:

步骤一、订阅发布装置接收用户接口(UI)管理装置发送的订阅信息,所述订阅信息中包含有所订阅的终端设备的信息;Step 1, the subscription publishing device receives the subscription information sent by the user interface (UI) management device, and the subscription information includes the information of the subscribed terminal equipment;

所述订阅发布装置接收UI管理装置发送的订阅信息之前,所述方法还可以包括:所述UI管理装置进行初始化;所述UI管理装置进行初始化包括:所述UI管理装置调用动态链接库(DLL),对所述DLL中设置的共享段中的所有信息进行初始化。Before the subscription publishing device receives the subscription information sent by the UI management device, the method may further include: the UI management device initializes; the UI management device initializes includes: the UI management device calls a dynamic link library (DLL ), initialize all information in the shared segment set in the DLL.

步骤二、订阅发布装置根据所述订阅信息从设备管理装置获得所述终端设备的监控信息,并将所述监控信息发送给所述UI管理装置。Step 2: The subscription publishing means obtains the monitoring information of the terminal equipment from the equipment management means according to the subscription information, and sends the monitoring information to the UI management means.

其中,在所述订阅发布装置根据所述订阅信息从设备管理装置获得所述终端设备的监控信息之前,所述方法还包括:所述设备管理装置通过设备插拔变化和电源变化的广播消息或者内核通知事件获得所述终端设备的监控信息。Wherein, before the subscribing and issuing means acquires the monitoring information of the terminal equipment from the equipment management means according to the subscription information, the method further includes: the equipment management means broadcasts messages of equipment plug-in changes and power changes or The kernel notifies the event to obtain the monitoring information of the terminal device.

优选地,所述订阅发布装置接收所述UI管理装置发送的订阅信息之后,所述方法还包括:所述订阅发布装置保存发送所述订阅信息的UI管理装置的列表信息,所述列表信息中保存有所述UI管理装置及其所订阅的终端设备的对应关系;所述订阅发布装置将所述终端设备的监控信息发送给所述UI管理装置包括:所述订阅发布装置根据所述对应关系识别订阅所述终端设备的监控信息的UI管理装置,并通过单独通讯的方式或者广播的方式将所述终端设备的监控信息发送给订阅其监控信息的UI管理装置。Preferably, after the subscription publishing device receives the subscription information sent by the UI management device, the method further includes: the subscription publishing device saves the list information of the UI management device sending the subscription information, and the list information includes: The corresponding relationship between the UI management device and the terminal equipment it subscribes to is stored; sending the monitoring information of the terminal device to the UI management device by the subscription publishing device includes: the subscription publishing device according to the corresponding relationship Identifying the UI management device that subscribes to the monitoring information of the terminal device, and sending the monitoring information of the terminal device to the UI management device that subscribes to the monitoring information through individual communication or broadcasting.

另外,所述终端设备包括通用串行总线(USB)移动终端、USB虚拟调制解调(Modem)设备、USB虚拟网口设备和USB虚拟串口设备等。In addition, the terminal device includes a universal serial bus (USB) mobile terminal, a USB virtual modem (Modem) device, a USB virtual network port device, a USB virtual serial port device, and the like.

如图3所示,是本发明订阅发布装置单独通讯实施例的流程图,该过程包括:As shown in Fig. 3, it is a flow chart of an embodiment of the individual communication of the subscription publishing device of the present invention, and the process includes:

步骤S301、UI管理装置在初始化过程中调用订阅函数;Step S301, the UI management device calls the subscription function during the initialization process;

步骤S302、当Server模块收到UI调用的订阅函数,会自动收集所有的上电设备列表;Step S302, when the Server module receives the subscription function called by the UI, it will automatically collect a list of all powered devices;

步骤S303、通过单独通讯方式把收集到的上电设备列表通知刚刚订阅的UI管理装置。Step S303 , notifying the UI management device that has just subscribed of the collected list of powered devices through separate communication.

如图4所示,是本发明订阅发布装置广播通讯实施例的流程图,该过程包括:As shown in FIG. 4 , it is a flow chart of an embodiment of the broadcast communication subscription publishing device of the present invention, and the process includes:

步骤S401、设备监控模块捕获到一个新的设备上电的系统广播;Step S401, the device monitoring module captures a system broadcast that a new device is powered on;

步骤S402、从设备上电的系统广播信息得到设备显示名;Step S402. Obtain the display name of the device from the system broadcast information when the device is powered on;

步骤S403、将刚上电的设备加入到设备状态维护列表中;Step S403, adding the device that has just been powered on to the device status maintenance list;

步骤S404、调用Server装置中的广播函数把刚才捕获的设备向所有订阅UI进行广播通知。Step S404, calling the broadcast function in the Server device to broadcast the captured device to all subscribed UIs.

如图5所示,使用预处理指令#pragma data_seg来设置一个数据在动态链接库(DLL)的共享段,其实质也就是当该动态库被调用之后,调用进程不会复制该共享段,而整个内存中只维护一份拷贝。而其它代码(Code)段和数据(Data)段则不同,每当动态库被调用时,调用进程都会复制一份Code段和Data段,并初始化。As shown in Figure 5, use the preprocessing instruction #pragma data_seg to set a data in the shared segment of the dynamic link library (DLL), its essence is that after the dynamic library is called, the calling process will not copy the shared segment, and Only one copy is maintained in the entire memory. The other code (Code) segment and data (Data) segment are different. Whenever the dynamic library is called, the calling process will copy a copy of the Code segment and the Data segment and initialize them.

该处理方式有利于信息保护,方便信息管理和维护,有利于提高处理效率。This processing method is conducive to information protection, facilitates information management and maintenance, and is conducive to improving processing efficiency.

上述终端设备的监控方法及系统,通过设备管理装置提供了统一的监控、管理方式,通过订阅发布装置为用户订阅感兴趣的信息,从而减少了不必要的通信数据量。The above method and system for monitoring terminal equipment provides a unified monitoring and management method through the equipment management device, and subscribes interested information for users through the subscription publishing device, thereby reducing unnecessary communication data volume.

本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相关硬件完成,上述程序可以存储于计算机可读存储介质中,如只读存储器、磁盘或光盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。相应地,上述实施例中的各模块/单元可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本发明不限制于任何特定形式的硬件和软件的结合。Those skilled in the art can understand that all or part of the steps in the above method can be completed by instructing related hardware through a program, and the above program can be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disk, and the like. Optionally, all or part of the steps in the foregoing embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module/unit in the foregoing embodiments may be implemented in the form of hardware, or may be implemented in the form of software function modules. The present invention is not limited to any specific combination of hardware and software.

以上实施例仅用以说明本发明的技术方案而非限制,仅仅参照较佳实施例对本发明进行了详细说明。本领域的普通技术人员应当理解,可以对本发明的技术方案进行修改或者等同替换,而不脱离本发明技术方案的精神和范围,均应涵盖在本发明的权利要求范围当中。The above embodiments are only used to illustrate the technical solutions of the present invention rather than limit them, and the present invention is described in detail with reference to preferred embodiments. Those skilled in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and all should be covered by the claims of the present invention.

Claims (11)

1.一种终端设备的监控方法,该方法包括:1. A monitoring method for terminal equipment, the method comprising: 订阅发布装置接收用户接口(UI)管理装置发送的订阅信息,所述订阅信息中包含有所订阅的终端设备的信息;以及The subscription publishing means receives the subscription information sent by the user interface (UI) management means, the subscription information includes the information of the subscribed terminal equipment; and 所述订阅发布装置根据所述订阅信息从设备管理装置获得所述终端设备的监控信息,并将所述终端设备的监控信息发送给所述UI管理装置。The subscription publishing means obtains the monitoring information of the terminal equipment from the equipment management means according to the subscription information, and sends the monitoring information of the terminal equipment to the UI management means. 2.根据权利要求1所述的方法,其特征在于:2. The method according to claim 1, characterized in that: 在所述订阅发布装置根据所述订阅信息从设备管理装置获得所述终端设备的监控信息之前,所述方法还包括:Before the subscription publishing means obtains the monitoring information of the terminal equipment from the equipment management means according to the subscription information, the method further includes: 所述设备管理装置通过设备插拔变化和电源变化的广播消息或者内核通知事件获得所述终端设备的监控信息。The equipment management apparatus obtains the monitoring information of the terminal equipment through broadcast messages of equipment plug-in changes and power supply changes or kernel notification events. 3.根据权利要求1所述的方法,其特征在于:3. The method according to claim 1, characterized in that: 所述订阅发布装置接收所述UI管理装置发送的订阅信息之后,所述方法还包括:After the subscription publishing device receives the subscription information sent by the UI management device, the method further includes: 所述订阅发布装置保存发送所述订阅信息的UI管理装置的列表信息,所述列表信息中保存有所述UI管理装置及其所订阅的终端设备的对应关系;The subscription publishing device saves the list information of the UI management device that sends the subscription information, and the list information stores the corresponding relationship between the UI management device and the terminal equipment it subscribes to; 所述订阅发布装置将所述终端设备的监控信息发送给所述UI管理装置包括:The sending of the monitoring information of the terminal equipment to the UI management device by the subscription publishing device includes: 所述订阅发布装置根据所述对应关系识别订阅所述终端设备的监控信息的UI管理装置,并通过单独通讯的方式或者广播的方式将所述终端设备的监控信息发送给订阅其监控信息的UI管理装置。The subscription publishing device identifies the UI management device that subscribes to the monitoring information of the terminal device according to the corresponding relationship, and sends the monitoring information of the terminal device to the UI that subscribes to the monitoring information through separate communication or broadcasting. management device. 4.根据权利要求1-3任一权利要求所述的方法,其特征在于:4. The method according to any one of claims 1-3, characterized in that: 所述订阅发布装置接收UI管理装置发送的订阅信息之前,所述方法还包括:Before the subscription publishing device receives the subscription information sent by the UI management device, the method further includes: 所述UI管理装置进行初始化;The UI management device is initialized; 所述UI管理装置进行初始化包括:The initialization of the UI management device includes: 所述UI管理装置调用动态链接库(DLL),对所述DLL中设置的共享段中的所有信息进行初始化。The UI management device calls a dynamic link library (DLL) to initialize all information in the shared segment set in the DLL. 5.根据权利要求4所述的方法,其特征在于:5. The method according to claim 4, characterized in that: 所述终端设备包括通用串行总线(USB)移动终端、USB虚拟调制解调(Modem)设备、USB虚拟网口设备和USB虚拟串口设备。The terminal equipment includes a universal serial bus (USB) mobile terminal, a USB virtual modem (Modem) device, a USB virtual network port device and a USB virtual serial port device. 6.一种订阅发布装置,该装置包括接收订阅模块和发布模块,其中:6. A subscription publishing device, which includes a receiving subscription module and a publishing module, wherein: 所述接收订阅模块,用于接收用户接口(UI)管理装置发送的订阅信息,所述订阅信息中包含有所订阅的终端设备的信息;The receiving and subscribing module is configured to receive subscription information sent by a user interface (UI) management device, where the subscription information includes information about subscribed terminal devices; 所述发布模块,用于根据所述订阅信息从设备管理装置获得所述终端设备的监控信息,并将所述终端设备的监控信息发送给所述UI管理装置。The publishing module is configured to obtain monitoring information of the terminal device from the device management device according to the subscription information, and send the monitoring information of the terminal device to the UI management device. 7.根据权利要求6所述的装置,其特征在于,所述装置还包括:7. The device according to claim 6, further comprising: 保存模块,用于在所述接收订阅模块接收所述UI管理装置发送的订阅信息之后,保存发送所述订阅信息的UI管理装置的列表信息,所述列表信息中保存有所述UI管理装置及其所订阅的终端设备的对应关系;A saving module, configured to save the list information of the UI management device sending the subscription information after the subscription receiving module receives the subscription information sent by the UI management device, the list information stores the UI management device and The corresponding relationship of the terminal devices it subscribes to; 所述发布模块,是用于根据所述保存模块保存的列表信息中的所述对应关系识别订阅所述终端设备的监控信息的UI管理装置,并通过单独通讯的方式或者广播的方式将所述终端设备的监控信息发送给订阅其监控信息的UI管理装置。The publishing module is used to identify the UI management device for subscribing to the monitoring information of the terminal device according to the corresponding relationship in the list information saved by the saving module, and send the The monitoring information of the terminal equipment is sent to the UI management device subscribed to the monitoring information. 8.根据权利要求7所述的装置,其特征在于:8. The device according to claim 7, characterized in that: 所述终端设备包括通用串行总线(USB)移动终端、USB虚拟调制解调(Modem)设备、USB虚拟网口设备和USB虚拟串口设备。The terminal equipment includes a universal serial bus (USB) mobile terminal, a USB virtual modem (Modem) device, a USB virtual network port device and a USB virtual serial port device. 9.一种终端设备的监控系统,包括如权利要求6-8任一权利要求所述的订阅发布装置,该系统还包括用户接口(UI)管理装置和设备管理装置,其中:9. A monitoring system for terminal equipment, comprising the subscription publishing device according to any one of claims 6-8, the system further comprising a user interface (UI) management device and a device management device, wherein: 所述UI管理装置,用于向所述订阅发布装置发送订阅信息和接收所述订阅发布装置发送的监控信息;The UI management device is configured to send subscription information to the subscription publishing device and receive monitoring information sent by the subscription publishing device; 所述设备管理装置,用于获得所述终端设备的监控信息。The device management device is configured to obtain monitoring information of the terminal device. 10.根据权利要求9所述的系统,其特征在于:10. The system of claim 9, wherein: 所述设备管理装置,是用于通过设备插拔变化和电源变化的广播消息或者内核通知事件获得所述终端设备的监控信息。The equipment management device is used to obtain the monitoring information of the terminal equipment through broadcast messages of equipment plug-in changes and power supply changes or kernel notification events. 11.根据权利要求10所述的系统,其特征在于:11. The system of claim 10, wherein: 所述UI管理装置,还用于进行初始化;The UI management device is also used for initialization; 所述UI管理装置进行初始化是用于:调用动态链接库(DLL),对所述DLL中设置的共享段中的所有信息进行初始化。The initialization of the UI management device is used to: call a dynamic link library (DLL), and initialize all the information in the shared segment set in the DLL.
CN201110124679.1A 2011-05-13 2011-05-13 Method and system for monitoring terminal equipment as well as subscribing/publishing device Active CN102196409B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110124679.1A CN102196409B (en) 2011-05-13 2011-05-13 Method and system for monitoring terminal equipment as well as subscribing/publishing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110124679.1A CN102196409B (en) 2011-05-13 2011-05-13 Method and system for monitoring terminal equipment as well as subscribing/publishing device

Publications (2)

Publication Number Publication Date
CN102196409A true CN102196409A (en) 2011-09-21
CN102196409B CN102196409B (en) 2017-03-22

Family

ID=44603651

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110124679.1A Active CN102196409B (en) 2011-05-13 2011-05-13 Method and system for monitoring terminal equipment as well as subscribing/publishing device

Country Status (1)

Country Link
CN (1) CN102196409B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147527A (en) * 2017-05-16 2017-09-08 郑州云海信息技术有限公司 System and method for Linux cluster alarm
CN107196818A (en) * 2017-05-16 2017-09-22 郑州云海信息技术有限公司 A kind of system and method for Linux cluster monitorings
CN111240752A (en) * 2019-12-31 2020-06-05 北京元心科技有限公司 Operating system self-adaption method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060117035A1 (en) * 2004-12-01 2006-06-01 International Business Machines Corporation Just-in-time publishing via a publish/subscribe messaging system having message publishing controls
CN1866833A (en) * 2005-12-22 2006-11-22 华为技术有限公司 Distributed data management system and its method for dynamically subscribing data
CN101159710A (en) * 2007-11-06 2008-04-09 中国科学院计算技术研究所 Search method and system for service composition under service-oriented architecture

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060117035A1 (en) * 2004-12-01 2006-06-01 International Business Machines Corporation Just-in-time publishing via a publish/subscribe messaging system having message publishing controls
CN1866833A (en) * 2005-12-22 2006-11-22 华为技术有限公司 Distributed data management system and its method for dynamically subscribing data
CN101159710A (en) * 2007-11-06 2008-04-09 中国科学院计算技术研究所 Search method and system for service composition under service-oriented architecture

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107147527A (en) * 2017-05-16 2017-09-08 郑州云海信息技术有限公司 System and method for Linux cluster alarm
CN107196818A (en) * 2017-05-16 2017-09-22 郑州云海信息技术有限公司 A kind of system and method for Linux cluster monitorings
CN111240752A (en) * 2019-12-31 2020-06-05 北京元心科技有限公司 Operating system self-adaption method and system
CN111240752B (en) * 2019-12-31 2021-08-17 北京元心科技有限公司 Operating system self-adaption method and system

Also Published As

Publication number Publication date
CN102196409B (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN111800462B (en) Micro service instance processing method, micro service instance processing device, computer equipment and storage medium
EP3385835B1 (en) Method and apparatus for configuring accelerator
CN102868729B (en) The method, client and Cloud Server of realizing software service based on cloud service
CN106774786B (en) Power consumption control method and device
CN107086937B (en) Monitoring method and device
CN101403981A (en) Management method and system for mobile phone application program running state
CN103595801A (en) Cloud computing system and real-time monitoring method for virtual machine in cloud computing system
JP2021518955A (en) Processor core scheduling method, equipment, terminals and storage media
CN112187903A (en) Message pushing method and device and message service system
US11816200B2 (en) Terminal and method for managing launch of an application of a terminal
WO2022056081A1 (en) A wireless device and a method for automatic recovery from failures
WO2023159956A1 (en) Bare metal server inspection and deployment method and apparatus, and device and medium
CN102196409B (en) Method and system for monitoring terminal equipment as well as subscribing/publishing device
CN112383617B (en) Method, device, terminal equipment and medium for performing long connection
US20150212834A1 (en) Interoperation method of newtork device performed by computing device including cloud operating system in could environment
CN115774700A (en) File sharing method and device, computer equipment and storage medium
CN111373798B (en) A network slice configuration method and device, and computer storage medium
CN101551758A (en) System and method for implementing paralleling work of device management and tasks
CN108713199A (en) Rights management method, system, mobile terminal, shared charging device and server
CN103986740A (en) Multi-terminal application supporting always-online-infrastructure method, devices and system
CN113342461B (en) Equipment mounting method and device, computer equipment and readable storage medium
CN117234687A (en) Heterogeneous computing power scheduling method, device, equipment and storage medium in multi-cloud scene
CN116820681A (en) Container combination processing method, device, equipment and storage medium
EP2922305A1 (en) Set-top box, client, system and method for access of virtual desktop
CN116263768B (en) Cloud-based information push 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
C14 Grant of patent or utility model
GR01 Patent grant