CN107911356B - Intelligent device discovery method, device, control end and system - Google Patents

Intelligent device discovery method, device, control end and system Download PDF

Info

Publication number
CN107911356B
CN107911356B CN201711089196.6A CN201711089196A CN107911356B CN 107911356 B CN107911356 B CN 107911356B CN 201711089196 A CN201711089196 A CN 201711089196A CN 107911356 B CN107911356 B CN 107911356B
Authority
CN
China
Prior art keywords
online
intelligent device
application software
intelligent
notification
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
CN201711089196.6A
Other languages
Chinese (zh)
Other versions
CN107911356A (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.)
Hefei Meiling Union Technology Co Ltd
Original Assignee
Hefei Meiling Union 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 Hefei Meiling Union Technology Co Ltd filed Critical Hefei Meiling Union Technology Co Ltd
Priority to CN201711089196.6A priority Critical patent/CN107911356B/en
Publication of CN107911356A publication Critical patent/CN107911356A/en
Application granted granted Critical
Publication of CN107911356B publication Critical patent/CN107911356B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Communication Control (AREA)

Abstract

The invention provides an intelligent device discovery method, an intelligent device discovery device, a control end and an intelligent device discovery system, wherein the method comprises the following steps: enabling registration of at least two communication protocols; when an online notification of the intelligent equipment returned by any one of the registered communication protocols is received, determining whether any other communication protocol finds that the intelligent equipment is online; if not, informing the intelligent equipment of online to corresponding upper application software; if yes, the upper application software is not notified that the intelligent equipment is online; when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, determining whether any one of the communication protocols finds that the intelligent device is online; if not, informing the upper application software that the intelligent equipment is offline; and if so, not notifying the upper application software that the intelligent equipment is offline. The scheme can better avoid the upper application software from frequently receiving the notification.

Description

