Communication method, apparatus and system, and storage medium

By introducing a first slave gateway in the indoor LAN, data from IoT devices is encapsulated and transmitted to the main gateway using different protocols, solving the problem of limited Bluetooth or StarFlash protocol signals and achieving wider indoor LAN coverage and resource savings.

WO2026001058A1PCT designated stage Publication Date: 2026-01-02HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/080062
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-26
Filing Date
2025-02-28
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

Bluetooth or StarSignal protocols have limited connection distances, and signal quality drops significantly after being blocked by indoor walls, causing indoor IoT devices to be unable to communicate with the main gateway and reducing the coverage of the indoor LAN.

Method used

By introducing a first slave gateway into the indoor LAN, the service data of IoT devices is encapsulated into messages defined by the second protocol (such as IP, UDP or Ethernet protocol) using a second protocol different from Bluetooth or StarSpark protocol, and transmitted to the main gateway through the first slave gateway, thus expanding the coverage of the indoor LAN.

Benefits of technology

It enables more IoT devices to communicate with the main gateway, expands the coverage and access capabilities of the indoor LAN, avoids duplicate data storage from the gateway, and saves resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025080062_02012026_PF_FP_ABST
    Figure CN2025080062_02012026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of communications, and discloses a communication method, apparatus and system, and a storage medium. The method is applied to a first slave gateway comprised in an indoor local area network; the indoor local area network also comprises an IoT device and a master gateway; the communication protocol used between the first slave gateway and the IoT device is a first protocol; the communication protocol used between the first slave gateway and the master gateway is a second protocol; the first protocol is a Bluetooth protocol or a SparkLink protocol; and the second protocol is a protocol other than the Bluetooth protocol and the SparkLink protocol. The method comprises: receiving first service data sent by the IoT device, the first service data being data defined by the first protocol; generating a first packet, the first packet being a packet defined by the second protocol, and a payload portion of the first packet comprising the first service data; and sending the first packet to the master gateway. The present application can extend the coverage range of the indoor local area network.
Need to check novelty before this filing date? Find Prior Art

Description

Communication method, device, system and storage medium

[0001] The present application claims priority to the Chinese patent application No. 202410847383.X, filed on June 26, 2024, and entitled "Communication method, device, system and storage medium", the entire content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the field of communication, in particular to a communication method, device, system and storage medium. BACKGROUND

[0003] A home network is an indoor local area network, which can provide network communication services for a family. The family often includes multiple internet of things (IoT) devices. For example, the family often includes IoT devices such as smart home devices, and the smart home devices include smart light bulbs, smart speakers, air conditioners, refrigerators, and the like.

[0004] The IoT devices in the family can communicate with a master gateway in the home network using a Bluetooth protocol or a star flash protocol. During communication, the IoT devices can send service data to the master gateway based on the Bluetooth protocol or the star flash protocol, and the master gateway can process the service data. For example, the master gateway can send the service data to a user's mobile phone, and the user can control the IoT devices on the mobile phone through the master gateway.

[0005] The connection distance of the Bluetooth protocol or the star flash protocol is limited, and the signal quality is greatly reduced after passing through the wall in the room, so that many IoT devices in the room cannot communicate with the master gateway, reducing the coverage range of the indoor local area network. SUMMARY

[0006] The present application provides a communication method, device, system and storage medium to expand the coverage range of the indoor local area network. The technical solution is as follows:

[0007] In a first aspect, the present application provides a communication method, which is applied to a first slave gateway included in an indoor local area network. The indoor local area network further includes an internet of things (IoT) device and a master gateway. A communication protocol used between the first slave gateway and the IoT device is a first protocol, and a communication protocol used between the first slave gateway and the master gateway is a second protocol. The first protocol is a Bluetooth protocol or a star flash protocol, and the second protocol is a protocol other than the Bluetooth protocol and the star flash protocol. In the method, first service data sent by the IoT device is received, and the first service data is data defined by the first protocol. A first packet is generated, the first packet is a packet defined by the second protocol, and a payload part of the first packet includes the first service data. The first packet is sent to the master gateway.

[0008] The first protocol is a communication protocol between the first slave gateway and the IoT device, and the second protocol is a communication protocol between the first slave gateway and the master gateway. Since the first slave gateway generates the first message defined by the second protocol after receiving the first service data sent by the IoT device, the payload part of the first message includes the first service data, so that the first slave gateway can send the first message to the master gateway. In this way, the first service data sent by the IoT device can pass through the first slave gateway and be transmitted to the master gateway, and the IoT device can communicate with the master gateway, so that the indoor local area network includes the Bluetooth access range or the star flash access range between the first slave gateway and the IoT device, and the coverage of the indoor local area network is expanded.

[0009] In a possible implementation, the second message sent by the master gateway is received, the second message is a message defined by the second protocol, the payload part of the second message includes second service data to be sent by the master gateway, the second service data is data for the IoT device, and the second service data is data defined by the first protocol. The second service data is obtained by analyzing the second message. The second service data is processed. In this way, the master gateway can send the second service data defined by the first protocol to the first slave gateway, the second service data is data for the IoT device, and the master gateway can realize control and management of the IoT device.

[0010] In another possible implementation, the second protocol is an Internet Protocol (IP) or a User Datagram Protocol (UDP), and the destination port number of the first message is the port number of a target port on the master gateway, and the target port is used to receive a message including data defined by the first protocol. In this way, the first slave gateway can send the first message to the target port of the master gateway, so that the master gateway detects that the first message includes data defined by the first protocol through the target port, and then analyzes and processes the first message.

[0011] In another possible implementation, the second protocol is an Ethernet protocol, and the destination media access control (MAC) address of the first message is the MAC address of the master gateway. In this way, after the first slave gateway sends the first message, the master gateway obtains that the first message is a message sent to itself through the destination MAC address in the first message, and then analyzes and processes the first message.

[0012] In another possible implementation, the information of the IoT device is sent to the master gateway, and the information of the IoT device includes one or more of the following: authentication information of the IoT device, connection parameters of the IoT device, or state information between the first slave gateway and the IoT device. In this way, the information of the IoT device in the indoor LAN is uniformly managed on the master gateway, and other slave gateways can obtain the information of the IoT device from the master gateway. The master gateway uniformly maintains the information of the IoT device in the indoor LAN, and the slave gateway can not maintain the information of the IoT device in the indoor LAN, avoiding the slave gateway to save repeated data and saving the valuable resources of the slave gateway.

[0013] In another possible implementation, the indoor LAN is a home network or an enterprise LAN.

[0014] In a second aspect, the present application provides a communication method, which is applied to a master gateway included in an indoor LAN, the indoor LAN further including an Internet of Things (IoT) device and a first slave gateway, a communication protocol between the first slave gateway and the IoT device being a first protocol, a communication protocol between the first slave gateway and the master gateway being a second protocol, the first protocol being a Bluetooth protocol or a Zigbee protocol, and the second protocol being a protocol other than the Bluetooth protocol and the Zigbee protocol. In the method, a first packet sent by the first slave gateway is received, a payload part of the first packet including first service data received by the first slave gateway from the IoT device, the first service data being data defined by the first protocol, and the first packet being a packet defined by the second protocol. The first service data is obtained by analyzing the first packet. The first service data is processed.

[0015] The first protocol is a communication protocol between the first slave gateway and the IoT device, and the second protocol is a communication protocol between the first slave gateway and the master gateway. Since the first packet is a packet defined by the second protocol, the master gateway can receive the first packet from the first slave gateway. The first packet is generated by the first slave gateway after receiving the first service data sent by the IoT device, and the payload part of the first packet includes the first service data, so that the first service data sent by the IoT device can pass through the first slave gateway and be transmitted to the master gateway, and the IoT device can communicate with the master gateway, so that the indoor LAN includes a Bluetooth access range or a Zigbee access range between the first slave gateway and the IoT device, and the coverage of the indoor LAN is expanded.

[0016] In a possible implementation, the second message is sent to the first slave gateway, the second message is a message defined by the second protocol, and a payload part of the second message includes the second service data required to be sent by the master gateway, the second service data is data for the IoT device, and the second service data is data defined by the first protocol. In this way, the master gateway can send the second service data defined by the first protocol to the first slave gateway, the second service data is data for the IoT device, and the master gateway can implement control and management of the IoT device.

[0017] In another possible implementation, the second service data includes one or more of the following: response data generated by the master gateway after processing the first service data, or a command for the IoT device received by the master gateway from a terminal device or a server.

[0018] In another possible implementation, the second protocol is an Internet Protocol (IP) or a User Datagram Protocol (UDP), and the destination port number of the first message is a port number of a target port on the master gateway, and the target port is configured to receive a message including data defined by the first protocol. The first message sent by the first slave gateway is received through the target port. When it is determined based on the target port that the first message includes data defined by the first protocol, the first service data is obtained by parsing the first message. Since the master gateway receives the first message sent by the first slave gateway through the target port, and only parses the first message when it is determined based on the target port that the first message includes data defined by the first protocol, it is avoided that a message not including data defined by the first protocol is parsed, and computing resources are wasted.

[0019] In another possible implementation, the second protocol is an Ethernet protocol, and the destination Media Access Control (MAC) address of the first message is a MAC address of the master gateway. When it is determined that the destination MAC address of the first message is the MAC address of the master gateway, the first service data is obtained by parsing the first message. Since the master gateway determines that the first message is a message sent to itself when it is determined that the destination MAC address of the first message is the MAC address of the master gateway, the first message is parsed, and it is avoided that a message not including data defined by the first protocol is parsed, and computing resources are wasted.

[0020] In another possible implementation, the first service data is converted into target data defined by a third protocol, the third protocol is a protocol used by an intelligent service, and the intelligent service is a service for managing the IoT device. The target data is sent to a target device, and the target device includes the intelligent service, and the target device is a terminal device or a server. Since the third protocol is a protocol used by the intelligent service, the first service data is converted into target data defined by the third protocol, and it is ensured that the intelligent service can recognize and use the target data.

[0021] In a possible implementation, the first slave gateway sends information of the IoT device to the master gateway, the information of the IoT device including one or more of the following: authentication information of the IoT device, connection parameters of the IoT device, or state information between the first slave gateway and the IoT device. In this way, the master gateway uniformly manages the information of the IoT devices in the indoor LAN, and other slave gateways can obtain the information of the IoT devices from the master gateway. The master gateway uniformly maintains the information of the IoT devices in the indoor LAN, and the slave gateways do not need to maintain the information of the IoT devices in the indoor LAN, thereby avoiding the slave gateways from saving repeated data and saving the valuable resources of the slave gateways.

