CN109491710B - Equipment management system and method - Google Patents

Equipment management system and method Download PDF

Info

Publication number
CN109491710B
CN109491710B CN201811229485.6A CN201811229485A CN109491710B CN 109491710 B CN109491710 B CN 109491710B CN 201811229485 A CN201811229485 A CN 201811229485A CN 109491710 B CN109491710 B CN 109491710B
Authority
CN
China
Prior art keywords
information
server
old
received
control information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811229485.6A
Other languages
Chinese (zh)
Other versions
CN109491710A (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.)
Sichuan Hongmei Intelligent Technology Co Ltd
Original Assignee
Sichuan Hongmei Intelligent Technology Co Ltd
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 Sichuan Hongmei Intelligent Technology Co Ltd filed Critical Sichuan Hongmei Intelligent Technology Co Ltd
Priority to CN201811229485.6A priority Critical patent/CN109491710B/en
Publication of CN109491710A publication Critical patent/CN109491710A/en
Application granted granted Critical
Publication of CN109491710B publication Critical patent/CN109491710B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention provides a device management system and a device management method. The number of devices includes a number of new devices using MQTT and a number of old devices using XMPP. When receiving externally input control information aiming at any started device, the user terminal sends the control information to the first server through the MQTT; the first server, for each received control information: when the current control information is directed to the new equipment, the current control information is sent to the new equipment directed to the current control information through the MQTT, otherwise, the current control information is sent to the second server through the plug-in; the second server respectively sends the received control information to the corresponding old equipment through XMPP; each of the new and old devices executes each of the received control information. Therefore, the scheme can manage the old equipment without upgrading the old equipment.

Description