Intelligent device discovery method, device, control end and system
Technical Field
The invention relates to the technical field of intelligent household appliances, in particular to a method, a device, a control end and a system for discovering intelligent equipment.
Background
Along with the development and progress of scientific technology, the types of intelligent equipment are more and more. One of the most fundamental problems associated with smart devices is device discovery. Then, in order for the upper layer application software to know the state information of the device and to send a corresponding control instruction to the device, the upper layer application software needs to be notified of the discovered state information of the device.
Currently, when discovering the state information of a device, a communication protocol directly notifies upper layer application software. However, since the single local protocol and the single remote protocol both discover the status information of the device, the upper layer application software will frequently receive the notification if the upper layer application software is directly notified in the existing manner.
Disclosure of Invention
The embodiment of the invention provides an intelligent device discovery method, an intelligent device discovery device, a control end and an intelligent device discovery system, which can better avoid upper-layer application software from frequently receiving notifications.
In a first aspect, an embodiment of the present invention provides an intelligent device discovery method, which implements registration of at least two communication protocols; further comprising:
when an online notification of the intelligent equipment returned by any one of the registered communication protocols is received, determining whether any other communication protocol finds that the intelligent equipment is online;
if not, informing the intelligent equipment of online to corresponding upper application software;
if yes, the upper application software is not notified that the intelligent equipment is online;
when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, determining whether any one of the communication protocols finds that the intelligent device is online;
if not, informing the upper application software that the intelligent equipment is offline;
and if so, not notifying the upper application software that the intelligent equipment is offline.
Preferably, the first and second electrodes are formed of a metal,
when receiving an online notification of the intelligent device returned by any one of the registered communication protocols, determining whether any other communication protocol finds that the intelligent device is online, including:
when an online notification of the intelligent device returned by any one of the registered communication protocols is received, correspondingly storing the name of the corresponding communication protocol and the product serial number SN of the intelligent device in a preset hash table; determining whether the name of any other communication protocol and the corresponding stored SN exist in the hash table;
when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, determining whether any one of the communication protocols has found that the intelligent device is online, including:
when an offline notification of the intelligent device returned by any one of the registered communication protocols is received, searching the name of the corresponding communication protocol and the corresponding stored SN in the hash table, and deleting the name and the corresponding stored SN; and determining whether the name of any communication protocol and the corresponding stored SN exist in the deleted hash table.
Preferably, the first and second electrodes are formed of a metal,
the notifying the corresponding upper application software that the intelligent device is online includes:
notifying the upper application software of the online of the intelligent equipment by using a preset unified callback function;
the notifying the upper layer application software that the intelligent device is offline includes:
and notifying the intelligent equipment of offline to the upper application software by using the unified callback function.
Preferably, the first and second electrodes are formed of a metal,
further comprising:
when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols and determining that any one of the communication protocols finds that the intelligent device is online, selecting a target communication protocol from any one of the communication protocols which find that the intelligent device is online;
and realizing the communication between the upper application software and the intelligent equipment by utilizing the target communication protocol.
In a second aspect, an embodiment of the present invention provides an intelligent device discovery apparatus, including: a registration unit, an online notification determination unit, and an offline notification determination unit, wherein,
the registration unit is used for realizing the registration of at least two communication protocols;
the online notification determining unit is configured to determine whether any other communication protocol has found that the intelligent device is online or not when an online notification of the intelligent device returned by any one registered communication protocol is received; if not, informing the intelligent equipment of online to corresponding upper application software; if yes, the upper application software is not notified that the intelligent equipment is online;
the offline notification determining unit is configured to determine whether any one of the registered communication protocols has found that the intelligent device is online when receiving an offline notification of the intelligent device returned by the any one of the registered communication protocols; if not, informing the upper application software that the intelligent equipment is offline; and if so, not notifying the upper application software that the intelligent equipment is offline.
Preferably, the first and second electrodes are formed of a metal,
the online notification determining unit is used for correspondingly storing the name of the corresponding communication protocol and the product serial number SN of the intelligent equipment in a preset hash table when an online notification of the intelligent equipment returned by any one of the registered communication protocols is received; determining whether the name of any other communication protocol and the corresponding stored SN exist in the hash table;
the offline notification determining unit is configured to, when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, search, in the hash table, for a name of the corresponding communication protocol and the corresponding stored SN, and delete the name and the corresponding stored SN; and determining whether the name of any communication protocol and the corresponding stored SN exist in the deleted hash table.
Preferably, the first and second electrodes are formed of a metal,
the online notification determining unit is used for notifying the upper application software of online of the intelligent device by using a preset unified callback function;
and the offline notification determining unit is used for notifying the intelligent equipment of offline by using the unified callback function to the upper application software.
Preferably, the first and second electrodes are formed of a metal,
further comprising: a communication control unit;
the communication control unit is configured to select a target communication protocol from any one of the communication protocols that have been found to be online by the intelligent device when the offline notification determining unit receives an offline notification of the intelligent device returned by any one of the registered communication protocols and determines that any one of the communication protocols has been found to be online by the intelligent device; and realizing the communication between the upper application software and the intelligent equipment by utilizing the target communication protocol.
In a third aspect, an embodiment of the present invention provides a control end, including: the intelligent device discovery apparatus and the upper layer application software described in any of the above embodiments.
In a fourth aspect, an embodiment of the present invention provides an intelligent device discovery system, including: the control end of above-mentioned embodiment to and at least one smart machine.
The embodiment of the invention provides a method, a device, a control end and a system for discovering an intelligent device, which firstly realize the registration of at least two communication protocols, so that if an online notification of the intelligent device returned by any one of the registered communication protocols is received, the upper layer application software is not directly notified that the intelligent device is online, but whether any other communication protocol finds that the intelligent device is online or not is determined, if so, the current communication protocol does not initially find that the intelligent device is online, therefore, the upper layer application software is not required to be notified, if not, the current communication protocol is initially found that the intelligent device is online, therefore, the upper layer application software is required to be notified that the intelligent device is online, and thus, the upper layer application software is ensured to receive the online notification of the intelligent device only once, and similarly, when the offline notification of the intelligent device is received, the upper application software is not directly notified any more, but whether a communication protocol exists at present to find that the equipment is on-line or not is determined, if yes, the upper application software is not notified any more, if not, the intelligent equipment is indicated to be off-line, and the upper application software is notified that the intelligent equipment is off-line, so that the upper application software is ensured to receive the notification that the intelligent equipment is off-line only once. Therefore, the scheme better avoids the upper application software from frequently receiving the notification.
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 flowchart of a method for discovering an intelligent device according to an embodiment of the present invention;
fig. 2 is a flowchart of a method for discovering an intelligent device according to another embodiment of the present invention;
fig. 3 is a schematic structural diagram of an intelligent device discovery apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an intelligent device discovery apparatus according to another embodiment of the present invention;
fig. 5 is a schematic structural diagram of a control end according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an intelligent device discovery system 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 an intelligent device discovery method, which may include the following steps:
step 101: registration of at least two communication protocols is effected and steps 102 and 105 are performed, respectively.
Step 102: when receiving an online notification of the intelligent device returned by any one of the registered communication protocols, determining whether any other communication protocol finds that the intelligent device is online, if not, executing step 103, and if so, executing step 104.
Step 103: and informing the intelligent equipment of being online to corresponding upper application software.
Step 104: and not notifying the upper application software that the intelligent equipment is on line.
Step 105: when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, determining whether any one of the communication protocols has found that the intelligent device is online, if not, executing step 106, and if yes, executing step 107.
Step 106: and informing the upper application software that the intelligent equipment is off-line.
Step 107: and not notifying the upper application software that the intelligent equipment is offline.
The embodiment of the invention provides a method for discovering an intelligent device, which firstly realizes the registration of at least two communication protocols, so that when an online notification of the intelligent device returned by any one of the registered communication protocols is received, the upper layer application software is not directly notified that the intelligent device is online, but whether any other communication protocol finds that the intelligent device is online or not is determined, if the intelligent device is online, the current communication protocol does not initially find that the intelligent device is online, therefore, the upper layer application software is not required to be notified, if the intelligent device is not online, the current communication protocol is initially found, therefore, the device is required to be notified to the upper layer application software that the intelligent device is online, and thus, the upper layer application software is ensured to receive the notification of the intelligent device only once, and similarly, when the offline notification of the intelligent device is received, the upper application software is not directly notified any more, but whether a communication protocol exists at present to find that the equipment is on-line or not is determined, if yes, the upper application software is not notified any more, if not, the intelligent equipment is indicated to be off-line, and the upper application software is notified that the intelligent equipment is off-line, so that the upper application software is ensured to receive the notification that the intelligent equipment is off-line only once. Therefore, the scheme better avoids the upper application software from frequently receiving the notification.
In an embodiment of the present invention, a specific implementation manner of the step 102 includes: when an online notification of the intelligent device returned by any one of the registered communication protocols is received, correspondingly storing the name of the corresponding communication protocol and the product serial number SN of the intelligent device in a preset hash table; determining whether the name of any other communication protocol and the corresponding stored SN exist in the hash table; a specific embodiment of the step 105 includes: when an offline notification of the intelligent device returned by any one of the registered communication protocols is received, searching the name of the corresponding communication protocol and the corresponding stored SN in the hash table, and deleting the name and the corresponding stored SN; and determining whether the name of any communication protocol and the corresponding stored SN exist in the deleted hash table.
In the above embodiment, the hash table is mainly used to store online record information of the intelligent device, where the online record information may include: the name of the communication protocol of the intelligent device on line and the SN number of the intelligent device are found, and when the intelligent device is off line due to disconnection of a certain communication protocol, the name of the communication protocol and the SN number of the intelligent device are correspondingly deleted from the hash table, so that for the SN number, the SN number does not exist in the hash table, or at least one name of a different communication protocol and the corresponding stored SN number exist, and therefore, for the SN number, as long as the SN number and the corresponding stored name of any other communication protocol exist in the hash table, the intelligent device is still on line at the moment.
For the sake of clarity of the above-described embodiments, table 1 shown below will be used as an example.
TABLE 1
Communication protocol name SN number of intelligent equipment
IPP F31***WTD
XMPP F31***WTD
IPP CNX7***11
Assuming that, after a certain period of time has elapsed, the down notification of the smart device F31 × WTD returned from the registered communication protocol IPP is received, the name IPP of the communication protocol and the SN number F31 × WTD are deleted from table 1, and table 1 becomes table 2 below.
TABLE 2
Communication protocol name SN number of intelligent equipment
XMPP F31***WTD
IPP CNX7***11
As can be seen from table 2, MXPP and F31 × WTD are also stored in the table, that is, XMPP finds that the smart device F31 × WTD is in an online state, so that even though the offline notification of the smart device returned by IPP is received, the smart device is online (that is, in an online state) due to other communication protocols, and therefore, the corresponding upper layer application software is not notified that the smart device is offline, thereby avoiding a situation where the notification is frequently sent to the upper layer application software.
In the case of table 1, when the on-line notification of smart device F31 × WTD returned from the registered communication protocol MQTT is received after a lapse of time, the name MQTT and SN number F31 × WTD are stored in table 1 in association with each other, and table 1 becomes table 3 below.
TABLE 3
Communication protocol name SN number of intelligent equipment
IPP F31***WTD
XMPP F31***WTD
IPP CNX7***11
MQTT F31***WTD
As can be seen from table 3, in addition to the MQTT and F31 × WTD just stored in correspondence, IPP and F31 × WTD, and XMPP and F31 × WTD are also stored in correspondence in table 3, and it can be seen that, before the online notification returned by the IPP is received, both the IPP and XMPP have found that the smart device F31 × WTD is online, and therefore, even if the online notification returned by the IPP is received, the online notification is not sent to the corresponding upper application because there is another communication protocol to bring the smart device online.
It should be noted that, in the embodiment of the present invention, the name of the communication protocol and the SN number of the smart device are mainly stored, but the embodiment of the present invention may also include other various information such as notification receiving time, and specifically, the present invention may be set according to actual requirements.
In an embodiment of the present invention, the specific implementation manner of step 103 includes: notifying the upper application software of the online of the intelligent equipment by using a preset unified callback function; an embodiment of the step 106 includes: and notifying the intelligent equipment of offline to the upper application software by using the unified callback function.
In the embodiment of the present invention, by presetting the uniform callback function onDeviceAdd (), when receiving a notification returned by a callback function corresponding to each communication protocol, for example, receiving an online notification of an intelligent device returned by the callback function onmqtt tdeviceadd corresponding to MQTT and receiving an online notification of the intelligent device returned by the callback function onXMPPDeviceAdd () corresponding to XMPP, the intelligent device is notified of online by the uniform callback function onDeviceAdd () once to the corresponding upper application software.
In one embodiment of the present invention, further comprising: when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols and determining that any one of the communication protocols finds that the intelligent device is online, selecting a target communication protocol from any one of the communication protocols which find that the intelligent device is online; and realizing the communication between the upper application software and the intelligent equipment by utilizing the target communication protocol.
In the above embodiment, if the intelligent device is offline due to disconnection of the communication protocol in use, a communication protocol with a higher priority may be selected from other communication protocols for discovering that the intelligent device is online, so as to discover a control instruction to the corresponding intelligent device through the upper layer application software.
An intelligent device discovery method provided by an embodiment of the present invention will be described in detail below, and as shown in fig. 2, the method may include the following steps:
step 201: the registration of at least two communication protocols is realized, when an online notification of the intelligent device returned by any one of the registered communication protocols is received, the step 202 is executed, and when an offline notification of the intelligent device returned by any one of the registered communication protocols is received, the step 206 is executed.
In the embodiment of the invention, in order to stably discover equipment and avoid the situation that the equipment cannot be discovered when one communication protocol is disconnected, registration of multiple communication protocols can be realized so as to discover intelligent equipment through each registered communication protocol, wherein the registered communication protocols can include at least one local communication protocol and at least one remote communication protocol (mainly meeting requirements of local communication and remote communication of a distribution network and after the distribution network).
Step 202: and correspondingly storing the name of the corresponding communication protocol and the SN of the intelligent equipment in a preset hash table.
For example, the name of the communication protocol is IPP, and the SN number of the smart device is CNX7 × 11.
Step 203: and determining whether the name of any other communication protocol and the corresponding stored SN exist in the hash table, if not, executing the step 204, and if so, executing the step 205.
Because the hash table is only used for storing the name of the communication protocol which is currently used for finding whether the intelligent device is on line or not and the SN number of the intelligent device, when an on-line notification of the intelligent device CNX7 x 11 corresponding to the SN number returned by the IPP is received, it is only necessary to search from the hash table whether the name of any other communication protocol and the corresponding stored CNX7 x 11 exist, and if so, it is indicated that the other communication protocol is currently on line or found on line, so that upper layer application software is not notified any more, and if not, it is indicated that only the IPP finds that the intelligent device is on line currently, and therefore, it is necessary to notify the upper layer application software, so that the upper layer application software sends a corresponding control instruction to the intelligent device.
Step 204: and informing the intelligent equipment of online by using a preset unified callback function to corresponding upper application software, and ending the current flow.
In the embodiment of the invention, the notification sent by the callback function corresponding to all the registration protocols respectively is mainly received, and after unified management, the corresponding upper application software is notified by the preset unified callback function.
Step 205: and not notifying the intelligent equipment of online to the upper application software, and ending the current process.
Step 206: and searching the name of the corresponding communication protocol and the corresponding stored SN in the hash table, and deleting the name.
In the embodiment of the invention, in order to improve the efficiency, after the offline notification is received, the previously stored online notification record is deleted, so that whether the corresponding intelligent device is currently online or not can be quickly known by checking the hash table each time.
Step 207: and determining whether the name of any communication protocol and the corresponding stored SN exist in the hash table after the deletion processing, if not, executing step 208, and if so, executing step 209.
Step 208: and informing the intelligent equipment of offline by using the unified callback function to the upper application software, and ending the current flow.
Step 209: the upper layer application software is not notified that the intelligent device is offline.
Step 210: a target communication protocol is selected from any communication protocol that has been found to be online with the smart device.
In order to avoid the intelligent device from being off-line due to disconnection of a certain communication protocol, one communication protocol can be selected from other communication protocols to maintain communication between the corresponding upper-layer application software and the intelligent device.
Step 211: and realizing the communication between the upper application software and the intelligent equipment by using the selected target communication protocol.
As shown in fig. 3, an embodiment of the present invention provides an intelligent device discovery apparatus, including: a registration unit 301, an online notification determination unit 302, and an offline notification determination unit 303, wherein,
the registration unit 301 is configured to implement registration of at least two communication protocols;
the online notification determining unit 302 is configured to determine, when an online notification of an intelligent device returned by any one of the registered communication protocols is received, whether any other communication protocol has found that the intelligent device is online; if not, informing the intelligent equipment of online to corresponding upper application software; if yes, the upper application software is not notified that the intelligent equipment is online;
the offline notification determining unit 303 is configured to determine, when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, whether any one of the communication protocols has found that the intelligent device is online; if not, informing the upper application software that the intelligent equipment is offline; and if so, not notifying the upper application software that the intelligent equipment is offline.
In an embodiment of the present invention, the online notification determining unit is configured to, when an online notification of an intelligent device returned by any one of registered communication protocols is received, correspondingly store a name of the corresponding communication protocol and a product serial number SN of the intelligent device in a preset hash table; determining whether the name of any other communication protocol and the corresponding stored SN exist in the hash table;
the offline notification determining unit is configured to, when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, search, in the hash table, for a name of the corresponding communication protocol and the corresponding stored SN, and delete the name and the corresponding stored SN; and determining whether the name of any communication protocol and the corresponding stored SN exist in the deleted hash table.
In an embodiment of the present invention, the online notification determining unit is configured to notify the upper application software that the intelligent device is online by using a preset unified callback function;
and the offline notification determining unit is used for notifying the intelligent equipment of offline by using the unified callback function to the upper application software.
As shown in fig. 4, in an embodiment of the present invention, the method further includes: a communication control unit 401;
the communication control unit 401 is configured to, when the offline notification determining unit receives an offline notification of the intelligent device returned by any one of the registered communication protocols and determines that any one of the communication protocols has found that the intelligent device is online, select a target communication protocol from any one of the communication protocols that have found that the intelligent device is online; and realizing the communication between the upper application software and the intelligent equipment by utilizing the target communication protocol.
Because the information interaction, execution process, and other contents between the units in the device are based on the same concept as the method embodiment of the present invention, specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
As shown in fig. 5, an embodiment of the present invention provides a control end, including: the intelligent device discovery apparatus 501 and the upper layer application software 502 in any of the above embodiments.
As shown in fig. 6, an embodiment of the present invention provides an intelligent device discovery system, including: the control terminal 601 according to any of the above embodiments, and at least one smart device 602.
An embodiment of the present invention provides a computer-readable medium, which includes a computer execution instruction, and when a processor of a storage controller executes the computer execution instruction, the storage controller executes the intelligent device discovery method described in any of the above embodiments.
An embodiment of the present invention provides a storage controller, including: a processor, a memory, and a bus; the memory is used for storing computer execution instructions, the processor is connected with the memory through the bus, and when the storage controller runs, the processor executes the computer execution instructions stored in the memory, so that the storage controller executes the intelligent device discovery method of any one of the above embodiments.
In summary, the embodiments of the present invention have at least the following advantages:
1. in the embodiment of the invention, firstly, the registration of at least two communication protocols is realized, so that if an online notification of the intelligent device returned by any one of the registered communication protocols is received, the upper layer application software is not directly notified that the intelligent device is online, but whether any other communication protocol finds that the intelligent device is online or not is determined, if the intelligent device is online, the current communication protocol does not initially find that the intelligent device is online, therefore, the upper layer application software is not required to be notified, if the intelligent device is not online, the current communication protocol is initially found that the intelligent device is online, therefore, the device is required to be notified to the upper layer application software that the intelligent device is online at the moment, thus, the upper layer application software is ensured to receive the online notification of the intelligent device only once, and similarly, when the offline notification of the intelligent device is received, the upper layer application software is not directly notified, but it needs to determine whether there is a communication protocol to find that the device is online, if so, the upper layer application software is not notified any more, if not, the intelligent device is notified to be offline, and if not, the upper layer application software notifies the intelligent device to be offline, so that the upper layer application software is ensured to receive the notification that the intelligent device is offline only once. Therefore, the scheme better avoids the upper application software from frequently receiving the notification.
2. In the embodiment of the present invention, the online record information of the intelligent device is stored through a hash table, where the online record information may include: the name of the communication protocol of the intelligent device on line and the SN number of the intelligent device are found, and when the off-line notification of the intelligent device is received, the corresponding on-line record information is deleted from the hash table, so that whether the corresponding intelligent device is in an on-line state at present can be rapidly known by looking up the hash table, and whether the on-line notification or the off-line notification is sent to the corresponding upper application software can be rapidly determined.
3. In the embodiment of the invention, the unified callback function is used for notifying the corresponding upper application software, so that the workload of developers can be simplified, the development efficiency can be improved, and the user experience can be improved.
4. In the embodiment of the invention, when the offline notification of the intelligent equipment is received and the communication protocol is determined to find that the intelligent equipment is online, one communication protocol which can be selected from the communication protocols for finding that the intelligent equipment is online can be used for maintaining the communication with the intelligent equipment, and meanwhile, by registering various communication protocols, when a certain communication protocol cannot find that the intelligent equipment is online, other communication protocols can be used for finding that the intelligent equipment is online, so that the stability and the reliability of the intelligent equipment finding can be ensured.
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 similar 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 (10)