[0022] In a possible implementation, the indoor LAN further includes a second slave gateway, and the second slave gateway sends a query request when discovering the IoT device, the query request being used to request the information of the IoT device. The master gateway sends a query response to the second slave gateway, the query response including the information of the IoT device, and the query response being used to instruct the second slave gateway to perform one or more of the following operations based on the information of the IoT device: establishing a connection with the IoT device, or configuring a state between the second slave gateway and the IoT device. In this way, when the second slave gateway establishes a connection with the IoT device based on the information of the IoT device, the second slave gateway does not need to request pairing with the IoT device, thereby improving the efficiency of establishing the connection. Alternatively, the second slave gateway configures a state between the second slave gateway and the IoT device based on the information of the IoT device, thereby continuing the state between the first slave gateway and the IoT device and ensuring the continuity of the state.

[0023] In a possible implementation, the indoor LAN is a home network or an enterprise LAN.

[0024] In a third aspect, a communication apparatus is provided, which is configured to execute the method in the first aspect or any possible implementation of the first aspect. Specifically, the apparatus includes units configured to execute the method in the first aspect or any possible implementation of the first aspect.

[0025] In a fourth aspect, a communication apparatus is provided, which is configured to execute the method in the second aspect or any possible implementation of the second aspect. Specifically, the apparatus includes units configured to execute the method in the second aspect or any possible implementation of the second aspect.

[0026] In a fifth aspect, a communication device is provided, which includes at least one processor configured to execute the method in the first aspect or any possible implementation of the first aspect.

[0027] In a sixth aspect, the present application provides a communication device, comprising at least one processor and at least one memory having computer readable instructions stored therein; the at least one processor executes the computer readable instructions to cause the communication device to perform the method in the second aspect or any possible implementation manner of the second aspect.

[0028] In a seventh aspect, the present application provides a communication system, comprising the communication apparatus in the third aspect and the communication apparatus in the fourth aspect, or the communication device in the fifth aspect and the communication device in the sixth aspect.

[0029] In an eighth aspect, the present application provides a computer program product, comprising a computer program stored in a computer readable storage medium, and the computer program is loaded by a processor to implement the method in the first aspect, the second aspect, any possible implementation manner of the first aspect or any possible implementation manner of the second aspect.

[0030] In a ninth aspect, the present application provides a computer readable storage medium, for storing a computer program, and the computer program is loaded by a processor to implement the method in the first aspect, the second aspect, any possible implementation manner of the first aspect or any possible implementation manner of the second aspect.

[0031] In a tenth aspect, the present application provides a chip, comprising a memory and a processor, the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to implement the method in the first aspect, the second aspect, any possible implementation manner of the first aspect or any possible implementation manner of the second aspect. BRIEF DESCRIPTION OF DRAWINGS

[0032] Fig. 1 is a structural schematic diagram of an indoor local area network provided by an embodiment of the present application;

[0033] Fig. 2 is a structural schematic diagram of a network architecture provided by an embodiment of the present application;

[0034] Fig. 3 is a flow chart of a communication method provided by an embodiment of the present application;

[0035] Fig. 4 is a schematic diagram of a packet structure provided by an embodiment of the present application;

[0036] Fig. 5 is another schematic diagram of a packet structure provided by an embodiment of the present application;

[0037] Fig. 6 is another schematic diagram of a packet structure provided by an embodiment of the present application;

[0038] Fig. 7 is another flow chart of a communication method provided by an embodiment of the present application;

[0039] FIG. 8 is a schematic diagram of a structure of a communication apparatus according to an embodiment of the present application;

[0040] FIG. 9 is a schematic diagram of another structure of a communication apparatus according to an embodiment of the present application;

[0041] FIG. 10 is a schematic diagram of a structure of a communication device according to an embodiment of the present application;

[0042] FIG. 11 is a schematic diagram of another structure of a communication device according to an embodiment of the present application;

[0043] FIG. 12 is a schematic diagram of a structure of a communication system according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to facilitate understanding of the embodiments of the present application, some professional terms related to the embodiments of the present application are explained first as follows.

[0045] The first protocol is a communication protocol between the IoT device and the slave gateway, for example, the first protocol is a Bluetooth protocol or a star flash protocol.

[0046] The second protocol is a communication protocol between the slave gateway and the master gateway, for example, the second protocol is an internet protocol (IP), a user datagram protocol (UDP) or an Ethernet protocol, etc.

[0047] The target port is a port on the master gateway for receiving a packet including data defined by the first protocol.

[0048] Referring to FIG. 1, an indoor local area network 100 is provided according to an embodiment of the present application, which includes a master gateway 101, at least one slave gateway 102 and at least one IoT device 103.

[0049] The master gateway 101 can communicate with each of the at least one slave gateway 102.

[0050] For each slave gateway 102, the slave gateway 102 can communicate with at least one first IoT device.

[0051] In some embodiments, the master gateway 101 can also communicate with at least one second IoT device.

[0052] The at least one IoT device 103 includes at least one first IoT device which communicates with the slave gateway 102, and at least one second IoT device which communicates with the master gateway 101.

[0053] The communication protocol adopted between the gateway 102 and the at least one first IoT device is a first protocol, which can be a Bluetooth protocol or a Zigbee protocol. The service data transmitted between the gateway 102 and the first IoT device is data defined by the first protocol.

[0054] For example, the first protocol is a Bluetooth protocol, and the data defined by the first protocol is Bluetooth data. Therefore, the service data transmitted between the gateway 102 and the first IoT device is Bluetooth data.

[0055] For another example, the first protocol is a Zigbee protocol, and the data defined by the first protocol is Zigbee data. Therefore, the service data transmitted between the gateway 102 and the first IoT device is Zigbee data.

[0056] The communication protocol adopted between the master gateway 101 and the at least one second IoT device is also the first protocol. The service data transmitted between the master gateway 101 and the second IoT device is data defined by the first protocol. For example, the service data transmitted between the master gateway 101 and the second IoT device can be Bluetooth data or Zigbee data.

[0057] The communication protocol adopted between the master gateway 101 and the at least one slave gateway 102 is a second protocol, which is a protocol other than the Bluetooth protocol and the Zigbee protocol. That is, the message transmitted between the master gateway 101 and the slave gateway 102 is a message defined by the second protocol.

[0058] Optionally, the second protocol can be an IP, a UDP, or an Ethernet protocol, etc.

[0059] For example, the second protocol is an IP, and the message defined by the second protocol is an IP message. Therefore, the message transmitted between the master gateway 101 and the slave gateway 102 is an IP message.

[0060] For another example, the second protocol is a UDP, and the message defined by the second protocol is a UDP message. Therefore, the message transmitted between the master gateway 101 and the slave gateway 102 is a UDP message.

[0061] For yet another example, the second protocol is an Ethernet protocol, and the message defined by the second protocol is an Ethernet message. Therefore, the message transmitted between the master gateway 101 and the slave gateway 102 is an Ethernet message.

[0062] The first protocol is a short-distance communication protocol. Optionally, the first protocol can also be a low-power short-distance communication protocol. Therefore, the IoT device 103 that is far away from the master gateway 101 can not be discovered by the master gateway 101, and the master gateway 101 can not establish a connection with the IoT device 103 and can not communicate with the IoT device 103.

[0063] Optionally, for the at least one first IoT device, since the at least one first IoT device can be closer to the slave gateway 102 and farther to the master gateway 101, the at least one first IoT device can be discovered by the slave gateway 102 and can establish a connection with the slave gateway 102 but not with the master gateway 101, so the at least one first IoT device communicates with the slave gateway 102.

[0064] For the at least one second IoT device, since the at least one second IoT device can be closer to the master gateway 101, the at least one second IoT device can be discovered by the master gateway 101 and can establish a connection with the master gateway 101, so the at least one second IoT device communicates with the master gateway 101.

[0065] Since the second protocol adopted by the communication between the master gateway 101 and the slave gateway 102 is different from the first protocol adopted by the communication between the slave gateway 102 and the at least one first IoT device, if the service data sent by the first IoT device can pass through the slave gateway 102 and be transmitted to the master gateway 101, the first IoT device can communicate with the master gateway 101. Therefore, the service data of the IoT device 103 can pass through the slave gateway 102, more IoT devices 103 can communicate with the master gateway 101, and more IoT devices 103 can access to the indoor LAN, so that the indoor LAN includes the Bluetooth access range or the Zigbee access range between the slave gateway 102 and the at least one first IoT device, which undoubtedly expands the coverage range of the indoor LAN and the access capability of the indoor LAN.

[0066] Therefore, how to make the service data sent by the IoT device 103 pass through the slave gateway 102 and be transmitted to the master gateway 101 is an urgent problem to be solved, which can be solved by any of the following embodiments in the present application, which will not be described in detail here.

[0067] In some embodiments, the master gateway 101 and the slave gateway 102 can be connected by an optical fiber, for example, the master gateway 101 and the slave gateway 102 can be a master device and a slave device in a fiber to the room (FTTR) scenario, or can be connected by a cable other than an optical fiber, such as a coaxial cable or a twisted pair, etc., or can be connected by a wireless local area network (WLAN), or can be connected by a cellular communication network, etc., so that the master gateway 101 and the slave gateway 102 can not be limited by distance and can not be blocked by obstacles such as walls.

[0068] In some embodiments, the indoor LAN 100 can be a home network or an enterprise LAN, etc. The gateway 102 can be a wireless access point (AP) or an edge optical network terminal (Edge ONT), etc.

[0069] In some embodiments, referring to FIG. 2, the embodiments of the present application further provide a network architecture 200, in which the main gateway 101 in the indoor LAN 100 can communicate with a target device 104. The target device 104 includes intelligent services for managing at least one IoT device 103, and the target device 104 can manage and / or control the at least one IoT device 103 by running the intelligent services.

[0070] Optionally, the intelligent services can be applications for managing and / or controlling the at least one IoT device 103.

[0071] Optionally, the target device 104 can be located in the indoor LAN and access the main gateway 101.

[0072] For example, the target device 104 is a terminal device, such as a mobile phone or a computer, etc. The terminal device is located in the coverage of the indoor LAN 100 and accesses the main gateway 101, and there is a connection between the terminal device and the main gateway 101. Thus, the terminal device communicates with the at least one IoT device 103 through the main gateway 101, and can manage and / or control the at least one IoT device 103 by running the intelligent services.

[0073] Optionally, the target device 104 can not be located in the indoor LAN, and the target device 104 can be located in the Internet. The target device 104 can have a connection between the target device 104 and the main gateway 101 in the indoor LAN 100 through the Internet.

