An IoT device setting method and an IoT device

Through the communication between the first IoT device and the IoT server, the combination of different antennas and transmission powers is used to realize the automatic setting and configuration of the IoT device, solving the problems of cumbersome settings and insufficient security in the prior art, and improving user experience and security.

CN115175206BActive Publication Date: 2025-06-20HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110296691.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-19
Publication Date
2025-06-20
Estimated Expiration
2041-03-19

AI Technical Summary

Technical Problem

In the prior art, the setup of IoT devices is cumbersome and takes a long time, and users need to have a better understanding of each IoT device, resulting in poor user experience.

Method used

Provided is a method of setting an IoT device, communicating with an IoT server through the first IoT device, wireless communication using different antennas and transmit powers, and automatic setting and configuration between IoT devices is realized without the need for a user to have a relatively familiarity with each IoT device.

Benefits of technology

Users can easily complete the setup of IoT devices, save time, improve user experience, and ensure security by limiting the communication range.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115175206B_ABST
    Figure CN115175206B_ABST
Patent Text Reader

Abstract

The present application relates to an IoT device setting method and an IoT device. The IoT device communicates with an IoT server; the IoT device includes: a processor, a first antenna with a transmission distance greater than a preset transmission distance, a second antenna with a transmission distance less than the preset transmission distance, and a computer program on a memory. When the computer program is executed by the processor, the IoT device is caused to perform: broadcasting a first message through the first antenna; receiving a first response message; in response to the first response message, sending a second message through the second antenna; and receiving an informing message. The present application can conveniently and quickly complete the setting between IoT devices, simplify operations, save time, facilitate users, improve the user experience, and enhance security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of the Internet of Things, and specifically relates to an IoT device setting method and an IoT device. Background Art

[0002] With the popularization of Internet of Things (IoT) devices, users' demands for IoT devices are continuously increasing. Some demands can only be achieved when multiple IoT devices cooperate with each other. Before this, it is necessary to set up multiple IoT devices involved. However, manually setting up each IoT device not only makes the setting cumbersome and time-consuming, but also requires users to have a good understanding of each IoT device. In practice, users generally do not have a good understanding of each IoT device, so users have to spend time to understand each IoT device. All these result in a relatively high time cost for users to perform a setting, bringing inconvenience to users and poor user experience. Therefore, how to provide a convenient IoT device setting method and IoT device has become our need. Summary of the Invention

[0003] To solve the above technical problems, this application provides an IoT device setting method and an IoT device. The technical solution provided by this application enables users to easily complete the setting of IoT devices, without the need for users to spend a lot of time, nor do they need to have a good understanding of each IoT device, greatly facilitating users.

[0004] In a first aspect, a first IoT device is provided. The first IoT device communicates with an IoT server; the first IoT device includes: a processor; a memory; a first antenna with a transmission distance of a first distance; the first distance is greater than a first preset transmission distance; a second antenna with a transmission distance of a second distance; the first antenna and the second antenna are different antennas; the second distance is less than or equal to the first preset transmission distance; and a computer program, where the computer program is stored in the memory and when executed by the processor, causes the first IoT device to perform: broadcasting a first message through the first antenna; the first message includes first publishing information; receiving a first response message from a second IoT device; the first response message includes first request information for the first publishing information; in response to the first response message, sending a second message to the second IoT device through the second antenna; receiving an informing message from the second IoT device or the IoT server. Wherein, the first preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security. In this way, it enables users to easily complete the setup of IoT devices without spending much time and without the need for users to have a good understanding of each IoT device, greatly facilitating users. In addition, security can also be ensured.

[0005] According to the first aspect, the first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.

[0006] According to the first aspect, or any implementation of the above first aspect, the wireless communication chip is a Wi-Fi chip, a Bluetooth chip, or a ZigBee chip.

[0007] According to the first aspect, or any implementation of the above first aspect, the first publishing information includes one of the following: information for soliciting group members, information for setting a control relationship, and information for setting a function replication relationship; the first request information includes one of the following: information willing to join the group, information willing to set a control relationship, and information willing to set a function replication relationship. In this way, the first IoT device can subsequently implement joining a group, setting a control relationship, or setting a function replication relationship with the second IoT device.

[0008] According to the first aspect, or any implementation of the above first aspect, when the first publishing information includes information for soliciting group members, the second message includes a first group ID; the first group ID is the ID of one or more groups where the first IoT device is located. In this way, the first IoT device can support the second IoT device to join the group of the first IoT device.

[0009] According to the first aspect, or any implementation of the above first aspect, when the first release information includes information on a settable control relationship or a settable function replication relationship, the second message includes the first device ID; the first device ID is the device ID of the first IoT device. In this way, the first IoT device can support operations for setting a control relationship or a function replication relationship.

[0010] According to the first aspect, or any implementation of the above first aspect, after receiving an informing message from a second IoT device or an IoT server, the first IoT device further performs: outputting the informing message; before broadcasting the first message through the first antenna, the first IoT device further performs: receiving an input. In this way, the first IoT device can notify the user of the setting result, and can broadcast the first message under external input control.

[0011] In a second aspect, a first IoT device is provided. The first IoT device communicates with an IoT server; the first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna being a first distance; the first distance being greater than a first preset transmission distance; a second antenna, the transmission distance of the second antenna being a second distance; the first antenna and the second antenna being different antennas; the second distance being less than or equal to the first preset transmission distance; and a computer program, where the computer program is stored in the memory, and when the computer program is executed by the processor, the first IoT device is caused to perform: broadcasting a first message through the second antenna; the first message including first release information; within a fourth distance from a second IoT device, receiving a first response message from the second IoT device; the first response message including first request information for the first release information; in response to the first response message, sending a second message to the second IoT device through the first antenna; within a third distance from the second IoT device, receiving an informing message from the second IoT device; the third distance being greater than the fourth distance. Wherein, the first preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; this distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without the user spending a lot of time, nor does the user need to know each IoT device well, which greatly facilitates the user. In addition, security can also be ensured.

[0012] In a third aspect, a first IoT device is provided. The first IoT device communicates with an IoT server; the first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna at a first transmission power being a first distance, the first distance being greater than a first preset transmission distance; the transmission distance of the first antenna at a second transmission power being a second distance, the second distance being less than or equal to the first preset transmission distance; the first transmission power being greater than the second transmission power; and a computer program, where the computer program is stored in the memory, and when the computer program is executed by the processor, the first IoT device is caused to perform: broadcasting a first message through the first antenna at the first transmission power; the first message including first publishing information; receiving a first response message from a second IoT device; the first response message including first request information for the first publishing information; in response to the first response message, sending a second message to the second IoT device through the first antenna at the second transmission power; receiving an informing message from the second IoT device or the IoT server. Wherein, the first preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security. In this way, users can easily complete the setup of IoT devices without spending a lot of time and without having to know much about each IoT device, which greatly facilitates users. In addition, security can also be ensured.

[0013] In a fourth aspect, a second IoT device is provided. The second IoT device communicates with an IoT server; the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna being a third distance; the third distance being greater than a second preset transmission distance; a fourth antenna, the transmission distance of the fourth antenna being a fourth distance; the third antenna and the fourth antenna being different antennas; the fourth distance being less than or equal to the second preset transmission distance; and a computer program, where the computer program is stored in the memory, and when the computer program is executed by the processor, the second IoT device is caused to perform: receiving a first message from the first IoT device; the first message including first publishing information; randomly generating a first key; sending a first response message to the first IoT device through the fourth antenna; the first response message including first request information for the first publishing information; receiving a second message from the first IoT device; sending a first request message to the IoT server through the third antenna; receiving a first feedback message or a second feedback message from the IoT server. Wherein, the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security. In this way, users can easily complete the setup of IoT devices without spending a lot of time and without having to know much about each IoT device, which greatly facilitates users. In addition, security can also be ensured.

[0014] According to the fourth aspect, the third antenna and the fourth antenna are connected to the same wireless communication chip of the second IoT device.

[0015] According to the fourth aspect, or any implementation manner of the above fourth aspect, the wireless communication chip is a Wi-Fi chip, a Bluetooth chip, or a ZigBee chip.

[0016] According to the fourth aspect, or any implementation manner of the above fourth aspect, the first publishing information includes one of the following: information for soliciting group members, information for setting a control relationship, and information for setting a function replication relationship; the first request information includes one of the following: information for willing to join the group, information for willing to set a control relationship, and information for willing to set a function replication relationship. In this way, the first IoT device can subsequently implement joining the group, setting a control relationship, or setting a function replication relationship with the second IoT device.

[0017] According to the fourth aspect, or any implementation manner of the above fourth aspect, when the first publishing information includes information for soliciting group members, the second message includes the first group ID, and the first request message includes the first group ID and the second device ID; the first group ID is the ID of one or more groups where the first IoT device is located, and the second device ID is the device ID of the second IoT device. In this way, the second IoT device can support the operation of joining the group of the first IoT device.

[0018] According to the fourth aspect, or any implementation manner of the above fourth aspect, when the first publishing information includes information for setting a control relationship or information for setting a function replication relationship, the second message includes the first device ID, and the second request message includes the first device ID and the second device ID; the first device ID is the device ID of the first IoT device, and the second device ID is the device ID of the second IoT device. In this way, the second IoT device can support the operation of setting a control relationship or setting a function replication relationship.

[0019] Fifth aspect, a second IoT device is provided. The second IoT device communicates with an IoT server; the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna at a third transmission power is a third distance, and the third distance is greater than a second preset transmission distance; the transmission distance of the third antenna at a fourth transmission power is a fourth distance, and the fourth distance is less than or equal to the second preset transmission distance; the third transmission power is greater than the fourth transmission power; and a computer program, where the computer program is stored in the memory, and when the computer program is executed by the processor, the second IoT device is caused to perform: receiving a first message from a first IoT device; the first message includes first publishing information; randomly generating a first key; sending a first response message to the first IoT device through the third antenna at the fourth transmission power; the first response message includes first request information for the first publishing information; receiving a second message from the first IoT device; sending a first request message to the IoT server through the third antenna at the third transmission power; receiving a first feedback message or a second feedback message from the IoT server. Wherein, the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security. In this way, users can easily complete the setup of IoT devices without spending much time and without having to know each IoT device well, which greatly facilitates users. In addition, security can also be ensured.

[0020] Sixth aspect, a method for setting a first IoT device is provided, which is applied to the first IoT device. The first IoT device communicates with an IoT server; the first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna is a first distance; the first distance is greater than a first preset transmission distance; a second antenna, the transmission distance of the second antenna is a second distance; the first antenna and the second antenna are different antennas; the second distance is less than or equal to the first preset transmission distance; the method includes: broadcasting a first message through the first antenna; the first message includes first publishing information; receiving a first response message from a second IoT device; the first response message includes first request information for the first publishing information; in response to the first response message, sending a second message to the second IoT device through the second antenna; receiving an informing message from the second IoT device or the IoT server. Wherein, the first preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security.

[0021] According to the sixth aspect, the first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.

[0022] According to the sixth aspect, or any implementation manner of the above sixth aspect, the wireless communication chip is a Wi-Fi chip, a Bluetooth chip, or a ZigBee chip.

[0023] In a seventh aspect, a first IoT device setting method is provided, which is applied to a first IoT device. The first IoT device communicates with an IoT server; the first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna being a first distance; the first distance being greater than a first preset transmission distance; a second antenna, the transmission distance of the second antenna being a second distance; the first antenna and the second antenna being different antennas; the second distance being less than or equal to the first preset transmission distance. The method includes: broadcasting a first message through the second antenna; the first message including first publishing information; receiving a first response message from a second IoT device within a fourth distance from the second IoT device; the first response message including first request information for the first publishing information; in response to the first response message, sending a second message to the second IoT device through the first antenna; receiving an informing message from the second IoT device within a third distance from the second IoT device; where the third distance is greater than the fourth distance. Wherein, the first preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security.

[0024] In an eighth aspect, a first IoT device setting method is provided, which is applied to a first IoT device. The first IoT device communicates with an IoT server; the first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna at a first transmission power being a first distance, the first distance being greater than a first preset transmission distance; the transmission distance of the first antenna at a second transmission power being a second distance, the second distance being less than or equal to the first preset transmission distance; the first transmission power being greater than the second transmission power. The method includes: broadcasting a first message through the first antenna at the first transmission power; the first message including first publishing information; receiving a first response message from a second IoT device; the first response message including first request information for the first publishing information; in response to the first response message, sending a second message to the second IoT device through the first antenna at the second transmission power; receiving an informing message from the second IoT device or the IoT server. Wherein, the first preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security.