1. An intelligent device discovery method, characterized in that,
enabling registration of at least two communication protocols; further comprising:
when an online notification of the intelligent equipment returned by any one of the registered communication protocols is received, determining whether any other communication protocol finds that the intelligent equipment is online;
if not, informing the intelligent equipment of online to corresponding upper application software;
if yes, the upper application software is not notified that the intelligent equipment is online;
when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, determining whether any one of the communication protocols finds that the intelligent device is online;
if not, informing the upper application software that the intelligent equipment is offline;
and if so, not notifying the upper application software that the intelligent equipment is offline.
2. The method of claim 1,
when receiving an online notification of the intelligent device returned by any one of the registered communication protocols, determining whether any other communication protocol finds that the intelligent device is online, including:
when an online notification of the intelligent device returned by any one of the registered communication protocols is received, correspondingly storing the name of the corresponding communication protocol and the product serial number SN of the intelligent device in a preset hash table; determining whether the name of any other communication protocol and the corresponding stored SN exist in the hash table;
when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, determining whether any one of the communication protocols has found that the intelligent device is online, including:
when an offline notification of the intelligent device returned by any one of the registered communication protocols is received, searching the name of the corresponding communication protocol and the corresponding stored SN in the hash table, and deleting the name and the corresponding stored SN; and determining whether the name of any communication protocol and the corresponding stored SN exist in the deleted hash table.
3. The method of claim 1,
the notifying the corresponding upper application software that the intelligent device is online includes:
notifying the upper application software of the online of the intelligent equipment by using a preset unified callback function;
the notifying the upper layer application software that the intelligent device is offline includes:
and notifying the intelligent equipment of offline to the upper application software by using the unified callback function.
4. The method according to any one of claims 1 to 3,
further comprising:
when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols and determining that any one of the communication protocols finds that the intelligent device is online, selecting a target communication protocol from any one of the communication protocols which find that the intelligent device is online;
and realizing the communication between the upper application software and the intelligent equipment by utilizing the target communication protocol.
5. An intelligent device discovery apparatus, comprising: a registration unit, an online notification determination unit, and an offline notification determination unit, wherein,
the registration unit is used for realizing the registration of at least two communication protocols;
the online notification determining unit is configured to determine whether any other communication protocol has found that the intelligent device is online or not when an online notification of the intelligent device returned by any one registered communication protocol is received; if not, informing the intelligent equipment of online to corresponding upper application software; if yes, the upper application software is not notified that the intelligent equipment is online;
the offline notification determining unit is configured to determine whether any one of the registered communication protocols has found that the intelligent device is online when receiving an offline notification of the intelligent device returned by the any one of the registered communication protocols; if not, informing the upper application software that the intelligent equipment is offline; and if so, not notifying the upper application software that the intelligent equipment is offline.
6. The apparatus of claim 5,
the online notification determining unit is used for correspondingly storing the name of the corresponding communication protocol and the product serial number SN of the intelligent equipment in a preset hash table when an online notification of the intelligent equipment returned by any one of the registered communication protocols is received; determining whether the name of any other communication protocol and the corresponding stored SN exist in the hash table;
the offline notification determining unit is configured to, when receiving an offline notification of the intelligent device returned by any one of the registered communication protocols, search, in the hash table, for a name of the corresponding communication protocol and the corresponding stored SN, and delete the name and the corresponding stored SN; and determining whether the name of any communication protocol and the corresponding stored SN exist in the deleted hash table.
7. The apparatus of claim 5,
the online notification determining unit is used for notifying the upper application software of online of the intelligent device by using a preset unified callback function;
and the offline notification determining unit is used for notifying the intelligent equipment of offline by using the unified callback function to the upper application software.
8. The apparatus according to any one of claims 5 to 7,
further comprising: a communication control unit;
the communication control unit is configured to select a target communication protocol from any one of the communication protocols that have been found to be online by the intelligent device when the offline notification determining unit receives an offline notification of the intelligent device returned by any one of the registered communication protocols and determines that any one of the communication protocols has been found to be online by the intelligent device; and realizing the communication between the upper application software and the intelligent equipment by utilizing the target communication protocol.
9. A control terminal, comprising: the smart device discovery apparatus of any one of claims 5 to 8 and upper layer application software.
10. An intelligent device discovery system, comprising: the control terminal of claim 9, and at least one smart device.
CN201711089196.6A 2017-11-08 2017-11-08 Intelligent device discovery method, device, control end and system Active CN107911356B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711089196.6A CN107911356B (en) 2017-11-08 2017-11-08 Intelligent device discovery method, device, control end and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711089196.6A CN107911356B (en) 2017-11-08 2017-11-08 Intelligent device discovery method, device, control end and system