Equipment management system and method
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a system and a method for device management.
Background
Compared with the XMPP (Extensible Messaging and Presence Protocol), the MQTT (Message queue Telemetry Transport) Protocol has the characteristics of simplicity, smallness, strong extensibility, flow saving, power saving and the like, and is therefore a Protocol preferably used by new equipment. However, there are also a large number of old devices that are still using XMPP protocol.
At present, in order to realize the comprehensive management of new and old equipment by a user terminal, the old equipment can be upgraded. However, due to the large number of old devices, large-scale upgrading of old devices is time-consuming and labor-consuming.
Disclosure of Invention
The invention provides a device management system and a device management method, which can be managed without upgrading old devices.
In order to achieve the purpose, the invention is realized by the following technical scheme:
in one aspect, the present invention provides an apparatus management system, including:
a user terminal, at least one device associated with the user terminal, a first server using MQTT and a second server using XMPP;
wherein the at least one device comprises: at least one new device using MQTT and at least one old device using XMPP;
the second server runs a pre-programmed plug-in;
the user terminal is used for sending the received control information to the first server through the MQTT when the control information which is input from the outside and aims at any one device in a starting state is received;
the first server is configured to execute, for each received control information: when the current control information is control information for a new device, the current control information is sent to the new device for which the current control information is directed through the MQTT; when the current control information is control information for an old device, the current control information is sent to the second server through the plug-in;
the second server is used for respectively sending each piece of received control information to the old equipment corresponding to the control information through the XMPP;
each new device is used for executing each received control information;
each of the old devices is configured to execute each of the received control information.
Further, the device management system further includes: a database;
each old device is used for generating online information carrying a unique identifier of the old device when the old device is started, and sending the generated online information to the second server through the XMPP; periodically generating running state information carrying a unique identifier of the second server after starting up, and sending each generated running state information to the second server through the XMPP;
the second server is used for sending each piece of received online information and each piece of received running state information to the first server through the plug-in; storing each piece of received online information to the database through the plug-in;
the first server is configured to execute, for each piece of received online information: according to the unique identifier carried in the current online information, determining that the first old equipment with the unique identifier is started, and sending notification information of the started first old equipment to the user terminal through the MQTT; executing for each received running state information: and judging whether a second old device with the unique identifier is determined to be started or not according to the unique identifier carried in the current running state information, if not, sending notification information that the second old device is started to the user terminal when the second old device is determined to be started according to the online information stored in the database.
Furthermore, each of the old devices is configured to generate offline information carrying a unique identifier of the old device when the old device is powered off, and send the generated offline information to the second server through the XMPP; after the computer is started, heartbeat signals carrying unique identification of the computer are periodically generated, and each generated heartbeat signal is sent to the second server through the XMPP;
the second server is used for sending each piece of received offline information and each piece of received heartbeat signal to the first server through the plug-in; storing each piece of received offline information to the database through the plug-in;
the first server is configured to execute, for each piece of received offline information: according to the unique identifier carried in the current offline information, determining that the third old equipment with the unique identifier is powered off, and sending notification information of the power-off of the third old equipment to the user terminal through the MQTT; for each received heartbeat signal: when the receiving time of the periodic heartbeat signal is reached but the next heartbeat signal of the current heartbeat signal is not received, judging whether the fourth old equipment with the unique identifier is determined to be powered off or not according to the unique identifier carried in the current heartbeat signal, if not, sending notification information that the fourth old equipment is powered off to the user terminal when the fourth old equipment is determined to be powered off according to offline information stored in the database.
Furthermore, each new device is used for generating startup information carrying a unique identifier of the new device when the new device is started up, and sending the generated startup information to the first server through the MQTT; generating shutdown information carrying a unique identifier of the server when the server is shut down, and sending the generated shutdown information to the first server through the MQTT;
the first server is configured to execute, for each piece of received boot information: according to the unique identification carried in the current starting information, determining that the first new device with the unique identification is started, and sending notification information that the first new device is started to the user terminal through the MQTT; executing, for each received shutdown information: and determining that the second new device with the unique identifier is powered off according to the unique identifier carried in the current power-off information, and sending notification information that the second new device is powered off to the user terminal through the MQTT.
Further, each new device is configured to send feedback information for any control information to the first server through the MQTT when the new device completes execution of the control information;
each old device is used for sending feedback information aiming at any control information to the second server through the XMPP when the old device completes execution of the control information;
the second server is used for sending each piece of received feedback information to the first server through the plug-in;
and the first server is used for sending each piece of received feedback information to the user terminal through the MQTT.
In another aspect, the present invention provides a device management method, including:
the method comprises the steps that when a user terminal associated with at least one device receives control information which is input from the outside and aims at any one device in a starting state, the received control information is sent to a first server using the MQTT through the MQTT;
the first server performs, for each piece of received control information: when the current control information is control information for a new device using MQTT in the at least one device, sending the current control information to the new device to which the current control information is directed through the MQTT; when the current control information is control information for old equipment using XMPP in the at least one piece of equipment, sending the current control information to a second server by using a pre-programmed plug-in running on the second server of XMPP;
each new device executes each received control information;
the second server sends each received control information to the old equipment corresponding to the control information through the XMPP;
each of the old devices executes each of the received control information.
Further, the method further comprises: each old device generates online information carrying a unique identifier of the old device when the old device is started, and sends the generated online information to the second server through the XMPP;
each old device periodically generates running state information carrying a unique identifier of the old device after being started up, and sends each generated running state information to the second server through the XMPP;
the second server sends each piece of received online information and each piece of received running state information to the first server through the plug-in, and stores each piece of received online information to the database through the plug-in;
the first server executes, for each piece of received online information: according to the unique identifier carried in the current online information, determining that the first old equipment with the unique identifier is started, and sending notification information of the started first old equipment to the user terminal through the MQTT;
the first server executes, for each piece of received running state information: and judging whether a second old device with the unique identifier is determined to be started or not according to the unique identifier carried in the current running state information, if not, sending notification information that the second old device is started to the user terminal when the second old device is determined to be started according to the online information stored in the database.
Further, the method further comprises: each old device generates offline information carrying a unique identifier of the old device when the old device is powered off, and sends the generated offline information to the second server through the XMPP;
each old device periodically generates a heartbeat signal carrying a unique identifier of the old device after being started up, and each generated heartbeat signal is sent to the second server through the XMPP;
the second server sends each piece of received offline information and each heartbeat signal to the first server through the plug-in, and stores each piece of received offline information to the database through the plug-in;
the first server executes, for each piece of the received offline information: according to the unique identifier carried in the current offline information, determining that the third old equipment with the unique identifier is powered off, and sending notification information of the power-off of the third old equipment to the user terminal through the MQTT;
the first server performs, for each received heartbeat signal: when the receiving time of the periodic heartbeat signal is reached but the next heartbeat signal of the current heartbeat signal is not received, judging whether the fourth old equipment with the unique identifier is determined to be powered off or not according to the unique identifier carried in the current heartbeat signal, if not, sending notification information that the fourth old equipment is powered off to the user terminal when the fourth old equipment is determined to be powered off according to offline information stored in the database.
Further, the method further comprises: each new device generates startup information carrying a unique identifier of the new device when the new device is started up, and sends the generated startup information to the first server through the MQTT;
each new device generates shutdown information carrying a unique identifier of the new device when the new device is shut down, and sends the generated shutdown information to the first server through the MQTT;
the first server executes, for each piece of received boot information: according to the unique identification carried in the current starting information, determining that the first new device with the unique identification is started, and sending notification information that the first new device is started to the user terminal through the MQTT;
the first server performs, for each received shutdown information: and determining that the second new device with the unique identifier is powered off according to the unique identifier carried in the current power-off information, and sending notification information that the second new device is powered off to the user terminal through the MQTT.
Further, the method further comprises: when each new device finishes executing any control information, sending feedback information aiming at the control information to the first server through the MQTT;
when each old device finishes executing any control information, sending feedback information aiming at the control information to the second server through the XMPP;
the second server sends each received feedback information to the first server through the plug-in;
and the first server sends each piece of received feedback information to the user terminal through the MQTT.
The invention provides a device management system and a device management method. The number of devices includes a number of new devices using MQTT and a number of old devices using XMPP. When receiving externally input control information aiming at any started device, the user terminal sends the control information to the first server through the MQTT; the first server, for each received control information: when the current control information is directed to the new equipment, the current control information is sent to the new equipment directed to the current control information through the MQTT, otherwise, the current control information is sent to the second server through the plug-in; the second server respectively sends the received control information to the corresponding old equipment through XMPP; each of the new and old devices executes each of the received control information. Therefore, the method and the system can manage the old equipment without upgrading the old equipment.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram of a device management system according to an embodiment of the present invention;
fig. 2 is a schematic diagram of another device management system provided in an embodiment of the present invention;
fig. 3 is a flowchart of a device management method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer and more complete, the technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention, and based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without creative efforts belong to the scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a device management system, which may include:
a user terminal 101, at least one device associated with said user terminal 101, a first server 102 using MQTT and a second server 103 using XMPP;
wherein the at least one device comprises: at least one new device 104 using MQTT and at least one old device 105 using XMPP;
a pre-programmed plug-in is run on the second server 103;
the user terminal 101 is configured to send, when receiving externally input control information for any one of the devices in the power-on state, the received control information to the first server 102 through the MQTT;
the first server 102 is configured to perform, for each received control information: when the current control information is control information for a new device 104, sending the current control information to the new device 104 to which the current control information is directed through the MQTT; when the current control information is control information for an old device 105, sending the current control information to the second server 103 through the plug-in;
the second server 103 is configured to send each received control information to the old device 105 to which the control information is addressed through the XMPP;
each of the new devices 104 is configured to execute each of the received control information;
each of the old devices 105 is configured to execute each of the received control information.
The embodiment of the invention provides a device management system, which comprises a first server using MQTT, a second server using XMPP and running a preset plug-in, a user terminal and a plurality of devices associated with the user terminal. The number of devices includes a number of new devices using MQTT and a number of old devices using XMPP. When receiving externally input control information aiming at any started device, the user terminal sends the control information to the first server through the MQTT; the first server, for each received control information: when the current control information is directed to the new equipment, the current control information is sent to the new equipment directed to the current control information through the MQTT, otherwise, the current control information is sent to the second server through the plug-in; the second server respectively sends the received control information to the corresponding old equipment through XMPP; each of the new and old devices executes each of the received control information. Therefore, the embodiment of the invention can manage the old equipment without upgrading the old equipment.
In detail, embodiments of the present invention may relate to communication between two communication protocols, in particular to upgrading communication between a user terminal using MQTT protocol and a previously produced legacy device using XMPP protocol. In the embodiment of the present invention, the user terminal may be a user mobile phone installed with a dedicated APP (Application, mobile phone software). Thus, the user can input control information to control the corresponding device through the APP.
In detail, the APP can use MQTT protocol, and generally, the APP can directly realize a control function without distinguishing whether the APP uses XMPP protocol equipment or MQTT protocol equipment, so that the work of upgrading equipment-side software is omitted.
In detail, XMPP is a protocol based on a subset XML of the standard universal markup language, which inherits flexible developability in the XML environment. The extended XMPP can handle the user's needs by sending the extended information and building applications such as content distribution systems and address-based services on top of the XMPP. But the defects of more complex protocol, redundancy (based on XML), flow rate and electricity consumption, high maintenance cost and the like exist in the using process.
In detail, compared with XMPP, MQTT is compact, small, scalable, traffic-saving, and power-saving, and has been currently applied to the enterprise field.
In an embodiment of the present invention, the second server may be a tigase server.
In detail, the worker may write and operate the plug-in a specific format in advance, which is equivalent to establishing a channel between the first server and the second server, so as to achieve interconnection and intercommunication between the first server and the second server.
Based on the above, for example, when a user needs to control any device associated with the mobile phone, whether the device to be controlled is turned on or not can be checked through the APP running on the mobile phone, and if the device to be controlled is turned on, a control command can be input, so that the mobile phone can send corresponding control information to the first server through the MQTT. If the device to be controlled is a new device, the first server can directly send the new device to the corresponding new device through the MQTT, and thus, the new device can execute the received control information to realize the control of the new device by the user. Correspondingly, if the device to be controlled is an old device, the first server may send the control information to the second server through the plug-in, and the second server further sends the control information to the corresponding old device through the XMPP.
Therefore, old equipment does not need to be upgraded, and a user can still control the old equipment, so that the problems of time and labor waste caused by large-scale upgrading of the old equipment can be avoided.
In summary, the embodiment of the present invention can use a more compact and small MQTT protocol to control the old devices using the complex and redundant XMPP protocol. Therefore, only the server plug-in needs to be written, development time is saved, and development efficiency is improved; the integration of the XMPP protocol when the mobile phone APP is upgraded and used with the MQTT protocol is avoided, and the development difficulty of the mobile phone APP is reduced; the problem that the prior XMPP protocol cannot be controlled when the mobile phone APP is upgraded and used with the MQTT protocol is avoided; the problem of large-scale upgrading of old equipment is avoided, and the system stability is improved.
In an embodiment of the present invention, referring to fig. 2, the device management system further includes: a database 201;
each of the old devices 105 is configured to generate online information carrying a unique identifier of the old device when the old device is powered on, and send the generated online information to the second server 103 through the XMPP; periodically generating running state information carrying a unique identifier of the second server after starting up, and sending each generated running state information to the second server 103 through the XMPP;
the second server 103 is configured to send each piece of received online information and each piece of received running state information to the first server 102 through the plug-in; storing each piece of received online information to the database 201 through the plug-in;
the first server 102 is configured to execute, for each piece of received online information: according to the unique identifier carried in the current online information, determining that the first old device with the unique identifier is started, and sending notification information that the first old device is started to the user terminal 101 through the MQTT; executing for each received running state information: and judging whether a second old device with the unique identifier is determined to be started or not according to the unique identifier carried in the current running state information, and if not, sending notification information of the started second old device to the user terminal 101 according to the online information stored in the database 201 when the second old device is determined to be started.
In one embodiment of the present invention, the database may be a redis database.
In detail, the premise of the user for controlling the device is that the user needs to make sure that the device to be controlled is powered on. For example, the APP of the user's mobile phone may display the online and offline information of each associated device. Therefore, after the equipment is started, the online information can be transmitted to the user terminal in real time.
In the embodiment of the invention, when the old equipment is on line or is started, the on-line information can be generated and sent to the second server, and the second server sends the on-line information to the first server through the plug-in, and stores the on-line information to the database. Therefore, after the first server receives the online information, the corresponding old equipment can be determined to be started.
When the first server fails to receive the online information due to the transmission delay of the online information or other fault factors, the device is powered on but the user still thinks that the device is not powered on. In order to solve the problem, the old equipment can upload the running state information periodically after being started, as long as the first server receives the running state information uploaded at any time, the corresponding old equipment can be started, but the first server does not determine that the old equipment is started, at the moment, the first server can inquire the database, and whether the corresponding old equipment is started or not is determined according to the online information recorded in the database.
Based on the above, accurate determination of online information of the device can be ensured.
In an embodiment of the present invention, if the first server determines that an old device is powered on, it may be set that, when the running state information uploaded by the old device is received any time later, it is not necessary to perform verification on whether the old device is powered on again.
Similar to the above implementation manner for determining whether the old device is powered on, in an embodiment of the present invention, each of the old devices 105 is configured to generate offline information carrying a unique identifier of the old device when the old device is powered off, and send the generated offline information to the second server 103 through the XMPP; after the computer is started, periodically generating heartbeat signals carrying unique identifiers of the computer, and sending each generated heartbeat signal to the second server 103 through the XMPP;
the second server 103 is configured to send each piece of received offline information and each piece of received heartbeat signal to the first server 102 through the plug-in; storing each received offline information to the database 201 through the plug-in;
the first server 102 is configured to execute, for each piece of received offline information: according to the unique identifier carried in the current offline information, determining that the third old device with the unique identifier is powered off, and sending notification information that the third old device is powered off to the user terminal 101 through the MQTT; for each received heartbeat signal: when the receiving time of the periodic heartbeat signal is reached but the next heartbeat signal of the current heartbeat signal is not received, judging whether the fourth old device with the unique identifier is determined to be powered off or not according to the unique identifier carried in the current heartbeat signal, if not, sending notification information that the fourth old device is powered off to the user terminal 101 when the fourth old device is determined to be powered off according to offline information stored in the database 201.
In the embodiment of the invention, when the old equipment is offline, the offline information can be generated and sent to the second server, and the second server sends the offline information to the first server through the plug-in unit on one hand and stores the offline information to the database on the other hand. Therefore, after the first server receives the offline information, the first server can determine that the corresponding old equipment is powered off.
When the first server fails to receive the offline information due to transmission delay of the offline information or other failure factors, the device is powered off, but the user still thinks that the device is not powered off. In order to solve the problem, the old device may send a heartbeat signal periodically after being powered on, as long as the first server does not receive the heartbeat signal due to expiration, it may be indicated that the corresponding old device is powered off, but the first server does not determine that the old device is powered off, at this time, the first server may query the database, and determine whether the corresponding old device is powered off according to offline information recorded in the database. Based on the content, the accurate determination of the offline information of the equipment can be ensured.
In an embodiment of the present invention, each of the new devices 104 is configured to generate, when starting up, startup information carrying a unique identifier of the new device, and send the generated startup information to the first server 102 through the MQTT; generating shutdown information carrying a unique identifier of the first server 102 during shutdown, and sending the generated shutdown information to the first server 102 through the MQTT;
the first server 102 is configured to execute, for each piece of received boot information: according to the unique identifier carried in the current startup information, determining that the first new device with the unique identifier is started, and sending notification information that the first new device is started to the user terminal 101 through the MQTT; executing, for each received shutdown information: and determining that the second new device with the unique identifier is powered off according to the unique identifier carried in the current power-off information, and sending notification information that the second new device is powered off to the user terminal 101 through the MQTT.
Unlike the old device, uploading of the online and offline information of the old device needs to involve XMPP, and uploading of the online and offline information of the new device does not need to involve XMPP, so that the situation that the information uploading is unsuccessful usually does not occur, and the operation of storing the online and offline information in the database does not need to be performed. And the first server can determine the on-off state of the corresponding new equipment after receiving the online and offline information uploaded by each new equipment.
In an embodiment of the present invention, each of the new devices 104 is configured to, when completing executing any control information, send feedback information for the control information to the first server 102 through the MQTT;
each of the old devices 105 is configured to send feedback information for any control information to the second server 103 through the XMPP when the old device completes executing the control information;
the second server 103 is configured to send each received feedback information to the first server 102 through the plug-in;
the first server 102 is configured to send each received feedback information to the user terminal 101 through the MQTT.
In the embodiment of the invention, after the user controls each new device and each old device, the control effect can be fed back to the user, so that the user can conveniently check the control effect. Therefore, after the new and old equipment executes the control information, the corresponding feedback information can be returned to the user terminal.
As shown in fig. 3, an embodiment of the present invention provides a device management method, which specifically includes the following steps:
step 301: when receiving externally input control information aiming at any one device in a power-on state, the user terminal associated with at least one device sends the received control information to a first server using the MQTT through the MQTT.
Step 302: the first server performs, for each piece of received control information: when the current control information is control information for a new device using MQTT among the at least one device, sending the current control information to the new device to which the current control information is directed through the MQTT, and executing step 303; and when the current control information is the control information for an old device using XMPP in the at least one device, sending the current control information to a second server using XMPP through a pre-programmed plug-in running on the second server, and executing step 304.
Step 303: and each new device executes each received control message and ends the current process.
Step 304: and the second server respectively sends each piece of received control information to the old equipment corresponding to the control information through the XMPP.
Step 305: each of the old devices executes each of the received control information.
In one embodiment of the invention, the method may further comprise: each old device generates online information carrying a unique identifier of the old device when the old device is started, and sends the generated online information to the second server through the XMPP;
each old device periodically generates running state information carrying a unique identifier of the old device after being started up, and sends each generated running state information to the second server through the XMPP;
the second server sends each piece of received online information and each piece of received running state information to the first server through the plug-in, and stores each piece of received online information to the database through the plug-in;
the first server executes, for each piece of received online information: according to the unique identifier carried in the current online information, determining that the first old equipment with the unique identifier is started, and sending notification information of the started first old equipment to the user terminal through the MQTT;
the first server executes, for each piece of received running state information: and judging whether a second old device with the unique identifier is determined to be started or not according to the unique identifier carried in the current running state information, if not, sending notification information that the second old device is started to the user terminal when the second old device is determined to be started according to the online information stored in the database.
In one embodiment of the invention, the method may further comprise: each old device generates offline information carrying a unique identifier of the old device when the old device is powered off, and sends the generated offline information to the second server through the XMPP;
each old device periodically generates a heartbeat signal carrying a unique identifier of the old device after being started up, and each generated heartbeat signal is sent to the second server through the XMPP;
the second server sends each piece of received offline information and each heartbeat signal to the first server through the plug-in, and stores each piece of received offline information to the database through the plug-in;
the first server executes, for each piece of the received offline information: according to the unique identifier carried in the current offline information, determining that the third old equipment with the unique identifier is powered off, and sending notification information of the power-off of the third old equipment to the user terminal through the MQTT;
the first server performs, for each received heartbeat signal: when the receiving time of the periodic heartbeat signal is reached but the next heartbeat signal of the current heartbeat signal is not received, judging whether the fourth old equipment with the unique identifier is determined to be powered off or not according to the unique identifier carried in the current heartbeat signal, if not, sending notification information that the fourth old equipment is powered off to the user terminal when the fourth old equipment is determined to be powered off according to offline information stored in the database.
In one embodiment of the invention, the method may further comprise: each new device generates startup information carrying a unique identifier of the new device when the new device is started up, and sends the generated startup information to the first server through the MQTT;
each new device generates shutdown information carrying a unique identifier of the new device when the new device is shut down, and sends the generated shutdown information to the first server through the MQTT;
the first server executes, for each piece of received boot information: according to the unique identification carried in the current starting information, determining that the first new device with the unique identification is started, and sending notification information that the first new device is started to the user terminal through the MQTT;
the first server performs, for each received shutdown information: and determining that the second new device with the unique identifier is powered off according to the unique identifier carried in the current power-off information, and sending notification information that the second new device is powered off to the user terminal through the MQTT.
In one embodiment of the invention, the method may further comprise: when each new device finishes executing any control information, sending feedback information aiming at the control information to the first server through the MQTT;
when each old device finishes executing any control information, sending feedback information aiming at the control information to the second server through the XMPP;
the second server sends each received feedback information to the first server through the plug-in;
and the first server sends each piece of received feedback information to the user terminal through the MQTT.
The information interaction, execution process and other contents between the units in the method are based on the same concept as the system embodiment of the present invention, and specific contents can be referred to the description in the system embodiment of the present invention, and are not described herein again.
In summary, the embodiments of the present invention have at least the following advantages:
1. in the embodiment of the invention, the equipment management system comprises a first server using MQTT, a second server using XMPP and running a preset plug-in, a user terminal and a plurality of equipment associated with the user terminal. The number of devices includes a number of new devices using MQTT and a number of old devices using XMPP. When receiving externally input control information aiming at any started device, the user terminal sends the control information to the first server through the MQTT; the first server, for each received control information: when the current control information is directed to the new equipment, the current control information is sent to the new equipment directed to the current control information through the MQTT, otherwise, the current control information is sent to the second server through the plug-in; the second server respectively sends the received control information to the corresponding old equipment through XMPP; each of the new and old devices executes each of the received control information. Therefore, the embodiment of the invention can manage the old equipment without upgrading the old equipment.
2. In the embodiment of the invention, a more compact and small MQTT protocol can be used for controlling the old equipment using the complex and redundant XMPP protocol. Therefore, only the server plug-in needs to be written, development time is saved, and development efficiency is improved; the integration of the XMPP protocol when the mobile phone APP is upgraded and used with the MQTT protocol is avoided, and the development difficulty of the mobile phone APP is reduced; the problem that the prior XMPP protocol cannot be controlled when the mobile phone APP is upgraded and used with the MQTT protocol is avoided; the problem of large-scale upgrading of old equipment is avoided, and the system stability is improved.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it is to be noted that: the above description is only a preferred embodiment of the present invention, and is only used to illustrate the technical solutions of the present invention, and not to limit the protection scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (8)