[0074] For example, the target device 104 is a terminal device or a server, etc. For example, the target device 104 can be a mobile phone or a computer, etc. Assuming that the target device 104 is a mobile phone, the mobile phone can have a connection between the mobile phone and the main gateway 101 in the indoor LAN 100 through a cellular communication network. Thus, the mobile phone can remotely manage and / or control the at least one IoT device 103 outside the coverage of the indoor LAN 100.

[0075] For another example, the target device 104 can be a server, which can be located in the cloud. The server can have a connection between the server and the main gateway 101 in the indoor LAN 100 through the Internet. Thus, the server can remotely manage and / or control the at least one IoT device 103 outside the coverage of the indoor LAN 100.

[0076] Referring to FIG. 3, the embodiment of the present application provides a communication method 300, which can be applied to the indoor local area network 100 shown in FIG. 1, or applied to the network architecture 200 shown in FIG. 2. The communication method 300 includes the following processes.

[0077] Step 301: receiving, by the first slave gateway, first service data sent by the first IoT device, the first service data being data defined by a first protocol.

[0078] In some embodiments, the first service data includes a first device identifier of the first IoT device.

[0079] Optionally, the first device identifier can include one or more of the following: a serial number of the first IoT device, an address of the first IoT device, or a device type of the first IoT device, etc.

[0080] For example, the first IoT device is a smart electric lamp, and the device type of the first IoT device is a smart electric lamp.

[0081] The first protocol is a communication protocol used for communication between the first slave gateway and the first IoT device. The first IoT device is a device in the vicinity of the first slave gateway, and the first slave gateway can discover the first IoT device and establish a connection with the first IoT device.

[0082] In some embodiments, the first IoT device can periodically or upon user triggering broadcast a discovery packet to its surroundings, the first IoT device is located in the vicinity of the first slave gateway, and the first slave gateway receives the discovery packet sent by the first IoT device to discover the first IoT device. Then, the first slave gateway establishes a connection with the first IoT device, or the first slave gateway authenticates with the first IoT device, and establishes a connection with the first IoT device after the authentication is passed.

[0083] In some embodiments, the first service data received by the first slave gateway can include a discovery packet sent by the first IoT device. Optionally, the discovery packet includes the first device identifier of the first IoT device.

[0084] Optionally, the first slave gateway and the first IoT device both include pre-configured authentication information. The operation of authenticating the first IoT device by the first slave gateway can be: the first slave gateway sends an authentication request to the first IoT device based on the first device identifier of the first IoT device, the first IoT device receives the authentication request, sends authentication information to the first slave gateway, the first slave gateway receives the authentication information, and if the received authentication information is the same as the authentication information included locally, the authentication of the first IoT device is passed.

[0085] Optionally, the discovery packet further includes at least one frequency band supported by the first IoT device, and the operation of establishing the connection between the first slave gateway and the first IoT device can be: the first slave gateway sends a connection establishment request to the first IoT device based on the first device identifier of the first IoT device, and the connection establishment request includes connection parameters of the first IoT device, and the connection parameters include a communication frequency band and / or encryption and decryption keys, and the communication frequency band is a frequency band selected by the first slave gateway from the at least one frequency band. After receiving the connection establishment request, the first IoT device can send data to the first slave gateway based on the communication frequency band, and the first slave gateway can also send data to the first IoT device based on the communication frequency band, that is, the connection between the first slave gateway and the first IoT device is established. Wherein, the data sent by the first IoT device is encrypted by the encryption key, and the first slave gateway can decrypt the data using the decryption key after receiving the data, and the data sent by the first slave gateway is encrypted by the encryption key, and the first IoT device can decrypt the data using the decryption key after receiving the data.

[0086] Optionally, the first slave gateway includes a protocol stack of the first protocol, and the first slave gateway inputs the connection parameters and / or the received authentication information into the protocol stack, and transmits and receives data with the first IoT device based on the protocol stack.

[0087] In some embodiments, after the first slave gateway establishes the connection with the first IoT device, the first slave gateway can further send the connection authentication information of the first IoT device to the master gateway, and the connection authentication information includes the connection parameters of the first IoT device and / or the authentication information of the first IoT device.

[0088] Optionally, the authentication information of the first IoT device includes one or more of the following: a certificate of the first IoT device, or a personal identification number (PIN) code of the first IoT device, etc.

[0089] Optionally, the operation of the first slave gateway sending the connection authentication information of the first IoT device to the master gateway can be:

[0090] The first slave gateway sends the first reporting information to the master gateway, and the first reporting information includes the connection authentication information of the first IoT device and the first device identifier of the first IoT device.

[0091] In some embodiments, after the connection between the first slave gateway and the first IoT device is established, the first IoT device sends service data to the first slave gateway through the connection when performing the service, and the first service data can include service data sent by the first IoT device when performing the service.

[0092] For example, the first IoT device is a smart light, the smart light can periodically or upon a user trigger broadcast a discovery packet. The first slave gateway receives the discovery packet, and after the smart light is authenticated, the first slave gateway establishes a connection with the smart light. At this time, the first slave gateway receives first service data sent by the smart light, and the first service data includes the discovery packet.

[0093] After the first slave gateway establishes the connection with the smart light, the smart light can send one or more service data to the first slave gateway, such as a confirmation request for requesting confirmation of a color and / or brightness at which the smart light currently emits light, or a scheduling request for scheduling an on timestamp and / or an off timestamp of the smart light, etc. At this time, the first slave gateway receives first service data sent by the smart light, and the first service data includes the one or more service data. The confirmation request includes the color and / or the brightness at which the smart light currently emits light, and the scheduling request includes the on timestamp and / or the off timestamp of the smart light.

[0094] In some embodiments, the first service data can include a plurality of data fragments, and the first IoT device can send the plurality of data fragments to the first slave gateway in multiple times. The first slave gateway receives the plurality of data fragments in multiple times, and assembles the plurality of data fragments into the first service data.

[0095] In some embodiments, the first service data can be a packet, i.e., the first service data is data in a packet structure. For example, referring to FIG. 4, assuming that the first protocol is a Bluetooth protocol, the first service data is Bluetooth data, and a structure of the first service data is a packet structure in a Bluetooth format, the first service data includes one or more of a preamble, an access code / access address, a protocol data unit (PDU) header, data, or a check code, etc.

[0096] In some embodiments, after the connection between the first slave gateway and the first IoT device is established, the first slave gateway further acquires state information between the first slave gateway and the first IoT device, and sends the state information to the master gateway.

[0097] Optionally, the state information includes one or more of a connection state of the first IoT device, or a service running state between the first IoT device and the first slave gateway, etc. Optionally, the connection state of the first IoT device can include an online state or an offline state, etc., and the service running state between the first IoT device and the first slave gateway can include a progress of sending service data by the first IoT device and / or a progress of receiving service data by the first slave gateway, etc.

[0098] Optionally, the operation of the first slave gateway sending the state information to the master gateway can be:

[0099] The first slave gateway sends second reporting information to the master gateway, and the second reporting information includes the state information and the first device identifier of the first IoT device.

[0100] In step 302, the first slave gateway generates a first message, the first message being a message defined by the second protocol, and a payload part of the first message including the first service data.

[0101] The second protocol is a communication protocol used by the first slave gateway and the master gateway for communication.

[0102] In step 302, the first slave gateway can obtain the first message by encapsulating the first service data based on the second protocol. Optionally, in the process of encapsulation, a message header is added based on the payload part including the first service data to obtain the first message.

[0103] In some embodiments, the message header of the first message includes a device identifier of the first slave gateway.

[0104] In some embodiments, when the second protocol is an IP or UDP protocol, the message header of the first message can further include a source address, a source port number, a destination address, and a destination port number.

[0105] The destination port number of the first message is a port number of a target port on the master gateway, and the target port on the master gateway is used to receive a message including data defined by the first protocol. For example, the master gateway can use a port of 5050 as the target port used to receive a message including data defined by the first protocol.

[0106] The source port number of the first message is a port number of a port on the first slave gateway.

[0107] In some embodiments, the master gateway can broadcast notification information to each slave gateway included in the indoor local area network, the notification information including the port number of the target port, and the notification information being used to notify each slave gateway that the target port is a port of the master gateway used to receive a message including data defined by the first protocol. After each slave gateway receives the notification information, the port number of the target port can be recorded so as to be used as a destination port number of a message generated by encapsulation when the service data of the IoT device is encapsulated. Alternatively,

[0108] In some embodiments, the port number of the target port is configured in each slave gateway when each slave gateway is manufactured, so that each slave gateway uses the port number of the target port configured when each slave gateway is manufactured as a destination port number of a message generated by encapsulation when the service data of the IoT device is encapsulated.

[0109] In some embodiments, the payload part of the first message further comprises an information header. Optionally, the information header can comprise one or more of the following information: a magic word, a data version, a data type, a data size, or a cyclic redundancy check (CRC) code, etc.

[0110] The magic word is used to identify that the first service data comprised in the payload part of the first message is data defined by the first protocol.

[0111] The data version is a version of the first service data comprised in the payload part of the first message.

[0112] The data type is a type of the first service data comprised in the payload part of the first message.

[0113] The data size is a size of the first service data comprised in the payload part of the first message.

[0114] The CRC code is used to check the first service data comprised in the payload part of the first message.

[0115] Referring to FIG. 4, the second protocol is IP, and the message header of the first message comprises a transmission control protocol (TCP) message header and an IP message header. The first slave gateway adds the TCP message header on the basis of the payload part comprising the first service data in the process of encapsulating the first service data, to obtain a TCP message. Then, the first slave gateway adds the IP message header on the basis of the TCP message, to obtain the first message. The first message is an IP message.

[0116] Optionally, the first slave gateway comprises a network layer, and the first slave gateway obtains the first message by encapsulating the first service data on the basis of IP in the network layer. That is, the first slave gateway adds the TCP message header on the basis of the payload part comprising the first service data in the network layer, to obtain a TCP message. Then, the first slave gateway adds the IP message header on the basis of the TCP message, to obtain the first message.

[0117] Referring to FIG. 5, the TCP message header in the first message comprises a device identifier of the first slave gateway. The IP message header in the first message comprises a source address, a source port number, a destination address, and a destination port number, etc. The destination port number is a port number of a target port on the master gateway.

[0118] Referring to FIG. 6, the second protocol is UDP, and the message header of the first message comprises a UDP message header. The first slave gateway adds the UDP message header on the basis of the payload part comprising the first service data in the process of encapsulating the first service data, to obtain the first message. The first message is a UDP message.