[0025] In a ninth aspect, a method for setting a second IoT device is provided, which is applied to the second IoT device. The second IoT device communicates with an IoT server; the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna being a third distance; the third distance being greater than a second preset transmission distance; a fourth antenna, the transmission distance of the fourth antenna being a fourth distance; the third antenna and the fourth antenna being different antennas; the fourth distance being less than or equal to the second preset transmission distance. The method includes: receiving a first message from a first IoT device; the first message including first publishing information; randomly generating a first key; sending a first response message to the first IoT device through the fourth antenna; the first response message including first request information for the first publishing information; receiving a second message from the first IoT device; sending a first request message to the IoT server through the third antenna; receiving a first feedback message or a second feedback message from the IoT server. Wherein, the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security.

[0026] In a tenth aspect, a method for setting a second IoT device is provided, which is applied to the second IoT device. The second IoT device communicates with an IoT server; the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna at a third transmission power being a third distance, the third distance being greater than a second preset transmission distance; the transmission distance of the third antenna at a fourth transmission power being a fourth distance, the fourth distance being less than or equal to the second preset transmission distance; the third transmission power being greater than the fourth transmission power. The method includes: receiving a first message from a first IoT device; the first message including first publishing information; randomly generating a first key; sending a first response message to the first IoT device through the third antenna at the fourth transmission power; the first response message including first request information for the first publishing information; receiving a second message from the first IoT device; sending a first request message to the IoT server through the third antenna at the third transmission power; receiving a first feedback message or a second feedback message from the IoT server. Wherein, the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plain text; this distance can ensure security.

[0027] In an eleventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes a computer program, which when running on a first IoT device, causes the first IoT device to execute the methods of any one of the embodiments in the sixth aspect and the sixth aspect, the seventh aspect, or the eighth aspect.

[0028] In a twelfth aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes a computer program, which, when running on a second IoT device, causes the second IoT device to execute the method according to the ninth aspect or the tenth aspect.

[0029] In a thirteenth aspect, a computer program product is provided. When the computer program product runs on a first IoT device, it causes the first IoT device to execute the method according to the sixth aspect and any one of the implementation manners in the sixth aspect, the seventh aspect, or the eighth aspect.

[0030] In a fourteenth aspect, a computer program product is provided. When the computer program product runs on a second IoT device, it causes the second IoT device to execute the method according to the ninth aspect or the tenth aspect.

[0031] In any of the above aspects and any one of the implementation manners of each aspect, the second preset transmission distance may be the same as or different from the first preset transmission distance. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] Figure 1 A schematic diagram of the scenario of the IoT device setting method provided by an embodiment of the present application;

[0033] Figure 2 A schematic diagram of the hardware structure of the first IoT device in the IoT device setting method provided by an embodiment of the present application;

[0034] Figure 3 A schematic diagram of the hardware structure of the second IoT device in the IoT device setting method provided by an embodiment of the present application;

[0035] Figure 4A A schematic diagram of the principle of a wireless communication module and an antenna provided by an embodiment of the present application;

[0036] Figure 4B Another schematic diagram of the principle of a wireless communication module and an antenna provided by an embodiment of the present application;

[0037] Figures 5A - 5C A schematic diagram of a specific structure of a wireless communication module and an antenna provided by an embodiment of the present application;

[0038] Figure 6 A schematic diagram of the transmission distance of a wireless communication module and an antenna in the IoT device setting method provided by an embodiment of the present application;

[0039] Figures 7A - 7D A schematic diagram of the communication interaction of the first embodiment in the IoT device setting method provided by an embodiment of the present application;

[0040] Figure 8It is a demonstration schematic diagram of Embodiment 1 in the IoT device setting method provided by the embodiments of the present application;

[0041] Figures 9A - 9D It is a communication interaction schematic diagram of Embodiment 2 in the IoT device setting method provided by the embodiments of the present application;

[0042] Figure 10 It is a demonstration schematic diagram of Embodiment 2 in the IoT device setting method provided by the embodiments of the present application;

[0043] Figures 11A - 11D It is a communication interaction schematic diagram of Embodiment 3 in the IoT device setting method provided by the embodiments of the present application;

[0044] Figure 12 It is a demonstration schematic diagram of Embodiment 3 in the IoT device setting method provided by the embodiments of the present application;

[0045] Figure 13 It is a communication interaction schematic diagram between the first IoT device and the second IoT device in the IoT device setting method provided by the embodiments of the present application under the Wi-Fi protocol;

[0046] Figure 14 It is a structural schematic diagram of the IoT device provided by the embodiments of the present application. Detailed implementation manners

[0047] Next, with reference to the accompanying drawings in the embodiments of the present application, the technical solutions in the embodiments of the present application will be described. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and the appended claims of the present application, the singular forms "a", "the", "above-mentioned", "this" and "this one" are also intended to include expressions such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" mean one or more than two (including two). The character " / " generally indicates an "or" relationship between the associated objects before and after.

[0048] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments", etc., which appear in different places in this specification, do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized. The terms "comprising", "including", "having" and their variants mean "including but not limited to", unless otherwise specifically emphasized. The term "connection" includes direct connection and indirect connection, unless otherwise stated. "First" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features.

[0049] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of the present application should not be construed as being more preferred or more advantageous than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.

[0050] With the popularization of Internet of Things (IoT) devices, users' demands for IoT devices (such as IoT lights, IoT refrigerators, IoT speakers, etc.) are continuously increasing. An IoT device refers to an electronic device that can be remotely or proximally controlled and / or monitored through the IoT. Typically, smart home appliances belong to typical IoT devices. Some requirements can only be achieved when multiple IoT devices cooperate with each other. Before that, it is necessary to set up the multiple IoT devices involved. And manually setting up each IoT device not only makes the setting cumbersome and time-consuming, but also requires the user to be relatively familiar with each IoT device. In practice, users generally do not know each IoT device well, so the user has to spend time to understand each IoT device. All these result in a relatively high time cost for the user to make a setting, bringing inconvenience to the user and a poor user experience. Therefore, how to provide a convenient IoT device setting method and IoT device has become our need.

[0051] To solve the above technical problems, the present application provides an IoT device setting method and an IoT device. The technical solution provided by the present application enables the user to easily complete the setting of the IoT device, without the user spending a lot of time and without the user having to be relatively familiar with each IoT device, greatly facilitating the user.

[0052] Exemplarily,Figure 1 This is a schematic diagram of the scenario for the IoT device setting method provided by the embodiments of the present application. As Figure 1 shown, the IoT device 100 (also referred to as the first IoT device) and the IoT device 200 (also referred to as the second IoT device) are connected to the IoT server 300 in a wired communication or wireless communication manner. The IoT server 300 can be a local server or a cloud server. Exemplarily, the cloud server can be a home cloud server. The connection between the IoT device 100 and the above-mentioned server can be a wired connection or a wireless connection. The connection between the IoT device 200 and the above-mentioned server can be a wired connection or a wireless connection. Preferably, both the IoT device 100 and the IoT device 200 communicate with the IoT server 300 through wireless connections. For example, both the IoT device 100 and the IoT device 200 are connected to the IoT server 300 through the same wireless router. Alternatively, in Figure 1 the scenario shown, the IoT server 300 may not be provided.

[0053] In Figure 1 the scenario shown and its alternative scenarios, by bringing the IoT device 100 and the IoT device 200 closer to each other, the IoT device 100 can set the IoT device 200. For example, the IoT device 100 is in a group. By bringing the IoT device 100 and the IoT device 200 closer to each other, the IoT device 100 can set the IoT device 200, so that the IoT device 200 can join the group. For another example, the IoT device 100 can control an object. By bringing the IoT device 100 and the IoT device 200 closer to each other, the IoT device 100 can set the IoT device 200, so that the IoT device 200 can also control the object. Additionally, in Figure 1 the scenario shown and its alternative scenarios, the IoT device 100 and the IoT device 200 can set each other. For example, the IoT device 100 has a switch function and the IoT device 200 has a lighting function. By bringing the IoT device 100 and the IoT device 200 closer to each other, the settings of the IoT device 100 and the IoT device 200 can be completed, so that the IoT device 100 can control the turning on and off of the lighting function of the IoT device 200.

[0054] The IoT device 100 or the IoT device 200 in the embodiments of the present application includes but is not limited to smart phones, smart earphones, tablet computers, wearable electronic devices with wireless communication functions (such as smart watches, smart bracelets, smart rings, smart glasses, smart helmets), smart switches, smart lights, smart refrigerators, smart speakers, smart doorbells, smart door locks, smart curtains, etc. Exemplary embodiments of the IoT device 100 include but are not limited to those equipped with A portable electronic device running on Windows, Linux or other operating systems. The above IoT device 100 or IoT device 200 can also be other portable electronic devices, such as a laptop computer. It should also be understood that in some other embodiments, the above IoT device 100 or IoT device 200 may not be a portable electronic device, but a fixed-mounted or desktop electronic device (such as a desktop computer).

[0055] Exemplarily, Figure 2 The following shows a schematic diagram of the hardware structure of the IoT device 100 provided by an embodiment of the present application. As Figure 2 shown, the IoT 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, a headphone 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, a barometric 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.

[0056] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the IoT device 100. In other embodiments of the present application, the IoT device 100 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0057] The charging management module 140 is used to receive a charging input from a charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The wireless communication function of the IoT device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modulation and demodulation processor, and a baseband processor, etc.

[0058] Antenna 1 and Antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the IoT device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, Antenna 1 can be multiplexed 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.

[0059] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc. applied to the IoT device 100. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves through Antenna 1, and perform processing such as filtering and amplifying on the received electromagnetic waves, and then 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 through Antenna 1 and radiate it out. In some embodiments, at least some functional modules of the mobile communication module 150 can be disposed in the processor 110.

[0060] The modulation and demodulation processor can include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor can be an independent device. In some other embodiments, the modulation and demodulation processor can be independent of the processor 110 and be disposed in the same device as the mobile communication module 150 or other functional modules.

[0061] The wireless communication module 160 may provide solutions for wireless communications applied to the IoT device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), and so on. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0062] In some embodiments, the antenna 1 of the IoT device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, such that the IoT device 100 can communicate with the network and other devices through wireless communication technologies. The wireless communication technologies 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 technologies, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0063] The IoT device 100 can implement a shooting function through an ISP, camera 193, video codec, GPU, display screen 194, and application processor, etc.

[0064] The external memory interface 120 can be used to connect to an external memory card, such as a Micro SD card, to expand the storage capacity of the IoT device 100. The external memory card 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 saved in the external memory card.

[0065] The IoT device 100 can implement an audio function through an audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor, etc. For example, music playback, recording, etc.

[0066] Exemplarily, Figure 3 FIG. 2 shows a schematic diagram of the hardware structure of the IoT device 200 provided in the embodiment of the present application. The IoT device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, antennas 3, 4, a wireless communication module 250, a sensor module 260, an input module 270, an output module 280, etc.

[0067] It can be understood that the structure schematically shown in the embodiment of the present application does not constitute a specific limitation on the IoT device 200. In other embodiments of the present application, the IoT device 200 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware. For example, the IoT device 200 may be a smart lamp, a smart TV, a smart speaker, etc.

[0068] The processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (AP), a modem processor, a graphics processing unit (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. Among them, different processing units may be independent components or integrated in one or more processors. In some embodiments, the IoT device 200 may also include one or more processors 210. Among them, the controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0069] In some embodiments, the processor 210 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an 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 SIM card interface, and / or a USB interface, etc. Among them, the USB interface 230 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 230 can be used to connect a charger to charge the IoT device 200, and can also be used to transfer data between the IoT device 200 and peripheral devices.

[0070] It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the IoT device 200. In other embodiments of the present application, the IoT device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0071] The charging management module 240 is used to receive a charging input from a charger. Among them, the charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 240 can receive the charging input from a wired charger through the USB interface 230. In some embodiments of wireless charging, the charging management module 240 can receive the wireless charging input through the wireless charging coil of the IoT device 200. While charging the battery 242, the charging management module 240 can also supply power to the IoT device 200 through the power management module 241.

[0072] The power management module 241 is used to connect the battery 242, the charging management module 240, and the processor 210. The power management module 241 receives the inputs from the battery 242 and / or the charging management module 240 and supplies power to the processor 210, the internal memory 221, the external memory interface 220, the wireless communication module 250, etc. The power management module 241 can also be used to monitor parameters such as the battery capacity, the number of battery cycles, and the battery health status (leakage, impedance). In some other embodiments, the power management module 241 can also be disposed in the processor 210. In some other embodiments, the power management module 241 and the charging management module 240 can also be disposed in the same device.

[0073] The wireless communication function of the IoT device 200 can be implemented by the antenna 3, the antenna 4, and the wireless communication module 250, etc.