1. A device management system, comprising:
a user terminal, at least one device associated with the user terminal, a first server using Message Queue Telemetry Transport (MQTT) and a second server using extensible messaging and presence protocol (XMPP);
wherein the at least one device comprises: at least one new device using MQTT and at least one old device using XMPP;
the second server runs a pre-programmed plug-in;
the user terminal is used for sending the received control information to the first server through the MQTT when the control information which is input from the outside and aims at any one device in a starting state is received;
the first server is configured to execute, for each received control information: when the current control information is control information for a new device, the current control information is sent to the new device for which the current control information is directed through the MQTT; when the current control information is control information for an old device, the current control information is sent to the second server through the plug-in;
the second server is used for respectively sending each piece of received control information to the old equipment corresponding to the control information through the XMPP;
each new device is used for executing each received control information;
each old device is used for executing each received control information;
wherein the content of the first and second substances,
each new device is used for sending feedback information aiming at any control information to the first server through the MQTT when the new device completes execution of the control information;
each old device is used for sending feedback information aiming at any control information to the second server through the XMPP when the old device completes execution of the control information;
the second server is used for sending each piece of received feedback information to the first server through the plug-in;
and the first server is used for sending each piece of received feedback information to the user terminal through the MQTT.
2. The device management system according to claim 1,
further comprising: a database;
each old device is used for generating online information carrying a unique identifier of the old device when the old device is started, and sending the generated online information to the second server through the XMPP; periodically generating running state information carrying a unique identifier of the second server after starting up, and sending each generated running state information to the second server through the XMPP;
the second server is used for sending each piece of received online information and each piece of received running state information to the first server through the plug-in; storing each piece of received online information to the database through the plug-in;
the first server is configured to execute, for each piece of received online information: according to the unique identifier carried in the current online information, determining that the first old equipment with the unique identifier is started, and sending notification information of the started first old equipment to the user terminal through the MQTT; executing for each received running state information: and judging whether a second old device with the unique identifier is determined to be started or not according to the unique identifier carried in the current running state information, if not, sending notification information that the second old device is started to the user terminal when the second old device is determined to be started according to the online information stored in the database.
3. The device management system according to claim 2,
each old device is used for generating offline information carrying a unique identifier of the old device when the old device is powered off, and sending the generated offline information to the second server through the XMPP; after the computer is started, heartbeat signals carrying unique identification of the computer are periodically generated, and each generated heartbeat signal is sent to the second server through the XMPP;
the second server is used for sending each piece of received offline information and each piece of received heartbeat signal to the first server through the plug-in; storing each piece of received offline information to the database through the plug-in;
the first server is configured to execute, for each piece of received offline information: according to the unique identifier carried in the current offline information, determining that the third old equipment with the unique identifier is powered off, and sending notification information of the power-off of the third old equipment to the user terminal through the MQTT; for each received heartbeat signal: when the receiving time of the periodic heartbeat signal is reached but the next heartbeat signal of the current heartbeat signal is not received, judging whether the fourth old equipment with the unique identifier is determined to be powered off or not according to the unique identifier carried in the current heartbeat signal, if not, sending notification information that the fourth old equipment is powered off to the user terminal when the fourth old equipment is determined to be powered off according to offline information stored in the database.
4. The device management system according to claim 3,
each new device is used for generating startup information carrying a unique identifier of the new device when the new device is started up, and sending the generated startup information to the first server through the MQTT; generating shutdown information carrying a unique identifier of the server when the server is shut down, and sending the generated shutdown information to the first server through the MQTT;
the first server is configured to execute, for each piece of received boot information: according to the unique identification carried in the current starting information, determining that the first new device with the unique identification is started, and sending notification information that the first new device is started to the user terminal through the MQTT; executing, for each received shutdown information: and determining that the second new device with the unique identifier is powered off according to the unique identifier carried in the current power-off information, and sending notification information that the second new device is powered off to the user terminal through the MQTT.
5. A device management method, comprising:
the method comprises the steps that when a user terminal associated with at least one device receives control information which is input from the outside and aims at any one device in a starting state, MQTT is transmitted through message queue telemetering, and the received control information is sent to a first server using the MQTT;
the first server performs, for each piece of received control information: when the current control information is control information for a new device using MQTT in the at least one device, sending the current control information to the new device to which the current control information is directed through the MQTT; when the current control information is control information of old equipment using extensible communication and presentation protocol XMPP in the at least one equipment, sending the current control information to a second server by using a pre-programmed plug-in running on the second server of XMPP;
each new device executes each received control information;
the second server sends each received control information to the old equipment corresponding to the control information through the XMPP;
each old device executes each received control message;
further comprising: when each new device finishes executing any control information, sending feedback information aiming at the control information to the first server through the MQTT;
when each old device finishes executing any control information, sending feedback information aiming at the control information to the second server through the XMPP;
the second server sends each received feedback information to the first server through the plug-in;
and the first server sends each piece of received feedback information to the user terminal through the MQTT.
6. The device management method according to claim 5,
further comprising: each old device generates online information carrying a unique identifier of the old device when the old device is started, and sends the generated online information to the second server through the XMPP;
each old device periodically generates running state information carrying a unique identifier of the old device after being started up, and sends each generated running state information to the second server through the XMPP;
the second server sends each piece of received online information and each piece of received running state information to the first server through the plug-in, and stores each piece of received online information to a database through the plug-in;
the first server executes, for each piece of received online information: according to the unique identifier carried in the current online information, determining that the first old equipment with the unique identifier is started, and sending notification information of the started first old equipment to the user terminal through the MQTT;
the first server executes, for each piece of received running state information: and judging whether a second old device with the unique identifier is determined to be started or not according to the unique identifier carried in the current running state information, if not, sending notification information that the second old device is started to the user terminal when the second old device is determined to be started according to the online information stored in the database.
7. The device management method according to claim 6,
further comprising: each old device generates offline information carrying a unique identifier of the old device when the old device is powered off, and sends the generated offline information to the second server through the XMPP;
each old device periodically generates a heartbeat signal carrying a unique identifier of the old device after being started up, and each generated heartbeat signal is sent to the second server through the XMPP;
the second server sends each piece of received offline information and each heartbeat signal to the first server through the plug-in, and stores each piece of received offline information to the database through the plug-in;
the first server executes, for each piece of the received offline information: according to the unique identifier carried in the current offline information, determining that the third old equipment with the unique identifier is powered off, and sending notification information of the power-off of the third old equipment to the user terminal through the MQTT;
the first server performs, for each received heartbeat signal: when the receiving time of the periodic heartbeat signal is reached but the next heartbeat signal of the current heartbeat signal is not received, judging whether the fourth old equipment with the unique identifier is determined to be powered off or not according to the unique identifier carried in the current heartbeat signal, if not, sending notification information that the fourth old equipment is powered off to the user terminal when the fourth old equipment is determined to be powered off according to offline information stored in the database.
8. The device management method according to claim 7,
further comprising: each new device generates startup information carrying a unique identifier of the new device when the new device is started up, and sends the generated startup information to the first server through the MQTT;
each new device generates shutdown information carrying a unique identifier of the new device when the new device is shut down, and sends the generated shutdown information to the first server through the MQTT;
the first server executes, for each piece of received boot information: according to the unique identification carried in the current starting information, determining that the first new device with the unique identification is started, and sending notification information that the first new device is started to the user terminal through the MQTT;
the first server performs, for each received shutdown information: and determining that the second new device with the unique identifier is powered off according to the unique identifier carried in the current power-off information, and sending notification information that the second new device is powered off to the user terminal through the MQTT.
CN201811229485.6A 2018-10-22 2018-10-22 Equipment management system and method Active CN109491710B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811229485.6A CN109491710B (en) 2018-10-22 2018-10-22 Equipment management system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811229485.6A CN109491710B (en) 2018-10-22 2018-10-22 Equipment management system and method