[0119] Optionally, the first slave gateway comprises a network layer, and the first slave gateway encapsulates the first service data based on the UDP in the network layer to obtain the first message. That is, the first slave gateway adds a UDP message header on the basis of a payload part comprising the first service data in the network layer to obtain the first message. Optionally, the network layer of the first slave gateway carries a transport layer, and the first slave gateway adds a UDP message header on the basis of a payload part comprising the first service data in the transport layer of the network layer to obtain the first message.

[0120] The UDP message header in the first message comprises a device identifier of the first slave gateway, a source address, a source port number, a destination address, a destination port number, and the like.

[0121] In some embodiments, referring to FIG. 7, in the case where the second protocol is IP or UDP, the first slave gateway comprises a first proxy module, and the master gateway comprises a second proxy module.

[0122] Optionally, the first proxy module can be a proxy process, a proxy thread, or a virtual instance running on the first slave gateway, and the second proxy module can be a proxy process, a proxy thread, or a virtual instance running on the master gateway. The virtual instance can be a container or a virtual machine. The first proxy module runs in the network layer of the first slave gateway, and the second proxy module runs in the proxy layer of the master gateway.

[0123] The first proxy module of the first slave gateway receives the first service data sent by the first IoT device, encapsulates the first service data to obtain the first message. Optionally, in the process of encapsulation, the first proxy module of the first slave gateway adds a message header on the basis of a payload part comprising the first service data to obtain the first message.

[0124] In some embodiments, when the second protocol is an Ethernet protocol, the destination media access control (MAC) address of the first message is the MAC address of the master gateway.

[0125] The message header of the first message can further comprise a device identifier of the first slave gateway, a source MAC address, a source port number, a destination MAC address, a destination port number, and a type, which is used to identify that the first message is a message comprising data defined by the first protocol. The target port can be a port number of any port on the master gateway, that is, in this case, the master gateway does not need a separate target port for receiving a message comprising data defined by the first protocol.

[0126] Optionally, the payload part of the first message further comprises an information header, which can comprise one or more of the following information: a magic word, a data version, a data type, a data size, or a CRC code, and the like.

[0127] The message header of the first message is an Ethernet message header. The first slave gateway adds an Ethernet message header on the basis of a payload part including the first service data in the process of encapsulating the first service data, to obtain the first message. The first message is an Ethernet message.

[0128] Optionally, the first slave gateway comprises a data link layer, and the data link layer comprises a driver of the first protocol. The first slave gateway encapsulates the first service data in the driver comprised in the data link layer, to obtain the first message based on the Ethernet protocol. That is, the first slave gateway adds an Ethernet message header on the basis of a payload part including the first service data in the driver comprised in the data link layer, to obtain the first message.

[0129] Step 303: The first slave gateway sends the first message to the master gateway.

[0130] When the second protocol is IP or UDP, the destination port number of the first message is the port number of the target port, so the first slave gateway sends the first message to the target port on the master gateway.

[0131] Optionally, referring to FIG. 7, the first proxy module of the first slave gateway sends the first message to the target port on the master gateway.

[0132] Optionally, when the second protocol is IP, there is a TCP connection between the first slave gateway and the target port of the master gateway, and the first slave gateway sends the first message to the target port on the master gateway through the TCP connection.

[0133] Optionally, when the second protocol is UDP, the first slave gateway also periodically sends connection information to the target port on the master gateway, to maintain the connection relationship between the first slave gateway and the target port on the master gateway through the connection information.

[0134] Step 304: The master gateway receives the first message, and obtains the first service data in the first message by analyzing the first message.

[0135] When the second protocol is IP or UDP, the master gateway comprises the target port, and the master gateway listens to the target port in real time. When the master gateway listens to the first message sent to the target port, the master gateway receives the first message through the target port.

[0136] Since the target port is a port for receiving a message including data defined by the first protocol, the master gateway can determine that the first message includes data defined by the first protocol based on the target port, receives the first message through the target port, and analyzes the first message to obtain the first service data.

[0137] Optionally, the master gateway comprises a network layer, and the master gateway analyzes the first message in the network layer to obtain the first service data.

[0138] In some embodiments, referring to FIG. 7, the master gateway comprises a second proxy module, which listens to a target port in real time, and receives a first message sent to the target port when the first message is detected. Based on the target port, it is determined that the first message comprises data defined by the first protocol, and the first message is parsed to obtain first service data.

[0139] In some embodiments, the first slave gateway may, due to an abnormality or the like, send a message not comprising data defined by the first protocol to the target port on the master gateway. After the master gateway receives the message through the target port, it is determined based on the target port that the message comprises data defined by the first protocol. However, the message actually does not comprise data defined by the first protocol, so the determination result is incorrect, and the master gateway cannot parse data defined by the first protocol from the message, wasting the computing resources of the master gateway.

[0140] In order to solve the error problem in this case, the information header of the payload part of the first message comprises a magic word, and when the master gateway determines based on the target port that the payload part of the first message comprises data defined by the first protocol, it reads the magic word of the first message from the payload part of the first message. Based on the magic word of the first message, it is determined whether the payload part of the first message comprises data defined by the first protocol; if it is determined that the payload part of the first message comprises data defined by the first protocol, the payload part of the first message is parsed to obtain first service data; if it is determined that the payload part of the first message does not comprise data defined by the first protocol, the first message can be discarded, or forwarded, or subjected to other processing.

[0141] When the second protocol is an Ethernet protocol or the like, the master gateway receives the first message, reads the destination MAC address of the first message from the message header of the first message, and determines whether the destination MAC address of the first message is the MAC address of the master gateway. If the destination MAC address of the first message is the MAC address of the master gateway, the first message is parsed to obtain first service data. If the destination MAC address of the first message is not the MAC address of the master gateway, the first message is discarded.

[0142] The destination MAC address of the message received by the master gateway is the MAC address of the master gateway, indicating that the message is sent to the master gateway. However, the message may or may not comprise data defined by the first protocol. When a message not comprising data defined by the first protocol and having the MAC address of the master gateway as the destination MAC address is received, if the master gateway parses the message, it cannot parse data defined by the first protocol, wasting the computing resources of the master gateway.

[0143] To avoid wasting the computing resource of the master gateway in this case, the message header of the first message further includes a type, which is used to identify that the first message is a message including the data defined by the first protocol. The master gateway reads the type from the message header of the first message when it is determined that the destination MAC address of the first message is the MAC address of the master gateway. It is determined whether the first message includes the data defined by the first protocol based on the type. If it is determined that the first message includes the data defined by the first protocol, the first service data is obtained by parsing the first message. If it is determined that the first message does not include the data defined by the first protocol, the first message can be discarded, or forwarded, or processed in other manners.

[0144] Optionally, the master gateway includes a data link layer, and the data link layer includes a driver of the first protocol. The master gateway parses the first message in the driver included in the data link layer to obtain the first service data. In implementation, the magic word of the first message is obtained by parsing the information header in the payload part of the first message in the driver. When it is determined that the payload part of the first message includes the data defined by the first protocol based on the magic word of the first message, the payload part of the first message is continuously parsed to obtain the first service data.

[0145] In some embodiments, the information header of the payload part of the first message further includes a data version, a data type, a data size and / or a CRC code, etc. In the case where the second protocol is an IP, a UDP or an Ethernet protocol, etc., the master gateway parses the data version, the data type, the data size and / or the CRC code when parsing the payload part of the first message. Based on the data version, the data type, the data size and / or the CRC code, the payload part of the first message is continuously parsed to obtain the first service data. For example, the master gateway can extract the first service data from the payload part of the first message based on the data size, and verify the extracted first service data based on the CRC code.

[0146] In some embodiments, the message header of the first message further includes a device identifier of the first slave gateway. The master gateway can further obtain the device identifier of the first slave gateway when parsing the first message.

[0147] In some embodiments, the master gateway can further receive the connection authentication information of the first IoT device sent by the first slave gateway. The master gateway further saves the first device identifier of the first IoT device in the corresponding relationship between the first device identifier and the connection authentication information.

[0148] Optionally, in implementation, the master gateway receives the first report information sent by the first slave gateway, the first report information comprises the first device identifier of the first IoT device and the connection authentication information, and the master gateway correspondingly saves the first device identifier of the first IoT device and the connection authentication information comprised in the first report information in the corresponding relationship between the first device identifier and the connection authentication information.

[0149] Optionally, the master gateway can also send the first report information to the slave gateway other than the first slave gateway comprised in the indoor local area network. The slave gateway other than the first slave gateway comprised in the indoor local area network comprises a second slave gateway, and the second slave gateway receives the first report information and correspondingly saves the first device identifier of the first IoT device and the connection authentication information comprised in the first report information in the corresponding relationship between the first device identifier and the connection authentication information.

[0150] In some embodiments, the master gateway can also receive the state information between the first slave gateway and the first IoT device sent by the first slave gateway, and the master gateway correspondingly saves the first device identifier of the first IoT device and the state information in the corresponding relationship between the first device identifier and the state information.

[0151] Optionally, in implementation, the master gateway receives the second report information sent by the first slave gateway, the second report information comprises the first device identifier of the first IoT device and the state information, and the master gateway correspondingly saves the first device identifier of the first IoT device and the state information comprised in the second report information in the corresponding relationship between the first device identifier and the state information.

[0152] Optionally, the master gateway can also send the second report information to the slave gateway other than the first slave gateway comprised in the indoor local area network. The slave gateway other than the first slave gateway comprised in the indoor local area network comprises a second slave gateway, and the second slave gateway receives the second report information and correspondingly saves the first device identifier of the first IoT device and the state information comprised in the second report information in the corresponding relationship between the first device identifier and the state information.

[0153] If the master gateway does not forward the first report information and the second report information to the slave gateway in the indoor local area network, the master gateway correspondingly saves the corresponding relationship between the first device identifier and the connection authentication information and the corresponding relationship between the first device identifier and the state information. Each slave gateway in the indoor local area network can not save the two corresponding relationships, thereby avoiding the slave gateway from saving repeated data and saving the valuable resources of the slave gateway.

[0154] Step 305: The master gateway processes the first service data.

[0155] In some embodiments, the first service data can be a discovery packet. The operation of processing the first service data by the master gateway can be:

[0156] The master gateway obtains a first device identifier of the first IoT device from the discovery packet, obtains a second device identifier of the first IoT device based on the first device identifier and a device identifier of the first slave gateway, the second device identifier comprising information such as a location and a device type of the first IoT device, and saves the device identifier of the first slave gateway, the first device identifier of the first IoT device and the second device identifier of the first IoT device in a correspondence relationship between the device identifier of the slave gateway, the first device identifier of the IoT device and the second device identifier of the IoT device.