Publications (2)

Publication Number Publication Date
CN107911356A CN107911356A (en) 2018-04-13
CN107911356B true CN107911356B (en) 2020-04-17

Family

ID=61842755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711089196.6A Active CN107911356B (en) 2017-11-08 2017-11-08 Intelligent device discovery method, device, control end and system

Country Status (1)

Country Link
CN (1) CN107911356B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108667943A (en) * 2018-07-12 2018-10-16 四川虹美智能科技有限公司 A kind of control method and control system of intelligent appliance

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079730A (en) * 2006-05-25 2007-11-28 中国移动通信集团公司 Remote control system and control method of information appliance
CN101141360A (en) * 2007-09-14 2008-03-12 四川长虹电器股份有限公司 Equipment management and control method of family network
CN101442566A (en) * 2009-01-08 2009-05-27 中国电信股份有限公司 Method and apparatus for implementing dynamic domain name update
CN101562616A (en) * 2009-03-23 2009-10-21 中国电信股份有限公司 User residence gateway management system and method
CN101765114A (en) * 2010-01-18 2010-06-30 杭州华三通信技术有限公司 Method, system and equipment for controlling wireless user access
CN103001959A (en) * 2012-11-29 2013-03-27 东软集团股份有限公司 Method and system for discovering devices among households
CN103152234A (en) * 2013-02-20 2013-06-12 广州市佳思信息科技有限公司 Method for implementing interconnection of digital home network devices
CN103558836A (en) * 2013-11-19 2014-02-05 海信集团有限公司 Method for synchronously controlling device status and household appliance
CN103916442A (en) * 2013-01-07 2014-07-09 阿里巴巴集团控股有限公司 Message pushing achieving method, mobile terminal and message pushing system
US8996900B2 (en) * 2010-02-04 2015-03-31 Cisco Technology, Inc. System and method for managing power consumption in data propagation environments

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110145270A1 (en) * 2009-12-14 2011-06-16 Telefonaktiebolaget Lm Ericsson (Publ) Service personas for address books

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101079730A (en) * 2006-05-25 2007-11-28 中国移动通信集团公司 Remote control system and control method of information appliance
CN101141360A (en) * 2007-09-14 2008-03-12 四川长虹电器股份有限公司 Equipment management and control method of family network
CN101442566A (en) * 2009-01-08 2009-05-27 中国电信股份有限公司 Method and apparatus for implementing dynamic domain name update
CN101562616A (en) * 2009-03-23 2009-10-21 中国电信股份有限公司 User residence gateway management system and method
CN101765114A (en) * 2010-01-18 2010-06-30 杭州华三通信技术有限公司 Method, system and equipment for controlling wireless user access
US8996900B2 (en) * 2010-02-04 2015-03-31 Cisco Technology, Inc. System and method for managing power consumption in data propagation environments
CN103001959A (en) * 2012-11-29 2013-03-27 东软集团股份有限公司 Method and system for discovering devices among households
CN103916442A (en) * 2013-01-07 2014-07-09 阿里巴巴集团控股有限公司 Message pushing achieving method, mobile terminal and message pushing system
CN103152234A (en) * 2013-02-20 2013-06-12 广州市佳思信息科技有限公司 Method for implementing interconnection of digital home network devices
CN103558836A (en) * 2013-11-19 2014-02-05 海信集团有限公司 Method for synchronously controlling device status and household appliance

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A scalable messaging system for accelerating discovery from large scale scientific simulations;Tong Jin, et.;《2012 19th International Conference on High Performance Computing》;20130429;第1-10页 *
终端模式系统设备发现与帧缓冲服务端的研究;谭会城;《中国优秀硕士学位论文全文库 信息科技辑》;20150515;第I138-383页 *

