CN106302692A - The discovery method and apparatus of equipment - Google Patents
The discovery method and apparatus of equipment Download PDFInfo
- Publication number
- CN106302692A CN106302692A CN201610654132.5A CN201610654132A CN106302692A CN 106302692 A CN106302692 A CN 106302692A CN 201610654132 A CN201610654132 A CN 201610654132A CN 106302692 A CN106302692 A CN 106302692A
- Authority
- CN
- China
- Prior art keywords
- equipment
- terminal
- information
- present
- packet
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 230000010247 heart contraction Effects 0.000 claims description 12
- 230000008569 process Effects 0.000 abstract description 11
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 4
- 230000008901 benefit Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/51—Discovery or management thereof, e.g. service location protocol [SLP] or web services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Small-Scale Networks (AREA)
Abstract
The invention discloses a kind of discovery method of equipment, the method includes: present terminal monitors the packet in network;Judge whether described packet is self-defining data bag;The most then present terminal resolves described self-defining data bag, it is thus achieved that the information of terminal to be connected;According to the information of described terminal to be connected, update the connectable device list of present terminal.The invention also discloses the discovery device of a kind of equipment.The present invention can not rely on third party software DLNA, skips the complicated flow process of DLNA, and accelerates the speed that equipment finds.
Description
Technical field
The present invention relates to the communications field, particularly relate to the discovery method and apparatus of a kind of equipment.
Background technology
In prior art, equipment discovery feature commonly relies on third party software DLNA (Digital Living Network
Alliance, DLNA) UPnP (Universal Plug and Play, general plug-and-play protocol).
DLNA is an alliance organization being made up of consumer electronics, mobile phone and manufacturer computer.DLNA is used to have a lot of limits
System, such as DLNA defines used procotol, it is necessary to support IPv4, it is stipulated that all DLNA device all must be supported to make
Carry out the transmission etc. of media with http protocol, therefore use DLNA to have a lot of limitations.
Owing in prior art, equipment discovery feature commonly relies on third party software DLNA, as the software DLNA being relied on
When not existing or change, discovering device function just cannot realize, so it is the most inevitable to depend on DLNA discovering device
Ground produces software coupling.Software coupling refers to one that two or more software interdepends in the other side and measures.Additionally,
Some side effect brought due to third party software are also difficult to avoid that, such as DLNA is to be connected by cable network or wireless network
Connect, network is had delay;And the flow process of DLNA discovering device is complicated, and this all can result in a finding that the speed of equipment is unhappy.
Summary of the invention
Present invention is primarily targeted at the discovery method and apparatus proposing a kind of equipment, it is intended to realize skipping DLNA complicated
Flow process discovering device, accelerate discovering device speed.
For achieving the above object, the present invention provides a kind of discovery method of equipment, and described method comprises the steps:
Present terminal monitors the packet in network;
Judge whether described packet is self-defining data bag;
The most then present terminal resolves described self-defining data bag, it is thus achieved that the information of described terminal to be connected;
According to the information of described terminal to be connected, update the connectable device list of present terminal.
Alternatively, described present terminal resolve described self-defining data bag, it is thus achieved that the step of the information of terminal to be connected it
After include:
Start heart beating thread, it is thus achieved that the heartbeat packet in network;
The described information according to described terminal to be connected, the step of the connectable device list updating present terminal includes:
Information according to the heartbeat packet obtained and terminal to be connected determines the online information of equipment to be connected;
Online information according to equipment to be connected updates described connectable device list.
Alternatively, the described information according to the heartbeat packet obtained and terminal to be connected determines the online information of equipment to be connected
Step include:
Obtain the heartbeat packet in network;
Resolve described heartbeat packet, it is thus achieved that send the device identification of described heartbeat packet;
Information according to the device identification obtained and terminal to be connected determines the online information of equipment to be connected.
Alternatively, described method also includes:
Set up User Data Protocol with the equipment in connectable device list to be connected.
Alternatively, described self-defining data bag includes IP address of equipment and ID.
Additionally, for achieving the above object, the present invention also provides for the discovery device of a kind of equipment, it is characterised in that described dress
Put and include:
Monitor module, monitor the packet in network for present terminal;
Judge module, is used for judging whether described packet is self-defining data bag;
Parsing module, resolves described self-defining data bag for the most then present terminal, it is thus achieved that the letter of terminal to be connected
Breath;
More new module, for the information according to described terminal to be connected, updates the connectable device list of present terminal.
Alternatively, described device also includes:
Obtain module, be used for starting heart beating thread, it is thus achieved that the heartbeat packet in network;
Described more new module includes:
Determine unit, for determining the online letter of equipment to be connected according to the information of the heartbeat packet obtained and terminal to be connected
Breath;
Updating block, updates described connectable device list for the online information according to equipment to be connected.
Alternatively, described determine that unit includes:
Obtain subelement, obtain the heartbeat packet in network;
Resolve subelement, be used for resolving described heartbeat packet, it is thus achieved that send the device identification of described heartbeat packet;
Determine subelement, for according to the device identification obtained and the information of terminal to be connected determine equipment to be connected
Line information.
Alternatively, described device also includes:
Link block, is connected for setting up User Data Protocol with the equipment in connectable device list.
Alternatively, described self-defining data bag includes IP address of equipment and ID.
The present invention monitors the packet in network by present terminal;Judge whether described packet is self-defining data
Bag;The most then present terminal resolves described self-defining data bag, it is thus achieved that the information of terminal to be connected;According to described end to be connected
The information of end, updates the connectable device list of present terminal.By the way, the present invention monitors network by present terminal
In packet, it is judged that whether listen to is the self-defining data bag that sends of equipment to be connected, then according to listen to from
Definition packet realizes the discovery to terminal to be connected, it is not necessary to depend on third party software DLNA, uses thus without producing
The problem of the software coupling that third party software brings, has skipped the Complicated Flow of DLNA discovering device, finds flow process letter the most relatively
Single, and the speed that equipment finds can be accelerated.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the discovery method first embodiment of present device;
Fig. 2 is the schematic flow sheet of discovery method second embodiment of present device;
Fig. 3 is to determine equipment to be connected according to the heartbeat packet obtained and the information of terminal to be connected in the embodiment of the present invention
The refinement schematic flow sheet of online information;
Fig. 4 is the schematic flow sheet of discovery method the 3rd embodiment of present device;
Fig. 5 is the high-level schematic functional block diagram finding device first embodiment of present device;
Fig. 6 is the high-level schematic functional block diagram finding device the second embodiment of present device;
Fig. 7 is the refinement functional schematic determining unit in the embodiment of the present invention;
Fig. 8 is the schematic flow sheet finding device the 3rd embodiment of present device.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, are described further referring to the drawings.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not intended to limit the present invention.
The present invention provides a kind of discovery method of equipment.
Schematic flow sheet with reference to the discovery method first embodiment that Fig. 1, Fig. 1 are present device.
The method that present device finds comprises the steps:
Step S100, present terminal monitors the packet in network.
For ensureing that the present invention can normally implement, in the present invention, each equipment needs in consolidated network, therefore can be with thing
First set up LAN, naturally it is also possible to use wide area network, i.e. each equipment can be communicated by wide area network.Specifically, respectively
Individual equipment can be communicated by TCP/IP basic agreement, can also be communicated by other agreement in being embodied as,
Such as use NetBEUI agreement.
In use, present terminal can be powered on start by user, then accesses the network established in advance, network
In the equipment that is set in advance as mutually finding can send self-defining data bag in network, each in certain network sets
For can also mutually send self-defining data bag;In start that present terminal is powered on, and after accessing the network established in advance, use
Family can send self-defining data bag by present terminal or present terminal in trend network.Described self-defining data bag carries
The description information of present terminal.Description information at least includes this IP address of equipment and the unique ID of equipment, in being embodied as except
Outside IP address of equipment and ID, it is also possible to include at least in port numbers, software version, hardware version and device type
Kind.Described in the present embodiment information include the unique ID of this IP address of equipment, equipment, port numbers, software version, hardware version and
Device type, its self-defining data bag detailed data structure is as follows:
{
unsigned char[128]ipaddr,
Unsigned int port,
unsigned int device_type,
unsigned char[128]device_id,
unsigned char[128]software_version,
unsigned char[128]hardware_version,
}
In the start that powered on by present terminal, and after accessing the network established in advance, present terminal is while listening for from net
Packet in network.Present terminal can be any one in the equipment that can mutually find.
In the present embodiment, described terminal includes that mobile phone, PAD, TV, computer etc. can be to computer input program sums
According to or receive computer export result equipment.
Step S200, it is judged that whether described packet is self-defining data bag.
When listening to packet, the packet listened to can be judged, it is judged that whether the packet listened to
It it is self-defining data bag.
Specifically, title or flag by self-defining data bag judge whether the packet listened to is self-defined
Packet;If containing at least one in title and flag in the packet listened to, then this packet is self-defining data
Bag.
Step S300, the most then present terminal resolves described self-defining data bag, it is thus achieved that the information of terminal to be connected.
After present terminal gets the self-defining data bag that other equipment sends, what present terminal was analyzed and acquired by makes by oneself
Justice packet, thus obtain other-end information.Specifically, the self-defining data bag obtained is resolved by the present embodiment,
Obtain IP address of equipment and the unique ID of equipment of terminal to be connected.
It is embodied as the middle content difference included according to self-defining data bag, it is thus achieved that other-end information also can be different, than
If as self-defining data bag includes the unique ID of this IP address of equipment, equipment, port numbers, software version, hardware version and equipment
Type, then resolve and obtain the IP address of other equipment, the unique ID of equipment, port numbers, software version, hardware version and equipment class
Type.
Step S400, according to the information of described terminal to be connected, updates the connectable device list of present terminal.
The present embodiment also in advance is set up and has a list of devices, this list act as recording attachable equipment, bag
Include the identification information of attachable equipment, such as device id etc..IP address of equipment etc. can also be included in being embodied as.
Specifically, in the present embodiment list of devices can be one can the list of real-time update, be embodied as middle equipment row
Table can also be the list that a timing updates.During the present embodiment discovering device in a network, the information of this equipment is fed back to
In list, the information of recording equipment in lists, after having recorded, connectable device list is updated.
The present embodiment monitors the packet in network by present terminal;Judge whether described packet is self-defined number
According to bag;The most then present terminal resolves described self-defining data bag, it is thus achieved that the information of terminal to be connected;According to described to be connected
The information of terminal, updates the connectable device list of present terminal.By the way, the present embodiment is monitored by present terminal
Packet in network, it is judged that whether listen to is the self-defining data bag that sends of equipment to be connected, then according to listening to
Self-defining data bag realize discovery to terminal to be connected, it is not necessary to depend on third party software DLNA, thus without generation
The problem that the software using third party software to bring couples, has skipped the Complicated Flow of DLNA discovering device, finds flow process also phase
To simply, and the speed that equipment finds can be accelerated.
Further, with reference to the schematic flow sheet of discovery method the second embodiment that Fig. 2, Fig. 2 are present device.
Discovery method first embodiment based on present device, the step after step S300 may include that
S500, starts heart beating thread, it is thus achieved that the heartbeat packet in network.
The method first embodiment found based on present device, step S400 may include that
S410, determines the online information of equipment to be connected according to the information of the heartbeat packet obtained and terminal to be connected;
S420, updates described connectable device list according to the online information of equipment to be connected.
In order to determine the connectable device whether real-time online of discovery, in the present embodiment, all terminals can be monitored in real time
Heartbeat packet in automatic network.In the present embodiment, heartbeat packet is UDP (User Data Protocol, User Data Protocol) bag, UDP
Being the agreement corresponding with TCP, it is towards disconnected agreement, and it is not set up with the other side and is connected, but directly just data
Bag sends in the past.Each UDP message bag has complete source, destination address and packet numbering, individual transmission the most in a network.
Certainly heartbeat packet can also be the packet of other agreements.
In network, each equipment all can send heartbeat packet in network, and each equipment can monitor the heart in a network simultaneously
Jump bag, obtain the online situation of other equipment by monitoring heartbeat packet.Heartbeat packet is between devices or equipment is fixed to network
The command word of one of Shi Tongzhi the other side oneself state oneself definition, sends according to certain time interval, is similar to heart beating.With
Judge the other side's (equipment, process or other network element) the most properly functioning and regularly send simple communication bag.
The content of heartbeat packet does not has special provision, is typically all the least bag, or the empty bag only comprising packet header.
Therefore obtain equipment on-line information by heartbeat packet, the burden of server will not be increased the weight of.Therefore by starting the heart in the present embodiment
Wire jumper journey, obtains corresponding heartbeat packet according to end message to be connected;The online information of equipment to be connected is determined by heartbeat packet;
Online information according to equipment to be connected updates described connectable device list.
In the present embodiment, by starting heart beating thread, it is thus achieved that the heartbeat packet in network;According to obtain heartbeat packet and treat
The information connecting terminal determines the online information of equipment to be connected;Online information according to equipment to be connected can connect described in updating
List of devices.By the way, obtain equipment on-line information by heartbeat packet, the burden of server will not be increased the weight of.Can
To obtain other-end information rapidly, improve the accuracy of connectable device list.
Further, reference Fig. 3, Fig. 3 is according to the heartbeat packet obtained and the letter of terminal to be connected in the embodiment of the present invention
Breath determines the refinement schematic flow sheet that the step of the online information of equipment to be connected includes.
Discovery method first embodiment based on present device, step S410 may include that
S411, obtains the heartbeat packet in network;
S412, resolves described heartbeat packet, it is thus achieved that send the device identification of described heartbeat packet;
S413, determines the online information of equipment to be connected according to the information of the device identification obtained and terminal to be connected.
Specifically, in the present embodiment, present terminal obtains the heartbeat packet in automatic network automatically, resolves described heartbeat packet, logical
Cross complete source, destination address and packet numbering included in UDP heartbeat packet and judge whether it is described list can to connect set
Standby heartbeat packet.The most then obtain equipment on-line information, the equipment updated in connectable device list is updated, will not
Online equipment removal connectable device list;If it is not, then ignore described heartbeat packet.
In the present embodiment, by obtaining the heartbeat packet in network;Resolve described heartbeat packet, it is thus achieved that send described heartbeat packet
Device identification;Information according to the device identification obtained and terminal to be connected determines the online information of equipment to be connected.Pass through
Aforesaid way, obtains equipment on-line information by heartbeat packet, will not increase the weight of the burden of server.Can determine in real time equipment
Line situation so that connectable device list is more accurate.
Further, with reference to the schematic flow sheet that Fig. 4, Fig. 4 are method the 3rd embodiment that present device finds;
Discovery method first embodiment based on present device, described method also includes:
S600, sets up User Data Protocol with the equipment in connectable device list and is connected.
Starting heart beating thread in the present embodiment, according to the online situation of each equipment being detected, renewal can connect list
After, present in connectable device list, equipment is online equipment, now, sets up and arrange with connectable device in the present embodiment
The connection of each equipment in table.
Specifically, set up UDP with the equipment in connectable device list to be connected.UDP is that definition is at interference networks ring
Border provides the agreement of the compunication of packet switch.This agreement thinks that Internet protocol (IP) is its lower-layer protocols.This association
View provides the easiest protocol sending information to another user program.UDP connects connection the most in logic, not
Set up physical connection, there is resource consumption little, the advantage that processing speed is fast.Can also be set up other in being embodied as connect.
Further, the present embodiment is set up the process that UDP is connected with the equipment in connectable device list can include
Equipment in connectable device list directly transmits UDP message bag, confirms first terminal and setting in connectable device list
Communication between Bei is the most normal, if the equipment in connectable device list has response, then illustrate that bipartite network is normal.
It should be strongly noted that setting up after UDP is connected with the equipment in connectable device list, first terminal is permissible
Again the self-defining data bag in network is monitored.
In the present embodiment after updating connectable device list, set up UDP even with the equipment in connectable device list
Connect.By the way, setting up UDP with other equipment and be connected in the present embodiment, resource consumption is little, and processing speed is fast, and can
To connect whether the information sent quickly confirms the communication between the equipment in first terminal and connectable device list according to UDP
Normally, further confirmed that whether the equipment in connectable device list can connect.
The present invention also provides for the discovery device of a kind of equipment.
With reference to the high-level schematic functional block diagram finding device first embodiment that Fig. 5, Fig. 5 are present device.
In the present embodiment, the discovery device of this equipment includes:
Monitor module 100, monitor the packet in network for present terminal.
For ensureing that the present invention can normally implement, in the present invention, each equipment needs in consolidated network, therefore can be with thing
First set up LAN, naturally it is also possible to use wide area network, i.e. each equipment can be communicated by wide area network.Specifically, respectively
Individual equipment can be communicated by TCP/IP basic agreement, can also be communicated by other agreement in being embodied as,
Such as use NetBEUI agreement.
In use, present terminal can be powered on start by user, then accesses the network established in advance, network
In the equipment that is set in advance as mutually finding can send self-defining data bag in network, each in certain network sets
For can also mutually send self-defining data bag;In start that present terminal is powered on, and after accessing the network established in advance, use
Family can send self-defining data bag by present terminal or present terminal in trend network.Described self-defining data bag carries
The description information of present terminal.Description information at least includes this IP address of equipment and the unique ID of equipment, in being embodied as except
Outside IP address of equipment and ID, it is also possible to include at least in port numbers, software version, hardware version and device type
Kind.Described in the present embodiment information include the unique ID of this IP address of equipment, equipment, port numbers, software version, hardware version and
Device type, its self-defining data bag detailed data structure is as follows:
{
unsigned char[128]ipaddr,
Unsigned int port,
unsigned int device_type,
unsigned char[128]device_id,
unsigned char[128]software_version,
unsigned char[128]hardware_version,
}
Certainly, in the start that powered on by present terminal, and after accessing the network established in advance, present terminal is while listening for coming
Packet in automatic network.Present terminal can be any one in the equipment that can mutually find.
In the present embodiment, described terminal includes that mobile phone, PAD, TV, computer etc. can be to computer input program sums
According to or receive computer export result equipment.
Judge module 200, is used for judging whether described packet is self-defining data bag.
When listening to packet, the packet listened to can be judged, it is judged that whether the packet listened to
It it is self-defining data bag.
Specifically, title or flag by self-defining data bag judge whether the packet listened to is self-defined
Packet;If containing at least one in title and flag in the packet listened to, then this packet is self-defining data
Bag.
Parsing module 300, resolves described self-defining data bag for present terminal, it is thus achieved that the information of terminal to be connected.
After present terminal gets the self-defining data bag that other equipment sends, what present terminal was analyzed and acquired by makes by oneself
Justice packet, thus obtain other-end information.Specifically, the self-defining data bag obtained is resolved by the present embodiment,
Obtain IP address of equipment and the unique ID of equipment of terminal to be connected.
It is embodied as the middle content difference included according to self-defining data bag, it is thus achieved that other-end information also can be different, than
If as self-defining data bag includes the unique ID of this IP address of equipment, equipment, port numbers, software version, hardware version and equipment
Type, then resolve and obtain the IP address of other equipment, the unique ID of equipment, port numbers, software version, hardware version and equipment class
Type.
More new module 400, for the information according to described terminal to be connected, updates the connectable device row of present terminal
Table.
The present embodiment also in advance is set up and has a list of devices, this list act as recording attachable equipment, bag
Include the identification information of attachable equipment, such as device id etc..IP address of equipment etc. can also be included in being embodied as.
Specifically, in the present embodiment list of devices can be one can the list of real-time update, be embodied as middle equipment row
Table can also be the list that a timing updates.During the present embodiment discovering device in a network, the information of this equipment is fed back to
In list, the information of recording equipment in lists, after having recorded, connectable device list is updated.
In the present embodiment, the packet in network is monitored by monitoring module 100;Judge module 200 judges described number
Whether it is self-defining data bag according to bag;The most then parsing module 300 resolves described self-defining data bag, it is thus achieved that terminal to be connected
Information;More new module 400, according to the information of described terminal to be connected, updates the connectable device list of present terminal.Pass through
Aforesaid way, the present embodiment monitors the packet in network by present terminal, it is judged that whether listen to is equipment to be connected
The self-defining data bag sent, then realizes the discovery to terminal to be connected according to the self-defining data bag listened to, it is not necessary to
Depend on third party software DLNA, thus without producing the problem that the software using third party software to bring couples, skip
The Complicated Flow of DLNA discovering device, finds that flow process is the most relatively easy, and can accelerate the speed that equipment finds.
Further, with reference to the high-level schematic functional block diagram finding device the second embodiment that Fig. 6, Fig. 6 are present device.
Discovery device first embodiment based on present device, described device also includes:
Obtain module 500, start heart beating thread, it is thus achieved that the heartbeat packet in network;
More new module 400 may include that
Determine unit 410, for according to the heartbeat packet obtained and the information of terminal to be connected determine equipment to be connected
Line information;
Updating block 420, updates described connectable device list according to the online information of equipment to be connected.
In order to determine the connectable device whether real-time online of discovery, in the present embodiment, all terminals can be monitored in real time
Heartbeat packet in automatic network.In the present embodiment, heartbeat packet is UDP (User Data Protocol, User Data Protocol) bag, UDP
Being the agreement corresponding with TCP, it is towards disconnected agreement, and it is not set up with the other side and is connected, but directly just data
Bag sends in the past.Each UDP message bag has complete source, destination address and packet numbering, individual transmission the most in a network.
Certainly heartbeat packet can also be the packet of other agreements.
In network, each equipment all can send heartbeat packet in network, and each equipment can monitor the heart in a network simultaneously
Jump bag, obtain the online situation of other equipment by monitoring heartbeat packet.Heartbeat packet is between devices or equipment is fixed to network
The command word of one of Shi Tongzhi the other side oneself state oneself definition, sends according to certain time interval, is similar to heart beating.With
Judge the other side's (equipment, process or other network element) the most properly functioning and regularly send simple communication bag.
The content of heartbeat packet does not has special provision, is typically all the least bag, or the empty bag only comprising packet header.
Therefore obtain equipment on-line information by heartbeat packet, the burden of server will not be increased the weight of.Therefore by starting the heart in the present embodiment
Wire jumper journey, obtains corresponding heartbeat packet according to end message to be connected;The online information of equipment to be connected is determined by heartbeat packet;
Online information according to equipment to be connected updates described connectable device list.
In the present embodiment, by starting heart beating thread, it is thus achieved that the heartbeat packet in network;According to obtain heartbeat packet and treat
The information connecting terminal determines the online information of equipment to be connected;Online information according to equipment to be connected can connect described in updating
List of devices.By the way, obtain equipment on-line information by heartbeat packet, the burden of server will not be increased the weight of.Can
To obtain other-end information rapidly, improve the accuracy of connectable device list.
Further, reference Fig. 7, Fig. 7 is the refinement functional schematic determining unit in the embodiment of the present invention.
Discovery device first embodiment based on present device, determines that unit 410 may include that
Obtain subelement 411, for obtaining the heartbeat packet in network;
Obtain subelement 412, be used for resolving described heartbeat packet, it is thus achieved that send the device identification of described heartbeat packet;
Determine subelement 413, for determining equipment to be connected according to the information of the device identification obtained and terminal to be connected
Online information.
Specifically, in the present embodiment, present terminal obtains the heartbeat packet in automatic network automatically, resolves described heartbeat packet, logical
Cross complete source, destination address and packet numbering included in UDP heartbeat packet and judge whether it is described list can to connect set
Standby heartbeat packet.The most then obtain equipment on-line information, the equipment updated in connectable device list is updated, will not
Online equipment removal connectable device list;If it is not, then ignore described heartbeat packet.
In the present embodiment, by obtaining the heartbeat packet in network;Resolve described heartbeat packet, it is thus achieved that send described heartbeat packet
Device identification;Information according to the device identification obtained and terminal to be connected determines the online information of equipment to be connected.Pass through
Aforesaid way, obtains equipment on-line information by heartbeat packet, will not increase the weight of the burden of server.Can determine in real time equipment
Line situation so that connectable device list is more accurate.
Further, with reference to the schematic flow sheet finding device the 3rd embodiment that Fig. 8, Fig. 8 are present device.
Discovery device first embodiment based on present device, described device also includes:
Link block 600, is connected for setting up User Data Protocol with the equipment in connectable device list.
Starting heart beating thread in the present embodiment, according to the online situation of each equipment being detected, renewal can connect list
After, present in connectable device list, equipment is online equipment, now, sets up and arrange with connectable device in the present embodiment
The connection of each equipment in table.
Specifically, set up UDP with the equipment in connectable device list to be connected.UDP is that definition is at interference networks ring
Border provides the agreement of the compunication of packet switch.This agreement thinks that Internet protocol (IP) is its lower-layer protocols.This association
View provides the easiest protocol sending information to another user program.UDP connects connection the most in logic, not
Set up physical connection, there is resource consumption little, the advantage that processing speed is fast.Can also be set up other in being embodied as connect.
Further, the present embodiment is set up the process that UDP is connected with the equipment in connectable device list can include
Equipment in connectable device list directly transmits UDP message bag, confirms first terminal and setting in connectable device list
Communication between Bei is the most normal, if the equipment in connectable device list has response, then illustrate that bipartite network is normal.
It should be strongly noted that setting up after UDP is connected with the equipment in connectable device list, first terminal is permissible
Again the self-defining data bag in network is monitored.
In the present embodiment after updating connectable device list, set up UDP even with the equipment in connectable device list
Connect.By the way, setting up UDP with other equipment and be connected in the present embodiment, resource consumption is little, and processing speed is fast, and can
To connect whether the information sent quickly confirms the communication between the equipment in first terminal and connectable device list according to UDP
Normally, further confirmed that whether the equipment in connectable device list can connect.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every utilize this
Equivalent structure or equivalence flow process that bright description and accompanying drawing content are made convert, or are directly or indirectly used in other relevant skills
Art field, is the most in like manner included in the scope of patent protection of the present invention.
Claims (10)
1. the discovery method of an equipment, it is characterised in that including:
Present terminal monitors the packet in network;
Judge whether described packet is self-defining data bag;
The most then present terminal resolves described self-defining data bag, it is thus achieved that the information of terminal to be connected;
According to the information of described terminal to be connected, update the connectable device list of present terminal.
2. the discovery method of equipment as claimed in claim 1, it is characterised in that described present terminal resolves described self-defined number
According to bag, it is thus achieved that include after the step of the information of terminal to be connected:
Start heart beating thread, it is thus achieved that the heartbeat packet in network;
The described information according to described terminal to be connected, the step of the connectable device list updating present terminal includes:
Information according to the heartbeat packet obtained and terminal to be connected determines the online information of equipment to be connected;
Online information according to equipment to be connected updates described connectable device list.
3. the discovery method of equipment as claimed in claim 2, it is characterised in that described according to the heartbeat packet obtained with to be connected
The information of terminal determines that the step of the online information of equipment to be connected includes:
Obtain the heartbeat packet in network;
Resolve described heartbeat packet, it is thus achieved that send the device identification of described heartbeat packet;
Information according to the device identification obtained and terminal to be connected determines the online information of equipment to be connected.
4. the discovery method of the equipment as according to any one of claim 1-3, it is characterised in that described method also includes:
Set up User Data Protocol with the equipment in connectable device list to be connected.
5. the discovery method of equipment as described in claim 1, it is characterised in that described self-defining data bag includes device IP
Address and ID.
6. the discovery device of an equipment, it is characterised in that described device includes:
Monitor module, monitor the packet in network for present terminal;
Judge module, is used for judging whether described packet is self-defining data bag;
Parsing module, resolves described self-defining data bag for the most then present terminal, it is thus achieved that the information of terminal to be connected;
More new module, for the information according to described terminal to be connected, updates the connectable device list of present terminal.
7. the discovery device of equipment as claimed in claim 6, it is characterised in that described device also includes:
Obtain module, be used for starting heart beating thread, it is thus achieved that the heartbeat packet in network;
Described more new module includes:
Determine unit, for determining the online information of equipment to be connected according to the information of the heartbeat packet obtained and terminal to be connected;
Updating block, updates described connectable device list for the online information according to equipment to be connected.
8. the discovery device of equipment as claimed in claim 7, it is characterised in that described determine that unit includes:
Obtain subelement, obtain the heartbeat packet in network;
Resolve subelement, be used for resolving described heartbeat packet, it is thus achieved that send the device identification of described heartbeat packet;
Determine subelement, for determining the online letter of equipment to be connected according to the information of the device identification obtained and terminal to be connected
Breath.
9. the discovery device of the equipment as according to any one of claim 6-8, it is characterised in that described device also includes:
Link block, is connected for setting up User Data Protocol with the equipment in connectable device list.
10. the discovery device of equipment as described in claim 6, it is characterised in that described self-defining data bag includes equipment
IP address and ID.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610654132.5A CN106302692A (en) | 2016-08-09 | 2016-08-09 | The discovery method and apparatus of equipment |
PCT/CN2016/112308 WO2018028122A1 (en) | 2016-08-09 | 2016-12-27 | Device discovery method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610654132.5A CN106302692A (en) | 2016-08-09 | 2016-08-09 | The discovery method and apparatus of equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106302692A true CN106302692A (en) | 2017-01-04 |
Family
ID=57668267
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610654132.5A Pending CN106302692A (en) | 2016-08-09 | 2016-08-09 | The discovery method and apparatus of equipment |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106302692A (en) |
WO (1) | WO2018028122A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108377210A (en) * | 2018-01-22 | 2018-08-07 | 厦门亿联网络技术股份有限公司 | A kind of more device identification methods of LAN |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114199206B (en) * | 2021-11-02 | 2024-06-04 | 青岛海洋科技中心 | Water towing type measurement system and Ethernet data wired transmission method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101299689A (en) * | 2008-06-19 | 2008-11-05 | 北京立通无限科技有限公司 | On-line detection method as well as mail server |
CN103873472A (en) * | 2014-03-18 | 2014-06-18 | 广州市纬志电子科技有限公司 | Method for automatically having access to network |
CN104023050A (en) * | 2014-05-16 | 2014-09-03 | 中国科学院计算技术研究所 | Equipment cooperation multi-screen interactive system under equipment cloud environment and method thereof |
CN104301197A (en) * | 2013-07-17 | 2015-01-21 | 中国电信股份有限公司 | Method and system of implementing mutual discovery between multiple terminals of user |
CN104702578A (en) * | 2013-12-09 | 2015-06-10 | 中兴通讯股份有限公司 | Terminal communication method and terminal |
US20150256436A1 (en) * | 2014-03-04 | 2015-09-10 | Connectem Inc. | Method and system for seamless sctp failover between sctp servers running on different machines |
-
2016
- 2016-08-09 CN CN201610654132.5A patent/CN106302692A/en active Pending
- 2016-12-27 WO PCT/CN2016/112308 patent/WO2018028122A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101299689A (en) * | 2008-06-19 | 2008-11-05 | 北京立通无限科技有限公司 | On-line detection method as well as mail server |
CN104301197A (en) * | 2013-07-17 | 2015-01-21 | 中国电信股份有限公司 | Method and system of implementing mutual discovery between multiple terminals of user |
CN104702578A (en) * | 2013-12-09 | 2015-06-10 | 中兴通讯股份有限公司 | Terminal communication method and terminal |
US20150256436A1 (en) * | 2014-03-04 | 2015-09-10 | Connectem Inc. | Method and system for seamless sctp failover between sctp servers running on different machines |
CN103873472A (en) * | 2014-03-18 | 2014-06-18 | 广州市纬志电子科技有限公司 | Method for automatically having access to network |
CN104023050A (en) * | 2014-05-16 | 2014-09-03 | 中国科学院计算技术研究所 | Equipment cooperation multi-screen interactive system under equipment cloud environment and method thereof |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108377210A (en) * | 2018-01-22 | 2018-08-07 | 厦门亿联网络技术股份有限公司 | A kind of more device identification methods of LAN |
CN108377210B (en) * | 2018-01-22 | 2020-07-24 | 厦门亿联网络技术股份有限公司 | Local area network multi-device identification method |
Also Published As
Publication number | Publication date |
---|---|
WO2018028122A1 (en) | 2018-02-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4912503B2 (en) | Information processing apparatus, method, and server for determining type of electrical appliance | |
JP4058845B2 (en) | Gateway device | |
US7565418B2 (en) | Network device setup utility | |
US8255497B2 (en) | Method of discovery and communication with industrial equipment | |
CN101194470B (en) | For managing the Apparatus and method for of the equipment of two types | |
EP2154830B1 (en) | Network communication device and network communication method | |
CN103957593B (en) | wireless network access method, device and system | |
EP1058422A1 (en) | Methods for bridging a HAVi sub-network and a UPnP sub-network and device for implementing said methods | |
CN101843079A (en) | Communicating a selection of a potential configuration | |
KR20050015882A (en) | Apparatus for managing home-devices remotely in home-network and method thereof | |
CN104967560B (en) | Method and device for realizing linkage with gateway management equipment | |
US9667483B2 (en) | Method, gateway device and network system for configuring a device in a local area network | |
CN112221121A (en) | Application software networking acceleration method and device and storage medium | |
EP3139376A1 (en) | Voice recognition method, device, and system, and computer storage medium | |
CN107370648A (en) | The apparatus and method that the information connected for wireless network is provided using Wireless Fidelity | |
CN111741509A (en) | Network distribution method and device, storage medium and processor | |
CN111953550A (en) | Equipment network distribution method and device and Internet of things equipment | |
KR20110053819A (en) | Method and apparatus for providing pair play service | |
CN106302692A (en) | The discovery method and apparatus of equipment | |
CN107888711B (en) | Cross-network-segment equipment searching and communication method | |
CN105635200A (en) | Information processing method, electronic equipment, server and information processing system | |
WO2014015743A1 (en) | Method for downloading application program, user equipment and application server | |
JP4612427B2 (en) | Firmware and download system and method for communication terminal and program thereof | |
CN105933179B (en) | The method of multimedia terminal and push online unexpected message | |
JP4793797B2 (en) | Information processing apparatus, program, system, and method for displaying information according to type of electrical appliance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170104 |