[0157] Optionally, the second device identifier can be an alias of the first IoT device for facilitating user understanding. For example, assuming that the first IoT device is a smart electric lamp located in a master bedroom, the second device identifier of the first IoT device can be a master bedroom smart electric lamp. The operation of the master gateway to obtain the second device identifier of the first IoT device can be:

[0158] The master gateway determines the location of the first IoT device based on the device identifier of the first slave gateway, and determines the device type of the first IoT device based on the first device identifier of the first IoT device, thereby obtaining the second device identifier of the first IoT device.

[0159] For the location of the first IoT device, the master gateway can determine the location of the first slave gateway based on the device identifier of the first slave gateway, and take the location as the location of the first IoT device.

[0160] For example, the first slave gateway is located in the master bedroom, and the first IoT device is a smart electric lamp located in the master bedroom, so the first slave gateway can discover the first IoT device and establish a connection with the first IoT device. The master gateway can determine that the location of the first slave gateway is the master bedroom based on the device identifier of the first slave gateway, and thus determine that the first IoT device is located in the master bedroom, thereby obtaining that the location of the first IoT device is the master bedroom.

[0161] For the device type of the first IoT device, the first device identifier of the first IoT device comprises the device type of the first IoT device, and the master gateway can read the device type of the first IoT device from the first device identifier. Alternatively, the first device identifier of the first IoT device comprises a serial number of the first IoT device and / or an address of the first IoT device, and the master gateway can query the device type of the first IoT device from the network based on the serial number of the first IoT device and / or the address of the first IoT device.

[0162] For example, assuming that the master gateway obtains that the device type of the first IoT device is a smart electric lamp, the obtained second device identifier of the first IoT device is a master bedroom smart electric lamp.

[0163] In some embodiments, the master gateway can further send a prompt information to the target device, the prompt information comprising the second device identifier of the first IoT device. The target device receives the prompt information and displays the prompt information to prompt the first IoT device to access the indoor local area network.

[0164] For example, assuming that the target device is a mobile phone and the mobile phone runs a smart service for managing IoT devices. The mobile phone can receive the prompt information sent by the master gateway, the prompt information being "the smart light in the master bedroom accesses the home network", and the mobile phone displays the prompt information to prompt the user.

[0165] In some embodiments, the first service data is service data sent by the first IoT device when the first IoT device executes the service. For example, the first service data can be a confirmation request or a reservation request, and the operation of the master gateway processing the first service data can be that the master gateway can confirm the confirmation request or the reservation request.

[0166] Optionally, after the master gateway confirms the confirmation request or the reservation request, the master gateway can further generate response data, and the response data can be a consent command obtained by confirming the confirmation request or the reservation request.

[0167] For example, assuming that the first IoT device is a smart light, the first service data is a confirmation request for requesting to confirm the color and / or brightness at which the smart light currently emits light, and the master gateway can agree that the smart light emits light at the color and / or brightness, so that the confirmation of the confirmation request obtains a consent command. Alternatively, the first service data is a reservation request for reserving an on timestamp and / or an off timestamp of the smart light, and the master gateway can agree that the smart light turns on at the reserved on timestamp and / or turns off at the reserved off timestamp, so that the confirmation of the reservation request obtains a consent command.

[0168] In some embodiments, the master gateway can need to send the first service data to the target device, and the operation of the master gateway processing the first service data can be:

[0169] The master gateway converts the first service data into target data defined by a third protocol, the third protocol being a protocol used by the smart service, and sends the target data to the target device.

[0170] Optionally, the first service data can be binary data. For example, the first service data is Bluetooth data or star flash data, and the first service data is binary data that is not convenient for users to understand and program. The target data defined by the third protocol can be data in an extensible markup language (xml) format or data in a javascript object notation (json) format, which is data convenient for users to understand and program.

[0171] After the target device receives the target data, the target device can process the target data.

[0172] For example, assuming the first IoT device is a smart light, the first service data is a confirmation request for requesting confirming a color and / or brightness at which the smart light is currently emitting light, the master gateway converts the confirmation request into a confirmation request in xml format or json format (as the target data) and sends the confirmation request in xml format or json format to the target device.

[0173] After the target device receives the confirmation request in xml format or json format, the target device can perform a processing operation as follows:

[0174] The target device displays the confirmation request in xml format or json format to a user. The user can agree that the smart light emits light in the color and / or brightness, triggers a confirmation of the confirmation request to the target device, and the target device obtains an agree command. Alternatively, the user can disagree that the smart light emits light in the color and / or brightness, triggers a change command to the target device, and the change command includes a color and / or brightness changed by the user.

[0175] For another example, the first service data is a reservation request for reserving an on timestamp and / or an off timestamp of the smart light, the master gateway converts the reservation request into a reservation request in xml format or json format (as the target data) and sends the reservation request in xml format or json format to the target device.

[0176] After the target device receives the reservation request in xml format or json format, the target device can perform a processing operation as follows:

[0177] The target device displays the reservation request in xml format or json format to a user. The user can agree that the smart light turns on at the reserved on timestamp and / or turns off at the reserved off timestamp, triggers a confirmation of the reservation request to the target device, and the target device obtains an agree command. Alternatively, the user can disagree that the smart light turns on at the reserved on timestamp and / or turns off at the reserved off timestamp, triggers a change command to the target device, and the change command includes an on timestamp and / or an off timestamp changed by the user.

[0178] In some embodiments, the first slave gateway can also convert the first service data into target data defined by a third protocol when receiving the first service data, and send the target data to the master gateway. The master gateway can process the target data after receiving the target data. For example, the master gateway sends the target data to the target device.

[0179] The above are only several examples of the main gateway processing the first service data. In actual scenarios, the main gateway can have different operations for processing the first service data for IoT devices of different device types. The operations for processing the first service data can include not only the above several examples but also other operations, which are not listed here.

[0180] In some embodiments, the main gateway can have second service data to be sent, the second service data being data for the first IoT device and being data defined by the first protocol. The second service data can be sent according to the following procedure.

[0181] Step 306: The main gateway obtains the second service data, generates a second packet, the second packet being a packet defined by the second protocol, and the payload of the second packet including the second service data.

[0182] In some embodiments, the second service data includes the first device identifier of the first IoT device and response data generated by the main gateway after processing the first service data. For example, the response data includes the above-mentioned consent command. The response data generated by the main gateway is data defined by the first protocol.

[0183] The first service data includes the first device identifier of the first IoT device, and the first device identifier included in the second service data can be obtained by the main gateway from the first service data.

[0184] In some embodiments, the second service data includes the first device identifier of the first IoT device and a command for the first IoT device received by the main gateway from a target device.

[0185] For example, the command can be the above-mentioned consent command or change command sent by the target device.

[0186] For another example, the target device can need to query the status of the first IoT device, and the command can be a query command.

[0187] In some embodiments, the command for the first IoT device sent by the target device can be data defined by the third protocol, the main gateway converts the command into a command defined by the first protocol after receiving the command, and the second service data includes the command defined by the first protocol.

[0188] Optionally, the command sent by the target device to the main gateway includes a second device identifier of the first IoT device. The main gateway can obtain the first device identifier according to the following operation.

[0189] The master gateway reads the second device identifier of the first IoT device from the command, and based on the second device identifier, queries the first device identifier of the first IoT device from the correspondence relationship between the device identifier of the slave gateway, the first device identifier and the second device identifier of the IoT device.

[0190] In addition to the above-mentioned several ways of obtaining the second service data, the master gateway can also obtain the second service data in other ways, which are not listed here.

[0191] Since the resources of the master gateway are more than the resources of the first slave gateway, and the resources of the slave gateway are less, the slave gateway can not be able to process the service data of the IoT device. Since the master gateway can centrally process the service data of each IoT device in the indoor local area network, after receiving the first service data, the first slave gateway directly encapsulates the first service data to obtain the first message at the network layer or the data link layer, and forwards the first message to the master gateway, so that the master gateway processes the first service data, and ensures that the operation of successfully controlling and / or managing each IoT device in the indoor local area network can be performed.

[0192] The detailed implementation process of the master gateway generating the second message can refer to the detailed implementation process of the first slave gateway generating the first message in step 302, which will not be described in detail here.

[0193] Step 307: The master gateway sends the second message to the first slave gateway.

[0194] In step 307, the master gateway can obtain the device identifier of the first slave gateway, and based on the device identifier of the first slave gateway, send the second message to the first slave gateway.

[0195] In the case that the second service data includes response data generated after the master gateway processes the first service data, the master gateway can query the device identifier of the first slave gateway from the correspondence relationship between the device identifier of the slave gateway, the first device identifier and the second device identifier of the IoT device based on the first device identifier of the first IoT device. Based on the device identifier of the first slave gateway, the second message is sent to the first slave gateway.

[0196] In the case that the second service data includes a command sent by the target device, when the master gateway queries the first device identifier of the first IoT device from the correspondence relationship between the device identifier of the slave gateway, the first device identifier and the second device identifier of the IoT device based on the second device identifier included in the command, the device identifier of the first slave gateway is also queried. Based on the device identifier of the first slave gateway, the second message is sent to the first slave gateway.

[0197] In some embodiments, when the second protocol is IP or UDP, the master gateway sends the second message to the first slave gateway through the target port, the source port number of the second message is the port number of the target port, and the destination port number of the second message is the source port number of the first message, i.e., the destination port number of the second message is the port number of a port on the first slave gateway.

[0198] Optionally, when the second protocol is IP, the first slave gateway has a TCP connection with the target port of the master gateway, and the master gateway sends the second message to the first slave gateway through the target port based on the TCP connection.

[0199] Optionally, when the second protocol is UDP, the first slave gateway periodically sends connection information to the target port on the master gateway, and the connection information is used to maintain the connection between the first slave gateway and the target port on the master gateway. The master gateway can send the second message to the first slave gateway through the target port based on the received connection information.

[0200] Step 308: The first slave gateway receives the second message, obtains the second service data by analyzing the second message, and processes the second service data.

[0201] The detailed implementation process of the first slave gateway analyzing the second message can refer to the detailed implementation process of the master gateway analyzing the first message in step 304, which will not be described in detail here.

[0202] In some embodiments, the second service data includes the above-mentioned consent command, and the first slave gateway can confirm the consent command to implement processing of the second service data. Alternatively, the consent command is sent to the first IoT device to enable the first IoT device to confirm the consent command to implement processing of the second service data.

[0203] In some embodiments, the second service data includes the above-mentioned change command, and the first slave gateway sends the change command to the first IoT device to implement processing of the second service data.

