CN113098976B - IOT equipment network distribution method and device and computer storage medium - Google Patents

IOT equipment network distribution method and device and computer storage medium Download PDF

Info

Publication number
CN113098976B
CN113098976B CN202110424161.3A CN202110424161A CN113098976B CN 113098976 B CN113098976 B CN 113098976B CN 202110424161 A CN202110424161 A CN 202110424161A CN 113098976 B CN113098976 B CN 113098976B
Authority
CN
China
Prior art keywords
iot device
information
client
binding
target
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
CN202110424161.3A
Other languages
Chinese (zh)
Other versions
CN113098976A (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.)
Shenzhen Kangguan Technology Co ltd
Original Assignee
Shenzhen Kangguan 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 Shenzhen Kangguan Technology Co ltd filed Critical Shenzhen Kangguan Technology Co ltd
Priority to CN202110424161.3A priority Critical patent/CN113098976B/en
Publication of CN113098976A publication Critical patent/CN113098976A/en
Application granted granted Critical
Publication of CN113098976B publication Critical patent/CN113098976B/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
    • 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
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/08Access restriction or access information delivery, e.g. discovery data delivery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W48/00Access restriction; Network selection; Access point selection
    • H04W48/16Discovering, processing access restriction or access information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W84/00Network topologies
    • H04W84/02Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
    • H04W84/10Small scale networks; Flat hierarchical networks
    • H04W84/12WLAN [Wireless Local Area Networks]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application discloses a network distribution method and device for IOT equipment and a computer storage medium, which are used for improving a one-key configuration mode to better realize the idea of interconnection and intercommunication between Internet of things people and things. The embodiment of the application comprises the following steps: the user can trigger the client to add the IOT equipment, after the IOT equipment completes the distribution of the network, the user can also select to bind the target IOT equipment in at least one IOT equipment which is already distributed to the client, namely the user inputs a binding instruction to the client, the client sends a binding notification to the target IOT equipment according to the binding instruction of the user and sends a binding request to the server, and therefore the server binds the target IOT equipment to the client and completes the binding and the addition of the IOT equipment. Therefore, the user as a real control party of the Internet of things system participates in the distribution network and binding process of the IOT equipment, the interconnection of people and objects is embodied, and the idea of interconnection and intercommunication of people and objects in the Internet of things is better realized.

Description

IOT equipment network distribution method and device and computer storage medium
Technical Field
The embodiment of the application relates to the field of Internet of things, in particular to a network distribution method and device for IOT equipment and a computer storage medium.
Background
The Internet of things (IOT) is a network that extends and expands on The basis of The Internet, and combines various information sensing devices with The Internet to form a huge network, thereby realizing The interconnection and intercommunication of people, machines and objects at any time and any place.
The first step in constructing the internet of things is the networking of the IOT devices. The IOT equipment receives the Wi-Fi information sent by the client and is connected to the router according to the Wi-Fi information, and the process is called distribution network. The Wi-Fi information includes the name and password of the router, i.e., SSID and password.
Specifically, the IOT device distribution network may have multiple implementations. One mode is that the IOT device sends Access Point information (AP), the client scans AP information of the peripheral device to obtain AP information of the IOT device, and establishes a communication connection with the IOT device according to the AP information of the IOT device, and the client may send Wi-Fi information to the IOT device. Otherwise, the client sends the AP information, and the IOT device establishes a communication connection with the client according to the AP information of the client.
The other mode is a one-key configuration mode, namely the client and the IOT equipment do not need to establish communication connection, the client only needs to write the Wi-Fi information into a data packet and circularly sends the data packet in a multicast or broadcast mode, the IOT equipment monitors the data packet in the network environment in real time to obtain the data packet, analyzes the data packet to obtain the Wi-Fi information, and then performs network distribution according to the analyzed Wi-Fi information.
Therefore, the one-key configuration mode is more convenient and faster and simpler to operate compared with the traditional mode of carrying out distribution according to AP information because the one-key configuration mode does not need to establish communication connection.
Although the network distribution of the IOT device can be conveniently realized by the one-key configuration mode, a real control party of the whole network distribution process does not participate in the network distribution process, and the interconnection of people and objects is not embodied, and the final purpose of the internet of things is to realize the interconnection and intercommunication of people and objects, so that the idea of improving the one-key configuration mode to better realize the interconnection and intercommunication of people and objects of the internet of things is urgently needed.
Disclosure of Invention
The embodiment of the application provides a network distribution method and device of IOT equipment and a computer storage medium, which are used for improving a one-key configuration mode so as to better realize the idea of interconnection and intercommunication between Internet of things people and things.
The first aspect of the embodiment of the application provides a network distribution method for IOT equipment, wherein the method is applied to a client, and the client and a server establish communication connection; the method comprises the following steps:
responding to a trigger instruction for adding IOT equipment input by a user, and acquiring Wi-Fi information of the router;
generating a UDP message including the Wi-Fi information, and sending the UDP message;
receiving response information returned by at least one IOT device when monitoring that the UDP message is received and the router is connected according to Wi-Fi information in the UDP message, and establishing UDP communication with the at least one IOT device based on the response information;
receiving device information sent by the at least one IOT device through UDP communication with the at least one IOT device, wherein each piece of the device information uniquely corresponds to one IOT device;
responding to a binding instruction of the user to a target IOT device in the at least one IOT device, and sending a binding notification to the target IOT device through UDP communication with the target IOT device, so that the target IOT device initializes functional data according to the binding notification and reports the initialized functional data to the server;
sending a binding request for the target IOT device to the server, wherein the binding request comprises the device information of the target IOT device, so that the server binds the target IOT device to the client according to the device information of the target IOT device.
A second aspect of the present application provides a network distribution method for IOT devices, where the method is applied to a target IOT device, and the method includes:
responding to a trigger instruction for entering a distribution network mode, which is input by a user, and monitoring and receiving a UDP message generated by a client, wherein the UDP message comprises Wi-Fi information of a router, which is obtained by the client responding to the trigger instruction for adding the IOT equipment, which is input by the user;
connecting the router according to Wi-Fi information in the UDP message, returning response information to the client, and establishing UDP communication with the client based on the response information;
sending device information of the target IOT device to the client through UDP communication with the client;
when a binding notification sent by the client end responding to the binding instruction of the user to the target IOT equipment is received, functional data are initialized according to the binding notification and the initialized functional data are reported to a server end;
receiving a binding result obtained by the server processing a binding request of the client, where the binding request is used to request that the target IOT device is bound to the client, and the binding request includes device information of the target IOT device.
A third aspect of the embodiments of the present application provides a network distribution device for IOT devices, where the device is applied to a client, and the client establishes a communication connection with a server; the device comprises:
the acquisition unit is used for responding to a trigger instruction for adding the IOT equipment input by a user and acquiring Wi-Fi information of the router;
a generating unit, configured to generate a UDP packet including the Wi-Fi information, and send the UDP packet;
a receiving unit, configured to receive response information returned by at least one IOT device when monitoring that the UDP packet is received and connecting to the router according to Wi-Fi information in the UDP packet;
a communication unit to establish a UDP communication with the at least one IOT device based on the response information;
the receiving unit is further configured to receive device information sent by the at least one IOT device through UDP communication with the at least one IOT device, where each piece of device information uniquely corresponds to one IOT device;
a sending unit, configured to send, in response to a binding instruction of the user to a target IOT device in the at least one IOT device, a binding notification to the target IOT device through UDP communication with the target IOT device, so that the target IOT device initializes functional data according to the binding notification and reports the initialized functional data to the server;
the sending unit is further configured to send, to the server, a binding request for the target IOT device, where the binding request includes the device information of the target IOT device, so that the server binds the target IOT device to the client according to the device information of the target IOT device.
A fourth aspect of the present embodiment provides an IOT device network distribution apparatus, where the apparatus is applied to a target IOT device, and the apparatus includes:
the system comprises a receiving unit, a distribution network mode switching unit and a distribution network mode switching unit, wherein the receiving unit is used for responding to a triggering instruction which is input by a user and enters a distribution network mode, monitoring and receiving a UDP message generated by a client, and the UDP message comprises Wi-Fi information of a router, which is obtained by the client responding to the triggering instruction which is input by the user and is added with an IOT device;
the communication unit is used for connecting the router according to the Wi-Fi information in the UDP message;
the sending unit is used for returning response information to the client;
the communication unit is further used for establishing UDP communication with the client based on the response information;
the sending unit is further configured to send device information of the target IOT device to the client through UDP communication with the client;
the initialization unit is used for initializing functional data according to the binding notification and reporting the initialized functional data to a server when receiving the binding notification sent by the client in response to the binding instruction of the user to the target IOT device;
the receiving unit is further configured to receive a binding result obtained by the server processing a binding request of the client, where the binding request is used to request that the target IOT device is bound to the client, and the binding request includes device information of the target IOT device.
A fifth aspect of the embodiment of the present application provides a network distribution device for IOT equipment, where the device is applied to a client, and the client establishes a communication connection with a server; the device comprises:
the system comprises a processor, a memory, a bus and input and output equipment;
the processor is connected with the memory and the input and output equipment;
the bus is respectively connected with the processor, the memory and the input and output equipment;
the memory stores a computer program which, when executed by the processor, implements the method of the first aspect.
A sixth aspect of the present embodiment provides an IOT device network distribution apparatus, where the apparatus is applied to a target IOT device, and the apparatus includes:
the system comprises a processor, a memory, a bus and input and output equipment;
the processor is connected with the memory and the input and output equipment;
the bus is respectively connected with the processor, the memory and the input and output equipment;
the memory stores a computer program which, when executed by the processor, implements the method of the second aspect described above.
A seventh aspect of embodiments of the present application provides a computer storage medium, in which instructions are stored, and when executed on a computer, the instructions cause the computer to perform the method of the foregoing first aspect.
An eighth aspect of embodiments of the present application provides a computer storage medium having instructions stored therein, which when executed on a computer, cause the computer to perform the method of the foregoing second aspect.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, a user can trigger a client to add an IOT device, after the IOT device completes distribution of the network, the user can also select to bind a target IOT device in at least one IOT device which has been distributed to the client, namely the user inputs a binding instruction to the client, the client sends a binding notification to the target IOT device and sends a binding request to a server according to the binding instruction of the user, so that the server binds the target IOT device to the client, and binding and adding of the IOT device are completed. Therefore, the user as a real control party of the Internet of things system participates in the distribution network and binding process of the IOT equipment, the interconnection of people and objects is embodied, and the idea of interconnection and intercommunication of people and objects in the Internet of things is better realized.
Drawings
Fig. 1 is a schematic flow chart of a network distribution method for IOT devices in an embodiment of the present application;
fig. 2 is another schematic flow chart of a network distribution method of the IOT device in the embodiment of the present application;
fig. 3 is another schematic flow diagram illustrating a network distribution method for IOT devices in the embodiment of the present application;
fig. 4 is a schematic structural diagram of a distribution network device of the IOT device in the embodiment of the present application;
fig. 5 is another schematic structural diagram of a distribution network device of an IOT device in the embodiment of the present application;
fig. 6 is a schematic structural diagram of another network distribution device of the IOT device in the embodiment of the present application;
fig. 7 is another schematic structural diagram of a network distribution device of an IOT device in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a network distribution method and device of IOT equipment and a computer storage medium, which are used for improving a one-key configuration mode so as to better realize the idea of interconnection and intercommunication between Internet of things people and things.
Referring to fig. 1, an embodiment of a network distribution method for IOT devices in the embodiment of the present application includes:
101. responding to a trigger instruction for adding IOT equipment input by a user, and acquiring Wi-Fi information of the router;
the method of the embodiment can be applied to a client, the client is in communication connection with a server in an internet environment, the client can be associated and bound with internet of things equipment, namely IOT equipment, in an internet of things system under the triggering of a user, the server can be deployed at a cloud end to serve as a cloud platform in the internet of things system, and the server can serve as an information storage platform of the internet of things system and provide a function of binding the IOT equipment for the client.
When a user needs to add an IOT device in the IOT system to an associated device of a client, the user can input a trigger instruction on a device adding page displayed by the client, wherein the trigger instruction is used for triggering the client to execute the operation of adding the IOT device. And after receiving the trigger instruction, the client acquires the Wi-Fi information of the router. The Wi-Fi information of the router includes the name and password of the router, i.e., SSID and password.
102. Generating a UDP message including Wi-Fi information, and sending out the UDP message;
in order to enable the IOT equipment to be connected to a local area network where a client is located, after obtaining the Wi-Fi information of the router, the client generates a UDP message comprising the Wi-Fi information of the router and sends out the UDP message in a multicast or broadcast mode. Meanwhile, the IOT equipment enters a distribution network mode under the trigger of a user, the IOT equipment in the distribution network mode starts a promiscuous mode to monitor data in a network environment in real time, when a client sends a UDP message, the IOT equipment can monitor and receive the UDP message, and then the IOT equipment is connected to a router according to Wi-Fi information in the UDP message, so that the distribution network of the IOT equipment is realized.
103. Receiving response information returned by the at least one IOT device when monitoring that the UDP message is received and the router is connected according to the Wi-Fi information in the UDP message, and establishing UDP communication with the at least one IOT device based on the response information;
after sending the UDP message, if at least one IOT device receives the UDP message and is connected to the router according to the Wi-Fi information in the UDP message, the at least one IOT device returns response information to the client, the client receives the response information returned by the at least one IOT device, and UDP communication with the at least one IOT device is established based on the response information.
104. Receiving device information transmitted by the at least one IOT device through UDP communication with the at least one IOT device;
after establishing the UDP communication with each IOT device, the client receives the device information sent by each IOT device through the UDP communication with each IOT device.
In this embodiment, the device information of the IOT device includes any information related to the IOT device, and specifically may include triplet information of the IOT device, that is, the device type, the unique identifier of the device, and the token. Therefore, the device information of the IOT device may be used to uniquely identify the IOT device, and the client may distinguish the IOT device corresponding to the device information according to the device information.
105. Responding to a binding instruction of a user to a target IOT device in at least one IOT device, and sending a binding notification to the target IOT device through UDP communication with the target IOT device;
after the IOT device is connected to the network, the user may select to bind the target IOT device of the at least one IOT device to the client, that is, the user inputs a binding instruction to the client, and the client responds to the binding instruction and sends a binding notification to the target IOT device through UDP communication with the target IOT device, so that the target IOT device initializes the functional data and reports the initialized functional data to the server according to a prompt of the binding notification.
Wherein the functionality data of the IOT device includes data describing functionality of the IOT device. For example, if the IOT device is a desk lamp, the functional data may include data such as illumination brightness and illumination color; if the IOT device is an air conditioner, the functional data may include temperature, wind direction, wind force magnitude, and the like.
106. Sending a binding request for the target IOT equipment to the server side, so that the server side binds the target IOT equipment to the client side according to the equipment information of the target IOT equipment;
the client sends a binding request for the target IOT device to the server while sending the binding notification to the target IOT device, wherein the binding request comprises the device information of the target IOT device, so that the server can bind the target IOT device to the client according to the device information of the target IOT device, establish the association relationship between the target IOT device and the client and complete the addition of the IOT device.
In this embodiment, a user may trigger a client to add an IOT device, and after the IOT device completes a network distribution, the user may further select to bind a target IOT device in at least one IOT device that has been configured to the client, that is, the user inputs a binding instruction to the client, and the client sends a binding notification to the target IOT device and sends a binding request to the server according to the binding instruction of the user, so that the server binds the target IOT device to the client, and completes the binding and addition of the IOT device. Therefore, the user as a real control party of the Internet of things system participates in the distribution network and binding process of the IOT equipment, the interconnection of people and objects is embodied, and the idea of interconnection and intercommunication of people and objects of the Internet of things is better realized.
The IOT device network distribution method in the embodiment of the present application is described above from the perspective of the client, and the embodiment of the present application will be further described below from the perspective of the IOT device. Referring to fig. 2, an embodiment of a network distribution method for IOT devices in the embodiment of the present application includes:
201. responding to a triggering instruction for entering a distribution network mode input by a user, and monitoring and receiving a UDP message generated by a client;
when a user needs to add a target IOT device, the user actively triggers the client and the target IOT device to execute a device adding process. For the target IOT device, the target IOT device needs to enter a distribution network mode under a trigger instruction of a user, the target IOT device starts a promiscuous mode to monitor data in a network environment, and can monitor and receive UDP messages generated and sent by a client, where the UDP messages include Wi-Fi information of a router, which is obtained by the client in response to the trigger instruction for adding the IOT device, input by the user.
202. Connecting the router according to the Wi-Fi information in the UDP message, returning response information to the client, and establishing UDP communication with the client based on the response information;
the target IOT equipment is connected to the router according to the Wi-Fi information in the UDP message, so that the distribution network of the target IOT equipment is achieved, response information is returned to the client, and UDP communication with the client is established based on the response information.
203. Transmitting device information of the target IOT device to the client through UDP communication with the client;
to facilitate the client identifying and distinguishing the IOT devices, after establishing the UDP communication, the target IOT device sends device information for the target IOT device to the client via UDP communication with the client.
204. When a binding notification sent by a client in response to a binding instruction of a user to a target IOT device is received, functional data are initialized according to the binding notification and the initialized functional data are reported to a server;
when the target IOT device is determined by the user to be bound to the client, the client sends a binding notification to the target IOT device according to the binding instruction of the user, and the target IOT device initializes the functional data of the target IOT device according to the indication of the binding notification and reports the initialized functional data to the server.
205. Receiving a binding result obtained by processing a binding request of a client by a server;
the target IOT device receives a binding result obtained by the server processing the binding request of the client, and may determine whether the target IOT device is successfully bound to the client according to the binding result. The binding request is used for requesting the target IOT equipment to be bound to the client, the binding request comprises equipment information of the target IOT equipment, and the server can determine the IOT equipment which needs to be bound by the client according to the equipment information carried by the binding request.
In this embodiment, a user may trigger a target IOT device to enter a network distribution mode, and after the target IOT device completes network distribution, the user may further select to bind the target IOT device that has been distributed to a client, that is, the target IOT device receives a binding notification sent by the client in response to a binding instruction of the user, initializes functional data according to the binding notification and reports the initialized functional data to a server, so that the server binds the target IOT device to the client, and completes binding and adding of the target IOT device. Therefore, the user as a real control party of the Internet of things system participates in the distribution network and binding process of the IOT equipment, the interconnection of people and objects is embodied, and the idea of interconnection and intercommunication of people and objects of the Internet of things is better realized.
The embodiments of the present application will be described in further detail below on the basis of the embodiments shown in fig. 1 and 2. Referring to fig. 3, another embodiment of a network distribution method for IOT devices in the embodiment of the present application includes:
301. the method comprises the steps that a client responds to a trigger instruction for adding IOT equipment, which is input by a user, obtains Wi-Fi information of a router, and generates a UDP message comprising the Wi-Fi information;
302. the client sends out a UDP message;
the operations performed in steps 301 to 302 are similar to the operations performed in steps 101 to 102 in the embodiment shown in fig. 1, and are not repeated herein.
303. The target IOT equipment is connected with the router according to the Wi-Fi information in the UDP message;
the operation performed in this step is similar to the operation performed in step 202 in the embodiment shown in fig. 2, and is not repeated here.
304. The method comprises the steps that a client receives response information returned by at least one IOT device when monitoring that a UDP message is received and the router is connected according to Wi-Fi information in the UDP message;
in this embodiment, the client sends out a UDP packet in a broadcast or multicast manner, and when at least one IOT device monitors and receives the UDP packet and connects to the router according to Wi-Fi information in the UDP packet, the at least one IOT device returns response information to the client. The at least one IOT device includes a target IOT device.
Specifically, the response message may include a UDP packet sent back by the IOT device and information indicating that the IOT device has successfully connected to the router.
305. The client establishes UDP communication with the at least one IOT device based on the response information;
after receiving the response information, the client establishes UDP communication with the at least one IOT device based on the response information.
306. The target IOT equipment sends equipment information of the target IOT equipment to the client through UDP communication with the client;
after establishing the UDP communication with the at least one IOT device, the client sends a first packet to each IOT device through the UDP communication with each IOT device, where the first packet is used to request to obtain device information of the IOT device. Each IOT device (including the target IOT device) that receives the first packet, in response to the first packet, returns a second packet to the client via UDP communication with the client, the second packet including device information for the IOT device.
307. The client responds to a binding instruction of a user to a target IOT device in at least one IOT device and sends a binding notification to the target IOT device through UDP communication with the target IOT device;
after receiving the device information of at least one IOT device, the client may present the device information of the plurality of IOT devices to the user, so that the user selects one or more IOT devices among the plurality of IOT devices to bind and add according to the device information. Specifically, the client may display an equipment information list to the user, where the equipment information list includes equipment information of at least one IOT equipment, the user may select a target IOT equipment that needs to be bound on the equipment information list, that is, the user inputs a selection operation on the equipment information of the target IOT equipment on the equipment information list, the client determines that the user needs to bind the target IOT equipment according to the selection operation of the user, generates a binding instruction of the user to the target IOT equipment, and then responds to the binding instruction, and sends a binding notification to the target IOT equipment through UDP communication with the target IOT equipment.
Therefore, through the above manner, the user can select the IOT device to be bound in the device information list, so that the user can better participate in the distribution network and the binding process of the IOT device.
308. The target IOT equipment initializes the functional data according to the binding notification;
309. the target IOT equipment reports the initialized functional data to a server;
the target IOT equipment initializes the functional data and reports the initialized functional data to the server, so that the server can synchronize and store the initialized functional data, and the client can acquire the initialized functional data of the target IOT equipment from the server and adjust the functional data of the target IOT equipment according to the actual use requirement of the target IOT equipment.
310. The client sends a binding request for the target IOT equipment to the server;
311. the server binds the target IOT equipment to the client according to the equipment information of the target IOT equipment;
the client side informs the target IOT equipment of initializing functional data, and also needs to send a binding request for the target IOT equipment to the server side, so that the server side determines that the target IOT equipment needs to be bound by a user according to equipment information carried by the binding request, and further binds the target IOT equipment to the client side, namely, the association relationship and the binding relationship between the target IOT equipment and the client side are established, and the binding and the adding of the target IOT equipment are completed.
312. The target IOT equipment receives a binding result obtained by a server side processing a binding request of a client side;
313. the client receives a binding result obtained by the server processing the binding request;
after the binding is finished, the server returns the binding information obtained by processing the binding request of the client to the client and the target IOT device respectively, and extracts the binding result from the binding information, so that the client and the target IOT device can determine whether the binding is successful according to the binding result.
When the binding result indicates that the target IOT device is successfully bound to the client, the client sends reset information to other IOT devices which are not requested to be bound in at least one IOT device of the distributed network, so that the other IOT devices can reset the current state of the distributed network to the state to be distributed according to the prompt of the reset information, namely, the other IOT devices reenter the distribution network mode to wait for the next distribution network.
Similarly, when the target IOT device does not receive the binding notification, the client also sends reset information to the target IOT device, and the target IOT device resets the current state of the distributed network to the state to be distributed according to the prompt of the reset information, and enters the network distribution mode.
In addition, when any IOT device (including the target IOT device) of the distributed network encounters an abnormal condition and cannot be connected to the network, the IOT device also performs resetting, namely the current distributed network state is reset to the to-be-distributed state, the distribution network mode is entered, and the next distribution network is waited. Or, when the binding result received by the target IOT device indicates that the target IOT device is unsuccessfully bound to the client, the target IOT device also performs resetting, resets the current state of the distributed network to the state to be distributed, and reenters the distribution network mode.
The IOT device may count the number of times of the reset operation under the above-mentioned various situations, and report the number of times of the reset operation to the server when the network is distributed and the functional data is initialized next time. In addition, the server may also determine whether the binding relationship between the IOT device and the client changes, and when the binding relationship between the IOT device and the client changes, for example, the client to which the IOT device is bound is changed from an a client to a B client, the server needs to update and reset the binding relationship between the IOT device and the client, so as to synchronize the current device binding situation.
In this embodiment, the user may select the IOT device to be bound through the device information list, and the user may better participate in the distribution network and the adding process of the IOT device.
The network distribution method for the IOT devices in the embodiment of the present application is described above, and referring to fig. 4, a network distribution device for the IOT devices in the embodiment of the present application is described below, where an embodiment of a network distribution device for the IOT devices in the embodiment of the present application includes:
the device is applied to a client, and the client establishes communication connection with a server; the device includes:
an obtaining unit 401, configured to respond to a trigger instruction for adding an IOT device, input by a user, and obtain Wi-Fi information of a router;
a generating unit 402, configured to generate a UDP packet including the Wi-Fi information, and send out the UDP packet;
a receiving unit 403, configured to receive response information returned by at least one IOT device when monitoring that a UDP packet is received and connecting to a router according to Wi-Fi information in the UDP packet;
a communication unit 404 for establishing UDP communication with the at least one IOT device based on the response information;
the receiving unit 403 is further configured to receive device information sent by the at least one IOT device through UDP communication with the at least one IOT device, where each device information uniquely corresponds to one IOT device;
a sending unit 405, configured to send, in response to a binding instruction of a user to a target IOT device in the IOT devices, a binding notification to the target IOT device through UDP communication with the target IOT device, so that the target IOT device initializes functional data according to the binding notification and reports the initialized functional data to a server;
the sending unit 405 is further configured to send a binding request for the target IOT device to the server, where the binding request includes device information of the target IOT device, so that the server binds the target IOT device to the client according to the device information of the target IOT device.
In a preferred implementation manner of this embodiment, the sending unit 405 is specifically configured to display an equipment information list to a user, where the equipment information list includes equipment information of at least one IOT device; responding to the selection operation of the user for selecting the equipment information of the target IOT equipment on the equipment information list, and generating a binding instruction of the user to the target IOT equipment according to the selection operation; in response to the binding instruction, a binding notification is sent to the target IOT device via UDP communication with the target IOT device.
In a preferred implementation manner of this embodiment, the receiving unit 403 is further configured to receive binding information obtained by processing the binding request at the server, and obtain a binding result included in the binding information;
the sending unit 405 is further configured to send reset information to other IOT devices that are not requested to be bound in the at least one IOT device when the binding result indicates that the target IOT device is successfully bound to the client, so that the other IOT devices reset the current distribution network state to the to-be-distributed network state according to the reset information.
In a preferred implementation manner of this embodiment, the receiving unit 403 is specifically configured to send a first message to each IOT device through UDP communication with each IOT device, where the first message is used to request to acquire device information of the IOT device; and receiving a second message returned by each IOT device in response to the first message through UDP communication with each IOT device, wherein the second message comprises the device information of the IOT device.
In this embodiment, operations performed by each unit in the IOT device network configuration apparatus are similar to the operations performed by the client described in the embodiments shown in fig. 1 and fig. 3, and are not described again here.
In this embodiment, a user may trigger a client to add an IOT device, and after the IOT device completes a network distribution, the user may further select to bind a target IOT device in at least one IOT device that has been distributed to the client, that is, the user inputs a binding instruction to the client, and the sending unit 405 sends a binding notification to the target IOT device and sends a binding request to the server according to the binding instruction of the user, so that the server binds the target IOT device to the client, and completes the binding and the addition of the IOT device. Therefore, the user as a real control party of the Internet of things system participates in the distribution network and binding process of the IOT equipment, the interconnection of people and objects is embodied, and the idea of interconnection and intercommunication of people and objects of the Internet of things is better realized.
Referring to fig. 5, a description is provided below of an IOT device network distribution apparatus applied to a client in an embodiment of the present application, where an embodiment of the IOT device network distribution apparatus in the embodiment of the present application includes:
the IOT device network configuration apparatus 500 may include one or more Central Processing Units (CPUs) 501 and a memory 505, where one or more applications or data are stored in the memory 505.
Memory 505 may be volatile storage or persistent storage, among others. The program stored in memory 505 may include one or more modules, each of which may include a series of instruction operations on IOT devices in a network configuration arrangement. Still further, the central processor 501 may be configured to communicate with the memory 505 to execute a series of instruction operations in the memory 505 on the IOT device distribution network apparatus 500.
The IOT device network configuration apparatus 500 may also include one or more power supplies 502, one or more wired or wireless network interfaces 503, one or more input-output interfaces 504, and/or one or more operating systems, such as Windows server, mac OS XTM, unix, linux, freeBSDTM, etc.
The central processing unit 501 may perform the operations performed by the client in the embodiments shown in fig. 1 and fig. 3, which are not described herein again.
In the above description of the IOT device network distribution apparatus applied to the client in the embodiment of the present application, referring to fig. 6, the IOT device network distribution apparatus applied to the target IOT device in the embodiment of the present application is described below, and another embodiment of the IOT device network distribution apparatus in the embodiment of the present application includes:
a receiving unit 601, configured to monitor and receive a UDP packet generated by a client in response to a trigger instruction for entering a distribution network mode, where the UDP packet includes Wi-Fi information of a router, which is obtained by the client in response to the trigger instruction for adding an IOT device, the trigger instruction being input by a user;
a communication unit 602, configured to connect to a router according to Wi-Fi information in the UDP packet;
a sending unit 603, configured to return response information to the client;
the communication unit 602 is further configured to establish UDP communication with the client based on the response information;
the sending unit 603 is further configured to send device information of the target IOT device to the client through UDP communication with the client;
an initializing unit 604, configured to, when receiving a binding notification sent by a client in response to a binding instruction of a user to a target IOT device, initialize functional data according to the binding notification and report the initialized functional data to a server;
the receiving unit 601 is further configured to receive a binding result obtained by processing, by the server, a binding request of the client, where the binding request is used to request that the target IOT device is bound to the client, and the binding request includes device information of the target IOT device.
In a preferred implementation manner of this embodiment, the receiving unit 601 is further configured to receive reset information sent by the client when the binding notification is not received;
the device also includes:
the resetting unit 605 is configured to reset the current distribution network state to a to-be-distributed network state according to the resetting information, and enter a distribution network mode.
In a preferred implementation manner of this embodiment, the resetting unit 605 is further configured to, when the target IOT device cannot be connected to the network, or when the binding result indicates that the target IOT device is not successfully bound to the client, reset the current state of the distributed network to the state to be distributed, and enter the distribution network mode.
In a preferred implementation manner of this embodiment, the sending unit 603 is specifically configured to receive a first message sent by a client through UDP communication, where the first message is used to request to acquire device information of a target IOT device; and responding to the first message, and returning a second message to the client through UDP communication with the client, wherein the second message comprises the equipment information of the target IOT equipment.
In this embodiment, operations performed by each unit in the IOT device network distribution apparatus applied to the target IOT device are similar to the operations performed by the target IOT device described in the embodiments shown in fig. 2 and fig. 3, and are not repeated here.
In this embodiment, a user may trigger a target IOT device to enter a network distribution mode, and after the target IOT device completes network distribution, the user may further select to bind the target IOT device that has been distributed to a client, that is, the target IOT device receives a binding notification sent by the client in response to a binding instruction of the user, and the initialization unit 604 initializes functional data according to the binding notification and reports the initialized functional data to a server, so that the server binds the target IOT device to the client, and completes binding and adding of the target IOT device. Therefore, the user as a real control party of the Internet of things system participates in the distribution network and binding process of the IOT equipment, the interconnection of people and objects is embodied, and the idea of interconnection and intercommunication of people and objects in the Internet of things is better realized.
Referring to fig. 7, a description is provided below of an IOT device network distribution apparatus applied to a target IOT device in an embodiment of the present application, where an embodiment of the IOT device network distribution apparatus in the embodiment of the present application includes:
the IOT device distribution network apparatus 700 may include one or more Central Processing Units (CPUs) 701 and a memory 705, where the memory 705 stores one or more applications or data.
The memory 705 may be volatile storage or persistent storage, among others. The program stored in the memory 705 may include one or more modules, each of which may include a sequence of instruction operations for the IOT device to configure the network apparatus. Still further, the central processor 701 may be configured to communicate with the memory 705, and execute a series of instruction operations in the memory 705 on the IOT device distribution network apparatus 700.
The IOT device distribution network apparatus 700 may also include one or more power supplies 702, one or more wired or wireless network interfaces 703, one or more input-output interfaces 704, and/or one or more operating systems, such as Windows server, mac OS XTM, unix, linux, freeBSDTM, etc.
The central processing unit 701 may execute the operations executed by the target IOT device in the embodiments shown in fig. 2 to fig. 3, which are not described herein again.
It can be clearly understood by those skilled in the art that, for convenience and simplicity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, which are essential or part of the technical solutions contributing to the prior art, or all or part of the technical solutions, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like.

Claims (10)

1. The IOT equipment network distribution method is characterized in that the method is applied to a client side, and the client side and a server side are in communication connection; the method comprises the following steps:
responding to a trigger instruction for adding IOT equipment input by a user, and acquiring Wi-Fi information of the router;
generating a UDP message including the Wi-Fi information, and sending the UDP message;
receiving response information returned by at least one IOT device when monitoring that the UDP message is received and the router is connected according to Wi-Fi information in the UDP message, and establishing UDP communication with the at least one IOT device based on the response information;
receiving device information sent by the at least one IOT device through UDP communication with the at least one IOT device, wherein each piece of the device information uniquely corresponds to one IOT device;
responding to a binding instruction of the user to a target IOT device in the at least one IOT device, and sending a binding notification to the target IOT device through UDP communication with the target IOT device, so that the target IOT device initializes functional data according to the binding notification and reports the initialized functional data to the server; the functional data comprises data describing a function of the IOT device;
sending a binding request for the target IOT device to the server, wherein the binding request comprises device information of the target IOT device, so that the server binds the target IOT device to the client according to the device information of the target IOT device;
when any IOT device cannot be connected to the network, the client side sends reset information to the IOT device which cannot be connected to the network, so that the IOT device which cannot be connected to the network executes reset operation according to the reset information, and reports the number of times of the reset operation to the server side when the next distribution network is carried out, wherein the reset operation is to reset the current distributed network state to a to-be-distributed network state.
2. The method of claim 1, wherein sending a binding notification to a target IOT device in the at least one IOT device in response to a binding instruction by the user for the target IOT device via UDP communication with the target IOT device comprises:
displaying a device information list to the user, the device information list including device information of the at least one IOT device;
responding to the selection operation of the user for selecting the equipment information of the target IOT equipment on the equipment information list, and generating a binding instruction of the user to the target IOT equipment according to the selection operation;
in response to the binding instruction, sending a binding notification to the target IOT device via UDP communication with the target IOT device.
3. The method of claim 1, wherein after sending the binding request for the target IOT device to the server, the method further comprises:
receiving binding information obtained by the server processing the binding request, and obtaining a binding result included in the binding information;
when the binding result indicates that the target IOT device is successfully bound to the client, sending reset information to other IOT devices which are not requested to be bound in the at least one IOT device, so that the other IOT devices reset the current distribution network state to a to-be-distributed network state according to the reset information.
4. The method of claim 1, wherein the receiving device information sent by the at least one IOT device via UDP communication with the at least one IOT device comprises:
respectively sending a first message to each IOT device through UDP communication with each IOT device, wherein the first message is used for requesting to acquire device information of the IOT device;
and receiving a second message returned by each IOT device in response to the first message through UDP communication with each IOT device, wherein the second message comprises the device information of the IOT device.
5. An IOT device network distribution method is applied to a target IOT device, and comprises the following steps:
responding to a trigger instruction for entering a distribution network mode, which is input by a user, and monitoring and receiving a UDP message generated by a client, wherein the UDP message comprises Wi-Fi information of a router, which is obtained by the client responding to the trigger instruction for adding the IOT equipment, which is input by the user;
connecting the router according to the Wi-Fi information in the UDP message, returning response information to the client, and establishing UDP communication with the client based on the response information;
sending device information of the target IOT device to the client through UDP communication with the client;
when a binding notification sent by the client end responding to the binding instruction of the user to the target IOT equipment is received, functional data are initialized according to the binding notification and the initialized functional data are reported to a server end; the functional data comprises data describing a function of the IOT device;
receiving a binding result obtained by the server processing a binding request of the client, wherein the binding request is used for requesting to bind the target IOT device to the client, and the binding request comprises device information of the target IOT device;
when any IOT device cannot be connected to the network, the client side sends reset information to the IOT device which cannot be connected to the network, so that the IOT device which cannot be connected to the network executes reset operation according to the reset information, and reports the number of times of the reset operation to the server side when the next distribution network is carried out, wherein the reset operation is to reset the current distributed network state to a to-be-distributed network state.
6. The method of claim 5, further comprising:
and when the binding notification is not received, receiving reset information sent by the client, resetting the current distribution network state to a to-be-distributed state according to the reset information, and entering a distribution network mode.
7. The method of claim 5, further comprising:
when the target IOT device cannot be connected to the network or the binding result indicates that the target IOT device is not successfully bound to the client, resetting the current distribution network state to a to-be-distributed state, and entering the distribution network mode.
8. The method of claim 5, wherein sending the device information of the target IOT device to the client via UDP communication with the client comprises:
receiving a first message sent by the client through UDP communication, wherein the first message is used for requesting to acquire the equipment information of the target IOT equipment;
and responding to the first message, and returning a second message to the client through UDP communication with the client, wherein the second message comprises the equipment information of the target IOT equipment.
9. The IOT equipment distribution network device is characterized in that the device is applied to a client side, and the client side and a server side are in communication connection; the device comprises:
the acquisition unit is used for responding to a trigger instruction for adding the IOT equipment input by a user and acquiring Wi-Fi information of the router;
a generating unit, configured to generate a UDP packet that includes the Wi-Fi information, and send the UDP packet;
a receiving unit, configured to receive response information returned by at least one IOT device when monitoring that the UDP packet is received and connecting to the router according to Wi-Fi information in the UDP packet;
a communication unit to establish a UDP communication with the at least one IOT device based on the response information;
the receiving unit is further configured to receive device information sent by the at least one IOT device through UDP communication with the at least one IOT device, where each piece of device information uniquely corresponds to one IOT device;
a sending unit, configured to send, in response to a binding instruction of the user to a target IOT device in the at least one IOT device, a binding notification to the target IOT device through UDP communication with the target IOT device, so that the target IOT device initializes functional data according to the binding notification and reports the initialized functional data to the server; the functional data comprises data describing a function of the IOT device;
the sending unit is further configured to send, to the server, a binding request for the target IOT device, where the binding request includes device information of the target IOT device, so that the server binds the target IOT device to the client according to the device information of the target IOT device;
when any IOT device cannot be connected to the network, the client side sends reset information to the IOT devices which cannot be connected to the network, so that the IOT devices which cannot be connected to the network execute reset operation according to the reset information, the number of times of the reset operation is reported to the server side when the next network distribution is carried out, and the reset operation is to reset the current distributed network state to a to-be-distributed network state.
10. An IOT device distribution network apparatus, the apparatus being applied to a target IOT device, the apparatus comprising:
the system comprises a receiving unit, a network distribution mode processing unit and a network distribution mode processing unit, wherein the receiving unit is used for responding to a trigger instruction which is input by a user and enters a network distribution mode, and monitoring and receiving a UDP message generated by a client, and the UDP message comprises Wi-Fi information of a router, which is obtained by the client responding to the trigger instruction which is input by the user and is used for adding an IOT device;
the communication unit is used for connecting the router according to the Wi-Fi information in the UDP message;
the sending unit is used for returning response information to the client;
the communication unit is further configured to establish a UDP communication with the client based on the response information;
the sending unit is further configured to send device information of the target IOT device to the client through UDP communication with the client;
the initialization unit is used for initializing functional data according to the binding notification and reporting the initialized functional data to a server when receiving the binding notification sent by the client in response to the binding instruction of the user to the target IOT device; the functional data comprises data describing a function of the IOT device;
the receiving unit is further configured to receive a binding result obtained by the server processing a binding request of the client, where the binding request is used to request that the target IOT device is bound to the client, and the binding request includes device information of the target IOT device;
when any IOT device cannot be connected to the network, the client side sends reset information to the IOT devices which cannot be connected to the network, so that the IOT devices which cannot be connected to the network execute reset operation according to the reset information, the number of times of the reset operation is reported to the server side when the next network distribution is carried out, and the reset operation is to reset the current distributed network state to a to-be-distributed network state.
CN202110424161.3A 2021-04-20 2021-04-20 IOT equipment network distribution method and device and computer storage medium Active CN113098976B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110424161.3A CN113098976B (en) 2021-04-20 2021-04-20 IOT equipment network distribution method and device and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110424161.3A CN113098976B (en) 2021-04-20 2021-04-20 IOT equipment network distribution method and device and computer storage medium

Publications (2)

Publication Number Publication Date
CN113098976A CN113098976A (en) 2021-07-09
CN113098976B true CN113098976B (en) 2023-04-18

Family

ID=76679006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110424161.3A Active CN113098976B (en) 2021-04-20 2021-04-20 IOT equipment network distribution method and device and computer storage medium

Country Status (1)

Country Link
CN (1) CN113098976B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113596838A (en) * 2021-07-29 2021-11-02 北京小米移动软件有限公司 Equipment distribution network binding method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110912761A (en) * 2019-12-31 2020-03-24 美的集团股份有限公司 Binding method and false allocation prevention method for automatic distribution network of equipment and cloud server

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10637724B2 (en) * 2006-09-25 2020-04-28 Remot3.It, Inc. Managing network connected devices
CN109525540B (en) * 2017-09-20 2021-05-28 中移(杭州)信息技术有限公司 Intelligent device binding method and device
CN111353141B (en) * 2018-12-20 2022-05-24 美的集团股份有限公司 Intelligent device authority control method, server, user side device and electronic device
CN110798355A (en) * 2019-11-04 2020-02-14 上海庆科信息技术有限公司 Network distribution method and device for intelligent socket, intelligent socket and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110912761A (en) * 2019-12-31 2020-03-24 美的集团股份有限公司 Binding method and false allocation prevention method for automatic distribution network of equipment and cloud server

