WO2024114274A1 - Iot device network configuration method and related apparatus - Google Patents
Iot device network configuration method and related apparatus Download PDFInfo
- Publication number
- WO2024114274A1 WO2024114274A1 PCT/CN2023/128920 CN2023128920W WO2024114274A1 WO 2024114274 A1 WO2024114274 A1 WO 2024114274A1 CN 2023128920 W CN2023128920 W CN 2023128920W WO 2024114274 A1 WO2024114274 A1 WO 2024114274A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- iot device
- anchor
- room
- iot
- network configuration
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 144
- 238000004891 communication Methods 0.000 claims description 147
- 230000006854 communication Effects 0.000 claims description 147
- 238000001514 detection method Methods 0.000 claims description 89
- 230000004044 response Effects 0.000 claims description 48
- 239000000523 sample Substances 0.000 claims description 39
- 230000015654 memory Effects 0.000 claims description 29
- 238000004422 calculation algorithm Methods 0.000 claims description 21
- 230000005540 biological transmission Effects 0.000 claims description 15
- 238000003860 storage Methods 0.000 claims description 13
- 239000000463 material Substances 0.000 claims description 4
- 238000005192 partition Methods 0.000 claims description 4
- 230000008569 process Effects 0.000 description 34
- 238000010586 diagram Methods 0.000 description 19
- 230000006870 function Effects 0.000 description 19
- 238000007726 management method Methods 0.000 description 15
- 238000010295 mobile communication Methods 0.000 description 11
- 230000006855 networking Effects 0.000 description 10
- 238000012545 processing Methods 0.000 description 10
- 230000005236 sound signal Effects 0.000 description 10
- 238000004590 computer program Methods 0.000 description 8
- 238000012790 confirmation Methods 0.000 description 7
- 238000005516 engineering process Methods 0.000 description 5
- 238000013528 artificial neural network Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 229920001621 AMOLED Polymers 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 3
- 230000003993 interaction Effects 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 230000001360 synchronised effect Effects 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 2
- 210000000988 bone and bone Anatomy 0.000 description 2
- 238000013500 data storage Methods 0.000 description 2
- 230000001934 delay Effects 0.000 description 2
- 238000009826 distribution Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005855 radiation Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 1
- 230000005856 abnormality Effects 0.000 description 1
- 230000003416 augmentation Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 230000002457 bidirectional effect Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003862 health status Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005304 joining Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000003825 pressing Methods 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000010408 sweeping Methods 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/2807—Exchanging configuration information on appliance services in a home automation network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L12/2823—Reporting information sensed by appliance or service execution status of appliance services in a home automation network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/2803—Home automation networks
- H04L2012/284—Home automation networks characterised by the type of medium used
- H04L2012/2841—Wireless
Definitions
- the present application relates to the field of electronic technology, and in particular to a method for configuring a network for IoT devices and related devices.
- IOT Internet of Things
- users' electronic devices such as mobile phones, tablets or computers, etc.
- smart home applications Application, APP
- the premise of control is that these IOTs have been networked and bound to the above-mentioned smart home APP.
- the present application provides an IoT device network configuration method and related devices, which can automatically determine the spatial affiliation of IoT devices while configuring IoT devices in batches, thereby simplifying user operations and effectively improving network configuration efficiency and user experience.
- the present application provides an IoT device network configuration method, which is applied to a first anchor device located in a first room, where the first anchor device is any one of a plurality of anchor devices located in different rooms, including: the first anchor device detects whether the first IoT device is an IoT device to be configured in the first room based on a first signal received from the first IoT device; when it is detected that the first IoT device is an IoT device to be configured in the first room, the first anchor device sends network configuration information to the first IoT device; after determining that the network configuration of the first IoT device is completed, the first anchor device sends network configuration completion information to the terminal device, and the network configuration completion information is used to indicate that the first IoT device has completed network configuration, and that the room to which the first IoT device belongs is the first room where the first anchor device is located.
- anchor devices are configured in each room.
- Each anchor device can detect the IoT devices to be networked in the same room and network them. After the network is networked, the anchor device will feedback the network configuration completion information of the IoT device to the terminal device. Based on the network configuration completion information of the IoT device, the terminal device can determine that the room to which the IoT device belongs is the room corresponding to the anchor device. In this way, it is possible to realize batch network configuration of IoT devices in each room and automatically determine the room to which the IoT device belongs, thereby improving the network configuration efficiency of IoT devices, simplifying user operations, and effectively improving user experience.
- the method further includes: the first anchor device receives a detection request sent by the terminal device, the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room; the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the received signal of the first IoT device, including: in response to the detection request, the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the received signal of the first IoT device.
- the detection request sent by the terminal device can trigger each anchor device to perform batch network configuration on the IoT devices in the room, thereby improving the network configuration efficiency of the IoT device and simplifying user operations.
- the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received from the first IoT device, including: the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received from the first IoT device by the first short-range communication module; the network configuration information is used for the second short-range communication module of the first IoT device to access the network.
- the first short-range communication module is used to detect IoT devices and configure the network
- the second short-range communication module is used for IoT devices to access the network; the two can be the same communication module or different communication modules. In this way, the flexibility of the IoT device network configuration process is improved.
- the method further includes: the WiFi communication module of the first anchor device starts the first hotspot; the first hotspot of the first anchor device establishes a WiFi connection with the first IoT device; the first signal includes a signal sent by the first IoT device and received by the first hotspot; the first anchor device sends network configuration information to the first IoT device, including: the first hotspot of the first anchor device sends network configuration information to the first IoT device.
- the IoT device can directly access the first hotspot of the anchor device, and the anchor device can use the first hotspot to It can automatically detect IoT devices in the same room and configure them. Through such an automated configuration process, the efficiency of configuration can be improved.
- the network configuration information is used for the first IoT device to access the second hotspot of the first anchor device; the above method also includes: the WiFi communication module of the first anchor device starts the second hotspot; based on the network configuration information, the second hotspot of the first anchor device establishes a WiFi connection with the first IoT device; after the above determination that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first IoT device accesses the second hotspot, the first anchor device sends the network configuration completion information to the terminal device.
- the IoT device can directly access the first hotspot of the anchor device, and the anchor device can automatically detect the IoT device in the same room using the first hotspot, and configure the network configuration information of the second hotspot for it.
- the network configuration efficiency can be improved.
- the method further includes: the WiFi communication module of the first anchor device broadcasts a first discovery signal; the first anchor device receives a detection request sent by the first IoT device in response to the first discovery signal; the first signal includes the detection request; the first anchor device sends network configuration information to the first IoT device, including: based on the detection request, the first anchor device sends a detection response to the first IoT device, and the detection response includes the network configuration information.
- the existing WiFi connection process is utilized to realize that the anchor device automatically detects the IoT device in the same room and configures the network for it. The solution is highly practical and improves the efficiency of network configuration.
- the detection request and the detection response are used to establish a first WiFi connection
- the network configuration information is used to establish the first WiFi connection
- the above method also includes: based on the network configuration information, the first anchor device establishes a first WiFi connection with the first IoT device; after determining that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first WiFi connection is established, the first anchor device sends the network configuration completion information to the terminal device.
- the implementation of the embodiment of the present application utilizes the wifi connection process to realize that the anchor device automatically detects the IoT device in the same room and configures the network for it. The solution is highly practical and improves the network configuration efficiency.
- the first anchor device is a node that has been networked in the Bluetooth mesh network
- the method further includes: the first anchor device receives a second discovery signal broadcasted by the Bluetooth communication module of the first IoT device, the second discovery signal carries a signal type, and the signal type indicates that the second discovery signal is used for Bluetooth mesh network configuration; the first signal includes the second discovery signal; the first anchor device sends network configuration information to the first IoT device, including: the Bluetooth communication module of the first anchor device sends network configuration information to the first IoT device, and the network configuration information is used to access the Bluetooth mesh network.
- the embodiment of the present application is implemented, and the Bluetooth mesh networking process is used to realize that the anchor device automatically detects the IoT device in the same room and configures it. The solution is highly practical and improves the efficiency of network configuration.
- the first signal includes N second signals, where N is a positive integer; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received and sent by the first IoT device, including: obtaining the arrival angle and transmission delay of the second signal based on the received second signal; using the arrival angle and transmission delay corresponding to a second signal as a sample data, and using a clustering detection algorithm to obtain the clustering trend of the N second signals; when the clustering trend is greater than the first threshold, determining that the first IoT device is an IoT device to be networked in the first room.
- the arrival angle and transmission delay of the signal of the IoT device can be used to detect whether the IoT device is an IoT device in the same room. In this way, the room to which the IoT device belongs can be automatically determined, which simplifies user operations and improves user experience.
- the first threshold corresponding to the first room is determined based on space identification information of the first room, and the space identification information includes part or all of the following: the position of the first anchor device in the first room, the device model of the first anchor device, the room layout of the first room, and the partition material of the first room.
- the first anchor device stores the spatial scope of the first room; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received from the first IoT device, including: the first anchor device obtains the orientation and distance of the first IoT device relative to the first anchor device based on the first signal received from the first IoT device; the first anchor device obtains the position of the first IoT device based on the orientation and distance of the first IoT device relative to the first anchor device and the position of the first anchor device; when the position of the first IoT device is within the spatial scope of the first room, the first anchor device determines that the first IoT device is an IoT device to be networked in the first room.
- the position of the IoT device can be determined using the signal of the IoT device, and then it can be determined whether the IoT device is an IoT device in the same room. In this way, the room to which the IoT device belongs can be automatically determined, which simplifies user operations and improves user experience.
- the first room includes M subspaces, where M is a positive integer greater than 1, and the above method further includes: the first anchor device obtains the distance of the first IoT device relative to the first anchor device and the angle of arrival of the first signal based on the first signal sent by the first IoT device; the angle of arrival and distance corresponding to an IoT device are used as a sample data, and the first anchor device clusters the sample data corresponding to N IoT devices using a clustering algorithm to obtain the IoT devices included in each of the M subspaces; the network configuration completion information also indicates the subspace where the first IoT device is located.
- the angle of arrival of the signal of the IoT device and the distance of the IoT device can be used to further determine which subspace in a room the IoT device belongs to.
- the subspace to which the IoT device belongs can be automatically determined, which simplifies user operations and facilitates users to more accurately control IoT devices in each subspace.
- the first room includes M subspaces, where M is a positive integer greater than 1, and the first anchor device stores the first room.
- the method also includes: the first anchor device obtains the distance and orientation of the first IoT device relative to the first anchor device based on the first signal sent by the first IoT device; based on the distance and orientation of the first IoT device relative to the first anchor device and the position of the first anchor device, the first anchor device obtains the position of the first IoT device; when the position of the first IoT device is within the spatial range of the first subspace, the first anchor device determines that the subspace where the first IoT device is located is the first subspace, and the M subspaces include the first subspace; the network configuration completion information also indicates the subspace where the first IoT device is located.
- the position of the IoT device can be determined by using the signal of the IoT device, and then it can be determined which subspace in a room the IoT device belongs to. In this way, the subspace to which the IoT device belongs can be automatically determined, which simplifies the user operation and facilitates the user to control the IoT devices in each subspace more accurately.
- the first anchor device sends the network configuration completion information to the terminal device, including: the first anchor device sends the network configuration completion information to the terminal device via the central gateway, and the central gateway is used to record the first IoT device that has been configured and the room to which the first IoT device belongs. In this way, even if the external network is abnormal, the local IoT device that has been configured can be controlled through the central gateway.
- the first anchor device before the first anchor device sends the network configuration information to the first IoT device, it also includes: the first anchor device sends a query request to the server, the query request includes the device ID of the first IoT device and the first account logged in by the terminal device, and the query request is used to query whether the first IoT device is an authorized IoT device of the first account; the first anchor device receives the first indication information sent by the server; the first anchor device sends the network configuration information to the first IoT device, including: when the first indication information indicates that the first IoT device is an authorized IoT device of the first account, the first anchor device sends the network configuration information to the first IoT device. In this way, only the IoT devices authorized by the user are configured, avoiding the security risks caused by unauthorized IoT devices accessing the anchor device.
- the present application provides an IoT device network configuration method, which is applied to a terminal device, wherein the terminal device records multiple anchor devices located in different rooms, and the first anchor device located in the first room is any one of the above-mentioned multiple anchor devices, including: the terminal device receives network configuration completion information sent by the first anchor device, and the network configuration completion information is used to indicate that the first IoT device has completed network configuration, and the network configuration completion information is sent after the first anchor device detects that the first IoT device is an IoT device to be configured in the same room, and determines that the network configuration of the first IoT device is completed; based on the network configuration completion information, the terminal device determines that the room to which the first IoT device belongs is the first room.
- an anchor device is configured in each room, and each anchor device can detect the IoT device to be networked in the same room and network it; after the network is networked, the anchor device will feedback the network configuration completion information of the IoT device to the terminal device; based on the network configuration completion information of the IoT device, the terminal device can determine that the room to which the IoT device belongs is the room corresponding to the anchor device. In this way, it is possible to realize batch network configuration of IoT devices in each room and automatically determine the room to which the IoT device belongs, thereby improving the network configuration efficiency of IoT devices, simplifying user operations, and effectively improving user experience.
- the method further includes: the terminal device sends a detection request to the above-mentioned multiple anchor devices respectively, and the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room.
- the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room.
- each anchor device can be triggered to perform batch network configuration on the IoT devices in the room, thereby improving the network configuration efficiency of the IoT device and simplifying the user operation.
- the method further includes: the terminal device detects a first input operation of the user; the terminal device sends a detection request to the above-mentioned multiple anchor devices respectively, including: in response to the first input operation, the terminal device sends the detection request to the above-mentioned multiple anchor devices respectively.
- the user can trigger each anchor device to batch configure the IoT devices in the room through an input operation on the terminal device, thereby improving the configuration efficiency of the IoT devices and simplifying the user operation.
- the terminal device determines that the room to which the first IoT device belongs is the first room, including: when the network configuration completion information carries the first indication information, the terminal device displays the first prompt information based on the first indication information; the first prompt information is used to prompt the user to select the room where the first IoT device is located; the terminal device receives the user's second input operation, and the second input operation is used to select the room where the first IoT device is located; when the room selected by the second input operation is the first room where the first anchor device is located, the terminal device determines that the room to which the first IoT device belongs is the first room; when the network configuration completion information does not carry the first indication information, the terminal device determines that the room to which the first IoT device belongs is the first room. In this way, when the anchor device is not sure about the room to which the IoT device belongs, the user can assist the terminal device in determining the actual room to which the IoT device belongs.
- the present application provides an IoT device network configuration method, which is applied to an IoT device network configuration system, wherein the system includes a terminal device and multiple anchor devices located in different rooms, and is characterized in that it includes: the first anchor device in the first room detects whether the first IoT device is an IoT device to be configured in the first room based on a first signal sent by the first IoT device; the first anchor device in the first room is any one of the multiple anchor devices, and the at least one IoT device includes the first IoT device; when it is detected that the first IoT device is an IoT device to be configured in the first room, the first anchor device sends network configuration information to the first IoT device; after determining that the network configuration of the first IoT device is completed, the first anchor device sends network configuration completion information to the terminal device, and the network configuration completion information is used to indicate that the first IoT device has completed network configuration; based on the network configuration completion information, the terminal device determines that the room to which the first
- an anchor device is configured in each room, and each anchor device can detect the IoT device to be networked in the same room and network it; after the network is networked, the anchor device then feeds back the network configuration completion information of the IoT device to the terminal device; the terminal device Once the network configuration of the device is completed, the room to which the IoT device belongs can be determined to be the room corresponding to the anchor device. In this way, the IoT devices in each room can be configured in batches and the rooms to which the IoT devices belong can be automatically determined, which improves the network configuration efficiency of the IoT devices, simplifies user operations, and effectively improves the user experience.
- the method further includes: the terminal device sends detection requests to the multiple anchor devices respectively, and the detection requests are used to trigger the anchor devices to detect the IoT devices to be networked in the same room; the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the signal received from the first IoT device, including: in response to the detection request, the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the signal received from the first IoT device.
- the method further includes: the terminal device detects a first input operation of the user; the terminal device sends detection requests to the multiple anchor devices respectively, including: in response to the first input operation, the terminal device sends the detection requests to the multiple anchor devices respectively.
- the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on a first signal received from the first IoT device, including: the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on a first short-range communication module receiving a first signal sent from the first IoT device; the network configuration information is used for the second short-range communication module of the first IoT device to access the network.
- the method further includes: the WiFi communication module of the first anchor device starts the first hotspot; the first IoT device accesses the first hotspot of the first anchor device; the first signal includes a signal sent by the first IoT device and received by the first hotspot; the first anchor device sends network configuration information to the first IoT device, including: the first hotspot of the first anchor device sends network configuration information to the first IoT device.
- the network configuration information is used for the first IoT device to access the second hotspot of the first anchor device; the above method also includes: the WiFi communication module of the first anchor device starts the second hotspot; based on the network configuration information, the first IoT device accesses the second hotspot of the first anchor device; after the above determination that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first IoT device has accessed the second hotspot, the first anchor device sends the network configuration completion information to the terminal device.
- the method further includes: the WiFi communication module of the first anchor device broadcasts a first discovery signal; based on the first discovery signal, the first IoT device sends a detection request; the first signal includes the detection request; the first anchor device sends network configuration information to the first IoT device, including: based on the detection request, the first anchor device sends a detection response to the first IoT device, and the detection response includes the network configuration information.
- the detection request and the detection response are used to establish a first WiFi connection
- the network configuration information is used to establish the first WiFi connection
- the above method also includes: based on the network configuration information, the first IoT device establishes a first WiFi connection with the first anchor device; after the above determination that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first WiFi connection is established, the first anchor device sends the network configuration completion information to the terminal device.
- the network configuration information includes a service set identifier SSID and a wireless network password.
- the first anchor device is a configured node in a Bluetooth mesh network
- the method further includes: a Bluetooth communication module of the first IoT device broadcasts a second discovery signal, the second discovery signal carries a signal type, and the signal type indicates that the second discovery signal is used for Bluetooth mesh configuration; the first signal includes the second discovery signal; the first anchor device sends configuration information to the first IoT device, including: the Bluetooth communication module of the first anchor device sends the configuration information to the first IoT device, and the configuration information is used to access the Bluetooth mesh network.
- the network configuration information includes a network key of the Bluetooth mesh network and a unicast address of the first IoT device in the Bluetooth mesh network.
- the first signal includes N second signals, where N is a positive integer; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received and sent by the first IoT device, including: obtaining the arrival angle and transmission delay of the second signal based on the received second signal; taking the arrival angle and transmission delay corresponding to a second signal as a sample data, and using a clustering detection algorithm to obtain the clustering trend of the N second signals; when the clustering trend is greater than a first threshold, determining that the first IoT device is an IoT device to be networked in the first room.
- the terminal device determines that the room to which the first IoT device belongs is the first room, including: when the network configuration completion information carries the first indication information, the terminal device displays the first prompt information based on the first indication information; the first prompt information is used to prompt the user to select the room where the first IoT device is located, and the first indication information indicates that the clustering trend is greater than the first threshold and less than or equal to the second threshold; the terminal device receives the user's second input operation, and the second input operation is used to select the room where the first IoT device is located; when the room selected by the second input operation is the first room where the first anchor device is located, the terminal device determines that the room to which the first IoT device belongs is the first room; when the network configuration completion information does not carry the first indication information, the terminal device determines that the first IoT device The room to which is belongs is the first room.
- the first threshold and the second threshold corresponding to the first room are determined based on space identification information of the first room, and the space identification information includes part or all of the following: the position of the first anchor device in the first room, the device model of the first anchor device, the room layout of the first room, and the partition material of the first room.
- the first room includes M subspaces, where M is a positive integer greater than 1.
- the above method also includes: the first anchor device obtains the distance of the first IoT device relative to the first anchor device and the angle of arrival of the first signal based on the first signal sent by the first IoT device; the angle of arrival and distance corresponding to an IoT device are taken as sample data, and the first anchor device clusters the sample data corresponding to N IoT devices using a clustering algorithm to obtain the IoT devices included in each of the M subspaces; the network configuration completion information also indicates the subspace where the first IoT device is located.
- the first room includes M subspaces, M is a positive integer greater than 1, and the first anchor device stores the spatial range of each subspace of the first room; the above method also includes: the first anchor device obtains the distance and orientation of the first IoT device relative to the first anchor device based on the first signal sent by the first IoT device; based on the distance and orientation of the first IoT device relative to the first anchor device, and the position of the first anchor device, the first anchor device obtains the position of the first IoT device; when the position of the first IoT device is within the spatial range of the first subspace, the first anchor device determines that the subspace where the first IoT device is located is the first subspace, and the M subspaces include the first subspace; the network configuration completion information also indicates the subspace where the first IoT device is located.
- the first anchor device stores the spatial scope of the first room; the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the first signal received from the first IoT device, including: the first anchor device obtains the orientation and distance of the first IoT device relative to the first anchor device based on the first signal received from the first IoT device; the first anchor device obtains the position of the first IoT device based on the orientation and distance of the first IoT device relative to the first anchor device and the position of the first anchor device; when the position of the first IoT device is within the spatial scope of the first room, the first anchor device determines that the first IoT device is the IoT device to be networked in the first room.
- the system further includes a central gateway, and the first anchor device sends network configuration completion information to the terminal device, including: the first anchor device sends network configuration completion information to the central gateway; the central gateway records the newly added first IoT device that has been configured and the room to which the first IoT device belongs; the central gateway sends network configuration completion information to the terminal device.
- the system further includes a server, and the first anchor device sends network configuration completion information to the terminal device, including: the first anchor device sends network configuration completion information to the server; the server records the newly added first IoT device that has been configured and the room to which the first IoT device belongs; the server sends network configuration completion information to the terminal device.
- the system further includes a server, and before the first anchor device sends the network configuration information to the first IoT device, it also includes: the first anchor device sends a query request to the server, the query request includes the device ID of the first IoT device and the first account logged in by the terminal device; in response to the query request, the server queries whether the first IoT device is an authorized IoT device of the first account; the server sends first indication information to the first anchor device; the first anchor device sends the network configuration information to the first IoT device, including: when the first indication information indicates that the first IoT device is an authorized IoT device of the first account, the first anchor device sends the network configuration information to the first IoT device.
- the method further includes: the terminal device displays a first interface, the first interface including room display areas corresponding to the rooms to which the multiple anchor devices belong; after the terminal device determines that the room to which the first IoT device belongs is the first room, it also includes: displaying the device identifier of the first IoT device in the room display area of the first room.
- the present application provides an electronic device, comprising one or more processors and one or more memories.
- the one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions.
- the electronic device executes the IoT device network configuration method in any possible implementation of any of the above aspects.
- an embodiment of the present application provides a computer storage medium, including computer instructions.
- the communication device executes the IoT device networking method in any possible implementation of any of the above aspects.
- an embodiment of the present application provides a computer program product.
- the computer program product runs on a computer, it enables the computer to execute the IoT device networking method in any possible implementation of any of the above aspects.
- FIG1A is a schematic diagram of a system architecture of a communication system provided in an embodiment of the present application.
- FIG1B is a schematic diagram of a smart home scenario provided in an embodiment of the present application.
- FIG1C is a schematic diagram of a system architecture of a communication system provided in an embodiment of the present application.
- FIG2 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application.
- 3A to 3F are related interfaces for setting an anchor point device according to an embodiment of the present application.
- 4A to 4C are related interfaces for adding IoT devices provided in an embodiment of the present application.
- FIG5 is a user interface for viewing IoT devices provided in an embodiment of the present application.
- 6A and 6B are related interfaces for adding IoT devices provided in an embodiment of the present application.
- FIG7 is a user interface related to controlling an IoT device provided in an embodiment of the present application.
- FIGS. 8A and 8B are schematic diagrams of control cards of smart home devices provided in embodiments of the present application.
- FIGS. 9A and 9B are schematic diagrams of control cards of smart home devices provided in embodiments of the present application.
- FIG10 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application.
- FIG11 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application.
- FIG12 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application.
- FIG13 is a schematic diagram of a process for establishing a WiFi connection provided in an embodiment of the present application.
- FIG14A is a schematic diagram of a process for detecting an IoT device in the same room provided by an embodiment of the present application.
- FIG14B is a schematic diagram of a process for detecting IoT devices in the same room provided by an embodiment of the present application.
- FIG14C is a related interface for selecting a room to which an IoT device belongs provided in an embodiment of the present application
- FIG15 is a schematic diagram of a flow chart of obtaining a space identification threshold according to an embodiment of the present application.
- FIG16 is a schematic diagram of a three-dimensional space range provided in an embodiment of the present application.
- FIG17A is a schematic diagram of a two-dimensional clustering provided in an embodiment of the present application.
- 17B to 17G are related interfaces of the subspace provided in the embodiments of the present application.
- FIG18 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application.
- FIG19 is a flow chart of an IoT device network configuration method provided in an embodiment of the present application.
- first and second are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features.
- a feature defined as “first” or “second” may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality” means two or more.
- GUI graphical user interface
- IoT devices in various application scenarios are becoming more and more popular.
- IoT devices in a user's home i.e., a smart home scenario
- a preset APP such as a smart home APP
- terminal device such as a mobile phone, tablet, etc.
- IoT devices have been networked and bound to the smart home APP.
- An embodiment of the present application provides an IoT device network configuration solution, including: after a user finds and opens a smart home APP on a terminal device, the terminal device runs the smart home APP; after the user finds and clicks a control to add an IoT device in the smart home APP, the terminal device starts to scan surrounding IoT devices; the terminal device displays a list of scanned IoT devices; then, after the user selects an IoT device that needs to be networked from the list, the terminal device receives a WiFi network identifier and a wireless network password input by the user; the terminal device starts to configure the IoT device selected by the user based on the WiFi network identifier and the wireless network password input by the user; after the network configuration is completed, the IoT device accesses the WiFi network, and the smart home APP of the terminal device is bound to the IoT device; the smart home APP of the terminal device can receive the room to which the IoT device belongs that is manually edited by the user.
- each IoT device needs to go through the above steps to complete the configuration.
- the user operation is cumbersome and the configuration process is complicated.
- the user needs to repeat the cumbersome configuration operations, the configuration efficiency is low, and the user experience is poor.
- the embodiment of the present application also provides an IoT device network configuration method, which can automatically determine the spatial ownership of IoT devices while configuring IoT devices in batches, thereby simplifying user operations and effectively improving network configuration efficiency and user experience.
- the IoT device network configuration method is described in detail below.
- the communication system 10 to which the IoT device networking method is applied is introduced.
- FIG1A shows a system architecture of a communication system 10 provided in an embodiment of the present application, wherein the geographical environment in which the communication system 10 is located includes one or more preset spaces, and an anchor device is set in each preset space.
- the communication system 10 includes at least one terminal device of the user (e.g., terminal device 100), at least one anchor device in a preset space (e.g., anchor device 200, anchor device 300), and an IoT device in the same preset space as each anchor device.
- the smart home scene includes multiple rooms.
- the user can set the anchor device of each room through the smart home APP of the terminal device 100 (for example, set the anchor device 200 in the living room and the anchor device 300 in the bedroom), and then detect the IoT device to be networked in the room through the anchor device of each room, and network it; and after the network is successfully networked, the room to which the networked IoT device belongs is displayed in the smart home APP.
- the room to which the IoT device detected by the anchor device 200 belongs is the room corresponding to the anchor device 200.
- the terminal device 100 and each anchor device have a short-range communication module 1.
- the terminal device 100 can establish a wireless communication connection with the anchor device in each room and communicate directly with the anchor device. For example, the terminal device 100 sends a detection request to add an IoT device to the anchor device 200; the anchor device 200 feeds back the network configuration completion information of the detected IoT device in the same room to the terminal device 100.
- the short-range communication module 1 may include one or more of a wireless fidelity (WiFi) communication module, a Bluetooth communication module, an infrared communication module, an ultra-wideband communication module, a ZigBee communication module, etc.
- the terminal device 100 may transmit a signal through the short-range communication module 1 to detect and scan the anchor devices (such as the anchor device 200 and the anchor device 300) near the terminal device 100, so that the terminal device 100 may discover the nearby anchor devices through the short-range wireless communication protocol, and establish a wireless communication connection with the nearby anchor devices, and then directly transmit data with the nearby anchor devices.
- the anchor devices such as the anchor device 200 and the anchor device 300
- the terminal device 100 and each anchor device may also communicate indirectly through at least one electronic device in a communication network, and the communication network includes a local area network (LAN) and/or a wide area network (WAN).
- the terminal device 100 and each anchor device may be connected to the local area network through at least one electronic device based on a wired connection and/or a wireless connection (such as a WiFi connection, a Bluetooth connection, etc.) to achieve indirect communication; the at least one electronic device may include a router, a hub gateway 600, an intelligent device controller, and other devices.
- the terminal device 100 is a central control device 100
- the at least one electronic device includes a hub gateway 600
- each anchor device is a slave gateway
- the central control device may communicate indirectly with the slave gateway through the hub gateway 600, and then control each slave gateway to detect IoT devices in the same room and configure the network for them.
- the central control device, the hub gateway 600, and the slave gateway are all nodes in the mesh network.
- the terminal device 100 and each anchor device can also communicate indirectly through at least one electronic device (e.g., server 700) in a wide area network (e.g., the Internet); the server 700 can be one or more hardware servers or cloud servers embedded in a virtualized environment.
- the server 700 includes an application server of a smart home APP, and the terminal device 100 can communicate indirectly with each anchor device through the above application server, and then remotely control each anchor device to detect IoT devices in the same room and configure the network for them.
- the IoT device and each anchor device have a short-distance communication module 2; taking the anchor device 200 as an example, through the signal received by the short-distance communication module 2, the anchor device 200 can detect the IoT device to be networked in the same room and send the network configuration information to it.
- the short-distance communication module 2 can refer to the relevant description of the short-distance communication module 1 mentioned above, and the short-distance communication module 2 and the short-distance communication module 1 can be the same or different.
- the communication system 10 also includes an access device for a preset network (e.g., a WiFi network) corresponding to each room, and both the IoT device and the access device have a short-range communication module 3 (e.g., a WiFi communication module); the network configuration information sent by the anchor device 200 is used to access the access device corresponding to the room (e.g., the access device 800).
- a short-range communication module 3 e.g., a WiFi communication module
- the network configuration information sent by the anchor device 200 is used to access the access device corresponding to the room (e.g., the access device 800).
- the WiFi communication module of the IoT device 400 after the WiFi communication module of the IoT device 400 establishes a communication connection with the access device 800, the IoT device 400 is connected to the WiFi network; the terminal device 100 can control the IoT device 400 through the access device 800. Any two rooms can correspond to the same access device or different access devices, which is not specifically limited here.
- the access device corresponding to a room and the anchor device can be the same device, and the subsequent embodiments are exemplified by taking this as an example.
- the communication method between the access device and the terminal device 100 can refer to the relevant description of the anchor device 200, which will not be repeated here.
- the short-distance communication module 3 can refer to the relevant description of the short-distance communication module 1.
- the short-distance communication module 1, the short-distance communication module 2 and the short-distance communication module 3 can be the same or different, and the embodiment of the present application does not specifically limit this.
- the short-distance communication module 3 are both WiFi communication modules or Bluetooth communication modules.
- the short-distance communication module 2 is a Bluetooth communication module
- the short-distance communication module 3 is a WiFi communication module.
- the short-distance communication module 2 is a WiFi communication module
- the short-distance communication module 3 is a Bluetooth communication module.
- the above-mentioned communication system 10 can also be applied to other scenarios, such as smart office scenarios, which are not specifically limited here.
- the terminal device 100 may be a mobile phone, a wearable device (e.g., a smart bracelet), a tablet computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a cellular phone, a personal digital assistant (PDA), an augmented reality (AR)/virtual reality (VR) device, a wearable device (e.g., a smart watch), a vehicle-mounted device, a central control device for a smart home scene, and other electronic devices.
- a wearable device e.g., a smart bracelet
- a tablet computer e.g., a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a cellular phone, a personal digital assistant (PDA), an augmented reality (AR)/virtual reality (VR) device, a wearable device (e.g., a smart watch), a vehicle-mounted device, a central control device for a smart home scene, and other electronic devices
- IoT devices can be smart lights, smart speakers, smart TVs, smart curtains, smart door locks, smart refrigerators, smart air conditioners, car equipment, printers, projectors, smart sockets, smart air purifiers, smart cameras, smart alarm clocks, sweeping robots, and other devices.
- the anchor device may be any electronic device having the functions that the aforementioned anchor device can implement.
- the anchor device may be a router, a gateway or a central gateway, or an IoT device, or a terminal device, and the embodiments of the present application do not specifically limit this.
- the structure of the terminal device 100 involved in the embodiment of the present application is introduced below.
- the structures of the anchor device and the IoT device involved in the embodiment of the present application can refer to the relevant description of the terminal device 100, and will not be repeated later.
- FIG. 2 shows a schematic structural diagram of the terminal device 100 .
- the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
- SIM subscriber identification module
- the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
- the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100.
- the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
- the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc.
- AP application processor
- GPU graphics processor
- ISP image signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- Different processing units may be independent devices or integrated in one or more processors.
- the controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
- the processor 110 may include one or more interfaces.
- the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
- I2C inter-integrated circuit
- I2S inter-integrated circuit sound
- PCM pulse code modulation
- UART universal asynchronous receiver/transmitter
- MIPI mobile industry processor interface
- GPIO general-purpose input/output
- SIM subscriber identity module
- USB universal serial bus
- the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
- the processor 110 may include multiple I2C buses.
- the processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces.
- the processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through I2C bus interfaces.
- the interface is coupled to the touch sensor 180K, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100 .
- the I2S interface can be used for audio communication.
- the processor 110 can include multiple I2S buses.
- the processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170.
- the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
- the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals.
- the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.
- the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
- the UART interface is a universal serial data bus for asynchronous communication.
- the bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
- the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
- the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
- the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
- the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193.
- the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.
- the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100.
- the processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
- the GPIO interface can be configured by software.
- the GPIO interface can be configured as a control signal or as a data signal.
- the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc.
- the GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
- the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
- the USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones.
- the interface can also be used to connect other electronic devices, such as AR devices, etc.
- the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the terminal device 100.
- the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
- the charging management module 140 is used to receive charging input from a charger.
- the charger may be a wireless charger or a wired charger.
- the charging management module 140 may receive charging input from a wired charger through the USB interface 130.
- the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
- the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
- the power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
- the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc.
- the power management module 141 can also be set in the processor 110.
- the power management module 141 and the charging management module 140 can also be set in the same device.
- the wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
- Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
- Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas.
- antenna 1 can be reused as a diversity antenna for a wireless local area network.
- the antenna can be used in combination with a tuning switch.
- the mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied to the terminal device 100.
- the mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc.
- the mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
- the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
- at least some of the functional modules of the mobile communication module 150 can be set in the processor 110.
- at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
- the modem processor may include a modulator and a demodulator.
- the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal.
- the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal.
- the demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
- the application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194.
- the modem processor may be an independent device.
- the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
- the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied on the terminal device 100.
- WLAN wireless local area networks
- BT wireless fidelity
- GNSS global navigation satellite system
- FM frequency modulation
- NFC near field communication
- IR infrared
- the wireless communication module 160 can be one or more devices integrating at least one communication processing module.
- the wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
- the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
- the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology.
- the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology.
- the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
- GPS global positioning system
- GLONASS global navigation satellite system
- BDS Beidou navigation satellite system
- QZSS quasi-zenith satellite system
- SBAS satellite based augmentation system
- the terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor.
- the GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations for graphics rendering.
- the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos, etc.
- the display screen 194 includes a display panel.
- the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc.
- the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
- ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise and brightness of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
- the camera 193 is used to capture still images or videos.
- the object generates an optical image through the lens and projects it onto the photosensitive element.
- the photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor.
- CMOS complementary metal oxide semiconductor
- the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal.
- the ISP outputs the digital image signal to the DSP for processing.
- the DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.
- the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
- the digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
- Video codecs are used to compress or decompress digital videos.
- the terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in multiple coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
- MPEG moving picture experts group
- NPU is a neural network (NN) computing processor that draws on the structure of biological neural networks, such as the human brain neural network.
- the NPU can realize intelligent cognition of the terminal device 100, such as image recognition, face recognition, voice recognition, text understanding, etc.
- the internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
- RAM random access memories
- NVM non-volatile memories
- Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory (flash memory).
- SRAM static random-access memory
- DRAM dynamic random access memory
- SDRAM synchronous dynamic random access memory
- DDR SDRAM double data rate synchronous dynamic random access memory
- non-volatile memory may include disk storage devices and flash memory (flash memory).
- Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle. It can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level. According to the storage specification, it can include universal flash storage (UFS), embedded multi media Card (eMMC), etc.
- SLC single-level cell
- MLC multi-level cell
- TLC triple-level cell
- QLC quad-level cell
- UFS universal flash storage
- eMMC embedded multi media Card
- the random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc.
- the non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
- the external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 100.
- the external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
- the terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor.
- the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals.
- the audio module 170 can also be used to encode and decode audio signals.
- the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
- the speaker 170A also called a "horn" is used to convert audio electrical signals into sound signals.
- the receiver 170B also called a “handset”, is used to convert audio electrical signals into sound signals.
- Microphone 170C also called “microphone” or “microphone”, is used to convert sound signals into electrical signals.
- the earphone jack 170D is used to connect a wired earphone.
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A can be disposed on the display screen 194 .
- the gyroscope sensor 180B may be used to determine the motion posture of the multicast source 100.
- the angular velocity of the multicast source 100 around three axes ie, x, y, and z axes
- the air pressure sensor 180C is used to measure air pressure.
- the magnetic sensor 180D includes a Hall sensor.
- the acceleration sensor 180E can detect the magnitude of acceleration of the multicast source 100 in various directions (generally three axes). When the multicast source 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device.
- the distance sensor 180F is used to measure the distance.
- the multicast source 100 can measure the distance by infrared or laser.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
- the light emitting diode may be an infrared light emitting diode.
- the ambient light sensor 180L is used to sense the brightness of the ambient light.
- the multicast source 100 can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.
- the fingerprint sensor 180H is used to collect fingerprints.
- the temperature sensor 180J is used to detect temperature.
- the multicast source 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.
- the touch sensor 180K is also called a "touch control device”.
- the touch sensor 180K can be set on the display screen 194.
- the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen”.
- the touch sensor 180K is used to detect a touch operation on or near it.
- the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
- the display screen 194 can provide Visual output related to touch operation
- the touch sensor 180K may also be disposed on the surface of the multicast source 100 , which is different from the location of the display screen 194 .
- Bone conduction sensor 180M can obtain vibration signals.
- the button 190 includes a power button, a volume button, etc.
- the button 190 may be a mechanical button or a touch button.
- the multicast source 100 may receive a button input and generate a key signal input related to the user settings and function control of the multicast source 100.
- Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
- the indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
- the SIM card interface 195 is used to connect a SIM card.
- the following uses a smart home scenario as an example to illustrate the application scenarios of the IoT device networking method.
- the user can set the anchor device for each room through the terminal device 100, and then trigger the anchor device for each room with one click to batch detect the IoT devices in each room.
- FIG. 3A to FIG. 3F show the relevant interfaces for setting the anchor devices of each room through the smart home APP.
- FIG3A shows a main interface 11 for displaying installed APPs on a terminal device 100.
- the main interface 11 may include: a status bar 101, a tray 102 with commonly used application icons, and other application icons 103. Among them: the tray 102 with commonly used application icons can display: phone icons, contact icons, text message icons, camera icons. Other application icons 103 can display: smart home icons 103A, gallery icons, music icons, mailbox images, settings icons, memo icons, etc.
- the main interface 11 may also include a page indicator 104. Other application icons may be distributed on multiple pages, and the page indicator 104 may be used to indicate which page the user is currently viewing the application in. The user can slide the area of other application icons left and right to view application icons in other pages.
- the terminal device 100 displays the user interface 12 of the smart home APP.
- the user interface 12 includes an all device option 201 and a classified device option 202; when the classified device option 202 is selected, the user interface 12 also includes display areas for each room, such as a living room display area and a bedroom display area.
- the user interface 12 when the user interface 12 cannot display the display areas of all rooms due to the display size of the terminal device 100, the user can view the display areas of more rooms by sliding left, right, or downward.
- the display area of a room includes the room name of the room; when the room has an anchor device set up, the display area also includes the device identifier of the anchor device; when the room has no anchor device set up, the display area also includes an add control for the anchor device; when the room has a networked IoT device added, the display area also includes the device identifier of the IoT device.
- the living room display area includes the living room name 203 and the device identifier 204 of the living room anchor device; the bedroom display area includes the bedroom name 205 and the add control 206 for the anchor device. Users can edit the room names of each room.
- the terminal device 100 uses the short-range communication module 1 (such as a WiFi communication module) to scan nearby electronic devices with anchor device capabilities and displays a prompt message 207.
- the prompt message 207 is used to prompt that the anchor device in the bedroom is being scanned; as shown in Figure 3D, the terminal device 100 displays options for the scanned electronic devices (such as option 208 for router xxx, option 209 for router yyy, option 210 for TV zzz), as well as setting controls 211.
- the terminal device 100 switches option 208 from an unselected state to a selected state; as shown in Figures 3E and 3F, after detecting that the user selects an option for at least one device (such as option 208), the operation of clicking on the setting control 211 is clicked; in response to the above operation, the terminal device 100 sets the router xxx as the bedroom anchor device, and displays the device identification 212 of the router xxx in the bedroom display area.
- the electronic device with the anchor device capability may be a router, an IoT device, a user's terminal device, etc., and the embodiment of the present application does not specifically limit the device type of the anchor device.
- the terminal device 100 uses the WiFi communication module to scan the nearby router xxx with the anchor device capability, including: after the router xxx is turned on or after the router xxx receives the user's startup operation, the WiFi communication module broadcasts a detection signal at a fixed time, and the detection signal carries a capability identifier; the terminal device 100 scans the detection signal of the router xxx, and based on the above capability identifier, it can determine whether the router xxx has the anchor device capability.
- the embodiments of the present application may also set anchor devices in each room through other methods, which are not specifically limited here.
- FIG. 4A to FIG. 4C show the relevant interfaces of triggering the anchor device in each room to detect the IoT device in the same room with one click through the smart home APP.
- the user interface 12 of the smart home APP further includes an add control 301; the terminal device 100 detects an operation (such as a click operation) acting on the add control 301; in response to the above input operation, the terminal device 100 sends a signal to the anchor device in each room.
- the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room; and prompt information is displayed in the display area of each room (for example, prompt information 302 in the living room display area and prompt information 303 in the bedroom display area) to prompt that the anchor device in the room is scanning the IoT device.
- the display form of the above prompt information may include one or more of text, pictures, and animations.
- the anchor device in each room detects that there is an IoT device to be networked in the room, it feeds back the device information 1 of the IoT device to the terminal device 100; based on the device information 1, the terminal device 100 displays the device identification of the detected IoT device in the display area of each room.
- the device information 1 may include one or more of the device type, device icon, device name, and device model.
- the device identification 304 of lamp 1 is displayed in the living room display area
- the device identification 305 of lamp 2 is displayed in the bedroom display area.
- the device identification includes the device type and the device icon.
- the anchor device After the anchor device detects that there is an IoT device to be networked in this room, it sends the network configuration information to the IoT device; after the network configuration is completed based on the network configuration information, the IoT device accesses the network; the terminal device 100 can be indirectly connected to the IoT device, and then the IoT device can be controlled through the smart home APP.
- the terminal device 100 can also display the connection progress of the detected IoT device, which can also be understood as the network configuration progress of the IoT device; for example, the connection progress 306 of the light 1 is displayed in the living room display area, and the connection progress 307 of the light 2 is displayed in the bedroom display area.
- the device identification 304 of the light bulb 1 has two display states, namely, the connecting state and the connection success state.
- the device identification 304 shown in FIG4B is in the connecting state; as shown in FIG4C, after the terminal device 100 detects that the light bulb 1 is successfully connected (i.e., the network configuration is completed), the display state of the device identification 304 switches to the connection success state.
- the anchor device 200 in the living room after the anchor device 200 in the living room establishes a communication connection with the light bulb 1, it sends a network configuration completion message to the terminal device 100, and the network configuration completion message is used to indicate that the light bulb 1 has completed the network configuration; the terminal device 100 determines that the network configuration of the light bulb 1 is completed based on the network configuration completion message.
- the anchor device in each room detects that there is an IoT device to be networked in the room, and only after the network configuration of the IoT device is completed, will it feedback the device information 1 of the IoT device to the terminal device 100; the terminal device 100 directly displays the device identification of the IoT device in the successfully connected state shown in Figure 4C.
- the terminal device 100 after adding the IoT devices in the room detected by each anchor device, the terminal device 100 detects that the user clicks the all devices option 201; in response to the above click operation, the terminal device 100 uniformly displays the device identifications of all networked IoT devices in the user interface 12, that is, they are not displayed according to room classification.
- the device identification in the room display area may include one or more of the device type, device subtype, device icon, device name, and device model.
- the following introduces various implementation methods of the device identification involved in the embodiment of the present application.
- the device identification of the IoT device may also include the room to which the IoT device belongs. For example, as shown in FIG4C , the device identification 304 of the lamp 1 in the living room display area includes “living room”, and the device identification 305 of the lamp 2 in the bedroom display area includes “bedroom”.
- the device information 1 of the IoT device fed back by the anchor device includes the device type; referring to the device identification 304 of the electric lamp 1 shown in FIG4C , the device identification may include the device type and the device icon corresponding to the device type; the device icon corresponding to each device type may be the terminal device 100 or a user preset device.
- the device types of IoT devices may include: electric lamps, speakers, air conditioners, televisions, refrigerators, etc.
- the device information 1 of the IoT device fed back by the anchor device includes a device subtype; referring to the device identification a shown in FIG4C , the device identification includes a device subtype and a device icon corresponding to the device subtype; the device icon corresponding to each device subtype may be preset by the terminal device 100 or the user.
- the subtypes of electric lamps may include: table lamps, chandeliers, linear lamps, string lamps, floor lamps, etc.
- the device subtype of the electric lamp 1 in the living room is a chandeliers
- the device subtype of the electric lamp 2 in the bedroom is a table lamp.
- the device information 1 of the IoT device fed back by the anchor device includes the device model; referring to the device identification b shown in FIG. 4C , the device identification includes the device model and the device icon; wherein the device icon may be a device picture obtained online by the terminal device 100 based on the device model.
- the device information 1 of the IoT device fed back by the anchor device includes the state parameters of the device.
- the state parameters of the electric light may include one or more of the switch state, color, color temperature, brightness, etc.
- the device identification includes at least one state parameter indicated by the device information 1.
- the device identification c of the living room chandelier includes the switch state (i.e., off)
- the device identification c of the bedroom table lamp includes the switch state (i.e., on).
- the network configuration method shown in Figures 4A to 4C is that the user triggers each anchor device to detect the IoT device to be configured in the room with one click through the add control 301 shown in Figure 4A.
- the anchor device can also be automatically triggered to perform IoT device detection and network configuration without user operation, thereby realizing user-free network configuration.
- the terminal device 100 can automatically send a detection request to trigger each anchor device to perform IoT device detection and network configuration. In some embodiments, without the terminal device 100 sending a detection request, each anchor device can also automatically trigger IoT device detection and network configuration.
- each anchor device detects the IoT device in the same room, and after configuring the IoT device, sends the network configuration completion information to the terminal device 100; the terminal device 100 displays the prompt information 411 based on the network configuration completion information, and the prompt information 411 is used to prompt that the IoT device (such as the living room speaker, the living room chandelier and the bedroom table lamp) has been automatically added.
- the IoT device such as the living room speaker, the living room chandelier and the bedroom table lamp
- the terminal device 100 displays the user interface 12 of the smart home APP, and the user interface 12 includes each room display area, and each room display area can be used to view the latest IoT device added to the room.
- the smart home APP of the terminal device 100 can bind the IoT device based on the network configuration information of the IoT device and display the device identification of the IoT device; then, the user can control the IoT device through the smart home APP.
- FIG7 shows the relevant interface of the terminal device 100 controlling the IoT device after the network configuration of the IoT device is completed.
- the bedroom display area of the user interface 12 displays the device logo 305 of the bedroom desk lamp; after detecting that the user clicks the device logo 305 of the bedroom desk lamp, the terminal device 100 displays the control interface 13 of the bedroom desk lamp, through which various status parameters of the bedroom desk lamp can be viewed and controlled in real time, such as the switch status (i.e., on or off), color, color temperature, brightness, timer switch, etc.
- the switch status i.e., on or off
- color, color temperature, brightness, timer switch etc.
- the embodiments of the present application can also set anchor devices and/or add IoT devices through other user interfaces.
- the terminal device 100 is provided with a control card for smart home devices in the preset system interface (such as the negative one screen, the control screen), and the user can set anchor devices and/or add IoT devices through the control card; wherein the negative one screen is usually an aggregate entrance for functions such as user center, search, application recommendation, news information recommendation, and scenario intelligent services, and the control screen is usually used to display switch icons for various shortcut functions of the terminal device 100.
- the terminal device 100 displays a control screen 14, and the control screen 14 includes a control card 501 of the smart home device.
- the terminal device 100 displays a negative screen 15, and the negative screen 15 includes a control card 502 of the smart home device.
- control card 501 and control card 502 may include some or all functions of the user interface 12 of the smart home APP, such as displaying an add control 503 for setting a bedroom anchor device, an add control 504 for triggering detection of IoT devices, and device identification of added IoT devices.
- the IoT device network configuration method provided in the embodiments of the present application is introduced in detail below.
- the anchor device in each room can detect the IoT device to be configured in the same room; after configuring the detected IoT device 400, the anchor device 200 in room 1 feeds back the completion information of the network configuration of the IoT device 400 to the terminal device 100; the terminal device 100 can determine that the room to which the IoT device 400 belongs is the room corresponding to the anchor device 200.
- the IoT devices 400 in each room can be configured in batches, and the rooms to which the IoT devices belong can be automatically determined; the network configuration efficiency of the IoT devices is improved, the user operation is simplified, and the user experience is effectively improved.
- FIG10 shows a schematic flow chart of an IoT device network configuration method provided in an embodiment of the present application, the method including but not limited to steps S101 to S108.
- the terminal device 100 detects a user's input operation 1, where the input operation 1 is used to trigger the terminal device 100 to add an IoT device.
- the terminal device 100 sends a detection request to the anchor device 200 in room 1.
- the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room, and to network the detected IoT device.
- the terminal device 100 in response to input operation 1 , sends a detection request to the anchor device 200 .
- the terminal device 100 is installed with a smart home APP.
- the user interface 12 of the smart home APP is provided with an add control 301;
- the input operation 1 may include an operation (such as a click operation) acting on the above-mentioned add control 301, and the input operation 1 is specifically used to trigger the anchor device in each room to detect the IoT device to be networked in the same room with one click, and to network it.
- the terminal device 100 may also display prompt information (such as prompt information 302, prompt information 303) to prompt that the anchor device in each room is scanning the IoT device.
- the input operation 1 may also include other touch operations, preset gestures or voice commands, which are not specifically limited here.
- Step S101 is optional.
- the terminal device 100 can send a detection request at a fixed time, or automatically send a detection request when the preset condition 1 is met, so as to trigger each anchor device to perform IoT device detection and network configuration (i.e., execute S103 to S108).
- the above timing period can be preset by the terminal device 100 or the user.
- the above preset condition 1 can include the terminal device 100 being turned on, the user passing The smart home app adds at least one of the following conditions: anchor point device. This automatic network configuration method without user triggering can achieve network configuration without user awareness.
- the anchor device 200 detects IoT devices to be networked in the same room, and the detected IoT devices include the IoT device 400 .
- each anchor device can also automatically trigger IoT device detection and network configuration at a fixed time without the terminal device 100 sending a detection request, or automatically trigger IoT device detection and network configuration when the preset condition 2 is met.
- the above-mentioned timing period can be preset by the terminal device 100 or the user, and the above-mentioned preset condition 2 includes at least one of the conditions such as the anchor device is turned on and the anchor device is connected to the network.
- the anchor device 200 uses the short-range communication module 2 to detect the IoT device to be networked in the same room.
- the IoT device to be networked has the following characteristics: the IoT device has been powered on, the short-distance communication module 3 has been started, and the account 1 of the terminal device 100 has not been bound. Among them, the short-distance communication module 3 is used to access the preset network where the anchor device 200 is located.
- the embodiments of the present application do not specifically limit the short-distance communication module 2 and the short-distance communication module 3.
- the short-distance communication module 2 and the short-distance communication module 3 are both WiFi communication modules, and the preset network is a WiFi network.
- the short-distance communication module 2 and the short-distance communication module 3 are both Bluetooth communication modules, and the preset network is a Bluetooth network (e.g., Bluetooth mesh networking).
- the anchor device 200 detects the IoT device to be networked in the same room will be described in detail in subsequent embodiments and will not be described here in detail.
- the anchor device 200 sends network configuration information to the IoT device 400.
- the IoT device 400 sends a response message to the anchor device 200, where the response message is used to indicate that the above network configuration information has been received.
- Step S105 is optional.
- the IoT device 400 does not need to send the above response information to the anchor device 200.
- the IoT device 400 establishes a communication connection with the anchor device 200 based on the network configuration information to access the preset network where the anchor device 200 is located.
- the anchor device 200 sends the network configuration information of the access device of the preset network to the IoT device 400.
- the access device and the anchor device 200 may be the same device or different devices. In the embodiment of the present application, the access device and the anchor device 200 are the same device as an example for exemplary description.
- the preset network is a WiFi network
- the anchor device 200 is an access device of the WiFi network
- the network configuration information includes a service set identifier (SSID) and a wireless network password.
- the WiFi communication module of the IoT device 400 can establish a communication connection with the anchor device 200 based on the network configuration information to access the WiFi network.
- the above-mentioned preset network can also be other types of networks. Accordingly, the network configuration information includes network connection credentials of other types of networks (such as network account and network password), and the embodiments of the present application do not make specific limitations on this.
- the anchor device 200 sends network configuration completion information to the terminal device 100; the network configuration completion information is used to indicate that the IoT device 400 has completed network configuration.
- the anchor device 200 determines that the network configuration of the IoT device 400 is completed; the anchor device 200 sends network configuration completion information corresponding to the IoT device 400 to the terminal device 100.
- step S106 is not required. As long as the IoT device 400 receives the network configuration information, it means that the network configuration of the IoT device 400 is completed. In one implementation, after the anchor device 200 sends the network configuration information to the IoT device 400 in step S104, it is considered that the IoT device 400 has completed the network configuration; after step S104, the network configuration completion information can be sent to the terminal device 100. In some embodiments, after the anchor device 200 receives the response information from the IoT device 400 in step S105, it is considered that the IoT device 400 has completed the network configuration; after step S105, the network configuration completion information can be sent to the terminal device 100.
- the terminal device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
- the network configuration completion information includes device information 1, and the device identification of the IoT device 400 is determined based on the device information 1; the device information 1 may include part or all of the device type, device subtype, device icon, device name, device model, device MAC address, device ID, etc., and the device identification may include part or all of the room, device type, device subtype, device icon, device name, device model, etc. Specifically, reference may be made to the description of the device identification in FIG. 4C, which will not be repeated here.
- the anchor device 200 is the anchor device of the living room
- the IoT device 400 is the chandelier in the living room
- the terminal device 100 triggers the anchor devices in each room to detect the IoT devices to be networked
- the terminal device 100 receives the network configuration completion information of the chandelier fed back by the anchor device 200, based on the device information 1 of the chandelier in the network configuration completion information, the device identification 304 of the chandelier is displayed in the living room display area.
- the user can determine that the chandelier is in the living room by the display position of the device identification of the chandelier (i.e., the living room display area).
- the IoT device detection and network configuration process is completed in sequence (i.e., S102 to S108 are executed).
- the terminal device 100 first sends a detection request to the anchor device 200 in room 1, and after executing S103 to S108 for the anchor device 200, it sends a detection request to the anchor device 200 in room 2, and executes S103 to S108 for the anchor device; and then traverses all anchor devices in this way.
- the terminal device 100 first sends a detection request to the anchor device in each room respectively or broadcasts a detection request; then, each anchor device completes the IoT device detection and network configuration process respectively; the execution order of steps S103 to S108 corresponding to each anchor device is not specifically limited.
- the anchor device 200 may also be referred to as the first anchor device; the room 1 may also be referred to as the first room; the IoT device 400 may also be referred to as the first IoT device; the input operation 1 may also be referred to as the first input operation; the short-range communication module 2 may also be referred to as the first short-range communication module, and the short-range communication module 3 may also be referred to as the second short-range communication module; the account 1 may also be referred to as the first account; and the user interface 12 may also be referred to as the first interface.
- the communication system 10 further includes a server 700.
- the user purchases the IoT device, the user uploads the device ID (e.g., device serial number) of the IoT device and the account 1 of the smart home APP to the server 700; the server 700 adds the IoT device as an authorized IoT device of account 1.
- the anchor device 200 detects the IoT device 400 to be networked in the same room, the anchor device 200 also queries the server 700 whether the IoT device 400 is an authorized IoT device of account 1.
- steps S109 to S111 may also be included.
- the anchor device 200 sends a query request to the server 700 , where the query request includes the device ID and account 1 of the IoT device 400 .
- the anchor device 200 can obtain the account 1 currently logged in to the smart home APP.
- the detection request sent by the terminal device 100 to the anchor device 200 can carry the account 1 currently logged in to the smart home APP.
- the server 700 queries whether the IoT device 400 is an authorized IoT device of account 1 .
- the server 700 sends indication information 1 to the anchor device 200.
- the indication information 1 is used to indicate whether the IoT device 400 is an authorized IoT device of account 1.
- the anchor device 200 executes S104 , ie, sends the network configuration information to the IoT device 400 , only when it determines, based on the indication information 2 , that the IoT device 400 is an authorized IoT device of the account 1 .
- the server 700 may be queried first to determine whether the IoT device 400 is an authorized IoT device. After determining that it is an authorized IoT device, it is detected whether the IoT device 400 is an IoT device in the same room.
- the communication system 10 further includes a server 700.
- the terminal device 100 or the anchor device 200 After the IoT device 400 is networked, the terminal device 100 or the anchor device 200 notifies the server 700 that the IoT device 400 has completed network configuration, and the server 700 records the IoT device 400 as a networked IoT device bound to account 1. In this way, after account 1 is bound to the IoT device 400, the user's terminal device 100 can remotely control the IoT device 400 through the server 700.
- step S107 specifically includes S107A to S107C.
- the anchor device 200 sends network configuration completion information to the server 700.
- the network configuration completion information is used to indicate that the IoT device 400 has completed the network configuration.
- the server 700 records that the IoT device 400 is a network-connected IoT device bound to the account 1, and the room to which the IoT device 400 belongs.
- S107C The server 700 sends network configuration completion information to the terminal device 100.
- step S102 may specifically include:
- the terminal device 100 sends a detection request to the server 700.
- S102B The server 700 sends a detection request to the anchor device 200 .
- the anchor device 200 sends network configuration completion information to the terminal device 100; the terminal device 100 then sends the network configuration completion information to the server 700; the server 700 then records the IoT device 400 as the configured IoT device bound to account 1 based on the network configuration completion information sent by the terminal device 100.
- the communication system 10 also includes a central gateway 600.
- the terminal device 100 or the anchor device 200 After the IoT device 400 is networked, the terminal device 100 or the anchor device 200 notifies the local central gateway 600 that the IoT device 400 has completed the network configuration, and the central gateway 600 records the IoT device 400 as a networked IoT device bound to account 1. In this way, even if an abnormality occurs in the wide area network and the terminal device 100 cannot interact with the server 700, the terminal device 100 can also control the IoT device 400 through the local central gateway.
- step S107 specifically includes S107A to S107C.
- the anchor device 200 sends a network configuration completion message to the central gateway 600, and the network configuration completion message is used to indicate that the IoT device 400 has completed the network configuration. Distribution network.
- the central gateway 600 records that the IoT device 400 is a network-connected IoT device bound to account 1, and the room to which the IoT device 400 belongs.
- the central gateway 600 sends network configuration completion information to the terminal device 100.
- the above detection request can also be sent to the IoT device 400 through the central gateway 600.
- the communication system 10 may include a central gateway 600 and/or a server 700.
- the anchor device 200 can be configured with an agreed hotspot and a regular hotspot; after the anchor device 200 starts the agreed hotspot, the nearby IoT device 400 can directly access the agreed hotspot of the anchor device 200; the anchor device 200 uses the signal of the IoT device 400 received by the agreed hotspot to detect whether the IoT device 400 is an IoT device to be networked in the same room; if so, the network configuration information of the regular hotspot is sent to the IoT device 400; the IoT device 400 can access the regular hotspot based on the network configuration information to complete the network configuration.
- FIG12 shows a schematic flow chart of the above-mentioned IoT device network configuration method, which includes but is not limited to steps S201 to S208.
- the terminal device 100 detects a user input operation 1, where the input operation 1 is used to trigger the terminal device 100 to add an IoT device.
- the terminal device 100 sends a detection request to the anchor device 200.
- the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room, and to network the detected IoT device.
- steps S201 and S202 reference may be made to the related descriptions of the aforementioned steps S101 and S102, which will not be repeated here.
- S203 The anchor device 200 starts the agreed hotspot.
- the IoT device 400 accesses the agreed hotspot of the anchor device 200 and establishes a WiFi connection 1 with the agreed hotspot.
- the WiFi communication module of the anchor device 200 After the WiFi communication module of the anchor device 200 starts the agreed hotspot, it broadcasts a beacon frame (Beacon frame) and scans for probe requests (Probe request) from other devices.
- the IoT device to be networked will scan the Beacon frame of the agreed hotspot through the WiFi communication module and broadcast a probe request.
- the user needs to manually trigger the IoT device 400 to enter the state to be networked.
- the IoT device 400 receives the user's input operation 2; in response to the input operation 2, the IoT device 400 enters the state to be networked and scans the Beacon frame of the agreed hotspot through the WiFi communication module.
- Input operation 2 is not specifically limited here.
- the IoT device 400 is provided with a network configuration button, and input operation 2 includes pressing the above-mentioned network configuration button.
- input operation 2 includes speaking the voice command "enter the state to be networked".
- the IoT device 400 to be networked establishes a WiFi connection 1 with the anchor device 200 based on the scanned Beacon frame to access the agreed hotspot, which may include some or all of the five stages of service discovery, link authentication, association process, key negotiation, and IP allocation.
- the service discovery phase includes: the agreed hotspot of the anchor device 200 broadcasts a Beacon frame; based on the scanned Beacon, the IoT device 400 sends a probe request (Probe request); based on the above probe request, the anchor device 200 sends a probe response (Probe response) to the IoT device 400.
- the Beacon frame broadcast by the anchor device 200 carries a network configuration identifier 1, and the network configuration identifier 1 is used to indicate that the above Beacon frame comes from the agreed hotspot for network configuration; the IoT device to be configured will only feedback the probe request after detecting the network configuration identifier 1 in the Beacon frame; and the IoT device that is not in the state of being configured will not feedback the probe request after detecting the network configuration identifier 1.
- the probe request sent by the IoT device 400 carries a network configuration identifier 2, and the network configuration identifier 2 is used to indicate that the IoT device 400 is in the state of being configured; the anchor device 200 can determine that the IoT device 400 is in the state of being configured based on the network configuration identifier 2, and the anchor device 200 only allows the IoT device to be configured to access the agreed hotspot.
- the link authentication phase includes: based on the above detection response, the IoT device 400 sends an authentication request (Auth request) to the anchor device 200; based on the above authentication request, the anchor device 200 sends an authentication response (Auth response) to the IoT device 400.
- the authentication request sent by the IoT device 400 carries the wireless network password of the agreed hotspot; the anchor device 200 determines whether the IoT device is authenticated based on the wireless network password in the authentication request.
- the IoT device 400 to be networked can directly access the agreed hotspot of the anchor device 200.
- no password is required to access the agreed hotspot of the anchor device 200, or the Beacon frame broadcast by the agreed hotspot carries the SSID and wireless network password of the agreed hotspot; therefore, the IoT device 400 can directly access the agreed hotspot based on the scanned Beacon frame.
- both the anchor device 200 and the IoT device 400 follow a preset protocol, and the preset protocol sets the anchor device to use the agreed hotspot to detect the IoT device to be networked; based on the preset protocol, the IoT device 400 can obtain the SSID and wireless network password of the agreed hotspot, and after scanning the Beacon frame of the agreed hotspot, use the above SSID and wireless network password to directly access the agreed hotspot.
- the IoT device 400 and the anchor device 200 are devices of the same manufacturer configured with a preset protocol.
- the anchor device 200 when the anchor device 200 starts the agreed hotspot, it enters a low-power transmission mode, so as to prevent IoT devices in other rooms that are far away from it from also accessing the agreed hotspot of the anchor device 200.
- the anchor device 200 Based on the N signals sent by the IoT device 400 to the agreed hotspot of the anchor device 200, the anchor device 200 detects that the IoT device 400 is an IoT device to be networked in the same room.
- the server 700 or the central gateway 600 records the network-configured devices bound to the account 1 of the terminal device 100.
- the anchor device 200 queries the server 700 or the central gateway 600 whether the IoT device 400 is a network-configured device bound to the account 1. When it is determined that the IoT device 400 is not a network-configured device bound to the account 1, S205 is executed and the subsequent network configuration process continues.
- the N signals include part or all of the messages of the IoT device 400 received during the establishment of the WiFi connection 1.
- the message 1 includes part or all of the messages of the probe request, authentication request, association request, information 2, and information 4 shown in FIG.
- anchor device 200 receives N signals sent by IoT device 400 through WiFi connection 1.
- IoT device 400 sends N signals to anchor device 200 at a preset frequency, for example, the preset frequency is to send W signals within 1 second (s), where W is a positive integer.
- the anchor device 200 can determine whether the IoT device 400 is an IoT device to be networked in the same room based on the channel state information (CSI) corresponding to the N received signals. This will be described in detail in the subsequent embodiments and will not be described here.
- CSI channel state information
- the agreed hotspot of the anchor device 200 sends the network configuration information of the regular hotspot of the anchor device 200 to the IoT device 400.
- the IoT device 400 sends a response message to the agreed hotspot of the anchor device 200.
- the response message is used to indicate that the above network configuration information has been received.
- the IoT device 400 accesses the regular hotspot of the anchor device 200 based on the above network configuration information.
- the anchor device 200 sends network configuration completion information to the terminal device 100; the network configuration completion information is used to indicate that the IoT device 400 has completed network configuration.
- the terminal device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
- step S206 may refer to the relevant embodiment of step S104
- step S207 may refer to the relevant embodiment of step S105
- step S208 may refer to the relevant embodiment of step S106
- step S209 may refer to the relevant embodiment of step S107
- step S210 may refer to the relevant embodiment of step S108, which will not be repeated here.
- the agreed hotspot may also be referred to as the first hotspot, and the conventional hotspot may also be referred to as the second hotspot;
- the aforementioned N signals may also be referred to as the first signal, and one of the aforementioned N signals (ie, signal 1) may also be referred to as the second signal.
- step S205 i.e., detecting that the IoT device 400 is an IoT device in the same room
- S211 and S212 may also be included.
- the anchor device 200 sends indication information 2 to the terminal device 100.
- the indication information 2 is used to indicate the detected IoT device 400 to be networked in the same room.
- the indication information 2 includes the device information 1 of the IoT device 400.
- the terminal device 100 displays prompt information 1 in the room display area corresponding to the anchor device 200.
- the prompt information 1 is used to prompt that the IoT device 400 is connecting.
- the IoT device 400 is a living room lamp; based on the device information 1 corresponding to the living room lamp, the terminal device 100 displays prompt information 1, which includes a device identifier 304 indicating the connected state of the living room lamp and the text “device connecting”.
- the prompt information 1 may also include the connection progress of the living room light.
- the connection progress may be determined by the terminal device 100 according to the time after receiving the indication information 2. For example, the connection progress increases by 10% every second; if the network configuration completion information of the living room light is not received within 10s, the connection is deemed to have failed by default; if the network configuration completion information of the living room light is received within 10s, the connection progress increases to 100%.
- the anchor device 200 may provide the terminal device 100 with real-time feedback on the progress of the network configuration process, and different progress of the network configuration process corresponds to different connection progress; the terminal device 100 determines the connection progress of the living room light according to the connection progress corresponding to the progress of the current network configuration process. For example, the connection progress corresponding to executing S206 is 30%.
- step S205 based on N signals sent by the IoT device 400 to the agreed hotspot, it is detected that the IoT device 400 is an IoT device to be networked in the same room, specifically including S205A to S205D.
- the anchor device 200 estimates the channel state information (CSI) between the anchor device 200 and the IoT device 400 based on signal 1 among the N received signals, where signal 1 is any one of the N signals.
- CSI channel state information
- the anchor device 200 obtains the angle of arrival (AOA) and delay of signal 1 based on the CSI corresponding to signal 1.
- AOA angle of arrival
- the anchor device 200 is configured with multiple antennas, and the anchor device 200 can determine the phase difference when the signal 1 reaches antennas at different locations, that is, the arrival angle of the signal, according to the estimated CSI.
- the CSI of signal 1 includes a channel frequency response (CFR) in the frequency domain; performing an inverse fast Fourier transform (IFFT) on the CFR can obtain a channel impulse response (CIR); then, the CIR can be used to obtain the delay corresponding to signal 1.
- the power delay profile (PDP) can be obtained by averaging the CIR in the time domain and then squaring it; the delay corresponding to signal 1 can be the first-order moment of the PDP.
- the CSIs corresponding to the N signals sent by the IoT device 400 may be different, and thus the corresponding arrival angles and delays may also be different.
- the anchor point device 200 uses a cluster detection algorithm to obtain a clustering trend H of the arrival angles and delays corresponding to the N signals.
- the cluster detection algorithm is used to evaluate the clustering performance of multiple data in a data set, that is, to determine the randomness of the data in space, so as to determine whether the data can be clustered. Taking the arrival angle and delay corresponding to a signal as a sample data, the anchor device 200 can use the cluster detection algorithm to evaluate the clustering performance of the N sample data corresponding to the above N signals.
- the embodiment of the present application does not specifically limit the cluster detection algorithm.
- the cluster detection algorithm is the Hopkins Statistic algorithm.
- the clustering trend H of the signal sent by the IoT device is evaluated using the Hopkins Statistic algorithm, which may specifically include: randomly finding n points from N sample data, then finding a point closest to it in the sample space for each point, and calculating the distance x i between them, thereby obtaining distance vectors x 1 , x 2 , ..., x n ; then, randomly generating n points from the possible value range of the sample, for each randomly generated point, finding a sample point closest to it, and calculating the distance between them, to obtain y 1 , y 2 , ..., yn .
- the Hopkins Statistic algorithm determines the clustering trend as:
- the IoT device 400 when the clustering trend H is greater than the preset threshold 1 and less than or equal to the preset threshold 2, the IoT device 400 may be located in other rooms; in this case, the anchor device 200 may first configure the IoT device 400, and then allow the user to further select the room to which the IoT device 400 belongs. Referring to FIG. 15 , after step S205C, the anchor device 200 may first configure the IoT device 400, and feedback the network configuration completion information of the IoT device 400 to the terminal device 100.
- the network configuration completion information includes indication information 3, and the indication information 3 is used to indicate that the IoT device 400 may be located in other rooms.
- the terminal device 100 displays the device identification and the room to which the IoT device 400 belongs, which may specifically include S210A to S210C.
- S210A Display prompt information 2 based on indication information 3, where prompt information 2 is used to prompt the user to select the room where the IoT device 400 is located.
- S210B receiving input operation 3, where input operation 3 is used to select the room where the IoT device 400 is located.
- the terminal device 100 displays that the room to which IoT device 400 belongs is room 2.
- the IoT device 400 when the clustering trend H is greater than the preset threshold 1 and less than or equal to the preset threshold 2, the IoT device 400 may be located in other rooms; in this case, the anchor device 200 may also first allow the user to select the room to which the IoT device 400 belongs; after determining that the IoT device 400 is an IoT device in the same room, the IoT device 400 is networked.
- the anchor device 200 may also first allow the user to select the room to which the IoT device 400 belongs; after determining that the IoT device 400 is an IoT device in the same room, the IoT device 400 is networked.
- step S205 based on the N signals sent by the IoT device 400 to the agreed hotspot, it is detected that the IoT device 400 is an IoT device to be networked in the same room, which may specifically include S205A-S205C and S205E-S205J.
- anchor device 200 executes S205E or S205F for the IoT device 400.
- the terminal device 100 sends indication information 4 to the anchor device 200.
- the indication information 4 is used to indicate whether the room selected by the input operation 3 is the room 1 where the anchor device 200 is located.
- the indication information 4 indicates that the room selected by the user is room 1, it is determined that the IoT device 400 is an IoT device to be networked in the same room.
- the terminal device 100 receives the indication information 3 fed back by the living room anchor device.
- the terminal device 100 displays the device identification of the light 1 and its corresponding determination control (i.e., prompt information 2) in each room display area. Then, the user selects which room the light 1 is in through the determination control in each room display area.
- the terminal device 100 displays the device identification 304 of the light 1 and its corresponding confirmation control 308 in the living room display area, and displays the device identification 309 of the light 1 and its corresponding confirmation control 310 in the bedroom display area; after detecting the user's input operation (such as a click operation) on the confirmation control 308 in the living room display area, the terminal device 100 determines that the light 1 is in the living room, displays the device identification of the light 1 in the successful connection status in the living room display area, and stops displaying the device identification of the light 1 in the display areas of other rooms.
- the living room lamp 1 i.e., the living room chandelier
- the terminal device 100 determines that at least two anchor devices (e.g., the living room anchor device and the bedroom anchor device) identify the lamp 1 as an IoT device in the same room based on the network configuration completion information fed back by each anchor device, the device identification of the lamp 1 and the corresponding determination control are displayed in the room display areas corresponding to the at least two anchor devices. Then, the user determines which room the lamp 1 is in through the determination control in each room display area.
- the preset threshold 1 may also be referred to as the first threshold
- the preset threshold 2 may also be referred to as the second threshold
- the indication information 3 may also be referred to as the first indication information
- the prompt information 2 may also be referred to as the first prompt information.
- the spatial identification threshold of the clustering trend corresponding to the anchor device 200 is determined based on the spatial identification information of the room 1 where the anchor device 200 is located, and the spatial identification information of the room 1 includes part or all of "the position of the anchor device 200 in the room 1, the model of the anchor device 200, the room layout of the room 1, and the partition material of the room 1".
- the preset threshold 1 is 0.7
- the preset threshold 2 is 0.85.
- the anchor device 200 obtains the space identification threshold of room 1 , which specifically includes S301 to S305 .
- the terminal device 100 obtains the space identification information of room 1.
- Table 1 shows the space identification information of the room 1 where the anchor device 200 is located.
- the room layout can also be used to indicate the area and space range of the room 1.
- the server 700 is configured with a trained recognition model, the input of the recognition model is the spatial recognition information of the room, and the output of the recognition model is the spatial recognition threshold of the room.
- the terminal device 100 sends a query request to the server 700 .
- the query request is used to query the space identification threshold of room 1 .
- the query request includes the space identification information of room 1 .
- the server 700 obtains the space identification threshold of room 1 based on the space identification information of room 1.
- the server 700 sends the space identification threshold of room 1 to the terminal device 100 .
- the space identification information of the room where the anchor device is located can be obtained and uploaded to the server 700 to query the preset threshold 1 and preset threshold 2 for space identification of the anchor device.
- the terminal device 100 sends a configuration request to the anchor device 200 .
- the configuration request is used to instruct the anchor device 200 to configure the space identification threshold of room 1 .
- the configuration request includes the space identification threshold of room 1 .
- the anchor device 200 sends confirmation information to the terminal device 100, where the confirmation information is used to indicate that the space identification threshold of room 1 has been configured.
- Step S306 is optional. In some embodiments, step S306 may not be performed.
- the anchor device 200 can determine the orientation and distance of the IoT device 400 relative to the anchor device 200 based on the signal sent by the IoT device 400, and then determine whether the IoT device 400 is in the same room.
- the anchor device 200 obtains the AOA of signal 1 and the distance between the anchor device 200 and the IoT device 400 based on signal 1 among the N received signals, where N is a positive integer greater than or equal to 1. Then, based on the AOA and the distance corresponding to the N signals, the average AOA and the average distance are obtained; the orientation of the IoT device 400 relative to the anchor device 200 can be determined based on the average AOA, and the average distance is used as the distance between the anchor device 200 and the IoT device 400; then, based on the layout of room 1 where the anchor device 200 is located, the position of the anchor device 200 in room 1, and the orientation and distance of the IoT device 400, it can be determined whether the position of the IoT device 400 is in room 1.
- the layout of room 1 includes the spatial range of room 1 in a preset coordinate system XYZ, and the position of the anchor device 200 includes the coordinates (a1, b1, c1) in the above preset coordinate system; based on the orientation and distance of the IoT device 400 relative to the anchor device 200, the anchor device 200 can determine the coordinates (a2, b2, c2) of the IoT device 400 in the above preset coordinate system; when the coordinates of the IoT device 400 are within the spatial range of room 1, it is determined that the IoT device 400 is in room 1.
- FIG. 16 is an exemplary description using a three-dimensional space as an example, and the spatial range of room 1, the coordinate position of the anchor device 200, and the coordinate position of the IoT device can also be two-dimensional, which is not specifically limited here.
- the embodiment of the present application does not specifically limit the method of calculating the distance based on the received signal.
- the signal received by the anchor device 200 indicates the time when the signal is sent; the anchor device 200 determines the transmission duration of the signal based on the time when the signal is sent and the time when the signal is received, and then determines the distance from the IoT device 400 based on the transmission duration and transmission speed of the signal.
- the room where the anchor device 200 is located may include multiple subspaces; after the anchor device 200 determines that the IoT device 400 is an IoT device in the same room (i.e., room 1), it may also determine the subspace where the IoT device 400 is located in room 1, and indicate the subspace where the IoT device 400 is located in the configuration completion information.
- the subspace where the IoT device 400 is located may also be referred to as the first subspace.
- the anchor device 200 uses the AOA and distance corresponding to a signal sent by each IoT device as a sample data, and uses a clustering algorithm to spatially cluster the multiple IoT devices to obtain the IoT devices included in each of the multiple subspaces after clustering.
- the embodiment of the present application does not specifically limit the above clustering algorithm.
- the clustering algorithm is a k-means algorithm. It can be understood that in this solution, the anchor device 200 cannot predict the spatial range of each subspace before clustering.
- the bedroom anchor device detects 6 IoT devices in the bedroom and configures the 6 IoT devices;
- FIG17A shows a schematic diagram of two-dimensional clustering of IoT devices in the bedroom.
- the anchor device 200 uses the k-means algorithm to cluster the sample data corresponding to the above 6 IoT devices, and outputs the IoT devices included in the two subspaces of the bedroom (i.e., subspace 1 and subspace 2); the anchor device 200 notifies the terminal device 100 of the subspaces where each IoT device is located through the network configuration completion information.
- FIG17A is an exemplary description using a two-dimensional space as an example. In the embodiment of the present application, the spatial range of the bedroom and each subspace can also be three-dimensional, which is not specifically limited here.
- the terminal device 100 can pre-acquire the spatial range of each subspace of room 1, and the spatial range of each subspace can be preset by the terminal device 100 or the user.
- the anchor device 200 detects that the IoT device 400 is an IoT device in the same room
- the position of the IoT device 400 can be determined based on the position of the anchor device 200, and the orientation and distance of the IoT device 400 relative to the anchor device 200, and then the spatial range of the subspace in which the position of the IoT device 400 is located can be determined.
- the anchor device 200 determines the position of the IoT device, it also carries the position of the IoT device in the network configuration information; then, the terminal device 100 determines the spatial range of the subspace in which the position of the IoT device is located.
- the spatial range of each subspace of room 1 is automatically divided according to the number of subspace divisions.
- the number of divisions is 2, and the spatial range of room 1 is evenly divided into 2 subspaces.
- the spatial range of each subspace of room 1 is preset by the user, for example, the user inputs the coordinates corresponding to the spatial range of each subspace.
- FIGS. 17B to 17G show the IoT device-related interfaces for viewing the subspace.
- the IoT devices in the bedroom that have been networked include two table lamps, a speaker, a TV, an air conditioner, and a humidifier; the user interface 12 also includes a sub-classification option 401, which is used to trigger the terminal device 100 to display multiple sub-spaces of the currently selected room;
- the terminal device 100 detects an input operation of the user selecting the bedroom, such as a long press operation of the bedroom display area; in response to the above input operation, the terminal device 100 switches the bedroom display area to a selected state.
- the terminal device 100 detects an input operation (such as a click operation) acting on the sub-category option 401, the subspace display areas corresponding to the subspace 1 and subspace 2 of the bedroom are displayed on the user interface 12; the subspace display area may include the name of the subspace (such as the name 403 of subspace 1), and the device identification of the IoT device in the subspace.
- bedroom subspace 1 includes a desk lamp, a humidifier and an air conditioner
- bedroom subspace 2 includes another desk lamp, a speaker and a TV.
- the implementation method 1 of the above-mentioned scheme 1 and scheme 2 corresponds to the automatic division method of the subspace
- the implementation method 2 of scheme 2 corresponds to the custom division method of the subspace.
- the detection request sent by the terminal device 100 to the bedroom anchor device can carry a subspace parameter, which indicates the division method and/or number of divisions of the bedroom subspace; based on the subspace parameter, when the bedroom anchor device detects the IoT device in the same room, it also determines the subspace to which the IoT device belongs.
- the user can set the subspace parameters of the bedroom subspace through the smart home APP, and the subspace parameters include the division method and/or the number of divisions.
- the custom division method the user can also set the spatial range of each subspace.
- the subspace parameters can use the default parameters; for example, in the default parameters, the division method is automatic division, and the number of divisions is M (for example, 2).
- a setting control 402 is also displayed, and the setting control 402 is used to set the subspace parameters of the bedroom subspace.
- a setting box 404 for the bedroom subspace is displayed.
- the setting box 404 includes an input box 405 for the number of divisions, an option 406 for the automatic division method, an option 407 for the custom division method, room layout information 408, a spatial range input box for each subspace (for example, a spatial range input box 409 for subspace 1), and a confirmation control 410.
- the room layout information 408 is used to indicate the spatial range of the bedroom. For example, the room layout information 408 Including the four corner coordinates of the bedroom, the four corner coordinates indicate the two-dimensional spatial range of the bedroom.
- the terminal device 100 detects that the user clicks the confirmation control 410; in response to the click operation, based on the location of the IoT device and the spatial range of each subspace, the terminal device 100 can determine the subspace to which the IoT device belongs.
- the subspaces to which the IoT devices e.g., bedroom humidifiers
- the two division methods can be different.
- the anchor device 200 can utilize the signal transmitted in the WiFi connection process (see the WiFi connection process diagram shown in Figure 13) to detect the IoT device to be networked in the same room, and send network configuration information to the IoT device, so that the IoT device completes the above-mentioned WiFi connection process.
- FIG18 shows a schematic flow chart of the above-mentioned IoT device network configuration method, which includes but is not limited to steps S401 to S410.
- the WiFi communication module of the anchor device 200 broadcasts a Beacon frame.
- step S402 also includes S101 and/or S102 , and the anchor device 200 broadcasts a Beacon frame through the WiFi communication module in response to the detection request of the terminal device 100 .
- the WiFi communication module of each anchor device broadcasts Beacon frames in low-power transmission mode and completes the subsequent network configuration process.
- the low-power transmission mode can reduce the possibility of IoT devices in other rooms scanning Beacon frames, thereby avoiding the anchor device 200 from further processing the IoT devices in other rooms, that is, executing S402 and S403.
- the IoT device 400 cannot receive the Beacon frame broadcast by the anchor device 300 in low-power transmission mode.
- the IoT device 400 After the IoT device 400 scans the above Beacon frame, it sends a probe request (Probe request).
- the Beacon frame broadcast by the anchor device 200 carries a network configuration identifier 3, which is used to indicate that the Beacon frame is used for network configuration; after the IoT device to be configured detects the network configuration identifier 3 in the Beacon frame, it will feedback a detection request, while the IoT device that is not in the state of being configured will detect the network configuration identifier 3 and will not feedback a detection request.
- the detection request sent by the IoT device 400 carries a network configuration identifier 2, and the network configuration identifier 2 is used to indicate that the IoT device 400 is in a state to be configured with a network; the anchor device 200 determines that the IoT device 400 is in a state to be configured with a network based on the network configuration identifier 2 before executing S403.
- N detection requests sent by the IoT device 400 it is detected that the IoT device 400 is an IoT device to be networked in the same room, where N is a positive integer.
- step S205 how to detect whether the IoT device 400 is an IoT device to be networked in the same room based on the N signals sent by the IoT device 400 can be referred to the relevant embodiments of step S205, which will not be repeated here.
- the IoT device 400 after the IoT device 400 scans the Beacon frame, it periodically sends a probe request until it receives a probe response fed back by the anchor device 200. In some embodiments, after the IoT device 400 scans the Beacon frame for network configuration, it periodically sends N probe requests according to the preset protocol of network configuration.
- room 1 where the anchor device 200 is located may include multiple subspaces; after detecting that the IoT device 400 is an IoT device to be networked in the same room, the subspace where the IoT device 400 is located can also be determined; for details, please refer to the aforementioned embodiments, which will not be repeated here.
- the anchor device 200 sends a query request to the server 700 , where the query request includes the device ID and account 1 of the IoT device 400 .
- the server 700 queries whether the IoT device 400 is an authorized IoT device of account 1 .
- the server 700 sends indication information 1 to the anchor device 200 .
- the indication information 1 is used to indicate whether the IoT device 400 is an authorized IoT device of account 1 .
- steps S404 to S406 may refer to the aforementioned steps S109 to S111, which will not be described in detail here.
- anchor device 200 Based on indication information 1, after determining that IoT device 400 is an authorized IoT device of account 1, anchor device 200 sends a probe response (Probe response) to IoT device 400, and the probe response includes network configuration information.
- probe response Probe response
- the IoT device 400 establishes a WiFi connection 2 with the anchor device 200 and accesses the WiFi network where the anchor device 200 is located.
- the IoT device 400 and the anchor device 200 continue to execute the subsequent WiFi connection process, that is, execute part or all of the stages in the link authentication, association process, key negotiation and IP allocation.
- the network configuration information includes the SSID and the wireless network password 1; in the link authentication stage, the IoT device 400 sends an authentication request (Auth request) to the anchor device 200 based on the network configuration information, and the authentication request carries the above SSID and the wireless network password 1; after the anchor device 200 verifies that the wireless network password 1 is correct, it sends an authentication response (Auth response) to the IoT device 400.
- the above authentication request can also be regarded as the response information of the IoT device 400, which is used to indicate that the IoT device 400 has received the network configuration information.
- the anchor device 200 sends a network configuration completion message to the terminal device 100; the network configuration completion message is used to indicate that the IoT device 400 has completed Distribution network.
- the terminal device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
- steps S409 and S410 For the specific implementation of steps S409 and S410, reference may be made to the related description of steps S107 and S108 in the aforementioned embodiment, which will not be repeated here.
- the Beacon frame broadcast by the above-mentioned WiFi communication module may also be referred to as the first discovery signal
- WiFi connection 2 may also be referred to as the first WiFi connection.
- the terminal device 100 may display a prompt message 411 on the current display interface (e.g., the main interface 11), and the prompt message 411 is used to prompt the user that the IoT device has been automatically added; after detecting that the user clicks on the prompt message 411, the terminal device 100 may display the newly added IoT devices in each room in the display area of each room of the smart home APP.
- the prompt message 411 is used to prompt the user that the IoT device has been automatically added; after detecting that the user clicks on the prompt message 411, the terminal device 100 may display the newly added IoT devices in each room in the display area of each room of the smart home APP.
- the central gateway 600 and the anchor devices in each room are all nodes in the Bluetooth mesh network.
- the slave gateway 200 can detect the IoT devices in the same room (such as the IoT device 400) based on the scanned Beacon frames of the IoT devices to be networked; then, through the Bluetooth mesh networking interaction, the slave gateway 200 can assist the un-networked IoT device 400 in the same room to become a networked node in the Bluetooth mesh network.
- the device information of the networked IoT devices is recorded in the central gateway 600, so that even if the wide area network is abnormal, the local networked IoT devices can be controlled through the central gateway 600.
- the terminal device 100 i.e., the central control device 100
- the central control device 100 can also be a node in the Bluetooth mesh network.
- FIG19 shows a schematic flow chart of the above-mentioned IoT device network configuration method, which includes but is not limited to steps S501 to S510.
- the Bluetooth communication module of the IoT device 400 broadcasts a Beacon frame.
- the Beacon frame broadcast by the above-mentioned Bluetooth communication module can also be called a second discovery signal.
- the data structure type of the Beacon frame broadcast by the IoT device 400 is mesh Beacon, which is used to indicate that the IoT device 400 is an unconfigured Bluetooth device;
- the above-mentioned Beacon may include a universally unique identifier (UUID) and out-of-band (OOB) information, and the OOB information is used to indicate the OOB type supported by the device.
- UUID universally unique identifier
- OOB out-of-band
- the Bluetooth communication module of each slave gateway broadcasts Beacon frames in a low-power transmission mode.
- the gateway 200 Based on N Beacon frames sent by the IoT device 400 , the gateway 200 detects that the IoT device 400 is an IoT device in the same room, where N is a positive integer.
- step S205 how to detect whether the IoT device 400 is an IoT device in the same room based on the N signals received from the IoT device 400 can be referred to the relevant description of step S205, which will not be repeated here.
- the slave gateway 200 that has been networked starts the Bluetooth communication module and scans the Beacon frames of the nearby IoT devices to be networked. After determining that the IoT device 400 is an IoT device in the same room based on the Beacon frames broadcast by the IoT device 400, the slave gateway 200 continues to perform the subsequent Bluetooth mesh network interaction (i.e., steps S503 to S507), thereby turning the unnetworked IoT device 400 into a networked node in the Bluetooth mesh network.
- S503 may specifically include S503A and S503B.
- S503A sending an invitation signal (eg, an invite command) from the gateway 200 to the IoT device 400, where the invitation signal is used to invite the IoT device 400 to access the Bluetooth mesh network.
- an invitation signal eg, an invite command
- the IoT device 400 sends a capability signal (such as a capabilities command) to the gateway 200.
- the capability signal is used to indicate the provisioning capabilities (provisioning capabilities) supported by the IoT device 400.
- the network configuration capabilities indicated by the capability signal include some or all of the following: encryption algorithm, public key type, static OOB type, maximum output OOB size, whether OOB output behavior is supported, maximum input OOB size, whether OOB input behavior is supported, number of elements, etc.
- S504 may specifically include S504A and S504B.
- Provisioning Start send a provisioning start signal (Provisioning Start) from the gateway 200 to the IoT device 400.
- the gateway 200 After selecting specific parameters of the public key exchange process from the provisioning capability of the IoT device 400, the gateway 200 sends a provisioning start signal, which is used to indicate the start of the public key exchange process, and the encryption method and OOB related parameters configured by the gateway according to the provisioning capability of the IoT device 400.
- provisioning public key Provisioning Public Key
- the gateway 200 selects a corresponding verification method to authenticate the IoT device 400.
- the OOB capability of the IoT device 400 may include the following three types: output OOB, input OOB, and static OOB or no OOB.
- the provisioning data includes the network key and the unicast address of the IoT device 400.
- the provisioning data is used to access the Bluetooth mesh network.
- the gateway 200 and the IoT device 400 will use the exchanged public key and the private keys of the two devices to generate a session key (Session Key), which is used to encrypt the network configuration information.
- Session Key Session Key
- the network configuration information is distributed from the gateway 200 to the IoT device 400.
- the network configuration information includes the network key and the unicast address assigned to the IoT device 400.
- the network key is the Bluetooth mesh security parameter for joining the Bluetooth mesh network. In this way, the IoT device 400 obtains the network key and the unicast address, which means that the IoT device 400 has become a node in the Bluetooth mesh network.
- the central gateway 600 records the room to which the newly added IoT device 400 in the Bluetooth mesh network belongs.
- the central gateway 600 sends network configuration completion information to the central control device 100.
- the central control device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
- the computer program product includes one or more computer instructions.
- the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
- the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
- the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means.
- the computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated.
- the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
- SSD solid state drive
- the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium.
- the program When the program is executed, it can include the processes of the above-mentioned method embodiments.
- the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
Landscapes
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
Disclosed in the present application are an IoT device network configuration method and a related apparatus. The method is applied to a first anchor device, which is located in a first room, wherein the first anchor device is any one of a plurality of anchor devices, which are respectively located in different rooms. The method comprises: on the basis of a received first signal of a first IoT device, detecting whether the first IoT device is an IoT device to be subjected to network configuration in a first room; if the first IoT device is the IoT device to be subjected to network configuration in the first room, sending network configuration information to the first IoT device; and after it is determined that network configuration for the first IoT device is completed, sending network configuration completion information to a terminal device, wherein the network configuration completion information is used for indicating that the network configuration for the first IoT device is completed, and a room to which the first IoT device belongs is the first room, which is where a first anchor device is located. In this way, the spatial belonging of IoT devices can be automatically determined while network configuration is performed on the IoT devices in batches, such that user operations are simplified, thereby effectively improving the network configuration efficiency and the usage experience of a user.
Description
本申请要求在2022年11月30日提交中国国家知识产权局、申请号为202211521594.1的中国专利申请的优先权,发明名称为“IoT设备配网方法及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on November 30, 2022, with application number 202211521594.1, and priority to the Chinese patent application with the invention name “IoT device network configuration method and related devices”, all contents of which are incorporated by reference in this application.
本申请涉及电子技术领域,尤其涉及IoT设备配网方法及相关装置。The present application relates to the field of electronic technology, and in particular to a method for configuring a network for IoT devices and related devices.
随着电子技术的发展,智能家居场景越来越普及,物联网(Internet of Things,IOT)设备出现爆发性的增长。目前,用户的电子设备(如手机、平板或计算机等)可以安装智能家居应用(Application,APP),通过智能家居APP来控制住宅配备的智能设备。控制的前提是这些IOT已进行配网,绑定了上述智能家居APP。With the development of electronic technology, smart home scenarios are becoming more and more popular, and the number of Internet of Things (IOT) devices has exploded. At present, users' electronic devices (such as mobile phones, tablets or computers, etc.) can install smart home applications (Application, APP) to control the smart devices equipped in the house through smart home APP. The premise of control is that these IOTs have been networked and bound to the above-mentioned smart home APP.
目前的IoT设备配网方案,针对每个IoT设备,用户需要手动选择待配网的设备,为该设备输入账号和无线网络密码,并编辑该IoT设备的所属房间;用户操作繁琐,配网流程较复杂。当有大量IoT设备需要配网时,用户需要重复繁琐的配网操作,配网效率低,用户体验差。In the current IoT device configuration solution, for each IoT device, users need to manually select the device to be configured, enter the account and wireless network password for the device, and edit the room to which the IoT device belongs; the user operation is cumbersome and the configuration process is complicated. When a large number of IoT devices need to be configured, users need to repeat the cumbersome configuration operations, resulting in low configuration efficiency and poor user experience.
发明内容Summary of the invention
本申请提供了IoT设备配网方法及相关装置,能够在批量配网IoT设备的同时,自动确定IoT设备的空间归属,简化了用户操作,有效提高配网效率和用户的使用体验。The present application provides an IoT device network configuration method and related devices, which can automatically determine the spatial affiliation of IoT devices while configuring IoT devices in batches, thereby simplifying user operations and effectively improving network configuration efficiency and user experience.
第一方面,本申请提供了一种IoT设备配网方法,应用于位于第一房间的第一锚点设备,第一锚点设备为分别位于不同房间的多个锚点设备中的任一个,包括:第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备;检测到第一IoT设备为第一房间内的待配网的IoT设备的情况下,第一锚点设备向第一IoT设备发送配网信息;确定第一IoT设备配网完成后,第一锚点设备向终端设备发送配网完成信息,所述配网完成信息用于指示第一IoT设备已完成配网,以及第一IoT设备的所属房间为第一锚点设备所在的第一房间。In a first aspect, the present application provides an IoT device network configuration method, which is applied to a first anchor device located in a first room, where the first anchor device is any one of a plurality of anchor devices located in different rooms, including: the first anchor device detects whether the first IoT device is an IoT device to be configured in the first room based on a first signal received from the first IoT device; when it is detected that the first IoT device is an IoT device to be configured in the first room, the first anchor device sends network configuration information to the first IoT device; after determining that the network configuration of the first IoT device is completed, the first anchor device sends network configuration completion information to the terminal device, and the network configuration completion information is used to indicate that the first IoT device has completed network configuration, and that the room to which the first IoT device belongs is the first room where the first anchor device is located.
实施本申请实施例,在每个房间均配置了锚点设备,各锚点设备可以检测同房间的待配网的IoT设备并对其配网;配网后,锚点设备再向终端设备反馈该IoT设备的配网完成信息;终端设备基于该IoT设备的配网完成信息,就可以确定该IoT设备所属房间为该锚点设备对应的房间。这样,可以实现对各房间的IoT设备进行批量性配网,并自动确定IoT设备的所属房间,提高了IoT设备的配网效率,简化了用户操作,有效提高了用户体验。In the implementation of the present application, anchor devices are configured in each room. Each anchor device can detect the IoT devices to be networked in the same room and network them. After the network is networked, the anchor device will feedback the network configuration completion information of the IoT device to the terminal device. Based on the network configuration completion information of the IoT device, the terminal device can determine that the room to which the IoT device belongs is the room corresponding to the anchor device. In this way, it is possible to realize batch network configuration of IoT devices in each room and automatically determine the room to which the IoT device belongs, thereby improving the network configuration efficiency of IoT devices, simplifying user operations, and effectively improving user experience.
在一种实现方式中,上述方法还包括:第一锚点设备接收终端设备发送的检测请求,所述检测请求用于触发锚点设备检测同房间内的待配网的IoT设备;上述第一锚点设备基于接收到的第一IoT设备的信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:响应于所述检测请求,第一锚点设备基于接收到的第一IoT设备的信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备。这样,通过终端设备发送的检测请求,可以触发各锚点设备对房间内的IoT设备进行批量性配网,提高了IoT设备的配网效率,简化了用户操作。In one implementation, the method further includes: the first anchor device receives a detection request sent by the terminal device, the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room; the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the received signal of the first IoT device, including: in response to the detection request, the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the received signal of the first IoT device. In this way, the detection request sent by the terminal device can trigger each anchor device to perform batch network configuration on the IoT devices in the room, thereby improving the network configuration efficiency of the IoT device and simplifying user operations.
在一种实现方式中,上述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:第一锚点设备基于第一近距离通信模块接收到的第一IoT设备的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备;配网信息用于第一IoT设备的第二近距离通信模块接入网络。可以理解,第一近距离通信模块用于检测IoT设备并配网,第二近距离通信模块用于IoT设备接入网络;两者可以是同一通信模块,也可以是不同的通信模块。这样,提高了IoT设备配网流程的灵活性。In one implementation, the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received from the first IoT device, including: the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received from the first IoT device by the first short-range communication module; the network configuration information is used for the second short-range communication module of the first IoT device to access the network. It can be understood that the first short-range communication module is used to detect IoT devices and configure the network, and the second short-range communication module is used for IoT devices to access the network; the two can be the same communication module or different communication modules. In this way, the flexibility of the IoT device network configuration process is improved.
在一种实现方式中,上述方法还包括:第一锚点设备的WiFi通信模块启动第一热点;第一锚点设备的第一热点与第一IoT设备建立WiFi连接;第一信号包括所述第一热点接收到的所述第一IoT设备发送的信号;第一锚点设备向第一IoT设备发送配网信息,包括:第一锚点设备的第一热点向第一IoT设备发送配网信息。实施本申请实施例,IoT设备可以直接接入锚点设备的第一热点,锚点设备利用第一热点可
以自动检测同房间的IoT设备并对其配网。通过这样的自动化配网流程,可以提高配网效率。In one implementation, the method further includes: the WiFi communication module of the first anchor device starts the first hotspot; the first hotspot of the first anchor device establishes a WiFi connection with the first IoT device; the first signal includes a signal sent by the first IoT device and received by the first hotspot; the first anchor device sends network configuration information to the first IoT device, including: the first hotspot of the first anchor device sends network configuration information to the first IoT device. In the implementation of the present application, the IoT device can directly access the first hotspot of the anchor device, and the anchor device can use the first hotspot to It can automatically detect IoT devices in the same room and configure them. Through such an automated configuration process, the efficiency of configuration can be improved.
在一种实现方式中,配网信息用于第一IoT设备接入第一锚点设备的第二热点;上述方法还包括:第一锚点设备的WiFi通信模块启动所述第二热点;基于配网信息,第一锚点设备的所述第二热点与第一IoT设备建立WiFi连接;上述确定第一IoT设备配网完成后,第一锚点设备向终端设备发送配网完成信息,包括:检测到第一IoT设备接入所述第二热点后,第一锚点设备向终端设备发送配网完成信息。实施本申请实施例,IoT设备可以直接接入锚点设备的第一热点,锚点设备利用第一热点可以自动检测同房间的IoT设备,并向其配置第二热点的配网信息。通过这样的自动化配网流程,可以提高配网效率。In one implementation, the network configuration information is used for the first IoT device to access the second hotspot of the first anchor device; the above method also includes: the WiFi communication module of the first anchor device starts the second hotspot; based on the network configuration information, the second hotspot of the first anchor device establishes a WiFi connection with the first IoT device; after the above determination that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first IoT device accesses the second hotspot, the first anchor device sends the network configuration completion information to the terminal device. In implementing the embodiment of the present application, the IoT device can directly access the first hotspot of the anchor device, and the anchor device can automatically detect the IoT device in the same room using the first hotspot, and configure the network configuration information of the second hotspot for it. Through such an automated network configuration process, the network configuration efficiency can be improved.
在一种实现方式中,上述方法还包括:第一锚点设备的WiFi通信模块广播第一发现信号;第一锚点设备接收第一IoT设备响应于所述第一发现信号发送的探测请求;第一信号包括所述探测请求;上述第一锚点设备向第一IoT设备发送配网信息,包括:基于所述探测请求,第一锚点设备向第一IoT设备发送探测响应,所述探测响应包括配网信息。实施本申请实施例,利用现有的wifi连接流程,实现了锚点设备自动检测同房间的IoT设备并对其配网,方案实用性强,提高了配网效率。In one implementation, the method further includes: the WiFi communication module of the first anchor device broadcasts a first discovery signal; the first anchor device receives a detection request sent by the first IoT device in response to the first discovery signal; the first signal includes the detection request; the first anchor device sends network configuration information to the first IoT device, including: based on the detection request, the first anchor device sends a detection response to the first IoT device, and the detection response includes the network configuration information. By implementing the embodiment of the present application, the existing WiFi connection process is utilized to realize that the anchor device automatically detects the IoT device in the same room and configures the network for it. The solution is highly practical and improves the efficiency of network configuration.
在一种实现方式中,所述探测请求和所述探测响应用于建立第一WiFi连接,配网信息用于建立所述第一WiFi连接;上述方法还包括:基于配网信息,第一锚点设备与第一IoT设备建立第一WiFi连接;确定第一IoT设备配网完成后,第一锚点设备向终端设备发送配网完成信息,包括:检测到建立所述第一WiFi连接后,第一锚点设备向终端设备发送配网完成信息。实施本申请实施例,利用wifi连接流程,实现了锚点设备自动检测同房间的IoT设备并对其配网,方案实用性强,提高了配网效率。In one implementation, the detection request and the detection response are used to establish a first WiFi connection, and the network configuration information is used to establish the first WiFi connection; the above method also includes: based on the network configuration information, the first anchor device establishes a first WiFi connection with the first IoT device; after determining that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first WiFi connection is established, the first anchor device sends the network configuration completion information to the terminal device. The implementation of the embodiment of the present application utilizes the wifi connection process to realize that the anchor device automatically detects the IoT device in the same room and configures the network for it. The solution is highly practical and improves the network configuration efficiency.
在一种实现方式中,第一锚点设备为蓝牙mesh组网中已配网的节点,上述方法还包括:第一锚点设备接收到第一IoT设备的蓝牙通信模块广播的第二发现信号,所述第二发现信号携带信号类型,所述信号类型指示所述第二发现信号用于蓝牙mesh配网;第一信号包括所述第二发现信号;上述第一锚点设备向第一IoT设备发送配网信息,包括:第一锚点设备的蓝牙通信模块向第一IoT设备发送配网信息,配网信息用于接入所述蓝牙mesh组网。实施本申请实施例,利用蓝牙mesh组网流程,实现了锚点设备自动检测同房间的IoT设备并对其配网,方案实用性强,提高了配网效率。In one implementation, the first anchor device is a node that has been networked in the Bluetooth mesh network, and the method further includes: the first anchor device receives a second discovery signal broadcasted by the Bluetooth communication module of the first IoT device, the second discovery signal carries a signal type, and the signal type indicates that the second discovery signal is used for Bluetooth mesh network configuration; the first signal includes the second discovery signal; the first anchor device sends network configuration information to the first IoT device, including: the Bluetooth communication module of the first anchor device sends network configuration information to the first IoT device, and the network configuration information is used to access the Bluetooth mesh network. The embodiment of the present application is implemented, and the Bluetooth mesh networking process is used to realize that the anchor device automatically detects the IoT device in the same room and configures it. The solution is highly practical and improves the efficiency of network configuration.
在一种实现方式中,第一信号包括N个第二信号,N为正整数;上述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:基于接收到的第二信号,获取第二信号的到达角和传输时延;将一个第二信号对应的到达角和传输时延作为一个样本数据,利用聚类检测算法获取上述N个第二信号的聚类趋势;聚类趋势大于第一门限时,确定第一IoT设备为第一房间内的待配网的IoT设备。实施本申请实施例,利用IoT设备的信号的到达角和传输时延,可以检测IoT设备是否为同房间的IoT设备。这样,可以自动确定IoT设备的所属房间,简化了用户操作,提高了用户体验。In one implementation, the first signal includes N second signals, where N is a positive integer; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received and sent by the first IoT device, including: obtaining the arrival angle and transmission delay of the second signal based on the received second signal; using the arrival angle and transmission delay corresponding to a second signal as a sample data, and using a clustering detection algorithm to obtain the clustering trend of the N second signals; when the clustering trend is greater than the first threshold, determining that the first IoT device is an IoT device to be networked in the first room. By implementing the embodiments of the present application, the arrival angle and transmission delay of the signal of the IoT device can be used to detect whether the IoT device is an IoT device in the same room. In this way, the room to which the IoT device belongs can be automatically determined, which simplifies user operations and improves user experience.
在一种实现方式中,第一房间对应的所述第一门限是基于第一房间的空间识别信息确定的,所述空间识别信息包括以下部分或全部:第一锚点设备在第一房间中的位置、第一锚点设备的设备型号、第一房间的房间布局、第一房间的隔间材质。In one implementation, the first threshold corresponding to the first room is determined based on space identification information of the first room, and the space identification information includes part or all of the following: the position of the first anchor device in the first room, the device model of the first anchor device, the room layout of the first room, and the partition material of the first room.
在一种实现方式中,第一锚点设备存储有第一房间的空间范围;上述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:第一锚点设备基于接收到的所述第一IoT设备发送的第一信号,获取第一IoT设备相对于第一锚点设备的方位和距离;基于第一IoT设备相对于第一锚点设备的方位和距离,以及第一锚点设备的位置,第一锚点设备获取第一IoT设备的位置;第一IoT设备的位置在第一房间的空间范围内时,第一锚点设备确定第一IoT设备为第一房间内的待配网的IoT设备。实施本申请实施例,利用IoT设备的信号可以确定IoT设备的位置,进而可以确定IoT设备是否为同房间的IoT设备。这样,可以自动确定IoT设备的所属房间,简化了用户操作,提高了用户体验。In one implementation, the first anchor device stores the spatial scope of the first room; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received from the first IoT device, including: the first anchor device obtains the orientation and distance of the first IoT device relative to the first anchor device based on the first signal received from the first IoT device; the first anchor device obtains the position of the first IoT device based on the orientation and distance of the first IoT device relative to the first anchor device and the position of the first anchor device; when the position of the first IoT device is within the spatial scope of the first room, the first anchor device determines that the first IoT device is an IoT device to be networked in the first room. By implementing the embodiment of the present application, the position of the IoT device can be determined using the signal of the IoT device, and then it can be determined whether the IoT device is an IoT device in the same room. In this way, the room to which the IoT device belongs can be automatically determined, which simplifies user operations and improves user experience.
在一种实现方式中,第一房间包括M个子空间,M为大于1的正整数,上述方法还包括:第一锚点设备基于接收到的第一IoT设备发送的第一信号,获取第一IoT设备相对于第一锚点设备的距离,以及第一信号的到达角;将一个IoT设备对应的到达角和距离作为一个样本数据,第一锚点设备利用聚类算法对N个IoT设备对应的样本数据进行聚类,获取M个子空间中每个子空间包括的IoT设备;所述配网完成信息还指示了第一IoT设备所在的子空间。实施本申请实施例,利用IoT设备的信号的到达角和IoT设备的距离,可以进一步确定IoT设备属于一个房间内的哪个子空间。这样,可自动确定IoT设备的所属子空间,简化了用户操作,便于用户更精准地控制各个子空间内的IoT设备。In one implementation, the first room includes M subspaces, where M is a positive integer greater than 1, and the above method further includes: the first anchor device obtains the distance of the first IoT device relative to the first anchor device and the angle of arrival of the first signal based on the first signal sent by the first IoT device; the angle of arrival and distance corresponding to an IoT device are used as a sample data, and the first anchor device clusters the sample data corresponding to N IoT devices using a clustering algorithm to obtain the IoT devices included in each of the M subspaces; the network configuration completion information also indicates the subspace where the first IoT device is located. In implementing the embodiment of the present application, the angle of arrival of the signal of the IoT device and the distance of the IoT device can be used to further determine which subspace in a room the IoT device belongs to. In this way, the subspace to which the IoT device belongs can be automatically determined, which simplifies user operations and facilitates users to more accurately control IoT devices in each subspace.
在一种实现方式中,第一房间包括M个子空间,M为大于1的正整数,第一锚点设备存储有第一房
间的每个子空间的空间范围;上述方法还包括:第一锚点设备基于接收到的第一IoT设备发送的第一信号,获取第一IoT设备相对于第一锚点设备的距离和方位;基于第一IoT设备相对于第一锚点设备的距离和方位,以及第一锚点设备的位置,第一锚点设备获取第一IoT设备的位置;第一IoT设备的位置在所述第一子空间的空间范围内时,第一锚点设备确定第一IoT设备的所在子空间为所述第一子空间,所述M个子空间包括所述第一子空间;所述配网完成信息还指示了第一IoT设备所在的子空间。实施本申请实施例,利用IoT设备的信号可以确定IoT设备的位置,进而可以确定IoT设备属于一个房间内的哪个子空间。这样,可自动确定IoT设备的所属子空间,简化了用户操作,便于用户更精准地控制各个子空间内的IoT设备。In one implementation, the first room includes M subspaces, where M is a positive integer greater than 1, and the first anchor device stores the first room. The method also includes: the first anchor device obtains the distance and orientation of the first IoT device relative to the first anchor device based on the first signal sent by the first IoT device; based on the distance and orientation of the first IoT device relative to the first anchor device and the position of the first anchor device, the first anchor device obtains the position of the first IoT device; when the position of the first IoT device is within the spatial range of the first subspace, the first anchor device determines that the subspace where the first IoT device is located is the first subspace, and the M subspaces include the first subspace; the network configuration completion information also indicates the subspace where the first IoT device is located. In implementing the embodiment of the present application, the position of the IoT device can be determined by using the signal of the IoT device, and then it can be determined which subspace in a room the IoT device belongs to. In this way, the subspace to which the IoT device belongs can be automatically determined, which simplifies the user operation and facilitates the user to control the IoT devices in each subspace more accurately.
在一种实现方式中,上述第一锚点设备向终端设备发送配网完成信息,包括:第一锚点设备通过向中枢网关向终端设备发送配网完成信息,中枢网关用于记录已配网的第一IoT设备以及第一IoT设备的所属房间。这样,即使外网异常,也能通过中枢网关控制本地已配网的IoT设备。In one implementation, the first anchor device sends the network configuration completion information to the terminal device, including: the first anchor device sends the network configuration completion information to the terminal device via the central gateway, and the central gateway is used to record the first IoT device that has been configured and the room to which the first IoT device belongs. In this way, even if the external network is abnormal, the local IoT device that has been configured can be controlled through the central gateway.
在一种实现方式中,上述第一锚点设备向第一IoT设备发送配网信息之前,还包括:第一锚点设备向服务器发送查询请求,所述查询请求包括第一IoT设备的设备ID和终端设备登录的第一账号,所述查询请求用于查询第一IoT设备是否为所述第一账号的已授权的IoT设备;第一锚点设备接收服务器发送的第一指示信息;上述第一锚点设备向第一IoT设备发送配网信息,包括:在所述第一指示信息指示第一IoT设备为所述第一账号的已授权的IoT设备的情况下,第一锚点设备向第一IoT设备发送配网信息。这样,仅对用户已授权的IoT设备进行配网,避免未授权的IoT设备接入锚点设备带来的安全隐患。In one implementation, before the first anchor device sends the network configuration information to the first IoT device, it also includes: the first anchor device sends a query request to the server, the query request includes the device ID of the first IoT device and the first account logged in by the terminal device, and the query request is used to query whether the first IoT device is an authorized IoT device of the first account; the first anchor device receives the first indication information sent by the server; the first anchor device sends the network configuration information to the first IoT device, including: when the first indication information indicates that the first IoT device is an authorized IoT device of the first account, the first anchor device sends the network configuration information to the first IoT device. In this way, only the IoT devices authorized by the user are configured, avoiding the security risks caused by unauthorized IoT devices accessing the anchor device.
第二方面,本申请提供一种IoT设备配网方法,应用于终端设备,终端设备记录有分别位于不同房间的多个锚点设备,位于第一房间的第一锚点设备为上述多个锚点设备中的任一个,包括:终端设备接收第一锚点设备发送的配网完成信息,所述配网完成信息用于指示第一IoT设备已完成配网,所述配网完成信息是第一锚点设备检测到第一IoT设备为同房间的待配网的IoT设备,并确定第一IoT设备配网完成后发送的;基于所述配网完成信息,终端设备确定第一IoT设备的所属房间为第一房间。In the second aspect, the present application provides an IoT device network configuration method, which is applied to a terminal device, wherein the terminal device records multiple anchor devices located in different rooms, and the first anchor device located in the first room is any one of the above-mentioned multiple anchor devices, including: the terminal device receives network configuration completion information sent by the first anchor device, and the network configuration completion information is used to indicate that the first IoT device has completed network configuration, and the network configuration completion information is sent after the first anchor device detects that the first IoT device is an IoT device to be configured in the same room, and determines that the network configuration of the first IoT device is completed; based on the network configuration completion information, the terminal device determines that the room to which the first IoT device belongs is the first room.
实施本申请实施例,在每个房间配置了一个锚点设备,各锚点设备均可以检测同房间的待配网的IoT设备并对其配网;配网后,锚点设备再向终端设备反馈该IoT设备的配网完成信息;终端设备基于该IoT设备的配网完成信息,就可以确定该IoT设备所属房间为该锚点设备对应的房间。这样,可以实现对各房间的IoT设备进行批量性配网,并自动确定IoT设备的所属房间,提高了IoT设备的配网效率,简化了用户操作,有效提高了用户体验。In the implementation of the present application, an anchor device is configured in each room, and each anchor device can detect the IoT device to be networked in the same room and network it; after the network is networked, the anchor device will feedback the network configuration completion information of the IoT device to the terminal device; based on the network configuration completion information of the IoT device, the terminal device can determine that the room to which the IoT device belongs is the room corresponding to the anchor device. In this way, it is possible to realize batch network configuration of IoT devices in each room and automatically determine the room to which the IoT device belongs, thereby improving the network configuration efficiency of IoT devices, simplifying user operations, and effectively improving user experience.
在一种实现方式中,上述方法还包括:终端设备分别向上述多个锚点设备发送检测请求,所述检测请求用于触发锚点设备检测同房间内的待配网的IoT设备。这样,通过终端设备发送的检测请求,可以触发各锚点设备对房间内的IoT设备进行批量性配网,提高了IoT设备的配网效率,简化了用户操作。In one implementation, the method further includes: the terminal device sends a detection request to the above-mentioned multiple anchor devices respectively, and the detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room. In this way, through the detection request sent by the terminal device, each anchor device can be triggered to perform batch network configuration on the IoT devices in the room, thereby improving the network configuration efficiency of the IoT device and simplifying the user operation.
在一种实现方式中,上述方法还包括:终端设备检测到用户的第一输入操作;终端设备分别向上述多个锚点设备发送检测请求,包括:响应于所述第一输入操作,终端设备分别向上述多个锚点设备发送所述检测请求。这样,用户通过作用于终端设备的一个输入操作,即可触发各锚点设备对房间内的IoT设备进行批量性配网,提高了IoT设备的配网效率,简化了用户操作。In one implementation, the method further includes: the terminal device detects a first input operation of the user; the terminal device sends a detection request to the above-mentioned multiple anchor devices respectively, including: in response to the first input operation, the terminal device sends the detection request to the above-mentioned multiple anchor devices respectively. In this way, the user can trigger each anchor device to batch configure the IoT devices in the room through an input operation on the terminal device, thereby improving the configuration efficiency of the IoT devices and simplifying the user operation.
在一种实现方式中,上述基于所述配网完成信息,终端设备确定第一IoT设备的所属房间为第一房间,包括:所述配网完成信息携带第一指示信息时,终端设备基于所述第一指示信息,显示第一提示信息;所述第一提示信息用于提示用户选择第一IoT设备所在的房间;终端设备接收到用户的第二输入操作,所述第二输入操作用于选择第一IoT设备所在的房间;所述第二输入操作选择的房间为第一锚点设备所在的第一房间时,终端设备确定第一IoT设备的所属房间为第一房间;所述配网完成信息未携带所述第一指示信息时,终端设备确定第一IoT设备的所属房间为第一房间。这样,在锚点设备不确定IoT设备的所属房间时,可以由用户协助终端设备确定IoT设备实际的所属房间。In one implementation, based on the network configuration completion information, the terminal device determines that the room to which the first IoT device belongs is the first room, including: when the network configuration completion information carries the first indication information, the terminal device displays the first prompt information based on the first indication information; the first prompt information is used to prompt the user to select the room where the first IoT device is located; the terminal device receives the user's second input operation, and the second input operation is used to select the room where the first IoT device is located; when the room selected by the second input operation is the first room where the first anchor device is located, the terminal device determines that the room to which the first IoT device belongs is the first room; when the network configuration completion information does not carry the first indication information, the terminal device determines that the room to which the first IoT device belongs is the first room. In this way, when the anchor device is not sure about the room to which the IoT device belongs, the user can assist the terminal device in determining the actual room to which the IoT device belongs.
第三方面,本申请提供了一种IoT设备配网方法,应用于IoT设备配网系统,上述系统包括终端设备以及分别位于不同房间的多个锚点设备,其特征在于,包括:第一房间的第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备;第一房间的第一锚点设备为上述多个锚点设备中的任一个,所述至少一个IoT设备包括第一IoT设备;检测到第一IoT设备为第一房间内的待配网的IoT设备的情况下,第一锚点设备向第一IoT设备发送配网信息;确定第一IoT设备配网完成后,第一锚点设备向终端设备发送配网完成信息,所述配网完成信息用于指示第一IoT设备已完成配网;基于所述配网完成信息,终端设备确定第一IoT设备的所属房间为第一房间。In the third aspect, the present application provides an IoT device network configuration method, which is applied to an IoT device network configuration system, wherein the system includes a terminal device and multiple anchor devices located in different rooms, and is characterized in that it includes: the first anchor device in the first room detects whether the first IoT device is an IoT device to be configured in the first room based on a first signal sent by the first IoT device; the first anchor device in the first room is any one of the multiple anchor devices, and the at least one IoT device includes the first IoT device; when it is detected that the first IoT device is an IoT device to be configured in the first room, the first anchor device sends network configuration information to the first IoT device; after determining that the network configuration of the first IoT device is completed, the first anchor device sends network configuration completion information to the terminal device, and the network configuration completion information is used to indicate that the first IoT device has completed network configuration; based on the network configuration completion information, the terminal device determines that the room to which the first IoT device belongs is the first room.
实施本申请实施例,在每个房间配置了一个锚点设备,各锚点设备均可以检测同房间的待配网的IoT设备并对其配网;配网后,锚点设备再向终端设备反馈该IoT设备的配网完成信息;终端设备基于该IoT
设备的配网完成信息,就可以确定该IoT设备所属房间为该锚点设备对应的房间。这样,可以实现对各房间的IoT设备进行批量性配网,并自动确定IoT设备的所属房间,提高了IoT设备的配网效率,简化了用户操作,有效提高了用户体验。In the implementation of the present application, an anchor device is configured in each room, and each anchor device can detect the IoT device to be networked in the same room and network it; after the network is networked, the anchor device then feeds back the network configuration completion information of the IoT device to the terminal device; the terminal device Once the network configuration of the device is completed, the room to which the IoT device belongs can be determined to be the room corresponding to the anchor device. In this way, the IoT devices in each room can be configured in batches and the rooms to which the IoT devices belong can be automatically determined, which improves the network configuration efficiency of the IoT devices, simplifies user operations, and effectively improves the user experience.
在一种实现方式中,上述方法还包括:终端设备分别向上述多个锚点设备发送检测请求,所述检测请求用于触发锚点设备检测同房间内的待配网的IoT设备;上述第一锚点设备基于接收到的第一IoT设备发送的信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:响应于所述检测请求,第一锚点设备基于接收到的第一IoT设备的信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备。In one implementation, the method further includes: the terminal device sends detection requests to the multiple anchor devices respectively, and the detection requests are used to trigger the anchor devices to detect the IoT devices to be networked in the same room; the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the signal received from the first IoT device, including: in response to the detection request, the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the signal received from the first IoT device.
在一种实现方式中,上述方法还包括:终端设备检测到用户的第一输入操作;上述终端设备分别向上述多个锚点设备发送检测请求,包括:响应于所述第一输入操作,终端设备分别向上述多个锚点设备发送所述检测请求。In one implementation, the method further includes: the terminal device detects a first input operation of the user; the terminal device sends detection requests to the multiple anchor devices respectively, including: in response to the first input operation, the terminal device sends the detection requests to the multiple anchor devices respectively.
在一种实现方式中,上述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:第一锚点设备基于第一近距离通信模块接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备;配网信息用于第一IoT设备的第二近距离通信模块接入网络。In one implementation, the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on a first signal received from the first IoT device, including: the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on a first short-range communication module receiving a first signal sent from the first IoT device; the network configuration information is used for the second short-range communication module of the first IoT device to access the network.
在一种实现方式中,上述方法还包括:第一锚点设备的WiFi通信模块启动第一热点;第一IoT设备接入第一锚点设备的第一热点;第一信号包括所述第一热点接收到的所述第一IoT设备发送的信号;上述第一锚点设备向第一IoT设备发送配网信息,包括:第一锚点设备的第一热点向第一IoT设备发送配网信息。In one implementation, the method further includes: the WiFi communication module of the first anchor device starts the first hotspot; the first IoT device accesses the first hotspot of the first anchor device; the first signal includes a signal sent by the first IoT device and received by the first hotspot; the first anchor device sends network configuration information to the first IoT device, including: the first hotspot of the first anchor device sends network configuration information to the first IoT device.
在一种实现方式中,配网信息用于第一IoT设备接入第一锚点设备的第二热点;上述方法还包括:第一锚点设备的WiFi通信模块启动所述第二热点;基于配网信息,第一IoT设备接入第一锚点设备的所述第二热点;上述确定第一IoT设备配网完成后,第一锚点设备向终端设备发送配网完成信息,包括:检测到第一IoT设备接入所述第二热点后,第一锚点设备向终端设备发送配网完成信息。In one implementation, the network configuration information is used for the first IoT device to access the second hotspot of the first anchor device; the above method also includes: the WiFi communication module of the first anchor device starts the second hotspot; based on the network configuration information, the first IoT device accesses the second hotspot of the first anchor device; after the above determination that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first IoT device has accessed the second hotspot, the first anchor device sends the network configuration completion information to the terminal device.
在一种实现方式中,上述方法还包括:第一锚点设备的WiFi通信模块广播第一发现信号;基于所述第一发现信号,第一IoT设备发送探测请求;第一信号包括所述探测请求;上述第一锚点设备向第一IoT设备发送配网信息,包括:基于所述探测请求,第一锚点设备向第一IoT设备发送探测响应,所述探测响应包括配网信息。In one implementation, the method further includes: the WiFi communication module of the first anchor device broadcasts a first discovery signal; based on the first discovery signal, the first IoT device sends a detection request; the first signal includes the detection request; the first anchor device sends network configuration information to the first IoT device, including: based on the detection request, the first anchor device sends a detection response to the first IoT device, and the detection response includes the network configuration information.
在一种实现方式中,所述探测请求和所述探测响应用于建立第一WiFi连接,配网信息用于建立所述第一WiFi连接;上述方法还包括:基于配网信息,第一IoT设备与第一锚点设备建立第一WiFi连接;上述确定第一IoT设备配网完成后,第一锚点设备向终端设备发送配网完成信息,包括:检测到建立所述第一WiFi连接后,第一锚点设备向终端设备发送配网完成信息。In one implementation, the detection request and the detection response are used to establish a first WiFi connection, and the network configuration information is used to establish the first WiFi connection; the above method also includes: based on the network configuration information, the first IoT device establishes a first WiFi connection with the first anchor device; after the above determination that the network configuration of the first IoT device is completed, the first anchor device sends the network configuration completion information to the terminal device, including: after detecting that the first WiFi connection is established, the first anchor device sends the network configuration completion information to the terminal device.
在一种实现方式中,配网信息包括服务集标识SSID和无线网络密码。In one implementation, the network configuration information includes a service set identifier SSID and a wireless network password.
在一种实现方式中,第一锚点设备为蓝牙mesh组网中已配网的节点,上述方法还包括:第一IoT设备的蓝牙通信模块广播第二发现信号,所述第二发现信号携带信号类型,所述信号类型指示所述第二发现信号用于蓝牙mesh配网;第一信号包括所述第二发现信号;上述第一锚点设备向第一IoT设备发送配网信息,包括:第一锚点设备的蓝牙通信模块向第一IoT设备发送配网信息,配网信息用于接入所述蓝牙mesh组网。In one implementation, the first anchor device is a configured node in a Bluetooth mesh network, and the method further includes: a Bluetooth communication module of the first IoT device broadcasts a second discovery signal, the second discovery signal carries a signal type, and the signal type indicates that the second discovery signal is used for Bluetooth mesh configuration; the first signal includes the second discovery signal; the first anchor device sends configuration information to the first IoT device, including: the Bluetooth communication module of the first anchor device sends the configuration information to the first IoT device, and the configuration information is used to access the Bluetooth mesh network.
在一种实现方式中,配网信息包括蓝牙mesh组网的网络密钥以及第一IoT设备在所述蓝牙mesh组网中的单播地址。In one implementation, the network configuration information includes a network key of the Bluetooth mesh network and a unicast address of the first IoT device in the Bluetooth mesh network.
在一种实现方式中,第一信号包括N个第二信号,N为正整数;上述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:基于接收到的第二信号,获取第二信号的到达角和传输时延;将一个第二信号对应的到达角和传输时延作为一个样本数据,利用聚类检测算法获取上述N个第二信号的聚类趋势;聚类趋势大于第一门限时,确定第一IoT设备为第一房间内的待配网的IoT设备。In one implementation, the first signal includes N second signals, where N is a positive integer; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received and sent by the first IoT device, including: obtaining the arrival angle and transmission delay of the second signal based on the received second signal; taking the arrival angle and transmission delay corresponding to a second signal as a sample data, and using a clustering detection algorithm to obtain the clustering trend of the N second signals; when the clustering trend is greater than a first threshold, determining that the first IoT device is an IoT device to be networked in the first room.
在一种实现方式中,上述基于所述配网完成信息,终端设备确定第一IoT设备的所属房间为第一房间,包括:所述配网完成信息携带第一指示信息时,终端设备基于所述第一指示信息,显示第一提示信息;所述第一提示信息用于提示用户选择第一IoT设备所在的房间,所述第一指示信息指示了所述聚类趋势大于第一门限小于等于第二门限;终端设备接收到用户的第二输入操作,所述第二输入操作用于选择第一IoT设备所在的房间;所述第二输入操作选择的房间为第一锚点设备所在的第一房间时,终端设备确定第一IoT设备的所属房间为第一房间;所述配网完成信息未携带所述第一指示信息时,终端设备确定第一IoT设备
的所属房间为第一房间。In one implementation, based on the network configuration completion information, the terminal device determines that the room to which the first IoT device belongs is the first room, including: when the network configuration completion information carries the first indication information, the terminal device displays the first prompt information based on the first indication information; the first prompt information is used to prompt the user to select the room where the first IoT device is located, and the first indication information indicates that the clustering trend is greater than the first threshold and less than or equal to the second threshold; the terminal device receives the user's second input operation, and the second input operation is used to select the room where the first IoT device is located; when the room selected by the second input operation is the first room where the first anchor device is located, the terminal device determines that the room to which the first IoT device belongs is the first room; when the network configuration completion information does not carry the first indication information, the terminal device determines that the first IoT device The room to which is belongs is the first room.
在一种实现方式中,第一房间对应的所述第一门限和所述第二门限是基于第一房间的空间识别信息确定的,所述空间识别信息包括以下部分或全部:第一锚点设备在第一房间中的位置、第一锚点设备的设备型号、第一房间的房间布局、第一房间的隔间材质。In one implementation, the first threshold and the second threshold corresponding to the first room are determined based on space identification information of the first room, and the space identification information includes part or all of the following: the position of the first anchor device in the first room, the device model of the first anchor device, the room layout of the first room, and the partition material of the first room.
在一种实现方式中,第一房间包括M个子空间,M为大于1的正整数,上述方法还包括:第一锚点设备基于接收到的第一IoT设备发送的第一信号,获取第一IoT设备相对于第一锚点设备的距离,以及第一信号的到达角;将一个IoT设备对应的到达角和距离作为一个样本数据,第一锚点设备利用聚类算法对N个IoT设备对应的样本数据进行聚类,获取M个子空间中每个子空间包括的IoT设备;所述配网完成信息还指示了第一IoT设备所在的子空间。In one implementation, the first room includes M subspaces, where M is a positive integer greater than 1. The above method also includes: the first anchor device obtains the distance of the first IoT device relative to the first anchor device and the angle of arrival of the first signal based on the first signal sent by the first IoT device; the angle of arrival and distance corresponding to an IoT device are taken as sample data, and the first anchor device clusters the sample data corresponding to N IoT devices using a clustering algorithm to obtain the IoT devices included in each of the M subspaces; the network configuration completion information also indicates the subspace where the first IoT device is located.
在一种实现方式中,第一房间包括M个子空间,M为大于1的正整数,第一锚点设备存储有第一房间的每个子空间的空间范围;上述方法还包括:第一锚点设备基于接收到的第一IoT设备发送的第一信号,获取第一IoT设备相对于第一锚点设备的距离和方位;基于第一IoT设备相对于第一锚点设备的距离和方位,以及第一锚点设备的位置,第一锚点设备获取第一IoT设备的位置;第一IoT设备的位置在所述第一子空间的空间范围内时,第一锚点设备确定第一IoT设备的所在子空间为所述第一子空间,所述M个子空间包括所述第一子空间;所述配网完成信息还指示了第一IoT设备所在的子空间。In one implementation, the first room includes M subspaces, M is a positive integer greater than 1, and the first anchor device stores the spatial range of each subspace of the first room; the above method also includes: the first anchor device obtains the distance and orientation of the first IoT device relative to the first anchor device based on the first signal sent by the first IoT device; based on the distance and orientation of the first IoT device relative to the first anchor device, and the position of the first anchor device, the first anchor device obtains the position of the first IoT device; when the position of the first IoT device is within the spatial range of the first subspace, the first anchor device determines that the subspace where the first IoT device is located is the first subspace, and the M subspaces include the first subspace; the network configuration completion information also indicates the subspace where the first IoT device is located.
在一种实现方式中,第一锚点设备存储有第一房间的空间范围;上述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测第一IoT设备是否为第一房间内的待配网的IoT设备,包括:第一锚点设备基于接收到的第一IoT设备发送的第一信号,获取第一IoT设备相对于第一锚点设备的方位和距离;基于第一IoT设备相对于第一锚点设备的方位和距离,以及第一锚点设备的位置,第一锚点设备获取第一IoT设备的位置;第一IoT设备的位置在第一房间的空间范围内时,第一锚点设备确定第一IoT设备为第一房间内的待配网的IoT设备。In one implementation, the first anchor device stores the spatial scope of the first room; the first anchor device detects whether the first IoT device is the IoT device to be networked in the first room based on the first signal received from the first IoT device, including: the first anchor device obtains the orientation and distance of the first IoT device relative to the first anchor device based on the first signal received from the first IoT device; the first anchor device obtains the position of the first IoT device based on the orientation and distance of the first IoT device relative to the first anchor device and the position of the first anchor device; when the position of the first IoT device is within the spatial scope of the first room, the first anchor device determines that the first IoT device is the IoT device to be networked in the first room.
在一种实现方式中,上述系统还包括中枢网关,上述第一锚点设备向终端设备发送配网完成信息,包括:第一锚点设备向中枢网关发送配网完成信息;中枢网关记录新增的已配网的第一IoT设备以及第一IoT设备的所属房间;中枢网关向终端设备发送配网完成信息。In one implementation, the system further includes a central gateway, and the first anchor device sends network configuration completion information to the terminal device, including: the first anchor device sends network configuration completion information to the central gateway; the central gateway records the newly added first IoT device that has been configured and the room to which the first IoT device belongs; the central gateway sends network configuration completion information to the terminal device.
在一种实现方式中,上述系统还包括服务器,上述第一锚点设备向终端设备发送配网完成信息,包括:第一锚点设备向服务器发送配网完成信息;服务器记录新增的已配网的第一IoT设备以及第一IoT设备的所属房间;服务器向终端设备发送配网完成信息。In one implementation, the system further includes a server, and the first anchor device sends network configuration completion information to the terminal device, including: the first anchor device sends network configuration completion information to the server; the server records the newly added first IoT device that has been configured and the room to which the first IoT device belongs; the server sends network configuration completion information to the terminal device.
在一种实现方式中,上述系统还包括服务器,上述第一锚点设备向第一IoT设备发送配网信息之前,还包括:第一锚点设备向服务器发送查询请求,所述查询请求包括第一IoT设备的设备ID和终端设备登录的第一账号;响应于所述查询请求,服务器查询第一IoT设备是否为所述第一账号的已授权的IoT设备;服务器向第一锚点设备发送第一指示信息;上述第一锚点设备向第一IoT设备发送配网信息,包括:在所述第一指示信息指示第一IoT设备为所述第一账号的已授权的IoT设备的情况下,第一锚点设备向第一IoT设备发送配网信息。In one implementation, the system further includes a server, and before the first anchor device sends the network configuration information to the first IoT device, it also includes: the first anchor device sends a query request to the server, the query request includes the device ID of the first IoT device and the first account logged in by the terminal device; in response to the query request, the server queries whether the first IoT device is an authorized IoT device of the first account; the server sends first indication information to the first anchor device; the first anchor device sends the network configuration information to the first IoT device, including: when the first indication information indicates that the first IoT device is an authorized IoT device of the first account, the first anchor device sends the network configuration information to the first IoT device.
在一种实现方式中,上述方法还包括:终端设备显示第一界面,所述第一界面包括上述多个锚点设备的所属房间分别对应的房间显示区;终端设备确定第一IoT设备的所属房间为第一房间后,还包括:在第一房间的房间显示区显示第一IoT设备的设备标识。In one implementation, the method further includes: the terminal device displays a first interface, the first interface including room display areas corresponding to the rooms to which the multiple anchor devices belong; after the terminal device determines that the room to which the first IoT device belongs is the first room, it also includes: displaying the device identifier of the first IoT device in the room display area of the first room.
第四方面,本申请提供了一种电子设备,包括一个或多个处理器和一个或多个存储器。该一个或多个存储器与一个或多个处理器耦合,一个或多个存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当一个或多个处理器执行计算机指令时,使得电子设备执行上述任一方面任一项可能的实现方式中的IoT设备配网方法。In a fourth aspect, the present application provides an electronic device, comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program codes, and the computer program codes include computer instructions. When the one or more processors execute the computer instructions, the electronic device executes the IoT device network configuration method in any possible implementation of any of the above aspects.
第五方面,本申请实施例提供了一种计算机存储介质,包括计算机指令,当计算机指令在电子设备上运行时,使得通信装置执行上述任一方面任一项可能的实现方式中的IoT设备配网方法。In a fifth aspect, an embodiment of the present application provides a computer storage medium, including computer instructions. When the computer instructions are executed on an electronic device, the communication device executes the IoT device networking method in any possible implementation of any of the above aspects.
第六方面,本申请实施例提供了一种计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述任一方面任一项可能的实现方式中的IoT设备配网方法。In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the IoT device networking method in any possible implementation of any of the above aspects.
图1A为本申请实施例提供的通信系统的系统架构示意图;FIG1A is a schematic diagram of a system architecture of a communication system provided in an embodiment of the present application;
图1B为本申请实施例提供的智能家居场景示意图;FIG1B is a schematic diagram of a smart home scenario provided in an embodiment of the present application;
图1C为本申请实施例提供的通信系统的系统架构示意图;FIG1C is a schematic diagram of a system architecture of a communication system provided in an embodiment of the present application;
图2为本申请实施例提供的终端设备的结构示意图;
FIG2 is a schematic diagram of the structure of a terminal device provided in an embodiment of the present application;
图3A至图3F为本申请实施例提供的设置锚点设备的相关界面;3A to 3F are related interfaces for setting an anchor point device according to an embodiment of the present application;
图4A至图4C为本申请实施例提供的添加IoT设备的相关界面;4A to 4C are related interfaces for adding IoT devices provided in an embodiment of the present application;
图5为本申请实施例提供的查看IoT设备的相关用户界面;FIG5 is a user interface for viewing IoT devices provided in an embodiment of the present application;
图6A和图6B为本申请实施例提供的添加IoT设备的相关界面;6A and 6B are related interfaces for adding IoT devices provided in an embodiment of the present application;
图7为本申请实施例提供的控制IoT设备的相关用户界面;FIG7 is a user interface related to controlling an IoT device provided in an embodiment of the present application;
图8A和图8B为本申请实施例提供的智能家居设备的控制卡片示意图;8A and 8B are schematic diagrams of control cards of smart home devices provided in embodiments of the present application;
图9A和图9B为本申请实施例提供的智能家居设备的控制卡片示意图;9A and 9B are schematic diagrams of control cards of smart home devices provided in embodiments of the present application;
图10为本申请实施例提供的一种IoT设备配网方法的流程示意图;FIG10 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application;
图11为本申请实施例提供的一种IoT设备配网方法的流程示意图;FIG11 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application;
图12为本申请实施例提供的一种IoT设备配网方法的流程示意图;FIG12 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application;
图13为本申请实施例提供的一种建立WiFi连接的流程示意图;FIG13 is a schematic diagram of a process for establishing a WiFi connection provided in an embodiment of the present application;
图14A为本申请实施例提供的一种检测同房间的IoT设备的流程示意图;FIG14A is a schematic diagram of a process for detecting an IoT device in the same room provided by an embodiment of the present application;
图14B为本申请实施例提供的一种检测同房间的IoT设备的流程示意图;FIG14B is a schematic diagram of a process for detecting IoT devices in the same room provided by an embodiment of the present application;
图14C为本申请实施例提供的选择IoT设备的所属房间的相关界面;FIG14C is a related interface for selecting a room to which an IoT device belongs provided in an embodiment of the present application;
图15为本申请实施例提供的一种获取空间识别门限的流程示意图;FIG15 is a schematic diagram of a flow chart of obtaining a space identification threshold according to an embodiment of the present application;
图16为本申请实施例提供的一种三维空间范围示意图;FIG16 is a schematic diagram of a three-dimensional space range provided in an embodiment of the present application;
图17A为本申请实施例提供的一种二维聚类示意图;FIG17A is a schematic diagram of a two-dimensional clustering provided in an embodiment of the present application;
图17B至图17G为本申请实施例提供的子空间的相关界面;17B to 17G are related interfaces of the subspace provided in the embodiments of the present application;
图18为本申请实施例提供的一种IoT设备配网方法的流程示意图;FIG18 is a schematic diagram of a flow chart of an IoT device network configuration method provided in an embodiment of the present application;
图19为本申请实施例提供的一种IoT设备配网方法的流程示意图。FIG19 is a flow chart of an IoT device network configuration method provided in an embodiment of the present application.
下面将结合附图对本申请实施例中的技术方案进行清楚、详尽地描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;文本中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况,另外,在本申请实施例的描述中,“多个”是指两个或多于两个。The technical solutions in the embodiments of the present application will be described clearly and in detail below in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in the text is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, A and/or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为暗示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征,在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.
本申请以下实施例中的术语“用户界面(user interface,UI)”,是应用程序或操作系统与用户之间进行交互和信息交换的介质接口,它实现信息的内部形式与用户可以接受形式之间的转换。用户界面是通过java、可扩展标记语言(extensible markup language,XML)等特定计算机语言编写的源代码,界面源代码在电子设备上经过解析,渲染,最终呈现为用户可以识别的内容。用户界面常用的表现形式是图形用户界面(graphic user interface,GUI),是指采用图形方式显示的与计算机操作相关的用户界面。它可以是在电子设备的显示屏中显示的文本、图标、按钮、菜单、选项卡、文本框、对话框、状态栏、导航栏、Widget等可视的界面元素。The term "user interface (UI)" in the following embodiments of the present application refers to a medium interface for interaction and information exchange between an application or operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is a source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on an electronic device and finally presented as content that can be recognized by the user. The commonly used form of user interface is a graphical user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be a visual interface element such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
目前,各种应用场景下的IoT设备越来越普及化。示例性的,用户的住宅(即智能家居场景)中可能存在多个IoT设备,例如智能音箱、智能电灯、智能电视机等。通常,用户可以在终端设备(例如手机、平板等)安装预设APP(例如智能家居APP),然后通过智能家居APP来控制住宅中的IoT设备,而控制的前提是这些IoT设备已配网并与智能家居APP已绑定。At present, IoT devices in various application scenarios are becoming more and more popular. For example, there may be multiple IoT devices in a user's home (i.e., a smart home scenario), such as smart speakers, smart lights, smart TVs, etc. Usually, users can install a preset APP (such as a smart home APP) on a terminal device (such as a mobile phone, tablet, etc.), and then control the IoT devices in the home through the smart home APP. The premise of control is that these IoT devices have been networked and bound to the smart home APP.
本申请实施例提供了一种IoT设备配网方案,包括:用户找到并打开终端设备上的智能家居APP后,终端设备运行智能家居APP;用户在智能家居APP中找到并点击添加IoT设备的控件后,终端设备开始扫描周围的IoT设备;终端设备显示扫描到的IoT设备的列表;然后,用户从列表中选择需要配网的一个IoT设备后,终端设备接收用户输入的WiFi网络标识和无线网络密码;终端设备基于用户输入的WiFi网络标识和无线网络密码,开始对用户选择的IoT设备进行配网;配网完成后,IoT设备接入WiFi网络,终端设备的智能家居APP绑定了该IoT设备;终端设备的智能家居APP可以接收用户手动编辑的该IoT设备的所属房间。An embodiment of the present application provides an IoT device network configuration solution, including: after a user finds and opens a smart home APP on a terminal device, the terminal device runs the smart home APP; after the user finds and clicks a control to add an IoT device in the smart home APP, the terminal device starts to scan surrounding IoT devices; the terminal device displays a list of scanned IoT devices; then, after the user selects an IoT device that needs to be networked from the list, the terminal device receives a WiFi network identifier and a wireless network password input by the user; the terminal device starts to configure the IoT device selected by the user based on the WiFi network identifier and the wireless network password input by the user; after the network configuration is completed, the IoT device accesses the WiFi network, and the smart home APP of the terminal device is bound to the IoT device; the smart home APP of the terminal device can receive the room to which the IoT device belongs that is manually edited by the user.
上述IoT设备配网方案,针对每个IoT设备都需要经过上述步骤才能完成配网,用户操作繁琐,配网流程较复杂;当有大量智能设备需要配网时,用户需要重复繁琐的配网操作,配网效率低,用户体验差。
In the above IoT device configuration solution, each IoT device needs to go through the above steps to complete the configuration. The user operation is cumbersome and the configuration process is complicated. When a large number of smart devices need to be configured, the user needs to repeat the cumbersome configuration operations, the configuration efficiency is low, and the user experience is poor.
本申请实施例还提供了一种IoT设备配网方法,能够在批量配网IoT设备的同时,自动确定IoT设备的空间归属,简化了用户操作,有效提高配网效率和用户的使用体验。下面对该IoT设备配网方法进行详细介绍。The embodiment of the present application also provides an IoT device network configuration method, which can automatically determine the spatial ownership of IoT devices while configuring IoT devices in batches, thereby simplifying user operations and effectively improving network configuration efficiency and user experience. The IoT device network configuration method is described in detail below.
首先对该IoT设备配网方法应用的通信系统10进行介绍。First, the communication system 10 to which the IoT device networking method is applied is introduced.
示例性的,图1A示出了本申请实施例提供的一种通信系统10的系统架构,通信系统10所处地理环境包括一或多个预设空间,每个预设空间设置了一个锚点设备。如图1A所示,通信系统10包括用户的至少一个终端设备(例如终端设备100),至少一个预设空间的锚点设备(例如锚点设备200,锚点设备300),以及与各锚点设备在同一预设空间的IoT设备。例如,与锚点设备200在同一预设空间的IoT设备400,与锚点设备300在同一预设空间的IoT设备500。Exemplarily, FIG1A shows a system architecture of a communication system 10 provided in an embodiment of the present application, wherein the geographical environment in which the communication system 10 is located includes one or more preset spaces, and an anchor device is set in each preset space. As shown in FIG1A , the communication system 10 includes at least one terminal device of the user (e.g., terminal device 100), at least one anchor device in a preset space (e.g., anchor device 200, anchor device 300), and an IoT device in the same preset space as each anchor device. For example, an IoT device 400 in the same preset space as the anchor device 200, and an IoT device 500 in the same preset space as the anchor device 300.
示例性地,以通信系统10应用于图1B所示的智能家居场景为例进行说明。智能家居场景包括多个房间,用户可以通过终端设备100的智能家居APP设置各房间的锚点设备(例如,设置客厅的锚点设备200,设置卧室的锚点设备300),进而可以通过各房间的锚点设备检测本房间中待配网的IoT设备,对其进行配网;并在配网成功后,在智能家居APP中显示配网后的IoT设备的所属房间。可以理解,锚点设备200检测到的IoT设备的所属房间即为锚点设备200对应的房间。Exemplarily, the application of the communication system 10 to the smart home scene shown in FIG. 1B is used as an example for explanation. The smart home scene includes multiple rooms. The user can set the anchor device of each room through the smart home APP of the terminal device 100 (for example, set the anchor device 200 in the living room and the anchor device 300 in the bedroom), and then detect the IoT device to be networked in the room through the anchor device of each room, and network it; and after the network is successfully networked, the room to which the networked IoT device belongs is displayed in the smart home APP. It can be understood that the room to which the IoT device detected by the anchor device 200 belongs is the room corresponding to the anchor device 200.
在一些实施例中,终端设备100和各锚点设备具有近距离通信模块1。通过该近距离通信模块1,终端设备100可以和各房间的锚点设备建立无线通信连接,与锚点设备直接通信。例如,终端设备100向锚点设备200发送添加IoT设备的检测请求;锚点设备200向终端设备100反馈检测到的同房间的IoT设备的配网完成信息。In some embodiments, the terminal device 100 and each anchor device have a short-range communication module 1. Through the short-range communication module 1, the terminal device 100 can establish a wireless communication connection with the anchor device in each room and communicate directly with the anchor device. For example, the terminal device 100 sends a detection request to add an IoT device to the anchor device 200; the anchor device 200 feeds back the network configuration completion information of the detected IoT device in the same room to the terminal device 100.
近距离通信模块1可以包括无线保真(wireless fidelity,WiFi)通信模块、蓝牙通信模块、红外线通信模块、超宽带通信模块、ZigBee通信模块等中的一项或多项。在一种实现方式中,终端设备100可以通过近距离通信模块1发射信号来探测、扫描终端设备100附近的锚点设备(例如锚点设备200和锚点设备300),使得终端设备100可以通过近距离无线通信协议发现附近的锚点设备,并与附近的锚点设备建立无线通信连接,进而可以与附近的锚点设备直接进行数据传输。The short-range communication module 1 may include one or more of a wireless fidelity (WiFi) communication module, a Bluetooth communication module, an infrared communication module, an ultra-wideband communication module, a ZigBee communication module, etc. In one implementation, the terminal device 100 may transmit a signal through the short-range communication module 1 to detect and scan the anchor devices (such as the anchor device 200 and the anchor device 300) near the terminal device 100, so that the terminal device 100 may discover the nearby anchor devices through the short-range wireless communication protocol, and establish a wireless communication connection with the nearby anchor devices, and then directly transmit data with the nearby anchor devices.
在一些实施例中,参考图1A,终端设备100和各锚点设备也可以通过通信网络中的至少一个电子设备间接通信,上述通信网络包括局域网(local area network,LAN)和/或广域网(wide area network,WAN)。在一种实现方式中,终端设备100和各锚点设备可以基于有线连接和/或无线连接(例如WiFi连接、蓝牙连接等)的连接方式,通过至少一个电子设备连接至局域网,以实现间接通信;上述至少一个电子设备可以包括路由器、中枢网关600、智能设备控制器等设备。示例性的,参考图1C,终端设备100为中控设备100,上述至少一个电子设备包括中枢网关600,各锚点设备为从网关;中控设备可以通过中枢网关600与从网关间接通信,进而可以控制各从网关检测同房间的IoT设备,并对其进行配网。可选的,中控设备、中枢网关600和从网关均为mesh组网中的节点。In some embodiments, referring to FIG1A , the terminal device 100 and each anchor device may also communicate indirectly through at least one electronic device in a communication network, and the communication network includes a local area network (LAN) and/or a wide area network (WAN). In one implementation, the terminal device 100 and each anchor device may be connected to the local area network through at least one electronic device based on a wired connection and/or a wireless connection (such as a WiFi connection, a Bluetooth connection, etc.) to achieve indirect communication; the at least one electronic device may include a router, a hub gateway 600, an intelligent device controller, and other devices. Exemplarily, referring to FIG1C , the terminal device 100 is a central control device 100, the at least one electronic device includes a hub gateway 600, and each anchor device is a slave gateway; the central control device may communicate indirectly with the slave gateway through the hub gateway 600, and then control each slave gateway to detect IoT devices in the same room and configure the network for them. Optionally, the central control device, the hub gateway 600, and the slave gateway are all nodes in the mesh network.
在一种实现方式中,终端设备100和各锚点设备还可以通过广域网(例如互联网)中的至少一个电子设备(例如服务器700)进行间接通信;服务器700可以是一或多台硬件服务器或植入虚拟化环境中的云端服务器等设备。示例性的,服务器700包括智能家居APP的应用服务器,终端设备100可以通过上述应用服务器与各锚点设备间接通信,进而可以远程控制各锚点设备检测同房间的IoT设备,并对其进行配网。In one implementation, the terminal device 100 and each anchor device can also communicate indirectly through at least one electronic device (e.g., server 700) in a wide area network (e.g., the Internet); the server 700 can be one or more hardware servers or cloud servers embedded in a virtualized environment. Exemplarily, the server 700 includes an application server of a smart home APP, and the terminal device 100 can communicate indirectly with each anchor device through the above application server, and then remotely control each anchor device to detect IoT devices in the same room and configure the network for them.
本申请实施例中,IoT设备和各锚点设备均具有近距离通信模块2;以锚点设备200为例,通过近距离通信模块2接收到的信号,锚点设备200可以检测同房间的待配网的IoT设备,并向其发送配网信息。近距离通信模块2可以参考前述近距离通信模块1的相关描述,近距离通信模块2和近距离通信模块1可以相同,也可以不同。In the embodiment of the present application, the IoT device and each anchor device have a short-distance communication module 2; taking the anchor device 200 as an example, through the signal received by the short-distance communication module 2, the anchor device 200 can detect the IoT device to be networked in the same room and send the network configuration information to it. The short-distance communication module 2 can refer to the relevant description of the short-distance communication module 1 mentioned above, and the short-distance communication module 2 and the short-distance communication module 1 can be the same or different.
在一些实施例中,通信系统10还包括各房间对应的预设网络(例如WiFi网络)的接入设备,IoT设备和接入设备均具有近距离通信模块3(例如WiFi通信模块);锚点设备200发送的配网信息用于接入本房间对应的接入设备(例如接入设备800)。示例性的,基于配网信息,IoT设备400的WiFi通信模块与接入设备800建立通信连接后,IoT设备400即接入了WiFi网络;终端设备100可以通过接入设备800控制IoT设备400。任意两个房间可以对应相同的接入设备,也可以对应不同的接入设备,此处不做具体限定。在一些实施例中,一个房间对应的接入设备与锚点设备可以为同一设备,后续实施例以此为例进行示例性说明。接入设备与终端设备100的通信方式可以参考锚点设备200的相关描述,此处不再赘述。In some embodiments, the communication system 10 also includes an access device for a preset network (e.g., a WiFi network) corresponding to each room, and both the IoT device and the access device have a short-range communication module 3 (e.g., a WiFi communication module); the network configuration information sent by the anchor device 200 is used to access the access device corresponding to the room (e.g., the access device 800). Exemplarily, based on the network configuration information, after the WiFi communication module of the IoT device 400 establishes a communication connection with the access device 800, the IoT device 400 is connected to the WiFi network; the terminal device 100 can control the IoT device 400 through the access device 800. Any two rooms can correspond to the same access device or different access devices, which is not specifically limited here. In some embodiments, the access device corresponding to a room and the anchor device can be the same device, and the subsequent embodiments are exemplified by taking this as an example. The communication method between the access device and the terminal device 100 can refer to the relevant description of the anchor device 200, which will not be repeated here.
近距离通信模块3可以参考近距离通信模块1的相关描述,近距离通信模块1、近距离通信模块2和近距离通信模块3可以相同,也可以不同,本申请实施例对此不做具体限定。可选的,近距离通信模块2
和近距离通信模块3,均为WiFi通信模块或蓝牙通信模块。可选的,近距离通信模块2为蓝牙通信模块,近距离通信模块3为WiFi通信模块。可选的,近距离通信模块2为WiFi通信模块,近距离通信模块3为蓝牙通信模块。The short-distance communication module 3 can refer to the relevant description of the short-distance communication module 1. The short-distance communication module 1, the short-distance communication module 2 and the short-distance communication module 3 can be the same or different, and the embodiment of the present application does not specifically limit this. and the short-distance communication module 3 are both WiFi communication modules or Bluetooth communication modules. Optionally, the short-distance communication module 2 is a Bluetooth communication module, and the short-distance communication module 3 is a WiFi communication module. Optionally, the short-distance communication module 2 is a WiFi communication module, and the short-distance communication module 3 is a Bluetooth communication module.
不限于智能家居场景,上述通信系统10还可以应用于其他场景,例如智能办公场景,此处不做具体限定。Not limited to smart home scenarios, the above-mentioned communication system 10 can also be applied to other scenarios, such as smart office scenarios, which are not specifically limited here.
本申请对终端设备100的类型不做具体限定。在一些实施例中,终端设备100可以是手机、可穿戴设备(例如,智能手环)、平板电脑、膝上型计算机(laptop)、手持计算机、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、蜂窝电话、个人数字助理(personal digital assistant,PDA)、增强现实(Augmented reality,AR)\虚拟现实(virtual reality,VR)设备、可穿戴式设备(例如智能手表)、车载设备、智能家居场景的中控设备等电子设备。终端设备100的示例性实施例包括但不限于搭载
或者其它操作系统的电子设备。The present application does not specifically limit the type of terminal device 100. In some embodiments, the terminal device 100 may be a mobile phone, a wearable device (e.g., a smart bracelet), a tablet computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a cellular phone, a personal digital assistant (PDA), an augmented reality (AR)/virtual reality (VR) device, a wearable device (e.g., a smart watch), a vehicle-mounted device, a central control device for a smart home scene, and other electronic devices. Exemplary embodiments of the terminal device 100 include but are not limited to devices equipped with Or other electronic devices with operating systems.
本申请对IoT设备的类型也不做具体限定。在一些实施例中,IoT设备可以是智能电灯、智能音箱、智能电视机、智能窗帘、智能门锁、智能冰箱、智能空调、车载设备、打印机、投影仪、智能插座、智能空气净化器、智能摄像头、智能闹钟、扫地机器人等设备。This application does not specifically limit the types of IoT devices. In some embodiments, IoT devices can be smart lights, smart speakers, smart TVs, smart curtains, smart door locks, smart refrigerators, smart air conditioners, car equipment, printers, projectors, smart sockets, smart air purifiers, smart cameras, smart alarm clocks, sweeping robots, and other devices.
本申请实施例中,锚点设备可以是具备前述锚点设备可以实现的功能的任意电子设备。例如,锚点设备可以是路由器、网关或中枢网关,也可以是IoT设备,也可以是终端设备,本申请实施例对此也不做具体限定。In the embodiments of the present application, the anchor device may be any electronic device having the functions that the aforementioned anchor device can implement. For example, the anchor device may be a router, a gateway or a central gateway, or an IoT device, or a terminal device, and the embodiments of the present application do not specifically limit this.
下面对本申请实施例涉及的终端设备100的结构进行介绍。本申请实施例涉及的锚点设备和IoT设备的结构可以参考终端设备100的相关描述,后续不再赘述。The structure of the terminal device 100 involved in the embodiment of the present application is introduced below. The structures of the anchor device and the IoT device involved in the embodiment of the present application can refer to the relevant description of the terminal device 100, and will not be repeated later.
图2示出了终端设备100的结构示意图。FIG. 2 shows a schematic structural diagram of the terminal device 100 .
终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。The terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
可以理解的是,本发明实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (SIM) interface, and/or a universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C
接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through I2C bus interfaces. The interface is coupled to the touch sensor 180K, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the terminal device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit an audio signal to the wireless communication module 160 through the UART interface to implement the function of playing music through a Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the terminal device 100.
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
The mobile communication module 150 can provide solutions for wireless communications including 2G/3G/4G/5G applied to the terminal device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号解调以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) and the like applied on the terminal device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, demodulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise and brightness of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in multiple coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经
元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor that draws on the structure of biological neural networks, such as the human brain neural network. The NPU can realize intelligent cognition of the terminal device 100, such as image recognition, face recognition, voice recognition, text understanding, etc.
内部存储器121可以包括一个或多个随机存取存储器(random access memory,RAM)和一个或多个非易失性存储器(non-volatile memory,NVM)。The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM).
随机存取存储器可以包括静态随机存储器(static random-access memory,SRAM)、动态随机存储器(dynamic random access memory,DRAM)、同步动态随机存储器(synchronous dynamic random access memory,SDRAM)、双倍资料率同步动态随机存取存储器(double data rate synchronous dynamic random access memory,DDR SDRAM,例如第五代DDR SDRAM一般称为DDR5SDRAM)等;非易失性存储器可以包括磁盘存储器件、快闪存储器(flash memory)。Random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM, for example, the fifth generation DDR SDRAM is generally referred to as DDR5 SDRAM), etc.; non-volatile memory may include disk storage devices and flash memory (flash memory).
快闪存储器按照运作原理划分可以包括NOR FLASH、NAND FLASH、3D NAND FLASH等,按照存储单元电位阶数划分可以包括单阶存储单元(single-level cell,SLC)、多阶存储单元(multi-level cell,MLC)、三阶储存单元(triple-level cell,TLC)、四阶储存单元(quad-level cell,QLC)等,按照存储规范划分可以包系统括通用闪存存储(英文:universal flash storage,UFS)、嵌入式多媒体存储卡(embedded multi media Card,eMMC)等。Flash memory can be divided into NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. according to the operating principle. It can be divided into single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), quad-level cell (QLC), etc. according to the storage unit potential level. According to the storage specification, it can include universal flash storage (UFS), embedded multi media Card (eMMC), etc.
随机存取存储器可以由处理器110直接进行读写,可以用于存储操作系统或其他正在运行中的程序的可执行程序(例如机器指令),还可以用于存储用户及应用程序的数据等。The random access memory can be directly read and written by the processor 110, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data, etc.
非易失性存储器也可以存储可执行程序和存储用户及应用程序的数据等,可以提前加载到随机存取存储器中,用于处理器110直接进行读写。The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 110 .
外部存储器接口120可以用于连接外部的非易失性存储器,实现扩展终端设备100的存储能力。外部的非易失性存储器通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部的非易失性存储器中。The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the terminal device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。The speaker 170A, also called a "horn", is used to convert audio electrical signals into sound signals.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
耳机接口170D用于连接有线耳机。The earphone jack 170D is used to connect a wired earphone.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
陀螺仪传感器180B可以用于确定组播源100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定组播源100围绕三个轴(即,x,y和z轴)的角速度。The gyroscope sensor 180B may be used to determine the motion posture of the multicast source 100. In some embodiments, the angular velocity of the multicast source 100 around three axes (ie, x, y, and z axes) may be determined by the gyroscope sensor 180B.
气压传感器180C用于测量气压。The air pressure sensor 180C is used to measure air pressure.
磁传感器180D包括霍尔传感器。The magnetic sensor 180D includes a Hall sensor.
加速度传感器180E可检测组播源100在各个方向上(一般为三轴)加速度的大小。当组播源100静止时可检测出重力的大小及方向。还可以用于识别终端设备的姿态。The acceleration sensor 180E can detect the magnitude of acceleration of the multicast source 100 in various directions (generally three axes). When the multicast source 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the terminal device.
距离传感器180F,用于测量距离。组播源100可以通过红外或激光测量距离。The distance sensor 180F is used to measure the distance. The multicast source 100 can measure the distance by infrared or laser.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode.
环境光传感器180L用于感知环境光亮度。组播源100可以根据感知的环境光亮度自适应调节显示屏194亮度。The ambient light sensor 180L is used to sense the brightness of the ambient light. The multicast source 100 can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of the ambient light.
指纹传感器180H用于采集指纹。The fingerprint sensor 180H is used to collect fingerprints.
温度传感器180J用于检测温度。在一些实施例中,组播源100利用温度传感器180J检测的温度,执行温度处理策略。The temperature sensor 180J is used to detect temperature. In some embodiments, the multicast source 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与
触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于组播源100的表面,与显示屏194所处的位置不同。The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. The display screen 194 can provide Visual output related to touch operation In other embodiments, the touch sensor 180K may also be disposed on the surface of the multicast source 100 , which is different from the location of the display screen 194 .
骨传导传感器180M可以获取振动信号。Bone conduction sensor 180M can obtain vibration signals.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。组播源100可以接收按键输入,产生与组播源100的用户设置以及功能控制有关的键信号输入。The button 190 includes a power button, a volume button, etc. The button 190 may be a mechanical button or a touch button. The multicast source 100 may receive a button input and generate a key signal input related to the user settings and function control of the multicast source 100.
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 may be an indicator light, which may be used to indicate the charging status, power changes, messages, missed calls, notifications, etc.
SIM卡接口195用于连接SIM卡。The SIM card interface 195 is used to connect a SIM card.
下面以智能家居场景为例,对上述IoT设备配网方法的应用场景进行示例性介绍。The following uses a smart home scenario as an example to illustrate the application scenarios of the IoT device networking method.
在一些实施例中,用户可以通过终端设备100设置各房间的锚点设备,进而可以一键触发各房间的锚点设备批量性地检测各房间的IoT设备。In some embodiments, the user can set the anchor device for each room through the terminal device 100, and then trigger the anchor device for each room with one click to batch detect the IoT devices in each room.
示例性的,图3A至图3F示出了通过智能家居APP设置各房间的锚点设备的相关界面。Exemplarily, FIG. 3A to FIG. 3F show the relevant interfaces for setting the anchor devices of each room through the smart home APP.
示例性的,图3A示出了终端设备100上的用于展示安装的APP的主界面11。主界面11可以包括:状态栏101,具有常用应用程序图标的托盘102,以及其他应用程序图标103。其中:具有常用应用程序图标的托盘102可展示:电话图标、联系人图标、短信图标、相机图标。其他应用程序图标103可展示:智能家居图标103A、图库图标、音乐图标、邮箱图像、设置图标、备忘录图标等。主界面11还可包括页面指示符104。其他应用程序图标可分布在多个页面,页面指示符104可用于指示用户当前查看的是哪一个页面中的应用程序。用户可以左右滑动其他应用程序图标的区域,来查看其他页面中的应用程序图标。Exemplarily, FIG3A shows a main interface 11 for displaying installed APPs on a terminal device 100. The main interface 11 may include: a status bar 101, a tray 102 with commonly used application icons, and other application icons 103. Among them: the tray 102 with commonly used application icons can display: phone icons, contact icons, text message icons, camera icons. Other application icons 103 can display: smart home icons 103A, gallery icons, music icons, mailbox images, settings icons, memo icons, etc. The main interface 11 may also include a page indicator 104. Other application icons may be distributed on multiple pages, and the page indicator 104 may be used to indicate which page the user is currently viewing the application in. The user can slide the area of other application icons left and right to view application icons in other pages.
如图3A和图3B所示,检测到用户点击智能家居图标103A后,终端设备100显示智能家居APP的用户界面12。用户界面12包括全部设备选项201、分类设备选项202;分类设备选项202处于选中状态时,用户界面12还包括各房间的显示区,例如客厅显示区和卧室显示区。在一些实施例中,受限于终端设备100的显示尺寸,用户界面12不能显示所有房间的显示区时,用户可以通过向左、向右或向下的滑动的操作,查看更多房间的显示区。As shown in FIG3A and FIG3B , after detecting that the user clicks the smart home icon 103A, the terminal device 100 displays the user interface 12 of the smart home APP. The user interface 12 includes an all device option 201 and a classified device option 202; when the classified device option 202 is selected, the user interface 12 also includes display areas for each room, such as a living room display area and a bedroom display area. In some embodiments, when the user interface 12 cannot display the display areas of all rooms due to the display size of the terminal device 100, the user can view the display areas of more rooms by sliding left, right, or downward.
一个房间的显示区包括该房间的房间名称;该房间已设置锚点设备时,显示区还包括锚点设备的设备标识;该房间未设置锚点设备时,显示区还包括锚点设备的添加控件;该房间添加有已配网的IoT设备时,显示区还包括该IoT设备的设备标识。如图3B所示,客厅显示区包括客厅名称203、客厅锚点设备的设备标识204;卧室显示区包括卧室名称205、锚点设备的添加控件206。用户可以编辑各房间的房间名称。The display area of a room includes the room name of the room; when the room has an anchor device set up, the display area also includes the device identifier of the anchor device; when the room has no anchor device set up, the display area also includes an add control for the anchor device; when the room has a networked IoT device added, the display area also includes the device identifier of the IoT device. As shown in FIG3B , the living room display area includes the living room name 203 and the device identifier 204 of the living room anchor device; the bedroom display area includes the bedroom name 205 and the add control 206 for the anchor device. Users can edit the room names of each room.
如图3B和图3C所示,检测到用户点击锚点设备的添加控件206后,终端设备100利用近距离通信模块1(例如WiFi通信模块)扫描附近具备锚点设备能力的电子设备,并显示提示信息207,提示信息207用于提示正在扫描卧室的锚点设备;如图3D所示,终端设备100显示扫描到的电子设备的选项(例如路由器xxx的选项208、路由器yyy的选项209、电视zzz的选项210),以及设置控件211。As shown in Figures 3B and 3C, after detecting that the user clicks on the add control 206 of the anchor device, the terminal device 100 uses the short-range communication module 1 (such as a WiFi communication module) to scan nearby electronic devices with anchor device capabilities and displays a prompt message 207. The prompt message 207 is used to prompt that the anchor device in the bedroom is being scanned; as shown in Figure 3D, the terminal device 100 displays options for the scanned electronic devices (such as option 208 for router xxx, option 209 for router yyy, option 210 for TV zzz), as well as setting controls 211.
如图3D和图3E所示,检测到用户点击路由器xxx的选项208后,终端设备100将选项208由未选中状态切换为选中状态;如图3E和图3F所示,检测到用户选择至少一个设备的选项(例如选项208)后,点击设置控件211的操作;响应于上述操作,终端设备100将路由器xxx设置为卧室锚点设备,并在卧室显示区显示路由器xxx的设备标识212。As shown in Figures 3D and 3E, after detecting that the user clicks on option 208 of router xxx, the terminal device 100 switches option 208 from an unselected state to a selected state; as shown in Figures 3E and 3F, after detecting that the user selects an option for at least one device (such as option 208), the operation of clicking on the setting control 211 is clicked; in response to the above operation, the terminal device 100 sets the router xxx as the bedroom anchor device, and displays the device identification 212 of the router xxx in the bedroom display area.
本申请实施例中,具有锚点设备能力的电子设备可以是路由器、IoT设备、用户的终端设备等,本申请实施例对锚点设备的设备类型不做具体限定。在一种实现方式中,以WiFi通信模块为例,终端设备100利用WiFi通信模块扫描附近具备锚点设备能力的路由器xxx,包括:路由器xxx开机后或者路由器xxx接收用户的启动操作后,通过WiFi通信模块定时广播探测信号,探测信号携带能力标识;终端设备100扫描到路由器xxx的探测信号,基于上述能力标识可以确定路由器xxx是否具备锚点设备能力。In the embodiment of the present application, the electronic device with the anchor device capability may be a router, an IoT device, a user's terminal device, etc., and the embodiment of the present application does not specifically limit the device type of the anchor device. In one implementation, taking the WiFi communication module as an example, the terminal device 100 uses the WiFi communication module to scan the nearby router xxx with the anchor device capability, including: after the router xxx is turned on or after the router xxx receives the user's startup operation, the WiFi communication module broadcasts a detection signal at a fixed time, and the detection signal carries a capability identifier; the terminal device 100 scans the detection signal of the router xxx, and based on the above capability identifier, it can determine whether the router xxx has the anchor device capability.
不限于图3A至图3E所描述的方式,本申请实施例还可以通过其他方式,设置各房间的锚点设备,此处不做具体限定。Not limited to the methods described in FIG. 3A to FIG. 3E , the embodiments of the present application may also set anchor devices in each room through other methods, which are not specifically limited here.
示例性的,图4A至图4C示出了通过智能家居APP一键触发各房间的锚点设备检测同房间的IoT设备的相关界面。Exemplarily, FIG. 4A to FIG. 4C show the relevant interfaces of triggering the anchor device in each room to detect the IoT device in the same room with one click through the smart home APP.
如图3F和图4A所示,智能家居APP的用户界面12还包括添加控件301;终端设备100检测到作用于添加控件301的操作(例如点击操作);响应于上述输入操作,终端设备100向各房间的锚点设备发送
检测请求,以触发锚点设备检测同房间内待配网的IoT设备;并在各房间的显示区显示提示信息(例如客厅显示区的提示信息302和卧室显示区的提示信息303),以提示该房间的锚点设备正在扫描IoT设备。上述提示信息的显示形式可以包括文字、图片、动画中一或多种。As shown in FIG. 3F and FIG. 4A , the user interface 12 of the smart home APP further includes an add control 301; the terminal device 100 detects an operation (such as a click operation) acting on the add control 301; in response to the above input operation, the terminal device 100 sends a signal to the anchor device in each room. The detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room; and prompt information is displayed in the display area of each room (for example, prompt information 302 in the living room display area and prompt information 303 in the bedroom display area) to prompt that the anchor device in the room is scanning the IoT device. The display form of the above prompt information may include one or more of text, pictures, and animations.
如图4B所示,各房间的锚点设备检测到本房间存在待配网的IoT设备的情况下,向终端设备100反馈该IoT设备的设备信息1;基于设备信息1,终端设备100在各房间显示区显示检测到的IoT设备的设备标识。设备信息1可以包括设备类型、设备图标、设备名称、设备型号中的一或多个。例如,在客厅显示区显示电灯1的设备标识304,在卧室显示区显示电灯2的设备标识305,设备标识包括设备类型和设备图标。As shown in FIG4B , when the anchor device in each room detects that there is an IoT device to be networked in the room, it feeds back the device information 1 of the IoT device to the terminal device 100; based on the device information 1, the terminal device 100 displays the device identification of the detected IoT device in the display area of each room. The device information 1 may include one or more of the device type, device icon, device name, and device model. For example, the device identification 304 of lamp 1 is displayed in the living room display area, and the device identification 305 of lamp 2 is displayed in the bedroom display area. The device identification includes the device type and the device icon.
锚点设备检测到本房间存在待配网的IoT设备后,向该IoT设备发送配网信息;基于配网信息完成配网后,IoT设备接入网络;终端设备100与IoT设备可以间接连接,进而可以通过智能家居APP控制该IoT设备。在一些实施例中,如图4B所示,IoT设备配网完成前,终端设备100还可以显示检测到的IoT设备的连接进度,该连接进度也可以理解为IoT设备的配网进度;例如,在客厅显示区显示电灯1的连接进度306,在卧室显示区显示电灯2的连接进度307。After the anchor device detects that there is an IoT device to be networked in this room, it sends the network configuration information to the IoT device; after the network configuration is completed based on the network configuration information, the IoT device accesses the network; the terminal device 100 can be indirectly connected to the IoT device, and then the IoT device can be controlled through the smart home APP. In some embodiments, as shown in FIG4B , before the network configuration of the IoT device is completed, the terminal device 100 can also display the connection progress of the detected IoT device, which can also be understood as the network configuration progress of the IoT device; for example, the connection progress 306 of the light 1 is displayed in the living room display area, and the connection progress 307 of the light 2 is displayed in the bedroom display area.
在一些实施例中,以客厅的电灯1为例,电灯1的设备标识304有两种显示状态,即连接中状态和连接成功状态。示例性的,图4B所示的设备标识304呈现连接中状态;如图4C所示,终端设备100检测到电灯1连接成功(即配网完成)后,设备标识304的显示状态切换为连接成功状态。在一种实现方式中,客厅的锚点设备200与电灯1建立通信连接后,向终端设备100发送配网完成信息,配网完成信息用于指示电灯1已完成配网;终端设备100基于该配网完成信息确定电灯1配网完成。In some embodiments, taking the light bulb 1 in the living room as an example, the device identification 304 of the light bulb 1 has two display states, namely, the connecting state and the connection success state. Exemplarily, the device identification 304 shown in FIG4B is in the connecting state; as shown in FIG4C, after the terminal device 100 detects that the light bulb 1 is successfully connected (i.e., the network configuration is completed), the display state of the device identification 304 switches to the connection success state. In one implementation, after the anchor device 200 in the living room establishes a communication connection with the light bulb 1, it sends a network configuration completion message to the terminal device 100, and the network configuration completion message is used to indicate that the light bulb 1 has completed the network configuration; the terminal device 100 determines that the network configuration of the light bulb 1 is completed based on the network configuration completion message.
在一些实施例中,无需显示图4B,即无需呈现连接中的IoT设备和连接进度,各房间的锚点设备检测到本房间存在待配网的IoT设备,并针对该IoT设备配网完成后,才向终端设备100反馈该IoT设备的设备信息1;终端设备100直接显示图4C所示的连接成功状态的IoT设备的设备标识。In some embodiments, there is no need to display Figure 4B, that is, there is no need to present the connected IoT devices and the connection progress. The anchor device in each room detects that there is an IoT device to be networked in the room, and only after the network configuration of the IoT device is completed, will it feedback the device information 1 of the IoT device to the terminal device 100; the terminal device 100 directly displays the device identification of the IoT device in the successfully connected state shown in Figure 4C.
在一些实施例中,如图5所示,在添加各锚点设备检测到的本房间的IoT设备后,终端设备100检测到用户点击全部设备选项201;响应于上述点击操作,终端设备100在用户界面12中统一显示所有已配网的IoT设备的设备标识,即不按照房间分类显示。In some embodiments, as shown in Figure 5, after adding the IoT devices in the room detected by each anchor device, the terminal device 100 detects that the user clicks the all devices option 201; in response to the above click operation, the terminal device 100 uniformly displays the device identifications of all networked IoT devices in the user interface 12, that is, they are not displayed according to room classification.
本申请实施例中,房间显示区中的设备标识可以包括设备类型、设备子类型、设备图标、设备名称、设备型号中的一或多个。下面介绍本申请实施例涉及的设备标识的多种实现方式。In the embodiment of the present application, the device identification in the room display area may include one or more of the device type, device subtype, device icon, device name, and device model. The following introduces various implementation methods of the device identification involved in the embodiment of the present application.
在一种实现方式中,确定IoT设备配网成功后,IoT设备的设备标识还可以包括该IoT设备所属的房间。示例性的,如图4C所示,客厅显示区的电灯1的设备标识304包括“客厅”,卧室显示区的电灯2的设备标识305包括“卧室”。In one implementation, after determining that the IoT device is successfully networked, the device identification of the IoT device may also include the room to which the IoT device belongs. For example, as shown in FIG4C , the device identification 304 of the lamp 1 in the living room display area includes “living room”, and the device identification 305 of the lamp 2 in the bedroom display area includes “bedroom”.
在一种实现方式中,锚点设备反馈的IoT设备的设备信息1包括设备类型;参见图4C所示的电灯1的设备标识304,设备标识可以包括设备类型和该设备类型对应的设备图标;各设备类型对应的设备图标可以是终端设备100或用户预设的。IoT设备的设备类型可以包括:电灯、音箱、空调、电视机、冰箱等。In one implementation, the device information 1 of the IoT device fed back by the anchor device includes the device type; referring to the device identification 304 of the electric lamp 1 shown in FIG4C , the device identification may include the device type and the device icon corresponding to the device type; the device icon corresponding to each device type may be the terminal device 100 or a user preset device. The device types of IoT devices may include: electric lamps, speakers, air conditioners, televisions, refrigerators, etc.
在一种实现方式中,锚点设备反馈的IoT设备的设备信息1包括设备子类型;参见图4C所示的设备标识a,设备标识包括设备子类型和设备子类型对应的设备图标;各设备子类型对应的设备图标可以是终端设备100或用户预设的。例如,电灯的子类型可以包括:台灯、吊灯、线性灯、串灯、落地灯等。如图4C所示,客厅的电灯1的设备子类型为吊灯,卧室的电灯2的设备子类型为台灯。In one implementation, the device information 1 of the IoT device fed back by the anchor device includes a device subtype; referring to the device identification a shown in FIG4C , the device identification includes a device subtype and a device icon corresponding to the device subtype; the device icon corresponding to each device subtype may be preset by the terminal device 100 or the user. For example, the subtypes of electric lamps may include: table lamps, chandeliers, linear lamps, string lamps, floor lamps, etc. As shown in FIG4C , the device subtype of the electric lamp 1 in the living room is a chandeliers, and the device subtype of the electric lamp 2 in the bedroom is a table lamp.
在一种实现方式中,锚点设备反馈的IoT设备的设备信息1包括设备型号;参见图4C所示的设备标识b,设备标识包括设备型号和设备图标;其中,设备图标可以是终端设备100基于设备型号在线获取的设备图片。In one implementation, the device information 1 of the IoT device fed back by the anchor device includes the device model; referring to the device identification b shown in FIG. 4C , the device identification includes the device model and the device icon; wherein the device icon may be a device picture obtained online by the terminal device 100 based on the device model.
在一种实现方式中,锚点设备反馈的IoT设备的设备信息1包括设备的状态参数,例如电灯的状态参数可以包括开关状态、颜色、色温、亮度等中的一或多项;参见图4C所示的设备标识c,设备标识包括设备信息1指示的至少一种状态参数。如图4B所示,客厅吊灯的设备标识c包括开关状态(即关闭),卧室台灯的设备标识c包括开关状态(即开启)。In one implementation, the device information 1 of the IoT device fed back by the anchor device includes the state parameters of the device. For example, the state parameters of the electric light may include one or more of the switch state, color, color temperature, brightness, etc. Referring to the device identification c shown in FIG4C , the device identification includes at least one state parameter indicated by the device information 1. As shown in FIG4B , the device identification c of the living room chandelier includes the switch state (i.e., off), and the device identification c of the bedroom table lamp includes the switch state (i.e., on).
图4A至图4C所示的配网方式,是用户通过图4A所示的添加控件301一键触发各锚点设备检测本房间的待配网的IoT设备。在一些实施例中,无需用户操作,也可以自动触发锚点设备进行IoT设备检测和配网,从而实现用户无感配网。
The network configuration method shown in Figures 4A to 4C is that the user triggers each anchor device to detect the IoT device to be configured in the room with one click through the add control 301 shown in Figure 4A. In some embodiments, the anchor device can also be automatically triggered to perform IoT device detection and network configuration without user operation, thereby realizing user-free network configuration.
在一些实施例中,无需用户操作,终端设备100可以自动发送检测请求,以触发各锚点设备进行IoT设备检测和配网。在一些实施例中,无需终端设备100发送检测请求,各锚点设备也可以自动触发IoT设备检测和配网。In some embodiments, without user operation, the terminal device 100 can automatically send a detection request to trigger each anchor device to perform IoT device detection and network configuration. In some embodiments, without the terminal device 100 sending a detection request, each anchor device can also automatically trigger IoT device detection and network configuration.
示例性的,如图6A所示,通过上述自动触发锚点设备进行IoT设备检测的配网方式,各锚点设备检测到同房间的IoT设备,并对IoT设备配网后,向终端设备100发送配网完成信息;终端设备100基于该配网完成信息显示提示信息411,提示信息411用于提示IoT设备(例如客厅音箱、客厅吊灯和卧室台灯)已自动添加完成。如图6A和图6B所示,检测到用户作用于提示信息411的操作(例如点击操作)后,终端设备100显示智能家居APP的用户界面12,用户界面12包括各房间显示区,通过每个房间显示区可以查看该房间最新添加的IoT设备。Exemplarily, as shown in FIG6A, through the above-mentioned network configuration method of automatically triggering the anchor device to detect the IoT device, each anchor device detects the IoT device in the same room, and after configuring the IoT device, sends the network configuration completion information to the terminal device 100; the terminal device 100 displays the prompt information 411 based on the network configuration completion information, and the prompt information 411 is used to prompt that the IoT device (such as the living room speaker, the living room chandelier and the bedroom table lamp) has been automatically added. As shown in FIG6A and FIG6B, after detecting the user's operation (such as a click operation) on the prompt information 411, the terminal device 100 displays the user interface 12 of the smart home APP, and the user interface 12 includes each room display area, and each room display area can be used to view the latest IoT device added to the room.
本申请实施例中,终端设备100的智能家居APP,可以基于IoT设备的配网完成信息绑定该IoT设备,显示该IoT设备的设备标识;然后,用户通过智能家居APP可以控制该IoT设备。示例性的,以卧室台灯为例,图7示出了IoT设备配网完成后,终端设备100控制该IoT设备的相关界面。In the embodiment of the present application, the smart home APP of the terminal device 100 can bind the IoT device based on the network configuration information of the IoT device and display the device identification of the IoT device; then, the user can control the IoT device through the smart home APP. For example, taking the bedroom table lamp as an example, FIG7 shows the relevant interface of the terminal device 100 controlling the IoT device after the network configuration of the IoT device is completed.
如图7所示,用户界面12的卧室显示区显示有卧室台灯的设备标识305;检测到用户点击卧室台灯的设备标识305后,终端设备100显示卧室台灯的控制界面13,通过该控制界面13可以实时查看和控制卧室台灯的各种状态参数,例如开关状态(即开启或关闭)、颜色、色温、亮度、定时开关等。As shown in Figure 7, the bedroom display area of the user interface 12 displays the device logo 305 of the bedroom desk lamp; after detecting that the user clicks the device logo 305 of the bedroom desk lamp, the terminal device 100 displays the control interface 13 of the bedroom desk lamp, through which various status parameters of the bedroom desk lamp can be viewed and controlled in real time, such as the switch status (i.e., on or off), color, color temperature, brightness, timer switch, etc.
不限于智能家居APP的用户界面,本申请实施例还可以通过其他用户界面设置锚点设备和/或添加IoT设备。例如终端设备100在预设的系统界面(例如负一屏、控制屏)中设置有智能家居设备的控制卡片,用可以通过该控制卡片设置锚点设备和/或添加IoT设备;其中,负一屏通常是用户中心、搜索、应用推荐、新闻资讯推荐、情景智能服务等功能的聚合入口,控制屏通常用于展示控制终端设备100的各种快捷功能的开关图标。Not limited to the user interface of the smart home APP, the embodiments of the present application can also set anchor devices and/or add IoT devices through other user interfaces. For example, the terminal device 100 is provided with a control card for smart home devices in the preset system interface (such as the negative one screen, the control screen), and the user can set anchor devices and/or add IoT devices through the control card; wherein the negative one screen is usually an aggregate entrance for functions such as user center, search, application recommendation, news information recommendation, and scenario intelligent services, and the control screen is usually used to display switch icons for various shortcut functions of the terminal device 100.
示例性的,如图8A和图8B所示,检测到用户以状态栏为起点的向下滑动操作后,终端设备100显示控制屏14,控制屏14包括智能家居设备的控制卡片501。示例性的,如图9A和图9B所示,检测到用户作用于主界面11的向左滑动操作后,终端设备100显示负一屏15,负一屏15包括智能家居设备的控制卡片502。上述控制卡片501和控制卡片502可以包括智能家居APP的用户界面12的部分或全部功能,例如显示设置卧室锚点设备的添加控件503、触发检测IoT设备的添加控件504、已添加的IoT设备的设备标识等。Exemplarily, as shown in FIG8A and FIG8B, after detecting a downward sliding operation of the user starting from the status bar, the terminal device 100 displays a control screen 14, and the control screen 14 includes a control card 501 of the smart home device. Exemplarily, as shown in FIG9A and FIG9B, after detecting a left sliding operation of the user acting on the main interface 11, the terminal device 100 displays a negative screen 15, and the negative screen 15 includes a control card 502 of the smart home device. The above-mentioned control card 501 and control card 502 may include some or all functions of the user interface 12 of the smart home APP, such as displaying an add control 503 for setting a bedroom anchor device, an add control 504 for triggering detection of IoT devices, and device identification of added IoT devices.
基于前述通信系统和应用场景,下面对本申请实施例提供的IoT设备配网方法进行详细介绍。Based on the aforementioned communication system and application scenarios, the IoT device network configuration method provided in the embodiments of the present application is introduced in detail below.
本申请实施例提供的IoT设备配网方法中,各房间的锚点设备可以检测同房间的待配网的IoT设备;房间1的锚点设备200在对检测到的IoT设备400配网后,向终端设备100反馈的IoT设备400的配网完成信息;终端设备100可以确定IoT设备400所属房间为锚点设备200对应的房间。这样,可以对各房间的IoT设备400进行批量性配网,并自动确定IoT设备的所属房间;提高了IoT设备的配网效率,简化了用户操作,有效提高了用户体验。In the IoT device network configuration method provided in the embodiment of the present application, the anchor device in each room can detect the IoT device to be configured in the same room; after configuring the detected IoT device 400, the anchor device 200 in room 1 feeds back the completion information of the network configuration of the IoT device 400 to the terminal device 100; the terminal device 100 can determine that the room to which the IoT device 400 belongs is the room corresponding to the anchor device 200. In this way, the IoT devices 400 in each room can be configured in batches, and the rooms to which the IoT devices belong can be automatically determined; the network configuration efficiency of the IoT devices is improved, the user operation is simplified, and the user experience is effectively improved.
示例性的,图10示出了本申请实施例提供的一种IoT设备配网方法的流程示意图,该方法包括但不限于步骤S101至S108。Exemplarily, FIG10 shows a schematic flow chart of an IoT device network configuration method provided in an embodiment of the present application, the method including but not limited to steps S101 to S108.
S101、终端设备100检测到用户的输入操作1,输入操作1用于触发终端设备100添加IoT设备。S101. The terminal device 100 detects a user's input operation 1, where the input operation 1 is used to trigger the terminal device 100 to add an IoT device.
S102、终端设备100向房间1的锚点设备200发送检测请求,检测请求用于触发锚点设备检测同房间的待配网的IoT设备,并对检测到的IoT设备配网。S102. The terminal device 100 sends a detection request to the anchor device 200 in room 1. The detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room, and to network the detected IoT device.
在一些实施例中,响应于输入操作1,终端设备100向锚点设备200发送检测请求。In some embodiments, in response to input operation 1 , the terminal device 100 sends a detection request to the anchor device 200 .
示例性的,终端设备100安装有智能家居APP,参见图3F和图4A的相关描述,智能家居APP的用户界面12设置有添加控件301;输入操作1可以包括作用于上述添加控件301的操作(例如点击操作),输入操作1具体用于一键触发各房间的锚点设备检测同房间的待配网的IoT设备,并对其配网。如图4B所示,响应于输入操作1,终端设备100还可以显示提示信息(例如提示信息302、提示信息303),来提示各房间的锚点设备正在扫描IoT设备。不限于作用于添加控件301的操作,输入操作1还可以包括其他触摸操作、预设手势或语音指令,此处不做具体限定。Exemplarily, the terminal device 100 is installed with a smart home APP. Referring to the relevant description of FIG. 3F and FIG. 4A , the user interface 12 of the smart home APP is provided with an add control 301; the input operation 1 may include an operation (such as a click operation) acting on the above-mentioned add control 301, and the input operation 1 is specifically used to trigger the anchor device in each room to detect the IoT device to be networked in the same room with one click, and to network it. As shown in FIG. 4B , in response to the input operation 1, the terminal device 100 may also display prompt information (such as prompt information 302, prompt information 303) to prompt that the anchor device in each room is scanning the IoT device. Not limited to the operation acting on the add control 301, the input operation 1 may also include other touch operations, preset gestures or voice commands, which are not specifically limited here.
步骤S101是可选的。在一些实施例中,无需输入操作1,终端设备100可以定时发送检测请求,或在满足预设条件1时自动发送检测请求,以触发各锚点设备进行IoT设备检测和配网(即执行S103至S108)。上述定时周期可以是终端设备100或用户预设的,上述预设条件1可以包括终端设备100开机、用户通过
智能家居APP新增了锚点设备等条件中的至少一个。这种无需用户触发的自动配网方式,可以实现用户无感配网。Step S101 is optional. In some embodiments, without inputting operation 1, the terminal device 100 can send a detection request at a fixed time, or automatically send a detection request when the preset condition 1 is met, so as to trigger each anchor device to perform IoT device detection and network configuration (i.e., execute S103 to S108). The above timing period can be preset by the terminal device 100 or the user. The above preset condition 1 can include the terminal device 100 being turned on, the user passing The smart home app adds at least one of the following conditions: anchor point device. This automatic network configuration method without user triggering can achieve network configuration without user awareness.
S103、锚点设备200检测同房间的待配网的IoT设备,检测到的IoT设备包括IoT设备400。S103 . The anchor device 200 detects IoT devices to be networked in the same room, and the detected IoT devices include the IoT device 400 .
步骤S101和步骤S102是可选的。在一些实施例中,无需终端设备100发送检测请求,各锚点设备也可以定时地自动触发IoT设备检测和配网,或者在满足预设条件2时自动触发IoT设备检测和配网。上述定时周期可以是终端设备100或用户预设的,上述预设条件2包括锚点设备开机、锚点设备接入网络等条件中的至少一个。这种无需用户触发的自动配网方式,可以实现用户无感配网。Step S101 and step S102 are optional. In some embodiments, each anchor device can also automatically trigger IoT device detection and network configuration at a fixed time without the terminal device 100 sending a detection request, or automatically trigger IoT device detection and network configuration when the preset condition 2 is met. The above-mentioned timing period can be preset by the terminal device 100 or the user, and the above-mentioned preset condition 2 includes at least one of the conditions such as the anchor device is turned on and the anchor device is connected to the network. This automatic network configuration method without user triggering can realize user-free network configuration.
在一些实施例中,响应于检测请求,锚点设备200利用近距离通信模块2检测同房间的待配网的IoT设备。In some embodiments, in response to the detection request, the anchor device 200 uses the short-range communication module 2 to detect the IoT device to be networked in the same room.
在一些实施例中,待配网的IoT设备具备如下特征:已上电、启动了近距离通信模块3且终端设备100的账号1尚未绑定的IoT设备。其中,近距离通信模块3用于接入锚点设备200所在的预设网络。In some embodiments, the IoT device to be networked has the following characteristics: the IoT device has been powered on, the short-distance communication module 3 has been started, and the account 1 of the terminal device 100 has not been bound. Among them, the short-distance communication module 3 is used to access the preset network where the anchor device 200 is located.
本申请实施例对近距离通信模块2和近距离通信模块3不做具体限定。在一些实施例中,近距离通信模块2和近距离通信模块3均为WiFi通信模块,预设网络为WiFi网络。在一些实施例中,近距离通信模块2和近距离通信模块3均为蓝牙通信模块,预设网络为蓝牙网络(例如蓝牙mesh组网)。The embodiments of the present application do not specifically limit the short-distance communication module 2 and the short-distance communication module 3. In some embodiments, the short-distance communication module 2 and the short-distance communication module 3 are both WiFi communication modules, and the preset network is a WiFi network. In some embodiments, the short-distance communication module 2 and the short-distance communication module 3 are both Bluetooth communication modules, and the preset network is a Bluetooth network (e.g., Bluetooth mesh networking).
具体的,锚点设备200如何检测同房间的待配网的IoT设备,在后续实施例进行详细介绍,此处暂不赘述。Specifically, how the anchor device 200 detects the IoT device to be networked in the same room will be described in detail in subsequent embodiments and will not be described here in detail.
S104、锚点设备200向IoT设备400发送配网信息。S104. The anchor device 200 sends network configuration information to the IoT device 400.
S105、IoT设备400向锚点设备200发送应答信息,应答信息用于指示接收到上述配网信息。S105. The IoT device 400 sends a response message to the anchor device 200, where the response message is used to indicate that the above network configuration information has been received.
步骤S105是可选的。在一些实施例中,IoT设备400无需向锚点设备200发送上述应答信息。Step S105 is optional. In some embodiments, the IoT device 400 does not need to send the above response information to the anchor device 200.
S106、IoT设备400基于配网信息与锚点设备200建立通信连接,以接入锚点设备200所在的预设网络。S106. The IoT device 400 establishes a communication connection with the anchor device 200 based on the network configuration information to access the preset network where the anchor device 200 is located.
在一些实施例中,锚点设备200向IoT设备400发送预设网络的接入设备的配网信息,上述接入设备与锚点设备200可以是同一设备,也可以是不同设备。本申请实施例,以接入设备与锚点设备200是同一设备为例,进行示例性说明。In some embodiments, the anchor device 200 sends the network configuration information of the access device of the preset network to the IoT device 400. The access device and the anchor device 200 may be the same device or different devices. In the embodiment of the present application, the access device and the anchor device 200 are the same device as an example for exemplary description.
在一些实施例中,上述预设网络为WiFi网络,锚点设备200为该WiFi网络的接入设备,配网信息包括服务集标识(Service Set Identifier,SSID)以及无线网络密码。IoT设备400的WiFi通信模块可以基于配网信息与锚点设备200建立通信连接,以接入WiFi网络。In some embodiments, the preset network is a WiFi network, the anchor device 200 is an access device of the WiFi network, and the network configuration information includes a service set identifier (SSID) and a wireless network password. The WiFi communication module of the IoT device 400 can establish a communication connection with the anchor device 200 based on the network configuration information to access the WiFi network.
不限于WiFi网络,上述预设网络也可以是其他类型网络,相应的,配网信息包括其他类型网络的网络连接凭证(例如网络账号和网络密码),本申请实施例对此不做具体限定。Not limited to WiFi networks, the above-mentioned preset network can also be other types of networks. Accordingly, the network configuration information includes network connection credentials of other types of networks (such as network account and network password), and the embodiments of the present application do not make specific limitations on this.
S107、锚点设备200向终端设备100发送配网完成信息;配网完成信息用于指示IoT设备400已完成配网。S107. The anchor device 200 sends network configuration completion information to the terminal device 100; the network configuration completion information is used to indicate that the IoT device 400 has completed network configuration.
在一些实施例中,检测到IoT设备400接入预设网络后,锚点设备200确定IoT设备400配网完成;锚点设备200向终端设备100发送IoT设备400对应的配网完成信息。In some embodiments, after detecting that the IoT device 400 has accessed a preset network, the anchor device 200 determines that the network configuration of the IoT device 400 is completed; the anchor device 200 sends network configuration completion information corresponding to the IoT device 400 to the terminal device 100.
在一些实施例中,无需步骤S106,只要IoT设备400接收到配网信息,就意味着IoT设备400配网完成。在一种实现方式中,步骤S104中锚点设备200向IoT设备400发送配网信息后,就认为IoT设备400已完成配网;步骤S104之后就可以向终端设备100发送配网完成信息。在一些实施例中,步骤S105中锚点设备200接收到IoT设备400的应答信息后,就认为IoT设备400已完成配网;步骤S105之后就可以向终端设备100发送配网完成信息。In some embodiments, step S106 is not required. As long as the IoT device 400 receives the network configuration information, it means that the network configuration of the IoT device 400 is completed. In one implementation, after the anchor device 200 sends the network configuration information to the IoT device 400 in step S104, it is considered that the IoT device 400 has completed the network configuration; after step S104, the network configuration completion information can be sent to the terminal device 100. In some embodiments, after the anchor device 200 receives the response information from the IoT device 400 in step S105, it is considered that the IoT device 400 has completed the network configuration; after step S105, the network configuration completion information can be sent to the terminal device 100.
S108、基于配网完成信息,终端设备100显示新增的IoT设备400的设备标识和所属房间。S108. Based on the network configuration completion information, the terminal device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
在一些实施例中,配网完成信息包括设备信息1,IoT设备400的设备标识是基于设备信息1确定的;设备信息1可以包括设备类型、设备子类型、设备图标、设备名称、设备型号、设备MAC地址、设备ID等中的部分或全部,设备标识可以包括所属房间、设备类型、设备子类型、设备图标、设备名称、设备型号等中的部分或全部。具体的,可以参考图4C中的设备标识的相关描述,此处不再赘述。In some embodiments, the network configuration completion information includes device information 1, and the device identification of the IoT device 400 is determined based on the device information 1; the device information 1 may include part or all of the device type, device subtype, device icon, device name, device model, device MAC address, device ID, etc., and the device identification may include part or all of the room, device type, device subtype, device icon, device name, device model, etc. Specifically, reference may be made to the description of the device identification in FIG. 4C, which will not be repeated here.
示例性的,以锚点设备200为客厅的锚点设备,IoT设备400为客厅吊灯为例;如图3F和图4C所示,用户点击添加控件301后,终端设备100触发各房间的锚点设备检测待配网的IoT设备;终端设备100接收到锚点设备200反馈的吊灯的配网完成信息后,基于配网完成信息中吊灯的设备信息1,在客厅显示区显示该吊灯的设备标识304。用户通过吊灯的设备标识的显示位置(即客厅显示区),可以确定该吊灯在客厅中。For example, the anchor device 200 is the anchor device of the living room, and the IoT device 400 is the chandelier in the living room; as shown in FIG3F and FIG4C, after the user clicks the add control 301, the terminal device 100 triggers the anchor devices in each room to detect the IoT devices to be networked; after the terminal device 100 receives the network configuration completion information of the chandelier fed back by the anchor device 200, based on the device information 1 of the chandelier in the network configuration completion information, the device identification 304 of the chandelier is displayed in the living room display area. The user can determine that the chandelier is in the living room by the display position of the device identification of the chandelier (i.e., the living room display area).
在一些实施例中,针对各锚点设备,依序完成IoT设备检测和配网流程(即执行S102至S108)。例如,
终端设备100先向房间1的锚点设备200发送检测请求,针对锚点设备200执行S103至S108后,才向房间2的锚点设备200发送检测请求,并针对该锚点设备执行S103至S108;然后以此类推,遍历所有锚点设备。在一些实施例中,终端设备100先分别向各房间的锚点设备发送检测请求或广播发送检测请求;然后,各锚点设备分别完成IoT设备检测和配网流程;对各锚点设备对应的步骤S103至S108的执行顺序不做具体限定。In some embodiments, for each anchor device, the IoT device detection and network configuration process is completed in sequence (i.e., S102 to S108 are executed). The terminal device 100 first sends a detection request to the anchor device 200 in room 1, and after executing S103 to S108 for the anchor device 200, it sends a detection request to the anchor device 200 in room 2, and executes S103 to S108 for the anchor device; and then traverses all anchor devices in this way. In some embodiments, the terminal device 100 first sends a detection request to the anchor device in each room respectively or broadcasts a detection request; then, each anchor device completes the IoT device detection and network configuration process respectively; the execution order of steps S103 to S108 corresponding to each anchor device is not specifically limited.
本申请实施例中,锚点设备200也可以被称为第一锚点设备;房间1也可以被称为第一房间;IoT设备400也可以被称为第一IoT设备;输入操作1也可以被称为第一输入操作;近距离通信模块2也可以被称为第一近距离通信模块,近距离通信模块3也可以被称为第二近距离通信模块;账号1也可以被称为第一账号;用户界面12也可以被称为第一界面。In an embodiment of the present application, the anchor device 200 may also be referred to as the first anchor device; the room 1 may also be referred to as the first room; the IoT device 400 may also be referred to as the first IoT device; the input operation 1 may also be referred to as the first input operation; the short-range communication module 2 may also be referred to as the first short-range communication module, and the short-range communication module 3 may also be referred to as the second short-range communication module; the account 1 may also be referred to as the first account; and the user interface 12 may also be referred to as the first interface.
在一些实施例中,通信系统10还包括服务器700。用户购买IoT设备后,会向服务器700上传IoT设备的设备ID(例如设备序号)和智能家居APP的账号1;服务器700将该IoT设备添加为账号1的已授权的IoT设备。锚点设备200检测到同房间的待配网的IoT设备400之后,锚点设备200还要向服务器700查询IoT设备400是否为账号1的已授权的IoT设备。在一种实现方式中,如图11所示,步骤S103之后,还可以包括步骤S109至S111。In some embodiments, the communication system 10 further includes a server 700. After the user purchases the IoT device, the user uploads the device ID (e.g., device serial number) of the IoT device and the account 1 of the smart home APP to the server 700; the server 700 adds the IoT device as an authorized IoT device of account 1. After the anchor device 200 detects the IoT device 400 to be networked in the same room, the anchor device 200 also queries the server 700 whether the IoT device 400 is an authorized IoT device of account 1. In one implementation, as shown in FIG. 11 , after step S103, steps S109 to S111 may also be included.
S109、锚点设备200向服务器700发送查询请求,查询请求包括IoT设备400的设备ID和账号1。S109 . The anchor device 200 sends a query request to the server 700 , where the query request includes the device ID and account 1 of the IoT device 400 .
在一种实现方式中,终端设备100在智能家居APP添加锚点设备200时,锚点设备200可以获取智能家居APP当前登录的账号1。在一种实现方式中,终端设备100向锚点设备200发送的检测请求可以携带智能家居APP当前登录的账号1In one implementation, when the terminal device 100 adds the anchor device 200 to the smart home APP, the anchor device 200 can obtain the account 1 currently logged in to the smart home APP. In one implementation, the detection request sent by the terminal device 100 to the anchor device 200 can carry the account 1 currently logged in to the smart home APP.
S110、基于上述查询请求,服务器700查询IoT设备400是否为账号1的已授权的IoT设备。S110 . Based on the above query request, the server 700 queries whether the IoT device 400 is an authorized IoT device of account 1 .
S111、服务器700向锚点设备200发送指示信息1,指示信息1用于指示IoT设备400是否为账号1的已授权的IoT设备。S111. The server 700 sends indication information 1 to the anchor device 200. The indication information 1 is used to indicate whether the IoT device 400 is an authorized IoT device of account 1.
锚点设备200基于指示信息2,确定IoT设备400为账号1的已授权的IoT设备时,才执行S104,即向IoT设备400发送配网信息。The anchor device 200 executes S104 , ie, sends the network configuration information to the IoT device 400 , only when it determines, based on the indication information 2 , that the IoT device 400 is an authorized IoT device of the account 1 .
在一些实施例中,也可以先向服务器700查询IoT设备400是否为已授权的IoT设备,确定是已授权的IoT设备后,才检测IoT设备400是否为同房间的IoT设备。In some embodiments, the server 700 may be queried first to determine whether the IoT device 400 is an authorized IoT device. After determining that it is an authorized IoT device, it is detected whether the IoT device 400 is an IoT device in the same room.
在一些实施例中,通信系统10还包括服务器700,IoT设备400配网完成后,终端设备100或锚点设备200通知服务器700IoT设备400已完成配网,服务器700记录IoT设备400为账号1绑定的已配网的IoT设备。这样,账号1绑定IoT设备400后,用户的终端设备100可以通过服务器700远程控制IoT设备400。在一种实现方式中,如图11所示,步骤S107具体包括S107A至S107C。In some embodiments, the communication system 10 further includes a server 700. After the IoT device 400 is networked, the terminal device 100 or the anchor device 200 notifies the server 700 that the IoT device 400 has completed network configuration, and the server 700 records the IoT device 400 as a networked IoT device bound to account 1. In this way, after account 1 is bound to the IoT device 400, the user's terminal device 100 can remotely control the IoT device 400 through the server 700. In one implementation, as shown in FIG11, step S107 specifically includes S107A to S107C.
S107A、锚点设备200向服务器700发送配网完成信息,配网完成信息用于指示IoT设备400完成配网。S107A: The anchor device 200 sends network configuration completion information to the server 700. The network configuration completion information is used to indicate that the IoT device 400 has completed the network configuration.
S107B、服务器700记录IoT设备400为账号1绑定的已配网的IoT设备,以及IoT设备400的所属房间。S107B, the server 700 records that the IoT device 400 is a network-connected IoT device bound to the account 1, and the room to which the IoT device 400 belongs.
S107C、服务器700向终端设备100发送配网完成信息。S107C: The server 700 sends network configuration completion information to the terminal device 100.
可选的,上述检测请求是通过服务器700发送给IoT设备400的,步骤S102具体可以包括:Optionally, the detection request is sent to the IoT device 400 via the server 700, and step S102 may specifically include:
S102A、终端设备100向服务器700发送检测请求。S102A, the terminal device 100 sends a detection request to the server 700.
S102B、服务器700向锚点设备200发送检测请求。S102B: The server 700 sends a detection request to the anchor device 200 .
在一种实现方式中,锚点设备200向终端设备100发送配网完成信息;然后由终端设备100向服务器700发送配网完成信息;服务器700再基于终端设备100发送的配网完成信息,记录IoT设备400为账号1绑定的已配网的IoT设备。In one implementation, the anchor device 200 sends network configuration completion information to the terminal device 100; the terminal device 100 then sends the network configuration completion information to the server 700; the server 700 then records the IoT device 400 as the configured IoT device bound to account 1 based on the network configuration completion information sent by the terminal device 100.
在一些实施例中,通信系统10还包括中枢网关600,IoT设备400配网完成后,终端设备100或锚点设备200通知本地的中枢网关600IoT设备400已完成配网,中枢网关600记录IoT设备400为账号1绑定的已配网的IoT设备。这样,即使广域网发生异常,终端设备100不能与服务器700交互,终端设备100也可以通过本地的中枢网关控制IoT设备400。在一种实现方式中,如图11所示,步骤S107具体包括S107A至S107C。In some embodiments, the communication system 10 also includes a central gateway 600. After the IoT device 400 is networked, the terminal device 100 or the anchor device 200 notifies the local central gateway 600 that the IoT device 400 has completed the network configuration, and the central gateway 600 records the IoT device 400 as a networked IoT device bound to account 1. In this way, even if an abnormality occurs in the wide area network and the terminal device 100 cannot interact with the server 700, the terminal device 100 can also control the IoT device 400 through the local central gateway. In one implementation, as shown in FIG11, step S107 specifically includes S107A to S107C.
S107A、锚点设备200向中枢网关600发送配网完成信息,配网完成信息用于指示IoT设备400完成
配网。S107A, the anchor device 200 sends a network configuration completion message to the central gateway 600, and the network configuration completion message is used to indicate that the IoT device 400 has completed the network configuration. Distribution network.
S107B、中枢网关600记录IoT设备400为账号1绑定的已配网的IoT设备,以及IoT设备400的所属房间。S107B, the central gateway 600 records that the IoT device 400 is a network-connected IoT device bound to account 1, and the room to which the IoT device 400 belongs.
S107C、中枢网关600向终端设备100发送配网完成信息。S107C, the central gateway 600 sends network configuration completion information to the terminal device 100.
类似的,上述检测请求也可以是通过中枢网关600发送给IoT设备400的。Similarly, the above detection request can also be sent to the IoT device 400 through the central gateway 600.
本申请实施例中,通信系统10可以包括中枢网关600和/或服务器700。In the embodiment of the present application, the communication system 10 may include a central gateway 600 and/or a server 700.
本申请实施例提供的一种IoT设备配网方法中,锚点设备200可以配置有约定热点和常规热点;锚点设备200启动约定热点后,附近的IoT设备400可以直接接入锚点设备200的约定热点;锚点设备200利用约定热点接收的IoT设备400的信号,检测IoT设备400是否为同房间的待配网的IoT设备;若是,则向IoT设备400下发常规热点的配网信息;IoT设备400基于配网信息可以接入常规热点,完成配网。In an IoT device networking method provided in an embodiment of the present application, the anchor device 200 can be configured with an agreed hotspot and a regular hotspot; after the anchor device 200 starts the agreed hotspot, the nearby IoT device 400 can directly access the agreed hotspot of the anchor device 200; the anchor device 200 uses the signal of the IoT device 400 received by the agreed hotspot to detect whether the IoT device 400 is an IoT device to be networked in the same room; if so, the network configuration information of the regular hotspot is sent to the IoT device 400; the IoT device 400 can access the regular hotspot based on the network configuration information to complete the network configuration.
示例性的,图12示出了上述IoT设备配网方法的流程示意图,该方法包括但不限于步骤S201至S208。Exemplarily, FIG12 shows a schematic flow chart of the above-mentioned IoT device network configuration method, which includes but is not limited to steps S201 to S208.
S201、终端设备100检测到用户的输入操作1,输入操作1用于触发终端设备100添加IoT设备。S201. The terminal device 100 detects a user input operation 1, where the input operation 1 is used to trigger the terminal device 100 to add an IoT device.
S202、终端设备100向锚点设备200发送检测请求,检测请求用于触发锚点设备检测同房间内的待配网的IoT设备,并对检测到的IoT设备配网。S202. The terminal device 100 sends a detection request to the anchor device 200. The detection request is used to trigger the anchor device to detect the IoT device to be networked in the same room, and to network the detected IoT device.
步骤S201和S202,可以参考前述步骤S101和S102的相关描述,此处不再赘述。For steps S201 and S202, reference may be made to the related descriptions of the aforementioned steps S101 and S102, which will not be repeated here.
S203、锚点设备200启动约定热点。S203: The anchor device 200 starts the agreed hotspot.
S204、IoT设备400接入锚点设备200的约定热点,与约点热点建立WiFi连接1。S204. The IoT device 400 accesses the agreed hotspot of the anchor device 200 and establishes a WiFi connection 1 with the agreed hotspot.
在一些实施例中,锚点设备200的WiFi通信模块启动约定热点后,会广播信标帧(Beacon帧),并扫描其他设备的探测请求(Probe request)。而待配网的IoT设备会通过WiFi通信模块扫描约定热点的Beacon帧,并广播探测请求。在一些实施例中,需要用户手动触发IoT设备400进入待配网状态。例如,IoT设备400接收用户的输入操作2;响应于输入操作2,IoT设备400进入待配网状态,通过WiFi通信模块扫描约定热点的Beacon帧。此处对输入操作2不做具体限定,例如,IoT设备400设置有配网按键,输入操作2包括按压上述配网按键。例如,IoT设备400具备语音识别功能,输入操作2包括说出语音命令“进入待配网状态”。In some embodiments, after the WiFi communication module of the anchor device 200 starts the agreed hotspot, it broadcasts a beacon frame (Beacon frame) and scans for probe requests (Probe request) from other devices. The IoT device to be networked will scan the Beacon frame of the agreed hotspot through the WiFi communication module and broadcast a probe request. In some embodiments, the user needs to manually trigger the IoT device 400 to enter the state to be networked. For example, the IoT device 400 receives the user's input operation 2; in response to the input operation 2, the IoT device 400 enters the state to be networked and scans the Beacon frame of the agreed hotspot through the WiFi communication module. Input operation 2 is not specifically limited here. For example, the IoT device 400 is provided with a network configuration button, and input operation 2 includes pressing the above-mentioned network configuration button. For example, the IoT device 400 has a voice recognition function, and input operation 2 includes speaking the voice command "enter the state to be networked".
示例性的,参见图13,待配网的IoT设备400基于扫描到的Beacon帧,与锚点设备200建立WiFi连接1,以接入约定热点,可以包括服务发现、链路认证、关联过程、密钥协商和IP分配这五个阶段中部分或全部阶段。Exemplarily, referring to FIG. 13 , the IoT device 400 to be networked establishes a WiFi connection 1 with the anchor device 200 based on the scanned Beacon frame to access the agreed hotspot, which may include some or all of the five stages of service discovery, link authentication, association process, key negotiation, and IP allocation.
其中,服务发现阶段包括:锚点设备200的约定热点广播Beacon帧;基于扫描到的Beacon,IoT设备400发送探测请求(Probe request);基于上述探测请求,锚点设备200向IoT设备400发送探测响应(Probe response)。在一些实施例中,锚点设备200广播的Beacon帧中携带配网标识1,配网标识1用于指示上述Beacon帧来自于用于配网的约定热点;待配网的IoT设备检测到Beacon帧中的配网标识1后,才会反馈探测请求;而未处于待配网状态的IoT设备检测到配网标识1,不会反馈探测请求。在一些实施例中,IoT设备400发送的探测请求中携带配网标识2,配网标识2用于指示IoT设备400处于待配网状态;锚点设备200基于配网标识2可以确定IoT设备400处于待配网状态,锚点设备200仅允许待配网的IoT设备接入约定热点。The service discovery phase includes: the agreed hotspot of the anchor device 200 broadcasts a Beacon frame; based on the scanned Beacon, the IoT device 400 sends a probe request (Probe request); based on the above probe request, the anchor device 200 sends a probe response (Probe response) to the IoT device 400. In some embodiments, the Beacon frame broadcast by the anchor device 200 carries a network configuration identifier 1, and the network configuration identifier 1 is used to indicate that the above Beacon frame comes from the agreed hotspot for network configuration; the IoT device to be configured will only feedback the probe request after detecting the network configuration identifier 1 in the Beacon frame; and the IoT device that is not in the state of being configured will not feedback the probe request after detecting the network configuration identifier 1. In some embodiments, the probe request sent by the IoT device 400 carries a network configuration identifier 2, and the network configuration identifier 2 is used to indicate that the IoT device 400 is in the state of being configured; the anchor device 200 can determine that the IoT device 400 is in the state of being configured based on the network configuration identifier 2, and the anchor device 200 only allows the IoT device to be configured to access the agreed hotspot.
链路认证阶段包括:基于上述探测响应,IoT设备400向锚点设备200发送认证请求(Auth request);基于上述认证请求,锚点设备200向IoT设备400发送认证响应(Auth response)。在一些实施例中,IoT设备400发送的认证请求携带约定热点的无线网络密码;锚点设备200基于认证请求中的无线网络密码确定IoT设备是否认证通过。The link authentication phase includes: based on the above detection response, the IoT device 400 sends an authentication request (Auth request) to the anchor device 200; based on the above authentication request, the anchor device 200 sends an authentication response (Auth response) to the IoT device 400. In some embodiments, the authentication request sent by the IoT device 400 carries the wireless network password of the agreed hotspot; the anchor device 200 determines whether the IoT device is authenticated based on the wireless network password in the authentication request.
本申请实施例中,待配网的IoT设备400可以直接接入锚点设备200的约定热点。在一种实现方式中,接入锚点设备200的约定热点无需密码,或者,约定热点广播的Beacon帧携带了约定热点的SSID和无线网络密码;因此,IoT设备400基于扫描到的Beacon帧可以直接接入约定热点。在一种实现方式中,锚点设备200和IoT设备400均遵循预设协议,预设协议设置了锚点设备使用约定热点检测待配网的IoT设备;基于预设协议,IoT设备400可以获取约定热点的SSID和无线网络密码,并在扫描到约定热点的Beacon帧后,利用上述SSID和无线网络密码直接接入约定热点。例如,IoT设备400和锚点设备200为同一厂商的配置了预设协议的设备。In an embodiment of the present application, the IoT device 400 to be networked can directly access the agreed hotspot of the anchor device 200. In one implementation, no password is required to access the agreed hotspot of the anchor device 200, or the Beacon frame broadcast by the agreed hotspot carries the SSID and wireless network password of the agreed hotspot; therefore, the IoT device 400 can directly access the agreed hotspot based on the scanned Beacon frame. In one implementation, both the anchor device 200 and the IoT device 400 follow a preset protocol, and the preset protocol sets the anchor device to use the agreed hotspot to detect the IoT device to be networked; based on the preset protocol, the IoT device 400 can obtain the SSID and wireless network password of the agreed hotspot, and after scanning the Beacon frame of the agreed hotspot, use the above SSID and wireless network password to directly access the agreed hotspot. For example, the IoT device 400 and the anchor device 200 are devices of the same manufacturer configured with a preset protocol.
在一些实施例中,锚点设备200启动约定热点时,进入低功率发射模式。这样,避免其他房间的距离较远的IoT设备也接入锚点设备200的约定热点。
In some embodiments, when the anchor device 200 starts the agreed hotspot, it enters a low-power transmission mode, so as to prevent IoT devices in other rooms that are far away from it from also accessing the agreed hotspot of the anchor device 200.
S205、基于IoT设备400向锚点设备200的约定热点发送的N个信号,锚点设备200检测到IoT设备400为同房间的待配网的IoT设备。S205. Based on the N signals sent by the IoT device 400 to the agreed hotspot of the anchor device 200, the anchor device 200 detects that the IoT device 400 is an IoT device to be networked in the same room.
在一些实施例中,服务器700或中枢网关600记录有终端设备100的账号1绑定的已配网设备。步骤S205之前,锚点设备200还向服务器700或中枢网关600查询IoT设备400是否为账号1绑定的已配网设备。确定IoT设备400不是账号1绑定的已配网设备时,才执行S205,并继续后续配网流程。In some embodiments, the server 700 or the central gateway 600 records the network-configured devices bound to the account 1 of the terminal device 100. Before step S205, the anchor device 200 also queries the server 700 or the central gateway 600 whether the IoT device 400 is a network-configured device bound to the account 1. When it is determined that the IoT device 400 is not a network-configured device bound to the account 1, S205 is executed and the subsequent network configuration process continues.
在一种实施例中,上述N个信号包括WiFi连接1建立过程中接收到的IoT设备400的消息中的部分或全部。例如,消息1包括图13所示的探测请求、认证请求、关联请求、信息2和信息4中的部分或全部消息。In one embodiment, the N signals include part or all of the messages of the IoT device 400 received during the establishment of the WiFi connection 1. For example, the message 1 includes part or all of the messages of the probe request, authentication request, association request, information 2, and information 4 shown in FIG.
在一种实施例中,与IoT设备400建立WiFi连接1后,锚点设备200接收IoT设备400通过WiFi连接1发送的N个信号。在一种实现方式中,IoT设备400按照预设频率向锚点设备200发送N个信号,例如,预设频率为1秒内(s)发送W个信号,W为正整数。In one embodiment, after establishing WiFi connection 1 with IoT device 400, anchor device 200 receives N signals sent by IoT device 400 through WiFi connection 1. In one implementation, IoT device 400 sends N signals to anchor device 200 at a preset frequency, for example, the preset frequency is to send W signals within 1 second (s), where W is a positive integer.
在一些实施例中,锚点设备200可以基于接收到的N个信号分别对应的信道状态信息(Channel State Information,CSI)确定IoT设备400是否为同房间的待配网的IoT设备。后续实施例会对此进行详细介绍,此处暂不赘述。In some embodiments, the anchor device 200 can determine whether the IoT device 400 is an IoT device to be networked in the same room based on the channel state information (CSI) corresponding to the N received signals. This will be described in detail in the subsequent embodiments and will not be described here.
S206、锚点设备200的约定热点向IoT设备400发送锚点设备200的常规热点的配网信息。S206. The agreed hotspot of the anchor device 200 sends the network configuration information of the regular hotspot of the anchor device 200 to the IoT device 400.
S207、IoT设备400向锚点设备200的约定热点发送应答信息,应答信息用于指示接收到上述配网信息。S207. The IoT device 400 sends a response message to the agreed hotspot of the anchor device 200. The response message is used to indicate that the above network configuration information has been received.
S208、IoT设备400基于上述配网信息接入锚点设备200的常规热点。S208. The IoT device 400 accesses the regular hotspot of the anchor device 200 based on the above network configuration information.
S209、锚点设备200向终端设备100发送配网完成信息;配网完成信息用于指示IoT设备400已完成配网。S209. The anchor device 200 sends network configuration completion information to the terminal device 100; the network configuration completion information is used to indicate that the IoT device 400 has completed network configuration.
S210、终端设备100显示新增的IoT设备400的设备标识和所属房间。S210. The terminal device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
具体的,在一些实施例中,步骤S206可以参考步骤S104的相关实施例,步骤S207可以参考步骤S105的相关实施例,步骤S208可以参考步骤S106的相关实施例,步骤S209可以参考步骤S107的相关实施例,步骤S210可以参考步骤S108的相关实施例,此处不再赘述。Specifically, in some embodiments, step S206 may refer to the relevant embodiment of step S104, step S207 may refer to the relevant embodiment of step S105, step S208 may refer to the relevant embodiment of step S106, step S209 may refer to the relevant embodiment of step S107, and step S210 may refer to the relevant embodiment of step S108, which will not be repeated here.
本申请实施例中,约定热点也可以被称为第一热点,常规热点也可以被称为第二热点;前述N个信号也可以被称为第一信号,前述N个信号中的一个信号(即信号1)也可以被称为第二信号。In the embodiment of the present application, the agreed hotspot may also be referred to as the first hotspot, and the conventional hotspot may also be referred to as the second hotspot; the aforementioned N signals may also be referred to as the first signal, and one of the aforementioned N signals (ie, signal 1) may also be referred to as the second signal.
在一些实施例中,如图12所示,步骤S205(即检测到IoT设备400为同房间的IoT设备)之后,还可以包括S211和S212。In some embodiments, as shown in FIG. 12 , after step S205 (i.e., detecting that the IoT device 400 is an IoT device in the same room), S211 and S212 may also be included.
S211、锚点设备200向终端设备100发送指示信息2,指示信息2用于指示检测到的同房间的待配网的IoT设备400,指示信息2包括IoT设备400的设备信息1。S211. The anchor device 200 sends indication information 2 to the terminal device 100. The indication information 2 is used to indicate the detected IoT device 400 to be networked in the same room. The indication information 2 includes the device information 1 of the IoT device 400.
S212、终端设备100基于上述指示信息2,在锚点设备200对应的房间显示区显示提示信息1,提示信息1用于提示IoT设备400正在连接中。S212. Based on the indication information 2, the terminal device 100 displays prompt information 1 in the room display area corresponding to the anchor device 200. The prompt information 1 is used to prompt that the IoT device 400 is connecting.
示例性的,参考图4B,IoT设备400为客厅电灯;基于客厅电灯对应的设备信息1,终端设备100显示提示信息1,提示信息1包括客厅电灯的连接中状态的设备标识304和文字“设备连接中”。Exemplarily, referring to FIG4B , the IoT device 400 is a living room lamp; based on the device information 1 corresponding to the living room lamp, the terminal device 100 displays prompt information 1, which includes a device identifier 304 indicating the connected state of the living room lamp and the text “device connecting”.
在一些实施例中,参考图4B,提示信息1还可以包括客厅电灯的连接进度。在一种实现方式中,连接进度可以是终端设备100根据接收指示信息2后的时长确定。例如,每过一秒,连接进度增加10%;若10s内没有接收到客厅电灯的配网完成信息,则默认连接失败;若10s内接收到客厅电灯的配网完成信息,则连接进度增加至100%。在一种实现方式中,步骤S205之后,锚点设备200可以向终端设备100实时反馈配网流程的进度,不同的配网流程的进度对应不同的连接进度;终端设备100根据当前配网流程的进度对应的连接进度,确定客厅电灯的连接进度。例如,执行S206对应的连接进度为30%。In some embodiments, referring to FIG. 4B , the prompt information 1 may also include the connection progress of the living room light. In one implementation, the connection progress may be determined by the terminal device 100 according to the time after receiving the indication information 2. For example, the connection progress increases by 10% every second; if the network configuration completion information of the living room light is not received within 10s, the connection is deemed to have failed by default; if the network configuration completion information of the living room light is received within 10s, the connection progress increases to 100%. In one implementation, after step S205, the anchor device 200 may provide the terminal device 100 with real-time feedback on the progress of the network configuration process, and different progress of the network configuration process corresponds to different connection progress; the terminal device 100 determines the connection progress of the living room light according to the connection progress corresponding to the progress of the current network configuration process. For example, the connection progress corresponding to executing S206 is 30%.
在一些实施例中,如图14A所示,步骤S205中基于IoT设备400向约定热点发送的N个信号,检测到IoT设备400为同房间的待配网的IoT设备,具体包括S205A至S205D。In some embodiments, as shown in FIG. 14A , in step S205 , based on N signals sent by the IoT device 400 to the agreed hotspot, it is detected that the IoT device 400 is an IoT device to be networked in the same room, specifically including S205A to S205D.
S205A、锚点设备200基于接收到的N个信号中的信号1,估计锚点设备200和IoT设备400间的信道状态信息(Channel State Information,CSI),信号1为上述N个信号中的任一个;S205A, the anchor device 200 estimates the channel state information (CSI) between the anchor device 200 and the IoT device 400 based on signal 1 among the N received signals, where signal 1 is any one of the N signals.
S205B、锚点设备200基于信号1对应的CSI获取信号1的到达角(Angle of Arrival,AOA)和时延。S205B, the anchor device 200 obtains the angle of arrival (AOA) and delay of signal 1 based on the CSI corresponding to signal 1.
在一些实施例中,锚点设备200配置有多根天线,锚点设备200根据估计的CSI可以确定信号1到达不同位置的天线的相位差,即信号的到达角。
In some embodiments, the anchor device 200 is configured with multiple antennas, and the anchor device 200 can determine the phase difference when the signal 1 reaches antennas at different locations, that is, the arrival angle of the signal, according to the estimated CSI.
在一些实施例中,信号1的CSI包括频域下的信道频率响应(ChannelFrequencyResponse,CFR);对CFR进行快速傅里叶逆变换(inversefastfouriertransform,ifft)可以获取信道冲击响应(Channel Impulse Response,CIR);然后,利用CIR可以获取信号1对应的时延。在一种实现方式中,通过对CIR进行时域上的平均处理后求平方,可以获得功率时延谱(Power Delay Profile,PDP);信号1对应的时延可以为PDP的一阶矩。In some embodiments, the CSI of signal 1 includes a channel frequency response (CFR) in the frequency domain; performing an inverse fast Fourier transform (IFFT) on the CFR can obtain a channel impulse response (CIR); then, the CIR can be used to obtain the delay corresponding to signal 1. In one implementation, the power delay profile (PDP) can be obtained by averaging the CIR in the time domain and then squaring it; the delay corresponding to signal 1 can be the first-order moment of the PDP.
需要说明的是,由于多径传播效应,IoT设备400发送的N个信号分别对应的CSI可能不同,进而对应的到达角和时延也可能不同。It should be noted that, due to the multipath propagation effect, the CSIs corresponding to the N signals sent by the IoT device 400 may be different, and thus the corresponding arrival angles and delays may also be different.
S205C、锚点设备200利用聚类检测算法获取上述N个信号对应的到达角和时延的聚类趋势H。S205C: The anchor point device 200 uses a cluster detection algorithm to obtain a clustering trend H of the arrival angles and delays corresponding to the N signals.
聚类检测算法用于评估数据集中的多个数据的聚类性能,即判断数据在空间上的随机性,从而判断数据是否可以聚类。将一个信号对应的到达角和时延作为一个样本数据,锚点设备200利用聚类检测算法可以评估上述N个信号对应N个样本数据的聚类性能。本申请实施例对聚类检测算法不做具体限定,例如聚类检测算法为霍普金斯统计量(Hopkins Statistic)算法。The cluster detection algorithm is used to evaluate the clustering performance of multiple data in a data set, that is, to determine the randomness of the data in space, so as to determine whether the data can be clustered. Taking the arrival angle and delay corresponding to a signal as a sample data, the anchor device 200 can use the cluster detection algorithm to evaluate the clustering performance of the N sample data corresponding to the above N signals. The embodiment of the present application does not specifically limit the cluster detection algorithm. For example, the cluster detection algorithm is the Hopkins Statistic algorithm.
在一种实现方式中,利用Hopkins Statistic算法评估IoT设备发送的信号的聚类趋势H,具体可以包括:从N个样本数据中随机找n个点,然后为每一个点在样本空间中找到一个离它最近的点,并计算它们之间的距离xi,从而得到距离向量x1、x2、…、xn;然后,从样本的可能取值范围内随机生成n个点,对每一个随机生产的点,找到一个离它最近的样本点,并计算它们之间的距离,得到y1、y2、…、yn。霍普金斯统计量算法确定聚类趋势为:
In one implementation, the clustering trend H of the signal sent by the IoT device is evaluated using the Hopkins Statistic algorithm, which may specifically include: randomly finding n points from N sample data, then finding a point closest to it in the sample space for each point, and calculating the distance x i between them, thereby obtaining distance vectors x 1 , x 2 , …, x n ; then, randomly generating n points from the possible value range of the sample, for each randomly generated point, finding a sample point closest to it, and calculating the distance between them, to obtain y 1 , y 2 , …, yn . The Hopkins Statistic algorithm determines the clustering trend as:
In one implementation, the clustering trend H of the signal sent by the IoT device is evaluated using the Hopkins Statistic algorithm, which may specifically include: randomly finding n points from N sample data, then finding a point closest to it in the sample space for each point, and calculating the distance x i between them, thereby obtaining distance vectors x 1 , x 2 , …, x n ; then, randomly generating n points from the possible value range of the sample, for each randomly generated point, finding a sample point closest to it, and calculating the distance between them, to obtain y 1 , y 2 , …, yn . The Hopkins Statistic algorithm determines the clustering trend as:
S205D、聚类趋势H大于预设门限1时,锚点设备200确定IoT设备400为同房间的待配网的IoT设备。S205D: When the clustering trend H is greater than the preset threshold 1, the anchor device 200 determines that the IoT device 400 is an IoT device to be networked in the same room.
在一些实施例中,聚类趋势H大于预设门限1时小于等于预设门限2时,IoT设备400可能位于其他房间;该情况下,锚点设备200可以先对IoT设备400配网,再让用户进一步选择IoT设备400的所属房间。参见图15,步骤S205C之后,锚点设备200可以先对IoT设备400配网,并向终端设备100反馈IoT设备400的配网完成信息。当IoT设备400的聚类趋势H大于预设门限1时小于等于预设门限2时,上述配网完成信息包括指示信息3,指示信息3用于指示IoT设备400可能位于其他房间。步骤S210中,终端设备100显示IoT设备400的设备标识和所属房间具体可以包括S210A至S210C。In some embodiments, when the clustering trend H is greater than the preset threshold 1 and less than or equal to the preset threshold 2, the IoT device 400 may be located in other rooms; in this case, the anchor device 200 may first configure the IoT device 400, and then allow the user to further select the room to which the IoT device 400 belongs. Referring to FIG. 15 , after step S205C, the anchor device 200 may first configure the IoT device 400, and feedback the network configuration completion information of the IoT device 400 to the terminal device 100. When the clustering trend H of the IoT device 400 is greater than the preset threshold 1 and less than or equal to the preset threshold 2, the network configuration completion information includes indication information 3, and the indication information 3 is used to indicate that the IoT device 400 may be located in other rooms. In step S210, the terminal device 100 displays the device identification and the room to which the IoT device 400 belongs, which may specifically include S210A to S210C.
S210A、基于指示信息3显示提示信息2,提示信息2用于提示用户选择IoT设备400所在的房间。S210A. Display prompt information 2 based on indication information 3, where prompt information 2 is used to prompt the user to select the room where the IoT device 400 is located.
S210B、接收输入操作3,输入操作3用于选择IoT设备400所在的房间。S210B, receiving input operation 3, where input operation 3 is used to select the room where the IoT device 400 is located.
S210C、显示新增的IoT设备400的设备标识和所属房间,所属房间为输入操作3选择的房间。S210C, displaying the device identification and the room to which the newly added IoT device 400 belongs, where the room to which it belongs is the room selected by input operation 3.
可以理解,若输入操作3选择的房间为其他锚点设备对应的房间(例如锚点设备300对应的房间2),则终端设备100显示IoT设备400的所属房间为房间2。It can be understood that if the room selected by input operation 3 is the room corresponding to other anchor devices (for example, room 2 corresponding to anchor device 300), the terminal device 100 displays that the room to which IoT device 400 belongs is room 2.
在一些实施例中,聚类趋势H大于预设门限1时小于等于预设门限2时,IoT设备400可能位于其他房间;该情况下,锚点设备200也可以先让用户选择IoT设备400的所属房间;确定IoT设备400是同房间的IoT设备后,才对IoT设备400配网。示例性的,如图14B所实施,步骤S205中基于IoT设备400向约定热点发送的N个信号,检测到IoT设备400为同房间的待配网的IoT设备,具体可以包括S205A-S205C以及S205E-S205J。In some embodiments, when the clustering trend H is greater than the preset threshold 1 and less than or equal to the preset threshold 2, the IoT device 400 may be located in other rooms; in this case, the anchor device 200 may also first allow the user to select the room to which the IoT device 400 belongs; after determining that the IoT device 400 is an IoT device in the same room, the IoT device 400 is networked. Exemplarily, as implemented in FIG. 14B , in step S205, based on the N signals sent by the IoT device 400 to the agreed hotspot, it is detected that the IoT device 400 is an IoT device to be networked in the same room, which may specifically include S205A-S205C and S205E-S205J.
S205E、聚类趋势H大于预设门限2时,锚点设备200确定IoT设备400为同房间的待配网的IoT设备。S205E: When the clustering trend H is greater than the preset threshold 2, the anchor device 200 determines that the IoT device 400 is an IoT device to be networked in the same room.
S205F、聚类趋势H大于门限1小于等于门限2时,锚点设备200向终端设备100发送指示信息3。S205F: When the clustering trend H is greater than threshold 1 and less than or equal to threshold 2, the anchor device 200 sends indication information 3 to the terminal device 100.
可以理解,锚点设备200针对IoT设备400,执行S205E或S205F。It can be understood that the anchor device 200 executes S205E or S205F for the IoT device 400.
S205G、基于指示信息3显示提示信息2,提示信息2用于提示用户选择IoT设备400所在的房间。S205G. Display prompt information 2 based on indication information 3, where prompt information 2 is used to prompt the user to select the room where the IoT device 400 is located.
S205H、接收输入操作3,输入操作3用于选择IoT设备400所在的房间。S205H, receiving input operation 3, where input operation 3 is used to select the room where the IoT device 400 is located.
S205I、终端设备100向锚点设备200发送指示信息4,指示信息4用于指示输入操作3选择的房间是否为锚点设备200所在的房间1。S205I. The terminal device 100 sends indication information 4 to the anchor device 200. The indication information 4 is used to indicate whether the room selected by the input operation 3 is the room 1 where the anchor device 200 is located.
S205J、若指示信息4指示用户选择的房间为房间1,则确定IoT设备400为同房间的待配网的IoT设备。S205J. If the indication information 4 indicates that the room selected by the user is room 1, it is determined that the IoT device 400 is an IoT device to be networked in the same room.
示例性的,以前述电灯1(即客厅吊灯)为例,终端设备100基于客厅锚点设备反馈的指示信息3,
确定电灯1可能处于其他房间时,终端设备100在各房间显示区均显示电灯1的设备标识及其对应的确定控件(即提示信息2)。然后,由用户通过各房间显示区的确定控件,选择电灯1在哪个房间。For example, taking the aforementioned lamp 1 (i.e., the living room chandelier) as an example, the terminal device 100 receives the indication information 3 fed back by the living room anchor device. When it is determined that the light 1 may be in another room, the terminal device 100 displays the device identification of the light 1 and its corresponding determination control (i.e., prompt information 2) in each room display area. Then, the user selects which room the light 1 is in through the determination control in each room display area.
如图14C所示,终端设备100在客厅显示区显示电灯1的设备标识304及其对应的确定控件308,在卧室显示区显示电灯1的设备标识309及其对应的确定控件310;检测到用户作用于客厅显示区的确定控件308的输入操作(例如点击操作)后,终端设备100确定电灯1在客厅内,在客厅显示区显示电灯1的连接成功状态的设备标识,并停止在其他房间显示区显示电灯1的设备标识。As shown in FIG14C , the terminal device 100 displays the device identification 304 of the light 1 and its corresponding confirmation control 308 in the living room display area, and displays the device identification 309 of the light 1 and its corresponding confirmation control 310 in the bedroom display area; after detecting the user's input operation (such as a click operation) on the confirmation control 308 in the living room display area, the terminal device 100 determines that the light 1 is in the living room, displays the device identification of the light 1 in the successful connection status in the living room display area, and stops displaying the device identification of the light 1 in the display areas of other rooms.
在一些实施例中,以客厅的电灯1(即客厅吊灯)为例,终端设备100基于各锚点设备反馈的配网完成信息,确定至少两个锚点设备(例如客厅锚点设备和卧室锚点设备)将电灯1识别为同房间的IoT设备时,在上述至少两个锚点设备对应的房间显示区,分别显示电灯1的设备标识以及对应的确定控件。然后,由用户通过各房间显示区的确定控件,确定电灯1在哪个房间。In some embodiments, taking the living room lamp 1 (i.e., the living room chandelier) as an example, when the terminal device 100 determines that at least two anchor devices (e.g., the living room anchor device and the bedroom anchor device) identify the lamp 1 as an IoT device in the same room based on the network configuration completion information fed back by each anchor device, the device identification of the lamp 1 and the corresponding determination control are displayed in the room display areas corresponding to the at least two anchor devices. Then, the user determines which room the lamp 1 is in through the determination control in each room display area.
本申请实施例中,预设门限1也可以被称为第一门限,预设门限2也可以被称为第二门限。指示信息3也可以被称为第一指示信息,提示信息2也可以被称为第一提示信息。In the embodiment of the present application, the preset threshold 1 may also be referred to as the first threshold, the preset threshold 2 may also be referred to as the second threshold, the indication information 3 may also be referred to as the first indication information, and the prompt information 2 may also be referred to as the first prompt information.
本申请实施例中,锚点设备200对应的聚类趋势的空间识别门限(即预设门限1和/或预设门限2),是基于锚点设备200所在房间1的空间识别信息确定的,房间1的空间识别信息包括“锚点设备200在房间1中的位置、锚点设备200的型号、房间1的房间布局和房间1的隔间材质”中的部分或全部。例如,预设门限1为0.7,预设门限2为0.85。In the embodiment of the present application, the spatial identification threshold of the clustering trend corresponding to the anchor device 200 (i.e., preset threshold 1 and/or preset threshold 2) is determined based on the spatial identification information of the room 1 where the anchor device 200 is located, and the spatial identification information of the room 1 includes part or all of "the position of the anchor device 200 in the room 1, the model of the anchor device 200, the room layout of the room 1, and the partition material of the room 1". For example, the preset threshold 1 is 0.7, and the preset threshold 2 is 0.85.
在一些实施例中,如图15所示,锚点设备200获取房间1的空间识别门限,具体包括S301至S305。In some embodiments, as shown in FIG. 15 , the anchor device 200 obtains the space identification threshold of room 1 , which specifically includes S301 to S305 .
S301、终端设备100获取房间1的空间识别信息。S301. The terminal device 100 obtains the space identification information of room 1.
示例性的,表1所示示出了锚点设备200所在的房间1的空间识别信息。其中,不限于长和宽,房间布局还可以用于指示房间1的面积、空间范围。
Exemplarily, Table 1 shows the space identification information of the room 1 where the anchor device 200 is located. In addition to being limited to the length and width, the room layout can also be used to indicate the area and space range of the room 1.
Exemplarily, Table 1 shows the space identification information of the room 1 where the anchor device 200 is located. In addition to being limited to the length and width, the room layout can also be used to indicate the area and space range of the room 1.
表1Table 1
在一些实施例中,服务器700配置有训练好的识别模型,该识别模型的输入为房间的空间识别信息,输出为房间的空间识别门限。In some embodiments, the server 700 is configured with a trained recognition model, the input of the recognition model is the spatial recognition information of the room, and the output of the recognition model is the spatial recognition threshold of the room.
S302、终端设备100向服务器700发送查询请求,查询请求用于查询房间1的空间识别门限,查询请求包括房间1的空间识别信息。S302 . The terminal device 100 sends a query request to the server 700 . The query request is used to query the space identification threshold of room 1 . The query request includes the space identification information of room 1 .
S303、服务器700基于房间1的空间识别信息获取房间1的空间识别门限。S303. The server 700 obtains the space identification threshold of room 1 based on the space identification information of room 1.
S304、服务器700向终端设备100发送房间1的空间识别门限。S304 , the server 700 sends the space identification threshold of room 1 to the terminal device 100 .
可以理解,用户每次通过终端设备100新增锚点设备时,可以获取锚点设备所在房间的空间识别信息,并上传至服务器700,以查询该锚点设备的用于空间识别的预设门限1和预设门限2。It can be understood that each time the user adds an anchor device through the terminal device 100, the space identification information of the room where the anchor device is located can be obtained and uploaded to the server 700 to query the preset threshold 1 and preset threshold 2 for space identification of the anchor device.
S305、终端设备100向锚点设备200发送配置请求,配置请求用于指示锚点设备200配置房间1的空间识别门限,配置请求包括房间1的空间识别门限。S305 . The terminal device 100 sends a configuration request to the anchor device 200 . The configuration request is used to instruct the anchor device 200 to configure the space identification threshold of room 1 . The configuration request includes the space identification threshold of room 1 .
S306、锚点设备200向终端设备100发送确认信息,确认信息用于指示已配置房间1的空间识别门限。S306. The anchor device 200 sends confirmation information to the terminal device 100, where the confirmation information is used to indicate that the space identification threshold of room 1 has been configured.
步骤S306是可选的。在一些实施例中,也可以不执行S306。Step S306 is optional. In some embodiments, step S306 may not be performed.
在一些实施例中,锚点设备200可以根据IoT设备400发送的信号,确定IoT设备400相对于锚点设备200的方位和距离,进而确定IoT设备400是否在同房间内。In some embodiments, the anchor device 200 can determine the orientation and distance of the IoT device 400 relative to the anchor device 200 based on the signal sent by the IoT device 400, and then determine whether the IoT device 400 is in the same room.
具体的,在一种实现方式中,锚点设备200根据接收到的N个信号中信号1,获取信号1的AOA和与IoT设备400间的距离,N为大于等于1的正整数。然后基于N个信号分别对应的AOA和与距离,获取平均AOA和平均距离;根据平均AOA可以确定IoT设备400相对于锚点设备200的方位,并将平均距离作为锚点设备200与IoT设备400间的距离;然后根据锚点设备200所在的房间1的布局、锚点设备200在房间1中的位置、IoT设备400的方位和距离,可以确定IoT设备400的位置是否在房间1内。示例性的,如图16所示,房间1的布局包括房间1在预设坐标系XYZ中的空间范围,锚点设备200位置包括在上述预设坐标系中的坐标(a1,b1,c1);根据IoT设备400相对于锚点设备200的方位和距离,锚点设备
200可以确定IoT设备400在上述预设坐标系中的坐标(a2,b2,c2);当IoT设备400的坐标在房间1的空间范围内时,确定IoT设备400在房间1内。图16是以三维空间为例进行示例性说明,房间1的空间范围、锚点设备200设备的坐标位置和IoT设备的坐标位置,也可以是二维的,此处不做具体限定。Specifically, in one implementation, the anchor device 200 obtains the AOA of signal 1 and the distance between the anchor device 200 and the IoT device 400 based on signal 1 among the N received signals, where N is a positive integer greater than or equal to 1. Then, based on the AOA and the distance corresponding to the N signals, the average AOA and the average distance are obtained; the orientation of the IoT device 400 relative to the anchor device 200 can be determined based on the average AOA, and the average distance is used as the distance between the anchor device 200 and the IoT device 400; then, based on the layout of room 1 where the anchor device 200 is located, the position of the anchor device 200 in room 1, and the orientation and distance of the IoT device 400, it can be determined whether the position of the IoT device 400 is in room 1. Exemplarily, as shown in FIG16, the layout of room 1 includes the spatial range of room 1 in a preset coordinate system XYZ, and the position of the anchor device 200 includes the coordinates (a1, b1, c1) in the above preset coordinate system; based on the orientation and distance of the IoT device 400 relative to the anchor device 200, the anchor device 200 can determine the coordinates (a2, b2, c2) of the IoT device 400 in the above preset coordinate system; when the coordinates of the IoT device 400 are within the spatial range of room 1, it is determined that the IoT device 400 is in room 1. FIG. 16 is an exemplary description using a three-dimensional space as an example, and the spatial range of room 1, the coordinate position of the anchor device 200, and the coordinate position of the IoT device can also be two-dimensional, which is not specifically limited here.
本申请实施例对根据接收到的信号计算距离的方式不做具体限定。在一种实现方式中,锚点设备200接收的信号指示了该信号的发送时刻;锚点设备200基于该信号的发送时刻和接收时刻确定信号的传输时长,然后根据信号的传输时长和传输速度,确定与IoT设备400间的距离。The embodiment of the present application does not specifically limit the method of calculating the distance based on the received signal. In one implementation, the signal received by the anchor device 200 indicates the time when the signal is sent; the anchor device 200 determines the transmission duration of the signal based on the time when the signal is sent and the time when the signal is received, and then determines the distance from the IoT device 400 based on the transmission duration and transmission speed of the signal.
在一些实施例中,锚点设备200所在的房间可以包括多个子空间;锚点设备200确定IoT设备400为同房间(即房间1)的IoT设备后,还可以确定房间1中IoT设备400所在的子空间,并在配置完成信息中指示IoT设备400所在的子空间。IoT设备400所在的子空间也可以被称为第一子空间。In some embodiments, the room where the anchor device 200 is located may include multiple subspaces; after the anchor device 200 determines that the IoT device 400 is an IoT device in the same room (i.e., room 1), it may also determine the subspace where the IoT device 400 is located in room 1, and indicate the subspace where the IoT device 400 is located in the configuration completion information. The subspace where the IoT device 400 is located may also be referred to as the first subspace.
在方案一中,锚点设备200检测到同房间的多个IoT设备后,将每个IoT设备发送的一个信号对应的AOA和距离作为一个样本数据,利用聚类算法对多个IoT设备进行空间聚类,获取聚类后的多个子空间中每个子空间包括的IoT设备。本申请实施例对上述聚类算法不做具体限定,例如,聚类算法为k-means算法。可以理解,该方案中,聚类前锚点设备200不能预知各子空间的空间范围。In solution one, after the anchor device 200 detects multiple IoT devices in the same room, it uses the AOA and distance corresponding to a signal sent by each IoT device as a sample data, and uses a clustering algorithm to spatially cluster the multiple IoT devices to obtain the IoT devices included in each of the multiple subspaces after clustering. The embodiment of the present application does not specifically limit the above clustering algorithm. For example, the clustering algorithm is a k-means algorithm. It can be understood that in this solution, the anchor device 200 cannot predict the spatial range of each subspace before clustering.
例如,卧室锚点设备检测到卧室中的6个IoT设备,并对6个IoT设备进行配网;图17A示出了卧室的IoT设备的二维聚类示意图,锚点设备200利用k-means算法对上述6个IoT设备对应的样本数据进行聚类后,输出卧室的两个子空间(即子空间1和子空间2)包括的IoT设备;锚点设备200通过配网完成信息通知终端设备100各IoT设备所在的子空间。图17A是以二维空间为例进行示例性说明,本申请实施例中,卧室、各子空间的空间范围也可以是三维的,此处不做具体限定。For example, the bedroom anchor device detects 6 IoT devices in the bedroom and configures the 6 IoT devices; FIG17A shows a schematic diagram of two-dimensional clustering of IoT devices in the bedroom. The anchor device 200 uses the k-means algorithm to cluster the sample data corresponding to the above 6 IoT devices, and outputs the IoT devices included in the two subspaces of the bedroom (i.e., subspace 1 and subspace 2); the anchor device 200 notifies the terminal device 100 of the subspaces where each IoT device is located through the network configuration completion information. FIG17A is an exemplary description using a two-dimensional space as an example. In the embodiment of the present application, the spatial range of the bedroom and each subspace can also be three-dimensional, which is not specifically limited here.
在方案二中,终端设备100可以预先获取房间1的各子空间的空间范围,各子空间的空间范围可以是终端设备100或用户预设的。锚点设备200检测到IoT设备400为同房间的IoT设备后,基于锚点设备200的位置,以及IoT设备400相对于锚点设备200的方位和距离,可以确定IoT设备400的位置,进而可以确定IoT设备400的位置在哪个子空间的空间范围内。在一些实施例中,锚点设备200确定IoT设备的位置后,还在配网完成信息携带IoT设备的位置;然后,由终端设备100确定IoT设备的位置在哪个子空间的空间范围内。In solution 2, the terminal device 100 can pre-acquire the spatial range of each subspace of room 1, and the spatial range of each subspace can be preset by the terminal device 100 or the user. After the anchor device 200 detects that the IoT device 400 is an IoT device in the same room, the position of the IoT device 400 can be determined based on the position of the anchor device 200, and the orientation and distance of the IoT device 400 relative to the anchor device 200, and then the spatial range of the subspace in which the position of the IoT device 400 is located can be determined. In some embodiments, after the anchor device 200 determines the position of the IoT device, it also carries the position of the IoT device in the network configuration information; then, the terminal device 100 determines the spatial range of the subspace in which the position of the IoT device is located.
在方案二的实现方式一中,房间1的各子空间的空间范围是根据子空间的划分数量,自动划分的。例如,划分数量为2,将房间1的空间范围均匀划分为2个子空间。在方案二的实现方式二中,房间1的各子空间的空间范围是用户预设的,例如用户输入各子空间的空间范围对应的坐标。In the first implementation of the second solution, the spatial range of each subspace of room 1 is automatically divided according to the number of subspace divisions. For example, the number of divisions is 2, and the spatial range of room 1 is evenly divided into 2 subspaces. In the second implementation of the second solution, the spatial range of each subspace of room 1 is preset by the user, for example, the user inputs the coordinates corresponding to the spatial range of each subspace.
示例性的,以卧室为例,图17B至图17G示出了查看子空间的IoT设备相关界面。Exemplarily, taking the bedroom as an example, FIGS. 17B to 17G show the IoT device-related interfaces for viewing the subspace.
如图17B所示,卧室中已配网的IoT设备包括两个台灯、音箱、电视、空调和加湿器;用户界面12还包括子分类选项401,子分类选项401用于触发终端设备100显示当前被选中的房间的多个子空间;As shown in FIG. 17B , the IoT devices in the bedroom that have been networked include two table lamps, a speaker, a TV, an air conditioner, and a humidifier; the user interface 12 also includes a sub-classification option 401, which is used to trigger the terminal device 100 to display multiple sub-spaces of the currently selected room;
如图17B和图17C所示,终端设备100检测到用户选中卧室的输入操作,例如长按卧室显示区的操作;响应于上述输入操作,终端设备100将卧室显示区切换为选中状态。如图17C和图17D所示,终端设备100检测到作用于子分类选项401的输入操作(例如点击操作)后,在用户界面12显示卧室的子空间1和子空间2分别对应的子空间显示区;子空间显示区可以包括该子空间的名称(例如子空间1的名称403),以及该子空间中的IoT设备的设备标识。如图17D所示,卧室子空间1包括一个台灯、加湿器和空调,卧室子空间2包括另一个台灯、音箱和电视。As shown in Figures 17B and 17C, the terminal device 100 detects an input operation of the user selecting the bedroom, such as a long press operation of the bedroom display area; in response to the above input operation, the terminal device 100 switches the bedroom display area to a selected state. As shown in Figures 17C and 17D, after the terminal device 100 detects an input operation (such as a click operation) acting on the sub-category option 401, the subspace display areas corresponding to the subspace 1 and subspace 2 of the bedroom are displayed on the user interface 12; the subspace display area may include the name of the subspace (such as the name 403 of subspace 1), and the device identification of the IoT device in the subspace. As shown in Figure 17D, bedroom subspace 1 includes a desk lamp, a humidifier and an air conditioner, and bedroom subspace 2 includes another desk lamp, a speaker and a TV.
在一些实施例中,上述方案一和方案二的实现方式一对应子空间的自动划分方式,方案二的实现方式二对应子空间的自定义划分方式。终端设备100向卧室锚点设备发送的检测请求可以携带子空间参数,子空间参数指示了卧室子空间的划分方式和/或划分数量;基于该子空间参数,卧室锚点设备在检测同房间的IoT设备时,还确了定IoT设备所属的子空间。In some embodiments, the implementation method 1 of the above-mentioned scheme 1 and scheme 2 corresponds to the automatic division method of the subspace, and the implementation method 2 of scheme 2 corresponds to the custom division method of the subspace. The detection request sent by the terminal device 100 to the bedroom anchor device can carry a subspace parameter, which indicates the division method and/or number of divisions of the bedroom subspace; based on the subspace parameter, when the bedroom anchor device detects the IoT device in the same room, it also determines the subspace to which the IoT device belongs.
在一些实施例中,用户可以通过智能家居APP设置卧室子空间的子空间参数,子空间参数包括划分方式和/或划分数量。自定义划分方式中,用户还可以设置每个子空间的空间范围。用户设置子空间参数前,子空间参数可以采用默认参数;例如,默认参数中,划分方式为自动划分,划分数量为M(例如2)。In some embodiments, the user can set the subspace parameters of the bedroom subspace through the smart home APP, and the subspace parameters include the division method and/or the number of divisions. In the custom division method, the user can also set the spatial range of each subspace. Before the user sets the subspace parameters, the subspace parameters can use the default parameters; for example, in the default parameters, the division method is automatic division, and the number of divisions is M (for example, 2).
示例性的,如图17D所示,用户界面12显示卧室的子空间显示区时,还显示有设置控件402,设置控件402用于设置卧室子空间的子空间参数。如图17D和图17E所示,终端设备100检测到用户点击设置控件402后,显示卧室子空间的设置框404。设置框404包括划分数量的输入框405、自动划分方式的选项406、自定义划分方式的选项407、房间布局信息408、各子空间的空间范围输入框(例如子空间1的空间范围输入框409)和确定控件410。房间布局信息408用于指示卧室的空间范围,例如房间布局信息408
包括卧室的四个角坐标,四个角坐标指示了卧室的二维空间范围。Exemplarily, as shown in FIG17D , when the user interface 12 displays the subspace display area of the bedroom, a setting control 402 is also displayed, and the setting control 402 is used to set the subspace parameters of the bedroom subspace. As shown in FIG17D and FIG17E , after the terminal device 100 detects that the user clicks the setting control 402, a setting box 404 for the bedroom subspace is displayed. The setting box 404 includes an input box 405 for the number of divisions, an option 406 for the automatic division method, an option 407 for the custom division method, room layout information 408, a spatial range input box for each subspace (for example, a spatial range input box 409 for subspace 1), and a confirmation control 410. The room layout information 408 is used to indicate the spatial range of the bedroom. For example, the room layout information 408 Including the four corner coordinates of the bedroom, the four corner coordinates indicate the two-dimensional spatial range of the bedroom.
如图17F和图17G所示,用户选择自定义划分方式的选项407,并输入各子空间的空间范围后,终端设备100检测到用户点击确定控件410;响应于该点击操作,基于的IoT设备的位置以及各子空间的空间范围,终端设备100可以确定IoT设备的所属子空间。参考图17C和图17G,分别采用两种划分方式确定的IoT设备(例如卧室加湿器)的所属子空间可以不同。As shown in Figures 17F and 17G, after the user selects option 407 of the custom division method and enters the spatial range of each subspace, the terminal device 100 detects that the user clicks the confirmation control 410; in response to the click operation, based on the location of the IoT device and the spatial range of each subspace, the terminal device 100 can determine the subspace to which the IoT device belongs. Referring to Figures 17C and 17G, the subspaces to which the IoT devices (e.g., bedroom humidifiers) determined by the two division methods can be different.
本申请实施例提供的一种IoT设备配网方法中,锚点设备200可以利用WiFi连接流程(参见图13所示的WiFi连接的流程示意图)中传输的信号,检测同房间的待配网的IoT设备,并向IoT设备发送配网信息,以使得IoT设备完成上述WiFi连接流程。In an IoT device networking method provided in an embodiment of the present application, the anchor device 200 can utilize the signal transmitted in the WiFi connection process (see the WiFi connection process diagram shown in Figure 13) to detect the IoT device to be networked in the same room, and send network configuration information to the IoT device, so that the IoT device completes the above-mentioned WiFi connection process.
示例性的,图18示出了上述IoT设备配网方法的流程示意图,该方法包括但不限于步骤S401至S410。Exemplarily, FIG18 shows a schematic flow chart of the above-mentioned IoT device network configuration method, which includes but is not limited to steps S401 to S410.
S401、锚点设备200的WiFi通信模块广播Beacon帧。S401. The WiFi communication module of the anchor device 200 broadcasts a Beacon frame.
在一些实施例中,步骤S402之前还包括S101和/或S102,锚点设备200响应于终端设备100的检测请求,通过WiFi通信模块广播Beacon帧。In some embodiments, step S402 also includes S101 and/or S102 , and the anchor device 200 broadcasts a Beacon frame through the WiFi communication module in response to the detection request of the terminal device 100 .
在一些实施例中,各锚点设备的WiFi通信模块在低功率发射模式下广播Beacon帧,并完成后续配网流程。通过低功率发射模式可以降低其他房间的IoT设备扫描到Beacon帧的可能性,进而避免锚点设备200对其他房间的IoT设备做进一步的处理,即执行S402和S403。如图18所示,IoT设备400接收不到锚点设备300在低功率发射模式下广播的Beacon帧。In some embodiments, the WiFi communication module of each anchor device broadcasts Beacon frames in low-power transmission mode and completes the subsequent network configuration process. The low-power transmission mode can reduce the possibility of IoT devices in other rooms scanning Beacon frames, thereby avoiding the anchor device 200 from further processing the IoT devices in other rooms, that is, executing S402 and S403. As shown in Figure 18, the IoT device 400 cannot receive the Beacon frame broadcast by the anchor device 300 in low-power transmission mode.
S402、IoT设备400扫描到上述Beacon帧后,发送探测请求(Probe request)。S402. After the IoT device 400 scans the above Beacon frame, it sends a probe request (Probe request).
在一些实施例中,锚点设备200广播的Beacon帧携带配网标识3,配网标识3用于指示该Beacon帧用于配网;待配网的IoT设备检测到Beacon帧中的配网标识3后,反馈探测请求,而未处于待配网状态的IoT设备检测到配网标识3,不会反馈探测请求。In some embodiments, the Beacon frame broadcast by the anchor device 200 carries a network configuration identifier 3, which is used to indicate that the Beacon frame is used for network configuration; after the IoT device to be configured detects the network configuration identifier 3 in the Beacon frame, it will feedback a detection request, while the IoT device that is not in the state of being configured will detect the network configuration identifier 3 and will not feedback a detection request.
在一些实施例中,IoT设备400发送的探测请求中携带配网标识2,配网标识2用于指示IoT设备400处于待配网状态;锚点设备200基于配网标识2确定IoT设备400处于待配网状态后,才执行S403。In some embodiments, the detection request sent by the IoT device 400 carries a network configuration identifier 2, and the network configuration identifier 2 is used to indicate that the IoT device 400 is in a state to be configured with a network; the anchor device 200 determines that the IoT device 400 is in a state to be configured with a network based on the network configuration identifier 2 before executing S403.
S403、基于IoT设备400发送的N个探测请求,检测到IoT设备400为同房间的待配网的IoT设备,N为正整数。S403. Based on N detection requests sent by the IoT device 400, it is detected that the IoT device 400 is an IoT device to be networked in the same room, where N is a positive integer.
具体的,如何基于IoT设备400发送的N个信号,检测到IoT设备400是否为同房间的待配网的IoT设备,可以参考步骤S205的相关实施例,此处不再赘述。Specifically, how to detect whether the IoT device 400 is an IoT device to be networked in the same room based on the N signals sent by the IoT device 400 can be referred to the relevant embodiments of step S205, which will not be repeated here.
在一些实施例中,IoT设备400扫描到Beacon帧后,周期性地发送探测请求,直至接收到锚点设备200反馈的探测响应。在一些实施例中,IoT设备400扫描到用于配网的Beacon帧后,按照配网的预设协议周期性地发送N个探测请求。In some embodiments, after the IoT device 400 scans the Beacon frame, it periodically sends a probe request until it receives a probe response fed back by the anchor device 200. In some embodiments, after the IoT device 400 scans the Beacon frame for network configuration, it periodically sends N probe requests according to the preset protocol of network configuration.
在一些实施例中,锚点设备200所在的房间1可以包括多个子空间;检测到IoT设备400为同房间的待配网的IoT设备后,还可以确定IoT设备400所在的子空间;具体的,可以参考前述实施例,此处也不再赘述。In some embodiments, room 1 where the anchor device 200 is located may include multiple subspaces; after detecting that the IoT device 400 is an IoT device to be networked in the same room, the subspace where the IoT device 400 is located can also be determined; for details, please refer to the aforementioned embodiments, which will not be repeated here.
S404、锚点设备200向服务器700发送查询请求,查询请求包括IoT设备400的设备ID和账号1。S404 . The anchor device 200 sends a query request to the server 700 , where the query request includes the device ID and account 1 of the IoT device 400 .
S405、基于上述查询请求,服务器700查询IoT设备400是否为账号1的已授权的IoT设备。S405 . Based on the above query request, the server 700 queries whether the IoT device 400 is an authorized IoT device of account 1 .
S406、服务器700向锚点设备200发送指示信息1,指示信息1用于指示IoT设备400是否为账号1的已授权的IoT设备。S406 . The server 700 sends indication information 1 to the anchor device 200 . The indication information 1 is used to indicate whether the IoT device 400 is an authorized IoT device of account 1 .
具体的,步骤S404至S406可以参考前述步骤S109至S111,此处不再赘述。Specifically, steps S404 to S406 may refer to the aforementioned steps S109 to S111, which will not be described in detail here.
S407、基于指示信息1,确定IoT设备400为账号1的已授权的IoT设备后,锚点设备200向IoT设备400发送探测响应(Probe response),探测响应包括配网信息。S407. Based on indication information 1, after determining that IoT device 400 is an authorized IoT device of account 1, anchor device 200 sends a probe response (Probe response) to IoT device 400, and the probe response includes network configuration information.
S408、基于上述配网信息,IoT设备400与锚点设备200建立WiFi连接2,接入锚点设备200所在的WiFi网络。S408. Based on the above network configuration information, the IoT device 400 establishes a WiFi connection 2 with the anchor device 200 and accesses the WiFi network where the anchor device 200 is located.
利用上述配网信息,IoT设备400与锚点设备200继续执行后续的WiFi连接流程,即执行链路认证、关联过程和密钥协商和IP分配中的部分或全部阶段。在一种实现方式中,配网信息包括SSID和无线网络密码1;链路认证阶段中,IoT设备400基于配网信息向锚点设备200发送认证请求(Auth request),认证请求携带上述SSID和无线网络密码1;锚点设备200验证无线网络密码1正确后,向IoT设备400发送认证响应(Auth response)。可选的,上述认证请求也可以视为IoT设备400的应答信息,用于指示IoT设备400已接收到配网信息。Using the above network configuration information, the IoT device 400 and the anchor device 200 continue to execute the subsequent WiFi connection process, that is, execute part or all of the stages in the link authentication, association process, key negotiation and IP allocation. In one implementation, the network configuration information includes the SSID and the wireless network password 1; in the link authentication stage, the IoT device 400 sends an authentication request (Auth request) to the anchor device 200 based on the network configuration information, and the authentication request carries the above SSID and the wireless network password 1; after the anchor device 200 verifies that the wireless network password 1 is correct, it sends an authentication response (Auth response) to the IoT device 400. Optionally, the above authentication request can also be regarded as the response information of the IoT device 400, which is used to indicate that the IoT device 400 has received the network configuration information.
S409、锚点设备200向终端设备100发送配网完成信息;配网完成信息用于指示IoT设备400已完成
配网。S409, the anchor device 200 sends a network configuration completion message to the terminal device 100; the network configuration completion message is used to indicate that the IoT device 400 has completed Distribution network.
S410、基于配网完成信息,终端设备100显示新增的IoT设备400的设备标识和所属房间。S410. Based on the network configuration completion information, the terminal device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
步骤S409和S410的具体实现,可以参前述实施例中步骤S107和S108的相关描述,此处不再赘述。For the specific implementation of steps S409 and S410, reference may be made to the related description of steps S107 and S108 in the aforementioned embodiment, which will not be repeated here.
本申请实施例中,上述WiFi通信模块广播的Beacon帧也可以被称为第一发现信号,WiFi连接2也可以被称为第一WiFi连接。In the embodiment of the present application, the Beacon frame broadcast by the above-mentioned WiFi communication module may also be referred to as the first discovery signal, and WiFi connection 2 may also be referred to as the first WiFi connection.
在一些实施例中,参见图6A和图6B所示的用户界面,基于配网完成信息,终端设备100可以在当前显示界面(例如主界面11)上显示提示信息411,提示信息411用于提示用户IoT设备已自动添加完成;检查到用户点击提示信息411后,终端设备100可以在智能家居APP的各房间显示区显示各房间新添加的IoT设备。In some embodiments, referring to the user interfaces shown in FIGS. 6A and 6B , based on the network configuration completion information, the terminal device 100 may display a prompt message 411 on the current display interface (e.g., the main interface 11), and the prompt message 411 is used to prompt the user that the IoT device has been automatically added; after detecting that the user clicks on the prompt message 411, the terminal device 100 may display the newly added IoT devices in each room in the display area of each room of the smart home APP.
本申请实施例提供的一种IoT设备配网方法中,中枢网关600和各房间的锚点设备(即从网关)均为蓝牙mesh组网中的节点。从网关200基于扫描到的待配网的IoT设备的Beacon帧,可以检测同房间的IoT设备(例如IoT设备400);然后,通过蓝牙mesh的配网交互,从网关200可以协助同房间的未配网的IoT设备400成为蓝牙mesh组网中已配网的节点。此外,将已配网的IoT设备的设备信息均记录在中枢网关600,这样,即使广域网异常,也能通过中枢网关600控制本地已配网的IoT设备。可选的,终端设备100(即中控设备100)也可以为蓝牙mesh组网中的节点。In an IoT device networking method provided in an embodiment of the present application, the central gateway 600 and the anchor devices in each room (i.e., slave gateways) are all nodes in the Bluetooth mesh network. The slave gateway 200 can detect the IoT devices in the same room (such as the IoT device 400) based on the scanned Beacon frames of the IoT devices to be networked; then, through the Bluetooth mesh networking interaction, the slave gateway 200 can assist the un-networked IoT device 400 in the same room to become a networked node in the Bluetooth mesh network. In addition, the device information of the networked IoT devices is recorded in the central gateway 600, so that even if the wide area network is abnormal, the local networked IoT devices can be controlled through the central gateway 600. Optionally, the terminal device 100 (i.e., the central control device 100) can also be a node in the Bluetooth mesh network.
示例性的,图19示出了上述IoT设备配网方法的流程示意图,该方法包括但不限于步骤S501至S510。Exemplarily, FIG19 shows a schematic flow chart of the above-mentioned IoT device network configuration method, which includes but is not limited to steps S501 to S510.
S501、IoT设备400的蓝牙通信模块广播Beacon帧。S501. The Bluetooth communication module of the IoT device 400 broadcasts a Beacon frame.
本申请实施例中,上述蓝牙通信模块广播的Beacon帧也可以被称为第二发现信号。In the embodiment of the present application, the Beacon frame broadcast by the above-mentioned Bluetooth communication module can also be called a second discovery signal.
在一些实施例中,IoT设备400广播的Beacon帧的数据结构类型为mesh Beacon,该数据结构类型用于指示IoT设备400是未配网的蓝牙设备;上述Beacon可以包括通用唯一识别码(universally unique identifier,UUID)和带外数据(Out of Band,OOB)信息,OOB信息用于指示本设备支持的OOB类型。In some embodiments, the data structure type of the Beacon frame broadcast by the IoT device 400 is mesh Beacon, which is used to indicate that the IoT device 400 is an unconfigured Bluetooth device; the above-mentioned Beacon may include a universally unique identifier (UUID) and out-of-band (OOB) information, and the OOB information is used to indicate the OOB type supported by the device.
在一些实施例中,各从网关的蓝牙通信模块在低功率发射模式下广播Beacon帧。In some embodiments, the Bluetooth communication module of each slave gateway broadcasts Beacon frames in a low-power transmission mode.
S502、基于IoT设备400发送的N个Beacon帧,从网关200检测到IoT设备400为同房间的IoT设备,N为正整数。S502 . Based on N Beacon frames sent by the IoT device 400 , the gateway 200 detects that the IoT device 400 is an IoT device in the same room, where N is a positive integer.
具体的,如何基于接收到的IoT设备400的N个信号,检测IoT设备400是否为同房间的IoT设备,可以参考步骤S205的相关描述,此处不再赘述。Specifically, how to detect whether the IoT device 400 is an IoT device in the same room based on the N signals received from the IoT device 400 can be referred to the relevant description of step S205, which will not be repeated here.
已配网的从网关200启动蓝牙通信模块,扫描附近待配网的IoT设备的Beacon帧。在基于IoT设备400广播的Beacon帧确定IoT设备400为同房间的IoT设备后,从网关200才继续执行后续的蓝牙mesh的配网交互(即步骤S503至S507),从而将未配网的IoT设备400变为蓝牙mesh组网中的已配网的节点。The slave gateway 200 that has been networked starts the Bluetooth communication module and scans the Beacon frames of the nearby IoT devices to be networked. After determining that the IoT device 400 is an IoT device in the same room based on the Beacon frames broadcast by the IoT device 400, the slave gateway 200 continues to perform the subsequent Bluetooth mesh network interaction (i.e., steps S503 to S507), thereby turning the unnetworked IoT device 400 into a networked node in the Bluetooth mesh network.
S503、从网关200邀请IoT设备400接入蓝牙mesh组网。S503 . Invite the IoT device 400 from the gateway 200 to access the Bluetooth mesh network.
在一些实施例中,S503具体可以包括S503A和S503B。In some embodiments, S503 may specifically include S503A and S503B.
S503A、从网关200向IoT设备400发送邀请信号(例如invite指令),邀请信号用于邀请IoT设备400接入蓝牙mesh组网。S503A, sending an invitation signal (eg, an invite command) from the gateway 200 to the IoT device 400, where the invitation signal is used to invite the IoT device 400 to access the Bluetooth mesh network.
S503B、基于上述邀请信号,IoT设备400向从网关200发送能力信号(例如capbilities指令),能力信号用于指示IoT设备400支持的配网能力(provisioning Capabiliy)。S503B. Based on the above invitation signal, the IoT device 400 sends a capability signal (such as a capabilities command) to the gateway 200. The capability signal is used to indicate the provisioning capabilities (provisioning capabilities) supported by the IoT device 400.
能力信号指示的配网能力包括以下部分或全部:加密算法、公钥类型、静态OOB类型、最大输出0OB大小、是否支持OOB输出行为、最大输入OOB大小、是否支持OOB输入行为、元素数量等。The network configuration capabilities indicated by the capability signal include some or all of the following: encryption algorithm, public key type, static OOB type, maximum output OOB size, whether OOB output behavior is supported, maximum input OOB size, whether OOB input behavior is supported, number of elements, etc.
S504、从网关200和IoT设备400交换公钥。S504 : The gateway 200 and the IoT device 400 exchange public keys.
在一些实施例中,S504具体可以包括S504A和S504B。In some embodiments, S504 may specifically include S504A and S504B.
S504A、从网关200向IoT设备400发送配网开始信号(Provisioning Start)。S504A, send a provisioning start signal (Provisioning Start) from the gateway 200 to the IoT device 400.
从网关200从IoT设备400的配网能力(provisioning Capabiliy)中选择公钥交换流程的具体參数后,发送配网开始信号,配网开始信号用于指示开始公钥交换流程,以及从网关己按照IoT设备400的配网能力配置加密方式和OOB相关参数。After selecting specific parameters of the public key exchange process from the provisioning capability of the IoT device 400, the gateway 200 sends a provisioning start signal, which is used to indicate the start of the public key exchange process, and the encryption method and OOB related parameters configured by the gateway according to the provisioning capability of the IoT device 400.
S504B、从网关200向IoT设备400发送配网公钥(Provisioning Public Key)。S504B, send the provisioning public key (Provisioning Public Key) from the gateway 200 to the IoT device 400.
S505、从网关200和IoT设备400进行身份认证。S505 , perform identity authentication from the gateway 200 and the IoT device 400 .
具体的,根据IoT设备400的OOB能力,从网关200选择对应的验证方法对IoT设备400进行身份验证。IoT设备400的OOB能力可以包括如下三种:输出OOB(Output OOB)、输入OOB(Input OOB)、以及静态OOB(Static OOB)或无OOB(No OOB)。
Specifically, according to the OOB capability of the IoT device 400, the gateway 200 selects a corresponding verification method to authenticate the IoT device 400. The OOB capability of the IoT device 400 may include the following three types: output OOB, input OOB, and static OOB or no OOB.
S506、从网关200向IoT设备400分发配网信息(Distribution Of Provisioning Data),配网信息包括网络密钥(Network Key)和IoT设备400的单播地址(Unicast Address),配网信息用于接入蓝牙mesh组网。S506. Distribute the provisioning data from the gateway 200 to the IoT device 400. The provisioning data includes the network key and the unicast address of the IoT device 400. The provisioning data is used to access the Bluetooth mesh network.
身份认证完后,从网关200和IoT设备400,均会利用交换的公钥和和两个设备的私钥生成会话密钥(Session Key),会话密钥用于加密配网信息。然后,从网关200向IoT设备400分发配网信息,配网信息包括网络密钥和为IoT设备400分配的单播地址,网络密钥是加入蓝牙mesh组网的蓝牙mesh安全性参数。这样,IoT设备400获取了网络密钥和单播地址,这意味着IoT设备400已成为了蓝牙mesh组网中的节点。After the identity authentication is completed, the gateway 200 and the IoT device 400 will use the exchanged public key and the private keys of the two devices to generate a session key (Session Key), which is used to encrypt the network configuration information. Then, the network configuration information is distributed from the gateway 200 to the IoT device 400. The network configuration information includes the network key and the unicast address assigned to the IoT device 400. The network key is the Bluetooth mesh security parameter for joining the Bluetooth mesh network. In this way, the IoT device 400 obtains the network key and the unicast address, which means that the IoT device 400 has become a node in the Bluetooth mesh network.
S507、从网关200向中枢网关600发送配网完成信息;配网完成信息用于指示IoT设备400已完成配网。S507. Send network configuration completion information from the gateway 200 to the central gateway 600; the network configuration completion information is used to indicate that the IoT device 400 has completed network configuration.
S508、中枢网关600记录蓝牙mesh组网中新增的IoT设备400的所属房间。S508. The central gateway 600 records the room to which the newly added IoT device 400 in the Bluetooth mesh network belongs.
S509、中枢网关600向中控设备100发送配网完成信息。S509. The central gateway 600 sends network configuration completion information to the central control device 100.
S510、基于配网完成信息,中控设备100显示新增的IoT设备400的设备标识和所属房间。S510. Based on the network configuration completion information, the central control device 100 displays the device identification and the room to which the newly added IoT device 400 belongs.
本申请的各实施方式可以任意进行组合,以实现不同的技术效果。The various implementation modes of the present application can be combined arbitrarily to achieve different technical effects.
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(solid state disk,SSD))等。In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid state drive (SSD)), etc.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。A person skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by a computer program to instruct the relevant hardware, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above-mentioned method embodiments. The aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.
总之,以上所述仅为本发明技术方案的实施例而已,并非用于限定本发明的保护范围。凡根据本发明的揭露,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
In short, the above description is only an embodiment of the technical solution of the present invention, and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made according to the disclosure of the present invention shall be included in the protection scope of the present invention.
Claims (21)
- 一种IoT设备配网方法,应用于位于第一房间的第一锚点设备,所述第一锚点设备为分别位于不同房间的多个锚点设备中的任一个,其特征在于,包括:An IoT device network configuration method is applied to a first anchor device located in a first room, wherein the first anchor device is any one of a plurality of anchor devices located in different rooms, and is characterized by comprising:所述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测所述第一IoT设备是否为所述第一房间内的待配网的IoT设备;The first anchor device detects, based on the received first signal sent by the first IoT device, whether the first IoT device is an IoT device to be networked in the first room;检测到所述第一IoT设备为所述第一房间内的待配网的IoT设备的情况下,所述第一锚点设备向所述第一IoT设备发送配网信息;When it is detected that the first IoT device is an IoT device to be networked in the first room, the first anchor device sends network configuration information to the first IoT device;确定所述第一IoT设备配网完成后,所述第一锚点设备向终端设备发送配网完成信息,所述配网完成信息用于指示所述第一IoT设备已完成配网,以及所述第一IoT设备的所属房间为所述第一锚点设备所在的所述第一房间。After determining that the network configuration of the first IoT device is completed, the first anchor device sends network configuration completion information to the terminal device, where the network configuration completion information is used to indicate that the network configuration of the first IoT device has been completed, and that the room to which the first IoT device belongs is the first room where the first anchor device is located.
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, characterized in that the method further comprises:所述第一锚点设备接收所述终端设备发送的检测请求,所述检测请求用于触发锚点设备检测同房间内的待配网的IoT设备;The first anchor device receives a detection request sent by the terminal device, where the detection request is used to trigger the anchor device to detect an IoT device to be networked in the same room;所述第一锚点设备基于接收到的第一IoT设备的信号,检测所述第一IoT设备是否为所述第一房间内的待配网的IoT设备,包括:The first anchor device detects, based on the received signal of the first IoT device, whether the first IoT device is an IoT device to be networked in the first room, including:响应于所述检测请求,所述第一锚点设备基于接收到的所述第一IoT设备的信号,检测所述第一IoT设备是否为所述第一房间内的待配网的IoT设备。In response to the detection request, the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on a received signal from the first IoT device.
- 根据权利要求1所述的方法,其特征在于,所述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测所述第一IoT设备是否为所述第一房间内的待配网的IoT设备,包括:The method according to claim 1 is characterized in that the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received and sent by the first IoT device, comprising:所述第一锚点设备基于第一近距离通信模块接收到的所述第一IoT设备发送的所述第一信号,检测所述第一IoT设备是否为所述第一房间内的待配网的IoT设备;所述配网信息用于所述第一IoT设备的第二近距离通信模块接入网络。The first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal sent by the first IoT device and received by the first short-range communication module; the network configuration information is used for the second short-range communication module of the first IoT device to access the network.
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, characterized in that the method further comprises:所述第一锚点设备的WiFi通信模块启动第一热点;The WiFi communication module of the first anchor device starts the first hotspot;所述第一锚点设备的第一热点与所述第一IoT设备建立WiFi连接;所述第一信号包括所述第一热点接收到的所述第一IoT设备发送的信号;The first hotspot of the first anchor device establishes a WiFi connection with the first IoT device; the first signal includes a signal sent by the first IoT device and received by the first hotspot;所述第一锚点设备向所述第一IoT设备发送配网信息,包括:The first anchor device sends network configuration information to the first IoT device, including:所述第一锚点设备的第一热点向所述第一IoT设备发送配网信息。The first hotspot of the first anchor device sends network configuration information to the first IoT device.
- 根据权利要求4所述的方法,其特征在于,所述配网信息用于所述第一IoT设备接入所述第一锚点设备的第二热点;所述方法还包括:The method according to claim 4 is characterized in that the network configuration information is used for the first IoT device to access the second hotspot of the first anchor device; the method further comprises:所述第一锚点设备的WiFi通信模块启动所述第二热点;The WiFi communication module of the first anchor device starts the second hotspot;基于所述配网信息,所述第一锚点设备的所述第二热点与所述第一IoT设备建立WiFi连接;Based on the network configuration information, the second hotspot of the first anchor device establishes a WiFi connection with the first IoT device;确定所述第一IoT设备配网完成后,所述第一锚点设备向所述终端设备发送配网完成信息,包括:After determining that the network configuration of the first IoT device is completed, the first anchor device sends network configuration completion information to the terminal device, including:检测到所述第一IoT设备接入所述第二热点后,所述第一锚点设备向所述终端设备发送配网完成信息。After detecting that the first IoT device is connected to the second hotspot, the first anchor device sends network configuration completion information to the terminal device.
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, characterized in that the method further comprises:所述第一锚点设备的WiFi通信模块广播第一发现信号;The WiFi communication module of the first anchor device broadcasts a first discovery signal;所述第一锚点设备接收所述第一IoT设备响应于所述第一发现信号发送的探测请求;所述第一信号包括所述探测请求;The first anchor device receives a detection request sent by the first IoT device in response to the first discovery signal; the first signal includes the detection request;所述第一锚点设备向所述第一IoT设备发送配网信息,包括:The first anchor device sends network configuration information to the first IoT device, including:基于所述探测请求,所述第一锚点设备向所述第一IoT设备发送探测响应,所述探测响应包括所述配网信息。Based on the detection request, the first anchor device sends a detection response to the first IoT device, where the detection response includes the network configuration information.
- 根据权利要求6所述的方法,其特征在于,所述探测请求和所述探测响应用于建立第一WiFi连接,所述配网信息用于建立所述第一WiFi连接;所述方法还包括: The method according to claim 6, characterized in that the probe request and the probe response are used to establish a first WiFi connection, and the network configuration information is used to establish the first WiFi connection; the method further comprises:基于所述配网信息,所述第一锚点设备与所述第一IoT设备建立第一WiFi连接;Based on the network configuration information, the first anchor device establishes a first WiFi connection with the first IoT device;确定所述第一IoT设备配网完成后,所述第一锚点设备向所述终端设备发送配网完成信息,包括:After determining that the network configuration of the first IoT device is completed, the first anchor device sends network configuration completion information to the terminal device, including:检测到建立所述第一WiFi连接后,所述第一锚点设备向所述终端设备发送配网完成信息。After detecting that the first WiFi connection is established, the first anchor point device sends network configuration completion information to the terminal device.
- 根据权利要求1所述的方法,其特征在于,所述第一锚点设备为蓝牙mesh组网中已配网的节点,所述方法还包括:The method according to claim 1, wherein the first anchor device is a configured node in a Bluetooth mesh network, and the method further comprises:所述第一锚点设备接收到所述第一IoT设备的蓝牙通信模块广播的第二发现信号,所述第二发现信号携带信号类型,所述信号类型指示所述第二发现信号用于蓝牙mesh配网;所述第一信号包括所述第二发现信号;The first anchor device receives a second discovery signal broadcasted by a Bluetooth communication module of the first IoT device, where the second discovery signal carries a signal type, and the signal type indicates that the second discovery signal is used for Bluetooth mesh network configuration; and the first signal includes the second discovery signal;所述第一锚点设备向所述第一IoT设备发送配网信息,包括:The first anchor device sends network configuration information to the first IoT device, including:所述第一锚点设备的蓝牙通信模块向所述第一IoT设备发送配网信息,所述配网信息用于接入所述蓝牙mesh组网。The Bluetooth communication module of the first anchor device sends network configuration information to the first IoT device, where the network configuration information is used to access the Bluetooth mesh network.
- 根据权利要求1至8任一项所述的方法,其特征在于,所述第一信号包括N个第二信号,N为正整数;所述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测所述第一IoT设备是否为所述第一房间内的待配网的IoT设备,包括:The method according to any one of claims 1 to 8 is characterized in that the first signal includes N second signals, where N is a positive integer; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the received first signal sent by the first IoT device, comprising:基于接收到的第二信号,获取第二信号的到达角和传输时延;Based on the received second signal, acquiring an arrival angle and a transmission delay of the second signal;将一个第二信号对应的到达角和传输时延作为一个样本数据,利用聚类检测算法获取上述N个第二信号的聚类趋势;Taking the arrival angle and transmission delay corresponding to a second signal as a sample data, and using a cluster detection algorithm to obtain the clustering trend of the N second signals;聚类趋势大于第一门限时,确定所述第一IoT设备为所述第一房间内的待配网的IoT设备。When the clustering trend is greater than the first threshold, it is determined that the first IoT device is an IoT device to be networked in the first room.
- 根据权利要求9所述的方法,其特征在于,所述第一房间对应的所述第一门限是基于所述第一房间的空间识别信息确定的,所述空间识别信息包括以下部分或全部:所述第一锚点设备在所述第一房间中的位置、所述第一锚点设备的设备型号、所述第一房间的房间布局、所述第一房间的隔间材质。The method according to claim 9 is characterized in that the first threshold corresponding to the first room is determined based on space identification information of the first room, and the space identification information includes part or all of the following: the position of the first anchor device in the first room, the device model of the first anchor device, the room layout of the first room, and the partition material of the first room.
- 根据权利要求1至8任一项所述的方法,其特征在于,所述第一锚点设备存储有所述第一房间的空间范围;所述第一锚点设备基于接收到的第一IoT设备发送的第一信号,检测所述第一IoT设备是否为所述第一房间内的待配网的IoT设备,包括:The method according to any one of claims 1 to 8 is characterized in that the first anchor device stores the spatial range of the first room; the first anchor device detects whether the first IoT device is an IoT device to be networked in the first room based on the first signal received from the first IoT device, comprising:所述第一锚点设备基于接收到的所述第一IoT设备发送的所述第一信号,获取所述第一IoT设备相对于所述第一锚点设备的方位和距离;The first anchor device acquires, based on the received first signal sent by the first IoT device, the position and distance of the first IoT device relative to the first anchor device;基于所述第一IoT设备相对于所述第一锚点设备的方位和距离,以及所述第一锚点设备的位置,所述第一锚点设备获取所述第一IoT设备的位置;Based on the orientation and distance of the first IoT device relative to the first anchor device and the position of the first anchor device, the first anchor device acquires the position of the first IoT device;所述第一IoT设备的位置在所述第一房间的空间范围内时,所述第一锚点设备确定所述第一IoT设备为所述第一房间内的待配网的IoT设备。When the location of the first IoT device is within the spatial range of the first room, the first anchor point device determines that the first IoT device is an IoT device to be networked in the first room.
- 根据权利要求1至8任一项所述的方法,其特征在于,所述第一房间包括M个子空间,M为大于1的正整数,所述方法还包括:The method according to any one of claims 1 to 8, characterized in that the first room includes M subspaces, M is a positive integer greater than 1, and the method further comprises:所述第一锚点设备基于接收到的所述第一IoT设备发送的所述第一信号,获取所述第一IoT设备相对于所述第一锚点设备的距离,以及所述第一信号的到达角;The first anchor device acquires, based on the received first signal sent by the first IoT device, a distance of the first IoT device relative to the first anchor device and an arrival angle of the first signal;将一个IoT设备对应的到达角和距离作为一个样本数据,所述第一锚点设备利用聚类算法对N个IoT设备对应的样本数据进行聚类,获取M个子空间中每个子空间包括的IoT设备;所述配网完成信息还指示了所述第一IoT设备所在的子空间。The arrival angle and distance corresponding to an IoT device are taken as sample data. The first anchor point device uses a clustering algorithm to cluster the sample data corresponding to N IoT devices to obtain the IoT devices included in each subspace of M subspaces; the network configuration completion information also indicates the subspace where the first IoT device is located.
- 根据权利要求1至8任一项所述的方法,其特征在于,所述第一房间包括M个子空间,M为大于1的正整数,所述第一锚点设备存储有所述第一房间的每个子空间的空间范围;所述方法还包括:The method according to any one of claims 1 to 8, characterized in that the first room includes M subspaces, M is a positive integer greater than 1, and the first anchor device stores a spatial range of each subspace of the first room; the method further comprises:所述第一锚点设备基于接收到的所述第一IoT设备发送的第一信号,获取第一IoT设备相对于所述第一锚点设备的距离和方位;The first anchor device acquires, based on the received first signal sent by the first IoT device, a distance and a direction of the first IoT device relative to the first anchor device;基于所述第一IoT设备相对于所述第一锚点设备的距离和方位,以及所述第一锚点设备的位置,所述第一锚点设备获取所述第一IoT设备的位置; Based on the distance and orientation of the first IoT device relative to the first anchor device and the position of the first anchor device, the first anchor device acquires the position of the first IoT device;所述第一IoT设备的位置在所述第一子空间的空间范围内时,所述第一锚点设备确定所述第一IoT设备的所在子空间为所述第一子空间,所述M个子空间包括所述第一子空间;When the location of the first IoT device is within the spatial range of the first subspace, the first anchor point device determines that the subspace where the first IoT device is located is the first subspace, and the M subspaces include the first subspace;所述配网完成信息还指示了所述第一IoT设备所在的子空间。The network configuration completion information also indicates the subspace where the first IoT device is located.
- 根据权利要求1至8任一项所述的方法,其特征在于,所述第一锚点设备向所述终端设备发送配网完成信息,包括:所述第一锚点设备通过向中枢网关向所述终端设备发送配网完成信息,所述中枢网关用于记录已配网的所述第一IoT设备以及所述第一IoT设备的所属房间。The method according to any one of claims 1 to 8 is characterized in that the first anchor point device sends network configuration completion information to the terminal device, including: the first anchor point device sends network configuration completion information to the terminal device via a central gateway, and the central gateway is used to record the first IoT device that has been configured and the room to which the first IoT device belongs.
- 根据权利要求1至8任一项所述的方法,其特征在于,所述第一锚点设备向所述第一IoT设备发送配网信息之前,还包括:The method according to any one of claims 1 to 8, characterized in that before the first anchor device sends the network configuration information to the first IoT device, it also includes:所述第一锚点设备向所述服务器发送查询请求,所述查询请求包括所述第一IoT设备的设备ID和所述终端设备登录的第一账号,所述查询请求用于查询所述第一IoT设备是否为所述第一账号的已授权的IoT设备;The first anchor device sends a query request to the server, where the query request includes a device ID of the first IoT device and a first account logged in by the terminal device, and the query request is used to query whether the first IoT device is an authorized IoT device of the first account;所述第一锚点设备接收所述服务器发送的第一指示信息;The first anchor device receives the first indication information sent by the server;所述第一锚点设备向所述第一IoT设备发送配网信息,包括:The first anchor device sends network configuration information to the first IoT device, including:在所述第一指示信息指示所述第一IoT设备为所述第一账号的已授权的IoT设备的情况下,所述第一锚点设备向所述第一IoT设备发送配网信息。When the first indication information indicates that the first IoT device is an authorized IoT device of the first account, the first anchor point device sends network configuration information to the first IoT device.
- 一种IoT设备配网方法,应用于终端设备,所述终端设备记录有分别位于不同房间的多个锚点设备,位于所述第一房间的第一锚点设备为所述多个锚点设备中的任一个,其特征在于,包括:An IoT device network configuration method is applied to a terminal device, wherein the terminal device records a plurality of anchor devices located in different rooms, and a first anchor device located in the first room is any one of the plurality of anchor devices, and is characterized by comprising:所述终端设备接收所述第一锚点设备发送的配网完成信息,所述配网完成信息用于指示所述第一IoT设备已完成配网,所述配网完成信息是所述第一锚点设备检测到所述第一IoT设备为同房间的待配网的IoT设备,并确定所述第一IoT设备配网完成后发送的;The terminal device receives network configuration completion information sent by the first anchor device, where the network configuration completion information is used to indicate that the first IoT device has completed network configuration, and the network configuration completion information is sent after the first anchor device detects that the first IoT device is an IoT device to be configured in the same room and determines that the network configuration of the first IoT device is completed;基于所述配网完成信息,所述终端设备确定所述第一IoT设备的所属房间为所述第一房间。Based on the network configuration completion information, the terminal device determines that the room to which the first IoT device belongs is the first room.
- 根据权利要求16所述的方法,其特征在于,所述方法还包括:The method according to claim 16, characterized in that the method further comprises:所述终端设备分别向所述多个锚点设备发送检测请求,所述检测请求用于触发锚点设备检测同房间内的待配网的IoT设备。The terminal device sends detection requests to the multiple anchor devices respectively, and the detection requests are used to trigger the anchor device to detect the IoT device to be networked in the same room.
- 根据权利要求17所述的方法,其特征在于,所述方法还包括:The method according to claim 17, characterized in that the method further comprises:所述终端设备检测到用户的第一输入操作;The terminal device detects a first input operation of a user;所述终端设备分别向所述多个锚点设备发送检测请求,包括:The terminal device sends detection requests to the multiple anchor point devices respectively, including:响应于所述第一输入操作,所述终端设备分别向所述多个锚点设备发送所述检测请求。In response to the first input operation, the terminal device sends the detection request to the multiple anchor devices respectively.
- 根据权利要求16所述的方法,其特征在于,所述基于所述配网完成信息,所述终端设备确定所述第一IoT设备的所属房间为所述第一房间,包括:The method according to claim 16, characterized in that, based on the network configuration completion information, the terminal device determines that the room to which the first IoT device belongs is the first room, comprising:所述配网完成信息携带第一指示信息时,所述终端设备基于所述第一指示信息,显示第一提示信息;所述第一提示信息用于提示用户选择第一IoT设备所在的房间;When the network configuration completion information carries the first indication information, the terminal device displays the first prompt information based on the first indication information; the first prompt information is used to prompt the user to select the room where the first IoT device is located;所述终端设备接收到用户的第二输入操作,所述第二输入操作用于选择第一IoT设备所在的房间;The terminal device receives a second input operation of the user, where the second input operation is used to select a room where the first IoT device is located;所述第二输入操作选择的房间为所述第一锚点设备所在的所述第一房间时,所述终端设备确定所述第一IoT设备的所属房间为所述第一房间;When the room selected by the second input operation is the first room where the first anchor device is located, the terminal device determines that the room to which the first IoT device belongs is the first room;所述配网完成信息未携带所述第一指示信息时,所述终端设备确定所述第一IoT设备的所属房间为所述第一房间。When the network configuration completion information does not carry the first indication information, the terminal device determines that the room to which the first IoT device belongs is the first room.
- 一种电子设备,其特征在于,包括存储器和处理器,所述存储器和所述处理器电偶合,所述存储器用于存储程序指令,所述处理器被配置用于调用所述存储器存储的全部或部分程序指令,执行如权利要求1-15或权利要求16-19任一项所述的方法。An electronic device, characterized in that it includes a memory and a processor, the memory and the processor are electrically coupled, the memory is used to store program instructions, and the processor is configured to call all or part of the program instructions stored in the memory to execute the method according to any one of claims 1-15 or claims 16-19.
- 一种计算机存储介质,其特征在于,包括计算机指令,当所述计算机指令在电子设备上运行时,使得所述电子设备执行如权利要求1-15或权利要求16-19任一项所述的方法。 A computer storage medium, characterized in that it includes computer instructions, and when the computer instructions are executed on an electronic device, the electronic device executes the method as described in any one of claims 1-15 or claims 16-19.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211521594.1A CN118118283A (en) | 2022-11-30 | 2022-11-30 | IoT (internet of things) equipment network distribution method and related device |
CN202211521594.1 | 2022-11-30 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2024114274A1 true WO2024114274A1 (en) | 2024-06-06 |
Family
ID=91219770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2023/128920 WO2024114274A1 (en) | 2022-11-30 | 2023-10-31 | Iot device network configuration method and related apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118118283A (en) |
WO (1) | WO2024114274A1 (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130238964A1 (en) * | 2012-03-06 | 2013-09-12 | Apple Inc. | Application for designing journals |
CN110692280A (en) * | 2018-02-07 | 2020-01-14 | 华为技术有限公司 | Network access method, equipment and system |
CN110708692A (en) * | 2019-10-12 | 2020-01-17 | 广州三拾七度智能家居有限公司 | Multi-wireless-type household gateway system and network distribution method |
CN115696280A (en) * | 2021-07-23 | 2023-02-03 | 华为技术有限公司 | Network distribution method and device |
-
2022
- 2022-11-30 CN CN202211521594.1A patent/CN118118283A/en active Pending
-
2023
- 2023-10-31 WO PCT/CN2023/128920 patent/WO2024114274A1/en unknown
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130238964A1 (en) * | 2012-03-06 | 2013-09-12 | Apple Inc. | Application for designing journals |
CN110692280A (en) * | 2018-02-07 | 2020-01-14 | 华为技术有限公司 | Network access method, equipment and system |
CN110708692A (en) * | 2019-10-12 | 2020-01-17 | 广州三拾七度智能家居有限公司 | Multi-wireless-type household gateway system and network distribution method |
CN115696280A (en) * | 2021-07-23 | 2023-02-03 | 华为技术有限公司 | Network distribution method and device |
Also Published As
Publication number | Publication date |
---|---|
CN118118283A (en) | 2024-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
AU2021269359B2 (en) | Display method and apparatus | |
KR102208438B1 (en) | Method for proximity service data and an electronic device thereof | |
WO2020192714A1 (en) | Device control page display method, related apparatus and system | |
WO2021000808A1 (en) | Device control method and device | |
JP6242496B2 (en) | Method, apparatus, program and recording medium for connecting to wireless network | |
WO2020173375A1 (en) | Multi-intelligent device linkage control method, device and system | |
CN111459433B (en) | Screen transmission method, device and storage medium | |
US9503893B2 (en) | Communication management system, relay device, communication control system, communication system, communication method, and recording medium storing communication control program | |
WO2021052178A1 (en) | Wi-fi connection method and device | |
WO2020155014A1 (en) | Smart home device sharing system and method, and electronic device | |
JP2017525067A (en) | Method, apparatus, system, program and recording medium for managing control relationship between account and device | |
WO2021043045A1 (en) | Method and device for configuring network configuration information | |
WO2022068513A1 (en) | Wireless communication method and terminal device | |
WO2021000923A1 (en) | Router configuration method, terminal, and router | |
US20160021674A1 (en) | Electronic device and method for processing packet in internet protocol-based network | |
WO2020133467A1 (en) | Method for smart home appliance to access network and related device | |
WO2021027623A1 (en) | Device capability discovery method and p2p device | |
WO2021227942A1 (en) | Information sharing method, electronic devices and system | |
WO2024114274A1 (en) | Iot device network configuration method and related apparatus | |
KR102238897B1 (en) | Method for proximity service data and an electronic device thereof | |
WO2023025059A1 (en) | Communication system and communication method | |
WO2023185593A1 (en) | Device login method, electronic device and system | |
WO2023142993A1 (en) | Detection method, related electronic device and system | |
WO2023169545A1 (en) | Offline device control method and related apparatus | |
CN114980048B (en) | NFC communication method, electronic equipment and system |
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: 23896428 Country of ref document: EP Kind code of ref document: A1 |