[0074] The wireless communication module 250 can provide wireless communication solutions applied to the IoT device 200, including Wi-Fi, Bluetooth (BT), wireless data transmission modules (e.g., 433 MHz, 868 MHz, 915 MHz), etc. The wireless communication module 250 can be one or more devices integrating at least one communication processing module. The wireless communication module 250 receives electromagnetic waves via the antenna 3 or the antenna 4, filters and frequency-modulates the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 250 can also receive the signals to be sent from the processor 210, frequency-modulate and amplify them, and convert them into electromagnetic waves via the antenna 3 or the antenna 4 for radiation.

[0075] In the embodiments of this application, the IoT device 200 can send broadcast messages through the wireless communication module. The broadcast messages can carry the device identifier or product identifier of the IoT device 200, which is used for other surrounding IoT devices to discover the IoT device 200. The IoT device 200 can also receive messages sent by other IoT devices through the wireless communication module.

[0076] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to implement the storage capacity expansion of the IoT device 200. The external memory card communicates with the processor 210 through the external memory interface 220 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0077] The internal memory 221 can be used to store one or more computer programs, and the one or more computer programs include instructions. The processor 210 can execute the instructions stored in the internal memory 221, so that the IoT device 200 can execute the automatic unlocking method provided in some embodiments of the present application, as well as various applications and data processing. The internal memory 221 can include a code storage area and a data storage area. Among them, the code storage area can store an operating system. The data storage area can store data created during the use of the IoT device 200. In addition, the internal memory 221 can include high-speed random access memory, and can also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), etc. In some embodiments, the processor 210 can execute the instructions stored in the internal memory 221 and / or the instructions stored in the memory provided in the processor 210, so that the IoT device 200 can execute the identity authentication method provided in the embodiments of the present application, as well as other applications and data processing.

[0078] The input module 270 includes, but is not limited to, a keyboard, a touch screen (which can also be a touch display screen), a mouse, a camera, a laser pointer, a handwriting input board, a microphone, etc. Among them, the microphone includes a single microphone and also includes a microphone array.

[0079] The output module 280 includes, but is not limited to, a display screen, an LED lamp, a speaker, headphones, a motor that generates vibration and its auxiliary devices, a heating device that generates heat, etc.

[0080] In the embodiments of the present application, the wireless communication methods between the IoT device 100 and the IoT device 200 include, but are not limited to, Bluetooth Low Energy (BLE), Wi-Fi Aware, ZigBee, etc. Among them, wireless communication methods such as BLE and Wi-Fi Aware are based on the Medium Access Control (MAC) layer of the computer network, also known as the data link layer protocol extension for interaction, without involving the upper-layer network communication of the MAC layer, and can complete data interaction at the data link layer. Among them, BLE is an ultra-low-power short-range wireless communication solution for electronic devices launched by the Bluetooth Special Interest Group in 2016, and can achieve communication through the MAC layer. Wi-Fi Aware (Wi-Fi Neighborhood Aware Network, abbreviated as NAN) is a new type of low-power peer-to-peer interconnection and interoperability Wi-Fi Mesh communication technology. This technology can bypass network infrastructure (such as access points (APs) or cellular networks) to achieve one-to-one, one-to-many, or many-to-many device-to-device connection communication, and can also achieve communication through the MAC layer. It should be noted that this wireless communication method is different from common Wi-Fi connections or Bluetooth connections. Specifically, wireless communication methods such as BLE and Wi-Fi Aware can directly implement data interaction at the MAC layer of the computer network by sending beacon frames, without involving data interaction at the network layer of the computer network that is higher than the MAC layer. The device-to-device communication implemented through wireless communication methods such as BLE and Wi-Fi Aware can not only improve communication efficiency (the IoT device 100 does not need to complete steps such as Wi-Fi or Bluetooth connection and user identity login verification with the IoT device 200, and does not involve content such as network protocols of the upper layer network), but also improve the security of data interaction (data transmission at the MAC layer).

[0081] In one example, Figure 4A shows the principle structure of the wireless communication module and antenna provided by the embodiments of the present application. As Figure 4A shown, the IoT device 200 may include a processor 210, a wireless communication module 250, an antenna 3, and an antenna 4.

[0082] Among them, antenna 3 (also known as the first antenna, such as a strong antenna) and antenna 4 (also known as the second antenna, such as a weak antenna) are used for transmitting and receiving electromagnetic waves. Further, the wireless communication module 250 converts the electromagnetic waves received from antenna 3 or antenna 4 into signals and sends the signals to the processor 210 for processing; or the wireless communication module 250 receives the signals to be transmitted from the processor 210 and converts them into electromagnetic waves through the strong antenna or the weak antenna and radiates them out. In the embodiments of the present application, the first transmission distance (such as 10 meters, 5 meters, etc., which can be specifically set by the user) of the strong antenna for transmitting signals is greater than the second transmission distance (such as 0.2 meters, 0.3 meters, etc., which can be specifically set by the user) of the weak antenna for transmitting signals. The second transmission distance of the weak antenna for transmitting signals is less than or equal to the preset safety distance; wherein, the preset safety distance is the distance at which the user of the IoT device 200 exchanges secret information with the IoT device 200 through the IoT device 100. In one example, the preset safety distance is the safety distance at which the user of the IoT device 200 exchanges secret information with the IoT device 200 through the IoT device 100. For example, the preset safety distance can be 50 cm, 40 cm, 30 cm, 20 cm, etc. In this way, only when the IoT device 100 is within the range less than or equal to the preset safety distance from the IoT device 200 can it receive the secret information sent by the IoT device 200. In this way, the security risk is reduced (for example, beyond 50 cm from the IoT device 200, the secret information will not be received by other devices). The user of the IoT device 100 can bring the IoT device 100 closer to the preset safety distance of the IoT device 200 only when the surrounding is safe, thereby improving the security. In some embodiments, the processor 210 can control the switching between the strong antenna and the weak antenna. When the IoT device 200 uses the strong antenna, only when the distance between the IoT device 100 and the IoT device 200 is less than the first transmission distance can the IoT device 100 receive the signal sent by the IoT device 200; when the IoT device 200 uses the weak antenna, only when the distance between the IoT device 100 and the IoT device 200 is less than the second transmission distance can the mobile device receive the signal sent by the IoT device 200. Among them, the first transmission distance is greater than the preset safety distance; the second transmission distance is less than or equal to the preset safety distance. In some embodiments, the first transmission distance and the second transmission distance can be respectively referred to as the first distance and the second distance.

[0083] In another example, Figure 4B shows another principle structure of the wireless communication module and the antenna provided by the embodiments of the present application. As Figure 4BAs shown, the IoT device 200 may include a processor 210, a wireless communication module 250, and an antenna 3. Among them, the wireless communication module 250 includes a wireless module 251 and a variable impedance circuit module 252. The antenna 3 is used to transmit and receive wireless signals. The variable impedance circuit module 252 can be a circuit or an integrated circuit composed of variable impedance. The processor 210 controls and adjusts the impedance value of the variable impedance circuit module 252 to regulate the transmission power loaded on the antenna 3, thereby controlling the transmission distance when the antenna 3 transmits wireless signals. Exemplarily, when the resistance value of the variable impedance circuit module 252 is the first resistance value, the transmission power of the antenna 3 is the first transmission power, and at this time, the transmission distance of the antenna 3 transmitting wireless signals is the first transmission distance (realizing the function of a strong antenna); when the resistance value of the variable impedance circuit module 252 is the second resistance value, the transmission power of the antenna 3 is the second transmission power, and at this time, the transmission distance of the antenna 3 transmitting wireless signals is the second transmission distance (realizing the function of a weak antenna). Among them, the first transmission power is greater than the second transmission power; the first transmission distance is greater than a preset safety distance, and the second transmission distance is less than or equal to the preset safety distance. In some embodiments, the first transmission distance and the second transmission distance may be respectively referred to as the first distance and the second distance. In Figure 4B In another corresponding example, other descriptions of the processor 210 and the wireless communication module 250 are the same as those in Figure 4A the relevant description in a corresponding example, and will not be repeated here.

[0084] It should be noted that although Figure 4A and Figure 4B the structure of the wireless communication module and the antenna are described by taking the IoT device 200 as an example, the IoT device 100 may also include the structure of the wireless communication module and the antenna. For example, corresponding to the reference numerals in Figure 4A the IoT device 100 may include a processor 110, a wireless communication module 160, an antenna 2, and an antenna 5 ( Figure 2 the antenna 5 is not shown in Figure 4B ; the antenna 5 is also connected to the wireless communication module 160). Corresponding to the reference numerals in Figure 4A and Figure 4B the IoT device 100 may include a processor 110, a wireless communication module 160, and an antenna 2. The specific description is the same as or similar to the description related to Figure 4A and Figure 4B , and will not be repeated here. Optionally, the IoT device 200 may not have the Figure 4A or Figure 4B shown structure, while the IoT device 100 has the Figure 4A or Figure 4B shown structure.

[0085] It can be understood that Figure 4A a corresponding example and Figure 4BThe principle structure illustrated in another corresponding example does not specifically limit the wireless communication module and antenna in the IoT device 200. In some other embodiments, the structure of the wireless communication module and antenna in the IoT device 200 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Correspondingly, the above content is also applicable to the structure of the wireless communication module and antenna of the IoT device 100; details are not described herein again.

[0086] In some embodiments, the above-mentioned strong antenna and weak antenna may share a part of the trace, for example Figures 5A - 5C as described in the illustrated embodiment.

[0087] Exemplarily, Figures 5A - 5C shows Figure 4A three implementation manners of the strong antenna and the weak antenna in. A structure of a wireless communication module and antenna of the IoT device 100 may also adopt Figures 5A - 5C the three manners shown. As Figures 5A - 5C shown, the strong antenna and the weak antenna may share a part of the trace.

[0088] In the embodiments of the present application, the strong antenna and the weak antenna in the electronic device may be switched by a radio frequency switch. Physically, the weak antenna and the radio frequency switch (as Figures 5A - 5C the weak antenna is shown in the dashed box in) may both be placed in a shielding case or the weak antenna may be placed inside the chip.

[0089] The purpose of the weak antenna in the embodiments of the present application is to minimize the transmission distance as much as possible. The principle of constructing the weak antenna may be:

[0090] (1) Reduce the antenna length, thereby reducing the electromagnetic waves radiated into the air;

[0091] (2) Reduce the radiation efficiency, and convert a part of the electromagnetic wave radiation into heat energy through a resistor and consume it;

[0092] (3) Reduce the return loss, and reflect part of the radio frequency energy back into the chip interior, etc.

[0093] The specific implementation of the weak antenna may adopt:

[0094] (i) Shorten the antenna;

[0095] (ii) Disconnect a certain point in the path of the strong antenna, or ground it through a resistor, inductor or capacitor at this point;

[0096] (iii) Use a shielding case, etc.

[0097] It should be understood that the specific implementations (i) and (ii) of the above-mentioned weak antenna can be implemented on a printed circuit board (PCB) or inside a chip.

[0098] It should also be understood that the function of the above-mentioned shielding cover is to weaken radiation.

[0099] It should also be understood that shortening the antenna as mentioned above means that the weak antenna is shorter than the strong antenna. Figures 5A to 5C The structures of the three weak antennas shown, the weak antenna is as Figures 5A to 5C shown in the structure within the dashed box. Figures 5A to 5C The structures of the strong antennas in [reference] are all connected to a filter circuit (e.g., a π-type circuit), a matching circuit (e.g., a π-type circuit), and an antenna body outside the matching circuit (e.g., the antenna body can be a section of metal trace) through radio frequency input / output (RFIO) pins. Figure 5A The weak antenna a shown in the dashed box in [reference], Figure 5B the weak antenna b shown in the dashed box in [reference], and Figure 5C the weak antenna c shown in the dashed box in [reference] have different lengths, but are all shorter than the strong antenna. The function of the filter circuit is to prevent interference, and the matching circuit is used to match with the strong antenna.

[0100] Exemplarily, as Figure 5A shown, the weak antenna a can be located inside the shielding cover. Among them, the weak antenna a can include the RFIO pins of the Wi-Fi chip inside the shielding cover and the first switch of the two-way switch (the first switch is not connected to any device). Sometimes, the weak antenna a may also include a trace between the RFIO pins and the first switch. Among them, the two-way switch refers to the switch between the trace or RFIO pins and the filter circuit. Through this two-way switch, the trace or RFIO pins can be connected or disconnected from the filter circuit. The first switch is Figure 5A the switch shown as connected to the RFIO pins or trace and disconnected from the filter circuit. It should be understood that the two-way switch in the embodiments of the present application can be a single-pole double-throw switch.

[0101] Exemplarily, as Figure 5BAs shown, the weak antenna b can be located inside the shielding case. Among them, the weak antenna b can include the RFIO pin of the Wi-Fi chip inside the shielding case, the first switch of the two-way switch (the first switch is connected to a resistor), and a matching device. Sometimes, the weak antenna b can also include a first trace between the RFIO pin and the first switch. Sometimes, the weak antenna b can also include a second trace between the matching device and the ground. The matching device can be a resistor. Connecting to the ground through the resistor can convert a part of the electromagnetic wave radiation into heat energy and consume it, thereby reducing the radiation efficiency of the weak antenna b. Among them, the two-way switch refers to the switch between the RFIO pin or the first trace and the resistor and the filter circuit. Through this switch, the RFIO pin or the first trace can be connected to the resistor and disconnected from the filter circuit, or the RFIO pin or the first trace can be disconnected from the resistor and connected to the filter circuit. The first switch is the switch among the two-way switches that is connected to the matching device and disconnected from the filter circuit.

[0102] Exemplarily, as Figure 5C As shown, the weak antenna c can be located inside the shielding case. Among them, after passing through the filter circuit matched by the chip, it is connected to a matching device (for example, a resistor) to the ground. The weak antenna c can include the RFIO pin of the Wi-Fi chip inside the shielding case, the filter circuit, the first switch of the two-way switch (the first switch is connected to a resistor), and a matching device (such as a resistor). Sometimes, the weak antenna c can also include a first trace between the RFIO pin and the filter circuit. Sometimes, the weak antenna c can also include a second trace between the filter circuit and the matching device. Connecting to the ground through the matching device (such as a resistor) can convert a part of the electromagnetic wave radiation into heat energy and consume it, thereby reducing the radiation efficiency of the weak antenna c. Among them, the two-way switch refers to the switch between the filter circuit inside the shielding case and the matching device and the matching circuit outside the shielding case. Through this two-way switch, the filter circuit inside the shielding case can be connected to the matching device and disconnected from the matching circuit outside the shielding case; or, the filter circuit inside the shielding case can be disconnected from the matching device and connected to the matching circuit outside the shielding case. The first switch is the switch used to connect the filter circuit inside the shielding case and the matching device.

[0103] It should be understood that the above Figures 5A to 5B The strong antenna can include the RFIO pin, the second switch of the two-way switch, the filter circuit, the matching circuit, and the antenna body connected outside the matching circuit. Sometimes, Figures 5A to 5B The strong antenna in

[0104] The above Figure 5CThe strong antenna in Figure 5C can also include a trace between the RFIO pin and the filter circuit. The second two-way switch is a switch for connecting the filter circuit inside the shielding case and the matching circuit outside the shielding case.

[0105] It should be understood that Figure 4A the wireless communication module 250 shown can be a Wi-Fi chip, or a Wi-Fi chip and the circuit matched with it. Figure 4B The wireless module 251 shown can be a Wi-Fi chip, Figure 4B the wireless communication module 250 shown can be a Wi-Fi chip and the circuit matched with it.

[0106] The above different weak antenna structures, combined with the settings of different transmission powers (Tx power) of the Wi-Fi chip, can meet the requirements of different ultra-short-range communications (for example, from 10 cm to 2 m).

[0107] Exemplarily, Table 1 shows the communication distances of several different first antenna structures with different transmission powers when combined with a Wi-Fi chip.

[0108] Table 1

[0109]

[0110] Exemplarily, Table 2 shows the communication distances of several different first antenna structures with different transmission powers when combined with a Bluetooth chip.

[0111] Table 2

[0112]

[0113] Exemplarily, Table 3 shows the communication distances of several different first antenna structures with different transmission powers when combined with a ZigBee chip.

[0114] Table 3

[0115]

[0116] Due to the characteristics of the physical devices within the chip, the difference between the maximum and minimum transmission powers of the antenna is correlated. If the minimum transmission power of the first device is reduced to a very low level, the maximum transmission power will also be reduced, thus failing to meet the distance requirements during normal operation. In the embodiments of the present application, due to the different structures of different intelligent devices and different requirements for the safety performance of intelligent devices, manufacturers of intelligent devices can adopt different first antenna structures and transmission powers to ensure the communication distance of intelligent devices. Exemplarily, for different manufacturers of intelligent air conditioners, the thickness of the intelligent air conditioner housing may be different. Then, under the same first antenna structure and the same transmission power, the communication distances at which the intelligent air conditioners can be discovered may also be different. Different manufacturers of intelligent devices can, based on the structure of their own intelligent devices, in conjunction with the structure of the first antenna and a certain transmission power, thereby test the safe distance at which the intelligent devices can be discovered.

[0117] It should be understood that in the embodiments of the present application, if the first device includes multiple chips (for example, the first device includes a Wi-Fi chip, a Bluetooth chip, and a ZigBee chip), then the Wi-Fi chip, the Bluetooth chip, and the ZigBee chip in the first device can share the above-mentioned Figure 5A first antenna and second antenna; or, the Wi-Fi chip, the Bluetooth chip, and the ZigBee chip in the first device can share the above-mentioned Figure 5B first antenna and second antenna; or, the Wi-Fi chip, the Bluetooth chip, and the ZigBee chip in the first device can share the above-mentioned Figure 5C first antenna and second antenna.

[0118] Or, the Wi-Fi chip, the Bluetooth chip, and the ZigBee chip in the first device may not share the first antenna and the second antenna either.

[0119] It should also be understood that the above-mentioned Figures 5A - 5C are the physical first antenna and second antenna. The first device can switch the physical first antenna and second antenna through a radio frequency switch. In the embodiments of the present application, the first device may also have only one antenna physically, but logically includes a first antenna and a second antenna.

[0120] The first device can adjust the transmission power of the physical antenna to implement the logically first antenna and second antenna. For example, when the transmission power of the physical antenna is the first transmission power, it can be considered as the logically first antenna; when the transmission power of the physical antenna is the second transmission power, it can be considered as the logically second antenna; where the first transmission power is less than the second transmission power.

[0121] One possible implementation is that the first device can adjust the transmission power of the physical antenna by adjusting the components inside the chip. For example, the first device can adjust the transmission power of the physical antenna through a multi-stage amplifier inside the chip.

[0122] For example, the first device can shield the multi-stage amplifier inside the chip by adjusting the value of the register, so that the transmission power of the physical antenna is the first transmission power. At this time, it can be regarded as the first antenna logically; the first device can also adjust the value of the register so that the transmission power of the physical antenna is the second transmission power. At this time, it can be regarded as the second antenna logically; where the first transmission power is less than the second transmission power.

[0123] Another possible implementation is that the first device can also adjust the transmission power of the physical antenna through the peripheral circuit outside the chip.

[0124] In each embodiment of the present application, the first antenna and the second antenna involved may be the first physical antenna and the second physical antenna, or the first logical antenna and the second logical antenna.

[0125] In the embodiments of the present application, the first device switching between the first logical antenna and the second logical antenna and the first device switching between the first physical antenna and the second physical antenna through a radio frequency switch can achieve the same effect.

[0126] Combined with the above example, taking the first distance as 5 meters and the second distance as 0.3 meters as an example. When the IoT device 200 uses the first antenna, if the distance between the IoT device 200 (located at the Figure 6 center of the circle shown) and the IoT device 100 is less than the first distance (for example, the IoT device 100 is located at the Figure 6 position 1 shown), the IoT device 200 can communicate with the IoT device 100; when the IoT device 200 uses the second antenna, if the distance between the IoT device 200 (located at the Figure 6 center of the circle shown) and the IoT device 100 is less than the second distance (for example, the IoT device 100 is located at the Figure 6 position 2 shown), the IoT device 200 can communicate with the IoT device 100.