Also Published As

Publication number Publication date
CN113098976A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN102474464B (en) Apparatus, system, and method for establishing point to point connections in FCOE
CN111917562B (en) Broadcast message forwarding method, device, equipment and storage medium
CN109194525B (en) Network node configuration method and management node
CN100471148C (en) Apparatus and method for establishing network
CN110012083B (en) Data transmission method, server and data transmission device
CN113098976B (en) IOT equipment network distribution method and device and computer storage medium
CN104812021B (en) A kind of method and device of AP access AC
CN105636030B (en) Share the method and device of access point
CN114422254B (en) Cloud honey deployment method and device, cloud honey server and readable storage medium
CN111328060B (en) Bluetooth equipment mesh networking method and system and equipment thereof
CN111641997A (en) Equipment network access method and device based on Bluetooth Mesh network, and storage medium
CN109561054B (en) Data transmission method, controller and access device
CN113259918A (en) Equipment binding method and system
CN108200658A (en) The method of connection is established between terminal and applies its terminal
US20230089609A1 (en) Method and apparatus for processing information, and device and computer storage medium
US10972356B2 (en) Method for selecting negotiation counterpart, method for responding to discovery message, and related apparatus
CN114760653B (en) Wireless sensing method, device, equipment and storage medium
CN110575667B (en) Control method, device, equipment and storage medium based on UI (user interface)
CN112533304B (en) Ad hoc network management method, device, system, electronic equipment and storage medium
CN108834224A (en) Hotspot connection method, device, computer readable storage medium and client
CN112491583A (en) Data acquisition and analysis method and device
CN112039931B (en) Elastic broadcasting method and system for P2P network
CN106790325B (en) Method and system for accessing network equipment
CN113890839B (en) Method and device for determining network connection state of Internet of things equipment
CN108391303A (en) The method of connection is established between terminal and applies its terminal

Legal Events

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