Also Published As

Publication number Publication date
CN107911356A (en) 2018-04-13

Similar Documents

Publication Publication Date Title
US9930632B2 (en) M2M application remote registration method, device, system and storage medium
CN103370917B (en) Message treatment method and server
CN102984012B (en) Management method and system for service resources
US9608831B2 (en) Migrating a chat message service provided by a chat server to a new chat server
CN113905005B (en) Method and device for updating client state of instant messaging
US10834559B2 (en) Information processing method for machine-to-machine/man (M2M) application, common services entity (CSE) and application entity (AE)
CN103780679A (en) Long time delay remote invocation method based on HTTP protocol
CN107315825A (en) A kind of index upgrade system, method and device
CN109905431B (en) Message processing method and system, storage medium and electronic equipment
US9973440B2 (en) Resource notification method, device and system
CN108306796B (en) Intelligent home system, and information processing method and device of intelligent home equipment
CN108696392A (en) A kind of communications status monitoring method, network node and computer readable storage medium
US10051552B2 (en) Method for realizing resource attribute notification, and common service entity
CN103369660A (en) Network-element data synchronization method and network-element device
CN105530269B (en) Data interactive method and system and server
CN114116014A (en) Instruction issuing method and device, intelligent equipment and storage medium
CN114201458B (en) Information updating method, micro-service system and computer readable storage medium
CN107911356B (en) Intelligent device discovery method, device, control end and system
CN109542841A (en) The method and terminal device of data snapshot are created in cluster
KR101275995B1 (en) Data storing system and data processing method of informational household appliance
CN107888677B (en) Communication implementation method, control terminal, intelligent device and system
CN113986135B (en) Method, device, equipment and storage medium for processing request
CN115981561A (en) Hard disk management method, device, equipment and storage medium of distributed storage system
CN104680307B (en) A kind of item transaction treating method and apparatus
CN108683533B (en) Configuration updating method, configuration updating response method, server and system

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 621050 No. 303 Jiuzhou Road, Fucheng District, Mianyang, Sichuan.

Applicant after: SICHUAN HONGMEI INTELLIGENT TECHNOLOGY Co.,Ltd.

Address before: 621050 No. 303 Jiuzhou Road, Fucheng District, Mianyang, Sichuan.

Applicant before: MIANYANG MEILING SOFTWARE TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20190509

Address after: 230000 First Floor of Nanmeiling R&D and Test Center, Lianhua Road East and Tangkou Road, Hefei Economic and Technological Development Zone, Anhui Province

Applicant after: Hefei Meiling Union Technology Co.,Ltd.

Address before: 621050 No. 303 Jiuzhou Road, Fucheng District, Mianyang, Sichuan.

Applicant before: SICHUAN HONGMEI INTELLIGENT TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant