WO2022194220A1 - Iot device configuration method and iot device - Google Patents

Iot device configuration method and iot device Download PDF

Info

Publication number
WO2022194220A1
WO2022194220A1 PCT/CN2022/081248 CN2022081248W WO2022194220A1 WO 2022194220 A1 WO2022194220 A1 WO 2022194220A1 CN 2022081248 W CN2022081248 W CN 2022081248W WO 2022194220 A1 WO2022194220 A1 WO 2022194220A1
Authority
WO
WIPO (PCT)
Prior art keywords
iot device
antenna
distance
message
iot
Prior art date
Application number
PCT/CN2022/081248
Other languages
French (fr)
Chinese (zh)
Inventor
万跃城
时锐
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022194220A1 publication Critical patent/WO2022194220A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W24/00Supervisory, monitoring or testing arrangements
    • H04W24/02Arrangements for optimising operational condition
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/009Security arrangements; Authentication; Protecting privacy or anonymity specially adapted for networks, e.g. wireless sensor networks, ad-hoc networks, RFID networks or cloud networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/60Context-dependent security
    • H04W12/63Location-dependent; Proximity-dependent

Definitions

  • the present application relates to the field of the Internet of Things, and in particular to a method for setting an IoT device and an IoT device.
  • IoT Internet of Things
  • users' demands for IoT devices continue to increase. 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.
  • manually setting each IoT device not only makes the setting cumbersome and takes a long time, but also requires users to have a better understanding of each IoT device.
  • users In practice, users generally do not have a better understanding of each IoT device. Users have to spend time learning about each IoT device. All of these result in a high time cost for the user to perform a setting, which brings 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 demand.
  • the present application provides an IoT device setting method and IoT device.
  • the technical solution provided by the present application enables the user to easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user.
  • a first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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, wherein the computer program is stored in the memory, when the computer When the program is executed by the processor, the first IoT device executes: broadcasts the first message through the first antenna; the first message includes the first release information; receives the first response message from the second IoT device; the first response message Including first request information for the first published information; in response to the first response message, sending a second message to the second IoT device through the second antenna; receiving a notification message from the second IoT device or the IoT server.
  • 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; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
  • the first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.
  • the wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.
  • the first release information includes one of the following: information on soliciting group members, information on which a control relationship can be set, and information on which a function copy relationship can be set;
  • a request information includes one of the following: information of willingness to join a group, information of willingness to set up a control relationship, and information of willingness to set a function duplication relationship.
  • the second message when the first published information includes information on soliciting group members, the second message includes the first group ID; the first group ID is the first IoT The ID of one or more groups the device is in.
  • the first IoT device can be enabled to support the second IoT device to join the group of the first IoT device.
  • the second message when the first release information includes information on which a control relationship can be set or information on which a function duplication relationship can be set, the second message includes the first device ID; the first The device ID is the device ID of the first IoT device. In this way, the first IoT device can be made to support the operation of setting a control relationship or setting a function replication relationship.
  • the first IoT device after receiving the notification message from the second IoT device or the IoT server, the first IoT device further performs: outputting the notification message; Before broadcasting the first message, the first IoT device also performs: an input is received. In this way, the first IoT device can be enabled to notify the user of the setting result, and the first IoT device can be enabled to broadcast the first message under external input control.
  • a first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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, wherein the computer program is stored in the memory, when the computer When the program is executed by the processor, the first IoT device is made to execute: broadcast the first message through the second antenna; the first message includes the first published information; within a fourth distance from the second IoT device, receive a message from the second IoT device.
  • the first response message of the IoT device includes the first request information for the first published information; in response to the first response message, the second message is sent to the second IoT device through the first antenna; Within the third distance of the IoT device, a notification message from the second IoT device is received; the third distance is greater than the fourth distance.
  • 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; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
  • a first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna under the first transmission power is the first distance, and the first distance is greater than the first preset transmission distance; the transmission distance of the first antenna under the second transmission power is a second distance, and the second distance is less than or equal to the first preset transmission distance; the first transmission power is greater than the second transmission power; and a computer program, wherein the computer program stores On the memory, when the computer program is executed by the processor, the first IoT device is caused to execute: broadcast the first message through the first antenna at the first transmit power; the first message includes the first published information; The first response message of the IoT device; the first response message includes the first request information for the first published information; in response to the first response message, the second IoT device is sent through the first antenna at the second transmit power message; a notification message is received from the second Io
  • 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; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
  • a second IoT device communicates with the IoT server; the second IoT device includes: a processor; a memory; a third antenna, and the transmission distance of the third antenna is the third distance; the third distance is greater than the second preset transmission distance; the fourth antenna, The transmission distance of the fourth antenna is 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 in the memory, when the computer When the program is executed by the processor, the second IoT device executes: receiving the first message from the first IoT device; the first message includes the first release information; randomly generating the first key; The IoT device sends a first response message; the first response message includes first request information for the first published information; receives a second message from the first IoT device; sends a second request message to the IoT server through the third antenna; The first request message or the second
  • the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
  • the third antenna and the fourth antenna are connected to the same wireless communication chip of the second IoT device.
  • the wireless communication chip is a Wi-Fi chip, a Bluetooth chip, or a ZigBee chip.
  • the first release information includes one of the following: information on soliciting group members, information on which a control relationship can be set, and information on which a function replication relationship can be set;
  • the first request information includes one of the following: information of willingness to join a group, information of willingness to set a control relationship, and information of willingness to set a function duplication relationship.
  • the second message when the first published information includes information about soliciting group members, the second message includes the first group ID, and the second request message includes the first group ID and 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.
  • the second IoT device can be made to support the operation of realizing that the second IoT device joins the group of the first IoT device.
  • the second message when the first release information includes information on which a control relationship can be set or information on which a function duplication relationship can be set, the second message includes the first device ID, and the second message includes the first device ID.
  • the 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. In this way, the second IoT device can be made to support the operation of setting the control relationship or setting the function replication relationship.
  • a second IoT device communicates with the IoT server; the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna under the third transmission power is a third distance, and the third distance is greater than the second preset transmission distance; the transmission distance of the third antenna under the 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, wherein the computer program stores On the memory, the computer program, when executed by the processor, causes the second IoT device to execute: receiving a first message from the first IoT device; the first message including the first release information; randomly generating the first key; The third antenna with four transmit powers sends a first response message to the first IoT device; the first response message includes first request information for the first published information; receives a second message from the first IoT device; The third antenna with three transmit powers sends
  • the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
  • a method for setting a first IoT device is provided, which is applied to the first IoT device.
  • the first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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 the first message through the first antenna; The first message includes first release information; a first response message from the second IoT device is received; the first response message includes first request information for the first release information; in response to the first response message, through the second antenna, Send a second message to the second IoT device; receive a notification message from the second IoT device or the IoT server.
  • the first preset transmission distance is the distance at which the first IoT device and the second Io
  • the first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.
  • the wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.
  • a method for setting a first IoT device is provided, which is applied to the first IoT device.
  • the first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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 a second antenna; the first message includes first publishing information; receiving a first response message from the second IoT device within a fourth distance from the second IoT device; the first The response message includes first request information for the first release information; in response to the first response message, the second message is sent to the second IoT device through the first antenna; within a third distance from the second IoT device, the received A notification message from the second IoT device; wherein the third distance is greater than the fourth distance.
  • 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; the distance can ensure security.
  • a method for setting a first IoT device is provided, which is applied to the first IoT device.
  • the first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna under the first transmission power is the first distance, and the first distance is greater than the first preset transmission distance; the transmission distance of the first antenna under the second transmission power is the second distance, and the second distance is less than or equal to the first preset transmission distance; the first transmission power is greater than the second transmission power.
  • the method includes: broadcasting a first message through a first antenna under a first transmit power; the first message includes first release information; receiving a first response message from a second IoT device; Publishing first request information for information; in response to the first response message, sending a second message to the second IoT device through the first antenna under the second transmit power; receiving a notification message from the second IoT device or the IoT server.
  • 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; the distance can ensure security.
  • a method for setting a second IoT device is provided, which is applied to the second IoT device.
  • the second IoT device communicates with the IoT server; the second IoT device includes: a processor; a memory; a third antenna, and the transmission distance of the third antenna is the third distance; the third distance is greater than the second preset transmission distance; the fourth antenna, The transmission distance of the fourth antenna is the fourth distance; the third antenna and the fourth antenna are different antennas; and the fourth distance is 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 includes first release information; randomly generating a first key; sending a first response message to the first IoT device through a fourth antenna; The response message includes the first request information for the first published information; the second message from the first IoT device is received; the second request message is sent to the IoT server through the third antenna; the first request message from the IoT server is received or the second request message.
  • the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security.
  • a tenth aspect provides a method for setting a second IoT device, which is applied to the second IoT device.
  • the second IoT device communicates with the IoT server;
  • the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna under the third transmission power is a third distance, and the third distance is greater than the second preset transmission distance;
  • the transmission distance of the third antenna under the fourth transmission power is the 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.
  • the method includes: receiving a first message from a first IoT device; the first message includes first release information; randomly generating a first key; a response message; the first response message includes the first request information for the first published information; the second message from the first IoT device is received; the second request is sent to the IoT server through the third antenna at the third transmit power message; the first request message or the second request message from the IoT server is received.
  • the second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security.
  • a computer-readable storage medium includes a computer program that, when run on the first IoT device, causes the first IoT device to perform any one of the embodiments of the sixth aspect and the sixth aspect, the seventh aspect or the eighth aspect Methods.
  • a twelfth aspect provides a computer-readable storage medium.
  • the computer-readable storage medium includes a computer program which, when run on the second IoT device, causes the second IoT device to perform the method of the ninth or tenth aspect.
  • a thirteenth aspect provides a computer program product.
  • the computer program product is run on the first IoT device, the first IoT device is caused to perform the method of any one of the sixth aspect and the sixth aspect, the seventh aspect or the eighth aspect.
  • a fourteenth aspect provides a computer program product.
  • the computer program product is run on the second IoT device, the second IoT device is caused to perform the method of the ninth or tenth aspect.
  • the second preset transmission distance may be the same as or different from the first preset transmission distance.
  • FIG. 1 is a schematic diagram of a scenario of a method for setting an IoT device provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a hardware structure of a first IoT device in the IoT device setting method provided by the embodiment of the present application;
  • FIG. 3 is a schematic diagram of a hardware structure of a second IoT device in the IoT device setting method provided by the embodiment of the present application;
  • FIG. 4 is a schematic diagram of a principle of a wireless communication module and an antenna provided by an embodiment of the present application
  • FIG. 5 is another schematic schematic diagram of a wireless communication module and an antenna provided by an embodiment of the present application.
  • 6-8 are schematic diagrams of a specific structure of a wireless communication module and an antenna provided by an embodiment of the application;
  • FIG. 9 is a schematic diagram of a transmission distance of a wireless communication module and an antenna in a method for setting an IoT device provided by an embodiment of the present application;
  • FIGS 10-13 are schematic diagrams of communication interaction in Embodiment 1 of the IoT device setting method provided by the embodiments of the present application;
  • FIG. 14 is a schematic diagram illustrating the demonstration of Embodiment 1 in the IoT device setting method provided by the embodiment of the present application;
  • FIG. 19 is a schematic diagram illustrating the demonstration of Embodiment 2 in the IoT device setting method provided by the embodiment of the present application.
  • FIGS. 20-23 are schematic diagrams of communication interaction in Embodiment 3 of the IoT device setting method provided by the embodiments of the present application.
  • FIG. 24 is a schematic diagram illustrating the demonstration of Embodiment 3 in the IoT device setting method provided by the embodiment of the present application.
  • 25 is a schematic diagram of communication interaction between a first IoT device and a second IoT device using the Wi-Fi protocol in the IoT device setting method provided by the embodiment of the present application;
  • FIG. 26 is a schematic structural diagram of an IoT device provided by an embodiment of the present application.
  • references in this specification to "one embodiment” or “some embodiments” and the like 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.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • the term “connected” includes both direct and indirect connections unless otherwise specified. "First” and “second” are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features.
  • words such as “exemplarily” or “for example” are used to represent examples, illustrations or illustrations. Any embodiment or design described in the embodiments of the present application as “exemplarily” or “such as” should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as “exemplarily” or “such as” is intended to present the related concepts in a specific manner.
  • IoT devices are electronic devices that are remotely or remotely controlled and/or monitored via IoT.
  • smart home appliances are typical IoT devices.
  • Some requirements can only be achieved when multiple IoT devices cooperate with each other.
  • manually setting each IoT device not only makes the setting cumbersome and takes a long time, but also requires users to have a better understanding of each IoT device.
  • users In practice, users generally do not have a better understanding of each IoT device. Users have to spend time learning about each IoT device. All of these result in a high time cost for the user to perform a setting, which brings 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 demand.
  • the present application provides an IoT device setting method and IoT device.
  • the technical solution provided by the present application enables the user to easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user.
  • FIG. 1 is a schematic diagram of a scenario of a method for setting an IoT device provided by an embodiment of the present application.
  • an IoT device 100 (which may also be referred to as a first IoT device) and an IoT device 200 (which may also be referred to as a second IoT device) are connected to the IoT server 300 by wired communication or wireless communication.
  • the IoT server 300 may be a local server or a cloud server.
  • the cloud server can be a home cloud server.
  • the connection between the IoT device 100 and the above-mentioned server may be a wired connection or a wireless connection.
  • the connection between the IoT device 200 and the above-mentioned server may be a wired connection or a wireless connection.
  • both IoT device 100 and IoT device 200 communicate with IoT server 300 through a wireless connection.
  • both the IoT device 100 and the IoT device 200 are connected to the IoT server 300 through the same wireless router.
  • the IoT server 300 may not be provided.
  • the setting of the IoT device 100 to the IoT device 200 can be realized by the proximity of the IoT device 100 and the IoT device 200 .
  • the IoT device 100 can be set to the IoT device 200, so that the IoT device 200 joins the group.
  • the IoT device 100 can control an object, and the IoT device 100 can be set to the IoT device 200 by the proximity of the IoT device 100 and the IoT device 200, so that the IoT device 200 can also control the object.
  • the IoT device 100 and the IoT device 200 may be mutually disposed.
  • the IoT device 100 has a switch function
  • the IoT device 200 has a lighting function.
  • the settings of the IoT device 100 and the IoT device 200 can be completed, so that the IoT device 100 can control the IoT device. 200 lighting functions on and off.
  • the IoT device 100 or the IoT device 200 in this embodiment of the present application includes, but is not limited to, a smartphone, a smart headset, a tablet computer, a wearable electronic device with a wireless communication function (such as a smart watch, a smart bracelet, a smart ring, smart glasses, a smart helmets), smart switches, smart lights, smart refrigerators, smart speakers, smart doorbells, smart door locks, smart curtains, etc.
  • Exemplary embodiments of IoT device 100 include, but are not limited to, piggybacking Portable electronic devices with Windows, Linux, or other operating systems.
  • the above-mentioned IoT device 100 or IoT device 200 may also be other portable electronic devices, such as a laptop computer (Laptop) or the like. It should also be understood that, in some other embodiments, the above-mentioned IoT device 100 or IoT device 200 may not be a portable electronic device, but a fixed installation or a desktop electronic device (eg, a desktop computer).
  • FIG. 2 shows a schematic diagram of a hardware structure of an IoT device 100 provided by an embodiment of the present application.
  • 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 , and a battery 142 , Antenna 1, Antenna 2, Mobile Communication Module 150, Wireless Communication Module 160, Audio Module 170, Speaker 170A, Receiver 170B, Microphone 170C, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191, Indicator 192, Camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the IoT device 100 .
  • the IoT device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the charging management module 140 is used to receive charging input from the charger.
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the wireless communication function of the IoT device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in IoT device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the IoT device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the IoT device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • 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 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the IoT device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the IoT device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system, QZSS
  • SBAS satellite based augmentation systems
  • the IoT device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
  • the external memory interface 120 can be used to connect 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 realize the data storage function. For example to save files like music, video etc in external memory card.
  • the IoT device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.
  • FIG. 3 shows a schematic diagram of a hardware structure of an IoT device 200 provided by an 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 charge management module 240, a power management module 241, a battery 242, an antenna 3, an antenna 4 , the wireless communication module 250, the sensor module 260, the input module 270, the output module 280 and so on.
  • USB universal serial bus
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the IoT device 200 .
  • the IoT device 200 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the IoT device 200 may be a smart light, a smart TV, a smart speaker, or the like.
  • Processor 210 may include one or more processing units.
  • the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video Codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc.
  • application processor application processor
  • AP application processor
  • modem processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller a video Codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • NPU neural-network processing unit
  • different processing units may be independent components, or may be integrated in one or more processors.
  • IoT device 200 may also include one or more processors 210 .
  • the controller can generate an operation control signal according to the instruction operation code and the timing signal, and
  • the processor 210 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface, and/or USB interface, etc.
  • the USB interface 230 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 230 can be used to connect a charger to charge the IoT device 200, and can also be used to transmit data between the IoT device 200 and peripheral devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the IoT device 200 .
  • the IoT device 200 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 240 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 240 may receive charging input from the wired charger through the USB interface 230 .
  • the charging management module 240 may receive wireless charging input through the wireless charging coil of the IoT device 200 . While the charging management module 240 is charging the battery 242 , the IoT device 200 can also be powered by the power management module 241 .
  • 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 input 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, and the like.
  • the power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 241 may also be provided in the processor 210 .
  • the power management module 241 and the charging management module 240 may also be provided in the same device.
  • the wireless communication function of the IoT device 200 may be implemented by the antenna 3, the antenna 4, the wireless communication module 250, and the like.
  • the wireless communication module 250 can provide wireless communication solutions including Wi-Fi, Bluetooth (BT), and wireless data transmission modules (eg, 433MHz, 868MHz, 915MHz) applied on the IoT device 200 .
  • the wireless communication module 250 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 250 receives the electromagnetic wave via the antenna 3 or the antenna 4 , filters and frequency modulates the electromagnetic wave signal, and sends the processed signal to the processor 210 .
  • the wireless communication module 250 can also receive the signal to be sent from the processor 210 , perform frequency modulation on it, amplify it, and then convert it into electromagnetic waves and radiate it out through the antenna 3 or the antenna 4 .
  • the IoT device 200 may send a broadcast message through the wireless communication module, and the broadcast message may carry the device identifier or product identifier of the IoT device 200, which is used by 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.
  • the external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the IoT device 200 .
  • the external memory card communicates with the processor 210 through the external memory interface 220 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 221 may be used to store one or more computer programs including instructions.
  • the processor 210 may execute the above-mentioned instructions stored in the internal memory 221, thereby causing the IoT device 200 to execute the automatic unlocking method, various applications and data processing provided in some embodiments of the present application.
  • the internal memory 221 may include a code storage area and a data storage area. Among them, the code storage area can store the operating system.
  • the data storage area may store data and the like created during use of the IoT device 200 .
  • the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 210 may execute the instructions stored in the internal memory 221 and/or the instructions stored in the memory provided in the processor 210 to cause the IoT device 200 to execute the instructions provided in the embodiments of the present application Authentication methods, and other applications and data processing.
  • the input module 270 includes, but is not limited to, a keyboard, a touch screen (which may also be a touch display screen), a mouse, a camera, a laser pointer, a handwriting input pad, a microphone, and the like.
  • the microphone includes a single microphone, and also includes a microphone array.
  • the output module 280 includes, but is not limited to, a display screen, an LED light, a speaker, an earphone, a motor that generates vibration and its auxiliary devices, a heating device that generates heat, and the like.
  • the wireless communication method between the IoT device 100 and the IoT device 200 includes but is not limited to bluetooth low energy BLE, Wi-Fi awareness, ZigBee, etc. Way.
  • the wireless communication methods such as BLE and Wi-Fi aware are based on the interaction of the computer network media access control (medium access control, MAC) layer, also known as the data link layer protocol extension, and do not need to involve the upper layer of the MAC layer.
  • MAC computer network media access control
  • BLE is an ultra-low-power short-range wireless communication scheme for electronic devices launched by the Bluetooth Special Interest Group in 2016, which can communicate through the MAC layer.
  • Wi-Fi Aware Wi-Fi neighborhood aware network, Wi-Fi neighbor discovery network, NAN for short
  • Wi-Fi neighbor discovery network NAN for short
  • Wi-Fi Mesh communication technology which can bypass network infrastructure. (such as an access point (AP) or a cellular network), to achieve one-to-one, one-to-many or many-to-many connection communication between devices, and communication can also be achieved through the MAC layer.
  • this wireless communication method is different from the common Wi-Fi connection or Bluetooth connection.
  • wireless communication methods such as BLE and Wi-Fi aware can directly realize data interaction at the MAC layer of the computer network by sending beacon frames, without involving the network layer higher than the MAC layer in the computer network. data interaction.
  • the inter-device communication through wireless communication methods can not only improve the communication efficiency (the IoT device 100 does not need to complete steps such as Wi-Fi or Bluetooth connection, user identity login verification, etc. with the IoT device 200, no need to involve It can also improve the security of data interaction (data transmission at the MAC layer).
  • FIG. 4 shows the principle structure of a wireless communication module and an antenna provided by an embodiment of the present application.
  • the IoT device 200 may include a processor 210 , a wireless communication module 250 , an antenna 3 and an antenna 4 .
  • the antenna 3 also called a first antenna, such as a strong antenna
  • an antenna 4 also called a second antenna, such as a weak antenna
  • the wireless communication module 250 converts the electromagnetic wave received from the antenna 3 or the antenna 4 into a signal, and sends the signal to the processor 210 for processing; or the wireless communication module 250 receives the signal to be sent from the processor 210, via a strong antenna Or weak antennas turn into electromagnetic waves and radiate out.
  • the first transmission distance (such as 10 meters, 5 meters, etc., which can be set by the user) of the signal transmitted by the strong antenna is greater than the second transmission distance of the signal transmitted by the weak antenna (such as 0.2 meters, 0.3 meters, etc., specifically can be set by the user).
  • the second transmission distance of the signal transmitted by the weak antenna 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 .
  • the preset safe distance is a safe distance for the user of the IoT device 200 to exchange secret information with the IoT device 200 through the IoT device 100 .
  • the preset safety distance may be 50cm, 40cm, 30cm, 20cm, and the like.
  • the secret information sent by the IoT device 200 can be received only when the IoT device 100 is within a range of less than or equal to the preset safe distance from the IoT device 200 .
  • security risks are reduced (eg, 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 approach the IoT device 100 within a preset safe distance of the IoT device 200 only when the surrounding is safe, thereby improving security.
  • the processor 210 may control the switching of strong antennas and weak antennas.
  • the IoT device 100 receives the signal sent by the IoT device 200 only when the distance between the IoT device 100 and the IoT device 200 is less than the first transmission distance; when the IoT device 200 adopts a weak antenna, Only when the distance between the IoT device 100 and the IoT device 200 is smaller than the second transmission distance, the mobile device receives the signal sent by the IoT device 200 .
  • the first emission distance is greater than the preset safety distance
  • the second emission distance is smaller than or equal to the preset safety distance.
  • the first transmission distance and the second transmission distance may be referred to as a first distance and a second distance, respectively.
  • FIG. 5 shows another principle structure of the wireless communication module and the antenna provided by the embodiments of the present application.
  • the IoT device 200 may include a processor 210 , a wireless communication module 250 and an antenna 3 .
  • the wireless communication module 250 includes a wireless module 251 and a variable impedance circuit module 252 .
  • Antenna 3 is used to transmit and receive wireless signals.
  • the variable impedance circuit module 252 may be a circuit composed of variable impedance, an integrated circuit, or the like.
  • the processor 210 controls and adjusts the impedance value of the variable impedance circuit module 252 to adjust the transmission power loaded on the antenna 3, thereby controlling the transmission distance when the antenna 3 transmits wireless signals.
  • the transmission power of the antenna 3 is the first transmission power, and the distance at which the wireless signal is transmitted by the antenna 3 is the first transmission distance (to achieve a strong antenna). function); 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 the distance at which the antenna 3 transmits the wireless signal is the second transmission distance (to realize the function of the weak antenna) ).
  • the first transmit power is greater than the second transmit power; the first transmit distance is greater than a preset safe distance, and the second transmit distance is less than or equal to the preset safe distance.
  • the first transmission distance and the second transmission distance may be referred to as a first distance and a second distance, respectively.
  • other descriptions about the processor 210 and the wireless communication module 250 are the same as those in the example corresponding to FIG. 4 , and are not repeated here.
  • the IoT device 100 may also include the structure of the wireless communication module and the antenna.
  • the IoT device 100 may include a processor 110, a wireless communication module 160, an antenna 2 and an antenna 5 (the antenna 5 is not shown in FIG. 2; the antenna 5 is also connected to the wireless communication module 160).
  • 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 FIG. 4 and FIG. 5 , and will not be repeated here.
  • the IoT device 200 may not have the structure shown in FIG. 4 or FIG. 5
  • the IoT device 100 may have the structure shown in FIG. 4 or FIG. 5 .
  • the principle structures illustrated in one example corresponding to FIG. 4 and another example corresponding to FIG. 5 do not constitute specific limitations on the wireless communication module and the antenna in the IoT device 200 .
  • the structure of the wireless communication module and the antenna in the IoT device 200 may include more or less components than those shown in the figure, or combine some components, or separate some components, or arrange different components .
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the above content is also applicable to the structure of the wireless communication module and the antenna of the IoT device 100 ; details are not repeated here.
  • the above-mentioned strong antenna and weak antenna may share a part of the wiring, for example, as described in the embodiments shown in FIGS. 6-8 .
  • FIGS. 6-8 show three implementations of the strong antenna and the weak antenna in FIG. 4 .
  • the structure of a wireless communication module and an antenna of the IoT device 100 may also adopt the three manners shown in FIGS. 6-8 .
  • the strong antenna and the weak antenna can share a part of the wiring.
  • the strong antenna and the weak antenna in the electronic device in the embodiment of the present application can be switched by a radio frequency switch.
  • both the weak antenna and the radio frequency switch (the weak antenna shown in the dotted box in Figure 6 to Figure 8) can be placed in the shielding case or the weak antenna can be placed in the chip.
  • the purpose of the weak antenna in the embodiment of the present application is to reduce the transmission distance as much as possible.
  • the principle of constructing a weak antenna can be:
  • weak antenna The specific implementation of weak antenna can be used:
  • the above-mentioned shortening of the antenna means that the weak antenna is shorter than the strong antenna.
  • Three kinds of weak antenna structures are shown in FIGS. 6 to 8 , and the weak antenna is shown as the structure in the dotted box in FIGS. 6 to 8 .
  • the structures of the strong antennas in Figures 6 to 8 are connected to a filter circuit (eg, a ⁇ -type circuit), a matching circuit (eg, a ⁇ -type circuit) and a matching circuit through radio frequency input/output (RFIO) pins
  • External antenna body eg, the antenna body may be a length of metal trace.
  • the weak antenna a shown in the dashed box in FIG. 6 , the weak antenna b shown in the dashed box in FIG. 7 , and the weak antenna c shown in the dashed box in FIG. 8 have different lengths, but are shorter than the strong antennas.
  • the function of the filter circuit is to prevent interference, and the matching circuit is used to match the strong antenna.
  • the weak antenna a may be located in the shielding case.
  • the weak antenna a may include the RFIO pin of the Wi-Fi chip in the shield and the first switch of the two switches (the first switch is not connected to any device).
  • the weak antenna a may also include a trace between the RFIO pin and the first switch.
  • the two-way switch refers to the switch between the trace or RFIO pin and the filter circuit. Through the two-way switch, the trace or the RFIO pin can be connected or disconnected from the filter circuit.
  • the first switch is the switch shown in FIG. 6 that is connected to the RFIO pin or trace and disconnected from the filter circuit. It should be understood that the two-way switch in the embodiment of the present application may be a single-pole double-throw switch.
  • the weak antenna b may be located in the shielding case.
  • the weak antenna b may include the RFIO pin of the Wi-Fi chip in the shield, the first switch of the two switches (the first switch is connected to a resistor), and a matching device.
  • the weak antenna b may also include a first trace between the RFIO pin and the first switch.
  • the weak antenna b may also include a second trace between the matching device and the ground.
  • the matching device can be a resistor. Part of the electromagnetic wave radiation can be converted into heat energy and consumed by grounding the resistance, thereby reducing the radiation efficiency of the weak antenna b.
  • the two-way switch refers to the switch between the RFIO pin or the first wiring and the resistor and filter circuit. Through this switch, the RFIO pin or the first wiring can be connected to the resistor and disconnected from the filter circuit. On, or the RFIO pin or the first trace can be disconnected from the resistor and connected to the filter circuit.
  • the first switch is a switch connected to the matching device and disconnected from the filter circuit among the two switches.
  • the weak antenna c may be located in the shield.
  • the filter circuit matched by the chip is followed by a matching device (for example, a resistor) to the ground.
  • the weak antenna c may include the RFIO pin of the Wi-Fi chip in the shield, the filter circuit, the first switch of the two switches (the first switch is connected to a resistor), and a matching device (eg, a resistor).
  • the weak antenna c may also include a first trace between the RFIO pin and the filter circuit.
  • the weak antenna c may further include a second trace between the filter circuit and the matching device.
  • the two-way switch refers to the switch between the filter circuit inside the shield, the matching device, and the matching circuit outside the shield.
  • the first switch is a switch used to connect the filter circuit and the matching device in the shield.
  • the above-mentioned strong antennas in FIGS. 6 to 7 may include RFIO pins, the second switch of the two switches, a filter circuit, a matching circuit, and an antenna body externally connected to the matching circuit.
  • the strong antenna in Figures 6 to 7 may also include a trace between the RFIO pin and the second switch of the two switches.
  • the second switch is a switch used to connect the RFIO pin and the filter circuit.
  • the above-mentioned strong antenna in FIG. 8 may include an RFIO pin, a filter circuit, a second switch of the two switches, a matching circuit, and an antenna body externally connected to the matching circuit.
  • the strong antenna in Figure 8 can also include traces between the RFIO pins and the filter circuit.
  • the second switch is a switch used to connect the filter circuit inside the shield and the matching circuit outside the shield.
  • the wireless communication module 250 shown in FIG. 4 may be a Wi-Fi chip, or may be a Wi-Fi chip and its matching circuit.
  • the wireless module 251 shown in FIG. 5 may be a Wi-Fi chip, and the wireless communication module 250 shown in FIG. 5 may be a Wi-Fi chip and its matching circuit.
  • the above different weak antenna structures, together with the different transmit power (Tx power) settings of the Wi-Fi chip, can meet different ultra-short-range communication requirements (for example, from 10cm to 2m).
  • Table 1 shows the communication distances of different transmit powers when several different first antenna structures cooperate with the Wi-Fi chip.
  • Table 2 shows the communication distances of different transmit powers when several different first antenna structures cooperate with the Bluetooth chip.
  • Table 3 shows the communication distances of different transmit powers when several different first antenna structures cooperate with the ZigBee chip.
  • the difference between the maximum transmit power and the minimum transmit power of the antenna is correlated. If the minimum transmit power of the first device is reduced very low, the maximum transmit power will also be reduced, so that the distance requirement during normal operation cannot be met.
  • manufacturers of smart devices can use different first antenna structures and transmit powers to ensure the communication distance of the smart devices.
  • the thickness of the smart air conditioner shell may be different, so under the condition of the same first antenna structure and the same transmit power, the communication distance at which the smart air conditioner can be discovered may also be different.
  • Different smart device manufacturers can test the safe distance at which the smart device can be discovered according to the structure of the smart device itself, in conjunction with the structure of the first antenna and a certain transmit power.
  • 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, Bluetooth chip, and ZigBee chip in the first device
  • the chip can share the first antenna and the second antenna in the above-mentioned FIG. 6; or, the Wi-Fi chip, the Bluetooth chip and the ZigBee chip in the first device can share the above-mentioned first antenna and the second antenna in FIG. 7; or,
  • the Wi-Fi chip, the Bluetooth chip, and the ZigBee chip in the first device may share the first antenna and the second antenna in FIG. 8 above.
  • 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.
  • FIGS. 6 to 8 are the physical first antenna and the second antenna, and the first device can switch the physical first antenna and the second antenna through the radio frequency switch.
  • the first device may also have only one antenna physically, but logically includes a first antenna and a second antenna.
  • the first device may implement the logical first antenna and the second antenna by adjusting the transmit power of the physical antenna.
  • the transmit power of the physical antenna when the transmit power of the physical antenna is the first transmit power, it can be regarded as the first logical antenna; when the transmit power of the physical antenna is the second transmit power, it can be regarded as the second logical antenna an antenna; wherein the first transmit power is smaller than the second transmit power.
  • the first device can adjust the transmit power of the physical antenna by adjusting the device inside the chip.
  • the first device may adjust the transmit power of the physical antenna through a multi-stage amplifier inside the chip.
  • the first device can shield the multi-stage amplifier inside the chip by adjusting the value of the register, so that the transmit power of the physical antenna is the first transmit power, which can be regarded as the logical first antenna at this time; the first device It is also possible to adjust the value of the register so that the transmit power of the physical antenna is the second transmit power, which can be considered as the logical second antenna at this time; wherein, the first transmit power is smaller than the second transmit power.
  • the first device can also adjust the transmit power of the physical antenna through a peripheral circuit outside the chip.
  • the first antenna and the second antenna involved in the various embodiments of the present application may be the physical first antenna and the second antenna, or may be the logical first antenna and the second antenna.
  • the first device switching the logical first antenna and the second antenna can achieve the same effect as the first device switching the physical first antenna and the second antenna through a radio frequency switch.
  • the first distance as 5 meters and the second distance as 0.3 meters as an example.
  • the IoT device 200 adopts the first antenna, if the distance between the IoT device 200 (located at the center of the circle shown in FIG. 9 ) and the IoT device 100 is smaller than the first distance (eg, the IoT device 100 is located at position 1 shown in FIG.
  • the IoT device 200 can communicate with the IoT device 100; when the IoT device 200 adopts the second antenna, if the distance between the IoT device 200 (located at the center of the circle shown in FIG. 9 ) and the IoT device 100 is smaller than the second distance (such as the IoT device 100 At position 2) shown in FIG. 9 , IoT device 200 can communicate with IoT device 100 .
  • the antenna of the IoT device 200 when the antenna of the IoT device 200 is set to the first transmit power, if the distance between the IoT device 200 (located at the center of the circle shown in FIG. 9 ) and the IoT device 100 is smaller than the first distance (eg, the IoT device 100 is located in FIG. Position 1) shown, IoT device 200 can communicate with IoT device 100; when the antenna of IoT device 200 is set to the second transmit power, if IoT device 200 (located at the center of the circle shown in FIG. 9 ) and IoT device 100 The distance is less than the second distance (eg, the IoT device 100 is located at position 2 shown in FIG. 9 ), the IoT device 200 can communicate with the IoT device 100 .
  • the accuracy of the first distance and the second distance will not be so accurate, 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 transmit power, differences in the first distance and differences in the second distance may occur.
  • IoT device 100 and the IoT device 200 are used as examples to describe the application scenario, in fact, in the above application scenario, there may also be Other IoT devices, such as IoT device 400, etc.; the number of other IoT devices is not limited here.
  • IoT device 400 please refer to the relevant description of the IoT device 100 or the IoT device 200 . It will not be repeated here.
  • Embodiment 1 to Embodiment 3 of the IoT device setting method provided by the embodiments of the present application will be described in detail with reference to FIG. 10 to FIG. 24 .
  • Embodiment 1 relates to FIGS. 10-14 .
  • 10 to 13 illustrate a communication interaction process of setting an IoT device to join a group in the IoT device setting method provided by the embodiment of the present application.
  • Figure 14 shows the corresponding demonstration schematic.
  • the IoT device 100 is located in the first group, and the group ID of the first group is the first group ID.
  • Figures 10-13 respectively show the flow of four different implementations under the embodiment. The detailed description is given below with reference to FIGS. 10-13 .
  • 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 antenna distance, wherein the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.
  • the method for setting IoT devices to join a group may include:
  • S701a broadcast a first message through the first antenna of the IoT device 100, where the first message includes information on soliciting group members and the MAC address of the IoT device 100.
  • the IoT device 100 receives an input to trigger the execution of S701a; the input can be a user input, for example, the IoT device 100 receives a touch input or voice input; the input can also be other smart devices message or instruction sent.
  • a group enter button is provided on the IoT device 100, and when the user presses the group enter button, the IoT device 100 is triggered to execute S701a; for another example, long pressing the power button of the IoT device 100 for more than 5 seconds triggers the IoT device 100 to execute S701a; For example, open the APP that remotely controls the IoT device 100 on the 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.
  • the input triggering the IoT device 100 to execute S701a further includes information of selecting groups in which one or more IoT devices 100 are located.
  • fixture A is located in the living room fixture group and the yellow light fixture group.
  • the APP for remote control of smart lighting on the mobile device, use the mobile device to remotely connect to lighting A, select the living room lighting group by operating the APP, and trigger lighting A to execute S701a for the living room lighting group .
  • the IoT device 100 may adopt various feasible communication protocols to implement broadcasting of the first message.
  • broadcast packets carry the real device address; in other communication protocol settings, broadcast packets do not carry the real device address.
  • the broadcast data packet in the Bluetooth low energy (bluetooth low energy) communication protocol, 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, it can be directly addressed to the Bluetooth device; the broadcast data packet can also carry a random device address (random device address). The random device address is not the real address of the Bluetooth device, and the Bluetooth device cannot be directly addressed based on the random device address.
  • the message content of the first message includes the real device address of the IoT device 100, for example, the MAC address.
  • the message content of the first message does not need to include the real device address of the IoT device 100, and directly uses the real device address carried in the message structure of the first message. Device address.
  • the IoT device 200 receives the first message within the transmission distance of the first antenna of the IoT device 100, and acquires the information of soliciting group members and the MAC address of the IoT device 100.
  • the IoT device 200 sends a first response message to the IoT device 100, where the first response message includes the information of willingness to join the group and the MAC address of the IoT device 200.
  • the IoT device 200 may also adopt a variety of feasible communication protocols to implement sending the first response message to the IoT device 100, which will not be repeated here.
  • the IoT device 100 receives the first response message, and obtains the information of willingness to join the group and the MAC address of the IoT device 200.
  • the IoT device 100 sends a second message to the IoT device 200 through the second antenna of the IoT device 100, where the second message includes a first group ID, and the first group ID is the group ID where the IoT device 100 is located.
  • the IoT device 100 includes a memory; the memory stores group information such as a group ID of a group to which the IoT device 100 belongs.
  • the IoT device 100 directly calls the first group ID stored in the memory to generate the second message.
  • 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 (eg, the IoT server 300, or a mobile device connected to the IoT server 300).
  • the IoT device 100 obtains the first group ID from other devices (eg, the IoT server 300, or a mobile device connected to the IoT server 300).
  • the IoT device 100 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, and the group ID acquisition request includes the device identifier of the IoT device 100 and the information requested to acquire the group ID.
  • the IoT server 300 After receiving the group ID acquisition request, the IoT server 300 searches for a 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 .
  • the IoT server 300 When the IoT server 300 cannot search for the corresponding group ID according to the device identification of the IoT device 100, the IoT server 300 creates a new group for the IoT device 100 (creates the first group), and generates a new group ID (creates the first group). a group ID).
  • 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.
  • the APP that remotely controls 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 identification 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.
  • the IoT device 200 receives the second message within the transmission distance of the second antenna of the IoT device 100, and acquires the first group ID.
  • the second antenna is a weak antenna, the transmission distance of the second antenna is short. Therefore, the second message can only be received when the IoT device 200 is close to the IoT device 100 . Therefore, the IoT device 100 sends the second message through the second antenna in S705a, which can effectively prevent the second message from being acquired by other devices, thereby greatly improving data security.
  • the IoT device 200 determines whether the IoT device 200 has joined the first group corresponding to the first group ID.
  • the IoT device 200 may have joined the first group of the IoT device 100 before S706a.
  • the IoT device 200 moves away from the IoT device 100 and approaches again, resulting in the execution of S702a, S703a, S704a, S705a and S706a again.
  • Joining a group operation is bound to cause a 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 subsequent group join operations, thereby avoiding repeated group join operations and waste of processing resources.
  • the IoT device 200 sends a group join message to the IoT server 300, where the group join message includes the first group ID and the device identifier of the IoT device 200 (Device ID).
  • Device ID can uniquely identify IoT devices.
  • the IoT server 300 receives the group join message, and obtains the first group ID and the Device ID of the IoT device 200.
  • the IoT server 300 determines whether the attribute corresponding to the IoT device 200 matches the attribute corresponding to the first group.
  • the IoT device 200 may not be the correct device that can join the first group.
  • light fixture A IoT device 100
  • the IoT server 300 continues to perform the operation of adding a group to add the light fixture C to the living room light fixture group, a setting error will occur. Therefore, after S710a, if the attribute corresponding to the IoT device 200 does not match the attribute corresponding to the first group, the IoT device 200 cannot join the first group, which can effectively avoid group setting errors.
  • 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 of the mobile device.
  • the fixture C was originally located in the bedroom fixture group, and the above reset method can be used to reset the fixture C to not belong to any group.
  • the attribute corresponding to the group may be an attribute in any form.
  • the attribute corresponding to the group can be one or more device function attributes (for example, lighting equipment, switch equipment), or one or more scene attributes (for example, living room equipment, bedroom equipment), and can also be manually marked by the user properties (for example, a device marked by the user as requiring priority control).
  • Devices in the same group have the same attributes corresponding to the group, but it does not mean that the devices in the same group must be of the same model.
  • fixture A (IoT device 100 ) is installed in a living room, the device function attribute of fixture A is fixture, and the location property of fixture A is living room.
  • the light fixture A is located in the living room light fixture group (the first group), and the group attributes of the living room light fixture group are light fixtures and living room.
  • the user wishes to install the light fixture B in the living room, the device function attribute of the light fixture B is light fixture, and the location property of the light fixture B is the living room.
  • the user triggers the fixture A to execute S701a. After that, the user brings the fixture B close to the fixture A, resulting in the execution of S701a-S709a (the fixture B acts as the IoT device 200).
  • the IoT server 300 determines that the device function attribute (lamp) and location attribute (living room) of the fixture B match the group attributes (lamp and living room) of the living room fixture group. Therefore, fixture B can be added to the living room fixture group.
  • lamp A (IoT device 100 ) is installed in a living room, the device function attribute of lamp A is lamp, and the location attribute of lamp A is living room.
  • Lamp A is located in the living room equipment group (the first group), and the group attribute of the living room equipment group is living room.
  • the user wants to place the smart speaker C in the living room, the device function attribute of the smart speaker C is the speaker, and the location attribute of the smart speaker C is the living room.
  • the user triggers the fixture A to execute S701a. After that, the user brings the smart speaker C close to the light fixture A, resulting in the execution of S701a-S709a (the smart speaker C acts as the IoT device 200).
  • the IoT server 300 determines that the location attribute (living room) of the smart speaker C matches the group attribute (living room) of the living room device group. Therefore, even if the smart speaker C and the lamp A are devices with completely different functions, the smart speaker C can also be added to the living room equipment group.
  • the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 matches the attribute corresponding to the first group, the IoT server 300 sends a first feedback message to the IoT device 200, and the first feedback message includes the information of successful joining.
  • the IoT server 300 further records that the IoT device 200 joins the first group (for example, writes the Device ID of the IoT device 200 into the device list of the first group).
  • the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 does not match the attribute corresponding to the first group, the IoT server 300 sends a second feedback message to the IoT device 200, and the second feedback message includes the information of the joining failure and reasons.
  • the IoT device 200 receives the first feedback message or the second feedback message.
  • the IoT device 200 sends a notification message to the IoT device 100 to notify the IoT device 100 of the result of the operation of joining the group.
  • the notification 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;
  • the notification 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.
  • the IoT device 100 may not be notified of the result of the operation of joining the group through the IoT device 200 .
  • the IoT server 300 notifies the IoT device 100 of the result of the operation of joining the group. In this way, the IoT device 200 may not execute S714a.
  • the group join message further includes the MAC address of the IoT device 100.
  • the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 matches the attribute corresponding to the first group, the IoT server 300 records that the IoT device 200 joins the first group, and the IoT server 300 sends a message to the first group based on the MAC address of the IoT device 100.
  • the IoT device 100 sends a third feedback message, where the third feedback message includes information that the IoT device 200 has successfully joined the group.
  • the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 does not match the attribute corresponding to the first group, the IoT server 300 sends a fourth feedback message to the IoT device 100 based on the MAC address of the IoT device 100.
  • the fourth feedback message Including the information and reasons for the failure of the IoT device 200 to join the group.
  • 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 antenna distance, wherein the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
  • the method for setting an IoT device to join a group may include:
  • S701b Broadcast a first message, where the first message includes information about recruiting group members and the MAC address of the IoT device 100.
  • the IoT device 100 also receives an input to trigger the execution of S701a; and, in S701b, the IoT device 100 can also adopt a variety of feasible communication protocols to broadcast the first message. , and will not be repeated here.
  • the IoT device 200 receives the first message, and acquires the information of the group member solicitation and the MAC address of the IoT device 100.
  • the IoT device 200 randomly generates a first key.
  • the first key is used for data interaction between the IoT device 100 and the IoT device 200 after encryption.
  • the generation of the first key and the specific implementation of encryption using the first key in subsequent steps are not limited, and a variety of different key schemes can be used to realize the generation of the first key and the encryption of the first key.
  • the first key is used for encryption in a later step.
  • the IoT device 200 sends a first response message to the IoT device 100 through the fourth antenna of the IoT device 200, where the first response message includes the information of willingness to join the group, the first key, and the MAC address of the IoT device 200.
  • the IoT device 200 may use multiple feasible communication protocols to implement sending the first response message to the IoT device 100, which will not be repeated here.
  • the IoT device 100 can receive the first response message only when the IoT device 200 is close to the IoT device 100. In this way, the first response message can be effectively prevented from being acquired by other devices.
  • the IoT device 100 receives the first response message within the transmission distance of the fourth antenna of the IoT device 200, and obtains the information of willingness to join the group, the first key, and the MAC address of the IoT device 200;
  • the key encrypts 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.
  • S705b the specific manner in which the IoT device 100 obtains the first group ID may refer to S705a, which will not be repeated here.
  • the IoT device 100 sends a second message to the IoT device 200, where the second message includes the first information.
  • the IoT device 200 receives the second message and obtains the first information; decrypts the first information by using the first key, and obtains the first group ID.
  • S708b-S715b they are the same as S707a-S714a respectively, please refer to S707a-S714a; details are not repeated here.
  • a unified introduction is made at the end of the first 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 the first distance, and the transmission distance of the second antenna is the second antenna distance.
  • 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 the third distance, and the transmission distance of the fourth antenna is the fourth distance.
  • the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
  • the method for setting an IoT device to join a group may include:
  • the IoT device 100 broadcasts a first message through the second antenna of the IoT device 100, where the first message includes the information of soliciting group members and the MAC address of the IoT device 100.
  • the IoT device 100 also receives an input to trigger the execution of S701a; and, in S701c, the IoT device 100 can also adopt a variety of feasible communication protocols to realize broadcasting the first message. , and will not be repeated here.
  • the second antenna is a weak antenna, the transmission distance of the second antenna is very short. Therefore, the first message can only be received when the IoT device 200 is close to the IoT device 100 . Therefore, it is possible to effectively prevent the first message from being acquired by other devices.
  • the IoT device 200 receives the first message within the transmission distance of the second antenna of the IoT device 100, and acquires the information of soliciting group members and the MAC address of the IoT device 100.
  • S703c-S705c they are the same as S703b-S705b respectively, please refer to S703b-S705b; details are not repeated here.
  • the IoT device 100 sends a second message to the IoT device 200 through the first antenna of the IoT device 100, where the second message includes the first information.
  • the IoT device 100 may also send the second message to the IoT device 200 through the second antenna of the IoT device 100.
  • the IoT device 200 receives the second message within the transmission distance of the first antenna of the IoT device 100, and obtains the first information; decrypts the first information with the first key, and obtains the first group ID.
  • S708c-S715c They are the same as S707a-S714a respectively, please refer to S707a-S714a; details are not repeated here.
  • the IoT device 100 has a first antenna, and the transmission distance of the first antenna under the first transmission power is the first distance; the transmission distance of the first antenna under the second transmission power is the second distance distance; the first transmission power is greater than the second transmission power, and the second distance is smaller than the first distance.
  • the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving the same technical effect as the implementation shown in FIG. 10 .
  • the method for setting an IoT device to join a group may include:
  • S701d-S714d Please refer to the description of S701a-S714a; the only difference is that in S701d-S714d, "the first antenna under the first transmit power” and “the first antenna under the second transmit power” are respectively replaced “First Antenna” and "Second Antenna” in S701a-S714a.
  • the method of changing the transmission distance by switching the transmission power of the antenna can also be used instead of switching the antenna. to change the launch distance method to obtain a new implementation.
  • the one-by-one description will not be expanded. New implementations are also within the scope of this application.
  • FIG. 14 is a schematic diagram illustrating a demonstration of setting an IoT device to join a group in the IoT device setting method provided by this embodiment of the present application.
  • the IoT device 200 and the IoT device 100 can be located in the same group ( the first group).
  • the first group For users, it is easy to operate, does not require users to spend more time, and does not require users to have a better understanding of each IoT device, which greatly facilitates users.
  • FIGS. 15-19 show schematic diagrams of communication interaction for setting an IoT device control relationship in the IoT device setting method provided by the embodiment of the present application.
  • Figure 19 shows the corresponding demonstration schematic.
  • Figures 15-18 respectively show the flow of four different implementations under the second embodiment. The detailed description will be given below with reference to FIGS. 15-18 .
  • 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 antenna distance.
  • the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.
  • the method for setting the IoT device control relationship may include:
  • S901a-S902a Referring to S701a-S702a, it can be known that in S901a-S902a, the information on soliciting group members in S701a-S702a is replaced with information on which a control relationship can be set. The information that the control relationship can be set is used to indicate that the IoT device 100 is willing to set the control relationship with other devices.
  • S903a-S904a Referring to S703a-S704a, it can be known that in S903a-S904a, the information of willingness to join the group in S703a-S704a is replaced with the information of willingness to set a control relationship. The information of willingness to set up the control relationship is used to indicate that the IoT device 200 is willing to set up the control relationship with the IoT device 100 .
  • S905a-S906a Referring to S705a-S706a, S905a-S906a differs from S705a-S706a only in that: in S905a, the second message includes the first Device ID, and the first Device ID is the Device ID of the IoT device 100; In S906a, the IoT device 200 obtains the first Device ID.
  • 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, so the IoT device 100 in S905a Sending the second message through the second antenna can effectively prevent the second message from being acquired by other devices, thereby greatly improving data security.
  • 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.
  • 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 already set the control relationship with the IoT device corresponding to the first Device ID, there is no need to perform the subsequent operation of setting the control relationship, thereby avoiding the waste of processing resources.
  • the IoT device 200 If the IoT device 200 has not yet set a control relationship with the IoT device corresponding to the first Device ID, the IoT device 200 sends a set control relationship message to the IoT server 300.
  • the set control relationship message includes the first Device ID and the second Device ID, and the second Device ID.
  • the Device ID is the Device ID of the IoT device 200.
  • the IoT server 300 receives the setting control relationship message, and obtains the first Device ID and the second Device ID.
  • 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.
  • the control relationship between the IoT device 200 and the IoT device 100 may not be properly set.
  • a control relationship is set between the switch B and the light fixture A (the switch B controls the light fixture A).
  • the control relationship cannot be set between the light fixture C and the light fixture A (there is no control/controlled relationship between the light fixture C and the light fixture A). If the control relationship is forcibly set, it will lead to The control relationship is set incorrectly.
  • control relationship attribute is used to describe what kind of device the current device can control, and what kind of device the current device can control.
  • control relationship attribute of switch B can be described as: it can output the first control signal (on signal) and the second control signal (off signal);
  • control relationship attribute of lamp A can be described as: it can accept the third control signal (corresponding to turn on the light) and the fourth control signal (corresponding to turn off the light).
  • the first control signal and the second control signal can match with the third control signal and the fourth control signal, so the control relationship attribute of switch B and the control relationship attribute of lamp A match each other.
  • control relationship attribute of switch B can be described as: it can output a first control signal (turn-on signal) and a second control signal (turn-off signal);
  • control relationship attribute of lamp A can be described as: it can accept a third control signal ( Corresponding to yellow light), the fourth control signal (corresponding to white light) and the fifth control signal (corresponding to turn off the light).
  • the first control signal and the second control signal cannot match with the third control signal, the fourth control signal and the fifth control signal. Therefore, the control relationship attribute of switch B and the control relationship attribute of lamp A do not match each other.
  • control relationship attribute of the button D can be described as: the first control signal can be output (the first control signal is output every time the button D is pressed); the control relationship attribute of the lamp A can be described as: the second control signal can be accepted (every time the second control signal is received, a switch is performed between yellow light, white light and light off).
  • the first control signal and the second control signal may match and correspond to each other, so the control relationship attribute of switch B and the control relationship attribute of lamp A match each other.
  • the IoT server 300 determines in S910a that the control relationship attribute corresponding to the IoT device 200 matches the control relationship attribute 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 setting success Information.
  • the IoT server 300 further records the control relationship between the IoT device 200 and the IoT device 100.
  • the Device ID of the IoT device 200 is written into the control object list of the IoT device 100, or the Device ID of the IoT device 200 is written into the authorized control device list of the IoT device 100.
  • the IoT server 300 determines in S910a that the control relationship attribute corresponding to the IoT device 200 does not match the control relationship attribute 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 setting The information and reason for the failure.
  • the IoT device 200 receives the first feedback message or the second feedback message.
  • the IoT device 200 sends a notification message to the IoT device 100 to notify the IoT device 100 of the result of setting the control relationship.
  • S913a-S914a they are the same as S713a-S714a respectively, please refer to S713a-S714a; no further description is given here.
  • 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 antenna distance.
  • the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
  • the method for setting the IoT device control relationship may include:
  • S901b-S902b Referring to S701b-S702b, it can be known that S901b-S902b replaces the information of soliciting group members in S701b-S702b with information that can set a control relationship.
  • S903b-S904b Referring to S703b-S704b, S903b-S904b replaces the information of willingness to join the group with the information of willingness to set a control relationship.
  • the IoT device 100 can receive the first response message only when the IoT device 200 is close to the IoT device 100, so the first response message can be effectively prevented from being acquired by other devices .
  • the IoT device 100 receives the first response message within the transmission distance of the fourth antenna of the IoT device 200, and obtains the information of the willingness to set the control relationship, the first key and the MAC address of the IoT device 200; using the first response message
  • the key encrypts the first Device ID to obtain the first information; the first Device ID is the Device ID of the IoT device 100.
  • the IoT device 100 sends a second message to the IoT device 200, where the second message includes the first information.
  • the IoT device 200 receives the second message, and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
  • S908b-S915b the same as S907a-S914a respectively, please refer to S907a-S914a; details are not repeated here.
  • 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 antenna distance.
  • 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 the third distance, and the transmission distance of the fourth antenna is the fourth distance.
  • the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
  • the method for setting an IoT device to join a group may include:
  • S901c-S902c Referring to S701c-S702c, S901c-S902c replaces the information of soliciting group members in S701c-S702c with information that can set a control relationship.
  • 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, so the first message can be effectively avoided. Obtained from other devices.
  • S903c-S905c they are the same as S903b-S905b respectively, please refer to S903b-S905b; details are not repeated here.
  • S906c same as S706c, please refer to S706c; details are not repeated here.
  • the IoT device 200 receives the second message within the transmission distance of the first antenna of the IoT device 100, and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
  • S908c-S915c They are the same as S907a-S914a respectively, please refer to S907a-S914a; details are not repeated here.
  • the embodiment shown in FIG. 17 is the safest, and can effectively prevent the attacking device from being simulated as IoT device 100 or IoT device 200 .
  • the IoT device 100 has a first antenna, and the transmission distance of the first antenna under the first transmission power is the first distance; the transmission distance of the first antenna under the second transmission power is the second distance distance; the first transmission power is greater than the second transmission power, and the second distance is smaller than the first distance. Similar to the embodiment shown in FIG. 13 , in the embodiment shown in FIG. 18 , the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving the same technical effect as the embodiment shown in FIG. 15 . .
  • the method for setting an IoT device to join a group may include:
  • S901d-S914d Please refer to the descriptions of S901a-S914a; the only difference is that in S901d-S914d, "the first antenna under the first transmit power” and “the first antenna under the second transmit power” are respectively replaced “First Antenna” and "Second Antenna” in S901a-S914a.
  • the method of changing the transmission distance by switching the transmission power of the antenna can also be used instead of switching the antenna. to change the launch distance method to obtain a new implementation.
  • the one-by-one description will not be expanded. New implementations are also within the scope of this application.
  • FIG. 19 is a schematic diagram illustrating the setting of the IoT device control relationship in the IoT device setting method provided by the embodiment of the present application.
  • the IoT device 100 and the IoT device 200 are brought close to each other, that is, after touching, as shown in FIG. 19( b ), the IoT device 100 can control the IoT device 200 .
  • the IoT device 100 and the IoT device 200 may also be close to each other, that is, the IoT device 200 can control the IoT device 100 after touching each other.
  • the operation is simple, the user does not need to spend a lot of time, and the user does not need to have a better understanding of each IoT device, which greatly facilitates the user.
  • FIGS. 20-24 show schematic diagrams of communication interactions for setting a function replication relationship of an IoT device in the IoT device setting method provided by an embodiment of the present application.
  • Figure 24 shows the corresponding demonstration schematic.
  • Figures 20-23 respectively show the flow of four different implementations under the third embodiment. The detailed description will be given below with reference to FIGS. 20-23 .
  • 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 antenna distance, wherein the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.
  • the method for setting the function replication relationship of the IoT device may include:
  • S1101a-S1102a Referring to S701a-S702a, the difference between S1101a-S1102a and S701a-S702a is that S1101a-S1102a replaces the information of soliciting group members in S701a-S702a with information that can set a function replication relationship.
  • the information of the settable function replication relationship is used to indicate that the IoT device 100 can replicate functions by other devices.
  • S1103a-S1104a Referring to S703a-S704a, S1103a-S1104a differs from S703a-S704a only in that S1103a-S1104a replaces the information of willingness to join the group in S703a-S704a with the information of willingness to set the function replication relationship.
  • the information of willingness to set the function duplication relationship is used to indicate that the IoT device 200 is willing to duplicate the function of the IoT device 100 .
  • S1105a-S1106a Referring to S705a-S706a, S1105a-S1106a differs from S705a-S706a only in 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.
  • the second antenna is a weak antenna, the transmission distance of the second antenna is very short, and the second message can only be received when the IoT device 200 is close to the IoT device 100. Therefore, the IoT device 100 passes through in S1105a.
  • the second antenna sends the second message, which can effectively prevent the second message from being acquired by other devices, thereby greatly improving data security.
  • the IoT device 200 determines whether the IoT device 200 has already installed the function of the IoT device 100.
  • the IoT device 200 may have been provided with the functions of the IoT device 100. For example, after the IoT device 200 approaches the IoT device 100 and sets the function replication relationship, the IoT device 200 moves away from the IoT device 100 and approaches again, resulting in the re-execution of S1102a-S1106a. At this time, if the function replication relationship continues to be set repeatedly, it will inevitably cause processing resources of waste. Therefore, after S1107a, if the IoT device 200 has already been set with the function of the IoT device 100, there is no need to perform a subsequent operation of setting the function copy relationship, thereby avoiding waste of processing resources.
  • the IoT device 200 sends a function copy relationship setting message to the IoT server 300, where the function copy relationship setting message includes the first Device ID and the second Device ID, and the second Device ID is Device ID of the IoT device 200.
  • the IoT server 300 receives the setting function replication relationship message, and obtains the first Device ID and the second Device ID.
  • the IoT server 300 determines whether the function attribute corresponding to the IoT device 200 matches the function attribute corresponding to the IoT device 100.
  • the function replication relationship may not be set correctly between the IoT device 200 and the IoT device 100 .
  • the function of the light fixture A (IoT device 100 ) is to accept the control of the switch C.
  • the light fixture B acts as the IoT device 200 close to the light fixture A
  • the light fixture B replicates the function of the light fixture A
  • the function of the light fixture B is to accept the control of the switch C.
  • switch D as an IoT device 200
  • switch D cannot copy the function of fixture A, which is a controlled device. If the function is forcibly copied, the function setting will be wrong.
  • the function of the light fixture A is to switch between white light, yellow light, and light off under the control of button C.
  • a control signal will be output, and the light fixture A will switch states each time it receives the control signal of the button C.
  • Lamp B only has two states: off and on, and lamp B does not switch between the two states based on an input signal, but switches to the state based on the recognition of the input signal (when the input signal is the light-on signal. Turn on the light, turn off the light when the input signal is the light off signal).
  • fixture B replicates the function of fixture A. Since fixture B's input control settings are not consistent with fixture A, button C cannot directly control fixture B in practical applications, so fixture B cannot be copied correctly. Lamp A function.
  • the function attribute referred to in S1110a is an attribute related to the function of the device.
  • the control input settings of the equipment for example, the output item settings of switches, the number of output items, the output format, etc.
  • the control input settings of the equipment for example, the input item settings of lamps, input item identification settings, etc.
  • the IoT server 300 After the IoT server 300 determines in S1110a that the function attribute corresponding to the IoT device 200 matches the function attribute 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 that the setting is successful .
  • the IoT server 300 further records the function replication relationship between the IoT device 200 and the IoT device 100.
  • the controlled object list/controlled object list of the IoT device 100 is copied.
  • a control object list/controlled object list is created for the IoT device 200.
  • the control object list/controlled object list of the IoT device 100 is used to overwrite the original control object list/controlled object list of the IoT device 200.
  • the controlled object/controlled object of the IoT device 100 is added to the controlled object list/controlled object list of the IoT device 200.
  • the IoT server 300 determines in S1110a that the function attribute corresponding to the IoT device 200 does not match the function attribute 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 setting failure information and why.
  • the IoT device 200 receives the first feedback message or the second feedback message.
  • the IoT device 200 sends a notification message to the IoT device 100 to notify the IoT device 100 of the result of setting the function replication relationship.
  • S1113a-S1114a are the same as or similar to S713a-S714a respectively, please refer to S713a-S714a; details are not repeated here.
  • 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 antenna distance.
  • the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
  • the method for setting the function replication relationship of the IoT device may include:
  • S1101b-S1102b Referring to S701b-S702b, S1101b-S1102b differs from S701b-S702b only in that the information on soliciting group members in S701b-S702b is replaced with information that can set a function replication relationship.
  • S1103b-S1104b Referring to S703b-S704b, S1103b-S1104b differs from S703b-S704b only in that the information of willingness to join the group in S701b-S702b is replaced with the information of willingness to set the function replication relationship.
  • the IoT device 100 can receive the first response message only when the IoT device 200 is close to the IoT device 100, so the first response message can be effectively prevented from being acquired by other devices .
  • the IoT device 100 receives the first response message within the transmission distance of the fourth antenna of the IoT device 200, and obtains the information that is willing to set the function replication relationship, the first key and the MAC address of the IoT device 200; A key encrypts the first Device ID to obtain the first information; the first Device ID is the Device ID of the IoT device 100.
  • the IoT device 100 sends a second message to the IoT device 200, where the second message includes the first information.
  • the IoT device 200 receives the second message and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
  • S1108b-S1115b the same as S1107a-S1114a respectively, please refer to S1107a-S1114a; details are not repeated here.
  • 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 antenna distance.
  • 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 the third distance, and the transmission distance of the fourth antenna is the fourth distance.
  • the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
  • the method for setting an IoT device to join a group may include:
  • S1101c-S1102c Referring to S701c-S702c, S1101c-S1102c differs from S701c-S702c only in that the information on soliciting group members in S701c-S702c is replaced with information that can set a function replication relationship.
  • 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, so the first message can be effectively avoided. acquired by other devices.
  • S1103c-S1105c they are the same as S1103b-S1105b respectively, please refer to S1103b-S1105b; details are not repeated here.
  • S1106c same as S706c, please refer to S706c; details are not repeated here.
  • the IoT device 200 receives the second message within the transmission distance of the first antenna of the IoT device 100, and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
  • S1108c-S1115c they are the same as S1107a-S1114a respectively, please refer to S1107a-S1114a; details are not repeated here.
  • the IoT device 100 has a first antenna, and the transmission distance of the first antenna under the first transmission power is the first distance; the transmission distance of the first antenna under the second transmission power is the second distance distance.
  • the first transmit power is greater than the second transmit power, and the second distance is less than the first distance.
  • the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving the same technical effect as the embodiment shown in FIG. 20 . .
  • the method for setting an IoT device to join a group may include:
  • S1101d-S1114d Please refer to the descriptions of S1101a-S1114a; the only difference is that in S1101d-S1114d, "the first antenna under the first transmit power” and “the first antenna under the second transmit power” are respectively replaced “First Antenna” and "Second Antenna” in S901a-S914a.
  • the method of changing the transmission distance by switching the transmission power of the antenna can also be used instead of switching the antenna. to change the launch distance method to obtain a new implementation.
  • the one-by-one description will not be expanded. New implementations are also within the scope of this application.
  • FIG. 24 is a schematic diagram illustrating the setting of a function replication relationship of an IoT device in the IoT device setting method provided by the embodiment of the present application.
  • the IoT device 100 controls the IoT device 400, and the IoT device 200 and the IoT device 100 come close to each other, that is, after touching, as shown in (b) of FIG. 24 , the IoT device 100 and the IoT device 200 can control the IoT device 400.
  • the operation is simple, the user does not need to spend a lot of time, and the user does not need to have a better understanding of each IoT device, which greatly facilitates the user.
  • Wi-Fi aware is a preferred way to realize data interaction between the IoT device 100 and the IoT device 200 .
  • the maintenance work of the NAN mechanism and the service discovery work are carried out in the discovery window (discovery window, DW) agreed by the NAN mechanism, and the service discovery is realized by sending a service discovery frame (service discovery frame, SDF) message.
  • 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 the SDF message is.
  • the types of the SDF message include: a Publish message, which is used for publishing the services that the NAN device can provide, or for replying Received other NANs; subscribe (Subscribe) message, which is used to find the service that needs to be used; Reply (Follow-Up) message, which is used to reply to the received SDF Publish message, or used to negotiate more information.
  • FIG. 25 is a schematic diagram of communication interaction between a first IoT device and a second IoT device using the Wi-Fi protocol in the IoT device setting method provided by the embodiment of the present application.
  • the first message is broadcast to the IoT device 200 (for example, at S701a, S701b, S701c, S701d, S901a, S901b, S901c, S901d, S1101a, S1101b, In S1101c and S1101d, when the IoT device 100 broadcasts the first message), the IoT device 100 publishes the first message based on the NAN SDF Publish message.
  • IoT device 100 interacts with IoT device 200 for the first time (eg, in S701a, S701b, S701c, S701d, S901a, S901b, S901c, S901d, S1101a, S1101b, S1101c, S1101d, steps after IoT device 100 ), the IoT device 100 and the IoT device 200 perform data interaction based on the NAN SDF Follow-up message.
  • the embodiments of the present application provide an IoT device setting method and an IoT device, which can conveniently and quickly complete the IoT device setting, reduce overall time-consuming, simplify operations, improve efficiency, and improve user experience.
  • the automatic printing method provided in the embodiment of the present application is applicable to the following IoT devices.
  • FIG. 26 is a schematic structural diagram of an IoT device provided by this application.
  • an IoT device includes at least one processor, memory, and a wireless communication module.
  • the processor is coupled with the memory and the wireless communication module, and the coupling in this embodiment of the present application may be a communication connection, an electrical connection, or other forms.
  • the memory is used to store program instructions.
  • the wireless communication module is used to establish a wireless connection.
  • the processor is configured 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 in the embodiment of the present application. It should be understood that the IoT device can be used to implement the IoT device setting method provided by the embodiments of the present application, and the relevant features can be referred to above, which will not be repeated here.
  • the present application provides a computer program product including instructions, which, when the computer program product runs on an IoT device, 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.
  • the present application provides a computer-readable storage medium, including instructions, which, when the instructions are executed on an IoT device, cause the IoT device to perform the steps performed by the IoT device in the IoT device setting method provided by the embodiments of the present application.
  • the embodiments of the present application may be implemented in hardware, or in a manner of hardware and software.
  • the above-described functions can be stored in a computer-readable medium.
  • the medium includes several instructions for causing a computer device (which may 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.
  • the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The present application relates to an IoT device configuration method and an IoT device. The IoT device communicates with an IoT server. The IoT device comprises a processor; a first antenna, the transmitting distance of which is greater than a preset transmitting distance; a second antenna, the transmitting distance of which is less than the preset transmitting distance; and a computer program in a memory. When the computer program is executed by the processor, the IoT device is made to execute the following operations: broadcasting a first message by means of the first antenna; receiving a first response message; in response to the first response message, sending a second message by means of the second antenna; and receiving a notification message. According to the present application, the configuration between IoT devices can be conveniently and rapidly completed, operations are simplified, time is saved on, convenience is provided for a user, the user experience is improved, and the security is improved.

Description

一种IoT设备设置方法及IoT设备A kind of IoT device setting method and IoT device 技术领域technical field
本申请涉及物联网领域,具体涉及一种IoT设备设置方法及IoT设备。The present application relates to the field of the Internet of Things, and in particular to a method for setting an IoT device and an IoT device.
背景技术Background technique
随着物联网(internet of things,IoT)设备的普及,用户对IoT设备的需求不断提高。有些需求,只有多个IoT设备彼此配合,才能实现。在此之前,需要对涉及到的多个IoT设备进行设置。而对每个IoT设备都进行人工设置,不仅使得设置繁琐,耗时较长,而且需要用户对每个IoT设备都比较了解,而实际中用户一般不会对每个IoT设备都比较了解,这样用户就得花费时间来了解每个IoT设备。这些都导致用户进行一次设置将会耗费较高的时间成本,给用户带来不便,用户体验较差。因此,如何提供一种便捷的IoT设备设置方法及IoT设备,成为我们的需求。With the popularization of Internet of Things (IoT) devices, users' demands for IoT devices continue to increase. 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. However, manually setting each IoT device not only makes the setting cumbersome and takes a long time, but also requires users to have a better understanding of each IoT device. In practice, users generally do not have a better understanding of each IoT device. Users have to spend time learning about each IoT device. All of these result in a high time cost for the user to perform a setting, which brings 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 demand.
发明内容SUMMARY OF THE INVENTION
为了解决上述的技术问题,本申请提供了一种IoT设备设置方法及IoT设备。本申请提供的技术方案,能够使得用户轻松地完成IoT设备的设置,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。In order to solve the above technical problems, the present application provides an IoT device setting method and IoT device. The technical solution provided by the present application enables the user to easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user.
第一方面,提供一种第一IoT设备。第一IoT设备与IoT服务器通信;第一IoT设备包括:处理器;存储器;第一天线,第一天线的发射距离为第一距离;第一距离大于第一预设发射距离;第二天线,第二天线的发射距离为第二距离;第一天线和第二天线为不同的天线;第二距离小于或等于第一预设发射距离;以及计算机程序,其中计算机程序存储在存储器上,当计算机程序被处理器执行时,使得第一IoT设备执行:通过第一天线,广播第一消息;第一消息包括第一发布信息;接收到来自第二IoT设备的第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;响应于第一响应消息,通过第二天线,向第二IoT设备发送第二消息;接收到来自第二IoT设备或IoT服务器的告知消息。其中,第一预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。这样,能够使得用户轻松地完成IoT设备的设置,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。此外,还能保证安全性。In a first aspect, a first IoT device is provided. The first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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, wherein the computer program is stored in the memory, when the computer When the program is executed by the processor, the first IoT device executes: broadcasts the first message through the first antenna; the first message includes the first release information; receives the first response message from the second IoT device; the first response message Including first request information for the first published information; in response to the first response message, sending a second message to the second IoT device through the second antenna; receiving a notification message from the second IoT device or the IoT server. 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; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
根据第一方面,第一天线和第二天线连接于第一IoT设备的同一个无线通信芯片。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.
根据第一方面,或者以上第一方面的任意一种实现方式,无线通信芯片为Wi-Fi芯片、蓝牙芯片或ZigBee芯片。According to the first aspect, or any implementation manner of the above first aspect, the wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.
根据第一方面,或者以上第一方面的任意一种实现方式,第一发布信息包括以下的一种:招揽群组成员的信息、可设置控制关系的信息和可设置功能复制关系的信息;第一请求信息包括以下的一种:愿意加入群组的信息、愿意设置控制关系的信息和愿意设置功能复制关系的信息。这样,就可以使得第一IoT设备后续与第二IoT设备实 现加入群组、设置控制关系或者设置功能复制关系等。According to the first aspect, or any implementation manner of the above first aspect, the first release information includes one of the following: information on soliciting group members, information on which a control relationship can be set, and information on which a function copy relationship can be set; A request information includes one of the following: information of willingness to join a group, information of willingness to set up a control relationship, and information of willingness to set a function duplication relationship. In this way, the first IoT device and the second IoT device can subsequently join a group, set a control relationship, or set a function replication relationship, and the like.
根据第一方面,或者以上第一方面的任意一种实现方式,在第一发布信息包括招揽群组成员的信息时,第二消息包括第一群组ID;第一群组ID为第一IoT设备所在的一个或多个群组的ID。这样,就可以使得第一IoT设备支持实现第二IoT设备加入第一IoT设备的群组。According to the first aspect, or any implementation manner of the above first aspect, when the first published information includes information on soliciting group members, the second message includes the first group ID; the first group ID is the first IoT The ID of one or more groups the device is in. In this way, the first IoT device can be enabled to support the second IoT device to join the group of the first IoT device.
根据第一方面,或者以上第一方面的任意一种实现方式,在第一发布信息包括可设置控制关系的信息或者可设置功能复制关系的信息时,第二消息包括第一设备ID;第一设备ID为第一IoT设备的设备ID。这样,就可以使得第一IoT设备支持实现设置控制关系或设置功能复制关系的操作。According to the first aspect, or any implementation manner of the above first aspect, when the first release information includes information on which a control relationship can be set or information on which a function duplication relationship can be set, the second message includes the first device ID; the first The device ID is the device ID of the first IoT device. In this way, the first IoT device can be made to support the operation of setting a control relationship or setting a function replication relationship.
根据第一方面,或者以上第一方面的任意一种实现方式,在接收到来自第二IoT设备或IoT服务器的告知消息之后,第一IoT设备还执行:输出告知消息;在通过第一天线,广播第一消息之前,第一IoT设备还执行:接收到一个输入。这样,就可以使得第一IoT设备能通知用户设置结果,并且可以使得第一IoT设备能在外部输入控制下广播第一消息。According to the first aspect, or any implementation manner of the above first aspect, after receiving the notification message from the second IoT device or the IoT server, the first IoT device further performs: outputting the notification message; Before broadcasting the first message, the first IoT device also performs: an input is received. In this way, the first IoT device can be enabled to notify the user of the setting result, and the first IoT device can be enabled to broadcast the first message under external input control.
第二方面,提供一种第一IoT设备。第一IoT设备与IoT服务器通信;第一IoT设备包括:处理器;存储器;第一天线,第一天线的发射距离为第一距离;第一距离大于第一预设发射距离;第二天线,第二天线的发射距离为第二距离;第一天线和第二天线为不同的天线;第二距离小于或等于第一预设发射距离;以及计算机程序,其中计算机程序存储在存储器上,当计算机程序被处理器执行时,使得第一IoT设备执行:通过第二天线,广播第一消息;第一消息包括第一发布信息;在距离第二IoT设备的第四距离内,接收到来自第二IoT设备的第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;响应于第一响应消息,通过第一天线,向第二IoT设备发送第二消息;在距离第二IoT设备的第三距离内,接收到来自第二IoT设备的告知消息;第三距离大于第四距离。其中,第一预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。这样,能够使得用户轻松地完成IoT设备的设置,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。此外,还能保证安全性。In a second aspect, a first IoT device is provided. The first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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, wherein the computer program is stored in the memory, when the computer When the program is executed by the processor, the first IoT device is made to execute: broadcast the first message through the second antenna; the first message includes the first published information; within a fourth distance from the second IoT device, receive a message from the second IoT device. The first response message of the IoT device; the first response message includes the first request information for the first published information; in response to the first response message, the second message is sent to the second IoT device through the first antenna; Within the third distance of the IoT device, a notification message from the second IoT device is received; the third distance is greater than the fourth distance. 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; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
第三方面,提供一种第一IoT设备。第一IoT设备与IoT服务器通信;第一IoT设备包括:处理器;存储器;第一天线,第一天线在第一发射功率下的发射距离为第一距离,第一距离大于第一预设发射距离;第一天线在第二发射功率下的发射距离为第二距离,第二距离小于或等于第一预设发射距离;第一发射功率大于第二发射功率;以及计算机程序,其中计算机程序存储在存储器上,当计算机程序被处理器执行时,使得第一IoT设备执行:通过第一发射功率下的第一天线,广播第一消息;第一消息包括第一发布信息;接收到来自第二IoT设备的第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;响应于第一响应消息,通过第二发射功率下的第一天线,向第二IoT设备发送第二消息;接收到来自第二IoT设备或IoT服务器的告知消息。其中,第一预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。这样,能够使得用户轻松地完成IoT设备的设置,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。此外,还能保证安全性。In a third aspect, a first IoT device is provided. The first IoT device communicates with the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna under the first transmission power is the first distance, and the first distance is greater than the first preset transmission distance; the transmission distance of the first antenna under the second transmission power is a second distance, and the second distance is less than or equal to the first preset transmission distance; the first transmission power is greater than the second transmission power; and a computer program, wherein the computer program stores On the memory, when the computer program is executed by the processor, the first IoT device is caused to execute: broadcast the first message through the first antenna at the first transmit power; the first message includes the first published information; The first response message of the IoT device; the first response message includes the first request information for the first published information; in response to the first response message, the second IoT device is sent through the first antenna at the second transmit power message; a notification message is received from the second IoT device or IoT server. 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; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
第四方面,提供一种第二IoT设备。第二IoT设备与IoT服务器通信;第二IoT设备包括:处理器;存储器;第三天线,第三天线的发射距离为第三距离;第三距离大于第二预设发射距离;第四天线,第四天线的发射距离为第四距离;第三天线和第四天线为不同的天线;第四距离小于或等于第二预设发射距离;以及计算机程序,其中计算机程序存储在存储器上,当计算机程序被处理器执行时,使得第二IoT设备执行:接收到来自第一IoT设备的第一消息;第一消息包括第一发布信息;随机生成第一密钥;通过第四天线,向第一IoT设备发送第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;接收到来自第一IoT设备的第二消息;通过第三天线,向IoT服务器发送第二请求消息;接收到来自IoT服务器的第一请求消息或第二请求消息。其中,第二预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。这样,能够使得用户轻松地完成IoT设备的设置,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。此外,还能保证安全性。In a fourth aspect, a second IoT device is provided. The second IoT device communicates with the IoT server; the second IoT device includes: a processor; a memory; a third antenna, and the transmission distance of the third antenna is the third distance; the third distance is greater than the second preset transmission distance; the fourth antenna, The transmission distance of the fourth antenna is 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 in the memory, when the computer When the program is executed by the processor, the second IoT device executes: receiving the first message from the first IoT device; the first message includes the first release information; randomly generating the first key; The IoT device sends a first response message; the first response message includes first request information for the first published information; receives a second message from the first IoT device; sends a second request message to the IoT server through the third antenna; The first request message or the second request message from the IoT server is received. The second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
根据第四方面,第三天线和第四天线连接于第二IoT设备的同一个无线通信芯片。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.
根据第四方面,或者以上第四方面的任意一种实现方式,无线通信芯片为Wi-Fi芯片、蓝牙芯片或ZigBee芯片。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.
根据第四方面,或者以上第四方面的任意一种实现方式,第一发布信息包括以下的一种:招揽群组成员的信息、可设置控制关系的信息和可设置功能复制关系的信息;所述第一请求信息包括以下的一种:愿意加入群组的信息、愿意设置控制关系的信息和愿意设置功能复制关系的信息。这样,就可以使得第一IoT设备后续与第二IoT设备实现加入群组、设置控制关系或者设置功能复制关系等。According to the fourth aspect, or any implementation manner of the above fourth aspect, the first release information includes one of the following: information on soliciting group members, information on which a control relationship can be set, and information on which a function replication relationship can be set; The first request information includes one of the following: information of willingness to join a group, information of willingness to set a control relationship, and information of willingness to set a function duplication relationship. In this way, the first IoT device and the second IoT device can subsequently join a group, set a control relationship, or set a function replication relationship, and the like.
根据第四方面,或者以上第四方面的任意一种实现方式,在第一发布信息包括招揽群组成员的信息时,第二消息包括第一群组ID,第二请求消息包括第一群组ID和第二设备ID;第一群组ID为第一IoT设备所在的一个或多个群组的ID,第二设备ID为第二IoT设备的设备ID。这样,就可以使得第二IoT设备支持实现第二IoT设备加入第一IoT设备的群组的操作。According to the fourth aspect, or any implementation manner of the above fourth aspect, when the first published information includes information about soliciting group members, the second message includes the first group ID, and the second request message includes the first group ID and 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 be made to support the operation of realizing that the second IoT device joins the group of the first IoT device.
根据第四方面,或者以上第四方面的任意一种实现方式,在第一发布信息包括可设置控制关系的信息或者可设置功能复制关系的信息时,第二消息包括第一设备ID,第二请求消息包括第一设备ID和第二设备ID;第一设备ID为第一IoT设备的设备ID,第二设备ID为第二IoT设备的设备ID。这样,就可以使得第二IoT设备支持实现设置控制关系或设置功能复制关系的操作。According to the fourth aspect, or any implementation manner of the above fourth aspect, when the first release information includes information on which a control relationship can be set or information on which a function duplication relationship can be set, the second message includes the first device ID, and the second message includes the first device ID. The 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. In this way, the second IoT device can be made to support the operation of setting the control relationship or setting the function replication relationship.
第五方面,提供一种第二IoT设备。第二IoT设备与IoT服务器通信;第二IoT设备包括:处理器;存储器;第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三距离大于第二预设发射距离;第三天线在第四发射功率下的发射距离为第四距离,第四距离小于或等于第二预设发射距离;第三发射功率大于第四发射功率;以及计算机程序,其中计算机程序存储在存储器上,当计算机程序被处理器执行时,使得第二IoT设备执行:接收到来自第一IoT设备的第一消息;第一消息包括第一发布信息;随机生成第一密钥;通过第四发射功率下的第三天线,向第一IoT设备发送第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;接收到来自第一IoT设备的第二消息;通过第三发射功率下的第三天线,向IoT服务器发送第二请求消息;接收到来自IoT服务器 的第一请求消息或第二请求消息。其中,第二预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。这样,能够使得用户轻松地完成IoT设备的设置,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。此外,还能保证安全性。In a fifth aspect, a second IoT device is provided. The second IoT device communicates with the IoT server; the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna under the third transmission power is a third distance, and the third distance is greater than the second preset transmission distance; the transmission distance of the third antenna under the 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, wherein the computer program stores On the memory, the computer program, when executed by the processor, causes the second IoT device to execute: receiving a first message from the first IoT device; the first message including the first release information; randomly generating the first key; The third antenna with four transmit powers sends a first response message to the first IoT device; the first response message includes first request information for the first published information; receives a second message from the first IoT device; The third antenna with three transmit powers sends the second request message to the IoT server; and receives the first request message or the second request message from the IoT server. The second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security. In this way, the user can easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user. In addition, safety is guaranteed.
第六方面,提供一种第一IoT设备设置方法,应用于第一IoT设备。第一IoT设备与IoT服务器通信;第一IoT设备包括:处理器;存储器;第一天线,第一天线的发射距离为第一距离;第一距离大于第一预设发射距离;第二天线,第二天线的发射距离为第二距离;第一天线和第二天线为不同的天线;第二距离小于或等于第一预设发射距离;该方法包括:通过第一天线,广播第一消息;第一消息包括第一发布信息;接收到来自第二IoT设备的第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;响应于第一响应消息,通过第二天线,向第二IoT设备发送第二消息;接收到来自第二IoT设备或IoT服务器的告知消息。其中,第一预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。In a 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 the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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 the first message through the first antenna; The first message includes first release information; a first response message from the second IoT device is received; the first response message includes first request information for the first release information; in response to the first response message, through the second antenna, Send a second message to the second IoT device; receive a notification message from the second IoT device or the IoT server. 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; the distance can ensure security.
根据第六方面,第一天线和第二天线连接于第一IoT设备的同一个无线通信芯片。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.
根据第六方面,或者以上第六方面的任意一种实现方式,无线通信芯片为Wi-Fi芯片、蓝牙芯片或ZigBee芯片。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.
第七方面,提供一种第一IoT设备设置方法,应用于第一IoT设备。第一IoT设备与IoT服务器通信;第一IoT设备包括:处理器;存储器;第一天线,第一天线的发射距离为第一距离;第一距离大于第一预设发射距离;第二天线,第二天线的发射距离为第二距离;第一天线和第二天线为不同的天线;第二距离小于或等于第一预设发射距离。该方法包括:通过第二天线,广播第一消息;第一消息包括第一发布信息;在距离第二IoT设备的第四距离内,接收到来自第二IoT设备的第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;响应于第一响应消息,通过第一天线,向第二IoT设备发送第二消息;在距离第二IoT设备的第三距离内,接收到来自第二IoT设备的告知消息;其中,第三距离大于第四距离。其中,第一预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。In a seventh 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 the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, The transmission distance of the second antenna is the 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 a second antenna; the first message includes first publishing information; receiving a first response message from the second IoT device within a fourth distance from the second IoT device; the first The response message includes first request information for the first release information; in response to the first response message, the second message is sent to the second IoT device through the first antenna; within a third distance from the second IoT device, the received A notification message from the second IoT device; wherein the third distance is greater than the fourth distance. 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; the distance can ensure security.
第八方面,提供一种第一IoT设备设置方法,应用于第一IoT设备。第一IoT设备与IoT服务器通信;第一IoT设备包括:处理器;存储器;第一天线,第一天线在第一发射功率下的发射距离为第一距离,第一距离大于第一预设发射距离;第一天线在第二发射功率下的发射距离为第二距离,第二距离小于或等于第一预设发射距离;第一发射功率大于第二发射功率。该方法包括:通过第一发射功率下的第一天线,广播第一消息;第一消息包括第一发布信息;接收到来自第二IoT设备的第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;响应于第一响应消息,通过第二发射功率下的第一天线,向第二IoT设备发送第二消息;接收到来自第二IoT设备或IoT服务器的告知消息。其中,第一预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。In an eighth 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 the IoT server; the first IoT device includes: a processor; a memory; a first antenna, where the transmission distance of the first antenna under the first transmission power is the first distance, and the first distance is greater than the first preset transmission distance; the transmission distance of the first antenna under the second transmission power is the second distance, and the second distance is less than or equal to the first preset transmission distance; the first transmission power is greater than the second transmission power. The method includes: broadcasting a first message through a first antenna under a first transmit power; the first message includes first release information; receiving a first response message from a second IoT device; Publishing first request information for information; in response to the first response message, sending a second message to the second IoT device through the first antenna under the second transmit power; receiving a notification message from the second IoT device or the IoT server. 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; the distance can ensure security.
第九方面,提供一种第二IoT设备设置方法,应用于第二IoT设备。第二IoT设备与IoT服务器通信;第二IoT设备包括:处理器;存储器;第三天线,第三天线的发射距离 为第三距离;第三距离大于第二预设发射距离;第四天线,第四天线的发射距离为第四距离;第三天线和第四天线为不同的天线;第四距离小于或等于第二预设发射距离。该方法包括:接收到来自第一IoT设备的第一消息;第一消息包括第一发布信息;随机生成第一密钥;通过第四天线,向第一IoT设备发送第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;接收到来自第一IoT设备的第二消息;通过第三天线,向IoT服务器发送第二请求消息;接收到来自IoT服务器的第一请求消息或第二请求消息。其中,第二预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。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 the IoT server; the second IoT device includes: a processor; a memory; a third antenna, and the transmission distance of the third antenna is the third distance; the third distance is greater than the second preset transmission distance; the fourth antenna, The transmission distance of the fourth antenna is the fourth distance; the third antenna and the fourth antenna are different antennas; and the fourth distance is 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 includes first release information; randomly generating a first key; sending a first response message to the first IoT device through a fourth antenna; The response message includes the first request information for the first published information; the second message from the first IoT device is received; the second request message is sent to the IoT server through the third antenna; the first request message from the IoT server is received or the second request message. The second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security.
第十方面,提供一种第二IoT设备设置方法,应用于第二IoT设备。第二IoT设备与IoT服务器通信;第二IoT设备包括:处理器;存储器;第三天线,第三天线在第三发射功率下的发射距离为第三距离,第三距离大于第二预设发射距离;第三天线在第四发射功率下的发射距离为第四距离,第四距离小于或等于第二预设发射距离;第三发射功率大于第四发射功率。该方法包括:接收到来自第一IoT设备的第一消息;第一消息包括第一发布信息;随机生成第一密钥;通过第四发射功率下的第三天线,向第一IoT设备发送第一响应消息;第一响应消息包括针对第一发布信息的第一请求信息;接收到来自第一IoT设备的第二消息;通过第三发射功率下的第三天线,向IoT服务器发送第二请求消息;接收到来自IoT服务器的第一请求消息或第二请求消息。其中,第二预设发射距离为第一IoT设备与第二IoT设备能够以明文形式交换秘密信息的距离;该距离能够保证安全性。A tenth aspect provides a method for setting a second IoT device, which is applied to the second IoT device. The second IoT device communicates with the IoT server; the second IoT device includes: a processor; a memory; a third antenna, the transmission distance of the third antenna under the third transmission power is a third distance, and the third distance is greater than the second preset transmission distance; the transmission distance of the third antenna under the fourth transmission power is the 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. The method includes: receiving a first message from a first IoT device; the first message includes first release information; randomly generating a first key; a response message; the first response message includes the first request information for the first published information; the second message from the first IoT device is received; the second request is sent to the IoT server through the third antenna at the third transmit power message; the first request message or the second request message from the IoT server is received. The second preset transmission distance is the distance at which the first IoT device and the second IoT device can exchange secret information in plaintext; the distance can ensure security.
第十一方面,提供一种计算机可读存储介质。计算机可读存储介质包括计算机程序,当计算机程序在第一IoT设备上运行时,使得第一IoT设备执行如第六方面及第六方面中的任意一种实施方式、第七方面或第八方面的方法。In an eleventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes a computer program that, when run on the first IoT device, causes the first IoT device to perform any one of the embodiments of the sixth aspect and the sixth aspect, the seventh aspect or the eighth aspect Methods.
第十二方面,提供一种计算机可读存储介质。计算机可读存储介质包括计算机程序,当计算机程序在第二IoT设备上运行时,使得第二IoT设备执行如第九方面或第十方面的方法。A twelfth aspect provides a computer-readable storage medium. The computer-readable storage medium includes a computer program which, when run on the second IoT device, causes the second IoT device to perform the method of the ninth or tenth aspect.
第十三方面,提供一种计算机程序产品。当计算机程序产品在第一IoT设备上运行时,使得第一IoT设备执行第六方面及第六方面中的任意一种实施方式、第七方面或第八方面的方法。A thirteenth aspect provides a computer program product. When the computer program product is run on the first IoT device, the first IoT device is caused to perform the method of any one of the sixth aspect and the sixth aspect, the seventh aspect or the eighth aspect.
第十四方面,提供一种计算机程序产品。当计算机程序产品在第二IoT设备上运行时,使得第二IoT设备执行第九方面或第十方面的方法。A fourteenth aspect provides a computer program product. When the computer program product is run on the second IoT device, the second IoT device is caused to perform the method of the ninth or tenth aspect.
在上述各方面及各方面的任意一种实施方式中,第二预设发射距离可以与第一预设发射距离相同,也可以不同。In the above aspects and any implementation manner of each aspect, the second preset transmission distance may be the same as or different from the first preset transmission distance.
附图说明Description of drawings
图1为本申请实施例提供的IoT设备设置方法的场景示意图;1 is a schematic diagram of a scenario of a method for setting an IoT device provided by an embodiment of the present application;
图2为本申请实施例提供的IoT设备设置方法中第一IoT设备的硬件结构示意图;2 is a schematic diagram of a hardware structure of a first IoT device in the IoT device setting method provided by the embodiment of the present application;
图3为本申请实施例提供的IoT设备设置方法中第二IoT设备的硬件结构示意图;3 is a schematic diagram of a hardware structure of a second IoT device in the IoT device setting method provided by the embodiment of the present application;
图4为本申请实施例提供的无线通信模块及天线的一种原理示意图;FIG. 4 is a schematic diagram of a principle of a wireless communication module and an antenna provided by an embodiment of the present application;
图5为本申请实施例提供的无线通信模块及天线的另一种原理示意图;FIG. 5 is another schematic schematic diagram of a wireless communication module and an antenna provided by an embodiment of the present application;
图6-图8为本申请实施例提供的无线通信模块及天线的一种具体结构示意图;6-8 are schematic diagrams of a specific structure of a wireless communication module and an antenna provided by an embodiment of the application;
图9为本申请实施例提供的IoT设备设置方法中无线通信模块及天线的发射距离示意图;9 is a schematic diagram of a transmission distance of a wireless communication module and an antenna in a method for setting an IoT device provided by an embodiment of the present application;
图10-图13为本申请实施例提供的IoT设备设置方法中实施例一的通信交互示意图;10-13 are schematic diagrams of communication interaction in Embodiment 1 of the IoT device setting method provided by the embodiments of the present application;
图14为本申请实施例提供的IoT设备设置方法中实施例一的演示示意图;FIG. 14 is a schematic diagram illustrating the demonstration of Embodiment 1 in the IoT device setting method provided by the embodiment of the present application;
图15-图18为本申请实施例提供的IoT设备设置方法中实施例二的通信交互示意图;15-18 are schematic diagrams of communication interaction in Embodiment 2 of the IoT device setting method provided by the embodiments of the present application;
图19为本申请实施例提供的IoT设备设置方法中实施例二的演示示意图;FIG. 19 is a schematic diagram illustrating the demonstration of Embodiment 2 in the IoT device setting method provided by the embodiment of the present application;
图20-图23为本申请实施例提供的IoT设备设置方法中实施例三的通信交互示意图;FIGS. 20-23 are schematic diagrams of communication interaction in Embodiment 3 of the IoT device setting method provided by the embodiments of the present application;
图24为本申请实施例提供的IoT设备设置方法中实施例三的演示示意图;FIG. 24 is a schematic diagram illustrating the demonstration of Embodiment 3 in the IoT device setting method provided by the embodiment of the present application;
图25为本申请实施例提供的IoT设备设置方法中第一IoT设备与第二IoT设备在采用Wi-Fi协议下的通信交互示意图;25 is a schematic diagram of communication interaction between a first IoT device and a second IoT device using the Wi-Fi protocol in the IoT device setting method provided by the embodiment of the present application;
图26为本申请实施例提供的IoT设备的结构示意图。FIG. 26 is a schematic structural diagram of an IoT device provided by an embodiment of the present application.
具体实施方式Detailed ways
下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。字符“/”一般表示前后关联对象是一种“或”的关系。The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Wherein, 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 be used as limitations of the present application. As used in the specification of this application and the appended claims, the singular expressions "a," "the," "above," "the," and "the" are intended to also include, for example, "a" or more" this expression unless the context clearly dictates otherwise. It should also be understood that, in the following embodiments of the present application, "at least one" and "one or more" refer to one or more than two (including two). The character "/" generally indicates that the associated objects are an "or" relationship.
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。References in this specification to "one embodiment" or "some embodiments" and the like 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, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise. The term "connected" includes both direct and indirect connections unless otherwise specified. "First" and "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implying the number of indicated technical features.
在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or illustrations. Any embodiment or design described in the embodiments of the present application as "exemplarily" or "such as" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "such as" is intended to present the related concepts in a specific manner.
随着物联网(internet of things,IoT)设备的普及,用户对IoT设备(如IoT灯、IoT冰箱、IoT音箱等)的需求不断提高。IoT设备是指通过IoT对其进行远程或近程地控制和/或监测的电子设备。典型地,智能家电就属于典型的IoT设备。有些需求,只有多个IoT设备彼此配合,才能实现。在此之前,需要对涉及到的多个IoT设备进行设置。而对每个IoT设备都进行人工设置,不仅使得设置繁琐,耗时较长,而且需要用户 对每个IoT设备都比较了解,而实际中用户一般不会对每个IoT设备都比较了解,这样用户就得花费时间来了解每个IoT设备。这些都导致用户进行一次设置将会耗费较高的时间成本,给用户带来不便,用户体验较差。因此,如何提供一种便捷的IoT设备设置方法及IoT设备,成为我们的需求。With the popularization of Internet of things (IoT) devices, users' demands for IoT devices (such as IoT lights, IoT refrigerators, IoT speakers, etc.) continue to increase. IoT devices are electronic devices that are remotely or remotely controlled and/or monitored via IoT. Typically, smart home appliances are 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. However, manually setting each IoT device not only makes the setting cumbersome and takes a long time, but also requires users to have a better understanding of each IoT device. In practice, users generally do not have a better understanding of each IoT device. Users have to spend time learning about each IoT device. All of these result in a high time cost for the user to perform a setting, which brings 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 demand.
为了解决上述的技术问题,本申请提供了一种IoT设备设置方法及IoT设备。本申请提供的技术方案,能够使得用户轻松地完成IoT设备的设置,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。In order to solve the above technical problems, the present application provides an IoT device setting method and IoT device. The technical solution provided by the present application enables the user to easily complete the setting of the IoT device, without requiring the user to spend a lot of time, and without requiring the user to have a better understanding of each IoT device, which greatly facilitates the user.
示例性地,图1为本申请实施例提供的IoT设备设置方法的场景示意图。如图1所示,IoT设备100(也可称为第一IoT设备)和IoT设备200(也可称为第二IoT设备)以有线通信或无线通信的方式连接至IoT服务器300。IoT服务器300可以为本地服务器,也可以为云服务器。示例性地,云服务器可以为家居云服务器。IoT设备100与上述服务器的连接,可以为有线连接,也可以为无线连接。IoT设备200与上述服务器的连接,可以为有线连接,也可以为无线连接。优选地,IoT设备100和IoT设备200都通过无线连接与IoT服务器300通信。比如,IoT设备100和IoT设备200都通过同一无线路由器,连接至IoT服务器300。可替换地,在图1所示的场景中,也可不设置IoT服务器300。Exemplarily, FIG. 1 is a schematic diagram of a scenario of a method for setting an IoT device provided by an embodiment of the present application. As shown in FIG. 1 , an IoT device 100 (which may also be referred to as a first IoT device) and an IoT device 200 (which may also be referred to as a second IoT device) are connected to the IoT server 300 by wired communication or wireless communication. The IoT server 300 may 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 may be a wired connection or a wireless connection. The connection between the IoT device 200 and the above-mentioned server may be a wired connection or a wireless connection. Preferably, both IoT device 100 and IoT device 200 communicate with IoT server 300 through a wireless connection. 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 the scenario shown in FIG. 1 , the IoT server 300 may not be provided.
在图1所示及其替换的场景中,通过IoT设备100和IoT设备200两者靠近,可以实现IoT设备100对IoT设备200的设置。比如,IoT设备100处于一个群组中,通过IoT设备100和IoT设备200两者靠近,可以实现IoT设备100对IoT设备200的设置,从而使得IoT设备200加入该群组中。再比如,IoT设备100可以控制某个对象,通过IoT设备100和IoT设备200两者靠近,可以实现IoT设备100对IoT设备200的设置,从而使得IoT设备200也能控制该对象。另外,在图1所示及其替换的场景中,IoT设备100和IoT设备200可以相互设置。比如,IoT设备100具有开关功能,IoT设备200具有照明功能,通过IoT设备100和IoT设备200两者靠近,可以完成对IoT设备100和IoT设备200的设置,从而使得IoT设备100能够控制IoT设备200照明功能的开启和关闭。In the scenario shown in FIG. 1 and its alternatives, the setting of the IoT device 100 to the IoT device 200 can be realized by the proximity of the IoT device 100 and the IoT device 200 . For example, if the IoT device 100 is in a group, and the IoT device 100 and the IoT device 200 are close together, the IoT device 100 can be set to the IoT device 200, so that the IoT device 200 joins the group. For another example, the IoT device 100 can control an object, and the IoT device 100 can be set to the IoT device 200 by the proximity of the IoT device 100 and the IoT device 200, so that the IoT device 200 can also control the object. In addition, in the scenarios shown in FIG. 1 and its alternatives, the IoT device 100 and the IoT device 200 may be mutually disposed. For example, the IoT device 100 has a switch function, and the IoT device 200 has a lighting function. By the proximity of the IoT device 100 and the IoT device 200, the settings of the IoT device 100 and the IoT device 200 can be completed, so that the IoT device 100 can control the IoT device. 200 lighting functions on and off.
本申请实施例的IoT设备100或IoT设备200包括但不限于智能手机、智能耳机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表、智能手环、智能戒指、智能眼镜、智能头盔)、智能开关、智能灯、智能冰箱、智能音箱、智能门铃、智能门锁、智能窗帘等。IoT设备100的示例性实施例包括但不限于搭载
Figure PCTCN2022081248-appb-000001
Windows、Linux或者其它操作系统的便携式电子设备。上述IoT设备100或IoT设备200也可为其它便携式电子设备,诸如膝上型计算机(Laptop)等。还应当理解的是,在其他一些实施例中,上述IoT设备100或IoT设备200也可以不是便携式电子设备,而是固定安装或台式电子设备(比如,台式计算机)。
The IoT device 100 or the IoT device 200 in this embodiment of the present application includes, but is not limited to, a smartphone, a smart headset, a tablet computer, a wearable electronic device with a wireless communication function (such as a smart watch, a smart bracelet, a smart ring, smart glasses, a smart helmets), smart switches, smart lights, smart refrigerators, smart speakers, smart doorbells, smart door locks, smart curtains, etc. Exemplary embodiments of IoT device 100 include, but are not limited to, piggybacking
Figure PCTCN2022081248-appb-000001
Portable electronic devices with Windows, Linux, or other operating systems. The above-mentioned IoT device 100 or IoT device 200 may also be other portable electronic devices, such as a laptop computer (Laptop) or the like. It should also be understood that, in some other embodiments, the above-mentioned IoT device 100 or IoT device 200 may not be a portable electronic device, but a fixed installation or a desktop electronic device (eg, a desktop computer).
示例性地,图2示出了本申请实施例提供的IoT设备100的硬件结构示意图。如图2所示,IoT设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B, 气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。Exemplarily, FIG. 2 shows a schematic diagram of a hardware structure of an IoT device 100 provided by an embodiment of the present application. As shown in FIG. 2 , 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 , and a battery 142 , Antenna 1, Antenna 2, Mobile Communication Module 150, Wireless Communication Module 160, Audio Module 170, Speaker 170A, Receiver 170B, Microphone 170C, Headphone Interface 170D, Sensor Module 180, Key 190, Motor 191, Indicator 192, Camera 193 , a display screen 194, and a subscriber identification module (subscriber identification module, SIM) card interface 195 and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是,本申请实施例示意的结构并不构成对IoT设备100的具体限定。在本申请另一些实施例中,IoT设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be understood that the structures illustrated in the embodiments of the present application do 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 less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
充电管理模块140用于从充电器接收充电输入。电源管理模块141用于连接电池142,充电管理模块140与处理器110。IoT设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 . The wireless communication function of the IoT device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。IoT设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in IoT device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在IoT设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。The mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G etc. applied on the IoT device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在IoT设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the IoT device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). 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 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,IoT设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得IoT设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA), 时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the IoT device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the IoT device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
IoT设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The IoT device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展IoT设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect 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 realize the data storage function. For example to save files like music, video etc in external memory card.
IoT设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The IoT device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, and an application processor. Such as music playback, recording, etc.
示例性地,图3示出了本申请实施例提供的IoT设备200的硬件结构示意图。IoT设备200可包括处理器210,外部存储器接口220,内部存储器221,通用串行总线(universal serial bus,USB)接口230,充电管理模块240,电源管理模块241,电池242,天线3,天线4,无线通信模块250,传感器模块260,输入模块270,输出模块280等。Exemplarily, FIG. 3 shows a schematic diagram of a hardware structure of an IoT device 200 provided by an 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 charge management module 240, a power management module 241, a battery 242, an antenna 3, an antenna 4 , the wireless communication module 250, the sensor module 260, the input module 270, the output module 280 and so on.
可以理解的是,本申请实施例示意的结构并不构成对IoT设备200的具体限定。在本申请另一些实施例中,IoT设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。比如,IoT设备200可以为智能灯、智能电视、智能音箱等。It can be understood that the structures illustrated in the embodiments of the present application do 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 less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. For example, the IoT device 200 may be a smart light, a smart TV, a smart speaker, or the like.
处理器210可以包括一个或多个处理单元。例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,IoT设备200也可以包括一个或多个处理器210。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。 Processor 210 may include one or more processing units. For example, the processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video Codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent components, or may be integrated in one or more processors. In some embodiments, IoT device 200 may also include one or more processors 210 . The controller can generate an operation control signal according to the instruction operation code and the timing signal, and complete the control of fetching and executing instructions.
在一些实施例中,处理器210可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口,集成电路间音频(integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM卡接口,和/或USB接口等。其中,USB接口230是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口230可以用于连接充电器为IoT设备200充电,也可以用于IoT设备200与外围设备之间传输数据。In some embodiments, the processor 210 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface, and/or USB interface, etc. Among them, the USB interface 230 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 230 can be used to connect a charger to charge the IoT device 200, and can also be used to transmit data between the IoT device 200 and peripheral devices.
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对IoT设备200的结构限定。在本申请另一些实施例中,IoT设备200也可以采用 上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the IoT device 200 . In other embodiments of the present application, the IoT device 200 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块240用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块240可以通过USB接口230接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块240可以通过IoT设备200的无线充电线圈接收无线充电输入。充电管理模块240为电池242充电的同时,还可以通过电源管理模块241为IoT设备200供电。The charging management module 240 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 240 may receive charging input from the wired charger through the USB interface 230 . In some wireless charging embodiments, the charging management module 240 may receive wireless charging input through the wireless charging coil of the IoT device 200 . While the charging management module 240 is charging the battery 242 , the IoT device 200 can also be powered by the power management module 241 .
电源管理模块241用于连接电池242,充电管理模块240与处理器210。电源管理模块241接收电池242和/或充电管理模块240的输入,为处理器210,内部存储器221,外部存储器接口220和无线通信模块250等供电。电源管理模块241还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块241也可以设置于处理器210中。在另一些实施例中,电源管理模块241和充电管理模块240也可以设置于同一个器件中。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 input 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, and the like. The power management module 241 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 241 may also be provided in the processor 210 . In other embodiments, the power management module 241 and the charging management module 240 may also be provided in the same device.
IoT设备200的无线通信功能可以通过天线3,天线4以及无线通信模块250等实现。The wireless communication function of the IoT device 200 may be implemented by the antenna 3, the antenna 4, the wireless communication module 250, and the like.
无线通信模块250可以提供应用在IoT设备200上的包括Wi-Fi,蓝牙(bluetooth,BT),无线数传模块(例如,433MHz,868MHz,915MHz)等无线通信的解决方案。无线通信模块250可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块250经由天线3或者天线4接收电磁波,将电磁波信号滤波以及调频处理,将处理后的信号发送到处理器210。无线通信模块250还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线3或者天线4转为电磁波辐射出去。The wireless communication module 250 can provide wireless communication solutions including Wi-Fi, Bluetooth (BT), and wireless data transmission modules (eg, 433MHz, 868MHz, 915MHz) applied on the IoT device 200 . The wireless communication module 250 may be one or more devices integrating at least one communication processing module. The wireless communication module 250 receives the electromagnetic wave via the antenna 3 or the antenna 4 , filters and frequency modulates the electromagnetic wave signal, and sends the processed signal to the processor 210 . The wireless communication module 250 can also receive the signal to be sent from the processor 210 , perform frequency modulation on it, amplify it, and then convert it into electromagnetic waves and radiate it out through the antenna 3 or the antenna 4 .
本申请实施例中,IoT设备200可以通过无线通信模块发送广播消息,广播消息中可以携带IoT设备200的设备标识或者产品标识,用于周围的其他IoT设备发现IoT设备200。IoT设备200还可以通过无线通信模块接收其他IoT设备发送的消息。In this embodiment of the present application, the IoT device 200 may send a broadcast message through the wireless communication module, and the broadcast message may carry the device identifier or product identifier of the IoT device 200, which is used by 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.
外部存储器接口220可以用于连接外部存储卡,例如Micro SD卡,实现扩展IoT设备200的存储能力。外部存储卡通过外部存储器接口220与处理器210通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the IoT device 200 . The external memory card communicates with the processor 210 through the external memory interface 220 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器221可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器210可以通过运行存储在内部存储器221的上述指令,从而使得IoT设备200执行本申请一些实施例中所提供的自动开锁的方法,以及各种应用以及数据处理等。内部存储器221可以包括代码存储区和数据存储区。其中,代码存储区可存储操作系统。数据存储区可存储IoT设备200使用过程中所创建的数据等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器210可以通过运行存储在内部存储器221的指令,和/或存储在设置于处理器210中的存储器的指令,来使得IoT设备200执行本申请实施例中所提供的身份认证方法,以及其他应用及数据处理。 Internal memory 221 may be used to store one or more computer programs including instructions. The processor 210 may execute the above-mentioned instructions stored in the internal memory 221, thereby causing the IoT device 200 to execute the automatic unlocking method, various applications and data processing provided in some embodiments of the present application. The internal memory 221 may include a code storage area and a data storage area. Among them, the code storage area can store the operating system. The data storage area may store data and the like created during use of the IoT device 200 . In addition, the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage components, flash memory components, universal flash storage (UFS), and the like. In some embodiments, the processor 210 may execute the instructions stored in the internal memory 221 and/or the instructions stored in the memory provided in the processor 210 to cause the IoT device 200 to execute the instructions provided in the embodiments of the present application Authentication methods, and other applications and data processing.
输入模块270包括但不限于键盘、触摸屏(也可以为触摸显示屏)、鼠标、摄像头、激光笔、手写输入板、麦克风等。其中,麦克风包括单个麦克风,也包括麦克风阵列。The input module 270 includes, but is not limited to, a keyboard, a touch screen (which may also be a touch display screen), a mouse, a camera, a laser pointer, a handwriting input pad, a microphone, and the like. Among them, the microphone includes a single microphone, and also includes a microphone array.
输出模块280包括但不限于显示屏、LED灯、扬声器、耳机、产生振动的电机及其辅助器件、产生热量的发热器件等。The output module 280 includes, but is not limited to, a display screen, an LED light, a speaker, an earphone, a motor that generates vibration and its auxiliary devices, a heating device that generates heat, and the like.
本申请实施例中,IoT设备100与IoT设备200之间的无线通信方式包括但不限于低功耗蓝牙(bluetooth low energy BLE)、Wi-Fi感知(Wi-Fi aware)、紫峰(ZigBee)等方式。其中,该如BLE、Wi-Fi aware等无线通信方式是基于计算机网络媒体访问控制(medium access control,MAC)层,又称为数据链路层协议扩展进行的交互,无需涉及到MAC层的上层网络通信,在数据链路层便可完整的实现数据交互。其中,BLE是由蓝牙特别兴趣小组于2016年推出的一种超低功耗的用于电子设备的近距离无线通信方案,可通过MAC层实现通信。Wi-Fi Aware(Wi-Fi neighborhood aware network,Wi-Fi邻居发现网络,简称NAN)是一种新型的低功耗点对点互连互通的Wi-Fi Mesh通信技术,该技术能够绕开网络基础设施(如接入点(access point,AP)或蜂窝网),实现一对一、一对多或多对多的设备间的连接通信,同样可通过MAC层实现通信。需要说明的是,该种无线通信方式区别于常见的Wi-Fi连接或蓝牙连接。具体地,如BLE、Wi-Fi aware等的无线通信方式可通过发送信标帧的方式,直接在计算机网络的MAC层实现数据交互,而无需涉及到计算机网络中比MAC层更上层的网络层的数据交互。通过BLE、Wi-Fi aware等无线通信方式实现的设备间通信,不仅能够提高通信效率(IoT设备100无需与IoT设备200完成如Wi-Fi或蓝牙的连接、用户身份登录验证等步骤,不用涉及到上层网络的网络协议等内容),还能够提高数据交互的安全性(MAC层的数据传输)。In the embodiment of the present application, the wireless communication method between the IoT device 100 and the IoT device 200 includes but is not limited to bluetooth low energy BLE, Wi-Fi awareness, ZigBee, etc. Way. Among them, the wireless communication methods such as BLE and Wi-Fi aware are based on the interaction of the computer network media access control (medium access control, MAC) layer, also known as the data link layer protocol extension, and do not need to involve the upper layer of the MAC layer. For network communication, data interaction can be fully realized at the data link layer. Among them, BLE is an ultra-low-power short-range wireless communication scheme for electronic devices launched by the Bluetooth Special Interest Group in 2016, which can communicate through the MAC layer. Wi-Fi Aware (Wi-Fi neighborhood aware network, Wi-Fi neighbor discovery network, NAN for short) is a new low-power point-to-point interconnection Wi-Fi Mesh communication technology, which can bypass network infrastructure. (such as an access point (AP) or a cellular network), to achieve one-to-one, one-to-many or many-to-many connection communication between devices, and communication can also be achieved through the MAC layer. It should be noted that this wireless communication method is different from the common Wi-Fi connection or Bluetooth connection. Specifically, wireless communication methods such as BLE and Wi-Fi aware can directly realize data interaction at the MAC layer of the computer network by sending beacon frames, without involving the network layer higher than the MAC layer in the computer network. data interaction. The inter-device communication through wireless communication methods such as BLE and Wi-Fi aware can not only improve the communication efficiency (the IoT device 100 does not need to complete steps such as Wi-Fi or Bluetooth connection, user identity login verification, etc. with the IoT device 200, no need to involve It can also improve the security of data interaction (data transmission at the MAC layer).
在一种示例中,图4示出了本申请实施例提供的无线通信模块及天线的原理结构。如图4所示,IoT设备200可以包括处理器210,无线通信模块250,天线3和天线4。In an example, FIG. 4 shows the principle structure of a wireless communication module and an antenna provided by an embodiment of the present application. As shown in FIG. 4 , the IoT device 200 may include a processor 210 , a wireless communication module 250 , an antenna 3 and an antenna 4 .
其中,天线3(也称为第一天线,比如强天线)和天线4(也称为第二天线,比如弱天线)用于发射和接收电磁波。进一步的,无线通信模块250将从天线3或天线4接收的电磁波转换为信号,并将信号发送至处理器210进行处理;或者无线通信模块250从处理器210接收待发送的信号,经由强天线或弱天线转为电磁波辐射出去。本申请实施例中,强天线发射信号的第一发射距离(比如10米、5米等,具体可由用户设定)大于弱天线发射信号的第二发射距离(比如0.2米、0.3米等,具体可由用户设定)。弱天线发射信号的第二发射距离小于或等于预设的安全距离;其中,预设的安全距离为IoT设备200的用户通过IoT设备100与IoT设备200交换秘密信息的距离。在一种实例中,预设的安全距离为IoT设备200的用户通过IoT设备100与IoT设备200交换秘密信息的安全距离。比如预设的安全距离可为50cm、40cm、30cm、20cm等。如此,只有IoT设备100位于与IoT设备200小于等于预设的安全距离的范围内时,才能够接收到IoT设备200发送的秘密信息。这样,降低了安全风险(比如,在距IoT设备200的50cm以外,该秘密信息不会被其他设备接收到)。IoT设备100的用户可在周边安全的情形下,才将IoT设备100靠近至IoT设备200的预设的安全距离内,从而提高了安全性。在一些实施例中,处理器210可控制强天线与弱天线的切换。当IoT设备200采用强天线时,只有在IoT设备100与IoT设备200之间的距离小于第一发射距离,IoT设备100才接收到IoT设备200发送的信号;当IoT设备200采用弱天线时,只有在IoT设备100与IoT设备200之间的距离小于第二发射距离,移动设备才接收到IoT设备200发送的信号。其中,第一发射距离大于预设的安全距离;第二发射距离小于或等于预设的安全距离。在一些实施例中,第一发射距离和第二发射距离可分别称为第一距离和第二距离。Among them, the antenna 3 (also called a first antenna, such as a strong antenna) and an antenna 4 (also called a second antenna, such as a weak antenna) are used for transmitting and receiving electromagnetic waves. Further, the wireless communication module 250 converts the electromagnetic wave received from the antenna 3 or the antenna 4 into a signal, and sends the signal to the processor 210 for processing; or the wireless communication module 250 receives the signal to be sent from the processor 210, via a strong antenna Or weak antennas turn into electromagnetic waves and radiate out. In the embodiment of the present application, the first transmission distance (such as 10 meters, 5 meters, etc., which can be set by the user) of the signal transmitted by the strong antenna is greater than the second transmission distance of the signal transmitted by the weak antenna (such as 0.2 meters, 0.3 meters, etc., specifically can be set by the user). The second transmission distance of the signal transmitted by the weak antenna 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 an example, the preset safe distance is a safe distance for the user of the IoT device 200 to exchange secret information with the IoT device 200 through the IoT device 100 . For example, the preset safety distance may be 50cm, 40cm, 30cm, 20cm, and the like. In this way, the secret information sent by the IoT device 200 can be received only when the IoT device 100 is within a range of less than or equal to the preset safe distance from the IoT device 200 . In this way, security risks are reduced (eg, 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 approach the IoT device 100 within a preset safe distance of the IoT device 200 only when the surrounding is safe, thereby improving security. In some embodiments, the processor 210 may control the switching of strong antennas and weak antennas. When the IoT device 200 adopts a strong antenna, the IoT device 100 receives the signal sent by the IoT device 200 only when the distance between the IoT device 100 and the IoT device 200 is less than the first transmission distance; when the IoT device 200 adopts a weak antenna, Only when the distance between the IoT device 100 and the IoT device 200 is smaller than the second transmission distance, the mobile device receives the signal sent by the IoT device 200 . Wherein, the first emission distance is greater than the preset safety distance; the second emission distance is smaller than or equal to the preset safety distance. In some embodiments, the first transmission distance and the second transmission distance may be referred to as a first distance and a second distance, respectively.
在另一种示例中,图5示出了本申请实施例提供的无线通信模块及天线的另一种原理 结构。如图5所示,IoT设备200可以包括处理器210,无线通信模块250和天线3。其中,无线通信模块250包括无线模块251和可变阻抗电路模块252。天线3用于发射和接收无线信号。可变阻抗电路模块252可为由可变阻抗组成的电路或者集成线路等。处理器210通过控制调整可变阻抗电路模块252的阻抗值,调节加载于天线3的发射功率,从而控制天线3发射无线信号时的发射距离。示例性的,可变阻抗电路模块252的阻值为第一阻值时,天线3的发射功率为第一发射功率,此时天线3发射无线信号的距离为第一发射距离(实现强天线的功能);可变阻抗电路模块252的阻值为第二阻值时,天线3的发射功率为第二发射功率,此时天线3发射无线信号的距离为第二发射距离(实现弱天线的功能)。其中,第一发射功率大于第二发射功率;第一发射距离大于预设的安全距离,第二发射距离小于或等于预设的安全距离。在一些实施例中,第一发射距离和第二发射距离可分别称为第一距离和第二距离。在图5对应的另一种示例中,有关处理器210、无线通信模块250的其他说明,与图4对应的一种示例中的相关描述相同,此处不再赘述。In another example, FIG. 5 shows another principle structure of the wireless communication module and the antenna provided by the embodiments of the present application. As shown in FIG. 5 , the IoT device 200 may include a processor 210 , a wireless communication module 250 and an antenna 3 . The wireless communication module 250 includes a wireless module 251 and a variable impedance circuit module 252 . Antenna 3 is used to transmit and receive wireless signals. The variable impedance circuit module 252 may be a circuit composed of variable impedance, an integrated circuit, or the like. The processor 210 controls and adjusts the impedance value of the variable impedance circuit module 252 to adjust 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 the distance at which the wireless signal is transmitted by the antenna 3 is the first transmission distance (to achieve a strong antenna). function); 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 the distance at which the antenna 3 transmits the wireless signal is the second transmission distance (to realize the function of the weak antenna) ). Wherein, the first transmit power is greater than the second transmit power; the first transmit distance is greater than a preset safe distance, and the second transmit distance is less than or equal to the preset safe distance. In some embodiments, the first transmission distance and the second transmission distance may be referred to as a first distance and a second distance, respectively. In another example corresponding to FIG. 5 , other descriptions about the processor 210 and the wireless communication module 250 are the same as those in the example corresponding to FIG. 4 , and are not repeated here.
需要说明的是,虽然图4和图5中的无线通信模块及天线的结构是以IoT设备200为例说明的,但IoT设备100也可包括无线通信模块及天线的结构。比如,与图4中的附图标记相对应的,IoT设备100可以包括处理器110,无线通信模块160,天线2和天线5(图2中未示出天线5;天线5也连接无线通信模块160)。与图5中的附图标记相对应的,IoT设备100可以包括处理器110,无线通信模块160和天线2。具体说明与有关图4、图5的说明相同或类似,此处不再赘述。可选地,IoT设备200也可不具有图4或图5示出的结构,而IoT设备100具有图4或图5示出的结构。It should be noted that although the structures of the wireless communication module and the antenna in FIG. 4 and FIG. 5 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 FIG. 4, the IoT device 100 may include a processor 110, a wireless communication module 160, an antenna 2 and an antenna 5 (the antenna 5 is not shown in FIG. 2; the antenna 5 is also connected to the wireless communication module 160). Corresponding to the reference numerals in FIG. 5 , 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 FIG. 4 and FIG. 5 , and will not be repeated here. Optionally, the IoT device 200 may not have the structure shown in FIG. 4 or FIG. 5 , while the IoT device 100 may have the structure shown in FIG. 4 or FIG. 5 .
可以理解的是,图4对应的一种示例和图5对应的另一种示例中示意的原理结构并不构成对IoT设备200中的无线通信模块及天线的具体限定。在另一些实施例中,IoT设备200中的无线通信模块及天线的结构可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。相应地,上述内容也适于IoT设备100的无线通信模块及天线的结构;此处不再赘述。It can be understood that the principle structures illustrated in one example corresponding to FIG. 4 and another example corresponding to FIG. 5 do not constitute specific limitations on the wireless communication module and the antenna in the IoT device 200 . In other embodiments, the structure of the wireless communication module and the antenna in the IoT device 200 may include more or less components than those shown in the figure, or combine some components, or separate some components, or arrange different components . 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 the antenna of the IoT device 100 ; details are not repeated here.
在一些实施例中,上述强天线和弱天线可以共用一部分走线,例如图6-图8所示实施例中的描述。In some embodiments, the above-mentioned strong antenna and weak antenna may share a part of the wiring, for example, as described in the embodiments shown in FIGS. 6-8 .
示例性地,图6-图8示出了图4中强天线和弱天线的三种实现方式。IoT设备100的一种无线通信模块及天线的结构,也可采用图6-图8示出的三种方式。如图6-图8所示,强天线和弱天线可以共用一部分走线。Exemplarily, FIGS. 6-8 show three implementations of the strong antenna and the weak antenna in FIG. 4 . The structure of a wireless communication module and an antenna of the IoT device 100 may also adopt the three manners shown in FIGS. 6-8 . As shown in Figure 6-Figure 8, the strong antenna and the weak antenna can share a part of the wiring.
本申请实施例中电子设备中的强天线和弱天线可以通过射频开关进行切换。物理上可以将弱天线与射频开关(如图6-图8中虚线框中所示为弱天线)都置于屏蔽罩内或者将弱天线置于芯片内。The strong antenna and the weak antenna in the electronic device in the embodiment of the present application can be switched by a radio frequency switch. Physically, both the weak antenna and the radio frequency switch (the weak antenna shown in the dotted box in Figure 6 to Figure 8) can be placed in the shielding case or the weak antenna can be placed in the chip.
本申请实施例中的弱天线的目的就是要尽可能减小发射距离。构造弱天线的原理可以是:The purpose of the weak antenna in the embodiment of the present application is to reduce the transmission distance as much as possible. The principle of constructing a weak antenna can be:
(1)减小天线长度,从而减小辐射到空气中的电磁波;(1) Reduce the length of the antenna, thereby reducing the electromagnetic waves radiated into the air;
(2)减小辐射效率,通过电阻将一部分的电磁波辐射转化为热能消耗掉;(2) Reduce the radiation efficiency, and convert a part of the electromagnetic wave radiation into heat energy and consume it through the resistance;
(3)降低回波损耗,将部分射频能量反射回芯片内部等。(3) Reduce the return loss, reflect part of the radio frequency energy back into the chip, etc.
弱天线具体的实现可以采用:The specific implementation of weak antenna can be used:
(i)将天线变短;(i) shorten the antenna;
(ii)将强天线路径中某点断开,或者在该点通过电阻、电感或者电容接地;(ii) disconnect a point in the strong antenna path, or at that point through a resistor, inductor, or capacitor to ground;
(iii)使用屏蔽罩等。(iii) Use a shielding case or the like.
应理解,上述弱天线具体的实现(i)和(ii)可以在PCB板上或者芯片内部实现。It should be understood that the specific implementation (i) and (ii) of the above weak antenna may be implemented on a PCB board or inside a chip.
还应理解,上述屏蔽罩的作用是为了削弱辐射。It should also be understood that the function of the above-mentioned shield is to attenuate radiation.
还应理解,上述将天线变短是指弱天线相比于强天线来说,弱天线更短。图6至图8所示的三种弱天线的结构,弱天线如图6至图8的虚线框中的结构所示。图6至图8中强天线的结构都是通过射频输入输出(radio frequency input/output,RFIO)引脚连接滤波电路(例如,π型电路)、匹配电路(例如,π型电路)以及匹配电路外的天线体(例如,该天线体可以是一段金属走线)。图6中虚线框所示的弱天线a、图7中虚线框所示的弱天线b以及图8中虚线框所示的弱天线c的长度不同,但是相比于强天线都更短。滤波电路的作用是防止干扰,匹配电路是用来与强天线匹配。It should also be understood that the above-mentioned shortening of the antenna means that the weak antenna is shorter than the strong antenna. Three kinds of weak antenna structures are shown in FIGS. 6 to 8 , and the weak antenna is shown as the structure in the dotted box in FIGS. 6 to 8 . The structures of the strong antennas in Figures 6 to 8 are connected to a filter circuit (eg, a π-type circuit), a matching circuit (eg, a π-type circuit) and a matching circuit through radio frequency input/output (RFIO) pins External antenna body (eg, the antenna body may be a length of metal trace). The weak antenna a shown in the dashed box in FIG. 6 , the weak antenna b shown in the dashed box in FIG. 7 , and the weak antenna c shown in the dashed box in FIG. 8 have different lengths, but are shorter than the strong antennas. The function of the filter circuit is to prevent interference, and the matching circuit is used to match the strong antenna.
示例性的,如图6所示,弱天线a可以位于屏蔽罩内。其中,弱天线a可以包括屏蔽罩内Wi-Fi芯片的RFIO引脚和两路开关中的第一路开关(第一路开关不连接任何器件)。有时,弱天线a还可包括在RFIO引脚和第一路开关之间的走线。其中,两路开关指的是走线或RFIO引脚与滤波电路之间的开关。通过该两路开关可以将走线或RFIO引脚,与滤波电路连通或者断开。所述第一路开关为图6所示的与RFIO引脚或走线相连、且与滤波电路之间断开的开关。应理解,本申请实施例中的两路开关可以是单刀双掷开关。Exemplarily, as shown in FIG. 6 , the weak antenna a may be located in the shielding case. Wherein, the weak antenna a may include the RFIO pin of the Wi-Fi chip in the shield and the first switch of the two switches (the first switch is not connected to any device). Sometimes, the weak antenna a may also include a trace between the RFIO pin and the first switch. Among them, the two-way switch refers to the switch between the trace or RFIO pin and the filter circuit. Through the two-way switch, the trace or the RFIO pin can be connected or disconnected from the filter circuit. The first switch is the switch shown in FIG. 6 that is connected to the RFIO pin or trace and disconnected from the filter circuit. It should be understood that the two-way switch in the embodiment of the present application may be a single-pole double-throw switch.
示例性的,如图7所示,弱天线b可以位于屏蔽罩内。其中,弱天线b可以包括屏蔽罩内Wi-Fi芯片的RFIO引脚、两路开关的第一路开关(第一路开关连接电阻)和匹配器件。有时,弱天线b还可包括在RFIO引脚和第一路开关之间的第一走线。有时,弱天线b还可包括匹配器件与地之间的第二走线。匹配器件可以为电阻。通过电阻接地可以将一部分的电磁波辐射转化为热能消耗掉,从而减小了弱天线b的辐射效率。其中,所述两路开关指的是RFIO引脚或第一走线与电阻、滤波电路之间的开关,通过该开关,可以将RFIO引脚或第一走线与电阻相连、与滤波电路断开,或者可以将RFIO引脚或第一走线与电阻断开、而与滤波电路相连通。所述的第一路开关为所述两路开关中与匹配器件相连、且与滤波电路断开的开关。Exemplarily, as shown in FIG. 7 , the weak antenna b may be located in the shielding case. Wherein, the weak antenna b may include the RFIO pin of the Wi-Fi chip in the shield, the first switch of the two switches (the first switch is connected to a resistor), and a matching device. Sometimes, the weak antenna b may also include a first trace between the RFIO pin and the first switch. Sometimes, the weak antenna b may also include a second trace between the matching device and the ground. The matching device can be a resistor. Part of the electromagnetic wave radiation can be converted into heat energy and consumed by grounding the resistance, thereby reducing the radiation efficiency of the weak antenna b. The two-way switch refers to the switch between the RFIO pin or the first wiring and the resistor and filter circuit. Through this switch, the RFIO pin or the first wiring can be connected to the resistor and disconnected from the filter circuit. On, or the RFIO pin or the first trace can be disconnected from the resistor and connected to the filter circuit. The first switch is a switch connected to the matching device and disconnected from the filter circuit among the two switches.
示例性的,如图8所示,弱天线c可以位于屏蔽罩内。其中,经由芯片匹配的滤波电路后接匹配器件(例如,电阻)到地。弱天线c可以包括屏蔽罩内Wi-Fi芯片的RFIO引脚、滤波电路、两路开关的第一路开关(第一路开关连接电阻)和匹配器件(比如,电阻)。有时,弱天线c还可以包括RFIO引脚与滤波电路之间的第一走线。有时,弱天线c还可以包括滤波电路与匹配器件之间的第二走线。通过匹配器件(比如,电阻)接地可以将一部分的电磁波辐射转化为热能消耗掉,从而减小了弱天线c的辐射效率。其中,所述两路开关指的是屏蔽罩内的滤波电路与匹配器件、屏蔽罩外的匹配电路之间的开关。通过该两路开关,可以将屏蔽罩内的滤波电路与匹配器件相连、与屏蔽罩外的匹配电路断开;或者,可以将屏蔽罩内的滤波电路与匹配器件断开、而与屏蔽罩外的匹配电路相连通。所述的第一路开关为用于连接屏蔽罩内的滤波电路与匹配器件的开关。Exemplarily, as shown in FIG. 8 , the weak antenna c may be located in the shield. Wherein, the filter circuit matched by the chip is followed by a matching device (for example, a resistor) to the ground. The weak antenna c may include the RFIO pin of the Wi-Fi chip in the shield, the filter circuit, the first switch of the two switches (the first switch is connected to a resistor), and a matching device (eg, a resistor). Sometimes, the weak antenna c may also include a first trace between the RFIO pin and the filter circuit. Sometimes, the weak antenna c may further include a second trace between the filter circuit and the matching device. Part of the electromagnetic wave radiation can be converted into heat energy and consumed by grounding a matching device (for example, a resistor), thereby reducing the radiation efficiency of the weak antenna c. Wherein, the two-way switch refers to the switch between the filter circuit inside the shield, the matching device, and the matching circuit outside the shield. Through the two-way switch, the filter circuit in the shield can be connected to the matching device and disconnected from the matching circuit outside the shield; connected to the matching circuit. The first switch is a switch used to connect the filter circuit and the matching device in the shield.
应理解,上述图6至图7中的强天线可以包括RFIO引脚、两路开关中的第二路开关,滤波电路、匹配电路以及匹配电路外连接的天线体。有时,图6至图7中的强天线还可以 包括RFIO引脚与所述两路开关中的第二路开关之间的走线。所述第二路开关为用于连接RFIO引脚与滤波电路的开关。It should be understood that the above-mentioned strong antennas in FIGS. 6 to 7 may include RFIO pins, the second switch of the two switches, a filter circuit, a matching circuit, and an antenna body externally connected to the matching circuit. Sometimes, the strong antenna in Figures 6 to 7 may also include a trace between the RFIO pin and the second switch of the two switches. The second switch is a switch used to connect the RFIO pin and the filter circuit.
上述图8中的强天线可以包括RFIO引脚、滤波电路、两路开关中的第二路开关、匹配电路以及匹配电路外连接的天线体。有时,图8中的强天线还可以包括RFIO引脚与滤波电路之间的走线。所述第二路开关为用于连接屏蔽罩内的滤波电路与屏蔽罩外的匹配电路的开关。The above-mentioned strong antenna in FIG. 8 may include an RFIO pin, a filter circuit, a second switch of the two switches, a matching circuit, and an antenna body externally connected to the matching circuit. Sometimes the strong antenna in Figure 8 can also include traces between the RFIO pins and the filter circuit. The second switch is a switch used to connect the filter circuit inside the shield and the matching circuit outside the shield.
应理解,图4所示的无线通信模块250可以是Wi-Fi芯片,也可以是Wi-Fi芯片及与其匹配的电路。图5所示的无线模块251可以是Wi-Fi芯片,图5所示的无线通信模块250可以是Wi-Fi芯片及与其匹配的电路。It should be understood that the wireless communication module 250 shown in FIG. 4 may be a Wi-Fi chip, or may be a Wi-Fi chip and its matching circuit. The wireless module 251 shown in FIG. 5 may be a Wi-Fi chip, and the wireless communication module 250 shown in FIG. 5 may be a Wi-Fi chip and its matching circuit.
以上不同的弱天线结构配合Wi-Fi芯片的不同发射功率(Tx power)的设置,可以达到不同的超短距通讯的要求(例如,从10cm到2m)。The above different weak antenna structures, together with the different transmit power (Tx power) settings of the Wi-Fi chip, can meet different ultra-short-range communication requirements (for example, from 10cm to 2m).
示例性的,表1示出了几种不同的第一天线结构配合Wi-Fi芯片时不同发射功率的通讯距离。Exemplarily, Table 1 shows the communication distances of different transmit powers when several different first antenna structures cooperate with the Wi-Fi chip.
表1Table 1
Figure PCTCN2022081248-appb-000002
Figure PCTCN2022081248-appb-000002
示例性的,表2示出了几种不同的第一天线结构配合蓝牙芯片时不同发射功率的通讯距离。Exemplarily, Table 2 shows the communication distances of different transmit powers when several different first antenna structures cooperate with the Bluetooth chip.
表2Table 2
Figure PCTCN2022081248-appb-000003
Figure PCTCN2022081248-appb-000003
示例性的,表3示出了几种不同的第一天线结构配合ZigBee芯片时不同发射功率的通讯距离。Exemplarily, Table 3 shows the communication distances of different transmit powers when several different first antenna structures cooperate with the ZigBee chip.
表3table 3
Figure PCTCN2022081248-appb-000004
Figure PCTCN2022081248-appb-000004
由于芯片内物理器件的特性,天线最大发射功率和最小发射功率之差是相关联的。如果把第一设备的最小发射功率降得很低,则最大发射功率也会被降低,这样就不满足正常工作时的距离要求。本申请实施例中,由于不同的智能设备的结构不同以及对智能设备的 安全性能要求不同,所以智能设备的生产厂商可以采用不同的第一天线结构以及发射功率来保证智能设备的通讯距离。示例性的,对于不同的智能空调生产厂商,其智能空调外壳的厚度可能不同,那么在第一天线结构相同以及发射功率相同的情况下,智能空调能够被发现的通讯距离也可能不同。不同的智能设备生产厂商可以根据其智能设备本身的结构,配合第一天线的结构以及一定的发射功率,从而测试出智能设备被发现的安全距离。Due to the characteristics of the physical device on the chip, the difference between the maximum transmit power and the minimum transmit power of the antenna is correlated. If the minimum transmit power of the first device is reduced very low, the maximum transmit power will also be reduced, so that the distance requirement during normal operation cannot be met. In the embodiment of the present application, since different smart devices have different structures and different requirements for the security performance of the smart devices, manufacturers of smart devices can use different first antenna structures and transmit powers to ensure the communication distance of the smart devices. Exemplarily, for different smart air conditioner manufacturers, the thickness of the smart air conditioner shell may be different, so under the condition of the same first antenna structure and the same transmit power, the communication distance at which the smart air conditioner can be discovered may also be different. Different smart device manufacturers can test the safe distance at which the smart device can be discovered according to the structure of the smart device itself, in conjunction with the structure of the first antenna and a certain transmit power.
应理解,本申请实施例中,第一设备包括多个芯片(例如,第一设备包括Wi-Fi芯片、蓝牙芯片和ZigBee芯片),则第一设备中的Wi-Fi芯片、蓝牙芯片和ZigBee芯片可以共用上述图6中的第一天线和第二天线;或者,第一设备中的Wi-Fi芯片、蓝牙芯片和ZigBee芯片可以共用上述图7中的第一天线和第二天线;或者,第一设备中的Wi-Fi芯片、蓝牙芯片和ZigBee芯片可以共用上述图8中的第一天线和第二天线。It should be understood that, in this embodiment of the present application, 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, Bluetooth chip, and ZigBee chip in the first device The chip can share the first antenna and the second antenna in the above-mentioned FIG. 6; or, the Wi-Fi chip, the Bluetooth chip and the ZigBee chip in the first device can share the above-mentioned first antenna and the second antenna in FIG. 7; or, The Wi-Fi chip, the Bluetooth chip, and the ZigBee chip in the first device may share the first antenna and the second antenna in FIG. 8 above.
或者,第一设备中的Wi-Fi芯片、蓝牙芯片和ZigBee芯片也可以不共用第一天线和第二天线。Alternatively, 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.
还应理解,上述图6至图8为物理上的第一天线和第二天线,第一设备可以通过射频开关切换物理上的第一天线和第二天线。本申请实施例中第一设备也可以在物理上只有一根天线,但是逻辑上包括第一天线和第二天线。It should also be understood that the above-mentioned FIGS. 6 to 8 are the physical first antenna and the second antenna, and the first device can switch the physical first antenna and the second antenna through the radio frequency switch. In this embodiment of the present application, the first device may also have only one antenna physically, but logically includes a first antenna and a second antenna.
第一设备可以通过调节物理上的天线的发射功率,来实现逻辑上的第一天线和第二天线。例如,当物理上的天线的发射功率为第一发射功率时,可以认为是逻辑上的第一天线;当物理上的天线的发射功率为第二发射功率时,可以认为是逻辑上的第二天线;其中,第一发射功率小于第二发射功率。The first device may implement the logical first antenna and the second antenna by adjusting the transmit power of the physical antenna. For example, when the transmit power of the physical antenna is the first transmit power, it can be regarded as the first logical antenna; when the transmit power of the physical antenna is the second transmit power, it can be regarded as the second logical antenna an antenna; wherein the first transmit power is smaller than the second transmit power.
一种可能的实现方式是,第一设备可以通过调节芯片内部的器件来调节物理上的天线的发射功率。例如,第一设备可以通过芯片内部的多级放大器来调节物理上的天线的发射功率。A possible implementation is that the first device can adjust the transmit power of the physical antenna by adjusting the device inside the chip. For example, the first device may adjust the transmit power of the physical antenna through a multi-stage amplifier inside the chip.
例如,第一设备可以通过调节寄存器的值来屏蔽芯片内部的多级放大器,从而使得物理上的天线的发射功率为第一发射功率,此时可以认为是逻辑上的第一天线;第一设备也可以通过调节寄存器的值从而使得物理上的天线的发射功率为第二发射功率,此时可以认为是逻辑上的第二天线;其中,第一发射功率小于第二发射功率。For example, the first device can shield the multi-stage amplifier inside the chip by adjusting the value of the register, so that the transmit power of the physical antenna is the first transmit power, which can be regarded as the logical first antenna at this time; the first device It is also possible to adjust the value of the register so that the transmit power of the physical antenna is the second transmit power, which can be considered as the logical second antenna at this time; wherein, the first transmit power is smaller than the second transmit power.
另一种可能的实现方式是,第一设备也可以通过芯片外部的外围电路来调节物理上的天线的发射功率。Another possible implementation is that the first device can also adjust the transmit power of the physical antenna through a peripheral circuit outside the chip.
本申请各个实施例中涉及的第一天线和第二天线可以是物理上的第一天线和第二天线,也可以是逻辑上的第一天线和第二天线。The first antenna and the second antenna involved in the various embodiments of the present application may be the physical first antenna and the second antenna, or may be the logical first antenna and the second antenna.
本申请实施例中,第一设备切换逻辑上的第一天线和第二天线与第一设备通过射频开关来切换物理上的第一天线和第二天线可以达到相同的效果。In the embodiment of the present application, the first device switching the logical first antenna and the second antenna can achieve the same effect as the first device switching the physical first antenna and the second antenna through a radio frequency switch.
结合上述示例,以第一距离是5米,第二距离是0.3米为例。当IoT设备200采用第一天线时,如果IoT设备200(位于图9所示的圆心)与IoT设备100之间的距离小于第一距离(如IoT设备100位于图9所示的位置1),IoT设备200可与IoT设备100通信;当IoT设备200采用第二天线时,如果IoT设备200(位于图9所示的圆心)与IoT设备100之间的距离小于第二距离(如IoT设备100位于图9所示的位置2),IoT设备200可与IoT设备100通信。Combining the above examples, take the first distance as 5 meters and the second distance as 0.3 meters as an example. When the IoT device 200 adopts the first antenna, if the distance between the IoT device 200 (located at the center of the circle shown in FIG. 9 ) and the IoT device 100 is smaller than the first distance (eg, the IoT device 100 is located at position 1 shown in FIG. The IoT device 200 can communicate with the IoT device 100; when the IoT device 200 adopts the second antenna, if the distance between the IoT device 200 (located at the center of the circle shown in FIG. 9 ) and the IoT device 100 is smaller than the second distance (such as the IoT device 100 At position 2) shown in FIG. 9 , IoT device 200 can communicate with IoT device 100 .
相应地,当IoT设备200的天线设置为第一发射功率时,如果IoT设备200(位于图 9所示的圆心)与IoT设备100之间的距离小于第一距离(如IoT设备100位于图9所示的位置1),IoT设备200可与IoT设备100通信;当IoT设备200的天线设置为第二发射功率时,如果IoT设备200(位于图9所示的圆心)与IoT设备100之间的距离小于第二距离(如IoT设备100位于图9所示的位置2),IoT设备200可与IoT设备100通信。Accordingly, when the antenna of the IoT device 200 is set to the first transmit power, if the distance between the IoT device 200 (located at the center of the circle shown in FIG. 9 ) and the IoT device 100 is smaller than the first distance (eg, the IoT device 100 is located in FIG. Position 1) shown, IoT device 200 can communicate with IoT device 100; when the antenna of IoT device 200 is set to the second transmit power, if IoT device 200 (located at the center of the circle shown in FIG. 9 ) and IoT device 100 The distance is less than the second distance (eg, the IoT device 100 is located at position 2 shown in FIG. 9 ), the IoT device 200 can communicate with the IoT device 100 .
实际操作中,第一距离和第二距离的精度不会那么精准,可能会存在一定的误差。这样,会使得第一距离或第二距离在实际操作中呈现一个范围,而不是一个精准的数值距离。另外,在不同的环境下,即使是同样的天线和同样的发射功率,也可能出现第一距离的不同,以及第二距离的不同。In actual operation, the accuracy of the first distance and the second distance will not be so accurate, 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 transmit power, differences in the first distance and differences in the second distance may occur.
需要说明的是,虽然在图1-图9的描述中,是以IoT设备100和IoT设备200两个IoT设备为例来描述应用场景的,但实际上在上述的应用场景下,还可以有其他的IoT设备,比如IoT设备400等;此处不对其他的IoT设备的数量进行限制。IoT设备400等其他的IoT设备,可以参见有关IoT设备100或IoT设备200的相关描述。此处不再赘述。It should be noted that, although in the descriptions of Figures 1-9, two IoT devices, the IoT device 100 and the IoT device 200, are used as examples to describe the application scenario, in fact, in the above application scenario, there may also be Other IoT devices, such as IoT device 400, etc.; the number of other IoT devices is not limited here. For other IoT devices such as the IoT device 400 , please refer to the relevant description of the IoT device 100 or the IoT device 200 . It will not be repeated here.
下面,结合图10-图24来具体介绍本申请实施例所提供的IoT设备设置方法的实施例一至实施例三。Hereinafter, Embodiment 1 to Embodiment 3 of the IoT device setting method provided by the embodiments of the present application will be described in detail with reference to FIG. 10 to FIG. 24 .
实施例一Example 1
实施例一涉及图10-图14。其中,图10-图13示出了本申请实施例提供的IoT设备设置方法中设置IoT设备加入群组的通信交互流程。图14示出了相应的演示示意图。在实施例一中,IoT设备100位于第一群组,第一群组的群组ID为第一群组ID。图10-图13分别示出了实施例一下的四种不同实施方式的流程。以下结合图10-图13详细说明。Embodiment 1 relates to FIGS. 10-14 . 10 to 13 illustrate a communication interaction process of setting an IoT device to join a group in the IoT device setting method provided by the embodiment of the present application. Figure 14 shows the corresponding demonstration schematic. In the first embodiment, the IoT device 100 is located in the first group, and the group ID of the first group is the first group ID. Figures 10-13 respectively show the flow of four different implementations under the embodiment. The detailed description is given below with reference to FIGS. 10-13 .
在图10所示的实施方式中,IoT设备100具有第一天线(强天线)以及第二天线(弱天线),第一天线的发射距离为第一距离,第二天线的发射距离为第二距离,其中,第一天线和第二天线为不同的天线,第一距离大于第二距离。In the embodiment shown in FIG. 10 , 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 antenna distance, wherein the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.
如图10所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 10, the method for setting IoT devices to join a group may include:
S701a、通过IoT设备100的第一天线,广播第一消息,第一消息包括招揽群组成员的信息和IoT设备100的MAC地址。S701a, broadcast a first message through the first antenna of the IoT device 100, where the first message includes information on soliciting group members and the MAC address of the IoT device 100.
示例性的,在S701a之前,IoT设备100接收到一个输入以触发S701a的执行;该输入可以为一个用户输入,比如IoT设备100接收到一个触摸输入或语音输入;该输入也可以为其他智能设备发送来的消息或指令。Exemplarily, before S701a, the IoT device 100 receives an input to trigger the execution of S701a; the input can be a user input, for example, the IoT device 100 receives a touch input or voice input; the input can also be other smart devices message or instruction sent.
例如,在IoT设备100上设置有进组按钮,当用户按动进组按钮时触发IoT设备100执行S701a;又例如,长按IoT设备100的电源按键5秒以上触发IoT设备100执行S701a;又例如,在移动设备上打开远程控制IoT设备100的APP,使用移动设备远程连接到IoT设备100,通过操作APP触发IoT设备100执行S701a。For example, a group enter button is provided on the IoT device 100, and when the user presses the group enter button, the IoT device 100 is triggered to execute S701a; for another example, long pressing the power button of the IoT device 100 for more than 5 seconds triggers the IoT device 100 to execute S701a; For example, open the APP that remotely controls the IoT device 100 on the 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.
示例性的,在S701a之前,当IoT设备100位于多个群组时,触发IoT设备100执行S701a的输入还包括选定一个或多个IoT设备100所位于的群组的信息。例如,灯具A位于客厅灯具组和黄光灯具组内。当需要为客厅灯具组增添新成员时,在移动设备上打开 远程控制智能灯具的APP,使用移动设备远程连接到灯具A,通过操作APP选定客厅灯具组,触发灯具A针对客厅灯具组执行S701a。Exemplarily, before S701a, when the IoT device 100 is located in multiple groups, the input triggering the IoT device 100 to execute S701a further includes information of selecting groups in which one or more IoT devices 100 are located. For example, fixture A is located in the living room fixture group and the yellow light fixture group. When a new member needs to be added to the living room lighting group, open the APP for remote control of smart lighting on the mobile device, use the mobile device to remotely connect to lighting A, select the living room lighting group by operating the APP, and trigger lighting A to execute S701a for the living room lighting group .
示例性的,在S701a中,IoT设备100可以采用多种可行的通信协议以实现广播第一消息。在某些通信协议设置中,广播数据包会携带真实设备地址;而在另一些通信协议设置中,广播数据包不会携带真实设备地址。例如,在蓝牙低能耗(bluetooth low energy)通信协议中,广播数据包可以携带公共设备地址(public device address),public device address即为蓝牙设备的真实地址,基于public device address可以直接寻址到蓝牙设备;广播数据包也可以携带随机设备地址(random device address),random device address并不是蓝牙设备的真实地址,基于random device address无法直接寻址到蓝牙设备。当IoT设备100采用不携带真实设备地址的通信协议格式广播第一消息时,第一消息的消息内容包括IoT设备100的真实设备地址,例如,MAC地址。而当IoT设备100采用携带真实设备地址的通信协议格式广播第一消息时,则第一消息的消息内容无需包括IoT设备100的真实设备地址,直接使用第一消息的消息架构中所携带的真实设备地址。Exemplarily, in S701a, the IoT device 100 may adopt various feasible communication protocols to implement broadcasting of the first message. In some communication protocol settings, broadcast packets carry the real device address; in other communication protocol settings, broadcast packets do not carry the real device address. For example, in the Bluetooth low energy (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, it can be directly addressed to the Bluetooth device; the broadcast data packet can also carry a random device address (random device address). The random device address is not the real address of the Bluetooth device, and the Bluetooth device cannot be directly addressed based on the random device address. 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. However, when the IoT device 100 broadcasts the first message in the communication protocol format carrying 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 directly uses the real device address carried in the message structure of the first message. Device address.
S702a、IoT设备200在位于IoT设备100的第一天线的发射距离内,接收到第一消息,获取到招揽群组成员的信息和IoT设备100的MAC地址。S702a, the IoT device 200 receives the first message within the transmission distance of the first antenna of the IoT device 100, and acquires the information of soliciting group members and the MAC address of the IoT device 100.
S703a、IoT设备200向IoT设备100发送第一响应消息,第一响应消息包括愿意加入群组的信息和IoT设备200的MAC地址。S703a, the IoT device 200 sends a first response message to the IoT device 100, where the first response message includes the information of willingness to join the group and the MAC address of the IoT device 200.
与S701a相同,在S703a中,IoT设备200也可以采用多种可行的通信协议以实现向IoT设备100发送第一响应消息,此处不再赘述。Similar to S701a, in S703a, the IoT device 200 may also adopt a variety of feasible communication protocols to implement sending the first response message to the IoT device 100, which will not be repeated here.
S704a、IoT设备100接收到第一响应消息,获取到愿意加入群组的信息和IoT设备200的MAC地址。S704a, the IoT device 100 receives the first response message, and obtains the information of willingness to join the group and the MAC address of the IoT device 200.
S705a、IoT设备100通过IoT设备100的第二天线,向IoT设备200发送第二消息,第二消息包括第一群组ID,第一群组ID为IoT设备100所在的群组ID。S705a, the IoT device 100 sends a second message to the IoT device 200 through the second antenna of the IoT device 100, where the second message includes a first group ID, and the first group ID is the group ID where the IoT device 100 is located.
可选的,IoT设备100包含存储器;存储器存储有IoT设备100所属群组的群组ID等群组信息。在S705a中,IoT设备100直接调用存储器中存储的第一群组ID以生成第二消息。Optionally, the IoT device 100 includes a memory; the memory stores group information such as a group ID of a 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 the second message.
可选的,IoT设备100本地并不保存IoT设备100所属群组的群组ID。在执行S705a之前,IoT设备100从其他设备(例如,IoT服务器300,或者,连接到IoT服务器300的移动设备)处获取第一群组ID。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 (eg, the IoT server 300, or a mobile device connected to the IoT server 300).
例如,在IoT设备100被触发执行S701a时,IoT设备100向IoT服务器300发送群组ID获取请求,群组ID获取请求包含IoT设备100的设备标识以及请求获取群组ID的信息。IoT服务器300接收到群组ID获取请求后,根据IoT设备100的设备标识搜索到对应的第一群组ID,将第一群组ID反馈给IoT设备100。当IoT服务器300根据IoT设备100的设备标识无法搜索到对应的群组ID时,IoT服务器300针对IoT设备100创建新的群组(创建第一群组),生成新的群组ID(生成第一群组ID)。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, and the group ID acquisition request includes the device identifier of the IoT device 100 and the information requested to acquire the group ID. After receiving the group ID acquisition request, the IoT server 300 searches for a 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 identification of the IoT device 100, the IoT server 300 creates a new group for the IoT device 100 (creates the first group), and generates a new group ID (creates the first group). a group ID).
又例如,在S704a之后,当IoT设备100根据第一响应消息判断IoT设备200愿意加入群组后,IoT设备100向IoT服务器300发送群组ID获取请求以请求获取第一群组ID。For another example, after S704a, after 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.
又例如,在移动设备上打开远程控制IoT设备100的APP,使用移动设备远程连接到IoT设备100以及IoT服务器300。移动设备将IoT设备100的设备标识发送IoT服务器 300,IoT服务器300向移动设备反馈IoT设备100的第一群组ID。移动设备将第一群组ID发送到IoT设备100并触发IoT设备100执行S701a。For another example, open the APP that remotely controls 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 identification 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.
S706a,IoT设备200在位于IoT设备100的第二天线的发射距离内,接收到第二消息,获取到第一群组ID。S706a, the IoT device 200 receives the second message within the transmission distance of the second antenna of the IoT device 100, and acquires the first group ID.
由于第二天线为弱天线,第二天线的发射距离较短。因此,只有IoT设备200靠近IoT设备100时才能接收到第二消息。因此,IoT设备100在S705a中通过第二天线发送第二消息,可以有效避免第二消息被其他设备获取,从而大大提高数据安全性。Since the second antenna is a weak antenna, the transmission distance of the second antenna is short. Therefore, the second message can only be received when the IoT device 200 is close to the IoT device 100 . Therefore, the IoT device 100 sends the second message through the second antenna in S705a, which can effectively prevent the second message from being acquired by other devices, thereby greatly improving data security.
S707a、IoT设备200判断IoT设备200是否已加入第一群组ID对应的第一群组。S707a, the IoT device 200 determines whether the IoT device 200 has joined the first group corresponding to the first group ID.
在实际应用场景中,在S706a之前,IoT设备200可能已经加入IoT设备100的第一群组。例如,在IoT设备200靠近IoT设备100并完成加入群组操作后,IoT设备200远离IoT设备100并再次靠近,导致S702a、S703a、S704a、S705a以及S706a的再次执行,此时如果继续执行后续的加入群组操作,势必造成处理资源的浪费。因此,在S707a之后,如果IoT设备200已加入第一群组ID对应的第一群组,则无需进行后续的加入群组操作,从而避免重复进行加入群组操作以导致处理资源浪费。In a practical application scenario, before S706a, the IoT device 200 may have joined the first group of the IoT device 100. For example, after the IoT device 200 approaches the IoT device 100 and completes the operation of joining the group, the IoT device 200 moves away from the IoT device 100 and approaches again, resulting in the execution of S702a, S703a, S704a, S705a and S706a again. Joining a group operation is bound to cause a 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 subsequent group join operations, thereby avoiding repeated group join operations and waste of processing resources.
S708a、如果IoT设备200尚未加入第一群组ID对应的第一群组,IoT设备200向IoT服务器300发送加入群组消息,加入群组消息包括第一群组ID和IoT设备200的设备标识(Device ID)。Device ID可以唯一标识IoT设备。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 join message to the IoT server 300, where the group join message includes the first group ID and the device identifier of the IoT device 200 (Device ID). Device ID can uniquely identify IoT devices.
S709a、IoT服务器300接收到加入群组消息,获取到第一群组ID和IoT设备200的Device ID。S709a, the IoT server 300 receives the group join message, and obtains the first group ID and the Device ID of the IoT device 200.
S710a、IoT服务器300判断IoT设备200对应的属性与第一群组对应的属性是否匹配。S710a. The IoT server 300 determines whether the attribute corresponding to the IoT device 200 matches the attribute corresponding to the first group.
在实际应用场景中,IoT设备200可能并不是能够加入第一群组的正确设备。例如,灯具A(IoT设备100)被安装在客厅,其位于客厅灯具组。用户本来要将灯具B(灯具B未位于任何群组)加入到客厅灯具组,但用户拿错灯具B,误以为灯具C为灯具B,将位于卧室灯具组的灯具C靠近灯具A,导致S701a-S709a的执行。如果IoT服务器300继续进行加入群组操作,令灯具C加入到客厅灯具组,就会发生设置错误。因此,在S710a之后,如果IoT设备200对应的属性与第一群组对应的属性不匹配,则IoT设备200不可以加入第一群组,这样就可以有效避免群组设置错误。In an actual application scenario, the IoT device 200 may not be the correct device that can join the first group. For example, light fixture A (IoT device 100 ) is installed in the living room, which is located in the living room light fixture group. The user originally wanted to add light fixture B (light fixture B is not in any group) to the living room light fixture group, but the user took the wrong light fixture B, mistakenly thought light fixture C was light fixture B, and placed light fixture C in the bedroom light fixture group close to light fixture A, resulting in S701a - Execution of S709a. If the IoT server 300 continues to perform the operation of adding a group to add the light fixture C to the living room light fixture group, a setting error will occur. Therefore, after S710a, if the attribute corresponding to the IoT device 200 does not match the attribute corresponding to the first group, the IoT device 200 cannot join the first group, which can effectively avoid group setting errors.
可选地,用户可以通过IoT设备上的重置按钮或者通过移动设备的APP重新设置IoT设备上的群组属性及其他属性。如,灯具C原本位于卧室灯具组,可通过上述的重置方式,重新设置灯具C不属于任何群组。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 of the mobile device. For example, the fixture C was originally located in the bedroom fixture group, and the above reset method can be used to reset the fixture C to not belong to any group.
示例性的,群组对应的属性可以是任意形式的属性。群组对应的属性一种或多种设备功能属性(例如,照明设备、开关设备),也可以是一种或多种场景属性(例如,客厅设备、卧室设备),还可以是由用户人为标记的属性(例如,被用户标记为需要优先控制的设备)。同一群组的设备,在针对群组对应的属性上保持一致,但并不是说同一群组的设备必须为同一型号的设备。Exemplarily, the attribute corresponding to the group may be an attribute in any form. The attribute corresponding to the group can be one or more device function attributes (for example, lighting equipment, switch equipment), or one or more scene attributes (for example, living room equipment, bedroom equipment), and can also be manually marked by the user properties (for example, a device marked by the user as requiring priority control). Devices in the same group have the same attributes corresponding to the group, but it does not mean that the devices in the same group must be of the same model.
例如,灯具A(IoT设备100)被安装在客厅,灯具A的设备功能属性为灯具,灯具A的位置属性为客厅。灯具A位于客厅灯具组(第一群组),客厅灯具组的群组属性为灯具以及客厅。用户希望将灯具B也安装在客厅,灯具B的设备功能属性为灯具,灯具B 的位置属性为客厅。用户触发灯具A执行S701a。之后,用户将灯具B靠近灯具A,导致S701a-S709a的执行(灯具B作为IoT设备200)。之后,在S710a中,IoT服务器300判断灯具B的设备功能属性(灯具)以及位置属性(客厅)与客厅灯具组的群组属性(灯具以及客厅)匹配。因此,灯具B可以加入客厅灯具组。For example, fixture A (IoT device 100 ) is installed in a living room, the device function attribute of fixture A is fixture, and the location property of fixture A is living room. The light fixture A is located in the living room light fixture group (the first group), and the group attributes of the living room light fixture group are light fixtures and living room. The user wishes to install the light fixture B in the living room, the device function attribute of the light fixture B is light fixture, and the location property of the light fixture B is the living room. The user triggers the fixture A to execute S701a. After that, the user brings the fixture B close to the fixture A, resulting in the execution of S701a-S709a (the fixture B acts as the IoT device 200). Then, in S710a, the IoT server 300 determines that the device function attribute (lamp) and location attribute (living room) of the fixture B match the group attributes (lamp and living room) of the living room fixture group. Therefore, fixture B can be added to the living room fixture group.
又例如,灯具A(IoT设备100)被安装在客厅,灯具A的设备功能属性为灯具,灯具A的位置属性为客厅。灯具A位于客厅设备组(第一群组),客厅设备组的群组属性为客厅。用户希望将智能音箱C摆放在客厅,智能音箱C的设备功能属性为音箱,智能音箱C的位置属性为客厅。用户触发灯具A执行S701a。之后,用户将智能音箱C靠近灯具A,导致S701a-S709a的执行(智能音箱C作为IoT设备200)。之后,在S710a中,IoT服务器300判断智能音箱C的位置属性(客厅)与客厅设备组的群组属性(客厅)匹配。因此,即使智能音箱C与灯具A为功能完全不同的设备,智能音箱C也可以加入客厅设备组。For another example, lamp A (IoT device 100 ) is installed in a living room, the device function attribute of lamp A is lamp, and the location attribute of lamp A is living room. Lamp A is located in the living room equipment group (the first group), and the group attribute of the living room equipment group is living room. The user wants to place the smart speaker C in the living room, the device function attribute of the smart speaker C is the speaker, and the location attribute of the smart speaker C is the living room. The user triggers the fixture A to execute S701a. After that, the user brings the smart speaker C close to the light fixture A, resulting in the execution of S701a-S709a (the smart speaker C acts as the IoT device 200). After that, in S710a, the IoT server 300 determines that the location attribute (living room) of the smart speaker C matches the group attribute (living room) of the living room device group. Therefore, even if the smart speaker C and the lamp A are devices with completely different functions, the smart speaker C can also be added to the living room equipment group.
S711a、当IoT服务器300在S710a中判断IoT设备200对应的属性与第一群组对应的属性匹配时,IoT服务器300向IoT设备200发送第一反馈消息,第一反馈消息包括加入成功的信息。S711a. When the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 matches the attribute corresponding to the first group, the IoT server 300 sends a first feedback message to the IoT device 200, and the first feedback message includes the information of successful joining.
可选的,在S711a中,IoT服务器300还记录IoT设备200加入第一群组(例如,将IoT设备200的Device ID写入第一群组的设备列表)。Optionally, in S711a, the IoT server 300 further records that the IoT device 200 joins the first group (for example, writes the Device ID of the IoT device 200 into the device list of the first group).
S712a、当IoT服务器300在S710a中判断IoT设备200对应的属性与第一群组对应的属性不匹配时,IoT服务器300向IoT设备200发送第二反馈消息,第二反馈消息包括加入失败的信息及原因。S712a. When the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 does not match the attribute corresponding to the first group, the IoT server 300 sends a second feedback message to the IoT device 200, and the second feedback message includes the information of the joining failure and reasons.
S713a、IoT设备200接收到第一反馈消息或第二反馈消息。S713a. The IoT device 200 receives the first feedback message or the second feedback message.
S714a、IoT设备200向IoT设备100发送告知消息,以通知IoT设备100加入群组操作的结果。S714a, the IoT device 200 sends a notification message to the IoT device 100 to notify the IoT device 100 of the result of the operation of joining the group.
示例的,当在S713a中,IoT设备200接收到第一反馈消息时,那么在S714a中,IoT设备200发送的告知消息用于通知IoT设备100,IoT设备200已成功加入群组;当在S713a中,IoT设备200接收到第二反馈消息时,那么在S714a中,IoT设备200发送的告知消息用于通知IoT设备100,IoT设备200无法加入群组以及原因。For example, when the IoT device 200 receives the first feedback message in S713a, then in S714a, the notification 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 , when the IoT device 200 receives the second feedback message, then in S714a, the notification 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.
可替换的,也可以不通过IoT设备200告知IoT设备100加入群组操作的结果。而是由IoT服务器300通知IoT设备100加入群组操作的结果。这样,IoT设备200可以不执行S714a。Alternatively, the IoT device 100 may not be notified of the result of the operation of joining the group through the IoT device 200 . Instead, the IoT server 300 notifies the IoT device 100 of the result of the operation of joining the group. In this way, the IoT device 200 may not execute S714a.
可选的,在S708a中,加入群组消息还包括IoT设备100的MAC地址。当IoT服务器300在S710a中判断IoT设备200对应的属性与第一群组对应的属性匹配时,IoT服务器300记录IoT设备200加入第一群组,并且IoT服务器300基于IoT设备100的MAC地址向IoT设备100发送第三反馈消息,第三反馈消息包括IoT设备200加入群组成功的信息。当IoT服务器300在S710a中判断IoT设备200对应的属性与第一群组对应的属性不匹配时,IoT服务器300基于IoT设备100的MAC地址向IoT设备100发送第四反馈消息,第四反馈消息包括IoT设备200加入群组失败的信息及原因。Optionally, in S708a, the group join message further includes the MAC address of the IoT device 100. When the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 matches the attribute corresponding to the first group, the IoT server 300 records that the IoT device 200 joins the first group, and the IoT server 300 sends a message to the first group based on the MAC address of the IoT device 100. The IoT device 100 sends a third feedback message, where the third feedback message includes information that the IoT device 200 has successfully joined the group. When the IoT server 300 determines in S710a that the attribute corresponding to the IoT device 200 does not match the attribute corresponding to the first group, the IoT server 300 sends a fourth feedback message to the IoT device 100 based on the MAC address of the IoT device 100. The fourth feedback message Including the information and reasons for the failure of the IoT device 200 to join the group.
在图11所示的实施方式中,IoT设备200具有第三天线(强天线)以及第四天线 (弱天线),第三天线的发射距离为第三距离,第四天线的发射距离为第四距离,其中,第三天线和第四天线为不同的天线,第三距离大于第四距离。In the embodiment shown in FIG. 11 , 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 antenna distance, wherein the third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
如图11所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 11, the method for setting an IoT device to join a group may include:
S701b、广播第一消息,第一消息包括招揽群组成员的信息和IoT设备100的MAC地址。S701b. Broadcast a first message, where the first message includes information about recruiting group members and the MAC address of the IoT device 100.
示例性的,与S701a相同,在S701b之前,IoT设备100也接收到一个输入以触发S701a的执行;并且,在S701b中,IoT设备100也可以采用多种可行的通信协议以实现广播第一消息,此处不再赘述。Exemplarily, same as S701a, before S701b, the IoT device 100 also receives an input to trigger the execution of S701a; and, in S701b, the IoT device 100 can also adopt a variety of feasible communication protocols to broadcast the first message. , and will not be repeated here.
S702b、IoT设备200接收到第一消息,获取到招揽群组成员的信息和IoT设备100的MAC地址。S702b, the IoT device 200 receives the first message, and acquires the information of the group member solicitation and the MAC address of the IoT device 100.
S703b、IoT设备200随机生成第一密钥。S703b, the IoT device 200 randomly generates a first key.
第一密钥用于加密之后的IoT设备100与IoT设备200间的数据交互。在本申请实施例中,对第一密钥的生成以及之后步骤中使用第一密钥进行加密的具体实现方式不做限制,可以采用多种不同的密钥方案实现第一密钥的生成以及在之后的步骤中使用第一密钥进行加密。The first key is used for data interaction between the IoT device 100 and the IoT device 200 after encryption. In the embodiments of the present application, the generation of the first key and the specific implementation of encryption using the first key in subsequent steps are not limited, and a variety of different key schemes can be used to realize the generation of the first key and the encryption of the first key. The first key is used for encryption in a later step.
S704b、IoT设备200通过IoT设备200的第四天线,向IoT设备100发送第一响应消息,第一响应消息包括愿意加入群组的信息、第一密钥和IoT设备200的MAC地址。S704b, the IoT device 200 sends a first response message to the IoT device 100 through the fourth antenna of the IoT device 200, where the first response message includes the information of willingness to join the group, the first key, and the MAC address of the IoT device 200.
示例性的,与S703a相同,在S704b中,IoT设备200可以采用多种可行的通信协议以实现向IoT设备100发送第一响应消息,此处不再赘述。Exemplarily, same as in S703a, in S704b, the IoT device 200 may use multiple feasible communication protocols to implement sending the first response message to the IoT device 100, which will not be repeated here.
在S704b中,由于第四天线为弱天线,因此只有IoT设备200靠近IoT设备100时,IoT设备100才能接收到第一响应消息。这样,就可以有效避免第一响应消息被其他设备获取。In S704b, since the fourth antenna is a weak antenna, the IoT device 100 can receive the first response message only when the IoT device 200 is close to the IoT device 100. In this way, the first response message can be effectively prevented from being acquired by other devices.
S705b、IoT设备100在位于IoT设备200的第四天线的发射距离内,接收到第一响应消息,获取到愿意加入群组的信息、第一密钥和IoT设备200的MAC地址;使用第一密钥加密第一群组ID,得到第一信息;第一群组ID为IoT设备所在的第一群组的ID。S705b, the IoT device 100 receives the first response message within the transmission distance of the fourth antenna of the IoT device 200, and obtains the information of willingness to join the group, the first key, and the MAC address of the IoT device 200; The key encrypts 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.
在S705b中,IoT设备100获取第一群组ID的具体方式可以参照S705a,此处不再赘述。In S705b, the specific manner in which the IoT device 100 obtains the first group ID may refer to S705a, which will not be repeated here.
S706b、IoT设备100向IoT设备200发送第二消息,第二消息包括第一信息。S706b, the IoT device 100 sends a second message to the IoT device 200, where the second message includes the first information.
S707b、IoT设备200接收到第二消息,获取到第一信息;使用第一密钥解密第一信息,获取到第一群组ID。S707b, the IoT device 200 receives the second message and obtains the first information; decrypts the first information by using the first key, and obtains the first group ID.
S708b-S715b:分别与S707a-S714a相同,请参见S707a-S714a;此处不再赘述。有关图14的内容,在实施例一的最后统一介绍。S708b-S715b: they are the same as S707a-S714a respectively, please refer to S707a-S714a; details are not repeated here. Regarding the content of FIG. 14 , a unified introduction is made at the end of the first embodiment.
在图12所示的实施方式中,IoT设备100具有第一天线(强天线)以及第二天线(弱天线),第一天线的发射距离为第一距离,第二天线的发射距离为第二距离。其中,第一天线和第二天线为不同的天线,第一距离大于第二距离。IoT设备200具有第三天线(强天线)以及第四天线(弱天线),第三天线的发射距离为第三距离,第四天线的发射距离为第四距离。其中,第三天线和第四天线为不同的天线,第三距离大于第四距离。In the embodiment shown in FIG. 12 , 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 antenna distance. 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 the third distance, and the transmission distance of the fourth antenna is the fourth distance. The third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
如图12所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 12, the method for setting an IoT device to join a group may include:
S701c、IoT设备100通过IoT设备100的第二天线,广播第一消息,第一消息包括招揽群组成员的信息和IoT设备100的MAC地址。S701c, the IoT device 100 broadcasts a first message through the second antenna of the IoT device 100, where the first message includes the information of soliciting group members and the MAC address of the IoT device 100.
示例性的,与S701a相同,在S701c之前,IoT设备100也接收到一个输入以触发S701a的执行;并且,在S701c中,IoT设备100也可以采用多种可行的通信协议以实现广播第一消息,此处不再赘述。Exemplarily, same as 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 a variety of feasible communication protocols to realize broadcasting the first message. , and will not be repeated here.
在S701c中,由于第二天线为弱天线,第二天线的发射距离很短。因此,只有IoT设备200靠近IoT设备100时才能接收到第一消息。因此,就可以有效避免第一消息被其他设备获取。In S701c, since the second antenna is a weak antenna, the transmission distance of the second antenna is very short. Therefore, the first message can only be received when the IoT device 200 is close to the IoT device 100 . Therefore, it is possible to effectively prevent the first message from being acquired by other devices.
S702c、IoT设备200在位于IoT设备100的第二天线的发射距离内,接收到第一消息,获取到招揽群组成员的信息和IoT设备100的MAC地址。S702c, the IoT device 200 receives the first message within the transmission distance of the second antenna of the IoT device 100, and acquires the information of soliciting group members and the MAC address of the IoT device 100.
S703c-S705c:分别与S703b-S705b相同,请参见S703b-S705b;此处不再赘述。S703c-S705c: they are the same as S703b-S705b respectively, please refer to S703b-S705b; details are not repeated here.
S706c、IoT设备100通过IoT设备100的第一天线,向IoT设备200发送第二消息,第二消息包括第一信息。S706c, the IoT device 100 sends a second message to the IoT device 200 through the first antenna of the IoT device 100, where the second message includes the first information.
在S706c中,由于第一信息为由第一密钥加密的信息,因此即使采用第一天线发送第二消息,也不会降低信息安全性。In S706c, since the first information is the information encrypted by the first key, even if the first antenna is used to send the second message, the information security will not be reduced.
可替换的,在S706c中,IoT设备100还可以通过IoT设备100的第二天线,向IoT设备200发送第二消息。Alternatively, in S706c, the IoT device 100 may also send the second message to the IoT device 200 through the second antenna of the IoT device 100.
S707c、IoT设备200在位于IoT设备100的第一天线的发射距离内,接收到第二消息,获取到第一信息;使用第一密钥解密第一信息,获取到第一群组ID。S707c, the IoT device 200 receives the second message within the transmission distance of the first antenna of the IoT device 100, and obtains the first information; decrypts the first information with the first key, and obtains the first group ID.
S708c-S715c:分别与S707a-S714a相同,请参照S707a-S714a;此处不再赘述。S708c-S715c: They are the same as S707a-S714a respectively, please refer to S707a-S714a; details are not repeated here.
在图13所示的实施方式中,IoT设备100具有第一天线,第一天线在第一发射功率下的发射距离为第一距离;第一天线在第二发射功率下的发射距离为第二距离;第一发射功率大于第二发射功率,第二距离小于第一距离。在图13所示的实现方式中,IoT设备100通过切换第一天线的发射功率来改变发射距离,从而实现图10所示的实施方式相同的技术效果。In the embodiment shown in FIG. 13 , the IoT device 100 has a first antenna, and the transmission distance of the first antenna under the first transmission power is the first distance; the transmission distance of the first antenna under the second transmission power is the second distance distance; the first transmission power is greater than the second transmission power, and the second distance is smaller than the first distance. In the implementation shown in FIG. 13 , the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving the same technical effect as the implementation shown in FIG. 10 .
如图13所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 13, the method for setting an IoT device to join a group may include:
S701d-S714d:请参考S701a-S714a的描述;不同之处仅在于,在S701d-S714d中,“第一发射功率下的第一天线”、“第二发射功率下的第一天线”分别替换了S701a-S714a中的“第一天线”、“第二天线”。S701d-S714d: Please refer to the description of S701a-S714a; the only difference is that in S701d-S714d, "the first antenna under the first transmit power" and "the first antenna under the second transmit power" are respectively replaced "First Antenna" and "Second Antenna" in S701a-S714a.
需要说明的是,参考图13所示的实施方式与图10的实施方式,针对图11和图12所示的实施方式,也可以采用切换天线的发射功率来改变发射距离的方法,替代切换天线来改变发射距离的方法,从而获得新的实施方式。此处,就不再展开一一描述了。新的实施方式也在本申请的范围之内。It should be noted that, referring to the embodiment shown in FIG. 13 and the embodiment shown in FIG. 10 , for the embodiments shown in FIG. 11 and FIG. 12 , the method of changing the transmission distance by switching the transmission power of the antenna can also be used instead of switching the antenna. to change the launch distance method to obtain a new implementation. Here, the one-by-one description will not be expanded. New implementations are also within the scope of this application.
示例性地,图14为本申请实施例提供的IoT设备设置方法中设置IoT设备加入群组的演示示意图。如图14的(a)所示,IoT设备200与IoT设备100靠近一下,即碰一碰后,如图14的(b)所示,IoT设备200与IoT设备200就可位于同一群组(第一群组) 中。对于用户来说,操作简便,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。Exemplarily, FIG. 14 is a schematic diagram illustrating a demonstration of setting an IoT device to join a group in the IoT device setting method provided by this embodiment of the present application. As shown in (a) of FIG. 14 , the IoT device 200 and the IoT device 100 can be located in the same group ( the first group). For users, it is easy to operate, does not require users to spend more time, and does not require users to have a better understanding of each IoT device, which greatly facilitates users.
实施例二Embodiment 2
实施例二涉及图15-图19。其中,图15-图18示出了本申请实施例提供的IoT设备设置方法中设置IoT设备控制关系的通信交互示意图。图19示出了相应的演示示意图。图15-图18分别示出了实施例二下的四种不同实施方式的流程。以下结合图15-图18详细说明。The second embodiment involves FIGS. 15-19 . 15 to 18 show schematic diagrams of communication interaction for setting an IoT device control relationship in the IoT device setting method provided by the embodiment of the present application. Figure 19 shows the corresponding demonstration schematic. Figures 15-18 respectively show the flow of four different implementations under the second embodiment. The detailed description will be given below with reference to FIGS. 15-18 .
在图15所示的实施方式中,IoT设备100具有第一天线(强天线)以及第二天线(弱天线),第一天线的发射距离为第一距离,第二天线的发射距离为第二距离。其中,第一天线和第二天线为不同的天线,第一距离大于第二距离。In the embodiment shown in FIG. 15 , 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 antenna distance. The first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.
如图15所示,设置IoT设备控制关系的方法,可以包括:As shown in Figure 15, the method for setting the IoT device control relationship may include:
S901a-S902a:参考S701a-S702a可知,S901a-S902a是将S701a-S702a中的招揽群组成员的信息替换为可设置控制关系的信息。可设置控制关系的信息用于表明IoT设备100愿意可以与其他设备设置控制关系。S901a-S902a: Referring to S701a-S702a, it can be known that in S901a-S902a, the information on soliciting group members in S701a-S702a is replaced with information on which a control relationship can be set. The information that the control relationship can be set is used to indicate that the IoT device 100 is willing to set the control relationship with other devices.
S903a-S904a:参考S703a-S704a可知,S903a-S904a是将S703a-S704a中的愿意加入群组的信息替换为愿意设置控制关系的信息。愿意设置控制关系的信息用于表明IoT设备200愿意与IoT设备100设置控制关系。S903a-S904a: Referring to S703a-S704a, it can be known that in S903a-S904a, the information of willingness to join the group in S703a-S704a is replaced with the information of willingness to set a control relationship. The information of willingness to set up the control relationship is used to indicate that the IoT device 200 is willing to set up the control relationship with the IoT device 100 .
S905a-S906a:参考S705a-S706a可知,S905a-S906a与S705a-S706a的不同之处仅在于:在S905a中,第二消息包括第一Device ID,第一Device ID为IoT设备100的Device ID;在S906a中,IoT设备200获取到第一Device ID。S905a-S906a: Referring to S705a-S706a, S905a-S906a differs from S705a-S706a only in that: in S905a, the second message includes the first Device ID, and the first Device ID is the Device ID of the IoT device 100; In S906a, the IoT device 200 obtains the first Device ID.
与S706a类似,在S906a中,由于第二天线为弱天线,第二天线的发射距离很短,因此,只有IoT设备200靠近IoT设备100时才能接收到第二消息,因此IoT设备100在S905a中通过第二天线发送第二消息,可以有效避免第二消息被其他设备获取,从而大大提高数据安全性。Similar to S706a, in S906a, 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, so the IoT device 100 in S905a Sending the second message through the second antenna can effectively prevent the second message from being acquired by other devices, thereby greatly improving data security.
S907a、IoT设备200判断IoT设备200是否已与第一Device ID对应的IoT设备设置控制关系。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.
与S707a类似,在S906a之前,IoT设备200可能已与第一Device ID对应的IoT设备设置控制关系。因此,在S907a之后,如果IoT设备200已与第一Device ID对应的IoT设备设置控制关系,则无需进行后续的设置控制关系操作,从而避免导致处理资源浪费。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 already set the control relationship with the IoT device corresponding to the first Device ID, there is no need to perform the subsequent operation of setting the control relationship, thereby avoiding the waste of processing resources.
S908a、如果IoT设备200尚未与第一Device ID对应的IoT设备设置控制关系,IoT设备200向IoT服务器300发送设置控制关系消息,设置控制关系消息包括第一Device ID和第二Device ID,第二Device ID为IoT设备200的Device ID。S908a. If the IoT device 200 has not yet set a control relationship with the IoT device corresponding to the first Device ID, the IoT device 200 sends a set control relationship message to the IoT server 300. The set control relationship message includes the first Device ID and the second Device ID, and the second Device ID. The Device ID is the Device ID of the IoT device 200.
S909a、IoT服务器300接收到设置控制关系消息,获取到第一Device ID和第二Device ID。S909a, the IoT server 300 receives the setting control relationship message, and obtains the first Device ID and the second Device ID.
S910a、IoT服务器300判断IoT设备200对应的控制关系属性与IoT设备100对应的控制关系属性是否匹配。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.
IoT设备200与IoT设备100间可能无法正确的设置控制关系。例如,灯具A作为IoT设备100,当开关B作为IoT设备200靠近灯具A时,开关B与灯具A间设置控制关系(开关B控制灯具A)。但是,当灯具C作为IoT设备200靠近灯具A时,灯具C与灯具A之间无法设置控制关系(灯具C与灯具A间不存在控制/受控关系),如果强行设置控制关系,就会导致控制关系设置错误。因此,在S910a之后,如果IoT设备200对应的控制关系属性与IoT设备100对应的控制关系属性不匹配,则不设置IoT设备200与IoT设备100间控制关系,这样就可以有效避免控制关系设置错误。The control relationship between the IoT device 200 and the IoT device 100 may not be properly set. For example, when the light fixture A acts as the IoT device 100, and when the switch B acts as the IoT device 200 and approaches the light fixture A, a control relationship is set between the switch B and the light fixture A (the switch B controls the light fixture A). However, when the light fixture C acts as the IoT device 200 close to the light fixture A, the control relationship cannot be set between the light fixture C and the light fixture A (there is no control/controlled relationship between the light fixture C and the light fixture A). If the control relationship is forcibly set, it will lead to The control relationship is set incorrectly. Therefore, after S910a, if the control relationship attribute corresponding to the IoT device 200 does not match the control relationship attribute corresponding to the IoT device 100, the control relationship between the IoT device 200 and the IoT device 100 is not set, which can effectively avoid the setting error of the control relationship .
示例性的,控制关系属性用于描述当前设备可以控制什么样的设备,以及当前设备可以被什么样的设备所控制。Exemplarily, the control relationship attribute is used to describe what kind of device the current device can control, and what kind of device the current device can control.
例如,开关B的控制关系属性可以描述为:可以输出第一控制信号(开启信号)以及第二控制信号(关闭信号);灯具A的控制关系属性可以描述为:可以接受第三控制信号(对应开灯)以及第四控制信号(对应关灯)。第一控制信号以及第二控制信号,与第三控制信号以及第四控制信号可以相互匹配对应,因此开关B的控制关系属性以及灯具A的控制关系属性相互匹配。For example, the control relationship attribute of switch B can be described as: it can output the first control signal (on signal) and the second control signal (off signal); the control relationship attribute of lamp A can be described as: it can accept the third control signal (corresponding to turn on the light) and the fourth control signal (corresponding to turn off the light). The first control signal and the second control signal can match with the third control signal and the fourth control signal, so the control relationship attribute of switch B and the control relationship attribute of lamp A match each other.
又例如,开关B的控制关系属性可以描述为:可以输出第一控制信号(开启信号)以及第二控制信号(关闭信号);灯具A的控制关系属性可以描述为:可以接受第三控制信号(对应黄光)、第四控制信号(对应白光)以及第五控制信号(对应关灯)。第一控制信号以及第二控制信号,与第三控制信号、第四控制信号以及第五控制信号无法相互匹配对应,因此开关B的控制关系属性以及灯具A的控制关系属性相互间不匹配。For another example, the control relationship attribute of 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 lamp A can be described as: it can accept a third control signal ( Corresponding to yellow light), the fourth control signal (corresponding to white light) and the fifth control signal (corresponding to turn off the light). The first control signal and the second control signal cannot match with the third control signal, the fourth control signal and the fifth control signal. Therefore, the control relationship attribute of switch B and the control relationship attribute of lamp A do not match each other.
又例如,按钮D的控制关系属性可以描述为:可以输出第一控制信号(每按下一次按钮D输出一次第一控制信号);灯具A的控制关系属性可以描述为:可以接受第二控制信号(每接收一次第二控制信号,在黄光、白光以及关灯间进行一次切换)。第一控制信号与第二控制信号可以相互匹配对应,因此开关B的控制关系属性以及灯具A的控制关系属性相互匹配。For another example, the control relationship attribute of the button D can be described as: the first control signal can be output (the first control signal is output every time the button D is pressed); the control relationship attribute of the lamp A can be described as: the second control signal can be accepted (every time the second control signal is received, a switch is performed between yellow light, white light and light off). The first control signal and the second control signal may match and correspond to each other, so the control relationship attribute of switch B and the control relationship attribute of lamp A match each other.
S911a、当IoT服务器300在S910a中判断IoT设备200对应的控制关系属性与IoT设备100对应的控制关系属性匹配时,IoT服务器300向IoT设备200发送第一反馈消息,第一反馈消息包括设置成功的信息。S911a. When the IoT server 300 determines in S910a that the control relationship attribute corresponding to the IoT device 200 matches the control relationship attribute 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 setting success Information.
可选的,在S911a中,IoT服务器300还记录IoT设备200与IoT设备100间的控制关系。例如,将IoT设备200的Device ID写入IoT设备100的控制对象列表,或者,将IoT设备200的Device ID写入IoT设备100的授权控制设备列表。Optionally, in S911a, the IoT server 300 further records the control relationship between the IoT device 200 and the IoT device 100. For example, the Device ID of the IoT device 200 is written into the control object list of the IoT device 100, or the Device ID of the IoT device 200 is written into the authorized control device list of the IoT device 100.
S912a、当IoT服务器300在S910a中判断IoT设备200对应的控制关系属性与IoT设备100对应的控制关系属性不匹配时,IoT服务器300向IoT设备200发送第二反馈消息,第二反馈消息包括设置失败的信息及原因。S912a. When the IoT server 300 determines in S910a that the control relationship attribute corresponding to the IoT device 200 does not match the control relationship attribute 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 setting The information and reason for the failure.
S913a、IoT设备200接收到第一反馈消息或第二反馈消息。S913a, the IoT device 200 receives the first feedback message or the second feedback message.
S914a、IoT设备200向IoT设备100发送告知消息,以通知IoT设备100设置控制关系的结果。S914a, the IoT device 200 sends a notification message to the IoT device 100 to notify the IoT device 100 of the result of setting the control relationship.
S913a-S914a:分别与S713a-S714a相同,请参见S713a-S714a;此处不再赘述。S913a-S914a: they are the same as S713a-S714a respectively, please refer to S713a-S714a; no further description is given here.
在图16所示的实施方式中,IoT设备200具有第三天线(强天线)以及第四天线 (弱天线),第三天线的发射距离为第三距离,第四天线的发射距离为第四距离。其中,第三天线和第四天线为不同的天线,第三距离大于第四距离。In the embodiment shown in FIG. 16 , 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 antenna distance. The third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
如图16所示,设置IoT设备控制关系的方法,可以包括:As shown in Figure 16, the method for setting the IoT device control relationship may include:
S901b-S902b:参考S701b-S702b可知,S901b-S902b是将S701b-S702b中的招揽群组成员的信息替换为可设置控制关系的信息。S901b-S902b: Referring to S701b-S702b, it can be known that S901b-S902b replaces the information of soliciting group members in S701b-S702b with information that can set a control relationship.
S903b-S904b:参考S703b-S704b可知,S903b-S904b是将愿意加入群组的信息替换为愿意设置控制关系的信息。S903b-S904b: Referring to S703b-S704b, S903b-S904b replaces the information of willingness to join the group with the information of willingness to set a control relationship.
与S704b类似,在S904b中,由于第四天线为弱天线,只有IoT设备200靠近IoT设备100时,IoT设备100才能接收到第一响应消息,因此就可以有效避免第一响应消息被其他设备获取。Similar to S704b, in S904b, since the fourth antenna is a weak antenna, the IoT device 100 can receive the first response message only when the IoT device 200 is close to the IoT device 100, so the first response message can be effectively prevented from being acquired by other devices .
S905b、IoT设备100在位于IoT设备200的第四天线的发射距离内,接收到第一响应消息,获取到愿意设置控制关系的信息、第一密钥和IoT设备200的MAC地址;使用第一密钥加密第一Device ID,得到第一信息;第一Device ID为IoT设备100的Device ID。S905b, the IoT device 100 receives the first response message within the transmission distance of the fourth antenna of the IoT device 200, and obtains the information of the willingness to set the control relationship, the first key and the MAC address of the IoT device 200; using the first response message The key encrypts the first Device ID to obtain the first information; the first Device ID is the Device ID of the IoT device 100.
S906b、IoT设备100向IoT设备200发送第二消息,第二消息包括第一信息。S906b, the IoT device 100 sends a second message to the IoT device 200, where the second message includes the first information.
S907b、IoT设备200接收到第二消息,获取到第一信息;使用第一密钥解密第一信息,获取到第一Device ID。S907b, the IoT device 200 receives the second message, and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
S908b-S915b:分别与S907a-S914a相同,请参见S907a-S914a;此处不再赘述。S908b-S915b: the same as S907a-S914a respectively, please refer to S907a-S914a; details are not repeated here.
在图17所示的实施方式中,IoT设备100具有第一天线(强天线)以及第二天线(弱天线),第一天线的发射距离为第一距离,第二天线的发射距离为第二距离。其中,第一天线和第二天线为不同的天线,第一距离大于第二距离。IoT设备200具有第三天线(强天线)以及第四天线(弱天线),第三天线的发射距离为第三距离,第四天线的发射距离为第四距离。其中,第三天线和第四天线为不同的天线,第三距离大于第四距离。In the embodiment shown in FIG. 17 , 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 antenna distance. 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 the third distance, and the transmission distance of the fourth antenna is the fourth distance. The third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
如图17所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 17, the method for setting an IoT device to join a group may include:
S901c-S902c:参考S701c-S702c可知,S901c-S902c是将S701c-S702c中的招揽群组成员的信息替换为可设置控制关系的信息。S901c-S902c: Referring to S701c-S702c, S901c-S902c replaces the information of soliciting group members in S701c-S702c with information that can set a control relationship.
与S701c类似,在S901c中,由于第二天线为弱天线,第二天线的发射距离很短,只有IoT设备200靠近IoT设备100时才能接收到第一消息,因此就可以有效避免第一消息被其他设备获取。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, so the first message can be effectively avoided. Obtained from other devices.
S903c-S905c:分别与S903b-S905b相同,请参见S903b-S905b;此处不再赘述。S903c-S905c: they are the same as S903b-S905b respectively, please refer to S903b-S905b; details are not repeated here.
S906c:与S706c相同,请参见S706c;此处不再赘述。S906c: same as S706c, please refer to S706c; details are not repeated here.
S907c、IoT设备200在位于IoT设备100的第一天线的发射距离内,接收到第二消息,获取到第一信息;使用第一密钥解密第一信息,获取到第一Device ID。S907c, the IoT device 200 receives the second message within the transmission distance of the first antenna of the IoT device 100, and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
S908c-S915c:分别与S907a-S914a相同,请参见S907a-S914a;此处不再赘述。S908c-S915c: They are the same as S907a-S914a respectively, please refer to S907a-S914a; details are not repeated here.
图17所示的实施方式最为安全,可以有效避免攻击设备模拟成IoT设备100或IoT设备200。The embodiment shown in FIG. 17 is the safest, and can effectively prevent the attacking device from being simulated as IoT device 100 or IoT device 200 .
在图18所示的实施方式中,IoT设备100具有第一天线,第一天线在第一发射功率下 的发射距离为第一距离;第一天线在第二发射功率下的发射距离为第二距离;第一发射功率大于第二发射功率,第二距离小于第一距离。与图13所示的实施方式相类似,在图18所示的实施方式中,IoT设备100通过切换第一天线的发射功率来改变发射距离,从而实现图15所示的实施方式相同的技术效果。In the embodiment shown in FIG. 18 , the IoT device 100 has a first antenna, and the transmission distance of the first antenna under the first transmission power is the first distance; the transmission distance of the first antenna under the second transmission power is the second distance distance; the first transmission power is greater than the second transmission power, and the second distance is smaller than the first distance. Similar to the embodiment shown in FIG. 13 , in the embodiment shown in FIG. 18 , the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving the same technical effect as the embodiment shown in FIG. 15 . .
如图18所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 18, the method for setting an IoT device to join a group may include:
S901d-S914d:请参考S901a-S914a的描述;不同之处仅在于,在S901d-S914d中,“第一发射功率下的第一天线”、“第二发射功率下的第一天线”分别替换了S901a-S914a中的“第一天线”、“第二天线”。S901d-S914d: Please refer to the descriptions of S901a-S914a; the only difference is that in S901d-S914d, "the first antenna under the first transmit power" and "the first antenna under the second transmit power" are respectively replaced "First Antenna" and "Second Antenna" in S901a-S914a.
需要说明的是,参考图18所示的实施方式与图15的实施方式,针对图16和图17所示的实施方式,也可以采用切换天线的发射功率来改变发射距离的方法,替代切换天线来改变发射距离的方法,从而获得新的实施方式。此处,就不再展开一一描述了。新的实施方式也在本申请的范围之内。It should be noted that, referring to the embodiment shown in FIG. 18 and the embodiment shown in FIG. 15 , for the embodiments shown in FIG. 16 and FIG. 17 , the method of changing the transmission distance by switching the transmission power of the antenna can also be used instead of switching the antenna. to change the launch distance method to obtain a new implementation. Here, the one-by-one description will not be expanded. New implementations are also within the scope of this application.
示例性地,图19为本申请实施例提供的IoT设备设置方法中设置IoT设备控制关系的演示示意图。如图19的(a)所示,IoT设备100与IoT设备200靠近一下,即碰一碰后,如图19的(b)所示,IoT设备100就可控制IoT设备200。可替换地,在实施例二中,也可以是IoT设备100与IoT设备200靠近一下,即碰一碰后,IoT设备200就可控制IoT设备100。这样,对于用户来说,操作简便,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。Exemplarily, FIG. 19 is a schematic diagram illustrating the setting of the IoT device control relationship in the IoT device setting method provided by the embodiment of the present application. As shown in FIG. 19( a ), the IoT device 100 and the IoT device 200 are brought close to each other, that is, after touching, as shown in FIG. 19( b ), the IoT device 100 can control the IoT device 200 . Alternatively, in the second embodiment, the IoT device 100 and the IoT device 200 may also be close to each other, that is, the IoT device 200 can control the IoT device 100 after touching each other. In this way, for the user, the operation is simple, the user does not need to spend a lot of time, and the user does not need to have a better understanding of each IoT device, which greatly facilitates the user.
实施例三Embodiment 3
实施例三涉及图20-图24。其中,图20-图23示出了本申请实施例提供的IoT设备设置方法中设置IoT设备功能复制关系的通信交互示意图。图24示出了相应的演示示意图。图20-图23分别示出了实施例三下的四种不同实施方式的流程。以下结合图20-图23详细说明。The third embodiment relates to FIGS. 20-24 . 20 to 23 show schematic diagrams of communication interactions for setting a function replication relationship of an IoT device in the IoT device setting method provided by an embodiment of the present application. Figure 24 shows the corresponding demonstration schematic. Figures 20-23 respectively show the flow of four different implementations under the third embodiment. The detailed description will be given below with reference to FIGS. 20-23 .
在图20所示的实施方式中,IoT设备100具有第一天线(强天线)以及第二天线(弱天线),第一天线的发射距离为第一距离,第二天线的发射距离为第二距离,其中,第一天线和第二天线为不同的天线,第一距离大于第二距离。In the embodiment shown in FIG. 20 , 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 antenna distance, wherein the first antenna and the second antenna are different antennas, and the first distance is greater than the second distance.
如图20所示,设置IoT设备功能复制关系的方法,可以包括:As shown in Figure 20, the method for setting the function replication relationship of the IoT device may include:
S1101a-S1102a:参考S701a-S702a可知,S1101a-S1102a与S701a-S702a的不同之处在于:S1101a-S1102a将S701a-S702a中的招揽群组成员的信息替换为可设置功能复制关系的信息。可设置功能复制关系的信息用于表明IoT设备100可以被其它设备复制功能。S1101a-S1102a: Referring to S701a-S702a, the difference between S1101a-S1102a and S701a-S702a is that S1101a-S1102a replaces the information of soliciting group members in S701a-S702a with information that can set a function replication relationship. The information of the settable function replication relationship is used to indicate that the IoT device 100 can replicate functions by other devices.
S1103a-S1104a:参考S703a-S704a可知,S1103a-S1104a与S703a-S704a的不同之处仅在于:S1103a-S1104a将S703a-S704a中的愿意加入群组的信息替换为愿意设置功能复制关系的信息。愿意设置功能复制关系的信息用于表明IoT设备200愿意复制IoT设备100的功能。S1103a-S1104a: Referring to S703a-S704a, S1103a-S1104a differs from S703a-S704a only in that S1103a-S1104a replaces the information of willingness to join the group in S703a-S704a with the information of willingness to set the function replication relationship. The information of willingness to set the function duplication relationship is used to indicate that the IoT device 200 is willing to duplicate the function of the IoT device 100 .
S1105a-S1106a:参考S705a-S706a可知,S1105a-S1106a与S705a-S706a的不同之处 仅在于:在S1105a中,第二消息包括第一Device ID,第一Device ID为IoT设备100的Device ID;在S1106a中,IoT设备200获取到第一Device ID。S1105a-S1106a: Referring to S705a-S706a, S1105a-S1106a differs from S705a-S706a only in 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.
与S706a类似,在S1106a中,由于第二天线为弱天线,第二天线的发射距离很短,只有IoT设备200靠近IoT设备100时才能接收到第二消息,因此,IoT设备100在S1105a中通过第二天线发送第二消息,可以有效避免第二消息被其他设备获取,从而大大提高数据安全性。Similar to S706a, in S1106a, since the second antenna is a weak antenna, the transmission distance of the second antenna is very short, and the second message can only be received when the IoT device 200 is close to the IoT device 100. Therefore, the IoT device 100 passes through in S1105a. The second antenna sends the second message, which can effectively prevent the second message from being acquired by other devices, thereby greatly improving data security.
S1107a、IoT设备200判断IoT设备200是否已设置有IoT设备100的功能。S1107a, the IoT device 200 determines whether the IoT device 200 has already installed the function of the IoT device 100.
与S707a类似,在S1106a之前,IoT设备200可能已设置有IoT设备100的功能。例如,在IoT设备200靠近IoT设备100并设置功能复制关系后,IoT设备200远离IoT设备100并再次靠近,导致S1102a-S1106a的再次执行,此时如果继续重复设置功能复制关系,势必造成处理资源的浪费。因此,在S1107a之后,如果IoT设备200已设置有IoT设备100的功能,则无需进行后续的设置功能复制关系操作,从而避免导致处理资源浪费。Similar to S707a, before S1106a, the IoT device 200 may have been provided with the functions of the IoT device 100. For example, after the IoT device 200 approaches the IoT device 100 and sets the function replication relationship, the IoT device 200 moves away from the IoT device 100 and approaches again, resulting in the re-execution of S1102a-S1106a. At this time, if the function replication relationship continues to be set repeatedly, it will inevitably cause processing resources of waste. Therefore, after S1107a, if the IoT device 200 has already been set with the function of the IoT device 100, there is no need to perform a subsequent operation of setting the function copy relationship, thereby avoiding waste of processing resources.
S1108a、如果IoT设备200尚未设置有IoT设备100的功能,IoT设备200向IoT服务器300发送设置功能复制关系消息,设置功能复制关系消息包括第一Device ID和第二Device ID,第二Device ID为IoT设备200的Device ID。S1108a. If the IoT device 200 has not been set with the function of the IoT device 100, the IoT device 200 sends a function copy relationship setting message to the IoT server 300, where the function copy relationship setting message includes the first Device ID and the second Device ID, and the second Device ID is Device ID of the IoT device 200.
S1109a、IoT服务器300接收到设置功能复制关系消息,获取到第一Device ID和第二Device ID。S1109a, the IoT server 300 receives the setting function replication relationship message, and obtains the first Device ID and the second Device ID.
S1110a、IoT服务器300判断IoT设备200对应的功能属性与IoT设备100对应的功能属性是否匹配。S1110a: The IoT server 300 determines whether the function attribute corresponding to the IoT device 200 matches the function attribute corresponding to the IoT device 100.
在实际应用场景中,IoT设备200与IoT设备100间可能无法正确的设置功能复制关系。In an actual application scenario, the function replication relationship may not be set correctly between the IoT device 200 and the IoT device 100 .
例如,灯具A(IoT设备100)的功能为接受开关C的控制。当灯具B作为IoT设备200靠近灯具A时,灯具B复制灯具A功能,复制完成后,灯具B的功能为接受开关C的控制)。但是,当开关D作为IoT设备200靠近灯具A时,开关D作为控制设备是无法复制作为受控设备的灯具A的功能的,如果强行复制功能,就会导致功能设置错误。For example, the function of the light fixture A (IoT device 100 ) is to accept the control of the switch C. When the light fixture B acts as the IoT device 200 close to the light fixture A, the light fixture B replicates the function of the light fixture A, and after the copying is completed, the function of the light fixture B is to accept the control of the switch C). However, when switch D, as an IoT device 200, is close to fixture A, switch D, as a control device, cannot copy the function of fixture A, which is a controlled device. If the function is forcibly copied, the function setting will be wrong.
又例如,灯具A(IoT设备100)的功能为在按钮C的控制下在白光、黄光以及关灯之间切换。按钮C每按动一次会输出一个控制信号,灯具A在每接收到一次按钮C的控制信号时切换一次状态。灯具B只具备关灯以及开灯两种状态,并且灯具B并不是基于一个输入信号在两种状态间切换,而是基于对输入信号的识别来切换到状态(当输入信号为开灯信号时开灯,当输入信号为关灯信号时关灯)。当灯具B作为IoT设备200靠近灯具A时,灯具B复制灯具A功能,由于灯具B的输入控制设置与灯具A并不一致,在实际应用中按钮C无法直接控制灯具B,因此灯具B无法正确复制灯具A功能。For another example, the function of the light fixture A (IoT device 100 ) is to switch between white light, yellow light, and light off under the control of button C. Each time the button C is pressed, a control signal will be output, and the light fixture A will switch states each time it receives the control signal of the button C. Lamp B only has two states: off and on, and lamp B does not switch between the two states based on an input signal, but switches to the state based on the recognition of the input signal (when the input signal is the light-on signal. Turn on the light, turn off the light when the input signal is the light off signal). When fixture B, as the IoT device 200, is close to fixture A, fixture B replicates the function of fixture A. Since fixture B's input control settings are not consistent with fixture A, button C cannot directly control fixture B in practical applications, so fixture B cannot be copied correctly. Lamp A function.
因此,在S1110a之后,如果IoT设备200对应的功能属性与IoT设备100对应的功能属性不匹配,则不设置IoT设备200与IoT设备100间的功能复制关系,这样就可以有效避免功能复制关系设置错误。Therefore, after S1110a, if the function attribute corresponding to the IoT device 200 does not match the function attribute corresponding to the IoT device 100, the function copy relationship between the IoT device 200 and the IoT device 100 is not set, so that the function copy relationship setting can be effectively avoided mistake.
示例性的,在功能复制的应用场景中,S1110a中所指的功能属性为与设备的功能相关的属性。例如,设备的控制输入设置(例如,开关的输出项设置、输出项个数、输出格式等);又例如,设备的控制输入设置(例如,灯具的输入项设置、输入项识别设置等)。Exemplarily, in an application scenario of function duplication, the function attribute referred to in S1110a is an attribute related to the function of the device. For example, the control input settings of the equipment (for example, the output item settings of switches, the number of output items, the output format, etc.); another example, the control input settings of the equipment (for example, the input item settings of lamps, input item identification settings, etc.).
S1111a、当IoT服务器300在S1110a中判断IoT设备200对应的功能属性与IoT设备100对应的功能属性匹配后,IoT服务器300向IoT设备200发送第一反馈消息,第一反馈消息包括设置成功的信息。S1111a. After the IoT server 300 determines in S1110a that the function attribute corresponding to the IoT device 200 matches the function attribute 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 that the setting is successful .
可选的,在S1111a中,IoT服务器300还记录IoT设备200与IoT设备100间的功能复制关系。例如,复制IoT设备100的控制对象列表/受控对象列表。基于IoT设备100的控制对象列表/受控对象列表,为IoT设备200创建控制对象列表/受控对象列表。又例如,使用IoT设备100的控制对象列表/受控对象列表,覆盖IoT设备200原始的控制对象列表/受控对象列表。又例如,将IoT设备100的控制对象/受控对象,添加到IoT设备200的控制对象列表/受控对象列表中。Optionally, in S1111a, the IoT server 300 further records the function replication relationship between the IoT device 200 and the IoT device 100. For example, the controlled object list/controlled object list of the IoT device 100 is copied. Based on the control object list/controlled object list of the IoT device 100, a control object list/controlled object list is created for the IoT device 200. For another example, the control object list/controlled object list of the IoT device 100 is used to overwrite the original control object list/controlled object list of the IoT device 200. For another example, the controlled object/controlled object of the IoT device 100 is added to the controlled object list/controlled object list of the IoT device 200.
S1112a、当IoT服务器300在S1110a中判断IoT设备200对应的功能属性与IoT设备100对应的功能属性不匹配时,IoT服务器300向IoT设备200发送第二反馈消息,第二反馈消息包括设置失败的信息及原因。S1112a. When the IoT server 300 determines in S1110a that the function attribute corresponding to the IoT device 200 does not match the function attribute 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 setting failure information and why.
S1113a、IoT设备200接收到第一反馈消息或第二反馈消息。S1113a, the IoT device 200 receives the first feedback message or the second feedback message.
S1114a、IoT设备200向IoT设备100发送告知消息,以通知IoT设备100设置功能复制关系的结果。S1114a, the IoT device 200 sends a notification message to the IoT device 100 to notify the IoT device 100 of the result of setting the function replication relationship.
S1113a-S1114a:分别与S713a-S714a相同或相类似,请参见S713a-S714a;此处不再赘述。S1113a-S1114a: are the same as or similar to S713a-S714a respectively, please refer to S713a-S714a; details are not repeated here.
在图21所示的实现方式中,IoT设备200具有第三天线(强天线)以及第四天线(弱天线),第三天线的发射距离为第三距离,第四天线的发射距离为第四距离。其中,第三天线和第四天线为不同的天线,第三距离大于第四距离。In the implementation shown in FIG. 21 , 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 antenna distance. The third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
如图21所示,设置IoT设备功能复制关系的方法,可以包括:As shown in Figure 21, the method for setting the function replication relationship of the IoT device may include:
S1101b-S1102b:参考S701b-S702b可知,S1101b-S1102b与S701b-S702b不同之处仅在于,将S701b-S702b中的招揽群组成员的信息替换为可设置功能复制关系的信息。S1101b-S1102b: Referring to S701b-S702b, S1101b-S1102b differs from S701b-S702b only in that the information on soliciting group members in S701b-S702b is replaced with information that can set a function replication relationship.
S1103b-S1104b:参考S703b-S704b可知,S1103b-S1104b与S703b-S704b不同之处仅在于:将S701b-S702b中愿意加入群组的信息替换为愿意设置功能复制关系的信息。S1103b-S1104b: Referring to S703b-S704b, S1103b-S1104b differs from S703b-S704b only in that the information of willingness to join the group in S701b-S702b is replaced with the information of willingness to set the function replication relationship.
与S704b类似,在S1104b中,由于第四天线为弱天线,只有IoT设备200靠近IoT设备100时,IoT设备100才能接收到第一响应消息,因此就可以有效避免第一响应消息被其他设备获取。Similar to S704b, in S1104b, since the fourth antenna is a weak antenna, the IoT device 100 can receive the first response message only when the IoT device 200 is close to the IoT device 100, so the first response message can be effectively prevented from being acquired by other devices .
S1105b、IoT设备100在位于IoT设备200的第四天线的发射距离内,接收到第一响应消息,获取到愿意设置功能复制关系的信息、第一密钥和IoT设备200的MAC地址;使用第一密钥加密第一Device ID,得到第一信息;第一Device ID为IoT设备100的Device ID。S1105b, the IoT device 100 receives the first response message within the transmission distance of the fourth antenna of the IoT device 200, and obtains the information that is willing to set the function replication relationship, the first key and the MAC address of the IoT device 200; A key encrypts the first Device ID to obtain the first information; the first Device ID is the Device ID of the IoT device 100.
S1106b、IoT设备100向IoT设备200发送第二消息,第二消息包括第一信息。S1106b, the IoT device 100 sends a second message to the IoT device 200, where the second message includes the first information.
S1107b、IoT设备200接收到第二消息,获取到第一信息;使用第一密钥解密第一信息,获取到第一Device ID。S1107b. The IoT device 200 receives the second message and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
S1108b-S1115b:分别与S1107a-S1114a相同,请参见S1107a-S1114a;此处不再赘述。S1108b-S1115b: the same as S1107a-S1114a respectively, please refer to S1107a-S1114a; details are not repeated here.
在图22所示的实现方式中,IoT设备100具有第一天线(强天线)以及第二天线 (弱天线),第一天线的发射距离为第一距离,第二天线的发射距离为第二距离。其中,第一天线和第二天线为不同的天线,第一距离大于第二距离。IoT设备200具有第三天线(强天线)以及第四天线(弱天线),第三天线的发射距离为第三距离,第四天线的发射距离为第四距离。其中,第三天线和第四天线为不同的天线,第三距离大于第四距离。In the implementation shown in FIG. 22 , 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 antenna distance. 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 the third distance, and the transmission distance of the fourth antenna is the fourth distance. The third antenna and the fourth antenna are different antennas, and the third distance is greater than the fourth distance.
如图22所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 22, the method for setting an IoT device to join a group may include:
S1101c-S1102c:参考S701c-S702c可知,S1101c-S1102c与S701c-S702c的不同之处仅在于,将S701c-S702c中的招揽群组成员的信息替换为可设置功能复制关系的信息。S1101c-S1102c: Referring to S701c-S702c, S1101c-S1102c differs from S701c-S702c only in that the information on soliciting group members in S701c-S702c is replaced with information that can set a function replication relationship.
与S701c相类似,在S1101c中,由于第二天线为弱天线,第二天线的发射距离很短,只有IoT设备200靠近IoT设备100时才能接收到第一消息,因此就可以有效避免第一消息被其他设备获取。Similar to S701c, in S1101c, 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, so the first message can be effectively avoided. acquired by other devices.
S1103c-S1105c:分别与S1103b-S1105b相同,请参见S1103b-S1105b;此处不再赘述。S1103c-S1105c: they are the same as S1103b-S1105b respectively, please refer to S1103b-S1105b; details are not repeated here.
S1106c:与S706c相同,请参见S706c;此处不再赘述。S1106c: same as S706c, please refer to S706c; details are not repeated here.
S1107c、IoT设备200在位于IoT设备100的第一天线的发射距离内,接收到第二消息,获取到第一信息;使用第一密钥解密第一信息,获取到第一Device ID。S1107c, the IoT device 200 receives the second message within the transmission distance of the first antenna of the IoT device 100, and obtains the first information; decrypts the first information with the first key, and obtains the first Device ID.
S1108c-S1115c:分别与S1107a-S1114a相同,请参见S1107a-S1114a;此处不再赘述。S1108c-S1115c: they are the same as S1107a-S1114a respectively, please refer to S1107a-S1114a; details are not repeated here.
在图23所示的实现方式中,IoT设备100具有第一天线,第一天线在第一发射功率下的发射距离为第一距离;第一天线在第二发射功率下的发射距离为第二距离。第一发射功率大于第二发射功率,第二距离小于第一距离。与图13所示的实施方式相类似,在图23所示的实施方式中,IoT设备100通过切换第一天线的发射功率来改变发射距离,从而实现图20所示的实施方式相同的技术效果。In the implementation shown in FIG. 23 , the IoT device 100 has a first antenna, and the transmission distance of the first antenna under the first transmission power is the first distance; the transmission distance of the first antenna under the second transmission power is the second distance distance. The first transmit power is greater than the second transmit power, and the second distance is less than the first distance. Similar to the embodiment shown in FIG. 13 , in the embodiment shown in FIG. 23 , the IoT device 100 changes the transmission distance by switching the transmission power of the first antenna, thereby achieving the same technical effect as the embodiment shown in FIG. 20 . .
如图23所示,设置IoT设备加入群组的方法,可以包括:As shown in Figure 23, the method for setting an IoT device to join a group may include:
S1101d-S1114d:请参考S1101a-S1114a的描述;不同之处仅在于,在S1101d-S1114d中,“第一发射功率下的第一天线”、“第二发射功率下的第一天线”分别替换了S901a-S914a中的“第一天线”、“第二天线”。S1101d-S1114d: Please refer to the descriptions of S1101a-S1114a; the only difference is that in S1101d-S1114d, "the first antenna under the first transmit power" and "the first antenna under the second transmit power" are respectively replaced "First Antenna" and "Second Antenna" in S901a-S914a.
需要说明的是,参考图23所示的实施方式与图20的实施方式,针对图21和图22所示的实施方式,也可以采用切换天线的发射功率来改变发射距离的方法,替代切换天线来改变发射距离的方法,从而获得新的实施方式。此处,就不再展开一一描述了。新的实施方式也在本申请的范围之内。It should be noted that, referring to the embodiment shown in FIG. 23 and the embodiment shown in FIG. 20 , for the embodiments shown in FIG. 21 and FIG. 22 , the method of changing the transmission distance by switching the transmission power of the antenna can also be used instead of switching the antenna. to change the launch distance method to obtain a new implementation. Here, the one-by-one description will not be expanded. New implementations are also within the scope of this application.
示例性地,图24为本申请实施例提供的IoT设备设置方法中设置IoT设备功能复制关系的演示示意图。如图24的(a)所示,IoT设备100控制IoT设备400,IoT设备200与IoT设备100靠近一下,即碰一碰后,如图24的(b)所示,IoT设备100和IoT设备200都可控制IoT设备400。这样,对于用户来说,操作简便,无需用户花费较多的时间,也无需用户对每个IoT设备都比较了解,极大地方便了用户。Exemplarily, FIG. 24 is a schematic diagram illustrating the setting of a function replication relationship of an IoT device in the IoT device setting method provided by the embodiment of the present application. As shown in (a) of FIG. 24 , the IoT device 100 controls the IoT device 400, and the IoT device 200 and the IoT device 100 come close to each other, that is, after touching, as shown in (b) of FIG. 24 , 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, the user does not need to spend a lot of time, and the user does not need to have a better understanding of each IoT device, which greatly facilitates the user.
需要说明的是,在本申请的上述全部及等同的实施例中,Wi-Fi aware是实现IoT设备100与IoT设备200数据交互的一种优选方式。在NAN机制约定的发现时间窗(discovery window,DW)中进行NAN机制的维持工作和服务发现工作,服务发现即通过发送服务发现帧(service discovery frame,SDF)消息实现。NAN设备间,可以通过发送信标(Beacon)帧,相互发送SDF消息。在SDF消息中包括一个指示位,其用于指示该SDF消息是哪种SDF消息,SDF消息的类型包括:发布(Publish)消息,其用于发布NAN设备所能提供的服务,或用于回复收到的其他NAN;订阅(Subscribe)消息,其用于查找需要使用的服务;回复(Follow-Up)消息,其用于回复收到的SDF Publish消息,或者用于协商更多的信息。It should be noted that, in all the above and equivalent embodiments of this application, Wi-Fi aware is a preferred way to realize data interaction between the IoT device 100 and the IoT device 200 . The maintenance work of the NAN mechanism and the service discovery work are carried out in the discovery window (discovery window, DW) agreed by the NAN mechanism, and the service discovery is realized by sending a service discovery frame (service discovery frame, SDF) message. 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 the SDF message is. The types of the SDF message include: a Publish message, which is used for publishing the services that the NAN device can provide, or for replying Received other NANs; subscribe (Subscribe) message, which is used to find the service that needs to be used; Reply (Follow-Up) message, which is used to reply to the received SDF Publish message, or used to negotiate more information.
图25为本申请实施例提供的IoT设备设置方法中第一IoT设备与第二IoT设备在采用Wi-Fi协议下的通信交互示意图。如图25所示,在IoT设备100与IoT设备200首次进行交互,广播第一消息到IoT设备200(例如,在S701a、S701b、S701c、S701d、S901a、S901b、S901c、S901d、S1101a、S1101b、S1101c、S1101d中,IoT设备100广播第一消息)时,IoT设备100基于NAN SDF Publish消息发布第一消息。FIG. 25 is a schematic diagram of communication interaction between a first IoT device and a second IoT device using the Wi-Fi protocol in the IoT device setting method provided by the embodiment of the present application. As shown in FIG. 25, when the IoT device 100 interacts with the IoT device 200 for the first time, the first message is broadcast to the IoT device 200 (for example, at S701a, S701b, S701c, S701d, S901a, S901b, S901c, S901d, S1101a, S1101b, In S1101c and S1101d, when the IoT device 100 broadcasts the first message), the IoT device 100 publishes the first message based on the NAN SDF Publish message.
在IoT设备100与IoT设备200进行首次交互之后的数据交互(例如,在S701a、S701b、S701c、S701d、S901a、S901b、S901c、S901d、S1101a、S1101b、S1101c、S1101d中,IoT设备100之后的步骤)时,IoT设备100与IoT设备200基于NAN SDF Follow-up消息进行数据交互。Data interaction after IoT device 100 interacts with IoT device 200 for the first time (eg, in S701a, S701b, S701c, S701d, S901a, S901b, S901c, S901d, S1101a, S1101b, S1101c, S1101d, steps after IoT device 100 ), the IoT device 100 and the IoT device 200 perform data interaction based on the NAN SDF Follow-up message.
可以理解的是,上述实施例中的部分或全部步骤或操作仅是示例,本申请实施例还可以执行其它操作或者各种操作的变形。此外,各个步骤可以按照上述实施例呈现的不同的顺序来执行,并且有可能并非要执行上述实施例中的全部操作。It can be understood that, some or all of the steps or operations in the foregoing embodiments are only examples, and other operations or variations of various operations may also be performed in the embodiments of the present application. Furthermore, the various steps may be performed in a different order presented in the above-described embodiments, and may not perform all operations in the above-described embodiments.
本申请实施例提供了IoT设备设置方法及IoT设备,能够方便快速地完成IoT设备设置,整体耗时较少,简化操作,提高效率,提升用户体验。本申请实施例提供的自动打印方法适用于以下的IoT设备。The embodiments of the present application provide an IoT device setting method and an IoT device, which can conveniently and quickly complete the IoT device setting, reduce overall time-consuming, simplify operations, improve efficiency, and improve user experience. The automatic printing method provided in the embodiment of the present application is applicable to the following IoT devices.
需要说明的是,本申请提供的上述各个实施方式、实施例的全部或部分技术特征均可以任意地、相互地结合使用。It should be noted that, all or part of the technical features of the above-mentioned various embodiments and embodiments provided in this application may be used in any combination with each other.
图26为本申请提供的一种IoT设备的结构示意图。示例的,IoT设备包括至少一个处理器、存储器和无线通信模块。其中,处理器与存储器和无线通信模块耦合,本申请实施例中的耦合可以是通信连接,可以是电性,或其它的形式。具体的,存储器用于存储程序指令。无线通信模块用于建立无线连接。处理器用于调用存储器中存储的程序指令,使得IoT设备执行本申请实施例提供的IoT设备设置方法中由IoT设备所执行的步骤。应理解,该IoT设备可以用于实现本申请实施例提供的IoT设备设置方法,相关特征可以参照上文,此处不再赘述。FIG. 26 is a schematic structural diagram of an IoT device provided by this application. Illustratively, an IoT device includes at least one processor, memory, and a wireless communication module. Wherein, the processor is coupled with the memory and the wireless communication module, and the coupling in this embodiment of the present application may be a communication connection, an electrical connection, or 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 configured 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 in the embodiment of the present application. It should be understood that the IoT device can be used to implement the IoT device setting method provided by the embodiments of the present application, and the relevant features can be referred to above, which will not be repeated here.
本申请提供一种包含指令的计算机程序产品,当所述计算机程序产品在IoT设备上运行时,使得所述IoT设备执行本申请实施例提供的IoT设备设置方法中由IoT设备所执行的步骤。The present application provides a computer program product including instructions, which, when the computer program product runs on an IoT device, 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.
本申请提供一种计算机可读存储介质,包括指令,当所述指令在IoT设备上运行 时,使得所述IoT设备执行本申请实施例提供的IoT设备设置方法中由IoT设备所执行的步骤。The present application provides a computer-readable storage medium, including instructions, which, when the instructions are executed on an IoT device, cause the IoT device to perform the steps performed by the IoT device in the IoT device setting method provided by the embodiments of the present application.
所属领域的技术人员可以清楚地了解到本申请实施例可以用硬件实现,或硬件与软件的方式实现。当使用硬件与软件实现,可以将上述功能存储在计算机可读介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can clearly understand that the embodiments of the present application may be implemented in hardware, or in a manner of hardware and software. When implemented using hardware and software, the above-described functions can be stored in a computer-readable medium. Based on this understanding, the technical solutions of the embodiments of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage The medium includes several instructions for causing a computer device (which may 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. The aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic disk or optical disk and other media that can store program codes.
以上所述,仅为本申请实施例的具体实施方式,但本申请实施例的保护范围并不局限于此,任何在本申请实施例揭露的技术范围内的变化或替换,都应涵盖在本申请实施例的保护范围之内。因此,本申请实施例的保护范围应以所述权利要求的保护范围为准。The above are only specific implementations of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the embodiments of the present application shall be covered by this within the protection scope of the application examples. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims (24)

  1. 一种第一IoT设备,所述第一IoT设备与IoT服务器通信;其特征在于,所述第一IoT设备包括:A first IoT device, the first IoT device communicates with an IoT server; characterized in that the first IoT device includes:
    处理器;processor;
    存储器;memory;
    第一天线,所述第一天线的发射距离为所述第一距离;所述第一距离大于第一预设发射距离;a first antenna, the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance;
    第二天线,所述第二天线的发射距离为所述第二距离;所述第一天线和所述第二天线为不同的天线;所述第二距离小于或等于第一预设发射距离;a second antenna, the transmission distance of the second antenna is the 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;
    以及计算机程序,其中所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述第一IoT设备执行以下步骤:and a computer program, wherein the computer program is stored on the memory and, when executed by the processor, causes the first IoT device to perform the following steps:
    通过所述第一天线,广播第一消息;所述第一消息包括第一发布信息;Broadcast a first message through the first antenna; the first message includes the first release information;
    接收到来自第二IoT设备的第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;A first response message from the second IoT device is received; the first response message includes first request information for the first published information;
    响应于所述第一响应消息,通过所述第二天线,向所述第二IoT设备发送第二消息;In response to the first response message, send a second message to the second IoT device through the second antenna;
    接收到来自所述第二IoT设备或所述IoT服务器的告知消息。A notification message from the second IoT device or the IoT server is received.
  2. 根据权利要求1所述的第一IoT设备,其特征在于,所述第一天线和所述第二天线连接于所述第一IoT设备的同一个无线通信芯片。The first IoT device according to claim 1, wherein the first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.
  3. 根据权利要求2所述的第一IoT设备,其特征在于,所述无线通信芯片为Wi-Fi芯片、蓝牙芯片或ZigBee芯片。The first IoT device according to claim 2, wherein the wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.
  4. 根据权利要求1-3中任意一项所述的第一IoT设备,其特征在于,所述第一发布信息包括以下的一种:招揽群组成员的信息、可设置控制关系的信息和可设置功能复制关系的信息;所述第一请求信息包括以下的一种:愿意加入群组的信息、愿意设置控制关系的信息和愿意设置功能复制关系的信息。The first IoT device according to any one of claims 1-3, wherein the first release information includes one of the following: information on soliciting group members, information on which a control relationship can be set, and information on which a control relationship can be set Information about a function copy relationship; the first request information includes one of the following: information about willingness to join a group, information about willingness to set a control relationship, and information about willingness to set a function copy relationship.
  5. 根据权利要求4所述的第一IoT设备,其特征在于,在所述第一发布信息包括招揽群组成员的信息时,所述第二消息包括第一群组ID;所述第一群组ID为所述第一IoT设备所在的一个或多个群组的ID。The first IoT device according to claim 4, wherein when the first published information includes information on soliciting group members, the second message includes a first group ID; the first group The ID is the ID of one or more groups where the first IoT device is located.
  6. 根据权利要求4所述的第一IoT设备,其特征在于,在所述第一发布信息包括可设置控制关系的信息或者可设置功能复制关系的信息时,所述第二消息包括第一设备ID;所述第一设备ID为所述第一IoT设备的设备ID。The first IoT device according to claim 4, wherein when the first release information includes information on which a control relationship can be set or information on which a function replication relationship can be set, the second message includes the first device ID ; the first device ID is the device ID of the first IoT device.
  7. 根据权利要求1-6中任意一项所述的第一IoT设备,其特征在于,在接收到来自所述第二IoT设备或所述IoT服务器的告知消息之后,所述第一IoT设备还执行:输出所述告知消息;The first IoT device according to any one of claims 1-6, characterized in that, after receiving a notification message from the second IoT device or the IoT server, the first IoT device further executes : output the notification message;
    在通过所述第一天线,广播第一消息之前,所述第一IoT设备还执行:接收到一个输入。Before broadcasting the first message through the first antenna, the first IoT device further performs: receiving an input.
  8. 一种第一IoT设备,所述第一IoT设备与IoT服务器通信;其特征在于,所述第一IoT设备包括:A first IoT device, the first IoT device communicates with an IoT server; characterized in that the first IoT device includes:
    处理器;processor;
    存储器;memory;
    第一天线,所述第一天线的发射距离为所述第一距离;所述第一距离大于第一预设发射距离;a first antenna, the transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance;
    第二天线,所述第二天线的发射距离为所述第二距离;所述第一天线和所述第二天线为不同的天线;所述第二距离小于或等于第一预设发射距离;a second antenna, the transmission distance of the second antenna is the 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;
    以及计算机程序,其中所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述第一IoT设备执行以下步骤:and a computer program, wherein the computer program is stored on the memory and, when executed by the processor, causes the first IoT device to perform the following steps:
    通过所述第二天线,广播第一消息;所述第一消息包括第一发布信息;Broadcast a first message through the second antenna; the first message includes the first release information;
    在距离第二IoT设备的第四距离内,接收到来自第二IoT设备的第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;Within a fourth distance from the second IoT device, a first response message from the second IoT device is received; the first response message includes first request information for the first published information;
    响应于所述第一响应消息,通过所述第一天线,向所述第二IoT设备发送第二消息;In response to the first response message, send a second message to the second IoT device through the first antenna;
    在距离所述第二IoT设备的第三距离内,接收到来自所述第二IoT设备的告知消息;其中,所述第三距离大于所述第四距离。The notification message from the second IoT device is received within a third distance from the second IoT device; wherein the third distance is greater than the fourth distance.
  9. 一种第一IoT设备,所述第一IoT设备与IoT服务器通信;其特征在于,所述第一IoT设备包括:A first IoT device, the first IoT device communicates with an IoT server; characterized in that the first IoT device includes:
    处理器;processor;
    存储器;memory;
    第一天线,所述第一天线在第一发射功率下的发射距离为第一距离,所述第一距离大于第一预设发射距离;所述第一天线在第二发射功率下的发射距离为第二距离,所述第二距离小于或等于第一预设发射距离;所述第一发射功率大于所述第二发射功率;The first antenna, the transmission distance of the first antenna under the first transmission power is the first distance, and the first distance is greater than the first preset transmission distance; the transmission distance of the first antenna under the second transmission power is the second distance, the second distance is less than or equal to the first preset transmission distance; the first transmission power is greater than the second transmission power;
    以及计算机程序,其中所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述第一IoT设备执行以下步骤:and a computer program, wherein the computer program is stored on the memory and, when executed by the processor, causes the first IoT device to perform the following steps:
    通过所述第一发射功率下的所述第一天线,广播第一消息;所述第一消息包括第一发布信息;Broadcast a first message through the first antenna under the first transmit power; the first message includes first release information;
    接收到来自第二IoT设备的第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;A first response message from the second IoT device is received; the first response message includes first request information for the first published information;
    响应于所述第一响应消息,通过所述第二发射功率下的所述第一天线,向所述第二IoT设备发送第二消息;In response to the first response message, send a second message to the second IoT device through the first antenna at the second transmit power;
    接收到来自所述第二IoT设备或所述IoT服务器的告知消息。A notification message from the second IoT device or the IoT server is received.
  10. 一种第二IoT设备,所述第二IoT设备与IoT服务器通信;其特征在于,所述第二IoT设备包括:A second IoT device, the second IoT device communicates with an IoT server; characterized in that the second IoT device comprises:
    处理器;processor;
    存储器;memory;
    第三天线,所述第三天线的发射距离为所述第三距离;所述第三距离大于第二预设发射距离;a third antenna, the transmission distance of the third antenna is the third distance; the third distance is greater than the second preset transmission distance;
    第四天线,所述第四天线的发射距离为所述第四距离;所述第三天线和所述第四天线为不同的天线;所述第四距离小于或等于第二预设发射距离;a fourth antenna, the transmission distance of the fourth antenna is the 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;
    以及计算机程序,其中所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述第二IoT设备执行以下步骤:and a computer program, wherein the computer program is stored on the memory and, when executed by the processor, causes the second IoT device to perform the following steps:
    接收到来自第一IoT设备的第一消息;所述第一消息包括第一发布信息;receiving a first message from a first IoT device; the first message includes first release information;
    随机生成第一密钥;Randomly generate a first key;
    通过所述第四天线,向所述第一IoT设备发送第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;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 published information;
    接收到来自第一IoT设备的第二消息;receiving a second message from the first IoT device;
    通过所述第三天线,向所述IoT服务器发送第二请求消息;sending a second request message to the IoT server through the third antenna;
    接收到来自所述IoT服务器的所述第一请求消息或所述第二请求消息。The first request message or the second request message from the IoT server is received.
  11. 根据权利要求10所述的第二IoT设备,其特征在于,所述第三天线和所述第四天线连接于所述第二IoT设备的同一个无线通信芯片。The second IoT device according to claim 10, wherein the third antenna and the fourth antenna are connected to the same wireless communication chip of the second IoT device.
  12. 根据权利要求11所述的第二IoT设备,其特征在于,所述无线通信芯片为Wi-Fi芯片、蓝牙芯片或ZigBee芯片。The second IoT device according to claim 11, wherein the wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.
  13. 根据权利要求10-12中任意一项所述的第二IoT设备,其特征在于,所述第一发布信息包括以下的一种:招揽群组成员的信息、可设置控制关系的信息和可设置功能复制关系的信息;所述第一请求信息包括以下的一种:愿意加入群组的信息、愿意设置控制关系的信息和愿意设置功能复制关系的信息。The second IoT device according to any one of claims 10-12, wherein the first release information includes one of the following: information on soliciting group members, information on which a control relationship can be set, and information on which a control relationship can be set Information about a function copy relationship; the first request information includes one of the following: information about willingness to join a group, information about willingness to set a control relationship, and information about willingness to set a function copy relationship.
  14. 根据权利要求13所述的第二IoT设备,其特征在于,在所述第一发布信息包括招揽群组成员的信息时,所述第二消息包括第一群组ID,所述第二请求消息包括第一群组ID和第二设备ID;所述第一群组ID为所述第一IoT设备所在的一个或多个群组的ID,所述第二设备ID为所述第二IoT设备的设备ID。The second IoT device according to claim 13, wherein, when the first publishing information includes information on soliciting group members, the second message includes a first group ID, and the second request message It 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 second IoT device the device ID.
  15. 根据权利要求13所述的第二IoT设备,其特征在于,在所述第一发布信息包括可设置控制关系的信息或者可设置功能复制关系的信息时,所述第二消息包括第一设备ID,所述第二请求消息包括第一设备ID和第二设备ID;所述第一设备ID为所述第一IoT设备的设备ID,所述第二设备ID为所述第二IoT设备的设备ID。The second IoT device according to claim 13, wherein when the first release information includes information that can set a control relationship or information that can set a function replication relationship, the second message includes the first device ID , the second 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 of the second IoT device ID.
  16. 一种第二IoT设备,所述第二IoT设备与IoT服务器通信;其特征在于,所述第二IoT设备包括:A second IoT device, the second IoT device communicates with an IoT server; characterized in that the second IoT device comprises:
    处理器;processor;
    存储器;memory;
    第三天线,所述第三天线在第三发射功率下的发射距离为第三距离,所述第三距离大于第二预设发射距离;所述第三天线在第四发射功率下的发射距离为第四距离,所述第四距离小于或等于第二预设发射距离;所述第三发射功率大于所述第四发射功率;The third antenna, the transmission distance of the third antenna under the third transmission power is the third distance, and the third distance is greater than the second preset transmission distance; the transmission distance of the third antenna under the fourth transmission power is a fourth distance, 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;
    以及计算机程序,其中所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述第二IoT设备执行以下步骤:and a computer program, wherein the computer program is stored on the memory and, when executed by the processor, causes the second IoT device to perform the following steps:
    接收到来自第一IoT设备的第一消息;所述第一消息包括第一发布信息;receiving a first message from a first IoT device; the first message includes first release information;
    随机生成第一密钥;Randomly generate a first key;
    通过所述第四发射功率下的所述第三天线,向所述第一IoT设备发送第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;Send a first response message to the first IoT device through the third antenna under the fourth transmit power; the first response message includes first request information for the first published information;
    接收到来自第一IoT设备的第二消息;receiving a second message from the first IoT device;
    通过所述第三发射功率下的第三天线,向所述IoT服务器发送第二请求消息;sending a second request message to the IoT server through the third antenna under the third transmit power;
    接收到来自所述IoT服务器的所述第一请求消息或所述第二请求消息。The first request message or the second request message from the IoT server is received.
  17. 一种第一IoT设备设置方法,应用于第一IoT设备,所述第一IoT设备与IoT服务器通信;其特征在于,所述第一IoT设备包括:处理器;存储器;第一天线,所述第一天线的发射距离为所述第一距离;所述第一距离大于第一预设发射距离;第二天线,所述第二天线的发射距离为所述第二距离;所述第一天线和所述第二天线为不同的天线;所述第二距离小于或等于第一预设发射距离;所述方法包括:A first IoT device setting method, applied to a first IoT device, wherein the first IoT device communicates with an IoT server; characterized in that, the first IoT device comprises: a processor; a memory; a first antenna, the The transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, the transmission distance of the second antenna is the 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:
    通过所述第一天线,广播第一消息;所述第一消息包括第一发布信息;Broadcast a first message through the first antenna; the first message includes the first release information;
    接收到来自第二IoT设备的第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;A first response message from the second IoT device is received; the first response message includes first request information for the first published information;
    响应于所述第一响应消息,通过所述第二天线,向所述第二IoT设备发送第二消息;In response to the first response message, send a second message to the second IoT device through the second antenna;
    接收到来自所述第二IoT设备或所述IoT服务器的告知消息。A notification message from the second IoT device or the IoT server is received.
  18. 根据权利要求17所述的方法,其特征在于,所述第一天线和所述第二天线连接于所述第一IoT设备的同一个无线通信芯片。The method according to claim 17, wherein the first antenna and the second antenna are connected to the same wireless communication chip of the first IoT device.
  19. 根据权利要求17所述的方法,其特征在于,所述无线通信芯片为Wi-Fi芯片、蓝牙芯片或ZigBee芯片。The method according to claim 17, wherein the wireless communication chip is a Wi-Fi chip, a Bluetooth chip or a ZigBee chip.
  20. 一种第一IoT设备设置方法,应用于第一IoT设备,所述第一IoT设备与IoT服务器通信;其特征在于,所述第一IoT设备包括:处理器;存储器;第一天线,所述第一天线的发射距离为所述第一距离;所述第一距离大于第一预设发射距离;第二天线,所述第二天线的发射距离为所述第二距离;所述第一天线和所述第二天线为不同的天线;所述第二距离小于或等于第一预设发射距离;所述方法包括:A first IoT device setting method, applied to a first IoT device, wherein the first IoT device communicates with an IoT server; characterized in that, the first IoT device comprises: a processor; a memory; a first antenna, the The transmission distance of the first antenna is the first distance; the first distance is greater than the first preset transmission distance; the second antenna, the transmission distance of the second antenna is the 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:
    通过所述第二天线,广播第一消息;所述第一消息包括第一发布信息;Broadcast a first message through the second antenna; the first message includes the first release information;
    在距离第二IoT设备的第四距离内,接收到来自第二IoT设备的第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;Within a fourth distance from the second IoT device, a first response message from the second IoT device is received; the first response message includes first request information for the first published information;
    响应于所述第一响应消息,通过所述第一天线,向所述第二IoT设备发送第二消息;In response to the first response message, send a second message to the second IoT device through the first antenna;
    在距离所述第二IoT设备的第三距离内,接收到来自所述第二IoT设备的告知消息;其中,所述第三距离大于所述第四距离。The notification message from the second IoT device is received within a third distance from the second IoT device; wherein the third distance is greater than the fourth distance.
  21. 一种第一IoT设备设置方法,所述第一IoT设备与IoT服务器通信;其特征在于,所述第一IoT设备包括:处理器;存储器;第一天线,所述第一天线在第一发射功率下的发射距离为第一距离,所述第一距离大于第一预设发射距离;所述第一天线在第二发射功率下的发射距离为第二距离,所述第二距离小于或等于第一预设发射距离;所述第一发射功率大于所述第二发射功率;所述方法包括:A method for setting a first IoT device, wherein the first IoT device communicates with an IoT server; characterized in that, the first IoT device includes: a processor; a memory; The transmission distance under the power is the first distance, and the first distance is greater than the first preset transmission distance; the transmission distance of the first antenna under the second transmission power is the second distance, and the second distance is less than or equal to a first preset transmission distance; the first transmission power is greater than the second transmission power; the method includes:
    通过所述第一发射功率下的所述第一天线,广播第一消息;所述第一消息包括第一发布信息;Broadcast a first message through the first antenna under the first transmit power; the first message includes first release information;
    接收到来自第二IoT设备的第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;A first response message from the second IoT device is received; the first response message includes first request information for the first published information;
    响应于所述第一响应消息,通过所述第二发射功率下的所述第一天线,向所述第二IoT设备发送第二消息;In response to the first response message, send a second message to the second IoT device through the first antenna at the second transmit power;
    接收到来自所述第二IoT设备或所述IoT服务器的告知消息。A notification message from the second IoT device or the IoT server is received.
  22. 一种第二IoT设备设置方法,应用于第二IoT设备,所述第二IoT设备与IoT服务器通信;其特征在于,所述第二IoT设备包括:处理器;存储器;第三天线,所述第三天线的发射距离为所述第三距离;所述第三距离大于第二预设发射距离;第四天线,所述第四天线的发射距离为所述第四距离;所述第三天线和所述第四天线为不同的天线;所述第四距离小于或等于第二预设发射距离;所述方法包括:A method for setting a second IoT device, applied to a second IoT device, wherein the second IoT device communicates with an IoT server; characterized in that, the second IoT device comprises: a processor; a memory; a third antenna, the The transmission distance of the third antenna is the third distance; the third distance is greater than the second preset transmission distance; the fourth antenna, the transmission distance of the fourth antenna is the 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; the method includes:
    接收到来自第一IoT设备的第一消息;所述第一消息包括第一发布信息;receiving a first message from a first IoT device; the first message includes first release information;
    随机生成第一密钥;Randomly generate a first key;
    通过所述第四天线,向所述第一IoT设备发送第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;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 published information;
    接收到来自第一IoT设备的第二消息;receiving a second message from the first IoT device;
    通过所述第三天线,向所述IoT服务器发送第二请求消息;sending a second request message to the IoT server through the third antenna;
    接收到来自所述IoT服务器的所述第一请求消息或所述第二请求消息。The first request message or the second request message from the IoT server is received.
  23. 一种第二IoT设备设置方法,应用于第二IoT设备,所述第二IoT设备与IoT服务器通信;其特征在于,所述第二IoT设备包括:处理器;存储器;第三天线,所述第三天线在第三发射功率下的发射距离为第三距离,所述第三距离大于第二预设发射距离;所述第三天线在第四发射功率下的发射距离为第四距离,所述第四距离小于或等于第二预设发射距离;所述第三发射功率大于所述第四发射功率;所述方法包括:A method for setting a second IoT device, applied to a second IoT device, wherein the second IoT device communicates with an IoT server; characterized in that, the second IoT device comprises: a processor; a memory; a third antenna, the The transmission distance of the third antenna under the third transmission power is the third distance, and the third distance is greater than the second preset transmission distance; the transmission distance of the third antenna under the fourth transmission power is the fourth distance, so 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; the method includes:
    接收到来自第一IoT设备的第一消息;所述第一消息包括第一发布信息;receiving a first message from a first IoT device; the first message includes first release information;
    随机生成第一密钥;Randomly generate a first key;
    通过所述第四发射功率下的所述第三天线,向所述第一IoT设备发送第一响应消息;所述第一响应消息包括针对所述第一发布信息的第一请求信息;Send a first response message to the first IoT device through the third antenna under the fourth transmit power; the first response message includes first request information for the first published information;
    接收到来自第一IoT设备的第二消息;receiving a second message from the first IoT device;
    通过所述第三发射功率下的第三天线,向所述IoT服务器发送第二请求消息;sending a second request message to the IoT server through the third antenna under the third transmit power;
    接收到来自所述IoT服务器的所述第一请求消息或所述第二请求消息。The first request message or the second request message from the IoT server is received.
  24. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当所述计算机程序在第一IoT设备或第二IoT设备上运行时,使得所述第一IoT设备或所述第二IoT设备分别执行如权利要求17-21或22-23中任意一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a computer program, when the computer program is run on a first IoT device or a second IoT device, the first IoT device or the second IoT device is executed. The second IoT device performs the method according to any one of claims 17-21 or 22-23, respectively.
PCT/CN2022/081248 2021-03-19 2022-03-16 Iot device configuration method and iot device WO2022194220A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110296691.4A CN115175206A (en) 2021-03-19 2021-03-19 IoT (Internet of things) equipment setting method and IoT equipment
CN202110296691.4 2021-03-19

Publications (1)

Publication Number Publication Date
WO2022194220A1 true WO2022194220A1 (en) 2022-09-22

Family

ID=83322062

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/081248 WO2022194220A1 (en) 2021-03-19 2022-03-16 Iot device configuration method and iot device

Country Status (2)

Country Link
CN (1) CN115175206A (en)
WO (1) WO2022194220A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170006595A1 (en) * 2015-07-03 2017-01-05 Kiban Labs, Inc. Embedded internet of things (iot) hub for integration with an appliance and associated systems and methods
CN112153721A (en) * 2020-08-05 2020-12-29 华为技术有限公司 Wireless routing equipment access method and wireless routing equipment
CN114079862A (en) * 2020-08-05 2022-02-22 华为技术有限公司 Automatic control method, electronic device and computer readable storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170006595A1 (en) * 2015-07-03 2017-01-05 Kiban Labs, Inc. Embedded internet of things (iot) hub for integration with an appliance and associated systems and methods
CN112153721A (en) * 2020-08-05 2020-12-29 华为技术有限公司 Wireless routing equipment access method and wireless routing equipment
CN114079862A (en) * 2020-08-05 2022-02-22 华为技术有限公司 Automatic control method, electronic device and computer readable storage medium

Also Published As

Publication number Publication date
CN115175206A (en) 2022-10-11

Similar Documents

Publication Publication Date Title
WO2020253695A1 (en) Smart home device access method and electronic device
US11979251B2 (en) Home device control method and device
CN113630297B (en) Method and terminal for controlling first equipment
CN113163379B (en) Method for discovering and distributing network and electronic equipment
WO2021052178A1 (en) Wi-fi connection method and device
WO2021104114A1 (en) Method for providing wireless fidelity (wifi) network access service, and electronic device
WO2021063189A1 (en) Method and system for information synchronization between multiple devices, and electronic device
WO2022143031A1 (en) Identity authentication method, electronic device, and computer readable storage medium
WO2021104448A1 (en) Method for synchronizing key information, system and device
WO2022057558A1 (en) Method and device for batch configuring home appliances
CN114499587A (en) Audio synchronization communication method and system and electronic equipment
CN116114239A (en) Volume management method and electronic equipment
WO2022068601A1 (en) Network repairing method, electronic device, and mobile terminal
WO2021043277A1 (en) Method for configuring bluetooth connection parameter, and electronic device
WO2022194220A1 (en) Iot device configuration method and iot device
WO2022028333A1 (en) Automatic control method, and electronic device and computer-readable storage medium
WO2022042170A1 (en) Iot device and authorization method therefor
WO2022161143A1 (en) Method for sharing contacts, mobile device, electronic device, and communication system
CN114285737B (en) Method and device for configuring device
WO2023185593A1 (en) Device login method, electronic device and system
WO2022052760A1 (en) Combined loudspeaker box configuration method, loudspeaker box, and electronic device
WO2024093597A1 (en) Method for configuring a plurality of devices, device, and system
WO2023025059A1 (en) Communication system and communication method
WO2022194105A1 (en) Device connection method, terminal device and distributed system
WO2023051204A1 (en) Cross-device connection method, electronic device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22770573

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22770573

Country of ref document: EP

Kind code of ref document: A1