Publications (2)

Publication Number Publication Date
CN109491710A CN109491710A (en) 2019-03-19
CN109491710B true CN109491710B (en) 2021-07-30

Family

ID=65692223

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811229485.6A Active CN109491710B (en) 2018-10-22 2018-10-22 Equipment management system and method

Country Status (1)

Country Link
CN (1) CN109491710B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106059892A (en) * 2016-05-17 2016-10-26 中国科学院沈阳计算技术研究所有限公司 Message engine integrated with communication system
CN106131199A (en) * 2016-07-15 2016-11-16 深圳市丰巨泰科电子有限公司 A kind of intelligent home control system based on android system and control method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120079092A1 (en) * 2009-12-28 2012-03-29 Telefonaktiebolaget L M Ericsson (Publ) Management of data flows between user equipment nodes and clusters of networked resource nodes

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106059892A (en) * 2016-05-17 2016-10-26 中国科学院沈阳计算技术研究所有限公司 Message engine integrated with communication system
CN106131199A (en) * 2016-07-15 2016-11-16 深圳市丰巨泰科电子有限公司 A kind of intelligent home control system based on android system and control method

Also Published As

Publication number Publication date
CN109491710A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN113687853B (en) Vehicle upgrade control method and computer storage medium
US20090292812A1 (en) Allocating management method of computer
CN109740699B (en) Gateway and method for managing a plurality of electronic tags
JP2004192602A (en) Home network system and its application method
CN105279210A (en) Automatic mode switching in a synchronous replication environment
US9001364B2 (en) Management system, image forming apparatus, management system control method, and image forming apparatus control method for migration of setting values of an application that operates in the image forimng apparatus
CN108874428A (en) A kind of remote upgrade method of refrigerator controller control software
US9836958B2 (en) Device control method, server, system and computer storage medium
US20170192840A1 (en) Computer device error instructions
CN103729947A (en) POS system having self-checking function and self-checking method thereof
CN113760332A (en) Software upgrading method and electronic equipment
CN114201197A (en) Firmware upgrading method and device, electronic equipment and readable storage medium
CN113630443A (en) Service management method, device, server and medium
CN111427595B (en) Client upgrading method, device and system
CN102866927A (en) Method and device for collocating basic input/output system, and method for managing basic input/output system
CN113411212B (en) BIOS control system of intelligent network card and BIOS control method of intelligent network card
US20220136727A1 (en) Remote monitoring device and air-conditioning system
CN109491710B (en) Equipment management system and method
CN112291081B (en) Method, system and storage medium for auditing controller cluster data by cloud management platform
CN100531048C (en) Method for dynamic setting management function at management interface of intelligent interface
CN105915637A (en) Remote automatic standby and awakening method based on storage system server
CN109282434A (en) Firmware installation method, system and air conditioner
JP5200658B2 (en) Server system
CN114070884A (en) Remote management method, remote management equipment, module and readable storage medium
CN103441872A (en) Failure recovery method, device and communication system of user side equipment

Legal Events

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