[0204] The first IoT receives the change command and executes the change command. For example, the first IoT device is a smart light, and the smart light receives the change command. The change command includes the color and / or brightness changed by the user, and the smart light emits light based on the color and / or brightness changed by the user. Alternatively, the change command includes the on timestamp and / or off timestamp changed by the user, and the smart light is turned on at the on timestamp changed by the user and turned off at the off timestamp changed by the user.

[0205] Optionally, after the first IoT device executes the change command, it can also send a change response to the first slave gateway, and the change response is service data defined by the first protocol. The change response can be returned as the first service data from the above step 301.

[0206] In some embodiments, the second service data comprises the query command, and the first slave gateway sends the query command to the first IoT device to implement processing the second service data.

[0207] The first IoT device receives the query command and executes the query command. For example, the first IoT device is a smart light, and the smart light receives the query command. The query command is used to query the state of the first IoT device, and the smart light obtains its own state based on the query command and sends a query response to the first slave gateway, the query response comprising the state of the smart light.

[0208] The query response can be returned as the first service data from the step 301.

[0209] In some embodiments, the first IoT device can be a mobile device, and the first IoT device moves from the vicinity of the first slave gateway to the vicinity of the second slave gateway and can be discovered by the second slave gateway. Next, the second slave gateway and the master gateway further perform the following processes.

[0210] (1) The second slave gateway can send a query request to the master gateway, the query request comprising a first device identifier of the first IoT device, and the query request is used to request to obtain information of the first IoT device.

[0211] (2) The master gateway receives the query request sent by the second slave gateway, obtains the information of the first IoT device based on the first device identifier comprised in the query request, and sends a query response to the second slave gateway, the query response comprising the information of the first IoT device.

[0212] The information of the first IoT device comprises one or more of the following: connection authentication information of the first IoT device or state information between the first slave gateway and the first IoT device.

[0213] The operation of the master gateway to obtain the information of the first IoT device can comprise:

[0214] The master gateway obtains the connection authentication information of the first IoT device from a correspondence between the first device identifier and the connection authentication information based on the first device identifier of the first IoT device. And / or,

[0215] The master gateway obtains the state information between the first slave gateway and the first IoT device from a correspondence between the first device identifier and the state information based on the first device identifier of the first IoT device.

[0216] (3) The second slave gateway receives the query response and performs one or more of the following operations based on the information of the first IoT device: establishing a connection with the first IoT device, or configuring a state between the second slave gateway and the first IoT device.

[0217] In some embodiments, if the second slave gateway stores the correspondence between the first device identifier and the connection authentication information, the second slave gateway acquires the authentication information of the first IoT device from the correspondence between the first device identifier and the connection authentication information based on the first device identifier of the first IoT device.

[0218] If the second slave gateway stores the correspondence between the first device identifier and the state information, the second slave gateway acquires the state information between the first slave gateway and the first IoT device from the correspondence between the first device identifier and the state information based on the first device identifier of the first IoT device.

[0219] In some embodiments, the information of the first IoT device includes the connection authentication information of the first IoT device, the second slave gateway includes a protocol stack of the first protocol, and the second slave gateway inputs the authentication information of the first IoT into the protocol stack of the first protocol, and establishes the connection with the first IoT device through the protocol stack of the first protocol. In this way, the second slave gateway does not need to authenticate with the first IoT device, so the second slave gateway does not need to request the target device to pair the second slave gateway and the first IoT device, saving the user pairing operation and improving the efficiency of connection establishment.

[0220] Optionally, the connection authentication information includes the connection parameter of the first IoT device, and the operation of establishing the connection between the second slave gateway and the first IoT device can be that the second slave gateway sends a connection establishment request to the first IoT device based on the first device identifier of the first IoT device, and the connection establishment request includes the connection parameter of the first IoT device. After the first IoT device receives the connection establishment request, it transmits and receives data with the second slave gateway based on the connection parameter, that is, the connection between the second slave gateway and the first IoT device is established. Then the second slave gateway transmits and receives data with the first IoT device based on the protocol stack.

[0221] In some embodiments, the information of the first IoT device includes the state information between the first slave gateway and the first IoT device, and the state information includes one or more of the following, the connection state of the first IoT device, or the service running state between the first IoT device and the first slave gateway, etc.

[0222] The second slave gateway configures the first IoT device based on the connection state. For example, the connection state of the first IoT device can include an online state or an offline state, etc., and the second slave gateway can configure the first IoT device to be online or offline. And / or,

[0223] The second slave gateway configures a progress of the first IoT device running the service based on the service running state. For example, the service running state can include a progress of the first IoT sending service data and / or a progress of the first slave gateway receiving service data, and the second slave gateway configures the first IoT device to continue sending service data from the progress of sending service data, or the second slave gateway configures the first IoT device to continue sending service data from the progress of the first slave gateway receiving service data.

[0224] For the second IoT device connected with the master gateway, the master gateway can directly communicate with the second IoT device based on the first protocol, that is, the master gateway can receive service data sent by the second IoT device based on the first protocol, and / or send service data to the second IoT device based on the first protocol.

[0225] In the embodiment of the present application, for the first IoT device far away from the master gateway, the first IoT device can access the first slave gateway near the first IoT device, and can connect to the first slave gateway based on the first protocol, and send first service data defined by the first protocol to the first slave gateway. The first slave gateway communicates with the master gateway based on the second protocol, receives the first service data, encapsulates the first service data into a first packet defined by the second protocol, the payload part of the first packet includes the first service data, and sends the first packet to the master gateway. In this way, the first service data is transmitted to the master gateway through the first slave gateway, and the master gateway obtains the first service data by analyzing the first packet, and processes the first service data. Thus, the coverage and access capability of the indoor local area network are expanded. Since the first IoT device can access the first slave gateway near the first IoT device, the first IoT device can communicate with the first slave gateway using the first protocol of low-power short-range communication, thereby reducing the power consumption of the first IoT device.

[0226] Referring to FIG. 8, an embodiment of the present application provides a communication device 800, which can be deployed on a slave gateway in the indoor local area network 100 shown in FIG. 1, or on a slave gateway in the network architecture 200 shown in FIG. 2, or on a first slave gateway in the method 300 shown in FIG. 3. The device 800 is located in an indoor local area network, which further includes an Internet of Things (IoT) device and a master gateway. A communication protocol used between the device 800 and the IoT device is a first protocol, and a communication protocol used between the device 800 and the master gateway is a second protocol. The first protocol is a Bluetooth protocol or a star flash protocol, and the second protocol is a protocol other than the Bluetooth protocol and the star flash protocol. The device 800 includes:

[0227] The communication unit 801 is configured to receive first service data sent by the IoT device, the first service data being data defined by the first protocol.

[0228] The processing unit 802 is configured to generate a first message, the first message being a message defined by a second protocol, and a payload part of the first message comprising first service data;

[0229] The communication unit 801 is further configured to send the first message to the main gateway.

[0230] Optionally, the communication unit 801 receives the first service data sent by the IoT device, and the detailed implementation process can refer to related content in step 301 of method 300 shown in FIG. 3, which will not be described in detail here.

[0231] Optionally, the processing unit 802 generates the first message, and the detailed implementation process can refer to related content in step 302 of method 300 shown in FIG. 3, which will not be described in detail here.

[0232] Optionally, the communication unit 801 sends the first message to the main gateway, and the detailed implementation process can refer to related content in step 303 of method 300 shown in FIG. 3, which will not be described in detail here.

[0233] Optionally, the communication unit 801 is further configured to receive a second message sent by the main gateway, the second message being a message defined by a second protocol, a payload part of the second message comprising second service data required to be sent by the main gateway, the second service data being data for the IoT device, and the second service data being data defined by a first protocol;

[0234] The processing unit 802 is further configured to obtain the second service data by analyzing the second message;

[0235] The processing unit 802 is further configured to process the second service data.

[0236] Optionally, the communication unit 801 receives the second message sent by the main gateway, and the detailed implementation process can refer to related content in step 308 of method 300 shown in FIG. 3, which will not be described in detail here.

[0237] Optionally, the processing unit 802 obtains the second service data and processes the second service data, and the detailed implementation process can refer to related content in step 308 of method 300 shown in FIG. 3, which will not be described in detail here.

[0238] Optionally, the second protocol is an Internet Protocol (IP) or a User Datagram Protocol (UDP), and a destination port number of the first message is a port number of a target port on the main gateway, the target port being configured to receive a message comprising data defined by the first protocol.

[0239] Optionally, the second protocol is an Ethernet protocol, and a destination Media Access Control (MAC) address of the first message is a MAC address of the main gateway.

[0240] Optionally, the communication unit 801 is further configured to:

[0241] send, to the master gateway, information of the IoT device, the information of the IoT device comprising one or more of the following: authentication information of the IoT device, connection parameters of the IoT device, or state information between the apparatus 800 and the IoT device.

[0242] Optionally, the detailed implementation process of the communication unit 801 sending, to the master gateway, the information of the IoT device can refer to the related content in step 301 of the method 300 shown in FIG. 3, and will not be described in detail here.

[0243] Optionally, the indoor local area network is a home network or an enterprise local area network.

[0244] In the embodiment of the present application, after the communication unit receives the first service data sent by the IoT device, the processing unit generates a first message defined by the second protocol, and the payload part of the first message comprises the first service data, so that the communication unit can send the first message to the master gateway. In this way, the first service data sent by the IoT device can pass through the apparatus 800 and be transmitted to the master gateway, so as to expand the coverage range of the indoor local area network.

[0245] Referring to FIG. 9, the embodiment of the present application provides a communication apparatus 900, which can be deployed on the master gateway in the indoor local area network 100 shown in FIG. 1, or on the master gateway in the network architecture 200 shown in FIG. 2, or on the master gateway in the method 300 shown in FIG. 3. The apparatus 900 is located in an indoor local area network, which further comprises an Internet of Things (IoT) device and a first slave gateway. The communication protocol between the first slave gateway and the IoT device is a first protocol, and the communication protocol between the first slave gateway and the apparatus 900 is a second protocol. The first protocol is a Bluetooth protocol or a star flash protocol, and the second protocol is a protocol other than the Bluetooth protocol and the star flash protocol. The apparatus 900 comprises:

[0246] a communication unit 901, configured to receive a first message sent by the first slave gateway, wherein a payload part of the first message comprises first service data received by the first slave gateway from the IoT device, and the first service data is data defined by the first protocol, and the first message is a message defined by the second protocol;

[0247] a processing unit 902, configured to obtain the first service data by analyzing the first message;

[0248] The processing unit 902 is further configured to process the first service data.

[0249] Optionally, the communication unit 901 receives the first message, and details of the implementation process refer to step 304 of method 300 shown in FIG. 3, which will not be repeated here.

[0250] Optionally, the processing unit 902 obtains the first service data by parsing the first message, and details of the implementation process refer to step 304 of method 300 shown in FIG. 3, which will not be repeated here.

[0251] Optionally, the processing unit 902 processes the first service data, and details of the implementation process refer to step 305 of method 300 shown in FIG. 3, which will not be repeated here.

[0252] Optionally, the communication unit 901 is further configured to:

[0253] Optionally, the communication unit 901 sends a second message to the first slave gateway, the second message is a message defined by a second protocol, a payload part of the second message includes second service data required to be sent by the apparatus 900, the second service data is data for the IoT device, and the second service data is data defined by the first protocol.

[0254] Optionally, the communication unit 901 sends the second message, and details of the implementation process refer to step 307 of method 300 shown in FIG. 3, which will not be repeated here.

[0255] Optionally, the second service data includes one or more of: response data generated by the processing unit 902 after processing the first service data, or a command for the IoT device received by the communication unit 901 from a terminal device or a server.

[0256] Optionally, the second protocol is an Internet Protocol (IP) or a User Datagram Protocol (UDP), and a destination port number of the first message is a port number of a target port on the apparatus 900, and the target port is configured to receive a message including data defined by the first protocol.

[0257] The communication unit 901 is configured to receive the first message sent by the first slave gateway through the target port.

[0258] The processing unit 902 is configured to, when it is determined based on the target port that the first message includes data defined by the first protocol, obtain the first service data by parsing the first message.

[0259] Optionally, the communication unit 901 receives the first message sent by the first slave gateway through the target port, and details of the implementation process refer to step 304 of method 300 shown in FIG. 3, which will not be repeated here.

[0260] Optionally, the processing unit 902, when determining that the first message includes data defined by the first protocol based on the target port, parses the first message to obtain the first service data. For details, refer to related content in step 304 of method 300 shown in FIG. 3.

[0261] Optionally, the second protocol is an Ethernet protocol, and the destination media access control (MAC) address of the first message is a MAC address of the apparatus 900.

[0262] The processing unit 902 is configured to parse the first message to obtain the first service data when it is determined that the destination MAC address of the first message is the MAC address of the apparatus 900.

[0263] Optionally, the processing unit 902, when determining that the destination MAC address of the first message is the MAC address of the apparatus 900, parses the first message to obtain the first service data. For details, refer to related content in step 304 of method 300 shown in FIG. 3.

[0264] Optionally, the processing unit 902 is configured to convert the first service data into target data defined by a third protocol, and the third protocol is a protocol used by an intelligent service, and the intelligent service is a service used to manage an IoT device.

[0265] The communication unit 901 is further configured to send the target data to a target device, and the target device includes the intelligent service, and the target device is a terminal device or a server.

[0266] Optionally, the processing unit 902 converts the first service data into target data defined by a third protocol. For details, refer to related content in step 305 of method 300 shown in FIG. 3.

[0267] Optionally, the communication unit 901 sends the target data to the target device. For details, refer to related content in step 305 of method 300 shown in FIG. 3.

[0268] Optionally, the communication unit 901 is further configured to:

[0269] receive information of the IoT device sent by the first slave gateway, and the information of the IoT device includes one or more of the following: authentication information of the IoT device, connection parameters of the IoT device, or state information between the first slave gateway and the IoT device.

[0270] Optionally, the communication unit 901 receives the information of the IoT device sent by the first slave gateway. For details, refer to related content in step 304 of method 300 shown in FIG. 3.

[0271] Optionally, the indoor LAN further comprises a second slave gateway, and the communication unit 901 is further configured to:

[0272] receive a query request sent by the second slave gateway when discovering the IoT device, the query request being used to request information of the IoT device;

[0273] send a query response to the second slave gateway, the query response comprising the information of the IoT device, the query response being used to instruct the second slave gateway to perform one or more of the following operations based on the information of the IoT device: establish a connection with the IoT device, or configure a state between the second slave gateway and the IoT device.

[0274] Optionally, the detailed implementation process of the communication unit 901 receiving the query request sent by the second slave gateway when discovering the IoT device can refer to related content in step 308 of method 300 shown in FIG. 3, which will not be described in detail here.

[0275] Optionally, the detailed implementation process of the communication unit 901 sending the query response to the second slave gateway can refer to related content in step 308 of method 300 shown in FIG. 3, which will not be described in detail here.

[0276] Optionally, the indoor LAN is a home network or an enterprise LAN.

[0277] In the embodiment of the present application, since the first message is a message defined by the second protocol, the communication unit can receive the first message from the first slave gateway. The first message is generated by the first slave gateway after receiving the first service data sent by the IoT device, and the payload part of the first message comprises the first service data, so that the first service data sent by the IoT device can pass through the first slave gateway and be transmitted to the communication unit, and can be received by the communication unit. Thus, the indoor LAN comprises a Bluetooth access range or a star flash access range between the first slave gateway and the IoT device, thereby expanding the coverage range of the indoor LAN.

[0278] Referring to FIG. 10, a communication device 1000 provided by an embodiment of the present application is shown. The communication device 1000 comprises at least one processor 1001, a bus system 1002, a memory 1003, and at least one transceiver 1004.

[0279] The communication device 1000 is a hardware structure device, which can be used to implement the function modules in the communication device 800 shown in FIG. 8. For example, the processing unit 802 in the communication device 800 shown in FIG. 8 can be implemented by the at least one processor 1001 calling the code in the memory 1003, and the communication unit 801 in the communication device 800 shown in FIG. 8 can be implemented by the transceiver 1004.

[0280] Optionally, the communication device 1000 can also be used to implement the function of the gateway in any of the above embodiments.

[0281] Optionally, the processor 1001 can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the solutions of the present application.

[0282] The bus system 1002 can include a path for transmitting information between the above components.

[0283] The transceiver 1004 is used for communication with other devices or communication networks.

[0284] The memory 1003 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this. The memory can exist independently and be connected to the processor through a bus. The memory can also be integrated with the processor.

[0285] The memory 1003 is used to store application program codes for executing the solutions of the present application, and the processor 1001 is used to control the execution. The processor 1001 is used to execute the application program codes stored in the memory 1003, thereby realizing the functions in the patent method.

[0286] In a specific implementation, as an embodiment, the processor 1001 can include one or more CPUs, such as CPU0 and CPU1 in FIG. 10.

[0287] In a particular implementation, as an example, the communication device 1000 can include multiple processors, such as the processor 1001 and the processor 1007 in FIG. 10. Each of these processors can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0288] In a particular implementation, as an example, the communication device 1000 can further include an output device 1005 and an input device 1006. The output device 1005 communicates with the processor 1001 and can display information in various ways. For example, the output device 1005 can be a liquid crystal display (LCD) or the like. The input device 1006 communicates with the processor 1001 and can accept user input in various ways. For example, the input device 1006 can be a touch screen device or a sensor device or the like.

[0289] Referring to FIG. 11, a schematic diagram of a communication device 1100 according to an embodiment of the present application is shown. The communication device 1100 includes at least one processor 1101, a bus system 1102, a memory 1103, and at least one transceiver 1104.

[0290] The communication device 1100 is a hardware structure device, which can be used to implement the functional modules of the communication device 900 shown in FIG. 9. For example, the processing unit 902 in the communication device 900 shown in FIG. 9 can be implemented by the at least one processor 1101 invoking the code in the memory 1103, and the communication unit 901 in the communication device 900 shown in FIG. 9 can be implemented by the transceiver 1104.

[0291] Optionally, the communication device 1100 can also be used to implement the functions of the master gateway in any of the above embodiments.

[0292] Optionally, the processor 1101 can be a general central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs in the embodiments of the present application.

[0293] The bus system 1102 can include paths for conveying information between the above-described components.

[0294] The transceiver 1104 is used to communicate with other devices or communication networks.

[0295] The memory 1103 can be read-only memory (ROM) or other type of static storage devices that can store static information and instructions, random access memory (RAM) or other type of dynamic storage device that can store information and instructions, electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and that can be accessed by a computer, but not limited to. The memory can exist independently, and be connected to the processor through a bus. The memory can also be integrated with the processor.

[0296] The memory 1103 is configured to store application program codes for implementing the solutions of the present application, and the processor 1101 is configured to control the execution of the application program codes. The processor 1101 is configured to execute the application program codes stored in the memory 1103, so as to realize the functions in the method of the present patent.

[0297] In specific implementation, as an example, the processor 1101 can include one or more CPUs, such as CPU0 and CPU1 in FIG. 11.

[0298] In specific implementation, as an example, the communication device 1100 can include multiple processors, such as the processor 1101 and the processor 1107 in FIG. 11. Each of the processors can be a single-CPU processor or a multi-CPU processor. The processor herein can refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0299] In specific implementation, as an example, the communication device 1100 can further include an output device 1105 and an input device 1106. The output device 1105 communicates with the processor 1101, and can display information in various ways. For example, the output device 1105 can be a liquid crystal display (LCD) or the like. The input device 1106 communicates with the processor 1101, and can accept user input in various ways. For example, the input device 1106 can be a touch screen device or a sensing device.

[0300] Referring to FIG. 12, the embodiments of the present application further provide a communication system 1200, the system 1200 comprising the communication apparatus 800 shown in FIG. 8 and the communication apparatus 900 shown in FIG. 9, or the system 1200 comprising the communication device 1000 shown in FIG. 10 and the communication device 1100 shown in FIG. 11. Alternatively, referring to FIG. 12, the communication apparatus 800 shown in FIG. 8 or the communication device 1000 shown in FIG. 10 can be a first slave gateway 1201, and the communication apparatus 900 shown in FIG. 9 or the communication device 1100 shown in FIG. 11 can be a master gateway 1202.

[0301] The embodiments of the present application further provide a computer program product containing instructions. The computer program product can be software or program product containing instructions, capable of running on a computing device or stored in any available medium. When the computer program product runs on at least one computing device, the at least one computing device is caused to execute the method provided by any of the above embodiments.

[0302] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by program instructing relevant hardware to complete, and the program can be stored in a computer readable storage medium, such as read-only memory, magnetic disk or optical disk.

[0303] The above description is only optional embodiments of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A communication method, characterized in that, The method is applied to an indoor local area network (LAN) including a first slave gateway, the LAN further including an Internet of Things (IoT) device and a master gateway. The communication protocol used between the first slave gateway and the IoT device is a first protocol, and the communication protocol used between the first slave gateway and the master gateway is a second protocol. The first protocol is either Bluetooth or StarSignal, and the second protocol is a protocol other than Bluetooth or StarSignal. The method includes: Receive first service data sent by the IoT device, wherein the first service data is data defined by the first protocol; Generate a first message, which is a message defined by the second protocol, and the payload of the first message includes the first service data; The first message is sent to the main gateway.

