WO2019165775A1 - Procédé de recherche d'équipement de réseau local et système de recherche - Google Patents
Procédé de recherche d'équipement de réseau local et système de recherche Download PDFInfo
- Publication number
- WO2019165775A1 WO2019165775A1 PCT/CN2018/104615 CN2018104615W WO2019165775A1 WO 2019165775 A1 WO2019165775 A1 WO 2019165775A1 CN 2018104615 W CN2018104615 W CN 2018104615W WO 2019165775 A1 WO2019165775 A1 WO 2019165775A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- slave device
- local area
- area network
- slave
- connection state
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 29
- 238000012360 testing method Methods 0.000 claims description 58
- 230000006854 communication Effects 0.000 claims description 32
- 238000004891 communication Methods 0.000 claims description 31
- 230000002159 abnormal effect Effects 0.000 claims description 7
- 230000001960 triggered effect Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000001514 detection method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- 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/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1061—Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
Definitions
- the invention belongs to the technical field of networks, and in particular relates to a search method and a search system for a local area network device.
- the existing IoT network is based on the Transmission Control Protocol (TCP) or the Internet Protocol (IP).
- TCP Transmission Control Protocol
- IP Internet Protocol
- the existing local area network device discovery protocol can be implemented, for example, a multicast domain name system (mDNS) protocol and universal plug and play (Universal). Plug and Play, UPnP) protocol, however, the existing LAN device discovery protocol has a complicated implementation process and cannot be compatible with many devices on the market, and has a problem of a small application range.
- mDNS multicast domain name system
- Universal plug and Play, UPnP universal plug and play
- the embodiment of the present invention provides a search method and system for a local area network device, so as to solve the problem that the implementation process of the local area network device discovery protocol is complicated and has a small application scope.
- a first aspect of the embodiments of the present invention provides a method for searching a local area network device, including:
- the master device detects the first preset instruction for searching for the slave device, acquiring the broadcast address of the local area network
- the slave device returns slave device information to the master device according to the device search request.
- a second aspect of the embodiments of the present invention provides a search system for a local area network device, including:
- a master device configured to acquire a broadcast address of a local area network if the first preset instruction for searching for the slave device is detected
- the master device is further configured to: send a device search request to a broadcast address of the local area network, so that the device search request is broadcasted in the local area network;
- the slave device is configured to return slave device information to the master device according to the device search request.
- the method for searching for a local area network device is provided by the embodiment of the present invention.
- the master device obtains the broadcast address of the local area network, and the master device sends the device search to the broadcast address of the local area network.
- the request is such that the device search request is broadcast in the local area network, and the slave device returns the slave device information according to the device search request to the master device, simplifying the search step of the local area network device.
- FIG. 1 is a schematic flowchart of implementing a search method of a local area network device according to an embodiment of the present invention
- FIG. 2 is a schematic flowchart of implementing a search method of a local area network device according to another embodiment of the present invention
- FIG. 3 is a schematic structural diagram of a search system of a local area network device according to an embodiment of the present invention.
- FIG. 1 it is a flow chart of implementing a search method of a local area network device according to an embodiment of the present invention.
- the search method of the local area network device is applicable to data interaction between multiple devices, wherein at least one of the plurality of devices includes at least one master device.
- the search method of the local area network device shown in FIG. 1 may include:
- the master device and the slave device are in the same local area network, and the local area network is a pre-created local area network, and the master device and the slave device respectively access the local area network through wired or wireless manner, and respectively serve as nodes in the local area network.
- the broadcast address is the address used to broadcast the information to be broadcast to each node in the local area network in the local area network where the broadcast device is located.
- the broadcast address is a reserved address for sending information to each node in the local area network.
- the content of the target address in the information header of the to-be-broadcast information is a broadcast address, the information may be Received by all nodes in the LAN.
- the master device performs a search operation on the slave device in the local area network, that is, realizes discovery between the devices in the local area network, and triggers the master device to search for the slave devices in the same local area network through the first preset instruction, thereby implementing the device.
- the master device detects the first preset instruction for searching for the slave device, it may include, but is not limited to, the following scenario.
- the device is configured to perform the device discovery period. If the current time is the cycle time point for device discovery, the first preset instruction for searching the slave device is triggered, so that the master device configuration detects the first preset command. .
- the master device After the current master device is connected to the local area network, the master device starts to work and acquires the current time. If the current time is the preset cycle time point, the first preset instruction for searching the slave device is triggered, and the first command is detected. When the preset command is received, the broadcast address of the local area network is obtained.
- the master device sends a device search request to a broadcast address of the local area network, so that the device search request is broadcasted in the local area network.
- the device search request is a User Datagram Protocol (UDP) broadcast packet
- the header content of the UDP broadcast packet includes: a device discovery command, a serial number, a device type, and an error code in a communication process.
- UDP User Datagram Protocol
- the UDP broadcast packet may adopt a JavaScript Object Notation (JSON) format, for example:
- JSON JavaScript Object Notation
- the device search request is used to discover a slave device in the local area network, which carries the information receiving port of the master device, and broadcasts the device search request to the local area network, so that the slave device in the local area network receives the device search request after receiving the device search request.
- the slave device information is returned to the information receiving port of the master device.
- S13 The slave device returns the slave device information to the master device according to the device search request.
- the slave device information is used to describe the slave device attributes, including information such as the IP address of the slave device, the communication port, and the device identifier.
- the slave information is the response information of the device search request, and the response information may be in a JSON format, for example:
- the slave device information describes the slave device attribute and is the response information of the device search request
- the master device when the master device receives the slave device information sent by the slave device, the master device can perform the search operation on the slave device in the local area network. .
- the communication port of the slave device may include multiple, and when data transmission or communication is performed with different master devices, communication ports with the same or different communication port numbers may be selected.
- the host device obtains the broadcast address of the local area network when the master device detects the first preset instruction for searching the slave device, and the master device sends the local area network to the local area network.
- the broadcast address transmitting device searches for a request to cause the device search request to be broadcast in the local area network, and the slave device returns the slave device information to the master device according to the device search request, simplifying the search step of the local area network device.
- the slave device information includes an internet protocol IP address, a communication port, and a connection state identifier of the slave device.
- the search method of the local area network device includes:
- the master device and the slave device are in the same local area network, and the local area network is a pre-created local area network, and the master device and the slave device respectively access the local area network through wired or wireless manner, and respectively serve as nodes in the local area network.
- the broadcast address is the address used to broadcast the information to be broadcast to each node in the local area network in the local area network where the broadcast device is located.
- the master device sends a device search request to a broadcast address of the local area network, so that the device search request is broadcasted in the local area network.
- step S22 specifically includes: the primary device creates a first user datagram protocol UDP socket based on the broadcast address, and describes the first UDP socket by using the first UDP socket.
- a port sends a connection status test request to the broadcast address.
- a socket is a handle of a communication chain used to implement communication between different virtual machines or different computers.
- the master device creates a first UDP socket based on the broadcast address, the first UDP socket is a UDP broadcast socket, used to describe a broadcast address (IP address), and the master device performs data interaction with the broadcast address.
- IP address broadcast address
- the master device sends a device search request to the broadcast address through the first port described by the first UDP socket.
- the existing SELECT character set needs to be cleared first, and the created UDP socket is added to the SELECT character set for information reception.
- S23 The slave device returns the slave device information to the master device according to the device search request.
- the master device generates a slave device list according to the slave device information, where data in the slave device list is used to describe the slave device, an IP address of the slave device, the communication port, and the connection state. The correspondence between the identifiers.
- the slave device list is used to reflect all the slave devices searched by the master device, wherein the slave device is in the same local area network as the master device.
- the IP address of the slave device is used to describe the node address of the slave device in the local area network
- the communication port is a communication port for the slave device to exchange information with the master device
- the connection forwarding identifier is used to describe the connection state between the slave device and the master device. , that is, the state of connection from the LAN.
- the master device sends a connection state test request to the IP addresses of all the slave devices in the slave device list in sequence if detecting a second preset instruction for testing the slave device connection state.
- connection status test request may be in a JSON format, for example:
- the master device After the slave device returns the slave device information to the master device according to the device search request, in order to be able to timely learn the connection state of the slave device and the local area network, the master device generates a slave device list according to the slave device information, and detects that the slave device is used for When the second preset instruction of the slave device connection state is tested, a connection state test request is sent to all the slave devices that are searched, and since the slave device lists the IP addresses of all the slave devices, the master device sequentially goes to the slave device. By sending a connection status test request to all the slave devices' IP addresses in the list, the connection status detection can be performed on all the slave devices that are searched.
- the second preset instruction for testing the connection state of the slave device is triggered by the master device.
- the test period of the device connection state is configured for the master device, and if the current time is the test cycle time point for performing the device connection state, the second preset instruction for testing the slave device connection state is triggered, so that the master The device configuration detects the second preset instruction.
- the second preset instruction may also be triggered by the tester when the tester performs debugging on the master device and the slave device in the local area network.
- step S25 specifically includes: the master device creates a second UDP socket based on an IP address of the slave device, and describes the second UDP socket by using the second UDP socket.
- the two ports send a connection status test request to the slave device.
- connection status test request carries the address information of the second port.
- each second UDP socket corresponds to an IP address of the slave device, and multiple seconds.
- the UDP sockets are unicast sockets.
- the master device sends the second port described by each second UDP socket to each slave device in the slave device list.
- the IP address sends a connection status test request.
- the slave device receives the connection state test request, and returns the target information to the master device through the communication port according to the connection state test request.
- step S26 the target information is used to describe that the connection state between the slave device and the local area is normal.
- the target information may be in a JSON format, for example:
- cmd describes the device discovery command
- seq is The serial number
- the content described by type is the device type
- the content described by error is the error code.
- the slave device When the slave device and the master device are in the same local area network, and the master device can exchange information based on the IP address in the local area network, the slave device can receive the connection state test request, and generate a target according to the connection state test request. The information is returned to the master device through the communication port; when the slave device is not in the same local area network as the master device, and the master device cannot exchange information based on the IP address in the local area network, the slave device cannot receive the connection state. Test request.
- the slave device By sequentially transmitting a connection status test request to the IP addresses of all the slave devices in the slave device list, if the slave device receives the connection state test request, the slave device returns the target information to the master device through the communication port according to the connection state test request.
- the master device After the master device is searched for the slave device in the local area network, it can update the online condition of the slave device in the local area network in time, that is, update the information of the searched local area network device in time.
- connection state test request carries the address information of the second port
- step S26 specifically includes: the slave device according to the address information, to the second through the communication port.
- the port returns the target information.
- connection status identifier is used to characterize the connection status between the slave device and the local area network.
- connection status identifier may be a specific value, where the value is used to describe the number of times the master device sends a connection status test request to the slave device.
- each slave device corresponds to one.
- a connection status identifier which is used to describe the number of times the master device sends a connection status test request to the slave device.
- the connection state test request is sequentially sent to the IP addresses of all the slave devices in the slave device list.
- the master device modifies the connection state identifier in the slave device list, that is, performs a subtraction operation on the value corresponding to the connection state identifier.
- the master device receives the target information, and the value represented by the connection status identifier is not 0, it determines that the connection status of the slave device is normal; when the master device does not receive the target information, and the value represented by the connection status identifier is 0, then It is determined that the connection status of the slave device is abnormal.
- the method may further include: when the master device does not receive the target information, listening to the second Whether the second port described by the UDP socket is enabled, if the second port is disabled, the second port is enabled to receive the target information; when the primary device does not receive the target information, and the second port is enabled, the connection status identifier is characterized When the value is 0, it is determined that the connection status of the slave device is abnormal.
- the host device obtains the broadcast address of the local area network when the master device detects the first preset instruction for searching the slave device, and the master device sends the local area network to the local area network.
- the broadcast address transmitting device searches for a request to cause the device search request to be broadcast in the local area network, and the slave device returns the slave device information to the master device according to the device search request, simplifying the search step of the local area network device.
- the slave device By sequentially transmitting a connection status test request to the IP addresses of all the slave devices in the slave device list, if the slave device receives the connection state test request, the slave device returns the target information to the master device through the communication port according to the connection state test request. After searching for the slave devices in the local area network, the master device can update the online status of the slave devices in the local area network in time, that is, timely update the information of the searched local area network devices.
- FIG. 3 is a schematic structural diagram of a search system of a local area network device according to an embodiment of the present invention.
- the search system 2 of the local area network device of the present embodiment includes: a master device 21 and a slave device cluster 22, wherein the slave device cluster 22 includes a plurality of slave devices 221.
- the master device 21 is configured to acquire a broadcast address of a local area network if the first preset instruction for searching for the slave device is detected.
- the master device 21 is further configured to send a device search request to a broadcast address of the local area network to cause the device search request to be broadcasted in the local area network.
- the slave device 221 is configured to return the slave device information to the master device according to the device search request.
- the slave device information includes an internet protocol IP address, a communication port, and a connection state identifier of the slave device.
- the master device 21 is further configured to generate, according to the slave device information, a slave device list, where the data in the slave device list is used to describe the slave device, the slave device Correspondence between the IP address of the device, the communication port, and the connection status identifier.
- the master device 21 is further configured to: if the second preset instruction for testing the connection state of the slave device is detected, send a connection state test request to the IP addresses of all the slave devices in the slave device list in sequence .
- the slave device 221 is further configured to: if the connection state test request is received, return the target information to the master device through the communication port according to the connection state test request.
- the master device 21 Upon receiving the target information, the master device 21 determines that the connection state of the slave device is normal.
- the master device 21 determines that the connection state of the slave device is abnormal.
- the master device 21 is specifically configured to: create a first user datagram protocol UDP socket based on the broadcast address, and describe the first UDP socket by using the first UDP socket A port sends a connection status test request to the broadcast address.
- the master device 21 is specifically configured to create a second UDP socket based on the IP address of the slave device, and describe the second UDP socket by using the second UDP socket.
- the two ports send a connection status test request to the slave device, where the connection status test request carries address information of the second port.
- the slave device 221 is specifically configured to return target information to the second port through the communication port according to the address information.
- the host device obtains the broadcast address of the local area network when the master device detects the first preset instruction for searching the slave device, and the master device sends the local area network to the local area network.
- the broadcast address transmitting device searches for a request to cause the device search request to be broadcast in the local area network, and the slave device returns the slave device information to the master device according to the device search request, simplifying the search step of the local area network device.
- the slave device By sequentially transmitting a connection status test request to the IP addresses of all the slave devices in the slave device list, if the slave device receives the connection state test request, the slave device returns the target information to the master device through the communication port according to the connection state test request.
- the master device After the master device is searched for the slave device in the local area network, it can update the online condition of the slave device in the local area network in time, that is, update the information of the searched local area network device in time.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
L'invention s'applique au domaine technique du réseau et concerne un procédé de recherche et un système de recherche d'équipement de réseau local (LAN). Le procédé de recherche de l'équipement de réseau local comprend les étapes suivantes : un équipement primaire acquiert une adresse de diffusion du LAN localisé lors de la détection d'une première instruction prédéfinie pour rechercher un équipement esclave ; l'équipement primaire envoie une demande de recherche d'équipement à une adresse de diffusion du LAN, ce qui permet à la demande de recherche d'équipement d'être diffusée dans le réseau local ; et l'équipement esclave renvoie des informations d'équipement esclave à l'équipement primaire selon la demande de recherche d'équipement, de telle sorte que l'étape de recherche de l'équipement LAN soit simplifiée.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810167835.4A CN108521437A (zh) | 2018-02-28 | 2018-02-28 | 一种局域网设备的搜索方法及搜索系统 |
CN201810167835.4 | 2018-02-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019165775A1 true WO2019165775A1 (fr) | 2019-09-06 |
Family
ID=63433320
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2018/104615 WO2019165775A1 (fr) | 2018-02-28 | 2018-09-07 | Procédé de recherche d'équipement de réseau local et système de recherche |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108521437A (fr) |
WO (1) | WO2019165775A1 (fr) |
Families Citing this family (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111294375B (zh) * | 2018-12-07 | 2022-11-25 | 浙江宇视科技有限公司 | 监控设备连接方法及装置 |
CN110351300A (zh) * | 2019-07-25 | 2019-10-18 | 深圳康佳电子科技有限公司 | Samba设备访问处理方法、主设备、系统及存储介质 |
CN111654394B (zh) * | 2020-05-26 | 2022-11-22 | 浙江大华技术股份有限公司 | 一种搜索设备的方法、装置、计算设备及存储介质 |
CN111835882B (zh) * | 2020-07-01 | 2023-03-03 | 上海橙群微电子有限公司 | 设备地址列表获取方法及网络设备、可读存储介质 |
CN111917902B (zh) * | 2020-08-10 | 2023-05-09 | 卡车司机(北京)科技有限公司 | 检测磅室设备故障的方法、设备和计算机可读存储介质 |
CN112261345A (zh) * | 2020-09-23 | 2021-01-22 | 厦门亿联网络技术股份有限公司 | 一种视频会议系统设备出厂自动配对联机方法 |
CN112311790A (zh) * | 2020-10-28 | 2021-02-02 | 深圳前海茂佳软件科技有限公司 | 多媒体终端确定方法、连接方法、测试终端以及存储介质 |
WO2022246803A1 (fr) * | 2021-05-28 | 2022-12-01 | 华为技术有限公司 | Procédé d'accès et appareil de communication |
CN113794994B (zh) * | 2021-08-26 | 2023-02-24 | 珠海格力电器股份有限公司 | 一种基于组播域名系统的信息集合方法、装置及其应用 |
CN117354161A (zh) * | 2023-09-25 | 2024-01-05 | 北京津发科技股份有限公司 | 一种基于虚拟现实模型的多终端通信方法和协同系统 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1547366A (zh) * | 2003-12-03 | 2004-11-17 | 何世刚 | 电子仪器仪表自动寻址方法及应用 |
CN1805395A (zh) * | 2005-01-11 | 2006-07-19 | 精工爱普生株式会社 | 无线局域网终端装置的检索方法、程序及使用该方法的检索系统 |
CN102413567A (zh) * | 2010-09-22 | 2012-04-11 | 株式会社山武 | 无线通信系统 |
US20140128122A1 (en) * | 2012-11-08 | 2014-05-08 | Samsung Electronics Co., Ltd. | Assistant method and system for retrieving wireless signals for mobile devices |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080232370A1 (en) * | 2007-03-20 | 2008-09-25 | Ching Hsiang Lee | Method of communication in LAN without setting IP |
CN101478775B (zh) * | 2009-01-20 | 2011-02-23 | 中兴通讯股份有限公司 | 一种多邻居连接状态的检测方法、系统和设备 |
CN106559288B (zh) * | 2016-11-23 | 2019-11-12 | 北京航天自动控制研究所 | 一种基于icmp报文的快速故障检测方法 |
-
2018
- 2018-02-28 CN CN201810167835.4A patent/CN108521437A/zh active Pending
- 2018-09-07 WO PCT/CN2018/104615 patent/WO2019165775A1/fr active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1547366A (zh) * | 2003-12-03 | 2004-11-17 | 何世刚 | 电子仪器仪表自动寻址方法及应用 |
CN1805395A (zh) * | 2005-01-11 | 2006-07-19 | 精工爱普生株式会社 | 无线局域网终端装置的检索方法、程序及使用该方法的检索系统 |
CN102413567A (zh) * | 2010-09-22 | 2012-04-11 | 株式会社山武 | 无线通信系统 |
US20140128122A1 (en) * | 2012-11-08 | 2014-05-08 | Samsung Electronics Co., Ltd. | Assistant method and system for retrieving wireless signals for mobile devices |
Also Published As
Publication number | Publication date |
---|---|
CN108521437A (zh) | 2018-09-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019165775A1 (fr) | Procédé de recherche d'équipement de réseau local et système de recherche | |
CN113630312B (zh) | 路径探测方法、装置、网络设备及计算机可读存储介质 | |
US9042272B2 (en) | Distributed proxy addressing operations | |
CA3010741A1 (fr) | Procede et systeme de contournement automatique de mandataires de reseau en presence de flux de trafic interdependants | |
JP5612468B2 (ja) | リアルタイム通信ネットワークにおける診断データの通信のための方法と装置 | |
US20180205644A1 (en) | Communication processing method and apparatus | |
CN104852840A (zh) | 一种控制虚拟机之间互访的方法及装置 | |
CN107113892A (zh) | 一种网关设备自动组网的方法及装置 | |
JP2010531602A5 (fr) | ||
CN105917617A (zh) | 针对校园网中的线路速率性能的单跳叠加架构 | |
JP5018969B2 (ja) | 通信制御プログラム、通信制御装置、通信制御システムおよび通信制御方法 | |
CN107888711B (zh) | 一种跨网段设备搜索及通讯方法 | |
CN106230667B (zh) | Vtep保活检测方法及装置 | |
US9893979B2 (en) | Network topology discovery by resolving loops | |
JP2008148243A (ja) | 通信装置、通信システム、通信方法及び通信プログラム | |
US10148515B2 (en) | Determining connections of non-external network facing ports | |
CN109842692B (zh) | 用于获得物理网络中主机信息的VxLAN交换机、系统和方法 | |
JP5333793B2 (ja) | トポロジ特定方法、及びトポロジ特定装置 | |
US20160344571A1 (en) | Determining Connections Between Disconnected Partial Trees | |
JP5190717B2 (ja) | トポロジ特定方法、及びトポロジ特定装置 | |
JP5673133B2 (ja) | Mpls−tp装置のmac探索システム及びmac探索方法 | |
US11283755B2 (en) | Method for identifying a communication node | |
JP2010098429A (ja) | ネットワークスイッチ装置、ネットワークスイッチ装置制御方法及びネットワークスイッチ装置制御プログラム | |
WO2015184979A1 (fr) | Procédés et dispositifs de traitement de paquet, d'envoi d'informations, et de réception d'informations | |
WO2015188706A1 (fr) | Procédé, dispositif et système de traitement de trame de données |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18908214 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 20/01/2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 18908214 Country of ref document: EP Kind code of ref document: A1 |