[0127] Correspondingly, when the antenna of the IoT device 200 is set to the first transmission power, if the distance between the IoT device 200 (located at the Figure 6 center of the circle shown) and the IoT device 100 is less than the first distance (for example, the IoT device 100 is located at the Figure 6 position 1 shown), the IoT device 200 can communicate with the IoT device 100; when the antenna of the IoT device 200 is set to the second transmission power, if the IoT device 200 (located at the Figure 6The distance between the center of the circle shown (i.e., the center) and the IoT device 100 is less than the second distance (e.g., when the IoT device 100 is located at Figure 6 the position 2 shown), the IoT device 200 can communicate with the IoT device 100.

[0128] In actual operation, the accuracy of the first distance and the second distance is not so precise, and there may be certain errors. In this way, the first distance or the second distance will present a range in actual operation, rather than a precise numerical distance. In addition, in different environments, even with the same antenna and the same transmission power, the first distance and the second distance may also be different.

[0129] It should be noted that although in the Figures 1 - 6 description, the application scenario is described by taking two IoT devices, namely the IoT device 100 and the IoT device 200, as examples, in fact, in the above application scenario, there can be other IoT devices, such as the IoT device 400, etc.; the number of other IoT devices is not limited here. For other IoT devices such as the IoT device 400, reference can be made to the relevant descriptions of the IoT device 100 or the IoT device 200. Details are not elaborated here.

[0130] Next, in combination with Figures 7A - 12 Examples 1 to 3 of the IoT device setting method provided by the embodiments of the present application will be specifically introduced.

[0131] Example 1

[0132] Example 1 involves Figures 7A - 8 . Among them, Figures 7A - 7D shows the communication interaction process for setting an IoT device to join a group in the IoT device setting method provided by the embodiments of the present application. Figure 8 shows the corresponding demonstration schematic diagram. In Example 1, the IoT device 100 is located in the first group, and the group ID of the first group is the first group ID. Figures 7A - 7D show the processes of four different implementation manners under Example 1 respectively. The following will be described in detail in combination with Figures 7A - 7D .

[0133] In the Figure 7A shown implementation manner, the IoT device 100 has a first antenna (strong antenna) and a second antenna (weak antenna). The transmission distance of the first antenna is the first distance, and the transmission distance of the second antenna is the second distance. Among them, the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.

[0134] As Figure 7A shown, the method for setting an IoT device to join a group may include:

[0135] S701a. Broadcast a first message via the first antenna of the IoT device 100. The first message includes information for soliciting group members and the MAC address of the IoT device 100.

[0136] Exemplarily, before S701a, the IoT device 100 receives an input to trigger the execution of S701a. The input can be a user input, such as the IoT device 100 receiving a touch input or a voice input. The input can also be a message or instruction sent by other smart devices.

[0137] For example, a group entry button is set on the IoT device 100. When the user presses the group entry button, it triggers the IoT device 100 to execute S701a. Another example is that long pressing the power button of the IoT device 100 for more than 5 seconds triggers the IoT device 100 to execute S701a. Another example is to open the APP for remotely controlling the IoT device 100 on a mobile device, use the mobile device to remotely connect to the IoT device 100, and trigger the IoT device 100 to execute S701a by operating the APP.

[0138] Exemplarily, before S701a, when the IoT device 100 is in multiple groups, the input to trigger the IoT device 100 to execute S701a further includes information on selecting one or more groups where the IoT device 100 is located. For example, lamp A is in the living room lamp group and the yellow light lamp group. When new members need to be added to the living room lamp group, open the APP for remotely controlling smart lamps on a mobile device, use the mobile device to remotely connect to lamp A, select the living room lamp group by operating the APP, and trigger lamp A to execute S701a for the living room lamp group.

[0139] Exemplarily, in S701a, the IoT device 100 can adopt a variety of feasible communication protocols to broadcast the first message. In some communication protocol settings, the broadcast data packet will carry the real device address; while in some other communication protocol settings, the broadcast data packet will not carry the real device address. For example, in the bluetooth low energy communication protocol, the broadcast data packet can carry the public device address, and the public device address is the real address of the bluetooth device. Based on the public device address, the bluetooth device can be directly addressed; the broadcast data packet can also carry the random device address, and the random device address is not the real address of the bluetooth device. Based on the random device address, the bluetooth device cannot be directly addressed. When the IoT device 100 broadcasts the first message in a communication protocol format that does not carry the real device address, the message content of the first message includes the real device address of the IoT device 100, for example, the MAC address. When the IoT device 100 broadcasts the first message in a communication protocol format that carries the real device address, the message content of the first message does not need to include the real device address of the IoT device 100, and the real device address carried in the message structure of the first message is directly used.

[0140] S702a. The IoT device 200 is within the transmission range of the first antenna of the IoT device 100, receives the first message, and obtains the information for soliciting group members and the MAC address of the IoT device 100.

[0141] S703a. The IoT device 200 sends a first response message to the IoT device 100. The first response message includes the information of willing to join the group and the MAC address of the IoT device 200.

[0142] Similar to S701a, in S703a, the IoT device 200 can also adopt a variety of feasible communication protocols to send the first response message to the IoT device 100, which will not be elaborated here.

[0143] S704a. The IoT device 100 receives the first response message and obtains the information of willing to join the group and the MAC address of the IoT device 200.

[0144] S705a. The IoT device 100 sends a second message to the IoT device 200 through the second antenna of the IoT device 100. The second message includes the first group ID, and the first group ID is the group ID where the IoT device 100 is located.

[0145] Optionally, the IoT device 100 includes a memory; the memory stores group information such as the group ID of the group to which the IoT device 100 belongs. In S705a, the IoT device 100 directly calls the first group ID stored in the memory to generate a second message.

[0146] Optionally, the IoT device 100 does not locally store the group ID of the group to which the IoT device 100 belongs. Before executing S705a, the IoT device 100 obtains the first group ID from other devices (for example, the IoT server 300, or a mobile device connected to the IoT server 300).

[0147] For example, when the IoT device 100 is triggered to execute S701a, the IoT device 100 sends a group ID acquisition request to the IoT server 300. The group ID acquisition request includes the device identifier of the IoT device 100 and information requesting to acquire the group ID. After receiving the group ID acquisition request, the IoT server 300 searches for the corresponding first group ID according to the device identifier of the IoT device 100, and feeds back the first group ID to the IoT device 100. When the IoT server 300 cannot search for the corresponding group ID according to the device identifier of the IoT device 100, the IoT server 300 creates a new group (creates the first group) for the IoT device 100 and generates a new group ID (generates the first group ID).

[0148] For another example, after S704a, when the IoT device 100 determines that the IoT device 200 is willing to join the group according to the first response message, the IoT device 100 sends a group ID acquisition request to the IoT server 300 to request to acquire the first group ID.

[0149] For another example, open the APP for remotely controlling the IoT device 100 on the mobile device, and use the mobile device to remotely connect to the IoT device 100 and the IoT server 300. The mobile device sends the device identifier of the IoT device 100 to the IoT server 300, and the IoT server 300 feeds back the first group ID of the IoT device 100 to the mobile device. The mobile device sends the first group ID to the IoT device 100 and triggers the IoT device 100 to execute S701a.

[0150] S706a, the IoT device 200 is within the transmission range of the second antenna of the IoT device 100, receives the second message, and obtains the first group ID.

[0151] Since the second antenna is a weak antenna, the transmission distance of the second antenna is short. Therefore, only when the IoT device 200 is close to the IoT device 100 can it receive the second message. Therefore, when the IoT device 100 sends the second message through the second antenna in S705a, it can effectively prevent the second message from being obtained by other devices, thus greatly improving data security.

[0152] S707a. The IoT device 200 determines whether the IoT device 200 has joined the first group corresponding to the first group ID.

[0153] In an actual application scenario, before S706a, the IoT device 200 may have already joined the first group of the IoT device 100. For example, after the IoT device 200 is close to the IoT device 100 and completes the operation of joining the group, the IoT device 200 moves away from the IoT device 100 and then gets close again, resulting in the re - execution of S702a, S703a, S704a, S705a, and S706a. At this time, if the subsequent group - joining operation is continued, it will surely cause waste of processing resources. Therefore, after S707a, if the IoT device 200 has joined the first group corresponding to the first group ID, there is no need to perform the subsequent group - joining operation, thus avoiding repeated group - joining operations that lead to waste of processing resources.

[0154] S708a. If the IoT device 200 has not joined the first group corresponding to the first group ID, the IoT device 200 sends a group - joining message to the IoT server 300. The group - joining message includes the first group ID and the device identifier (Device ID) of the IoT device 200. The Device ID can uniquely identify the IoT device.

[0155] S709a. The IoT server 300 receives the group - joining message and obtains the first group ID and the Device ID of the IoT device 200.

[0156] S710a. The IoT server 300 determines whether the attributes corresponding to the IoT device 200 match the attributes corresponding to the first group.

[0157] In an actual application scenario, the IoT device 200 may not be the correct device that can join the first group. For example, Lamp A (IoT device 100) is installed in the living room and is part of the living room lamp group. The user originally intended to add Lamp B (Lamp B is not in any group) to the living room lamp group. However, the user picked up the wrong Lamp B and mistakenly thought Lamp C was Lamp B. The user brought Lamp C, which is in the bedroom lamp group, close to Lamp A, resulting in the execution of S701a - S709a. If the IoT server 300 continues with the group addition operation and allows Lamp C to join the living room lamp group, a setting error will occur. Therefore, after S710a, if the attributes of the IoT device 200 do not match the attributes of the first group, the IoT device 200 cannot join the first group, effectively avoiding group setting errors.

[0158] Optionally, the user can reset the group attributes and other attributes on the IoT device through the reset button on the IoT device or through the APP on the mobile device. For example, Lamp C was originally in the bedroom lamp group. Through the above reset method, Lamp C can be reset to not belong to any group.

[0159] Exemplarily, the attributes corresponding to the group can be in any form. The attributes corresponding to the group can be one or more device function attributes (e.g., lighting device, switch device), or one or more scenario attributes (e.g., living room device, bedroom device), or attributes manually marked by the user (e.g., devices marked by the user as needing to be controlled preferentially). Devices in the same group are consistent in terms of the attributes corresponding to the group, but it doesn't mean that the devices in the same group must be of the same model.

[0160] For example, Lamp A (IoT device 100) is installed in the living room. The device function attribute of Lamp A is a lamp, and the location attribute of Lamp A is the living room. Lamp A is in the living room lamp group (the first group), and the group attributes of the living room lamp group are lamp and living room. The user hopes to install Lamp B in the living room as well. The device function attribute of Lamp B is a lamp, and the location attribute of Lamp B is the living room. The user triggers Lamp A to execute S701a. After that, the user brings Lamp B close to Lamp A, resulting in the execution of S701a - S709a (Lamp B as the IoT device 200). After that, in S710a, the IoT server 300 determines that the device function attribute (lamp) and location attribute (living room) of Lamp B match the group attributes (lamp and living room) of the living room lamp group. Therefore, Lamp B can join the living room lamp group.

[0161] For another example, the lighting fixture A (IoT device 100) is installed in the living room. The device function attribute of the lighting fixture A is a lighting fixture, and the location attribute of the lighting fixture A is the living room. The lighting fixture A is located in the living room device group (the first group), and the group attribute of the living room device group is the living room. The user hopes to place the smart speaker C in the living room. The device function attribute of the smart speaker C is a speaker, and the location attribute of the smart speaker C is the living room. The user triggers the lighting fixture A to execute S701a. After that, the user brings the smart speaker C close to the lighting fixture A, which causes the execution of S701a - S709a (the smart speaker C acts as IoT device 200). After that, in S710a, the IoT server 300 determines that the location attribute of the smart speaker C (the living room) matches the group attribute of the living room device group (the living room). Therefore, even though the smart speaker C and the lighting fixture A are devices with completely different functions, the smart speaker C can be added to the living room device group.

[0162] S711a. When the IoT server 300 determines in S710a that the attributes corresponding to the IoT device 200 match the attributes corresponding to the first group, the IoT server 300 sends a first feedback message to the IoT device 200. The first feedback message includes information indicating successful joining.

[0163] Optionally, in S711a, the IoT server 300 also records the joining of the IoT device 200 to the first group (for example, writes the Device ID of the IoT device 200 into the device list of the first group).

[0164] S712a. When the IoT server 300 determines in S710a that the attributes corresponding to the IoT device 200 do not match the attributes corresponding to the first group, the IoT server 300 sends a second feedback message to the IoT device 200. The second feedback message includes information indicating failed joining and the reason.

[0165] S713a. The IoT device 200 receives the first feedback message or the second feedback message.

[0166] S714a. The IoT device 200 sends an informing message to the IoT device 100 to notify the IoT device 100 of the result of the group joining operation.

[0167] Exemplarily, when in S713a, the IoT device 200 receives the first feedback message, then in S714a, the informing message sent by the IoT device 200 is used to notify the IoT device 100 that the IoT device 200 has successfully joined the group; when in S713a, the IoT device 200 receives the second feedback message, then in S714a, the informing message sent by the IoT device 200 is used to notify the IoT device 100 that the IoT device 200 cannot join the group and the reason.

[0168] Alternatively, instead of notifying IoT device 100 of the result of the group joining operation through IoT device 200, IoT server 300 notifies IoT device 100 of the result of the group joining operation. In this way, IoT device 200 may not execute S714a.

[0169] Optionally, in S708a, the group joining message further includes the MAC address of IoT device 100. When IoT server 300 determines in S710a that the attributes corresponding to IoT device 200 match the attributes corresponding to the first group, IoT server 300 records that IoT device 200 joins the first group, and IoT server 300 sends a third feedback message to IoT device 100 based on the MAC address of IoT device 100. The third feedback message includes information indicating that IoT device 200 has successfully joined the group. When IoT server 300 determines in S710a that the attributes corresponding to IoT device 200 do not match the attributes corresponding to the first group, IoT server 300 sends a fourth feedback message to IoT device 100 based on the MAC address of IoT device 100. The fourth feedback message includes information indicating that IoT device 200 has failed to join the group and the reason therefor.

[0170] In Figure 7B the illustrated embodiment, IoT device 200 has a third antenna (strong antenna) and a fourth antenna (weak antenna). The transmission distance of the third antenna is a third distance, and the transmission distance of the fourth antenna is a fourth distance. Among them, the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.

[0171] As Figure 7B illustrated, the method for setting an IoT device to join a group may include:

[0172] S701b. Broadcast a first message, where the first message includes information soliciting group members and the MAC address of IoT device 100.

[0173] Exemplarily, similar to S701a, before S701b, IoT device 100 also receives an input to trigger the execution of S701a; and in S701b, IoT device 100 may also use various feasible communication protocols to broadcast the first message, which will not be elaborated here.

[0174] S702b. IoT device 200 receives the first message and obtains the information soliciting group members and the MAC address of IoT device 100.

[0175] S703b. IoT device 200 randomly generates a first key.

[0176] The first key is used to encrypt the data interaction between IoT device 100 and IoT device 200 after that. In the embodiments of the present application, there is no limitation on the specific implementation manner of generating the first key and using the first key for encryption in the subsequent steps. A variety of different key schemes can be adopted to implement the generation of the first key and the use of the first key for encryption in the subsequent steps.

[0177] S704b. IoT device 200 sends a first response message to IoT device 100 through the fourth antenna of IoT device 200. The first response message includes information indicating willingness to join the group, the first key, and the MAC address of IoT device 200.

[0178] Exemplarily, similar to S703a, in S704b, IoT device 200 can adopt a variety of feasible communication protocols to implement sending the first response message to IoT device 100, which will not be elaborated here.

[0179] In S704b, since the fourth antenna is a weak antenna, only when IoT device 200 is close to IoT device 100 can IoT device 100 receive the first response message. In this way, the first response message can be effectively prevented from being acquired by other devices.

[0180] S705b. When IoT device 100 is within the transmission range of the fourth antenna of IoT device 200, it receives the first response message, obtains the information indicating willingness to join the group, the first key, and the MAC address of IoT device 200; uses the first key to encrypt the first group ID to obtain the first information; the first group ID is the ID of the first group where the IoT device is located.

[0181] In S705b, the specific manner for IoT device 100 to obtain the first group ID can refer to S705a, which will not be elaborated here.

[0182] S706b. IoT device 100 sends a second message to IoT device 200. The second message includes the first information.

[0183] S707b. IoT device 200 receives the second message, obtains the first information; uses the first key to decrypt the first information to obtain the first group ID.

[0184] S708b - S715b: They are respectively the same as S707a - S714a. Please refer to S707a - S714a; which will not be elaborated here. Regarding Figure 8 the content, it will be uniformly introduced at the end of Embodiment 1.

[0185] In Figure 7CIn the illustrated embodiment, the IoT device 100 has a first antenna (strong antenna) and a second antenna (weak antenna). The transmission distance of the first antenna is a first distance, and the transmission distance of the second antenna is a second distance. Among them, the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance. The IoT device 200 has a third antenna (strong antenna) and a fourth antenna (weak antenna). The transmission distance of the third antenna is a third distance, and the transmission distance of the fourth antenna is a fourth distance. Among them, the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.

[0186] As Figure 7C shown, the method for setting the IoT device to join a group may include:

[0187] S701c. The IoT device 100 broadcasts a first message through the second antenna of the IoT device 100. The first message includes information for soliciting group members and the MAC address of the IoT device 100.

[0188] Exemplarily, similar to S701a, before S701c, the IoT device 100 also receives an input to trigger the execution of S701a; and, in S701c, the IoT device 100 can also adopt various feasible communication protocols to implement the broadcast of the first message, which will not be elaborated here.

[0189] In S701c, since the second antenna is a weak antenna, the transmission distance of the second antenna is very short. Therefore, only when the IoT device 200 is close to the IoT device 100 can it receive the first message. Therefore, it can effectively prevent the first message from being obtained by other devices.

[0190] S702c. The IoT device 200 receives the first message within the transmission distance of the second antenna of the IoT device 100, and obtains the information for soliciting group members and the MAC address of the IoT device 100.

[0191] S703c - S705c: They are the same as S703b - S705b respectively. Please refer to S703b - S705b; they will not be elaborated here.

[0192] S706c. The IoT device 100 sends a second message to the IoT device 200 through the first antenna of the IoT device 100. The second message includes the first information.

[0193] In S706c, since the first information is information encrypted by the first key, even if the second message is sent using the first antenna, the information security will not be reduced.

[0194] Alternatively, in S706c, the IoT device 100 may also send a second message to the IoT device 200 via the second antenna of the IoT device 100.

[0195] In S707c, when the IoT device 200 is within the transmission range of the first antenna of the IoT device 100 and receives the second message to obtain the first information, it decrypts the first information using the first key to obtain the first group ID.

[0196] S708c - S715c: They are the same as S707a - S714a respectively. Please refer to S707a - S714a and will not be elaborated here.

[0197] In Figure 7D the illustrated embodiment, the IoT device 100 has a first antenna. The transmission range of the first antenna at the first transmission power is the first distance, and the transmission range of the first antenna at the second transmission power is the second distance. The first transmission power is greater than the second transmission power, and the second distance is less than the first distance. In Figure 7D the illustrated implementation, the IoT device 100 changes the transmission range by switching the transmission power of the first antenna, thereby achieving Figure 7A the same technical effects as the illustrated embodiment.

[0198] As Figure 7D shown, the method for setting the IoT device to join a group may include:

[0199] S701d - S714d: Please refer to the description of S701a - S714a. The difference is only that in S701d - S714d, "the first antenna at the first transmission power" and "the first antenna at the second transmission power" replace "the first antenna" and "the second antenna" in S701a - S714a respectively.

[0200] It should be noted that for the illustrated embodiment with reference to Figure 7D and the embodiment of Figure 7A , for Figure 7B and Figure 7C the illustrated embodiment, the method of changing the transmission range by switching the transmission power of the antenna can also be adopted to replace the method of changing the transmission range by switching the antenna, thereby obtaining a new embodiment. Here, it will not be elaborated one by one. The new embodiment is also within the scope of this application.

[0201] Exemplarily, Figure 8 is a demonstration schematic diagram for setting the IoT device to join a group in the IoT device setting method provided by the embodiment of this application. As Figure 8 shown in (a) of Figure 8As shown in (b), IoT device 200 and IoT device 200 can be in the same group (the first group). For users, it is easy to operate, without the need for users to spend a lot of time, nor do they need to have a good understanding of each IoT device, which greatly facilitates users.

[0202] Embodiment 2

[0203] Embodiment 2 relates to Figures 9A - 10 . Among them, Figures 9A - 9D FIG. shows a communication interaction diagram for setting the control relationship of IoT devices in the IoT device setting method provided by the embodiment of the present application. Figure 10 FIG. shows a corresponding demonstration diagram. Figures 9A - 9D FIGS. respectively show the processes of four different implementation manners in Embodiment 2. The following will be described in detail in conjunction with Figures 9A - 9D Details.

[0204] In Figure 9A In the shown implementation manner, IoT device 100 has a first antenna (strong antenna) and a second antenna (weak antenna). The transmission distance of the first antenna is the first distance, and the transmission distance of the second antenna is the second distance. Among them, the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.

[0205] As Figure 9A shown, the method for setting the control relationship of IoT devices may include:

[0206] S901a - S902a: Referring to S701a - S702a, it can be seen that S901a - S902a replaces the information for soliciting group members in S701a - S702a with the information for setting the control relationship. The information for setting the control relationship is used to indicate that IoT device 100 is willing to set the control relationship with other devices.

[0207] S903a - S904a: Referring to S703a - S704a, it can be seen that S903a - S904a replaces the information for willing to join the group in S703a - S704a with the information for willing to set the control relationship. The information for willing to set the control relationship is used to indicate that IoT device 200 is willing to set the control relationship with IoT device 100.

[0208] S905a - S906a: Referring to S705a - S706a, the difference between S905a - S906a and S705a - S706a is only that: in S905a, the second message includes the first Device ID, and the first Device ID is the DeviceID of IoT device 100; in S906a, IoT device 200 obtains the first Device ID.

[0209] Similar to S706a, in S906a, since the second antenna is a weak antenna and the transmission distance of the second antenna is very short, only when the IoT device 200 is close to the IoT device 100 can it receive the second message. Therefore, when the IoT device 100 sends the second message through the second antenna in S905a, it can effectively prevent the second message from being obtained by other devices, thus greatly improving data security.

[0210] S907a. The IoT device 200 determines whether the IoT device 200 has set a control relationship with the IoT device corresponding to the first Device ID.

[0211] Similar to S707a, before S906a, the IoT device 200 may have set a control relationship with the IoT device corresponding to the first Device ID. Therefore, after S907a, if the IoT device 200 has set a control relationship with the IoT device corresponding to the first Device ID, there is no need to perform subsequent operations for setting the control relationship, thus avoiding waste of processing resources.

[0212] S908a. If the IoT device 200 has not set a control relationship with the IoT device corresponding to the first Device ID, the IoT device 200 sends a control relationship setting message to the IoT server 300. The control relationship setting message includes the first Device ID and the second Device ID, and the second Device ID is the Device ID of the IoT device 200.

[0213] S909a. The IoT server 300 receives the control relationship setting message and obtains the first Device ID and the second Device ID.

[0214] S910a. The IoT server 300 determines whether the control relationship attribute corresponding to the IoT device 200 matches the control relationship attribute corresponding to the IoT device 100.

[0215] The control relationship between the IoT device 200 and the IoT device 100 may not be set correctly. For example, taking the lamp A as the IoT device 100, when the switch B as the IoT device 200 approaches the lamp A, a control relationship is set between the switch B and the lamp A (the switch B controls the lamp A). However, when the lamp C as the IoT device 200 approaches the lamp A, a control relationship cannot be set between the lamp C and the lamp A (there is no control / being-controlled relationship between the lamp C and the lamp A). If a control relationship is forcibly set, it will result in an incorrect setting of the control relationship. Therefore, after S910a, if the control relationship attributes corresponding to the IoT device 200 do not match the control relationship attributes corresponding to the IoT device 100, the control relationship between the IoT device 200 and the IoT device 100 is not set, thus effectively avoiding incorrect setting of the control relationship.

[0216] Exemplarily, the control relationship attribute is used to describe what devices the current device can control and what devices can control the current device.

[0217] For example, the control relationship attribute of the switch B can be described as: it can output a first control signal (turn-on signal) and a second control signal (turn-off signal); the control relationship attribute of the lamp A can be described as: it can receive a third control signal (corresponding to turning on the light) and a fourth control signal (corresponding to turning off the light). The first control signal and the second control signal can match and correspond to the third control signal and the fourth control signal respectively. Therefore, the control relationship attributes of the switch B and the lamp A match each other.

[0218] Again, for example, the control relationship attribute of the switch B can be described as: it can output a first control signal (turn-on signal) and a second control signal (turn-off signal); the control relationship attribute of the lamp A can be described as: it can receive a third control signal (corresponding to yellow light), a fourth control signal (corresponding to white light), and a fifth control signal (corresponding to turning off the light). The first control signal and the second control signal cannot match and correspond to the third control signal, the fourth control signal, and the fifth control signal respectively. Therefore, the control relationship attributes of the switch B and the lamp A do not match each other.

[0219] Again, for example, the control relationship attribute of the button D can be described as: it can output a first control signal (output a first control signal every time the button D is pressed); the control relationship attribute of the lamp A can be described as: it can receive a second control signal (switch between yellow light, white light, and turning off the light every time the second control signal is received). The first control signal and the second control signal can match and correspond to each other. Therefore, the control relationship attributes of the switch B and the lamp A match each other.

[0220] S911a. When the IoT server 300 determines in S910a that the control relationship attributes corresponding to the IoT device 200 match the control relationship attributes corresponding to the IoT device 100, the IoT server 300 sends a first feedback message to the IoT device 200, and the first feedback message includes information indicating successful setting.

[0221] Optionally, in S911a, the IoT server 300 also records the control relationship between the IoT device 200 and the IoT device 100. For example, writing the Device ID of the IoT device 200 into the control object list of the IoT device 100, or writing the Device ID of the IoT device 200 into the authorized control device list of the IoT device 100.

[0222] S912a. When the IoT server 300 determines in S910a that the control relationship attributes corresponding to the IoT device 200 do not match the control relationship attributes corresponding to the IoT device 100, the IoT server 300 sends a second feedback message to the IoT device 200, and the second feedback message includes information indicating failed setting and the reason.

[0223] S913a. The IoT device 200 receives the first feedback message or the second feedback message.

[0224] S914a. The IoT device 200 sends an informing message to the IoT device 100 to notify the IoT device 100 of the result of setting the control relationship.

[0225] S913a - S914a are the same as S713a - S714a respectively. Please refer to S713a - S714a and will not be elaborated here.

[0226] In Figure 9B the illustrated embodiment, the IoT device 200 has a third antenna (strong antenna) and a fourth antenna (weak antenna). The transmission distance of the third antenna is the third distance, and the transmission distance of the fourth antenna is the fourth distance. Among them, the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.

[0227] As Figure 9B shown, the method for setting the control relationship of the IoT device may include:

[0228] S901b - S902b: Referring to S701b - S702b, it can be known that in S901b - S902b, the information for soliciting group members in S701b - S702b is replaced with the information for setting the control relationship.

[0229] S903b - S904b: Referring to S703b - S704b, it can be seen that S903b - S904b replaces the information of willing to join the group with the information of willing to set up a control relationship.

[0230] Similar to S704b, in S904b, since the fourth antenna is a weak antenna, only when the IoT device 200 is close to the IoT device 100 can the IoT device 100 receive the first response message. Therefore, the first response message can be effectively prevented from being obtained by other devices.

[0231] S905b. The IoT device 100 is within the transmission range of the fourth antenna of the IoT device 200, receives the first response message, obtains the information of willing to set up a control relationship, the first key, and the MAC address of the IoT device 200; encrypts the first Device ID with the first key to obtain the first information; the first Device ID is the Device ID of the IoT device 100.

[0232] S906b. The IoT device 100 sends a second message to the IoT device 200, and the second message includes the first information.

[0233] S907b. The IoT device 200 receives the second message, obtains the first information; decrypts the first information with the first key to obtain the first Device ID.

[0234] S908b - S915b: They are the same as S907a - S914a respectively. Please refer to S907a - S914a; they will not be elaborated here.

[0235] In Figure 9C In the shown embodiment, the IoT device 100 has a first antenna (strong antenna) and a second antenna (weak antenna). The transmission range of the first antenna is the first range, and the transmission range of the second antenna is the second range. Among them, the first antenna and the second antenna are different antennas, and the first range is greater than the second range. The IoT device 200 has a third antenna (strong antenna) and a fourth antenna (weak antenna). The transmission range of the third antenna is the third range, and the transmission range of the fourth antenna is the fourth range. Among them, the third antenna and the fourth antenna are different antennas, and the third range is greater than the fourth range.

[0236] As Figure 9C shown, the method for setting an IoT device to join a group may include:

[0237] S901c - S902c: Referring to S701c - S702c, it can be seen that S901c - S902c replaces the information of soliciting group members in S701c - S702c with the information of being able to set up a control relationship.

[0238] Similar to S701c, in S901c, since the second antenna is a weak antenna and the transmission distance of the second antenna is very short, the first message can only be received when the IoT device 200 is close to the IoT device 100. Therefore, it can effectively prevent the first message from being obtained by other devices.

[0239] S903c - S905c: They are the same as S903b - S905b respectively. Please refer to S903b - S905b; details are not described here again.

[0240] S906c: It is the same as S706c. Please refer to S706c; details are not described here again.

[0241] S907c. The IoT device 200 is within the transmission distance of the first antenna of the IoT device 100, receives the second message, and obtains the first information; decrypts the first information using the first key to obtain the first Device ID.

[0242] S908c - S915c: They are the same as S907a - S914a respectively. Please refer to S907a - S914a; details are not described here again.

[0243] Figure 9C The shown embodiment is the most secure and can effectively prevent an attacking device from mimicking the IoT device 100 or the IoT device 200.

[0244] In Figure 9D the shown embodiment, the IoT device 100 has a first antenna. The transmission distance of the first antenna at the first transmission power is the first distance; the transmission distance of the first antenna at the second transmission power is the second distance; the first transmission power is greater than the second transmission power, and the second distance is less than the first distance. Similar to Figure 7D the shown embodiment, in Figure 9D the shown embodiment, the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving Figure 9A the same technical effect as the shown embodiment.

[0245] As Figure 9D shown, the method for setting an IoT device to join a group may include:

[0246] S901d - S914d: Please refer to the description of S901a - S914a; the difference is only that in S901d - S914d, "the first antenna at the first transmission power" and "the first antenna at the second transmission power" replace "the first antenna" and "the second antenna" in S901a - S914a respectively.

[0247] It should be noted that referring to Figure 9D the shown embodiment andFigure 9A Embodiments, for Figure 9B and Figure 9C For the embodiments shown, it is also possible to use the method of switching the transmission power of the antenna to change the transmission distance instead of switching the antenna to change the transmission distance, thereby obtaining new embodiments. Here, it will not be described in detail one by one. The new embodiments are also within the scope of this application.

[0248] Exemplarily, Figure 10 is a schematic demonstration diagram for setting the control relationship of IoT devices in the IoT device setting method provided by an embodiment of this application. As Figure 10 shown in (a) of Figure 10 , after IoT device 100 and IoT device 200 get close to each other, that is, touch each other, as Figure 10 shown in (b) of Figure 10 , IoT device 100 can control IoT device 200. Alternatively, in the second embodiment, it can also be that after IoT device 100 and IoT device 200 get close to each other, that is, touch each other, IoT device 200 can control IoT device 100. In this way, for users, the operation is simple, without the need for users to spend a lot of time, nor do they need to know each IoT device well, which greatly facilitates the users.

[0249] Embodiment Three

[0250] Embodiment Three relates to Figures 11A - 12 . Among them, Figures 11A - 11D shows a communication interaction diagram for setting the function replication relationship of IoT devices in the IoT device setting method provided by an embodiment of this application. Figure 12 shows the corresponding schematic demonstration diagram. Figures 11A - 11D respectively show the processes of four different embodiments under Embodiment Three. The following will be described in detail with reference to Figures 11A - 11D .

[0251] In Figure 11A the shown embodiment, IoT device 100 has a first antenna (strong antenna) and a second antenna (weak antenna). The transmission distance of the first antenna is a first distance, and the transmission distance of the second antenna is a second distance. Among them, the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.

[0252] As Figure 11A shown, the method for setting the function replication relationship of IoT devices may include:

[0253] S1101a - S1102a: Referring to S701a - S702a, the difference between S1101a - S1102a and S701a - S702a is that: S1101a - S1102a replaces the information for soliciting group members in S701a - S702a with information for setting a function replication relationship. The information for setting a function replication relationship is used to indicate that the IoT device 100 can have its functions replicated by other devices.

[0254] S1103a - S1104a: Referring to S703a - S704a, the only difference between S1103a - S1104a and S703a - S704a is that: S1103a - S1104a replaces the information of being willing to join a group in S703a - S704a with information of being willing to set a function replication relationship. The information of being willing to set a function replication relationship is used to indicate that the IoT device 200 is willing to replicate the functions of the IoT device 100.

[0255] S1105a - S1106a: Referring to S705a - S706a, the only difference between S1105a - S1106a and S705a - S706a is that: in S1105a, the second message includes the first Device ID, and the first Device ID is the Device ID of the IoT device 100; in S1106a, the IoT device 200 obtains the first Device ID.

[0256] Similar to S706a, in S1106a, since the second antenna is a weak antenna and the transmission distance of the second antenna is very short, the second message can only be received when the IoT device 200 is close to the IoT device 100. Therefore, when the IoT device 100 sends the second message through the second antenna in S1105a, it can effectively prevent the second message from being obtained by other devices, thus greatly improving data security.

[0257] S1107a. The IoT device 200 determines whether the IoT device 200 has already set the functions of the IoT device 100.

[0258] Similar to S707a, before S1106a, the IoT device 200 may already have set the functions of the IoT device 100. For example, after the IoT device 200 is close to the IoT device 100 and sets a function replication relationship, the IoT device 200 moves away from the IoT device 100 and then gets close again, resulting in the re - execution of S1102a - S1106a. At this time, if the function replication relationship is set repeatedly, it will inevitably cause waste of processing resources. Therefore, after S1107a, if the IoT device 200 has already set the functions of the IoT device 100, there is no need to perform subsequent operations for setting the function replication relationship, thus avoiding waste of processing resources.

[0259] S1108a. If the IoT device 200 does not yet have the functions of the IoT device 100, the IoT device 200 sends a function replication relationship setting message to the IoT server 300. The function replication relationship setting message includes a first Device ID and a second Device ID, and the second Device ID is the Device ID of the IoT device 200.

[0260] S1109a. The IoT server 300 receives the function replication relationship setting message and obtains the first Device ID and the second Device ID.

[0261] S1110a. The IoT server 300 determines whether the function attributes corresponding to the IoT device 200 match the function attributes corresponding to the IoT device 100.

[0262] In an actual application scenario, it may not be possible to correctly set the function replication relationship between the IoT device 200 and the IoT device 100.

[0263] For example, the function of the lamp A (IoT device 100) is to be controlled by the switch C. When the lamp B, as the IoT device 200, approaches the lamp A, the lamp B replicates the function of the lamp A. After replication, the function of the lamp B is to be controlled by the switch C. However, when the switch D, as the IoT device 200, approaches the lamp A, the switch D, as a control device, cannot replicate the function of the lamp A, which is a controlled device. If the function is forcibly replicated, it will result in an incorrect function setting.

[0264] Another example, the function of the lamp A (IoT device 100) is to switch between white light, yellow light, and turning off the light under the control of the button C. Each time the button C is pressed, a control signal is output, and the lamp A switches its state each time it receives a control signal from the button C. The lamp B only has two states, turning off and turning on, and the lamp B does not switch between the two states based on an input signal, but based on the recognition of the input signal (turning on when the input signal is the turn-on signal and turning off when the input signal is the turn-off signal). When the lamp B, as the IoT device 200, approaches the lamp A, the lamp B replicates the function of the lamp A. Since the input control settings of the lamp B are not the same as those of the lamp A, in actual applications, the button C cannot directly control the lamp B, so the lamp B cannot correctly replicate the function of the lamp A.

[0265] Therefore, after S1110a, if the function attributes corresponding to the IoT device 200 do not match the function attributes corresponding to the IoT device 100, the function replication relationship between the IoT device 200 and the IoT device 100 is not set, which can effectively avoid incorrect setting of the function replication relationship.

[0266] Exemplarily, in the application scenario of function replication, the function attributes referred to in S1110a are attributes related to the functions of the device. For example, the control input settings of the device (such as the output item settings of the switch, the number of output items, the output format, etc.); for another example, the control input settings of the device (such as the input item settings of the lamp, the input item recognition settings, etc.).

[0267] S1111a. When the IoT server 300 determines in S1110a that the function attributes corresponding to the IoT device 200 match the function attributes corresponding to the IoT device 100, the IoT server 300 sends a first feedback message to the IoT device 200, and the first feedback message includes the information of successful setting.

[0268] Optionally, in S1111a, the IoT server 300 also records the function replication relationship between the IoT device 200 and the IoT device 100. For example, copy the control object list / controlled object list of the IoT device 100. Based on the control object list / controlled object list of the IoT device 100, create a control object list / controlled object list for the IoT device 200. For another example, use the control object list / controlled object list of the IoT device 100 to overwrite the original control object list / controlled object list of the IoT device 200. For another example, add the control object / controlled object of the IoT device 100 to the control object list / controlled object list of the IoT device 200.

[0269] S1112a. When the IoT server 300 determines in S1110a that the function attributes corresponding to the IoT device 200 do not match the function attributes corresponding to the IoT device 100, the IoT server 300 sends a second feedback message to the IoT device 200, and the second feedback message includes the information and reason of failed setting.

[0270] S1113a. The IoT device 200 receives the first feedback message or the second feedback message.

[0271] S1114a. The IoT device 200 sends an informing message to the IoT device 100 to notify the IoT device 100 of the result of setting the function replication relationship.

[0272] S1113a - S1114a: are the same as or similar to S713a - S714a respectively. Please refer to S713a - S714a; details are not repeated here.

[0273] In Figure 11BIn the implementation shown, the IoT device 200 has a third antenna (strong antenna) and a fourth antenna (weak antenna). The transmission distance of the third antenna is the third distance, and the transmission distance of the fourth antenna is the fourth distance. Among them, the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.

[0274] As Figure 11B shown, the method for setting the IoT device function replication relationship may include:

[0275] S1101b - S1102b: Referring to S701b - S702b, the difference between S1101b - S1102b and S701b - S702b is only that the information for soliciting group members in S701b - S702b is replaced with the information for setting the function replication relationship.

[0276] S1103b - S1104b: Referring to S703b - S704b, the difference between S1103b - S1104b and S703b - S704b is only that the information of those willing to join the group in S701b - S702b is replaced with the information of those willing to set the function replication relationship.

[0277] Similar to S704b, in S1104b, since the fourth antenna is a weak antenna, only when the IoT device 200 is close to the IoT device 100 can the IoT device 100 receive the first response message. Therefore, the first response message can be effectively prevented from being obtained by other devices.

[0278] S1105b. The IoT device 100 receives the first response message within the transmission distance of the fourth antenna of the IoT device 200, obtains the information of those willing to set the function replication relationship, the first key, and the MAC address of the IoT device 200; encrypts the first Device ID with the first key to obtain the first information; the first Device ID is the Device ID of the IoT device 100.

[0279] S1106b. The IoT device 100 sends a second message to the IoT device 200, and the second message includes the first information.

[0280] S1107b. The IoT device 200 receives the second message, obtains the first information; decrypts the first information with the first key to obtain the first Device ID.

[0281] S1108b - S1115b: They are the same as S1107a - S1114a respectively. Please refer to S1107a - S1114a; details are not repeated here.

[0282] In Figure 11CIn the implementation shown, the IoT device 100 has a first antenna (strong antenna) and a second antenna (weak antenna). The transmission distance of the first antenna is a first distance, and the transmission distance of the second antenna is a second distance. Among them, the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance. The IoT device 200 has a third antenna (strong antenna) and a fourth antenna (weak antenna). The transmission distance of the third antenna is a third distance, and the transmission distance of the fourth antenna is a fourth distance. Among them, the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.

[0283] As Figure 11C shown, the method for setting the IoT device to join a group may include:

[0284] S1101c - S1102c: Referring to S701c - S702c, the difference between S1101c - S1102c and S701c - S702c is only that the information for soliciting group members in S701c - S702c is replaced with information that can set the function replication relationship.

[0285] Similar to S701c, in S1101c, since the second antenna is a weak antenna and its transmission distance is very short, the first message can only be received when the IoT device 200 is close to the IoT device 100. Therefore, it can effectively prevent the first message from being obtained by other devices.

[0286] S1103c - S1105c: They are the same as S1103b - S1105b respectively. Please refer to S1103b - S1105b; details are not repeated here.

[0287] S1106c: It is the same as S706c. Please refer to S706c; details are not repeated here.

[0288] S1107c. When the IoT device 200 is within the transmission distance of the first antenna of the IoT device 100, it receives the second message and obtains the first information; decrypts the first information using the first key to obtain the first Device ID.

[0289] S1108c - S1115c: They are the same as S1107a - S1114a respectively. Please refer to S1107a - S1114a; details are not repeated here.

[0290] In Figure 11D the implementation shown, the IoT device 100 has a first antenna. The transmission distance of the first antenna at the first transmission power is a first distance; the transmission distance of the first antenna at the second transmission power is a second distance. The first transmission power is greater than the second transmission power, and the second distance is less than the first distance. Similar to Figure 7D the embodiment shown, inFigure 11D In the illustrated embodiment, the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving Figure 11A the same technical effect as the illustrated embodiment.

[0291] As Figure 11D illustrated, the method for setting the IoT device to join a group may include:

[0292] S1101d - S1114d: Please refer to the description of S1101a - S1114a; the difference is only that in S1101d - S1114d, "the first antenna under the first transmission power" and "the first antenna under the second transmission power" respectively replace "the first antenna" and "the second antenna" in S901a - S914a.

[0293] It should be noted that, referring to Figure 11D the illustrated embodiment and Figure 11A the embodiment of Figure 11B and Figure 11C the illustrated embodiment, a method of changing the transmission distance by switching the transmission power of the antenna can also be adopted to replace the method of changing the transmission distance by switching the antenna, so as to obtain a new embodiment. Here, it will not be described in detail one by one. The new embodiment is also within the scope of this application.

[0294] Exemplarily, Figure 12 is a demonstration schematic diagram for setting the function replication relationship of the IoT device in the IoT device setting method provided by the embodiment of this application. As Figure 12 shown in (a) of Figure 12 the IoT device 100 controls the IoT device 400. After the IoT device 200 gets close to the IoT device 100, that is, after a touch, as

[0295] shown in (b) of both the IoT device 100 and the IoT device 200 can control the IoT device 400. In this way, for the user, the operation is simple, without the user spending much time, and without the user having to know each IoT device well, which greatly facilitates the user.It should be noted that in all the above and equivalent embodiments of the present application, Wi-Fi aware is a preferred way to realize data interaction between IoT device 100 and IoT device 200. In the discovery window (DW) stipulated by the NAN mechanism, the maintenance work and service discovery work of the NAN mechanism are carried out. Service discovery is realized by sending service discovery frame (SDF) messages. Between NAN devices, SDF messages can be sent to each other by sending Beacon frames. An indication bit is included in the SDF message, which is used to indicate what kind of SDF message this SDF message is. The types of SDF messages include: Publish message, which is used to publish the services that the NAN device can provide, or to reply to other NANs received; Subscribe message, which is used to find the services that need to be used; Follow-Up message, which is used to reply to the received SDF Publish message, or to negotiate more information.

[0296] Figure 13 FIG. is a schematic diagram of communication interaction between a first IoT device and a second IoT device in the IoT device setting method provided by the embodiment of the present application under the Wi-Fi protocol. As Figure 13 shown, when IoT device 100 and IoT device 200 interact for the first time and broadcast a first message to IoT device 200 (for example, in S701a, S701b, S701c, S701d, S901a, S901b, S901c, S901d, S1101a, S1101b, S1101c, S1101d, IoT device 100 broadcasts the first message), IoT device 100 publishes the first message based on the NAN SDF Publish message.

[0297] When performing data interaction after the first interaction between IoT device 100 and IoT device 200 (for example, in the subsequent steps of IoT device 100 in S701a, S701b, S701c, S701d, S901a, S901b, S901c, S901d, S1101a, S1101b, S1101c, S1101d), IoT device 100 and IoT device 200 perform data interaction based on the NAN SDF Follow-up message.

[0298] It can be understood that some or all of the steps or operations in the above embodiments are only examples. The embodiments of the present application can also perform other operations or various deformations of the operations. In addition, each step can be executed in a different order presented in the above embodiments, and it is possible not to execute all the operations in the above embodiments.

[0299] The embodiments of the present application provide an IoT device setting method and an IoT device, which can conveniently and quickly complete the setting of the IoT device, with less overall time consumption, simplified operations, improved efficiency, and enhanced user experience. The automatic printing method provided by the embodiments of the present application is applicable to the following IoT devices.

[0300] It should be noted that all or part of the technical features of the above various embodiments and examples provided by the present application can be combined arbitrarily and mutually.

[0301] Figure 14 The figure is a schematic structural diagram of an IoT device provided by the present application. By way of example, the IoT device includes at least one processor, a memory, and a wireless communication module. Among them, the processor is coupled to the memory and the wireless communication module. The coupling in the embodiments of the present application can be a communication connection, which can be electrical or in other forms. Specifically, the memory is used to store program instructions. The wireless communication module is used to establish a wireless connection. The processor is used to call the program instructions stored in the memory, so that the IoT device executes the steps performed by the IoT device in the IoT device setting method provided by the embodiments of the present application. It should be understood that this IoT device can be used to implement the IoT device setting method provided by the embodiments of the present application. For related features, reference can be made to the above, and details will not be repeated here.

[0302] The present application provides a computer program product containing instructions. When the computer program product runs on an IoT device, it causes the IoT device to execute the steps performed by the IoT device in the IoT device setting method provided by the embodiments of the present application.

[0303] The present application provides a computer-readable storage medium including instructions. When the instructions run on an IoT device, it causes the IoT device to execute the steps performed by the IoT device in the IoT device setting method provided by the embodiments of the present application.

[0304] Those skilled in the art can clearly understand that the embodiments of the present application can be implemented by hardware or in a way that combines hardware and software. When using the combination of hardware and software, the above functions can be stored in a computer-readable medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. And the aforementioned storage medium includes: various media that can store program codes such as flash memory, mobile hard disks, read-only memories, random access memories, magnetic disks, or optical discs.

[0305] As described above, it is only the specific implementation manner of the embodiments of the present application. However, the protection scope of the embodiments of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the embodiments of the present application should be covered within the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims

1. A first IoT device, the first IoT device communicating with a second IoT device and an IoT server; characterized in that, The first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna being a first distance; the first distance being greater than a first preset transmission distance; a second antenna, the transmission distance of the second antenna being a second distance; the first antenna and the second antenna being different antennas; the second distance being less than or equal to the first preset transmission distance; and a computer program, wherein the computer program is stored on the memory, and when the computer program is executed by the processor, the first IoT device is caused to perform the following steps: broadcast a first message through the second antenna; the first message including first publishing information; receive a first response message from the second IoT device within a fourth distance from the second IoT device; the first response message including first request information for the first publishing information; in response to the first response message, send a second message to the second IoT device through the first antenna; receive an informing message from the IoT server, or receive an informing message from the second IoT device within a third distance from the second IoT device; wherein the third distance is greater than the fourth distance.

2. The first IoT device according to claim 1, characterized in that, The first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.

3. The first IoT device according to claim 2, characterized in that, The wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.

4. The first IoT device according to claim 1, characterized in that, The first publishing information includes one of the following: information for soliciting group members, information for setting a control relationship, and information for setting a function replication relationship; the first request information includes one of the following: information for willing to join a group, information for willing to set a control relationship, and information for willing to set a function replication relationship.

5. The first IoT device according to claim 4, characterized in that, When the first publishing information includes information for soliciting group members, the second message includes a first group ID; the first group ID being the ID of one or more groups where the first IoT device is located.

6. The first IoT device according to claim 4, characterized in that, When the first publishing information includes information for setting a control relationship or information for setting a function replication relationship, the second message includes a first device ID; the first device ID being the device ID of the first IoT device.

7. The first IoT device according to any one of claims 1-6, characterized in that, After receiving the informing message from the second IoT device or the IoT server, the first IoT device further performs: outputting the informing message; Before broadcasting the first message through the second antenna, the first IoT device further performs: receiving an input.

8. A first IoT device, the first IoT device communicating with a second IoT device and an IoT server; characterized in that, The first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna at a first transmission power being a first distance, the first distance being greater than a first preset transmission distance; the transmission distance of the first antenna at a second transmission power being a second distance, the second distance being less than or equal to the first preset transmission distance; the first transmission power being greater than the second transmission power; and a computer program, wherein the computer program is stored on the memory, and when the computer program is executed by the processor, the first IoT device is caused to perform the following steps: Broadcast a first message through the first antenna at the second transmission power; the first message includes first publication information; Receive a first response message from the second IoT device within a fourth distance from the second IoT device; the first response message includes first request information for the first publication information; In response to the first response message, send a second message to the second IoT device through the first antenna at the first transmission power; Receive an informing message from the IoT server, or receive an informing message from the second IoT device within a third distance from the second IoT device; wherein, the third distance is greater than the fourth distance.

9. A second IoT device, the second IoT device communicating with the first IoT device and an IoT server; characterized in that, The second IoT device includes: A processor; A memory; A third antenna, the transmission distance of the third antenna being a third distance; the third distance is greater than a second preset transmission distance; A fourth antenna, the transmission distance of the fourth antenna being a fourth distance; the third antenna and the fourth antenna are different antennas; the fourth distance is less than or equal to the second preset transmission distance; and a computer program, wherein the computer program is stored on the memory, and when the computer program is executed by the processor, the second IoT device is caused to perform the following steps: Receive a first message from the first IoT device; the first message includes first publication information; Randomly generate a first key; Send a first response message to the first IoT device through the fourth antenna; the first response message includes first request information for the first publication information; Receive a second message from the first IoT device; Send a first request message to the IoT server through the third antenna; Receive a first feedback message or a second feedback message from the IoT server.

10. The second IoT device according to claim 9, wherein The third antenna and the fourth antenna are connected to the same wireless communication chip of the second IoT device.

11. The second IoT device according to claim 10, wherein The wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.

12. The second IoT device according to any one of claims 9-11, wherein The first publication information includes one of the following: information for soliciting group members, information for setting a control relationship, and information for setting a function replication relationship; the first request information includes one of the following: information for willing to join a group, information for willing to set a control relationship, and information for willing to set a function replication relationship.

13. The second IoT device according to claim 12, wherein When the first publication information includes information for soliciting group members, the second message includes a first group ID, and the first request message includes a first group ID and a second device ID; the first group ID is the ID of one or more groups where the first IoT device is located, and the second device ID is the device ID of the second IoT device.

14. The second IoT device according to claim 12, wherein When the first publishing information includes information on a configurable control relationship or information on a configurable function replication relationship, the second message includes a first device ID, and the first request message includes a first device ID and a second device ID; the first device ID is the device ID of the first IoT device, and the second device ID is the device ID of the second IoT device.

15. A second IoT device, the second IoT device communicating with a first IoT device and an IoT server; wherein The second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna at a third transmission power being a third distance, the third distance being greater than a second preset transmission distance; the transmission distance of the third antenna at a fourth transmission power being a fourth distance, the fourth distance being less than or equal to the second preset transmission distance; the third transmission power being greater than the fourth transmission power; and a computer program, wherein the computer program is stored on the memory, and when the computer program is executed by the processor, the second IoT device is caused to perform the following steps: receiving a first message from the first IoT device; the first message includes first publishing information; randomly generating a first key; sending, via the third antenna at the fourth transmission power, a first response message to the first IoT device; the first response message includes first request information for the first publishing information; receiving a second message from the first IoT device; sending, via the third antenna at the third transmission power, a first request message to the IoT server; receiving a first feedback message or a second feedback message from the IoT server.

16. A method for setting a first IoT device, applied to the first IoT device, the first IoT device communicating with a second IoT device and an IoT server; wherein The first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna being a first distance; the first distance being greater than a first preset transmission distance; a second antenna, the transmission distance of the second antenna being a second distance; the first antenna and the second antenna being different antennas; the second distance being less than or equal to the first preset transmission distance; the method includes: broadcasting, via the second antenna, a first message; the first message includes first publishing information; receiving, within a fourth distance from the second IoT device, a first response message from the second IoT device; the first response message includes first request information for the first publishing information; in response to the first response message, sending, via the first antenna, a second message to the second IoT device; receiving an informing message from the IoT server, or receiving, within a third distance from the second IoT device, an informing message from the second IoT device; wherein the third distance is greater than the fourth distance.

17. According to the method described in claim 16, characterized in that, The first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.

18. According to the method described in claim 17, characterized in that, The wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.

19. A method for setting a first IoT device, the first IoT device communicating with a second IoT device and an IoT server; characterized in that, The first IoT device includes: a processor; a memory; a first antenna, the transmission distance of the first antenna at a first transmission power being a first distance, the first distance being greater than a first preset transmission distance; the transmission distance of the first antenna at a second transmission power being a second distance, the second distance being less than or equal to the first preset transmission distance; the first transmission power being greater than the second transmission power; The method includes: Broadcasting a first message through the first antenna at the second transmission power; the first message includes first publication information; Receiving a first response message from the second IoT device within a fourth distance from the second IoT device; the first response message includes first request information for the first publication information; In response to the first response message, sending a second message to the second IoT device through the first antenna at the first transmission power; Receiving an informing message from the IoT server, or receiving an informing message from the second IoT device within a third distance from the second IoT device; wherein, the third distance is greater than the fourth distance.

20. A method for setting a second IoT device, applied to the second IoT device, the second IoT device communicating with a first IoT device and an IoT server; characterized in that, The second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna being a third distance; the third distance being greater than a second preset transmission distance; a fourth antenna, the transmission distance of the fourth antenna being a fourth distance; the third antenna and the fourth antenna being different antennas; the fourth distance being less than or equal to the second preset transmission distance; The method includes: Receiving a first message from the first IoT device; the first message includes first publication information; Randomly generating a first key; Sending a first response message to the first IoT device through the fourth antenna; the first response message includes first request information for the first publication information; Receiving a second message from the first IoT device; Sending a first request message to the IoT server through the third antenna; Receiving a first feedback message or a second feedback message from the IoT server.

21. A method for setting a second IoT device, applied to the second IoT device, the second IoT device communicating with a first IoT device and an IoT server; characterized in that, The second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna at a third transmission power being a third distance, the third distance being greater than a second preset transmission distance; the transmission distance of the third antenna at a fourth transmission power being a fourth distance, the fourth distance being less than or equal to the second preset transmission distance; the third transmission power being greater than the fourth transmission power; The method includes: Receiving a first message from the first IoT device; the first message includes first publication information; Randomly generating a first key; Sending a first response message to the first IoT device through the third antenna at the fourth transmission power; the first response message includes first request information for the first publication information; Receiving a second message from the first IoT device; sending a first request message to the IoT server through the third antenna at the third transmission power; Receive the first feedback message or the second feedback message from the IoT server.

22. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a computer program which, when running on the first IoT device or the second IoT device, causes the first IoT device or the second IoT device to respectively execute the method according to any one of claims 16-19 or 20-21.

Citation Information

Patent Citations

  • Wireless routing equipment access method and wireless routing equipment

    CN112153721A