2. The method as described in claim 1, characterized in that, The method further includes: The system receives a second message sent by the main gateway. The second message is a message defined by the second protocol. The payload of the second message includes second service data that the main gateway needs to send. The second service data is data for the IoT device and is data defined by the first protocol. The second service data is obtained by parsing the second message; The second business data is processed.

3. The method as described in claim 1 or 2, characterized in that, The second protocol is Internet Protocol (IP) or User Datagram Protocol (UDP), and the destination port number of the first message is the port number of the target port on the main gateway. The target port is used to receive messages that include data defined by the first protocol.

4. The method as described in claim 1 or 2, characterized in that, The second protocol is the Ethernet protocol, and the destination Media Access Control (MAC) address of the first message is the MAC address of the main gateway.

5. The method according to any one of claims 1-4, characterized in that, The method further includes: The information of the IoT device is sent to the main gateway. The information of the IoT device includes one or more of the following: the authentication information of the IoT device, the connection parameters of the IoT device, or the status information between the first slave gateway and the IoT device.

6. The method according to any one of claims 1-5, characterized in that, The indoor local area network is either a home network or an enterprise local area network.

7. A communication method, characterized in that, The method is applied to a main gateway in an indoor local area network (LAN), which also includes an Internet of Things (IoT) device and a first slave gateway. The communication protocol used between the first slave gateway and the IoT device is a first protocol, and the communication protocol used between the first slave gateway and the main gateway is a second protocol. The first protocol is either Bluetooth or StarSignal, and the second protocol is a protocol other than Bluetooth or StarSignal. The method includes: The first message sent by the first slave gateway is received. The payload of the first message includes first service data received by the first slave gateway from the IoT device. The first service data is data defined by the first protocol, and the first message is a message defined by the second protocol. The first service data is obtained by parsing the first message; The first business data is processed.

8. The method as described in claim 7, characterized in that, The method further includes: Send a second message to the first slave gateway. The second message is a message defined by the second protocol. The payload of the second message includes second service data that the master gateway needs to send. The second service data is data for the IoT device and is data defined by the first protocol.

9. The method as described in claim 8, characterized in that, The second service data includes one or more of the following: response data generated by the main gateway after processing the first service data, or commands for the IoT device received by the main gateway from the terminal device or server.

10. The method according to any one of claims 7-9, characterized in that, The second protocol is Internet Protocol (IP) or User Datagram Protocol (UDP), and the destination port number of the first message is the port number of the target port on the main gateway. The target port is used to receive messages that include data defined by the first protocol. Receiving the first message sent by the first gateway includes: The first message sent from the gateway is received through the target port; The step of obtaining the first service data by parsing the first message includes: When it is determined that the first message includes data defined by the first protocol based on the target port, the first service data is obtained by parsing the first message.

11. The method according to any one of claims 7-9, characterized in that, The second protocol is the Ethernet protocol, and the destination Media Access Control (MAC) address of the first message is the MAC address of the main gateway; The step of obtaining the first service data by parsing the first message includes: When the destination MAC address of the first message is determined to be the MAC address of the main gateway, the first service data is obtained by parsing the first message.

12. The method according to any one of claims 7-11, characterized in that, The processing of the first business data includes: The first business data is converted into target data defined by a third protocol, which is a protocol used by intelligent services, and the intelligent services are used to manage the IoT devices; The target data is sent to the target device, which includes the intelligent service and is either a terminal device or a server.

13. The method according to any one of claims 7-12, characterized in that, The method further includes: The system receives information about the IoT device sent by the first slave gateway. The information about the IoT device includes one or more of the following: authentication information of the IoT device, connection parameters of the IoT device, or status information between the first slave gateway and the IoT device.

14. The method as described in claim 13, characterized in that, The indoor local area network further includes a second slave gateway, and the method further includes: Receive a query request sent by the second slave gateway when it discovers the IoT device, the query request being used to request information about the IoT device; A query response is sent to the second slave gateway. The query response includes information about the IoT device. The query response is used to instruct the second slave gateway to perform one or more of the following operations based on the information about the IoT device: establish a connection with the IoT device, or configure the state between the second slave gateway and the IoT device.

15. The method according to any one of claims 7-14, characterized in that, The indoor local area network is either a home network or an enterprise local area network.

16. A communication device, characterized in that, The device is located in an indoor local area network (LAN), which also includes Internet of Things (IoT) devices and a main gateway. The communication protocol between the device and the IoT devices is a first protocol, and the communication protocol between the device and the main gateway is a second protocol. The first protocol is either Bluetooth or StarSignal, and the second protocol is a protocol other than Bluetooth or StarSignal. The device includes: A communication unit is configured to receive first service data sent by the IoT device, wherein the first service data is data defined by the first protocol. The processing unit is configured to generate a first message, which is a message defined by the second protocol, and the payload of the first message includes the first service data. The communication unit is also used to send the first message to the main gateway.

17. The apparatus as claimed in claim 16, characterized in that, The communication unit is further configured to receive a second message sent by the main gateway. The second message is a message defined by the second protocol. The payload of the second message includes second service data that the main gateway needs to send. The second service data is data for the IoT device and is data defined by the first protocol. The processing unit is further configured to obtain the second service data by parsing the second message; The processing unit is also used to process the second business data.

18. The apparatus as claimed in claim 16 or 17, characterized in that, The second protocol is Internet Protocol (IP) or User Datagram Protocol (UDP), and the destination port number of the first message is the port number of the target port on the main gateway. The target port is used to receive messages that include data defined by the first protocol.

19. The apparatus as claimed in claim 16 or 17, characterized in that, The second protocol is the Ethernet protocol, and the destination Media Access Control (MAC) address of the first message is the MAC address of the main gateway.

20. The apparatus according to any one of claims 16-19, characterized in that, The communication unit is further used for: The device sends information about the IoT device to the main gateway. The information about the IoT device includes one or more of the following: authentication information of the IoT device, connection parameters of the IoT device, or status information between the device and the IoT device.

21. The apparatus according to any one of claims 16-20, characterized in that, The indoor local area network is either a home network or an enterprise local area network.

22. A communication device, characterized in that, The device is located in an indoor local area network (LAN), which also includes an Internet of Things (IoT) device and a first slave gateway. The communication protocol used between the first slave gateway and the IoT device is a first protocol, and the communication protocol used between the first slave gateway and the device is a second protocol. The first protocol is either Bluetooth or StarScanner, and the second protocol is a protocol other than Bluetooth or StarScanner. The device includes: A communication unit is configured to receive a first message sent by the first slave gateway, wherein the payload of the first message includes first service data received by the first slave gateway from the IoT device, the first service data is data defined by the first protocol, and the first message is a message defined by the second protocol. The processing unit is configured to obtain the first service data by parsing the first message; The processing unit is further configured to process the first business data.

23. The apparatus as claimed in claim 22, characterized in that, The communication unit is further used for: Send a second message to the first slave gateway. The second message is a message defined by the second protocol. The payload of the second message includes second service data that the device needs to send. The second service data is data for the IoT device and is data defined by the first protocol.

24. The apparatus as claimed in claim 23, characterized in that, The second service data includes one or more of the following: response data generated by the processing unit after processing the first service data, or commands for the IoT device received by the communication unit from the terminal device or server.

25. The apparatus according to any one of claims 22-24, characterized in that, The second protocol is Internet Protocol (IP) or User Datagram Protocol (UDP), and the destination port number of the first message is the port number of the target port on the device. The target port is used to receive messages that include data defined by the first protocol. The communication unit is configured to receive the first message sent from the gateway through the target port; The processing unit is configured to obtain the first service data by parsing the first message when it is determined, based on the target port, that the first message includes data defined by the first protocol.

26. The apparatus according to any one of claims 22-24, characterized in that, The second protocol is the Ethernet protocol, and the destination Media Access Control (MAC) address of the first message is the MAC address of the device; The processing unit is configured to obtain the first service data by parsing the first message when it determines that the destination MAC address of the first message is the MAC address of the device.

27. The apparatus according to any one of claims 22-26, characterized in that, The processing unit is configured to convert the first business data into target data defined by a third protocol, wherein the third protocol is a protocol used by intelligent services, and the intelligent services are used to manage the IoT devices. The communication unit is also used to send the target data to the target device, the target device including the intelligent service, and the target device being a terminal device or a server.

28. The apparatus according to any one of claims 22-27, characterized in that, The communication unit is further used for: The system receives information about the IoT device sent by the first slave gateway. The information about the IoT device includes one or more of the following: authentication information of the IoT device, connection parameters of the IoT device, or status information between the first slave gateway and the IoT device.

29. The apparatus as claimed in claim 28, characterized in that, The indoor local area network also includes a second slave gateway, and the communication unit is further used for: Receive a query request sent by the second slave gateway when it discovers the IoT device, the query request being used to request information about the IoT device; A query response is sent to the second slave gateway. The query response includes information about the IoT device. The query response is used to instruct the second slave gateway to perform one or more of the following operations based on the information about the IoT device: establish a connection with the IoT device, or configure the state between the second slave gateway and the IoT device.

30. The apparatus according to any one of claims 22-29, characterized in that, The indoor local area network is either a home network or an enterprise local area network.

31. A communication device, characterized in that, The communication device includes a processor that performs the method as described in any one of claims 1 to 6.

32. A communication device, characterized in that, The communication device includes: a processor and a memory. The memory stores one or more programs configured to be executed by the processor, the one or more programs containing instructions for performing the method as described in any one of claims 7 to 15.

33. A communication system, characterized in that, Includes the apparatus as described in any one of claims 16-21 and the apparatus as described in any one of claims 22-30, or the communication device as described in claim 31 and the communication device as described in claim 32.

34. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store a computer program, which is loaded by a device to execute instructions of the method as described in any one of claims 1 to 15.

35. A computer program product containing instructions, characterized in that, When the instruction is executed by the device, the device performs the method as described in any one of claims 1-15.

Citation Information

Patent Citations

  • Daughter gateway device, system and method for processing data of terminal equipment

    CN102957596A

  • Multiprotocol intelligent household gateway apparatus and system thereof

    CN104038414A

  • Gateway system, gateway device and internet of things system

    CN116827723A

  • Dynamic certification for configuration changes to software defined radio implemented devices

    US20200195758A1

  • Internet of things system

    WO2023030513A1