WO2018153362A1 - Method for accessing internet-of-things platform, internet-of-things platform, and internet-of-things device - Google Patents
Method for accessing internet-of-things platform, internet-of-things platform, and internet-of-things device Download PDFInfo
- Publication number
- WO2018153362A1 WO2018153362A1 PCT/CN2018/077166 CN2018077166W WO2018153362A1 WO 2018153362 A1 WO2018153362 A1 WO 2018153362A1 CN 2018077166 W CN2018077166 W CN 2018077166W WO 2018153362 A1 WO2018153362 A1 WO 2018153362A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- iot
- access
- platform
- gateway
- message
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/12—Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/40—Support for services or applications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/54—Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users
Definitions
- the present application relates to the field of communications, and more specifically, to a method of accessing an Internet of Things (IoT) platform, an Internet of Things platform, and an Internet of Things device.
- IoT Internet of Things
- the IoT architecture can be divided into three layers: the perception layer, the network layer, and the application layer.
- the sensing layer is composed of various IoT devices, including temperature and humidity sensors, two-dimensional code tags, RFID tags and readers, cameras, infrared, GPS and other sensing terminals.
- the perception layer is the source of the Internet of Things to identify objects and collect information.
- the network layer is composed of various networks, including the Internet, the broadcasting network, the network management system, and the IoT platform. It is the backbone of the entire Internet of Things and is responsible for transmitting and processing the information acquired by the sensing layer.
- the application layer is the interface between the Internet of Things and the user. It is combined with industry requirements to implement intelligent applications of the Internet of Things, such as the Mobile APP or Web Portal.
- the IoT platform when the IoT device accesses the network layer, the IoT platform can be accessed through the gateway. Specifically, the IoT device first detects the gateway unconditionally, and if the gateway is found, performs the process of accessing the IoT platform through the gateway. After the IoT device successfully accesses the IoT platform, users can access the IoT platform and control the IoT device through the Mobile APP or Web Portal.
- the IoT device will interrupt the operation.
- the IoT device cannot access the IoT platform normally. Reduce the reliability of the network.
- the embodiments of the present invention provide a method for accessing an Internet of Things platform, an Internet of Things platform, and an Internet of Things device, which can effectively improve the reliability of the network.
- a method for accessing an Internet of Things platform comprising:
- the IoT device sends a first access request message to the IoT gateway, where the first access request message includes indication information, where the indication information is used to indicate that the IoT device has access to the IoT platform by using access authentication information.
- the IoT device receives, by the IoT gateway, a new device access message sent by the IoT platform, where the new device access message includes the device identifier, and the first access authentication information is encrypted and formed. Encrypted information;
- the IoT device reports data to the IoT gateway according to the device identifier.
- the IoT device preferentially detects the IoT gateway. If the IoT gateway is found, the IoT platform can access the IoT platform and obtain the authentication information of the IoT device to access the IoT platform. It effectively prevents the IoT device from being able to access the IoT platform when the IoT gateway fails. Effectively improve the reliability of the network.
- the method further includes:
- the IoT device sends a second access request to the IoT platform, where the second access request includes the device identifier and the first access authentication information;
- the IoT device receives a response message of the second access request sent by the IoT platform.
- the method before the sending, by the IoT device, the second access request to the IoT platform, the method further includes:
- the IoT device saves the device identifier and the first access authentication information.
- the IoT device can successfully access the IoT platform according to the obtained first access authentication information. Further, the data detected by the sensor is reported and the remote control device is executed. Effectively guarantee the reliability of the network.
- the method further includes:
- the IoT platform accesses the IoT platform.
- the IoT device can switch to access the IoT platform through the IoT gateway. Effectively reduce the number of connections between the IoT platform and the IoT device.
- accessing the IoT platform by using the IoT gateway includes:
- the IoT device accesses the IoT platform through the IoT gateway when receiving the notification message sent by the IoT platform;
- the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
- accessing the IoT platform by using the IoT gateway includes:
- the IoT device accesses the IoT platform through the IoT gateway when receiving the response message of the device discovery request message sent by the IoT gateway.
- the IoT device accesses the IoT platform by using the IoT gateway, including:
- the IoT device sends a third access request message to the IoT gateway, where the third access request message includes the device identifier;
- the IoT device receives a response message of the third access request message sent by the IoT gateway.
- the first access request message further includes the following information:
- the determining, by the IoT device, the device identifier and the first access authentication information according to the allowing a new device access message including:
- the IoT device decrypts the encrypted information according to the random number to determine the first access authentication information.
- a method for accessing an Internet of Things platform comprising:
- the IoT platform receives the new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability to access the IoT platform by using the access authentication information;
- the IoT platform allocates a device identifier and first access authentication information corresponding to the IoT device to the IoT device according to the new device discovery request message;
- the IoT platform sends a new device access message to the IoT device by using the IoT gateway, where the new device access message includes the device identifier, and the first access authentication information is encrypted. Encrypt information.
- the method before the IoT platform sends the IoT device to the IoT device to allow a new device to access the message, the method further includes:
- the IoT platform saves the indication information.
- the method further includes:
- the IoT platform sends a response message of the second access request to the IoT device.
- the method further includes:
- the IoT platform sends a notification message to the IoT device, where the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
- the new device discovery request message further includes an encryption algorithm supported by the IoT device and a random number used for encryption;
- the method further includes:
- the IoT platform encrypts the first access authentication information by using the random number to generate encrypted information
- the IoT platform generates the allow new device access message according to the encrypted information and the device identifier.
- an Internet of Things device comprising:
- transceiver unit configured to:
- a processing unit configured to determine the device identifier and the first access authentication information according to the allow new device access message
- the transceiver unit is further configured to: report data to the IoT gateway according to the device identifier.
- an Internet of Things device comprising:
- the transceiver unit is configured to:
- a processor configured to determine the device identifier and the first access authentication information according to the allow new device access message
- the transceiver is further configured to: report data to the IoT gateway according to the device identifier.
- the IoT device of the third aspect and the fourth aspect is capable of implementing the method of accessing the Internet of Things platform executed by the IoT device in the method of the first aspect.
- an Internet of Things platform comprising:
- a transceiver unit configured to receive a new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability to access the IoT platform by using the access authentication information.
- a processing unit configured to allocate, by the IoT device, a device identifier and first access authentication information corresponding to the IoT device according to the new device discovery request message;
- the transceiver unit is further configured to send, by the IoT gateway, a new device access message to the IoT device, where the allow new device access message includes the device identifier, and encrypt the first access authentication information. After the formation of encrypted information.
- an Internet of Things platform comprising:
- a transceiver configured to receive a new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by accessing the authentication information.
- a processor configured to allocate, by the IoT device, a device identifier and first access authentication information corresponding to the IoT device according to the new device discovery request message;
- the transceiver is further configured to send, by the IoT gateway, a new device access message to the IoT device, where the allow new device access message includes the device identifier, and encrypt the first access authentication information After the formation of encrypted information.
- the Internet of Things platform of the fifth aspect and the sixth aspect is capable of implementing the method for accessing the Internet of Things platform executed by the Internet of Things platform in the method of the second aspect.
- the allowed device access request further includes at least one of the following information of the IoT device: a manufacturer of the device, a device type, a device serial number, a device MAC address, Node ID, etc.
- FIG. 1 is a schematic diagram of an example of a scenario to which an embodiment of the present invention may be applied.
- FIG. 2 is a schematic diagram of another example of a scenario to which an embodiment of the present invention may be applied.
- FIG. 3 is a schematic flowchart of a method for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
- FIG. 4 is another schematic flowchart of a method for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
- FIG. 5 is a schematic flowchart of a method for an IoT gateway to access an IoT platform according to an embodiment of the present invention.
- FIG. 6 is a schematic flowchart of a method for an IoT device to access an IoT platform when an IoT gateway fails according to an embodiment of the present invention.
- FIG. 7 is a schematic flowchart of an IoT device accessing an IoT platform when an IoT gateway fails to be cancelled according to an embodiment of the present invention.
- FIG. 8 is another schematic flowchart of an IoT device accessing an IoT platform according to an embodiment of the present invention.
- FIG. 9 is a schematic block diagram of an IoT device in accordance with an embodiment of the present invention.
- FIG. 10 is another schematic block diagram of an IoT device according to an embodiment of the present invention.
- FIG. 11 is a schematic block diagram of an IoT platform in accordance with an embodiment of the present invention.
- FIG 12 is another schematic block diagram of an IoT platform in accordance with an embodiment of the present invention.
- FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present invention.
- the IoT device can be directly connected to the IoT platform, such as the second IoT device in FIG. 1, or the IoT device accesses the IoT platform through the IoT gateway, such as the first IoT device in FIG. End users can access the IoT platform through business applications, control IoT devices, and view the status and data of IoT devices.
- the service application can be directly connected to the IoT application, and then connected to the IoT platform through the IoT application, and then described in a straight-through manner for the sake of simplicity of description.
- the IoT device can be a device with sensor detection capabilities.
- IoT devices may also support certain control functions, such as reboots, firmware upgrades, and so on. In some cases, it can also be called an IoT device as an end device.
- the IoT gateway can be a gateway device that connects multiple sensor devices. Optionally, it is deployed at the same location on the IoT device. For example, the same building, the same family, the same street and other places.
- the IoT gateway can receive the data reported by the IoT device, or send the control command to the IoT device.
- the IoT gateway also connects to the IoT platform, and the data reported by the IoT device is reported to the IoT platform, and the control command sent by the IoT platform to the device is received. Submit to the correct IoT device for execution.
- the IoT gateway can also report some of its own information, such as rebooting, and can also perform some remote control commands, such as software upgrades.
- the IoT gateway is also referred to as an end-side gateway or a near-field gateway.
- the IoT platform connects the IoT device or the IoT gateway, supports the IoT device/gateway to report data, and provides data for the user to view, or allows the user to issue control commands to the IoT device/gateway.
- the IoT platform is also called a cloud platform or a cloud server or a network side server.
- the IoT platform can also connect to business applications for user access.
- the IoT device can be connected to the IoT gateway by using a variety of near-field network technologies, which is not limited in this embodiment of the present invention.
- near-field network technologies for example, Wireless Fidelity (WiFi), Bluetooth, Low Power LAN Protocol (Zigbee), Z-wave, etc.
- the IoT gateway connects to the IoT platform based on the IP network.
- a wireless IP network for example, a 2G/3G/4G data network
- it can be a wired fixed network IP network (Cable, xDSL, optical network, etc.).
- the user can access the IoT platform through the mobile application (Mobile Application) or Web Portal, or access the IoT platform through the business application server.
- the user can view the IoT gateway/IoT device connected to the IoT platform, or view the IoT.
- the data reported by the device can also be used to issue control commands to the IoT device.
- the present invention is exemplified by a business application.
- the gateway Since the IoT device in the prior art uses the IoT gateway to access the IoT platform, the gateway is first unconditionally detected, and if no IoT gateway is found, no operation is performed. As a result, the IoT platform cannot be accessed when the IoT gateway fails.
- an embodiment of the present invention provides a method for an IoT device to access an IoT platform. Specifically, if the IoT device accesses the IoT platform through the IoT gateway, when the IoT gateway fails, the IoT device can access the IoT platform with the access authentication information of the IoT device, and then report the data detected by the sensor and perform remote control. device. At the same time, if the gateway fault is eliminated, the IoT device can switch to the mode of accessing the IoT platform through the IoT gateway, reducing the number of connections between the cloud and the device. Effectively improve the reliability of the network.
- FIG. 3 is a schematic flowchart of a method 100 for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
- the method 100 includes:
- the IoT device sends a first access request message to the IoT gateway, where the first access request message includes indication information.
- the IoT device sends a first access request message to the IoT gateway, where the first access request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by using the access authentication information. So that the IoT gateway sends a new device discovery request message to the IoT platform according to the first access request message, where the new device discovery request message is used by the IoT platform to allocate a device identifier for the IoT device and a corresponding to the IoT device.
- One access authentication information is used to allocate a device identifier for the IoT device and a corresponding to the IoT device.
- the IoT device sends a first access request message to the IoT gateway, where the first access request message includes the indication information; after receiving the first access request message, the IoT gateway sends a new device to the IoT platform. After the IoT platform receives the new device discovery request message, the IoT device allocates the device identifier and the first access authentication information corresponding to the IoT device.
- the access request message in the embodiment of the present invention is to make a binding relationship between the IoT device, the IoT gateway, and the IoT platform.
- the terminology and specific implementation manners of the embodiments of the present invention are not limited. In other words, the binding relationship between the IoT device, the IoT gateway, and the IoT platform can be implemented in multiple ways.
- the request message can be a registration message.
- an IoT device registers with both the IoT platform and the IoT gateway. Specifically, the IoT device simultaneously sends a registration message to the IoT platform and the IoT gateway.
- an IoT device registers with the IoT platform through an IoT gateway.
- the IoT device registers with the IoT gateway; the IoT gateway declares the registration information of the IoT device to the IoT platform.
- the IoT device sends a registration message to the IoT gateway, and the IoT gateway transparently transmits the registration message to the IoT platform to implement relationship binding between the IoT device and the IoT platform.
- the specific implementation form of the access information is not limited in the embodiment of the present invention.
- the access information may be an access password or other forms of information.
- the IoT platform saves the indication information.
- the IoT device receives, by using the IoT gateway, a new device access message sent by the IoT platform, where the new device access message includes the device identifier, and the encrypted information formed by encrypting the first access authentication information.
- the IoT platform allocates first access authentication information to the IoT device, where the first access authentication information refers to information required when the IoT device accesses the IoT platform by accessing the authentication information.
- the IoT platform sends a device access request to the IoT gateway.
- the IoT gateway transparently transmits the request to the IoT device.
- the device access request further includes at least one of the following information of the IoT device: a manufacturer of the device, a device type, a device serial number, a device MAC address, a node identifier, and the like.
- the IoT device determines the device identifier and the first access authentication information according to the allow new device access message.
- the IoT device determines the device identifier of the IoT device.
- the encrypted information is decrypted to determine the first access authentication information of the IoT device.
- the first access request message further includes an encryption algorithm supported by the IoT device and a random number used for encryption.
- the IoT device decrypts the encrypted information according to the random number to determine the first access authentication information.
- the IoT platform encrypts the first access authentication information by using the random number to generate encrypted information.
- the IoT platform generates the new device access message according to the encrypted information and the device identifier.
- the IoT device reports data to the IoT gateway according to the device identifier.
- the IoT device reports the device data to the IoT gateway and receives the operation delivered by the IoT platform according to the device identifier.
- FIG. 1 is an exemplary illustration of an IoT device accessing an IoT platform through an IoT gateway according to an embodiment of the present invention.
- the IoT gateway is in a normal working state.
- the IoT device preferentially detects the IoT gateway. If the IoT gateway is found, the IoT platform can access the IoT platform and obtain the authentication information of the IoT device accessing the IoT platform according to the process shown in FIG.
- the IoT gateway fails, the IoT device can successfully access the IoT platform according to the obtained first access authentication information. Further, the data detected by the sensor is reported and the remote control device is executed. Effectively guarantee the reliability of the network.
- the IoT device sends a second access request to the IoT platform, where the second access request includes the device identifier and the first access authentication information; and the IoT device receives the second interface sent by the IoT platform.
- the response message to the request In other words, the IoT platform receives the second access request sent by the IoT device, where the second access request includes the device identifier and the first access authentication information; and the IoT platform sends the second interface to the IoT device.
- the response message to the request is not limited to the request.
- the IoT device saves the device identifier and the first access authentication information.
- the IoT device accesses the IoT platform according to the first access authentication information, the number of connections between the cloud and the device is increased.
- the IoT platform accesses the IoT platform.
- the IoT device in order to ensure that the IoT gateway is faulty, can know in time that the IoT platform notifies the IoT device to perform the gateway discovery process when the IoT gateway accesses. Specifically, the IoT device accesses the IoT platform through the IoT gateway when receiving the notification message sent by the IoT platform, where the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
- the IoT device sends a device discovery request message to the IoT gateway; when the IoT device receives the response message of the device discovery request message sent by the IoT gateway, accessing the IoT platform through the IoT gateway .
- the IoT device periodically sends a device discovery request message to the IoT gateway.
- the IoT device can access the fault-removed IoT gateway through the device identifier used before the fault of the IoT gateway occurs.
- the IoT device sends a third access request message to the IoT gateway, where the third access request message includes the device identifier, and the IoT device receives the response message of the third access request message sent by the IoT gateway.
- the IoT device supports detecting whether the gateway is available; if available, preferentially accesses the IoT platform through the gateway; if the gateway is faulty, it supports automatic direct connection to the IoT platform. Effectively improve the reliability of the network.
- the IoT gateway when the IoT gateway fails to recover, it can switch to access the IoT platform through the IoT gateway. Effectively reduce the number of connections between the IoT platform and the IoT device.
- FIG. 4 is a schematic flowchart of a method 200 for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
- the method 200 includes:
- the IoT device identifies the access mode as preferential access through the gateway.
- the IoT gateway has successfully accessed the IoT platform.
- the IoT device sends a device discovery request to the IoT gateway. Specifically, after the IoT device is powered on for the first time, a multicast or broadcast device discovery request is attempted to discover an accessible IoT gateway.
- the IoT gateway sends a device discovery response to the IoT device. Specifically, the IoT gateway receives the device discovery request of the IoT device, and sends a device discovery response to the IoT device.
- the IoT device sends a device access request to the IoT gateway.
- the device access request carries: a manufacturer, a device type, a device serial number, and a device MAC address of the IoT device.
- the IoT gateway Since the IoT gateway is not in the new device discovery state, the IoT gateway does not process the message when it checks that the device does not belong to the already accessed device.
- the service application sends a device discovery request to the IoT platform.
- the service application interface controls the IoT gateway to initiate the device discovery process.
- the service application sends a device discovery request to the IoT platform, and the device identifier of the IoT gateway is carried in the request.
- the IoT platform sends a device discovery response to the service application.
- the IoT platform sends a device discovery request to the IoT gateway.
- the IoT platform checks the user's authority, and after the check is passed, sends the device discovery request to the corresponding IoT gateway, and returns a response to the receiving device discovery request to the service application.
- the IoT gateway after receiving the device discovery request, the IoT gateway enters the device discovery state.
- the IoT device sends a device access request to the IoT gateway.
- the device access request carries: a manufacturer, a device type, a device serial number, and a device MAC address of the IoT device.
- the device access request message in the embodiment of the present invention supports adding the indication information to the message, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform according to the access authentication information.
- the device access request message may further include a random number provided by the IoT device and a supported encryption algorithm.
- the IoT gateway sends a device access response to the IoT device.
- the IoT gateway allocates a node identifier to the IoT device.
- the IoT gateway sends a new device discovery request to the IoT platform.
- the IoT gateway After the IoT gateway receives the device access request, the IoT gateway checks the information it carries, confirms that it is the new access device, and the IoT gateway assigns the node identifier to the IoT device, and feeds back to the IoT device.
- the device access response where the device access response carries the node identifier of the IoT device.
- a new device discovery request is sent to the IoT platform.
- the IoT gateway in the embodiment of the present invention supports the transparent transmission of the indication information, the random number, and the supported encryption algorithm in the device access request to the IoT platform.
- the IoT gateway transparently transmits the indication information, the random number, and the supported encryption algorithm in the device access request to the IoT platform by using the new device discovery request.
- the IoT platform allocates device identifiers for IoT devices.
- the IoT platform assigns a device identification to the IoT device after receiving a new device discovery request sent by the IoT gateway.
- the IoT platform saves the indication information in the new device discovery request.
- the IoT platform sends a new device discovery notification to the service application.
- the IoT platform After receiving the new device discovery request, the IoT platform checks the following information carried in the request: the manufacturer, device type, device serial number, device MAC address, and node ID of the IoT device. The IoT platform confirms that it is a new device, and assigns a new device identifier to the IoT device, and sends a new device notification message to the service application through the service application bound by the IoT gateway.
- the service application sends a message to the IoT platform to allow the new device to access.
- the IoT platform allocates access authentication information to the IoT device.
- the service application after receiving the new device notification message, the service application presents the information of the IoT device to the user: the manufacturer of the device, the device type, the device serial number, the device MAC address, the node identifier, and the new device identifier.
- the user can choose to allow the device to access. That is, the service application sends a device access request to the IoT platform, and the device identifier of the IoT device is carried in the request.
- the IoT platform checks the saved information after receiving the new device access request. If the IoT device has the ability to access the IoT platform according to the access authentication information, the IoT device allocates access authentication information and encrypts the information by using random numbers. Then, the encrypted information is carried in the allowed device access message of the IoT gateway.
- the IoT platform sends a message to the IoT gateway to allow the new device to access.
- the IoT platform After receiving the new device access request, the IoT platform checks the user's authority. After the check is passed, the IoT device is assigned access authentication information.
- the IoT platform sends a device access request to the IoT gateway.
- the IoT gateway in the embodiment of the present invention can transparently transmit the device identifier of the IoT device and the encrypted access authentication information to the IoT device when receiving the new device access message.
- the IoT gateway sends a message to the IoT device to allow the new device to access.
- the IoT gateway After receiving the permission of the new device to access the message, the IoT gateway sets the device status to allow access, and sends an IoT device to allow the new device to access the message.
- the device identifier of the IoT device is allowed in the new device access message.
- the IoT device saves the device identifier and access authentication information of the IoT device.
- the discovery message includes the encrypted access authentication information, and the obtained random number is used to decrypt the information, and the access authentication information is saved.
- the IoT device sends a device data report message to the IoT gateway.
- the IoT device after receiving the message that the new device is allowed to access, saves the device identifier of the IoT device, and can use the device identifier to start reporting the sensor detection data. Specifically, after the IoT device detects the received data, the device sends a device data report message to the IoT gateway, where the device data report message carries the device identifier of the IoT device and the detection data of the IoT device.
- the IoT gateway sends a device data report message to the IoT platform. That is, after receiving the data report message, the IoT gateway sends a data report message to the IoT platform, where the device data report message carries the device identifier of the IoT device and the detection data of the IoT device.
- the IoT platform sends a device data report message to the service application. That is, after receiving the data report message, the IoT platform saves the device data information, and finds the service application bound by the IoT device through the device identifier of the IoT device, and sends a data report notification to the service application. Once the business application receives the notification, it can be presented to the end user on the interface.
- the service application sends a device operation request to the IoT platform.
- the IoT platform sends a device operation request to the IoT gateway.
- the IoT platform After receiving the device operation request, the IoT platform checks the permission of the service application, finds the corresponding IoT gateway according to the device identifier of the IoT device, and sends the device operation request to the IoT gateway.
- the IoT gateway sends a device operation request to the IoT device.
- the IoT device After receiving the device operation request, the IoT device performs a corresponding operation request.
- the user can control the IoT device through the business application to perform operations supported by the IoT device.
- FIG. 4 is only an exemplary description of the method for accessing the IoT platform according to the embodiment of the present invention, and the serial number in the method is not specifically limited.
- 216 and 217 may be executed simultaneously, or 216 may be performed first 217, or 217 may be performed first.
- FIG. 4 illustrates the implementation manner of the IoT device accessing the IoT platform by using the IoT gateway in the embodiment of the present invention.
- the default IoT gateway has successfully accessed the IoT platform.
- the implementation manner of the IoT gateway accessing the IoT platform in the embodiment of the present invention is described below with reference to FIG.
- FIG. 5 is a schematic flowchart of a method 300 for an IoT gateway to access an IoT platform according to an embodiment of the present invention.
- the method 300 includes:
- FIG. 5 is a method for the IoT gateway to access the IoT platform for the first time in the embodiment of the present invention.
- the process of establishing the relationship between the gateway and the service application by the IoT platform is referred to as a binding process.
- the binding process refers to the IoT platform assigning the access device identification and access authentication information to a new IoT gateway, and monitoring the entire process of the IoT gateway accessing for the first time.
- the service application sends a login request to the IoT platform. Specifically, the user logs in to the IoT platform from the service application, and carries the identifier of the user and the corresponding password.
- the IoT platform sends a login response to the business application. Specifically, the IoT platform verifies the user's identification and password, and after the verification is passed, returns a successful login response.
- the service application sends a binding request to the IoT platform.
- the binding request carries the following information of the IoT gateway: a manufacturer, a device type, a device serial number, a MAC address, and the like.
- the user can obtain the information through a business application input or a two-dimensional code scanning.
- the IoT platform allocates device identifier and access authentication information to the IoT gateway.
- the IoT platform sends a binding response to the service application.
- the IoT platform After receiving the device binding request, the IoT platform allocates the device identifier and the access authentication information required by the IoT gateway to the IoT platform, and returns the device binding response.
- the IoT gateway sends a device access registration request to the IoT platform.
- the user can configure the address of the IoT platform on the IoT gateway, and configure the device identifier of the IoT device and the access authentication information of the IoT device.
- the sending device accesses the registration request to the IoT platform.
- the access registration request carries the device identifier of the IoT device and the access authentication information of the IoT device.
- the IoT platform sends a device access registration response to the IoT gateway.
- the IoT platform sends a device access notification to the service application.
- the IoT platform After receiving the device access registration request sent by the IoT gateway, the IoT platform verifies the device identifier of the IoT device and the access authentication information of the IoT device, and returns the device access registration response message to the IoT gateway after the verification is passed.
- the IoT platform finds the corresponding service application through the device identifier of the IoT gateway, and sends a device access notification message to the service application.
- the IoT device can also allocate the device identifier of the IoT device and the access authentication information required for the IoT device to access the IoT platform according to the process shown in FIG. 5, which is not limited in this embodiment of the present invention.
- FIG. 6 is a schematic flowchart of a method 400 for an IoT device to access an IoT platform when an IoT gateway fails in accordance with an embodiment of the present invention.
- the method 400 includes:
- the IoT device sends a device discovery request to the IoT gateway.
- the IoT device determines that the IoT gateway is faulty.
- the IoT device initiates a device discovery request, and after the timeout is unresponsive, the IoT device determines that the IoT gateway has failed. After the IoT device determines that the IoT gateway is faulty, it checks the completed device direct connection negotiation and directly accesses the IoT platform by using the access authentication information.
- the IoT device sends a device access registration request to the IoT platform.
- the IoT device sends a device access registration request to the IoT platform, where the device access registration request carries the device identifier of the IoT device and the access authentication information of the IoT device.
- the device access registration request further carries an indication that the IoT device supports accessing the IoT platform through the gateway.
- the IoT platform sends a device access registration response to the IoT device.
- the IoT platform After receiving the device access registration request, the IoT platform verifies the device identifier and the identity authentication information, and if it is a legitimate device, returns a successful response.
- the IoT platform sends a device state change to the service application.
- the IoT platform finds the bound service application through the device identifier of the IoT device, and sends a notification message of the device state change to the service application.
- the notification message of the device status change carries: the device identifier of the IoT device, and the state of the IoT device is online.
- the IoT device can report the device data through the foregoing steps 460-step 490; and can also receive the operation delivered by the IoT platform and perform its control.
- FIG. 7 is a schematic flowchart of a method 500 for an IoT device to access an IoT platform when an IoT gateway fails to be removed according to an embodiment of the present invention.
- the method 500 includes:
- the IoT device successfully accesses the IoT platform through the IoT gateway.
- the IoT gateway sends a device access registration request to the IoT platform.
- the IoT platform is started to access the IoT platform, and the device access registration request is sent to the IoT platform.
- the device access registration request carries the device identifier of the IoT gateway and the access authentication information of the IoT gateway.
- the IoT platform sends a device access registration response to the IoT gateway.
- the IoT platform sends a device state change to the service application.
- the IoT platform After receiving the device access registration request, the IoT platform checks the device identifier and its corresponding access authentication information. If the check passes, the return device counts the registration success response.
- the IoT platform sets the status of the IoT gateway to online, and finds the bound service application to the device identifier passing through the IoT gateway, and sends a message indicating that the device status changes.
- the IoT platform sends a gateway access notification to the IoT device.
- the IoT platform searches for the bound service application through the device identifier of the IoT gateway, checks whether there is a direct connection device under the service application, and the directly connected device supports the gateway access, and if yes, sends the gateway access.
- the notification message is sent to the corresponding direct IoT device.
- the direct connection device in the embodiment of the present invention refers to a device that accesses the IoT platform through the access authentication information of the IoT device.
- the IoT platform determines whether the IoT gateway is a gateway to which the current IoT device is connected, and if so, sends a gateway access notification message to the corresponding direct IoT device.
- the IoT device identifies the access mode as preferential access through the gateway.
- the IoT device sends a device discovery request to the IoT gateway.
- the IoT device determines that the access mode is preferentially accessed through the IoT gateway, and then initiates a device discovery request.
- the IoT gateway sends a device discovery response to the IoT device.
- the IoT device sends a device access request to the IoT gateway.
- the IoT device After receiving the device discovery response, the IoT device initiates a device access request, where the request carries the device identifier of the IoT device, and the following device information: manufacturer, device type, device serial number, MAC address, and the like.
- the IoT gateway sends a device access response to the IoT device.
- the IoT gateway After receiving the device access request, the IoT gateway checks whether the device is the device identifier that has been accessed, and the device information is consistent with the previous access device information, and then returns the device access response.
- the IoT device after receiving the device access response, the IoT device subsequently reports data or receives a control message through the IoT gateway.
- the IoT gateway sends a device state change to the IoT platform.
- the IoT gateway sends a device status change message to the IoT platform, where the request carries the device identifier, and the device status is online.
- the IoT platform sends a device state change to the service application.
- the IoT platform After receiving the device status change message, the IoT platform saves the status information, and finds the corresponding service application through the device identifier of the IoT device, and sends the device status change notification to the service application.
- the IoT device can report the device data and receive the operation delivered by the IoT platform through step 522-step 527 shown in FIG.
- the IoT device after detecting the sensor data, sends a device data report message to the IoT gateway, where the device data report message carries the device identifier and sensor data of the IoT device.
- the IoT gateway After receiving the device data report message, sends a device data report message to the IoT platform, where the device data report message carries the device identifier and sensor data of the IoT device.
- the IoT platform After receiving the device data report message, the IoT platform saves the device data information, and finds the service application bound by the IoT device through the device identifier of the IoT device, and sends a data report notification to the service application.
- the business application receives the notification, it can be presented to the user on the interface. At this point, the business application sends a device operation request to the IoT platform.
- the user can control the IoT device through the business application and perform operations supported by the IoT device.
- the IoT platform receives the device operation request, checks the permission of the service application, and according to the device identifier of the IoT device, checks that the IoT device finally becomes online, accesses through the gateway, finds the corresponding IoT gateway, and sends the device operation request to IoT gateway. After receiving the device operation request, the IoT gateway sends a device operation request to the IoT device. After receiving the request, the IoT device performs the corresponding operation request.
- the implementation of the IoT device accessing the IoT platform is described above with reference to FIGS. 2 to 7 in the case where the IoT gateway fails, and the IoT device is connected to the IoT platform.
- the specific implementation is described above with reference to FIGS. 2 to 7 in the case where the IoT gateway fails, and the IoT device is connected to the IoT platform. The specific implementation.
- FIG. 8 is a schematic flowchart of a method 600 for an IoT gateway to access an IoT platform according to an embodiment of the present invention.
- the method 600 includes:
- the IoT gateway has successfully accessed the IoT platform.
- the IoT gateway has completed the process of accessing the IoT platform.
- the IoT device sends a device discovery request to the IoT gateway. Specifically, after the IoT device is powered off and restarted, the IoT device starts the device discovery process and sends a device discovery request.
- the IoT gateway sends a device discovery response to the IoT device. Specifically, after receiving the device discovery request, the IoT gateway sends a device discovery response message.
- the IoT device sends a device access request to the IoT gateway. Specifically, after receiving the device discovery response message, the IoT device sends a device access request message, where the request carries the device identifier of the previously saved IoT device, and carries the following device information: the manufacturer, device type, device serial number, Device MAC address.
- the IoT gateway sends a device access response to the IoT device. Specifically, after receiving the device access request, the IoT gateway checks that the device is the device identifier that has been accessed, and the device information is consistent with the previous access device information, and then returns the device access response.
- the IoT gateway sends a device state change to the IoT platform. Specifically, the IoT gateway sends a device status change message to the IoT platform, where the request carries the device identifier of the IoT device, and the IoT device status is online.
- the IoT platform sends a device state change to the service application. Specifically, after receiving the device status change message, the IoT platform saves the status information, and finds the corresponding service application through the device identifier of the IoT device, and sends the device status change notification to the service application.
- the IoT device can report the device data and receive the operation delivered by the IoT platform through steps 617-622 of FIG. To avoid repetition, we will not repeat them here.
- the Internet of Things platform and the Internet of Things device in the embodiments of the present invention are described below with reference to FIG. 9 to FIG.
- FIG. 9 is a schematic block diagram of an IoT device 700 in accordance with an embodiment of the present invention. As shown in FIG. 9, the IoT device 700 includes:
- the transceiver unit 710 is configured to:
- the gateway sends a new device discovery request message to the IoT platform according to the first access request message, where the new device discovery request message is used by the IoT platform to allocate the device identifier and the first access authentication information corresponding to the IoT device to the IoT device.
- the processing unit 720 is configured to determine the device identifier and the first access authentication information according to the allow new device access message.
- the transceiver unit 710 is further configured to: report data to the IoT gateway according to the device identifier.
- the transceiver unit 710 is further configured to:
- the processing unit 720 is further configured to:
- the device identifier and the first access authentication information are saved.
- processing unit 720 is further configured to:
- the IoT platform is accessed through the IoT gateway.
- processing unit 720 is specifically configured to:
- Receiving the notification message sent by the IoT platform accessing the IoT platform by using the IoT gateway; wherein the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
- processing unit 720 is specifically configured to:
- the transceiver unit 710 is specifically configured to:
- the first access request message further includes the following information: an encryption algorithm supported by the IoT device and a random number used for encryption;
- the processing unit 720 is specifically configured to:
- the transceiver unit 710 may be implemented by a transceiver
- the processing unit 720 may be implemented by a processor.
- the Internet of Things device 800 can include a processor 810, a transceiver 820, and a memory 830.
- the memory 830 can be used to store indication information, and can also be used to store code, instructions, and the like executed by the processor 810.
- the various components in the Internet of Things device 800 are connected by a bus system, wherein the bus system includes a power bus, a control bus, and a status signal bus in addition to the data bus.
- the IoT device 800 shown in FIG. 10 can implement the various processes performed by the IoT device in the foregoing method embodiments of FIG. 3 to FIG. 8. To avoid repetition, details are not described herein again.
- FIG. 11 is a schematic block diagram of an IoT platform 900 in accordance with an embodiment of the present invention. As shown in FIG. 11, the IoT platform 900 includes:
- the transceiver unit 910 is configured to receive a new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by using the access authentication information;
- the processing unit 920 is configured to allocate, according to the new device discovery request message, the device identifier and the first access authentication information corresponding to the IoT device to the IoT device;
- the transceiver unit 910 is further configured to send, by using the IoT gateway, a new device access message to the IoT device, where the allow new device access message includes the device identifier, and the encrypted information formed by encrypting the first access authentication information. .
- the processing unit 920 is further configured to:
- the transceiver unit 910 is further configured to:
- the transceiver unit 910 is further configured to:
- the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
- the new device discovery request message further includes an encryption algorithm supported by the IoT device and a random number used for encryption; wherein the processing unit 920 is specifically configured to:
- the allowing new device access message is generated according to the encrypted information and the device identifier.
- the transceiver unit 910 may be implemented by a transceiver, and the processing unit 920 may be implemented by a processor.
- the Internet of Things device 1000 can include a processor 1010, a transceiver 1020, and a memory 1030.
- the memory 1030 can be used to store indication information, and can also be used to store code, instructions, and the like executed by the processor 1010.
- the various components in the Internet of Things device 1000 are connected by a bus system, wherein the bus system includes a power bus, a control bus, and a status signal bus in addition to the data bus.
- the IoT device 1000 shown in FIG. 12 can implement the various processes performed by the IoT platform in the foregoing method embodiments of FIG. 3 to FIG. 8. To avoid repetition, details are not described herein again.
- the term "and/or" in the embodiment of the present invention is merely an association relationship describing an associated object, indicating that there may be three relationships. Specifically, A and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
- first, second, third, etc. may be used to describe various messages, requests, and terminals in embodiments of the present invention, but such messages, requests, and terminals should not be limited to these terms. These terms are only used to distinguish messages, requests, and terminals from one another.
- the first access request message may also be referred to as a second access request message without departing from the scope of the embodiments of the present invention.
- the second access request message may also be referred to as a first access. Request message.
- the words “if” or “if” as used herein may be interpreted as “when” or “when” or “in response to determining” or “in response to detecting” ".
- the phrase “if determined” or “if detected (conditions or events stated)” may be interpreted as “when determined” or “in response to determination” or “when detected (stated condition or event) "Time” or “in response to a test (condition or event stated)”.
- the disclosed systems, devices, and methods may be implemented in other manners.
- the device embodiments described above are only illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
- each functional unit in the embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the embodiments of the present invention, or the part contributing to the prior art or the part of the technical solution, may be embodied in the form of a software product stored in a storage medium.
- the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present invention.
- the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Computing Systems (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Computer And Data Communications (AREA)
- Mobile Radio Communication Systems (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
本申请要求于2017年2月27日提交中国专利局、申请号为201710106440.9、发明名称为“接入物联网平台的方法、物联网平台和物联网设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on February 27, 2017 by the Chinese Patent Office, application number 201710106440.9, and the invention titled "Methods for accessing the Internet of Things platform, Internet of Things platform and Internet of Things devices". The content is incorporated herein by reference.
本申请涉及通信领域,并且更具体地,涉及接入物联网(Internet of things,IoT)平台的方法、物联网平台和物联网设备。The present application relates to the field of communications, and more specifically, to a method of accessing an Internet of Things (IoT) platform, an Internet of Things platform, and an Internet of Things device.
物联网架构可分为三层:感知层、网络层和应用层。感知层由各种IoT设备构成,包括温湿度传感器、二维码标签、RFID标签和读写器、摄像头、红外线、GPS等感知终端。感知层是物联网识别物体、采集信息的来源。网络层由各种网络,包括互联网、广电网、网络管理系统和IoT平台等组成,是整个物联网的中枢,负责传递和处理感知层获取的信息。应用层是物联网和用户的接口,它与行业需求结合,实现物联网的智能应用,例如,Mobile APP或者Web Portal。The IoT architecture can be divided into three layers: the perception layer, the network layer, and the application layer. The sensing layer is composed of various IoT devices, including temperature and humidity sensors, two-dimensional code tags, RFID tags and readers, cameras, infrared, GPS and other sensing terminals. The perception layer is the source of the Internet of Things to identify objects and collect information. The network layer is composed of various networks, including the Internet, the broadcasting network, the network management system, and the IoT platform. It is the backbone of the entire Internet of Things and is responsible for transmitting and processing the information acquired by the sensing layer. The application layer is the interface between the Internet of Things and the user. It is combined with industry requirements to implement intelligent applications of the Internet of Things, such as the Mobile APP or Web Portal.
现有技术中,IoT设备接入网络层时可以通过网关接入IoT平台。具体而言,IoT设备首先无条件检测网关,如果发现网关,执行通过网关接入IoT平台的过程。IoT设备成功接入IoT平台后,用户可以通过Mobile APP或者Web Portal访问IoT平台,控制IoT设备。In the prior art, when the IoT device accesses the network layer, the IoT platform can be accessed through the gateway. Specifically, the IoT device first detects the gateway unconditionally, and if the gateway is found, performs the process of accessing the IoT platform through the gateway. After the IoT device successfully accesses the IoT platform, users can access the IoT platform and control the IoT device through the Mobile APP or Web Portal.
但是,如果发现没有可接入的IoT网关,例如,IoT网关发生故障时,IoT设备会中断操作。导致IoT设备无法正常接入IoT平台。降低了网络的可靠性。However, if no IoT gateway is found to be accessible, for example, if the IoT gateway fails, the IoT device will interrupt the operation. The IoT device cannot access the IoT platform normally. Reduce the reliability of the network.
发明内容Summary of the invention
本发明实施例提供一种接入物联网平台的方法、物联网平台和物联网设备,能够有效提高网络的可靠性。The embodiments of the present invention provide a method for accessing an Internet of Things platform, an Internet of Things platform, and an Internet of Things device, which can effectively improve the reliability of the network.
第一方面,提供了一种接入物联网平台的方法,所述方法包括:In a first aspect, a method for accessing an Internet of Things platform is provided, the method comprising:
物联网IoT设备向IoT网关发送第一接入请求消息,所述第一接入请求消息包括指示信息,所述指示信息用于指示所述IoT设备具备通过接入认证信息接入所述IoT平台的能力,以使得所述IoT网关根据所述第一接入请求消息向所述IoT平台发送新设备发现请求消息,所述新设备发现请求消息用于所述IoT平台为所述IoT设备分配设备标识和所述IoT设备对应的第一接入认证信息;The IoT device sends a first access request message to the IoT gateway, where the first access request message includes indication information, where the indication information is used to indicate that the IoT device has access to the IoT platform by using access authentication information. The capability of the IoT gateway to send a new device discovery request message to the IoT platform according to the first access request message, the new device discovery request message being used by the IoT platform to allocate a device for the IoT device Identifying first access authentication information corresponding to the IoT device;
所述IoT设备通过IoT网关接收所述IoT平台发送的允许新设备接入消息,所述允许新设备接入消息包括所述设备标识,以及对所述第一接入认证信息进行加密处理后形成的加密信息;The IoT device receives, by the IoT gateway, a new device access message sent by the IoT platform, where the new device access message includes the device identifier, and the first access authentication information is encrypted and formed. Encrypted information;
所述IoT设备根据所述允许新设备接入消息确定所述设备标识和所述第一接入认证信息;Determining, by the IoT device, the device identifier and the first access authentication information according to the allow new device access message;
所述IoT设备根据所述设备标识,向所述IoT网关上报数据。The IoT device reports data to the IoT gateway according to the device identifier.
在本发明实施例中,IoT设备优先检测IoT网关,如果发现IoT网关,通过IoT网关接 入IoT平台的同时,能够获取IoT设备接入IoT平台的认证信息。有效防止在IoT网关发生故障时,IoT设备无法正常接入IoT平台的隐患。有效提高了网络的可靠性。In the embodiment of the present invention, the IoT device preferentially detects the IoT gateway. If the IoT gateway is found, the IoT platform can access the IoT platform and obtain the authentication information of the IoT device to access the IoT platform. It effectively prevents the IoT device from being able to access the IoT platform when the IoT gateway fails. Effectively improve the reliability of the network.
在一些可能的实现方式中,在所述IoT网关发生故障时,所述方法还包括:In some possible implementation manners, when the IoT gateway fails, the method further includes:
所述IoT设备向所述IoT平台发送第二接入请求,所述第二接入请求包括所述设备标识和所述第一接入认证信息;The IoT device sends a second access request to the IoT platform, where the second access request includes the device identifier and the first access authentication information;
所述IoT设备接收所述IoT平台发送的所述第二接入请求的响应消息。The IoT device receives a response message of the second access request sent by the IoT platform.
在一些可能的实现方式中,所述IoT设备向所述IoT平台发送第二接入请求之前,所述方法还包括:In some possible implementations, before the sending, by the IoT device, the second access request to the IoT platform, the method further includes:
所述IoT设备保存所述设备标识和所述第一接入认证信息。The IoT device saves the device identifier and the first access authentication information.
也就是说,在IoT网关发生故障时,IoT设备能够根据获取到的第一接入认证信息,成功接入IoT平台。进而,上报传感器检测到的数据和执行远端控制设备。有效保证了网络的可靠性。That is to say, when the IoT gateway fails, the IoT device can successfully access the IoT platform according to the obtained first access authentication information. Further, the data detected by the sensor is reported and the remote control device is executed. Effectively guarantee the reliability of the network.
在一些可能的实现方式中,所述方法还包括:In some possible implementations, the method further includes:
所述IoT设备确定所述IoT网关的故障消除时,通过所述IoT网关接入所述IoT平台。When the IoT device determines that the IoT gateway is faulty, the IoT platform accesses the IoT platform.
由此,在IoT网关故障恢复时,IoT设备又可以切换通过IoT网关接入IoT平台。有效减小了IoT平台和IoT设备之间的连接数。Thus, when the IoT gateway fails to recover, the IoT device can switch to access the IoT platform through the IoT gateway. Effectively reduce the number of connections between the IoT platform and the IoT device.
在一些可能的实现方式中,所述IoT设备确定所述IoT网关的故障消除时,通过所述IoT网关接入所述IoT平台,包括:In some possible implementation manners, when the IoT device determines that the IoT gateway is faulty, accessing the IoT platform by using the IoT gateway includes:
所述IoT设备接收到所述IoT平台发送的通知消息时,通过所述IoT网关接入所述IoT平台;The IoT device accesses the IoT platform through the IoT gateway when receiving the notification message sent by the IoT platform;
其中,所述通知消息用于通知所述IoT设备所述IoT网关成功接入所述IoT平台。The notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
在一些可能的实现方式中,所述IoT设备确定所述IoT网关的故障消除时,通过所述IoT网关接入所述IoT平台,包括:In some possible implementation manners, when the IoT device determines that the IoT gateway is faulty, accessing the IoT platform by using the IoT gateway includes:
所述IoT设备向所述IoT网关发送设备发现请求消息;Sending, by the IoT device, a device discovery request message to the IoT gateway;
所述IoT设备接收到所述IoT网关发送的所述设备发现请求消息的响应消息时,通过所述IoT网关接入所述IoT平台。The IoT device accesses the IoT platform through the IoT gateway when receiving the response message of the device discovery request message sent by the IoT gateway.
在一些可能的实现方式中,所述IoT设备通过所述IoT网关接入所述IoT平台,包括:In some possible implementations, the IoT device accesses the IoT platform by using the IoT gateway, including:
所述IoT设备向所述IoT网关发送第三接入请求消息,所述第三接入请求消息包括所述设备标识;The IoT device sends a third access request message to the IoT gateway, where the third access request message includes the device identifier;
所述IoT设备接收所述IoT网关发送的所述第三接入请求消息的响应消息。The IoT device receives a response message of the third access request message sent by the IoT gateway.
在一些可能的实现方式中,所述第一接入请求消息还包括以下信息:In some possible implementation manners, the first access request message further includes the following information:
所述IoT设备支持的加密算法和用于加密的随机数;An encryption algorithm supported by the IoT device and a random number used for encryption;
其中,所述IoT设备根据所述允许新设备接入消息确定所述设备标识和所述第一接入认证信息,包括:The determining, by the IoT device, the device identifier and the first access authentication information according to the allowing a new device access message, including:
所述IoT设备根据所述随机数对所述加密信息进行解密,确定所述第一接入认证信息。The IoT device decrypts the encrypted information according to the random number to determine the first access authentication information.
第二方面,提供了一种接入物联网平台的方法,所述方法包括:In a second aspect, a method for accessing an Internet of Things platform is provided, the method comprising:
物联网IoT平台接收IoT网关发送的新设备发现请求消息,所述新设备发现请求消息包括指示信息,所述指示信息用于指示IoT设备具备通过接入认证信息接入所述IoT平台的能力;The IoT platform receives the new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability to access the IoT platform by using the access authentication information;
所述IoT平台根据所述新设备发现请求消息,为所述IoT设备分配设备标识和所述IoT设备对应的第一接入认证信息;The IoT platform allocates a device identifier and first access authentication information corresponding to the IoT device to the IoT device according to the new device discovery request message;
所述IoT平台通过所述IoT网关向所述IoT设备发送允许新设备接入消息,所述允许新设备接入消息包括所述设备标识,以及对所述第一接入认证信息加密后形成的加密信息。The IoT platform sends a new device access message to the IoT device by using the IoT gateway, where the new device access message includes the device identifier, and the first access authentication information is encrypted. Encrypt information.
在一些可能的实现方式中,所述IoT平台通过所述IoT网关向所述IoT设备发送允许新设备接入消息之前,所述方法还包括:In some possible implementations, before the IoT platform sends the IoT device to the IoT device to allow a new device to access the message, the method further includes:
所述IoT平台保存所述指示信息。The IoT platform saves the indication information.
在一些可能的实现方式中,在所述IoT网关发生故障时,所述方法还包括:In some possible implementation manners, when the IoT gateway fails, the method further includes:
所述IoT平台接收所述IoT设备发送的第二接入请求,所述第二接入请求包括所述设备标识和所述第一接入认证信息;Receiving, by the IoT platform, a second access request sent by the IoT device, where the second access request includes the device identifier and the first access authentication information;
所述IoT平台向所述IoT设备发送所述第二接入请求的响应消息。The IoT platform sends a response message of the second access request to the IoT device.
在一些可能的实现方式中,所述IoT网关的故障消除时,所述方法还包括:In some possible implementation manners, when the fault of the IoT gateway is eliminated, the method further includes:
所述IoT平台向所述IoT设备发送通知消息,所述通知消息用于通知所述IoT设备所述IoT网关成功接入所述IoT平台。The IoT platform sends a notification message to the IoT device, where the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
在一些可能的实现方式中,所述新设备发现请求消息还包括所述IoT设备支持的加密算法和用于加密的随机数;In some possible implementation manners, the new device discovery request message further includes an encryption algorithm supported by the IoT device and a random number used for encryption;
其中,所述IoT平台通过所述IoT网关向所述IoT设备发送允许新设备接入消息之前,所述方法还包括:Before the IoT platform sends the IoT device to the IoT device to allow the new device to access the message, the method further includes:
所述IoT平台通过所述随机数对所述第一接入认证信息进行加密,生成加密信息;The IoT platform encrypts the first access authentication information by using the random number to generate encrypted information;
所述IoT平台根据所述加密信息和所述设备标识,生成所述允许新设备接入消息。The IoT platform generates the allow new device access message according to the encrypted information and the device identifier.
第三方面,提供了一种物联网设备,所述物联网设备包括:In a third aspect, an Internet of Things device is provided, the IoT device comprising:
收发单元,所述收发单元用于:a transceiver unit, the transceiver unit is configured to:
向物联网IoT网关发送第一接入请求消息,所述第一接入请求消息包括指示信息,所述指示信息用于指示IoT设备具备通过接入认证信息接入所述IoT平台的能力,以使得所述IoT网关根据所述第一接入请求消息向所述IoT平台发送新设备发现请求消息,所述新设备发现请求消息用于所述IoT平台为所述IoT设备分配设备标识和所述IoT设备对应的第一接入认证信息;Sending a first access request message to the Internet of Things IoT gateway, where the first access request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by using the access authentication information, And causing the IoT gateway to send a new device discovery request message to the IoT platform according to the first access request message, where the new device discovery request message is used by the IoT platform to allocate a device identifier to the IoT device and the The first access authentication information corresponding to the IoT device;
通过IoT网关接收所述IoT平台发送的允许新设备接入消息,所述允许新设备接入消息包括所述设备标识,以及对所述第一接入认证信息进行加密处理后形成的加密信息;Receiving, by the IoT gateway, a new device access message sent by the IoT platform, where the new device access message includes the device identifier, and the encrypted information formed by performing encryption processing on the first access authentication information;
处理单元,用于根据所述允许新设备接入消息确定所述设备标识和所述第一接入认证信息;a processing unit, configured to determine the device identifier and the first access authentication information according to the allow new device access message;
所述收发单元还用于:根据所述设备标识,向所述IoT网关上报数据。The transceiver unit is further configured to: report data to the IoT gateway according to the device identifier.
第四方面,提供了一种物联网设备,所述物联网设备包括:In a fourth aspect, an Internet of Things device is provided, the IoT device comprising:
收发器,所述收发单元用于:a transceiver, the transceiver unit is configured to:
向物联网IoT网关发送第一接入请求消息,所述第一接入请求消息包括指示信息,所述指示信息用于指示IoT设备具备通过接入认证信息接入所述IoT平台的能力,以使得所述IoT网关根据所述第一接入请求消息向所述IoT平台发送新设备发现请求消息,所述新设备发现请求消息用于所述IoT平台为所述IoT设备分配设备标识和所述IoT设备对应的第一接入认证信息;Sending a first access request message to the Internet of Things IoT gateway, where the first access request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by using the access authentication information, And causing the IoT gateway to send a new device discovery request message to the IoT platform according to the first access request message, where the new device discovery request message is used by the IoT platform to allocate a device identifier to the IoT device and the The first access authentication information corresponding to the IoT device;
通过IoT网关接收所述IoT平台发送的允许新设备接入消息,所述允许新设备接入消息包括所述设备标识,以及对所述第一接入认证信息进行加密处理后形成的加密信息;Receiving, by the IoT gateway, a new device access message sent by the IoT platform, where the new device access message includes the device identifier, and the encrypted information formed by performing encryption processing on the first access authentication information;
处理器,用于根据所述允许新设备接入消息确定所述设备标识和所述第一接入认证信息;a processor, configured to determine the device identifier and the first access authentication information according to the allow new device access message;
所述收发器还用于:根据所述设备标识,向所述IoT网关上报数据。The transceiver is further configured to: report data to the IoT gateway according to the device identifier.
第三方面和第四方面的物联网设备能够实现第一方面的方法中由物联网设备执行的的接入物联网平台的方法。The IoT device of the third aspect and the fourth aspect is capable of implementing the method of accessing the Internet of Things platform executed by the IoT device in the method of the first aspect.
第五方面,提供了一种物联网平台,所述物联网平台包括:In a fifth aspect, an Internet of Things platform is provided, where the Internet of Things platform comprises:
收发单元,用于接收IoT网关发送的新设备发现请求消息,所述新设备发现请求消息包括指示信息,所述指示信息用于指示IoT设备具备通过接入认证信息接入所述IoT平台的能力;a transceiver unit, configured to receive a new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability to access the IoT platform by using the access authentication information. ;
处理单元,用于根据所述新设备发现请求消息,为所述IoT设备分配设备标识和所述IoT设备对应的第一接入认证信息;a processing unit, configured to allocate, by the IoT device, a device identifier and first access authentication information corresponding to the IoT device according to the new device discovery request message;
所述收发单元还用于通过所述IoT网关向所述IoT设备发送允许新设备接入消息,所述允许新设备接入消息包括所述设备标识,以及对所述第一接入认证信息加密后形成的加密信息。The transceiver unit is further configured to send, by the IoT gateway, a new device access message to the IoT device, where the allow new device access message includes the device identifier, and encrypt the first access authentication information. After the formation of encrypted information.
第六方面,提供了一种物联网平台,所述物联网平台包括:In a sixth aspect, an Internet of Things platform is provided, where the Internet of Things platform comprises:
收发器,用于接收IoT网关发送的新设备发现请求消息,所述新设备发现请求消息包括指示信息,所述指示信息用于指示IoT设备具备通过接入认证信息接入所述IoT平台的能力;a transceiver, configured to receive a new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by accessing the authentication information. ;
处理器,用于根据所述新设备发现请求消息,为所述IoT设备分配设备标识和所述IoT设备对应的第一接入认证信息;a processor, configured to allocate, by the IoT device, a device identifier and first access authentication information corresponding to the IoT device according to the new device discovery request message;
所述收发器还用于通过所述IoT网关向所述IoT设备发送允许新设备接入消息,所述允许新设备接入消息包括所述设备标识,以及对所述第一接入认证信息加密后形成的加密信息。The transceiver is further configured to send, by the IoT gateway, a new device access message to the IoT device, where the allow new device access message includes the device identifier, and encrypt the first access authentication information After the formation of encrypted information.
第五方面和第六方面的物联网平台能够实现第二方面的方法中由物联网平台执行的的接入物联网平台的方法。The Internet of Things platform of the fifth aspect and the sixth aspect is capable of implementing the method for accessing the Internet of Things platform executed by the Internet of Things platform in the method of the second aspect.
结合上述各个方面,在一些可能的设计中,所述允许设备接入请求还包括所述IoT设备的以下信息中的至少一项:设备的生产厂商、设备类型、设备序列号、设备MAC地址、节点标识等。In combination with the above aspects, in some possible designs, the allowed device access request further includes at least one of the following information of the IoT device: a manufacturer of the device, a device type, a device serial number, a device MAC address, Node ID, etc.
图1是可应用本发明实施例的场景例子的示意图。1 is a schematic diagram of an example of a scenario to which an embodiment of the present invention may be applied.
图2是可应用本发明实施例的另一场景例子的示意图。2 is a schematic diagram of another example of a scenario to which an embodiment of the present invention may be applied.
图3是根据本发明实施例的IoT设备通过IoT网关接入IoT平台方法的示意性流程图。FIG. 3 is a schematic flowchart of a method for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
图4是根据本发明实施例的IoT设备通过IoT网关接入IoT平台方法的另一示意性流程图。FIG. 4 is another schematic flowchart of a method for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
图5是根据本发明实施例的IoT网关接入IoT平台的方法的示意性流程图。FIG. 5 is a schematic flowchart of a method for an IoT gateway to access an IoT platform according to an embodiment of the present invention.
图6是根据本发明实施例的IoT网关发生故障时IoT设备接入IoT平台的方法的示意性流程图。FIG. 6 is a schematic flowchart of a method for an IoT device to access an IoT platform when an IoT gateway fails according to an embodiment of the present invention.
图7是根据本发明实施例的IoT网关故障消除时IoT设备接入IoT平台的示意性流程图。FIG. 7 is a schematic flowchart of an IoT device accessing an IoT platform when an IoT gateway fails to be cancelled according to an embodiment of the present invention.
图8是根据本发明实施例的IoT设备接入IoT平台的另一示意性流程图。FIG. 8 is another schematic flowchart of an IoT device accessing an IoT platform according to an embodiment of the present invention.
图9是根据本发明实施例的IoT设备的示意性框图。9 is a schematic block diagram of an IoT device in accordance with an embodiment of the present invention.
图10是根据本发明实施例的IoT设备的另一示意性框图。FIG. 10 is another schematic block diagram of an IoT device according to an embodiment of the present invention.
图11是根据本发明实施例的IoT平台的示意性框图。11 is a schematic block diagram of an IoT platform in accordance with an embodiment of the present invention.
图12是根据本发明实施例的IoT平台的另一示意性框图。12 is another schematic block diagram of an IoT platform in accordance with an embodiment of the present invention.
下面将结合附图,对本申请中的技术方案进行描述。The technical solutions in the present application will be described below with reference to the accompanying drawings.
图1是本发明实施例中的应用场景的示意图。FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present invention.
如图1所示。IoT设备可以直接连接IoT平台,如图1中的第二IoT设备,或者IoT设备通过IoT网关接入IoT平台,如图1中的第一IoT设备。最终用户可以通过业务应用访问IoT平台,控制IoT设备,查看IoT设备的状态和数据。As shown in Figure 1. The IoT device can be directly connected to the IoT platform, such as the second IoT device in FIG. 1, or the IoT device accesses the IoT platform through the IoT gateway, such as the first IoT device in FIG. End users can access the IoT platform through business applications, control IoT devices, and view the status and data of IoT devices.
应注意,某些情况下,如图2所示,业务应用可以直接连IoT应用,通过IoT应用再连接IoT平台,后续为了描述简化,采用直连的方式进行描述。It should be noted that, in some cases, as shown in Figure 2, the service application can be directly connected to the IoT application, and then connected to the IoT platform through the IoT application, and then described in a straight-through manner for the sake of simplicity of description.
另外,为了便于方案的理解,下面对本发明实施例中的技术术语进行说明。In addition, in order to facilitate understanding of the scheme, the technical terms in the embodiments of the present invention are explained below.
IoT设备可以是具有传感器检测功能的设备。比如,支持温度检测传感器的设备,IoT设备同时可能支持某些控制功能,比如重启、固件升级等。有些情况下,也可以称为IoT设备为端侧设备。The IoT device can be a device with sensor detection capabilities. For example, devices that support temperature-sensing sensors, IoT devices may also support certain control functions, such as reboots, firmware upgrades, and so on. In some cases, it can also be called an IoT device as an end device.
IoT网关可以是连接多个传感器设备的网关设备。可选地,部署在IoT设备同一场所。例如,同一个楼,同一个家庭,同一个街道等场所。IoT网关可以接收IoT设备上报的数据,或者对IoT设备下发控制命令;IoT网关同时连接IoT平台,将IoT设备上报的数据上报给IoT平台,也接收IoT平台下发给设备的控制命令,并递交给正确的IoT设备执行。IoT网关也可以上报一些自己的信息,如重启过,也可以执行一些远程控制命令,如软件升级等。有些情况下,也称呼IoT网关为端侧网关或近场网关。The IoT gateway can be a gateway device that connects multiple sensor devices. Optionally, it is deployed at the same location on the IoT device. For example, the same building, the same family, the same street and other places. The IoT gateway can receive the data reported by the IoT device, or send the control command to the IoT device. The IoT gateway also connects to the IoT platform, and the data reported by the IoT device is reported to the IoT platform, and the control command sent by the IoT platform to the device is received. Submit to the correct IoT device for execution. The IoT gateway can also report some of its own information, such as rebooting, and can also perform some remote control commands, such as software upgrades. In some cases, the IoT gateway is also referred to as an end-side gateway or a near-field gateway.
IoT平台:连接IoT设备或或者IoT网关,支持IoT设备/网关上报数据,并提供数据给用户查看,或者允许用户给IoT设备/网关下发控制命令。有些情况下,也称IoT平台为云平台或云服务器或网络侧服务器。IoT平台也可以连接业务应用,供用户访问。The IoT platform: connects the IoT device or the IoT gateway, supports the IoT device/gateway to report data, and provides data for the user to view, or allows the user to issue control commands to the IoT device/gateway. In some cases, the IoT platform is also called a cloud platform or a cloud server or a network side server. The IoT platform can also connect to business applications for user access.
其中,IoT设备连接IoT网关可以采用多种近场网络技术,本发明实施例对此不作限定。例如,无线保真(Wireless Fidelity,WiFi),蓝牙,低功耗局域网协议(Zigbee),Z-wave等。可选地,IoT网关基于IP网络连接IoT平台。例如,可以使无线的IP网络(例如,2G/3G/4G数据网络),又例如,可以是有线固网的IP网络(Cable、xDSL、光纤网络等)。The IoT device can be connected to the IoT gateway by using a variety of near-field network technologies, which is not limited in this embodiment of the present invention. For example, Wireless Fidelity (WiFi), Bluetooth, Low Power LAN Protocol (Zigbee), Z-wave, etc. Optionally, the IoT gateway connects to the IoT platform based on the IP network. For example, a wireless IP network (for example, a 2G/3G/4G data network) can be made, and for example, it can be a wired fixed network IP network (Cable, xDSL, optical network, etc.).
应注意,用户可以通过手机应用(Mobile Application,Mobile APP)或Web Portal访问IoT平台,或者通过业务应用服务器访问IoT平台,此时用户可以查看IoT平台连接的IoT网关/IoT设备,也可以查看IoT设备上报的数据,也可以给IoT设备下发控制命令等。为了方便描述,本发明实施采用业务应用进行示例性说明。It should be noted that the user can access the IoT platform through the mobile application (Mobile Application) or Web Portal, or access the IoT platform through the business application server. At this time, the user can view the IoT gateway/IoT device connected to the IoT platform, or view the IoT. The data reported by the device can also be used to issue control commands to the IoT device. For convenience of description, the present invention is exemplified by a business application.
由于现有技术中IoT设备采用IoT网关接入IoT平台时,首先无条件检测网关,如果发现没有可接入的IoT网关,则不执行任何操作。导致在IoT网关故障时,无法接入IoT平台。Since the IoT device in the prior art uses the IoT gateway to access the IoT platform, the gateway is first unconditionally detected, and if no IoT gateway is found, no operation is performed. As a result, the IoT platform cannot be accessed when the IoT gateway fails.
因此,本发明实施例提供了一种IoT设备接入IoT平台的方法。具体而言,如果IoT设备通过IoT网关接入IoT平台,在IoT网关发生故障时,该IoT设备能够IoT设备的接入认证信息接入IoT平台,进而上报传感器检测到的数据和执行远端控制设备。同时,如果网关 故障消除,IoT设备又可以切换到通过IoT网关接入IoT平台的模式,减少云端和设备之间的连接数。有效提高了网络的可靠性。Therefore, an embodiment of the present invention provides a method for an IoT device to access an IoT platform. Specifically, if the IoT device accesses the IoT platform through the IoT gateway, when the IoT gateway fails, the IoT device can access the IoT platform with the access authentication information of the IoT device, and then report the data detected by the sensor and perform remote control. device. At the same time, if the gateway fault is eliminated, the IoT device can switch to the mode of accessing the IoT platform through the IoT gateway, reducing the number of connections between the cloud and the device. Effectively improve the reliability of the network.
下面结合附图对本发明实施例的IoT设备接入IoT平台方法进行说明。The method for accessing the IoT device of the IoT device in the embodiment of the present invention will be described below with reference to the accompanying drawings.
图3是本发明实施例的IoT设备通过IoT网关接入IoT平台方法100的示意性流程图。FIG. 3 is a schematic flowchart of a method 100 for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
如图3所示,该方法100包括:As shown in FIG. 3, the method 100 includes:
110、IoT设备向IoT网关发送第一接入请求消息,该第一接入请求消息包括指示信息。110. The IoT device sends a first access request message to the IoT gateway, where the first access request message includes indication information.
具体而言,IoT设备向IoT网关发送第一接入请求消息,该第一接入请求消息包括指示信息,该指示信息用于指示该IoT设备具备通过接入认证信息接入该IoT平台的能力,以使得该IoT网关根据该第一接入请求消息向该IoT平台发送新设备发现请求消息,该新设备发现请求消息用于该IoT平台为该IoT设备分配设备标识和该IoT设备对应的第一接入认证信息;Specifically, the IoT device sends a first access request message to the IoT gateway, where the first access request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by using the access authentication information. So that the IoT gateway sends a new device discovery request message to the IoT platform according to the first access request message, where the new device discovery request message is used by the IoT platform to allocate a device identifier for the IoT device and a corresponding to the IoT device. One access authentication information;
换句话说,IoT设备向IoT网关发送第一接入请求消息,该第一接入请求消息包括该指示信息;该IoT网关接收到该第一接入请求消息后,向该IoT平台发送新设备发现请求消息;该IoT平台接收到新设备发现请求消息后,为该IoT设备分配设备标识和该IoT设备对应的第一接入认证信息。In other words, the IoT device sends a first access request message to the IoT gateway, where the first access request message includes the indication information; after receiving the first access request message, the IoT gateway sends a new device to the IoT platform. After the IoT platform receives the new device discovery request message, the IoT device allocates the device identifier and the first access authentication information corresponding to the IoT device.
应注意,本发明实施例中的接入请求消息是为了使得IoT设备、IoT网关和IoT平台之间成功建立绑定关系,本发明实施例对其术语和具体实现方式不作限定。也就是说,IoT设备、IoT网关和IoT平台之间的绑定关系可以有多种实现方式。It should be noted that the access request message in the embodiment of the present invention is to make a binding relationship between the IoT device, the IoT gateway, and the IoT platform. The terminology and specific implementation manners of the embodiments of the present invention are not limited. In other words, the binding relationship between the IoT device, the IoT gateway, and the IoT platform can be implemented in multiple ways.
例如,该请求消息可以是注册消息。For example, the request message can be a registration message.
又例如,IoT设备同时在IoT平台和IoT网关进行注册。具体地,IoT设备同时向IoT平台和IoT网关发送注册消息。As another example, an IoT device registers with both the IoT platform and the IoT gateway. Specifically, the IoT device simultaneously sends a registration message to the IoT platform and the IoT gateway.
又例如,IoT设备通过IoT网关在IoT平台进行注册。可选地,作为一个实施例,IoT设备在IoT网关进行注册;IoT网关将IoT设备的注册信息声明到IoT平台。可选地,作为另一个实施例,IoT设备向IoT网关发送注册消息,IoT网关透传该注册消息到IoT平台,实现IoT设备和IoT平台之间关系绑定。As another example, an IoT device registers with the IoT platform through an IoT gateway. Optionally, as an embodiment, the IoT device registers with the IoT gateway; the IoT gateway declares the registration information of the IoT device to the IoT platform. Optionally, as another embodiment, the IoT device sends a registration message to the IoT gateway, and the IoT gateway transparently transmits the registration message to the IoT platform to implement relationship binding between the IoT device and the IoT platform.
还应理解,本发明实施例对接入信息的具体实现形式不作限定。例如,该接入信息可以是接入密码,也可以是其它形式的信息。It should be understood that the specific implementation form of the access information is not limited in the embodiment of the present invention. For example, the access information may be an access password or other forms of information.
可选地,该IoT平台接收到新设备发现请求消息后,保存该指示信息。Optionally, after receiving the new device discovery request message, the IoT platform saves the indication information.
120、IoT设备通过IoT网关接收IoT平台发送的允许新设备接入消息,该允许新设备接入消息包括设备标识,以及对第一接入认证信息进行加密处理后形成的加密信息。120. The IoT device receives, by using the IoT gateway, a new device access message sent by the IoT platform, where the new device access message includes the device identifier, and the encrypted information formed by encrypting the first access authentication information.
具体而言,IoT平台为IoT设备分配第一接入认证信息,该第一接入认证信息指IoT设备通过接入认证信息接入IoT平台时需要的信息。同时,IoT平台向IoT网关发送允许设备接入请求。其中,该允许设备接入请求中携带IoT设备的设备标识,以及对第一接入认证信息进行加密处理后形成的加密信息。可选地,IoT网关接收到该允许设备接入请求后,透传给该IoT设备。Specifically, the IoT platform allocates first access authentication information to the IoT device, where the first access authentication information refers to information required when the IoT device accesses the IoT platform by accessing the authentication information. At the same time, the IoT platform sends a device access request to the IoT gateway. The device identifier that carries the IoT device in the device access request, and the encrypted information formed after the first access authentication information is encrypted. Optionally, after receiving the allowed device access request, the IoT gateway transparently transmits the request to the IoT device.
可选地,允许设备接入请求还包括该IoT设备的以下信息中的至少一项:设备的生产厂商、设备类型、设备序列号、设备MAC地址、节点标识等。Optionally, the device access request further includes at least one of the following information of the IoT device: a manufacturer of the device, a device type, a device serial number, a device MAC address, a node identifier, and the like.
130、IoT设备根据该允许新设备接入消息确定该设备标识和该第一接入认证信息。130. The IoT device determines the device identifier and the first access authentication information according to the allow new device access message.
具体而言,IoT设备接收到该允许新设备接入消息后,确定IoT设备的设备标识。同时,对加密信息进行解密处理,确定该IoT设备的第一接入认证信息。Specifically, after receiving the new device access message, the IoT device determines the device identifier of the IoT device. At the same time, the encrypted information is decrypted to determine the first access authentication information of the IoT device.
可选地,该第一接入请求消息还包括该IoT设备支持的加密算法和用于加密的随机数。该IoT设备接收到允许新设备接入消息时,根据该随机数对加密信息进行解密,确定该第一接入认证信息。Optionally, the first access request message further includes an encryption algorithm supported by the IoT device and a random number used for encryption. When receiving the new device access message, the IoT device decrypts the encrypted information according to the random number to determine the first access authentication information.
换句话说,IoT平台通过该随机数对该第一接入认证信息进行加密,生成加密信息;该IoT平台根据该加密信息和该设备标识,生成该允许新设备接入消息。In other words, the IoT platform encrypts the first access authentication information by using the random number to generate encrypted information. The IoT platform generates the new device access message according to the encrypted information and the device identifier.
140、IoT设备根据该设备标识,向IoT网关上报数据。140. The IoT device reports data to the IoT gateway according to the device identifier.
具体而言,IoT设备根据该设备标识,向IoT网关上报设备数据、接收IoT平台下发的操作。Specifically, the IoT device reports the device data to the IoT gateway and receives the operation delivered by the IoT platform according to the device identifier.
需要注意的是,图1是本发明实施例的IoT设备通过IoT网关接入IoT平台的示例性说明,这种情况下,IoT网关处于正常工作状态。IoT设备优先检测IoT网关,如果发现IoT网关,根据图1所示的流程通过IoT网关接入IoT平台的同时,能够获取IoT设备接入IoT平台的认证信息。It should be noted that FIG. 1 is an exemplary illustration of an IoT device accessing an IoT platform through an IoT gateway according to an embodiment of the present invention. In this case, the IoT gateway is in a normal working state. The IoT device preferentially detects the IoT gateway. If the IoT gateway is found, the IoT platform can access the IoT platform and obtain the authentication information of the IoT device accessing the IoT platform according to the process shown in FIG.
因此,在IoT网关发生故障时,IoT设备能够根据获取到的第一接入认证信息,成功接入IoT平台。进而,上报传感器检测到的数据和执行远端控制设备。有效保证了网络的可靠性。Therefore, when the IoT gateway fails, the IoT device can successfully access the IoT platform according to the obtained first access authentication information. Further, the data detected by the sensor is reported and the remote control device is executed. Effectively guarantee the reliability of the network.
具体而言,该IoT设备向该IoT平台发送第二接入请求,该第二接入请求包括该设备标识和该第一接入认证信息;该IoT设备接收该IoT平台发送的该第二接入请求的响应消息。换句话说,该IoT平台接收该IoT设备发送的第二接入请求,该第二接入请求包括该设备标识和该第一接入认证信息;该IoT平台向该IoT设备发送该第二接入请求的响应消息。Specifically, the IoT device sends a second access request to the IoT platform, where the second access request includes the device identifier and the first access authentication information; and the IoT device receives the second interface sent by the IoT platform. The response message to the request. In other words, the IoT platform receives the second access request sent by the IoT device, where the second access request includes the device identifier and the first access authentication information; and the IoT platform sends the second interface to the IoT device. The response message to the request.
可选地,该IoT设备向该IoT平台发送第二接入请求之前,该IoT设备保存该设备标识和该第一接入认证信息。Optionally, before the IoT device sends the second access request to the IoT platform, the IoT device saves the device identifier and the first access authentication information.
由于IoT设备根据该第一接入认证信息接入IoT平台时,增加了云端和设备之间的连接数。When the IoT device accesses the IoT platform according to the first access authentication information, the number of connections between the cloud and the device is increased.
因此,为了减小IoT平台和IoT设备之间的连接数。可选地,该IoT设备确定该IoT网关的故障消除时,通过该IoT网关接入该IoT平台。Therefore, in order to reduce the number of connections between the IoT platform and the IoT device. Optionally, when the IoT device determines that the IoT gateway is faulty, the IoT platform accesses the IoT platform.
在一个实施例中,为了保证IoT网关故障消除时,IoT设备能够及时知道,IoT平台在IoT网关接入时,通知IoT设备执行网关发现过程。具体而言,该IoT设备接收到该IoT平台发送的通知消息时,通过该IoT网关接入该IoT平台;其中,该通知消息用于通知该IoT设备该IoT网关成功接入该IoT平台。In an embodiment, in order to ensure that the IoT gateway is faulty, the IoT device can know in time that the IoT platform notifies the IoT device to perform the gateway discovery process when the IoT gateway accesses. Specifically, the IoT device accesses the IoT platform through the IoT gateway when receiving the notification message sent by the IoT platform, where the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
在另一和实施例中,该IoT设备向该IoT网关发送设备发现请求消息;该IoT设备接收到该IoT网关发送的该设备发现请求消息的响应消息时,通过该IoT网关接入该IoT平台。可选地,该IoT设备向该IoT网关周期性发送设备发现请求消息。In another embodiment, the IoT device sends a device discovery request message to the IoT gateway; when the IoT device receives the response message of the device discovery request message sent by the IoT gateway, accessing the IoT platform through the IoT gateway . Optionally, the IoT device periodically sends a device discovery request message to the IoT gateway.
也就是说,在IoT网关的故障消除时,IoT设备可以通过该IoT网关的故障发生之前使用的设备标识接入故障消除后的IoT网关。That is to say, when the fault of the IoT gateway is eliminated, the IoT device can access the fault-removed IoT gateway through the device identifier used before the fault of the IoT gateway occurs.
具体而言,IoT设备向该IoT网关发送第三接入请求消息,该第三接入请求消息包括该设备标识;该IoT设备接收该IoT网关发送的该第三接入请求消息的响应消息。Specifically, the IoT device sends a third access request message to the IoT gateway, where the third access request message includes the device identifier, and the IoT device receives the response message of the third access request message sent by the IoT gateway.
本发明实施例中,IoT设备支持检测网关是否可用;如果可用,优先通过网关接入IoT平台;如果网关故障,支持自动直接连接到IoT平台。有效提高了网络的可靠性。In the embodiment of the present invention, the IoT device supports detecting whether the gateway is available; if available, preferentially accesses the IoT platform through the gateway; if the gateway is faulty, it supports automatic direct connection to the IoT platform. Effectively improve the reliability of the network.
另外,在IoT网关故障恢复时,又可以切换通过IoT网关接入IoT平台。有效减小了IoT平台和IoT设备之间的连接数。In addition, when the IoT gateway fails to recover, it can switch to access the IoT platform through the IoT gateway. Effectively reduce the number of connections between the IoT platform and the IoT device.
图4是根据本发明实施例的IoT设备通过IoT网关接入IoT平台方法200的示意性流程图。FIG. 4 is a schematic flowchart of a method 200 for an IoT device to access an IoT platform through an IoT gateway according to an embodiment of the present invention.
如图4所示,该方法200包括:As shown in FIG. 4, the method 200 includes:
210、IoT设备识别接入模式为通过网关接入优先。210. The IoT device identifies the access mode as preferential access through the gateway.
211、IoT网关已经成功接入IoT平台。211. The IoT gateway has successfully accessed the IoT platform.
212、IoT设备向IoT网关发送设备发现请求。具体地,IoT设备首次上电后,会组播或广播的设备发现请求,尝试发现可接入的IoT网关。212. The IoT device sends a device discovery request to the IoT gateway. Specifically, after the IoT device is powered on for the first time, a multicast or broadcast device discovery request is attempted to discover an accessible IoT gateway.
213、IoT网关向IoT设备发送设备发现响应。具体地,IoT网关收到IoT设备的设备发现请求,向IoT设备发送设备发现响应。213. The IoT gateway sends a device discovery response to the IoT device. Specifically, the IoT gateway receives the device discovery request of the IoT device, and sends a device discovery response to the IoT device.
214、IoT设备向IoT网关发送设备接入请求。具体地,该设备接入请求中携带:IoT设备的生产厂商、设备类型、设备序列号、设备MAC地址。214. The IoT device sends a device access request to the IoT gateway. Specifically, the device access request carries: a manufacturer, a device type, a device serial number, and a device MAC address of the IoT device.
由于IoT网关不处于新设备发现状态,IoT网关检查该设备不属于已经接入的设备时,不处理该消息。Since the IoT gateway is not in the new device discovery state, the IoT gateway does not process the message when it checks that the device does not belong to the already accessed device.
215、业务应用向IoT平台发送设备发现请求。用户可以通过业务应用界面,控制IoT网关启动设备发现过程,业务应用发送设备发现请求给IoT平台,请求中携带IoT网关的设备标识。215. The service application sends a device discovery request to the IoT platform. The service application interface controls the IoT gateway to initiate the device discovery process. The service application sends a device discovery request to the IoT platform, and the device identifier of the IoT gateway is carried in the request.
216、IoT平台向业务应用发送设备发现响应。216. The IoT platform sends a device discovery response to the service application.
217、IoT平台向IoT网关发送设备发现请求。217. The IoT platform sends a device discovery request to the IoT gateway.
具体而言,IoT平台收到设备发现请求后,检查用户的权限,检查通过后,发送该设备发现请求给对应IoT网关,同时给业务应用返回接收设备发现请求的响应。Specifically, after receiving the device discovery request, the IoT platform checks the user's authority, and after the check is passed, sends the device discovery request to the corresponding IoT gateway, and returns a response to the receiving device discovery request to the service application.
换句话说,IoT网关收到设备发现请求后,进入设备发现状态。In other words, after receiving the device discovery request, the IoT gateway enters the device discovery state.
218、IoT设备向IoT网关发送设备接入请求。具体地,该设备接入请求中携带:IoT设备的生产厂商、设备类型、设备序列号、设备MAC地址。218. The IoT device sends a device access request to the IoT gateway. Specifically, the device access request carries: a manufacturer, a device type, a device serial number, and a device MAC address of the IoT device.
需要注意的是,本发明实施例中的设备接入请求消息支持在消息中增加指示信息,该指示信息用于指示该IoT设备具备根据接入认证信息接入IoT平台的能力。It should be noted that the device access request message in the embodiment of the present invention supports adding the indication information to the message, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform according to the access authentication information.
可选地,该设备接入请求消息还可以包括IoT设备提供的随机数和支持的加密算法。Optionally, the device access request message may further include a random number provided by the IoT device and a supported encryption algorithm.
219、IoT网关向IoT设备发送设备接入响应。219. The IoT gateway sends a device access response to the IoT device.
220、IoT网关为IoT设备分配节点标识。220. The IoT gateway allocates a node identifier to the IoT device.
221、IoT网关向IoT平台发送新设备发现请求。221. The IoT gateway sends a new device discovery request to the IoT platform.
具体而言,IoT网关在设备发现状态下,IoT网关收到设备接入请求后,检查其携带的信息,确认是新接入设备,IoT网关为IoT设备分配的节点标识,并向IoT设备反馈设备接入响应,其中,该设备接入响应中携带IoT设备的节点标识。同时,向IoT平台发送发送新设备发现请求。Specifically, after the IoT gateway receives the device access request, the IoT gateway checks the information it carries, confirms that it is the new access device, and the IoT gateway assigns the node identifier to the IoT device, and feeds back to the IoT device. The device access response, where the device access response carries the node identifier of the IoT device. At the same time, a new device discovery request is sent to the IoT platform.
应理解,本发明实施例中的IoT网关支持将该设备接入请求中的指示信息、随机数、支持的加密算法透传给IoT平台。It should be understood that the IoT gateway in the embodiment of the present invention supports the transparent transmission of the indication information, the random number, and the supported encryption algorithm in the device access request to the IoT platform.
可选地,IoT网关通过新设备发现请求,向IoT平台透传该设备接入请求中的指示信息、随机数、支持的加密算法。Optionally, the IoT gateway transparently transmits the indication information, the random number, and the supported encryption algorithm in the device access request to the IoT platform by using the new device discovery request.
222、IoT平台为IoT设备分配设备标识。222. The IoT platform allocates device identifiers for IoT devices.
具体而言,IoT平台在接收到IoT网关发送的新设备发现请求后,为IoT设备分配设备标 识。Specifically, the IoT platform assigns a device identification to the IoT device after receiving a new device discovery request sent by the IoT gateway.
同时,IoT平台保存该新设备发现请求中的指示信息。At the same time, the IoT platform saves the indication information in the new device discovery request.
223、IoT平台向业务应用发送新设备发现通知。223. The IoT platform sends a new device discovery notification to the service application.
具体而言,IoT平台收到新设备发现请求后,检查请求中携带的以下信息:IoT设备的生产厂商、设备类型、设备序列号、设备MAC地址、节点ID。IoT平台确认是新设备,则为IoT设备分配新的设备标识,并通过IoT网关绑定的业务应用,发送新设备通知消息给业务应用。Specifically, after receiving the new device discovery request, the IoT platform checks the following information carried in the request: the manufacturer, device type, device serial number, device MAC address, and node ID of the IoT device. The IoT platform confirms that it is a new device, and assigns a new device identifier to the IoT device, and sends a new device notification message to the service application through the service application bound by the IoT gateway.
224、业务应用向IoT平台发送允许新设备接入消息。224. The service application sends a message to the IoT platform to allow the new device to access.
225、IoT平台为IoT设备分配接入认证信息。225. The IoT platform allocates access authentication information to the IoT device.
具体而言,业务应用收到新设备通知消息后,向用户呈现IoT设备的信息:设备的生产厂商、设备类型、设备序列号、设备MAC地址、节点标识、新的设备标识等。用户可以选择允许设备接入。即,业务应用给IoT平台发送允许设备接入请求,请求中携带IoT设备的设备标识。Specifically, after receiving the new device notification message, the service application presents the information of the IoT device to the user: the manufacturer of the device, the device type, the device serial number, the device MAC address, the node identifier, and the new device identifier. The user can choose to allow the device to access. That is, the service application sends a device access request to the IoT platform, and the device identifier of the IoT device is carried in the request.
同时,IoT平台收到允许新设备接入请求后,检查保存信息,如果IoT设备具备根据接入认证信息接入IoT平台的能力,为IoT设备分配接入认证信息,并采用随机数加密该信息后,在发送IoT网关的允许设备接入消息中,携带该加密信息。At the same time, the IoT platform checks the saved information after receiving the new device access request. If the IoT device has the ability to access the IoT platform according to the access authentication information, the IoT device allocates access authentication information and encrypts the information by using random numbers. Then, the encrypted information is carried in the allowed device access message of the IoT gateway.
226、IoT平台向IoT网关发送允许新设备接入消息。226. The IoT platform sends a message to the IoT gateway to allow the new device to access.
具体而言,IoT平台收到允许新设备接入请求后,检查用户的权限,检查通过后,为IoT设备分配接入认证信息。Specifically, after receiving the new device access request, the IoT platform checks the user's authority. After the check is passed, the IoT device is assigned access authentication information.
同时,IoT平台向IoT网关发送允许设备接入请求。其中,该允许设备接入请求中携带IoT设备的设备标识,以及IoT设备的以下信息:设备的生产厂商、设备类型、设备序列号、设备MAC地址、节点标识等。At the same time, the IoT platform sends a device access request to the IoT gateway. The device identifier of the IoT device and the following information of the IoT device: the manufacturer, device type, device serial number, device MAC address, and node identifier of the device.
需要注意的是,本发明实施例中的IoT网关在收到允许新设备接入消息时,能够向IoT设备透传IoT设备的设备标识和加密的接入认证信息。It should be noted that the IoT gateway in the embodiment of the present invention can transparently transmit the device identifier of the IoT device and the encrypted access authentication information to the IoT device when receiving the new device access message.
227、IoT网关向IoT设备发送允许新设备接入消息。227. The IoT gateway sends a message to the IoT device to allow the new device to access.
具体而言,IoT网关收到允许新设备接入消息后,设置设备状态为允许接入,并向IoT设备发送允许新设备接入消息。该允许新设备接入消息中携带IoT设备的设备标识。Specifically, after receiving the permission of the new device to access the message, the IoT gateway sets the device status to allow access, and sends an IoT device to allow the new device to access the message. The device identifier of the IoT device is allowed in the new device access message.
228、IoT设备保存IoT设备的设备标识和接入认证信息。228. The IoT device saves the device identifier and access authentication information of the IoT device.
具体而言,IoT设备收到允许新设备接入消息时,发现消息中包含加密的接入认证信息,则使用发送的随机数解密该信息,并保存该接入认证信息。Specifically, when the IoT device receives the access permission message for the new device, the discovery message includes the encrypted access authentication information, and the obtained random number is used to decrypt the information, and the access authentication information is saved.
229、IoT设备向IoT网关发送设备数据上报消息。229. The IoT device sends a device data report message to the IoT gateway.
具体而言,IoT设备收到允许新设备接入消息后,保存IoT设备的设备标识,并可以使用该设备标识开始上报传感器检测数据。具体地,IoT设备检测收到数据后,发送设备数据上报消息给IoT网关,其中,该设备数据上报消息中携带IoT设备的设备标识,以及IoT设备的检测数据。Specifically, after receiving the message that the new device is allowed to access, the IoT device saves the device identifier of the IoT device, and can use the device identifier to start reporting the sensor detection data. Specifically, after the IoT device detects the received data, the device sends a device data report message to the IoT gateway, where the device data report message carries the device identifier of the IoT device and the detection data of the IoT device.
230、IoT网关向IoT平台发送设备数据上报消息。即,IoT网关收到数据上报消息后,发送数据上报消息给IoT平台,其中,该设备数据上报消息中携带IoT设备的设备标识,以及IoT设备的检测数据。230. The IoT gateway sends a device data report message to the IoT platform. That is, after receiving the data report message, the IoT gateway sends a data report message to the IoT platform, where the device data report message carries the device identifier of the IoT device and the detection data of the IoT device.
231、IoT平台向业务应用发送设备数据上报消息。即,IoT平台收到数据上报消息后, 保存设备数据信息,并通过IoT设备的设备标识找到IoT设备绑定的业务应用,并发送数据上报通知给业务应用。业务应用收到通知后,可以在界面上呈现给最终用户。231. The IoT platform sends a device data report message to the service application. That is, after receiving the data report message, the IoT platform saves the device data information, and finds the service application bound by the IoT device through the device identifier of the IoT device, and sends a data report notification to the service application. Once the business application receives the notification, it can be presented to the end user on the interface.
232、业务应用向IoT平台发送设备操作请求。232. The service application sends a device operation request to the IoT platform.
233、IoT平台向IoT网关发送设备操作请求。233. The IoT platform sends a device operation request to the IoT gateway.
具体地,IoT平台收到设备操作请求后,检查业务应用的权限,根据IoT设备的设备标识,找到对应的IoT网关,发送设备操作请求给IoT网关。Specifically, after receiving the device operation request, the IoT platform checks the permission of the service application, finds the corresponding IoT gateway according to the device identifier of the IoT device, and sends the device operation request to the IoT gateway.
234、IoT网关向IoT设备发送设备操作请求。234. The IoT gateway sends a device operation request to the IoT device.
具体地,IoT设备收到设备操作请求后,执行对应的操作请求。换句话说,用户可以通过业务应用控制IoT设备,执行IoT设备支持的操作。Specifically, after receiving the device operation request, the IoT device performs a corresponding operation request. In other words, the user can control the IoT device through the business application to perform operations supported by the IoT device.
应理解,图4只是本发明实施例的接入IoT平台方法的示例性说明,对于该方法中的序号不作具体限定。例如,216和217可以是同时执行,也可以先执行216再执行217,还可以先执行217再执行216。It should be understood that FIG. 4 is only an exemplary description of the method for accessing the IoT platform according to the embodiment of the present invention, and the serial number in the method is not specifically limited. For example, 216 and 217 may be executed simultaneously, or 216 may be performed first 217, or 217 may be performed first.
上述图4对本发明实施例IoT设备通过IoT网关接入IoT平台的实现方式进行了说明,在图4的步骤211中,默认IoT网关已经成功接入IoT平台。下面结合图5对本发明实施例中IoT网关接入IoT平台的实现方式进行说明。The foregoing FIG. 4 illustrates the implementation manner of the IoT device accessing the IoT platform by using the IoT gateway in the embodiment of the present invention. In step 211 of FIG. 4, the default IoT gateway has successfully accessed the IoT platform. The implementation manner of the IoT gateway accessing the IoT platform in the embodiment of the present invention is described below with reference to FIG.
图5是本发明实施例的IoT网关接入IoT平台的方法300的示意性流程图。FIG. 5 is a schematic flowchart of a method 300 for an IoT gateway to access an IoT platform according to an embodiment of the present invention.
如图5所示,该方法300包括:As shown in FIG. 5, the method 300 includes:
应理解,图5是本发明实施例的IoT网关首次接入IoT平台的方法,为方便描述,本发明实施例将IoT平台建立网关和业务应用之间的关系的过程称为绑定过程。换句话说,绑定过程指IoT平台为一个新的IoT网关分配接入的设备标识和接入认证信息,并且监测IoT网关首次接入的全过程。It should be understood that FIG. 5 is a method for the IoT gateway to access the IoT platform for the first time in the embodiment of the present invention. For convenience of description, the process of establishing the relationship between the gateway and the service application by the IoT platform is referred to as a binding process. In other words, the binding process refers to the IoT platform assigning the access device identification and access authentication information to a new IoT gateway, and monitoring the entire process of the IoT gateway accessing for the first time.
310、业务应用向IoT平台发送登陆请求。具体地,用户从业务应用登陆到IoT平台,携带用户的标识和对应的密码。310. The service application sends a login request to the IoT platform. Specifically, the user logs in to the IoT platform from the service application, and carries the identifier of the user and the corresponding password.
320、IoT平台向业务应用发送登陆响应。具体地,IoT平台验证用户的标识和密码,验证通过后,返回登陆成功响应。320. The IoT platform sends a login response to the business application. Specifically, the IoT platform verifies the user's identification and password, and after the verification is passed, returns a successful login response.
330、业务应用向IoT平台发送绑定请求。具体地,该绑定请求中携带IoT网关的以下信息:生产厂商、设备类型、设备序列号、MAC地址等信息。330. The service application sends a binding request to the IoT platform. Specifically, the binding request carries the following information of the IoT gateway: a manufacturer, a device type, a device serial number, a MAC address, and the like.
可选地,用户可以通过业务应用输入或者通过二维码扫描等方式获取这些信息。Optionally, the user can obtain the information through a business application input or a two-dimensional code scanning.
340、IoT平台为IoT网关分配设备标识和接入认证信息。340. The IoT platform allocates device identifier and access authentication information to the IoT gateway.
350、IoT平台向业务应用发送绑定响应。350. The IoT platform sends a binding response to the service application.
IoT平台收到设备绑定请求后,为IoT网关分配设备标识和IoT网关接入IoT平台需要的接入认证信息,并返回设备绑定响应。After receiving the device binding request, the IoT platform allocates the device identifier and the access authentication information required by the IoT gateway to the IoT platform, and returns the device binding response.
360、配置IoT网关的设备标识和接入认证信息。360. Configure the device identifier and access authentication information of the IoT gateway.
370、IoT网关向IoT平台发送设备接入注册请求。370. The IoT gateway sends a device access registration request to the IoT platform.
具体而言,用户可以在IoT网关上配置IoT平台的地址,并配置IoT设备的设备标识和IoT设备的接入认证信息,IoT网关完成配置后,发送设备接入注册请求给IoT平台,该设备接入注册请求中携带IoT设备的设备标识和IoT设备的接入认证信息。Specifically, the user can configure the address of the IoT platform on the IoT gateway, and configure the device identifier of the IoT device and the access authentication information of the IoT device. After the IoT gateway completes the configuration, the sending device accesses the registration request to the IoT platform. The access registration request carries the device identifier of the IoT device and the access authentication information of the IoT device.
380、IoT平台向IoT网关发送设备接入注册响应。380. The IoT platform sends a device access registration response to the IoT gateway.
390、IoT平台向业务应用发送设备接入通知。390. The IoT platform sends a device access notification to the service application.
具体而言,IoT平台收到IoT网关发送的设备接入注册请求后,验证IoT设备的设备标识和IoT设备的接入认证信息,验证通过后,给IoT网关返回设备接入注册响应消息。Specifically, after receiving the device access registration request sent by the IoT gateway, the IoT platform verifies the device identifier of the IoT device and the access authentication information of the IoT device, and returns the device access registration response message to the IoT gateway after the verification is passed.
同时,IoT平台通过IoT网关的设备标识,找到是对应的业务应用,并发送设备接入通知消息给业务应用。At the same time, the IoT platform finds the corresponding service application through the device identifier of the IoT gateway, and sends a device access notification message to the service application.
应理解,图5中的流程仅仅是IoT平台绑定IoT网关和业务应用的示例,本发明实施例并不限定于此。It should be understood that the process in FIG. 5 is only an example of the IoT platform binding IoT gateway and the service application, and the embodiment of the present invention is not limited thereto.
还应理解,本领域技术人员还可以根据图5所示的流程为IoT设备分配IoT设备的设备标识和IoT设备接入IoT平台时需要的接入认证信息,本发明实施例对此不作限定。It should be understood that the IoT device can also allocate the device identifier of the IoT device and the access authentication information required for the IoT device to access the IoT platform according to the process shown in FIG. 5, which is not limited in this embodiment of the present invention.
图6是根据本发明实施例的IoT网关发生故障时IoT设备接入IoT平台的方法400的示意性流程图。FIG. 6 is a schematic flowchart of a method 400 for an IoT device to access an IoT platform when an IoT gateway fails in accordance with an embodiment of the present invention.
如图6所示,该方法400包括:As shown in FIG. 6, the method 400 includes:
410、IoT设备向IoT网关发送设备发现请求。410. The IoT device sends a device discovery request to the IoT gateway.
420、IoT设备确定IoT网关发生故障。420. The IoT device determines that the IoT gateway is faulty.
具体而言,IoT设备会发起设备发现请求,超时无响应后,IoT设备确定IoT网关发生故障。IoT设备确定IoT网关发生故障后,检查已经完成的设备直连协商,采用接入认证信息直接接入IoT平台。Specifically, the IoT device initiates a device discovery request, and after the timeout is unresponsive, the IoT device determines that the IoT gateway has failed. After the IoT device determines that the IoT gateway is faulty, it checks the completed device direct connection negotiation and directly accesses the IoT platform by using the access authentication information.
430、IoT设备向IoT平台发送设备接入注册请求。430. The IoT device sends a device access registration request to the IoT platform.
具体而言,IoT设备发送设备接入注册请求给IoT平台,该设备接入注册请求中携带IoT设备的设备标识和IoT设备的接入认证信息。Specifically, the IoT device sends a device access registration request to the IoT platform, where the device access registration request carries the device identifier of the IoT device and the access authentication information of the IoT device.
可选地,该设备接入注册请求中还携带IoT设备支持通过网关接入IoT平台的指示信息。Optionally, the device access registration request further carries an indication that the IoT device supports accessing the IoT platform through the gateway.
440、IoT平台向IoT设备发送设备接入注册响应。440. The IoT platform sends a device access registration response to the IoT device.
具体而言,IoT平台收到设备接入注册请求后,验证设备标识和身份认证信息,如果是合法设备,则返回成功响应。Specifically, after receiving the device access registration request, the IoT platform verifies the device identifier and the identity authentication information, and if it is a legitimate device, returns a successful response.
450、IoT平台向业务应用发送设备状态变化。450. The IoT platform sends a device state change to the service application.
具体而言,IoT平台通过IoT设备的设备标识找到绑定的业务应用,并给业务应用发送设备状态变化的通知消息。其中,该设备状态变化的通知消息中携带:IoT设备的设备标识,IoT设备的状态为在线。Specifically, the IoT platform finds the bound service application through the device identifier of the IoT device, and sends a notification message of the device state change to the service application. The notification message of the device status change carries: the device identifier of the IoT device, and the state of the IoT device is online.
460、设备数据上报。460. Device data is reported.
470、设备数据上报。470. Device data is reported.
480、设备操作请求。480, device operation request.
490、设备操作请求。490. Device operation request.
由此,IoT设备收到接入成功响应消息后,即可通过上述步骤460-步骤490上报设备数据;也可以接收IoT平台下发的操作,并执行其控制。Therefore, after receiving the access success response message, the IoT device can report the device data through the foregoing steps 460-step 490; and can also receive the operation delivered by the IoT platform and perform its control.
图7是根据本发明实施例的IoT网关故障消除时IoT设备接入IoT平台的方法500示意性流程图。FIG. 7 is a schematic flowchart of a method 500 for an IoT device to access an IoT platform when an IoT gateway fails to be removed according to an embodiment of the present invention.
如图7所示,该方法500包括:As shown in FIG. 7, the method 500 includes:
510、IoT设备通过IoT网关成功接入IoT平台。510. The IoT device successfully accesses the IoT platform through the IoT gateway.
511、IoT网关向IoT平台发送设备接入注册请求。511. The IoT gateway sends a device access registration request to the IoT platform.
具体而言,IoT网关故障修复后,开始接入IoT平台,发送设备接入注册请求给IoT平台, 该设备接入注册请求中携带IoT网关的设备标识和IoT网关的接入认证信息。Specifically, after the IoT gateway is faulty, the IoT platform is started to access the IoT platform, and the device access registration request is sent to the IoT platform. The device access registration request carries the device identifier of the IoT gateway and the access authentication information of the IoT gateway.
512、IoT平台向IoT网关发送设备接入注册响应。512. The IoT platform sends a device access registration response to the IoT gateway.
513、IoT平台向业务应用发送设备状态变化。513. The IoT platform sends a device state change to the service application.
具体而言,IoT平台收到设备接入注册请求后,检查设备标识及其对应的接入认证信息,如果检查通过,则返回设备计入注册成功响应。Specifically, after receiving the device access registration request, the IoT platform checks the device identifier and its corresponding access authentication information. If the check passes, the return device counts the registration success response.
同时,IoT平台设置IoT网关的状态为在线,并向通过IoT网关的设备标识找到绑定的业务应用,发送设备状态变化的消息。At the same time, the IoT platform sets the status of the IoT gateway to online, and finds the bound service application to the device identifier passing through the IoT gateway, and sends a message indicating that the device status changes.
514、IoT平台向IoT设备发送网关接入通知。514. The IoT platform sends a gateway access notification to the IoT device.
一个实施例中,IoT平台通过IoT网关的设备标识,查找到绑定的业务应用,检查该业务应用下是否有直连设备,且直连设备支持网关接入,如果有,则发送网关接入通知消息给对应的直连IoT设备。In one embodiment, the IoT platform searches for the bound service application through the device identifier of the IoT gateway, checks whether there is a direct connection device under the service application, and the directly connected device supports the gateway access, and if yes, sends the gateway access. The notification message is sent to the corresponding direct IoT device.
本发明实施例中的直连设备指通过IoT设备的接入认证信息接入IoT平台的设备。The direct connection device in the embodiment of the present invention refers to a device that accesses the IoT platform through the access authentication information of the IoT device.
另一实施例中,IoT平台判断IoT网关是否是当前某IoT设备连接过的网关,如果是,则发送网关接入通知消息给对应的直连IoT设备。In another embodiment, the IoT platform determines whether the IoT gateway is a gateway to which the current IoT device is connected, and if so, sends a gateway access notification message to the corresponding direct IoT device.
515、IoT设备识别接入模式为通过网关接入优先。515. The IoT device identifies the access mode as preferential access through the gateway.
516、IoT设备向IoT网关发送设备发现请求。516. The IoT device sends a device discovery request to the IoT gateway.
具体而言,IoT设备收到网关接入通知消息后,判断接入模式为通过IoT网关接入优先,则发起设备发现请求。Specifically, after receiving the gateway access notification message, the IoT device determines that the access mode is preferentially accessed through the IoT gateway, and then initiates a device discovery request.
517、IoT网关向IoT设备发送设备发现响应。517. The IoT gateway sends a device discovery response to the IoT device.
518、IoT设备向IoT网关发送设备接入请求。518. The IoT device sends a device access request to the IoT gateway.
具体而言,IoT设备收到设备发现响应后,发起设备接入请求,请求中携带IoT设备的设备标识、以及以下设备信息:生产厂商、设备类型、设备序列号、MAC地址等信息。Specifically, after receiving the device discovery response, the IoT device initiates a device access request, where the request carries the device identifier of the IoT device, and the following device information: manufacturer, device type, device serial number, MAC address, and the like.
519、IoT网关向IoT设备发送设备接入响应。519. The IoT gateway sends a device access response to the IoT device.
具体而言,IoT网关收到设备接入请求后,检查设备确实为曾经接入过的设备标识,且设备信息与之前接入设备信息一致,则返回设备接入响应。Specifically, after receiving the device access request, the IoT gateway checks whether the device is the device identifier that has been accessed, and the device information is consistent with the previous access device information, and then returns the device access response.
换句话说,IoT设备收到设备接入响应后,后续通过IoT网关上报数据或接收控制消息。In other words, after receiving the device access response, the IoT device subsequently reports data or receives a control message through the IoT gateway.
520、IoT网关向IoT平台发送设备状态变化。520. The IoT gateway sends a device state change to the IoT platform.
具体而言,IoT网关向IoT平台发送设备状态变化消息,请求中携带设备标识,设备状态为在线。Specifically, the IoT gateway sends a device status change message to the IoT platform, where the request carries the device identifier, and the device status is online.
521、IoT平台向业务应用发送设备状态变化。521. The IoT platform sends a device state change to the service application.
具体而言,IoT平台收到设备状态变化消息后,保存状态信息,并通过IoT设备的设备标识找到对应的业务应用,发送设备状态变化通知给业务应用。Specifically, after receiving the device status change message, the IoT platform saves the status information, and finds the corresponding service application through the device identifier of the IoT device, and sends the device status change notification to the service application.
由此,IoT设备收到设备接入响应消息后,即可通过图7所示的步骤522-步骤527上报设备数据、接收IoT平台下发的操作。Therefore, after receiving the device access response message, the IoT device can report the device data and receive the operation delivered by the IoT platform through step 522-step 527 shown in FIG.
具体而言,IoT设备检测到传感器数据后,发送设备数据上报消息给IoT网关,该设备数据上报消息中携带IoT设备的设备标识和传感器数据。IoT网关收到设备数据上报消息后,发送设备数据上报消息给IoT平台,该设备数据上报消息中携带IoT设备的设备标识和传感器数据。IoT平台收到设备数据上报消息后,保存设备数据信息,并通过IoT设备的设备标识找到IoT设备绑定的业务应用,并发送数据上报通知给业务应用。业务应用收到通知后,可以 在界面上呈现给用户。此时,业务应用发送设备操作请求给IoT平台。Specifically, after detecting the sensor data, the IoT device sends a device data report message to the IoT gateway, where the device data report message carries the device identifier and sensor data of the IoT device. After receiving the device data report message, the IoT gateway sends a device data report message to the IoT platform, where the device data report message carries the device identifier and sensor data of the IoT device. After receiving the device data report message, the IoT platform saves the device data information, and finds the service application bound by the IoT device through the device identifier of the IoT device, and sends a data report notification to the service application. After the business application receives the notification, it can be presented to the user on the interface. At this point, the business application sends a device operation request to the IoT platform.
这样,用户就可以通过业务应用控制IoT设备,执行IoT设备支持的操作。In this way, the user can control the IoT device through the business application and perform operations supported by the IoT device.
具体而言,IoT平台收到设备操作请求,检查业务应用的权限,根据IoT设备的设备标识,检查IoT设备最后变为在线状态是通过网关接入,找到对应的IoT网关,发送设备操作请求给IoT网关。IoT网关收到设备操作请求后,发送设备操作请求给IoT设备。IoT设备收到请求后,执行对应的操作请求。Specifically, the IoT platform receives the device operation request, checks the permission of the service application, and according to the device identifier of the IoT device, checks that the IoT device finally becomes online, accesses through the gateway, finds the corresponding IoT gateway, and sends the device operation request to IoT gateway. After receiving the device operation request, the IoT gateway sends a device operation request to the IoT device. After receiving the request, the IoT device performs the corresponding operation request.
上面结合附图2至7对IoT网关未发生故障时,以及发生故障时,IoT设备接入IoT平台的实现方式进行了说明,下面将结合图8介绍IoT设备掉电重启后,接入IoT平台的具体实现方式。The implementation of the IoT device accessing the IoT platform is described above with reference to FIGS. 2 to 7 in the case where the IoT gateway fails, and the IoT device is connected to the IoT platform. The specific implementation.
图8是本发明实施例的IoT网关接入IoT平台的方法600示意性流程图。FIG. 8 is a schematic flowchart of a method 600 for an IoT gateway to access an IoT platform according to an embodiment of the present invention.
如图8所示,该方法600包括:As shown in FIG. 8, the method 600 includes:
610、IoT网关已经成功接入IoT平台。IoT网关已经完成接入IoT平台过程。610. The IoT gateway has successfully accessed the IoT platform. The IoT gateway has completed the process of accessing the IoT platform.
611、IoT设备向IoT网关发送设备发现请求。具体地,IoT设备掉电重启后,IoT设备会启动设备发现过程,发送设备发现请求。611. The IoT device sends a device discovery request to the IoT gateway. Specifically, after the IoT device is powered off and restarted, the IoT device starts the device discovery process and sends a device discovery request.
612、IoT网关向IoT设备发送设备发现响应。具体地,IoT网关收到设备发现请求后,发送设备发现响应消息。612. The IoT gateway sends a device discovery response to the IoT device. Specifically, after receiving the device discovery request, the IoT gateway sends a device discovery response message.
613、IoT设备向IoT网关发送设备接入请求。具体地,IoT设备收到设备发现响应消息后,发送设备接入请求消息,请求中携带之前保存的IoT设备的设备标识,同时携带以下设备信息:设备的生产厂商、设备类型、设备序列号、设备MAC地址。613. The IoT device sends a device access request to the IoT gateway. Specifically, after receiving the device discovery response message, the IoT device sends a device access request message, where the request carries the device identifier of the previously saved IoT device, and carries the following device information: the manufacturer, device type, device serial number, Device MAC address.
614、IoT网关向IoT设备发送设备接入响应。具体地,IoT网关收到设备接入请求后,检查设备确实为曾经接入过的设备标识,且设备信息与之前接入设备信息一致,则返回设备接入响应。614. The IoT gateway sends a device access response to the IoT device. Specifically, after receiving the device access request, the IoT gateway checks that the device is the device identifier that has been accessed, and the device information is consistent with the previous access device information, and then returns the device access response.
615、IoT网关向IoT平台发送设备状态变化。具体地,IoT网关向IoT平台发送设备状态变化消息,请求中携带IoT设备的设备标识,IoT设备状态为在线。615. The IoT gateway sends a device state change to the IoT platform. Specifically, the IoT gateway sends a device status change message to the IoT platform, where the request carries the device identifier of the IoT device, and the IoT device status is online.
616、IoT平台向业务应用发送设备状态变化。具体地,IoT平台收到设备状态变化消息后,保存状态信息,并通过IoT设备的设备标识找到对应的业务应用,发送设备状态变化通知给业务应用。616. The IoT platform sends a device state change to the service application. Specifically, after receiving the device status change message, the IoT platform saves the status information, and finds the corresponding service application through the device identifier of the IoT device, and sends the device status change notification to the service application.
由此,IoT设备收到设备接入响应消息后,即可通过图8所示的步骤617-步骤622上报设备数据、接收IoT平台下发的操作。为避免重复,此处不再赘述。Therefore, after receiving the device access response message, the IoT device can report the device data and receive the operation delivered by the IoT platform through steps 617-622 of FIG. To avoid repetition, we will not repeat them here.
下面结合图9至图12对本发明实施例中的物联网平台和物联网设备进行描述。The Internet of Things platform and the Internet of Things device in the embodiments of the present invention are described below with reference to FIG. 9 to FIG.
图9是本发明实施例的IoT设备700的示意性框图。如图9所示,该IoT设备700包括:FIG. 9 is a schematic block diagram of an IoT device 700 in accordance with an embodiment of the present invention. As shown in FIG. 9, the IoT device 700 includes:
收发单元710,该收发单元710用于:The transceiver unit 710 is configured to:
向物联网IoT网关发送第一接入请求消息,该第一接入请求消息包括指示信息,该指示信息用于指示IoT设备具备通过接入认证信息接入该IoT平台的能力,以使得该IoT网关根据该第一接入请求消息向该IoT平台发送新设备发现请求消息,该新设备发现请求消息用于该IoT平台为该IoT设备分配设备标识和该IoT设备对应的第一接入认证信息;Sending a first access request message to the Internet of Things IoT gateway, where the first access request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by accessing the authentication information, so that the IoT The gateway sends a new device discovery request message to the IoT platform according to the first access request message, where the new device discovery request message is used by the IoT platform to allocate the device identifier and the first access authentication information corresponding to the IoT device to the IoT device. ;
通过IoT网关接收该IoT平台发送的允许新设备接入消息,该允许新设备接入消息包括该设备标识,以及对该第一接入认证信息进行加密处理后形成的加密信息;Receiving, by the IoT gateway, a new device access message sent by the IoT platform, where the new device access message includes the device identifier, and the encrypted information formed by performing encryption processing on the first access authentication information;
处理单元720,用于根据该允许新设备接入消息确定该设备标识和该第一接入认证信息;The processing unit 720 is configured to determine the device identifier and the first access authentication information according to the allow new device access message.
该收发单元710还用于:根据该设备标识,向该IoT网关上报数据。The transceiver unit 710 is further configured to: report data to the IoT gateway according to the device identifier.
可选地,在该IoT网关发生故障时,该收发单元710还用于:Optionally, when the IoT gateway fails, the transceiver unit 710 is further configured to:
向该IoT平台发送第二接入请求,该第二接入请求包括该设备标识和该第一接入认证信息;接收该IoT平台发送的该第二接入请求的响应消息。Sending a second access request to the IoT platform, where the second access request includes the device identifier and the first access authentication information, and receiving a response message of the second access request sent by the IoT platform.
可选地,该IoT设备向该IoT平台发送第二接入请求之前,该处理单元720还用于:Optionally, before the IoT device sends the second access request to the IoT platform, the processing unit 720 is further configured to:
保存该设备标识和该第一接入认证信息。The device identifier and the first access authentication information are saved.
可选地,该处理单元720还用于:Optionally, the processing unit 720 is further configured to:
确定该IoT网关的故障消除时,通过该IoT网关接入该IoT平台。When the fault of the IoT gateway is determined to be eliminated, the IoT platform is accessed through the IoT gateway.
可选地,该处理单元720具体用于:Optionally, the processing unit 720 is specifically configured to:
接收到该IoT平台发送的通知消息时,通过该IoT网关接入该IoT平台;其中,该通知消息用于通知该IoT设备该IoT网关成功接入该IoT平台。Receiving the notification message sent by the IoT platform, accessing the IoT platform by using the IoT gateway; wherein the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
可选地,该处理单元720具体用于:Optionally, the processing unit 720 is specifically configured to:
向该IoT网关发送设备发现请求消息;接收到该IoT网关发送的该设备发现请求消息的响应消息时,通过该IoT网关接入该IoT平台。Sending a device discovery request message to the IoT gateway; and receiving the response message of the device discovery request message sent by the IoT gateway, accessing the IoT platform through the IoT gateway.
可选地,该收发单元710具体用于:Optionally, the transceiver unit 710 is specifically configured to:
向该IoT网关发送第三接入请求消息,该第三接入请求消息包括该设备标识;接收该IoT网关发送的该第三接入请求消息的响应消息。Sending a third access request message to the IoT gateway, where the third access request message includes the device identifier, and receiving a response message of the third access request message sent by the IoT gateway.
可选地,该第一接入请求消息还包括以下信息:该IoT设备支持的加密算法和用于加密的随机数;Optionally, the first access request message further includes the following information: an encryption algorithm supported by the IoT device and a random number used for encryption;
其中,该处理单元720具体用于:The processing unit 720 is specifically configured to:
根据该随机数对该加密信息进行解密,确定该第一接入认证信息。Decrypting the encrypted information according to the random number to determine the first access authentication information.
应注意,本发明实施例中,收发单元710可以由收发器实现,处理单元720可以由处理器实现。如图10所示,物联网设备800可以包括处理器810、收发器820和存储器830。其中,存储器830可以用于存储指示信息,还可以用于存储处理器810执行的代码、指令等。物联网设备800中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。It should be noted that, in the embodiment of the present invention, the transceiver unit 710 may be implemented by a transceiver, and the processing unit 720 may be implemented by a processor. As shown in FIG. 10, the Internet of Things device 800 can include a processor 810, a
图10所示的物联网设备800能够实现前述图3至图8的方法实施例中由IoT设备执行的各个过程,为避免重复,这里不再赘述。The IoT device 800 shown in FIG. 10 can implement the various processes performed by the IoT device in the foregoing method embodiments of FIG. 3 to FIG. 8. To avoid repetition, details are not described herein again.
图11是本发明实施例的IoT平台900的示意性框图。如图11所示,该IoT平台900包括:11 is a schematic block diagram of an IoT platform 900 in accordance with an embodiment of the present invention. As shown in FIG. 11, the IoT platform 900 includes:
收发单元910,用于接收IoT网关发送的新设备发现请求消息,该新设备发现请求消息包括指示信息,该指示信息用于指示IoT设备具备通过接入认证信息接入该IoT平台的能力;The transceiver unit 910 is configured to receive a new device discovery request message sent by the IoT gateway, where the new device discovery request message includes indication information, where the indication information is used to indicate that the IoT device has the capability of accessing the IoT platform by using the access authentication information;
处理单元920,用于根据该新设备发现请求消息,为该IoT设备分配设备标识和该IoT设备对应的第一接入认证信息;The processing unit 920 is configured to allocate, according to the new device discovery request message, the device identifier and the first access authentication information corresponding to the IoT device to the IoT device;
该收发单元910还用于通过该IoT网关向该IoT设备发送允许新设备接入消息,该允许新设备接入消息包括该设备标识,以及对该第一接入认证信息加密后形成的加密信息。The transceiver unit 910 is further configured to send, by using the IoT gateway, a new device access message to the IoT device, where the allow new device access message includes the device identifier, and the encrypted information formed by encrypting the first access authentication information. .
可选地,该IoT平台通过该IoT网关向该IoT设备发送允许新设备接入消息之前,该处理单元920还用于:Optionally, before the IoT platform sends the IoT device to the IoT device to allow the new device to access the message, the processing unit 920 is further configured to:
保存该指示信息。Save the indication.
可选地,在该IoT网关发生故障时,该收发单元910还用于:Optionally, when the IoT gateway fails, the transceiver unit 910 is further configured to:
接收该IoT设备发送的第二接入请求,该第二接入请求包括该设备标识和该第一接入认证信息;向该IoT设备发送该第二接入请求的响应消息。Receiving a second access request sent by the IoT device, where the second access request includes the device identifier and the first access authentication information, and sending a response message of the second access request to the IoT device.
可选地,该IoT网关的故障消除时,该收发单元910还用于:Optionally, when the fault of the IoT gateway is eliminated, the transceiver unit 910 is further configured to:
向该IoT设备发送通知消息,该通知消息用于通知该IoT设备该IoT网关成功接入该IoT平台。Sending a notification message to the IoT device, the notification message is used to notify the IoT device that the IoT gateway successfully accesses the IoT platform.
可选地,该新设备发现请求消息还包括该IoT设备支持的加密算法和用于加密的随机数;其中,该处理单元920具体用于:Optionally, the new device discovery request message further includes an encryption algorithm supported by the IoT device and a random number used for encryption; wherein the processing unit 920 is specifically configured to:
通过该随机数对该第一接入认证信息进行加密,生成该加密信息;Encrypting the first access authentication information by using the random number to generate the encrypted information;
根据该加密信息和该设备标识,生成该允许新设备接入消息。The allowing new device access message is generated according to the encrypted information and the device identifier.
应注意,本发明实施例中,收发单元910可以由收发器实现,处理单元920可以由处理器实现。如图12所示,物联网设备1000可以包括处理器1010、收发器1020和存储器1030。其中,存储器1030可以用于存储指示信息,还可以用于存储处理器1010执行的代码、指令等。物联网设备1000中的各个组件通过总线系统相连,其中,总线系统除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。It should be noted that, in the embodiment of the present invention, the transceiver unit 910 may be implemented by a transceiver, and the processing unit 920 may be implemented by a processor. As shown in FIG. 12, the Internet of Things device 1000 can include a processor 1010, a
图12所示的物联网设备1000能够实现前述图3至图8的方法实施例中由IoT平台执行的各个过程,为避免重复,这里不再赘述。The IoT device 1000 shown in FIG. 12 can implement the various processes performed by the IoT platform in the foregoing method embodiments of FIG. 3 to FIG. 8. To avoid repetition, details are not described herein again.
应理解,在本发明实施例和所附权利要求书中使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本发明实施例。The terms used in the embodiments of the present invention and the appended claims are intended to be illustrative only and not to limit the embodiments of the invention.
例如,本发明实施例中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。具体地,A和/或B可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。For example, the term "and/or" in the embodiment of the present invention is merely an association relationship describing an associated object, indicating that there may be three relationships. Specifically, A and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone. In addition, the character "/" in this article generally indicates that the contextual object is an "or" relationship.
又例如,在本发明实施例和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。And "the" and "the"
又例如,在本发明实施例中可能采用术语第一、第二、第三等来描述各种消息、请求和终端,但这些消息、请求和终端不应限于这些术语。这些术语仅用来将消息、请求和终端彼此区分开。例如,在不脱离本发明实施例范围的情况下,第一接入请求消息也可以被称为第二接入请求消息,类似地,第二接入请求消息也可以被称为第一接入请求消息。For another example, the terms first, second, third, etc. may be used to describe various messages, requests, and terminals in embodiments of the present invention, but such messages, requests, and terminals should not be limited to these terms. These terms are only used to distinguish messages, requests, and terminals from one another. For example, the first access request message may also be referred to as a second access request message without departing from the scope of the embodiments of the present invention. Similarly, the second access request message may also be referred to as a first access. Request message.
又例如,取决于语境,如在此所使用的词语“如果”或“若”可以被解释成为“在……时”或“当……时”或“响应于确定”或“响应于检测”。类似地,取决于语境,短语“如果确定”或“如果检测(陈述的条件或事件)”可以被解释成为“当确定时”或“响应于确定”或“当检测(陈述的条件或事件)时”或“响应于检测(陈述的条件或事件)”。Also for example, depending on the context, the words "if" or "if" as used herein may be interpreted as "when" or "when" or "in response to determining" or "in response to detecting" ". Similarly, depending on the context, the phrase "if determined" or "if detected (conditions or events stated)" may be interpreted as "when determined" or "in response to determination" or "when detected (stated condition or event) "Time" or "in response to a test (condition or event stated)".
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本发明实施例的范围。Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the various examples described in connection with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the solution. A person skilled in the art can use different methods to implement the described functions for each particular application, but such implementation should not be considered to be beyond the scope of the embodiments of the invention.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。A person skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiment, and details are not described herein again.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the unit is only a logical function division. In actual implementation, there may be another division manner, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本发明实施例的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.
另外,在本发明实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in the embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本发明实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The functions may be stored in a computer readable storage medium if implemented in the form of a software functional unit and sold or used as a standalone product. Based on such understanding, the technical solution of the embodiments of the present invention, or the part contributing to the prior art or the part of the technical solution, may be embodied in the form of a software product stored in a storage medium. The instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present invention. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .
以上内容,仅为本发明实施例的具体实施方式,但本发明实施例的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明实施例揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明实施例的保护范围之内。因此,本发明实施例的保护范围应所述以权利要求的保护范围为准。The above is only a specific embodiment of the embodiments of the present invention, but the scope of protection of the embodiments of the present invention is not limited thereto, and any person skilled in the art can easily think of the technical scope disclosed in the embodiments of the present invention. Variations or substitutions are intended to be included within the scope of the embodiments of the invention. Therefore, the scope of protection of the embodiments of the present invention should be determined by the scope of the claims.
Claims (26)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710106440.9 | 2017-02-27 | ||
| CN201710106440.9A CN108512870B (en) | 2017-02-27 | 2017-02-27 | Method for accessing Internet of things platform, Internet of things platform and Internet of things equipment |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018153362A1 true WO2018153362A1 (en) | 2018-08-30 |
Family
ID=63252412
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/077166 Ceased WO2018153362A1 (en) | 2017-02-27 | 2018-02-24 | Method for accessing internet-of-things platform, internet-of-things platform, and internet-of-things device |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN108512870B (en) |
| WO (1) | WO2018153362A1 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110418366A (en) * | 2019-06-14 | 2019-11-05 | 武汉慧联无限科技有限公司 | A kind of failure reporting device and method |
| CN112443867A (en) * | 2019-08-29 | 2021-03-05 | 宁波方太厨具有限公司 | Indoor range hood remote control terminal binding method in centralized smoke exhaust system of building |
| CN114826742A (en) * | 2022-04-28 | 2022-07-29 | 江苏徐工工程机械研究院有限公司 | Communication safety system and authentication method for engineering machinery Internet of things sensing layer network |
| WO2024074066A1 (en) * | 2022-10-08 | 2024-04-11 | 华为云计算技术有限公司 | Internet-of-things device management method based on cloud computing technology, and platform |
| CN120018134A (en) * | 2025-04-15 | 2025-05-16 | 中国电信股份有限公司 | Authentication method, device and related equipment of Internet of Things equipment |
Families Citing this family (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109617902B (en) * | 2018-12-29 | 2022-03-18 | 东莞见达信息技术有限公司 | Equipment authentication method, method for establishing connection with gateway, and related equipment and system |
| CN109934589A (en) * | 2019-03-18 | 2019-06-25 | 农业部沼气科学研究所 | A network payment accounting transaction processing system and method based on the Internet of Things |
| CN111193323B (en) * | 2020-01-06 | 2023-08-11 | 山东电工电气集团新能科技有限公司 | Distribution network downlink equipment management device based on CAN bus |
| CN111542042B (en) * | 2020-05-08 | 2022-11-01 | 深圳市银河风云网络系统股份有限公司 | Automatic security authentication network access method for short-distance Internet of things |
| KR20230016652A (en) | 2020-05-27 | 2023-02-02 | 광동 오포 모바일 텔레커뮤니케이션즈 코포레이션 리미티드 | Information processing method and device, equipment, computer storage medium |
| CN111884864B (en) * | 2020-08-04 | 2023-04-18 | 北京立通智联科技有限公司 | Method and device for managing Internet of things equipment |
| CN112565334B (en) * | 2020-11-04 | 2022-10-25 | 深圳市宏电技术股份有限公司 | Access method and device of Internet of things equipment and MQTT gateway |
| CN112583796B (en) * | 2020-11-30 | 2022-07-08 | 国电南瑞科技股份有限公司 | Method and system for accessing terminal equipment to power Internet of things, Internet of things management platform and storage medium |
| CN113055449A (en) * | 2021-03-02 | 2021-06-29 | 福建钰辰微电子有限公司 | Wireless autonomous networking method and system for sensor based on Internet of things, and computer equipment |
| CN114598501B (en) * | 2022-02-11 | 2025-06-27 | 阿里云计算有限公司 | A data processing method and device based on the Internet of Things |
| CN116709498A (en) * | 2022-02-28 | 2023-09-05 | 华为技术有限公司 | Communication method and device |
| CN114697104A (en) * | 2022-03-28 | 2022-07-01 | 国网山东省电力公司信息通信公司 | Identification access method based on edge Internet of things agent data interaction terminal |
Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102088668A (en) * | 2011-03-10 | 2011-06-08 | 西安电子科技大学 | Group-based authentication method of machine type communication (MTC) devices |
| CN102137069A (en) * | 2010-01-27 | 2011-07-27 | 中兴通讯股份有限公司 | Method and system for realizing application of internet of things |
| US20130276144A1 (en) * | 2012-04-11 | 2013-10-17 | Intermec Ip Corp. | Wireless sensor field enumeration |
| US9054961B1 (en) * | 2014-09-08 | 2015-06-09 | Belkin International Inc. | Setup of multiple IOT devices |
| CN104967595A (en) * | 2014-10-31 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and apparatus for registering devices on Internet of things platform |
| WO2015174903A1 (en) * | 2014-05-16 | 2015-11-19 | Telefonaktiebolaget L M Ericsson (Publ) | Device authentication to capillary gateway |
| CN105142097A (en) * | 2015-08-18 | 2015-12-09 | 中国联合网络通信集团有限公司 | Method and system for realizing terminal access |
| CN105208132A (en) * | 2015-10-14 | 2015-12-30 | 成都中科创达软件有限公司 | Intelligent terminal cloud management system |
| CN105306560A (en) * | 2015-10-14 | 2016-02-03 | 成都中科创达软件有限公司 | Dynamic management platform for distributed terminal implementation |
| CN105471858A (en) * | 2015-11-20 | 2016-04-06 | 西安电子科技大学 | A cloud platform authentication system and method based on Internet of Things sensing devices |
| CN105721422A (en) * | 2014-12-18 | 2016-06-29 | 三星电子株式会社 | Method And Apparatus For Supporting Facility Control Of Terminal |
| US20160212099A1 (en) * | 2015-01-16 | 2016-07-21 | Zingbox, Ltd. | Private cloud control |
| EP3133514A1 (en) * | 2015-08-21 | 2017-02-22 | Samsung Electronics Co., Ltd. | Secure pairing of ehealth devices and authentication of data using a gateway device having secured area |
-
2017
- 2017-02-27 CN CN201710106440.9A patent/CN108512870B/en active Active
-
2018
- 2018-02-24 WO PCT/CN2018/077166 patent/WO2018153362A1/en not_active Ceased
Patent Citations (13)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102137069A (en) * | 2010-01-27 | 2011-07-27 | 中兴通讯股份有限公司 | Method and system for realizing application of internet of things |
| CN102088668A (en) * | 2011-03-10 | 2011-06-08 | 西安电子科技大学 | Group-based authentication method of machine type communication (MTC) devices |
| US20130276144A1 (en) * | 2012-04-11 | 2013-10-17 | Intermec Ip Corp. | Wireless sensor field enumeration |
| WO2015174903A1 (en) * | 2014-05-16 | 2015-11-19 | Telefonaktiebolaget L M Ericsson (Publ) | Device authentication to capillary gateway |
| US9054961B1 (en) * | 2014-09-08 | 2015-06-09 | Belkin International Inc. | Setup of multiple IOT devices |
| CN104967595A (en) * | 2014-10-31 | 2015-10-07 | 腾讯科技(深圳)有限公司 | Method and apparatus for registering devices on Internet of things platform |
| CN105721422A (en) * | 2014-12-18 | 2016-06-29 | 三星电子株式会社 | Method And Apparatus For Supporting Facility Control Of Terminal |
| US20160212099A1 (en) * | 2015-01-16 | 2016-07-21 | Zingbox, Ltd. | Private cloud control |
| CN105142097A (en) * | 2015-08-18 | 2015-12-09 | 中国联合网络通信集团有限公司 | Method and system for realizing terminal access |
| EP3133514A1 (en) * | 2015-08-21 | 2017-02-22 | Samsung Electronics Co., Ltd. | Secure pairing of ehealth devices and authentication of data using a gateway device having secured area |
| CN105306560A (en) * | 2015-10-14 | 2016-02-03 | 成都中科创达软件有限公司 | Dynamic management platform for distributed terminal implementation |
| CN105208132A (en) * | 2015-10-14 | 2015-12-30 | 成都中科创达软件有限公司 | Intelligent terminal cloud management system |
| CN105471858A (en) * | 2015-11-20 | 2016-04-06 | 西安电子科技大学 | A cloud platform authentication system and method based on Internet of Things sensing devices |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110418366A (en) * | 2019-06-14 | 2019-11-05 | 武汉慧联无限科技有限公司 | A kind of failure reporting device and method |
| CN112443867A (en) * | 2019-08-29 | 2021-03-05 | 宁波方太厨具有限公司 | Indoor range hood remote control terminal binding method in centralized smoke exhaust system of building |
| CN114826742A (en) * | 2022-04-28 | 2022-07-29 | 江苏徐工工程机械研究院有限公司 | Communication safety system and authentication method for engineering machinery Internet of things sensing layer network |
| CN114826742B (en) * | 2022-04-28 | 2023-07-28 | 江苏徐工工程机械研究院有限公司 | A communication security system and authentication method for construction machinery Internet of Things perception layer network |
| WO2024074066A1 (en) * | 2022-10-08 | 2024-04-11 | 华为云计算技术有限公司 | Internet-of-things device management method based on cloud computing technology, and platform |
| EP4589924A4 (en) * | 2022-10-08 | 2025-11-26 | Huawei Cloud Computing Tech Co Ltd | METHOD FOR MANAGING INTERNET OF THINGS DEVICES BASED ON CLOUD COMPUTING TECHNOLOGY AND PLATFORM |
| CN120018134A (en) * | 2025-04-15 | 2025-05-16 | 中国电信股份有限公司 | Authentication method, device and related equipment of Internet of Things equipment |
Also Published As
| Publication number | Publication date |
|---|---|
| CN108512870A (en) | 2018-09-07 |
| CN108512870B (en) | 2020-10-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018153362A1 (en) | Method for accessing internet-of-things platform, internet-of-things platform, and internet-of-things device | |
| JP6386069B2 (en) | Connection management method, apparatus, electronic equipment, program, and recording medium | |
| US11259178B2 (en) | Bluetooth mesh network provisioning authentication | |
| EP3378217B1 (en) | Cross-resource subscription for m2m service layer | |
| US9961553B2 (en) | Method, apparatus and system for network access | |
| JP6599341B2 (en) | Method, device and system for dynamic network access management | |
| KR102297889B1 (en) | Method and apparatus for wlan device pairing | |
| CN107517438B (en) | Method for requesting sharing of Bluetooth device, electronic device and computer storage medium | |
| JP6254747B2 (en) | Information providing method, apparatus, program, and recording medium | |
| WO2019144832A1 (en) | Device connection method, device and system | |
| WO2017148308A1 (en) | Method, apparatus and system for accessing network by internet-of-things device | |
| US11368994B1 (en) | Process for managing reconnections of devices in a network | |
| CN107948339B (en) | A network addressing method, device and device | |
| US20150326442A1 (en) | Method, node, and gateway for triggering networking | |
| CN110740460A (en) | device network access method, device, network device and storage medium | |
| CN1964262B (en) | Information processing system and method of assigning information processing device | |
| CN101291205A (en) | Backup data transmitting method, system, mirror-image server and customer terminal | |
| TW201434341A (en) | Redundant control of self-configuring wireless network | |
| CN110178345B (en) | Method and apparatus for providing an alternate link | |
| JP6447297B2 (en) | Communication method, information processing apparatus, and program | |
| WO2013174349A2 (en) | M2m gateway device and applying method thereof | |
| US20180054736A1 (en) | Communication apparatus, method for controlling the same, and program | |
| JP2019029016A (en) | Pairing method between IoT device and cloud service | |
| TWI271968B (en) | Network address translation router and related method | |
| US20150349877A1 (en) | Systems and methods for wireless data exchange without network connectivity |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18757177 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 18757177 Country of ref document: EP Kind code of ref document: A1 |