Equipment access method, equipment, readable storage medium and chip system

Through gateway devices, IoT devices are assisted to access the cloud service center, and using mapping information and software development toolkits, the problem of cumbersome access in the existing technology is solved, and efficient and low-cost device access is achieved.

CN120547149APending Publication Date: 2025-08-26HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410187766.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-19
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

The process of accessing existing IoT devices to the cloud service center is cumbersome and inefficient, and manufacturers are required to adapt firmware and protocols, which increases development difficulty and cost.

Method used

Scan the IoT device through the gateway device, obtain its device information and assist it in accessing the cloud service center, and use mapping information and software development toolkits to communicate, simplifying the device access process.

Benefits of technology

It improves the efficiency and compatibility of IoT device access to cloud service centers, reduces the development burden of equipment manufacturers, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120547149A_ABST
    Figure CN120547149A_ABST
Patent Text Reader

Abstract

The invention discloses a device access method and device, a readable storage medium and a chip system.The method comprises the steps that in response to a device scanning instruction received from an electronic device, IoT devices in a coverage range are scanned; responding to the scanned first IoT equipment in the first state, and acquiring registration information of the first IoT equipment according to equipment information of the first IoT equipment; sending a first access request to a cloud service center; the first access request comprises registration information of the first IoT device; in response to a first access response received from the cloud service center, sending a notification message to the electronic equipment; the first access response is used for indicating that the state of the first IoT device is updated to the second state. By adopting the method and the device, the efficiency of accessing the IoT equipment to the cloud service center can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet of Things technology, and in particular to a device access method, device, readable storage medium, and chip system. Background Art

[0002] With the rapid development of Internet of Things (IoT) technology, the types of IoT devices are gradually diversifying. By connecting IoT devices to cloud service centers, convenient management of IoT devices can be achieved. At present, the main way for IoT devices to connect to cloud service centers is through firmware adaptation and protocol adaptation of IoT devices. This device access method has certain requirements on the development capabilities of manufacturers providing IoT devices. IoT device manufacturers are required to complete adaptation based on the software development kit (SDK) provided by the cloud service center before IoT devices can successfully connect to the cloud service center. This makes the device access process cumbersome and the device access efficiency low. Therefore, how to improve the efficiency of IoT device access to cloud service centers is a technical issue worthy of study. Summary of the Invention

[0003] The embodiments of the present application provide a device access method, device, readable storage medium, and chip system, which are conducive to improving the efficiency of IoT device access to the cloud service center.

[0004] In a first aspect, the present application provides a device access method, which can be applied to a gateway device, including: in response to receiving a device scanning instruction from an electronic device, scanning IoT devices within a coverage area; in response to scanning a first IoT device in a first state, obtaining registration information of the first IoT device based on the device information of the first IoT device; the first state is used to indicate that the first IoT device is not connected to the cloud service center; sending a first access request to the cloud service center; the first access request includes the registration information of the first IoT device; in response to receiving a first access response from the cloud service center, sending a notification message to the electronic device, the notification message including the device identification of the first IoT device; the notification message is used to notify the electronic device to display the device identification of the first IoT device; the first access response is used to indicate that the state of the first IoT device is updated to a second state; the second state is used to indicate that the first IoT device has been connected to the cloud service center.

[0005] In the above embodiment, the IoT device does not need to be adapted based on the software development kit provided by the cloud service center. Instead, the gateway device scans the IoT device, obtains the registration information of the IoT device based on the device information of the IoT device, and then assists the IoT device to quickly access the cloud service center based on the registration information of the IoT device. This is conducive to improving the efficiency of IoT devices accessing the cloud service center.

[0006] In conjunction with the first aspect, in one possible embodiment, obtaining the registration information of the first IoT device based on the device information of the first IoT device includes: in response to the first mapping information including the device information of the first IoT device, obtaining the registration information of the first IoT device based on the device information of the first IoT device and the first mapping information; the first mapping information includes a mapping relationship between the device information of N IoT devices and the registration information of the N IoT devices; N is a positive integer. As can be seen, the gateway device can store the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device, so that the gateway device can more quickly obtain the registration information of the first IoT device.

[0007] In conjunction with the first aspect, in one possible embodiment, the method further includes: in response to the first mapping information not including the device information of the first IoT device, sending a registration query request to the cloud service center; the registration query request includes the device information of the first IoT device; and receiving a registration query response from the cloud service center; the registration query response includes the registration information of the first IoT device. This indicates that the gateway device can query the cloud service center to obtain the registration information of the first IoT device without requiring the IoT device to directly adapt to the communication protocol of the cloud service center. This helps simplify the process of IoT devices connecting to the cloud service center.

[0008] In conjunction with the first aspect, in one possible embodiment, the method further includes: updating the first mapping information based on the device information of the first IoT device and the registration information of the first IoT device to obtain the second mapping information. Thus, the gateway device can update the first mapping information so that the registration information of the first IoT device can be quickly obtained later.

[0009] In conjunction with the first aspect, in one possible embodiment, the registration query response may include a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device. The method further includes: updating the first mapping information based on the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device to obtain second mapping information. It can be seen that the gateway device may also directly update the first mapping information based on the mapping relationship between the device information of an IoT device and the registration information of the first IoT device, thereby improving the efficiency of the gateway device in updating the first mapping information.

[0010] In conjunction with the first aspect, in one possible embodiment, the gateway device includes an information management module and an information storage module; the information storage module stores first mapping information; and updating the first mapping information based on the device information of the first IoT device and the registration information of the first IoT device to obtain the second mapping information includes: calling the information management module to obtain the first mapping information from the information storage module, and calling the information management module to obtain the device information of the first IoT device and the registration information of the first IoT device; calling the information management module to update the first mapping information based on the device information of the first IoT device and the registration information of the first IoT device to obtain the second mapping information; and calling the information storage module to obtain the second mapping information from the information management module. It can be seen that storing the second mapping information in the information storage module facilitates the subsequent rapid acquisition of the registration information of other IoT devices.

[0011] In conjunction with the first aspect, in one possible implementation, the gateway device further includes a software development kit (SDK) configured to enable communication between the gateway device and a cloud service center. Sending a registration query request to the cloud service center includes invoking the SDK to send the registration query request to the cloud service center. This allows the gateway device to exchange information with the cloud service center via the SDK, eliminating the need for IoT devices to adapt to the cloud service center's communication protocol, thus reducing the time it takes for IoT devices to connect to the cloud service center.

[0012] In conjunction with the first aspect, in one possible embodiment, the method further includes: in response to the first mapping information not including the device information of the first IoT device, sending a mapping relationship query request to the cloud service center; the mapping relationship query request is used to request second mapping information; the second mapping information includes a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device; receiving a mapping relationship query response from the cloud service center; the mapping relationship query response includes the second mapping information; and obtaining the registration information of the first IoT device based on the device information of the first IoT device and the second mapping information. It can be seen that the gateway device can request new mapping information from the cloud service center, and the new mapping information can store the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device, so that the gateway device can obtain the registration information of the first IoT device based on the mapping information of the information.

[0013] In conjunction with the first aspect, in one possible embodiment, the method further includes: receiving a first control instruction from an electronic device, and controlling the first IoT device according to the first control instruction. Thus, remote control of IoT devices can be achieved through a gateway device.

[0014] On the second aspect, the present application provides another device access method, which can be applied to an electronic device, the electronic device including a device management application, the method including: generating a device scanning instruction in response to receiving a trigger operation for a device scanning control in the interface of the device management application; sending a device scanning instruction to a gateway device; the device scanning instruction is used to instruct the gateway device to scan IoT devices within the coverage area; receiving a notification message from the gateway device, the notification message including a device identification of a first IoT device; in response to the notification message, displaying the device identification of the first IoT device in the interface of the device management application; the first IoT device has been connected to the cloud service center.

[0015] In the above embodiment, the electronic device can trigger the gateway device to scan for IoT devices within its coverage area. After the gateway device assists the first IoT device in connecting to the cloud service center, the electronic device can display the device identifier of the first IoT device to the user. This approach allows IoT devices from any manufacturer to connect to the cloud service center, improving the versatility and compatibility of device access.

[0016] In conjunction with the second aspect, in one possible embodiment, the method further includes: generating a first control instruction in response to receiving a trigger operation for a first control control in the interface of the device management application; and sending the first control instruction to a gateway device; wherein the first control instruction is used to control the first IoT device. Thus, remote control of IoT devices can be achieved by sending control instructions to the gateway device.

[0017] On the third aspect, the present application provides another device access method, which can be applied to a cloud service center, including: receiving a first access request from a gateway device; the first access request includes registration information of a first IoT device in a first state; the first state is used to indicate that the first IoT device has not connected to the cloud service center; according to the registration information of the first IoT device, allowing the first IoT device to access, and updating the state of the first IoT device to a second state; the second state is used to indicate that the first IoT device has connected to the cloud service center; sending a first access response to the gateway device; the first access response is used to indicate that the state of the first IoT device is updated to the second state.

[0018] In the above embodiment, the cloud service center can allow the first IoT device to access based on the registration information of the first IoT device without the need for the first IoT device to perform firmware adaptation or communication protocol adaptation, which helps the IoT device to access the cloud service center more conveniently and improves the efficiency of IoT devices accessing the cloud service center.

[0019] In conjunction with the third aspect, in one possible embodiment, the method further includes: receiving a registration query request from a gateway device; the registration query request includes device information of the first IoT device; and sending a registration query response to the gateway device based on the device information of the first IoT device; the registration query response includes the registration information of the first IoT device. This indicates that the gateway device can query the cloud service center to obtain the registration information of the first IoT device without requiring the IoT device to directly adapt to the cloud service center's communication protocol, thereby simplifying the process of IoT devices connecting to the cloud service center.

[0020] In conjunction with the third aspect, in one possible embodiment, the method further includes: receiving a mapping relationship query request from a gateway device; the mapping relationship query request is used to request second mapping information; the second mapping information includes a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device; and sending a mapping relationship query response to the gateway device; the mapping relationship query response includes the second mapping information. It can be seen that the cloud service center can provide new mapping information to the gateway device, and the new mapping information can store the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device, so that the gateway device can obtain the registration information of the first IoT device based on the mapping information.

[0021] In a fourth aspect, the present application provides a gateway device, which includes a memory and one or more processors; the memory is coupled to the one or more processors for storing a computer program, the computer program including program instructions; the one or more processors call the program instructions so that the gateway device executes: in response to receiving a device scanning instruction from an electronic device, scanning IoT devices within the coverage area; in response to scanning a first IoT device in a first state, obtaining registration information of the first IoT device based on the device information of the first IoT device; the first state is used to indicate that the first IoT device is not connected to the cloud service center; sending a first access request to the cloud service center; the first access request includes the registration information of the first IoT device; in response to receiving a first access response from the cloud service center, sending a notification message to the electronic device, the notification message including the device identification of the first IoT device; the notification message is used to notify the electronic device to display the device identification of the first IoT device; the first access response is used to indicate that the state of the first IoT device is updated to the second state; the second state is used to indicate that the first IoT device has been connected to the cloud service center.

[0022] In combination with the fourth aspect, in one possible manner, the one or more processors call the computer instructions to cause the gateway device to execute: in response to the first mapping information including the device information of the first IoT device, obtaining the registration information of the first IoT device according to the device information of the first IoT device and the first mapping information; the first mapping information includes a mapping relationship between the device information of N IoT devices and the registration information of N IoT devices; N is a positive integer.

[0023] In combination with the fourth aspect, in one possible manner, the one or more processors call the computer instructions to cause the gateway device to execute: in response to the first mapping information not including the device information of the first IoT device, sending a registration query request to the cloud service center; the registration query request includes the device information of the first IoT device; receiving a registration query response from the cloud service center; the registration query response includes the registration information of the first IoT device.

[0024] In combination with the fourth aspect, in one possible manner, the one or more processors call the computer instructions to enable the gateway device to execute: updating the first mapping information according to the device information of the first IoT device and the registration information of the first IoT device to obtain the second mapping information.

[0025] In combination with the fourth aspect, in one possible manner, the registration query response may include a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device, and the one or more processors call the computer instructions to enable the gateway device to execute: according to the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device, update the first mapping information to obtain the second mapping information.

[0026] In combination with the fourth aspect, in one possible manner, the gateway device includes an information management module and an information storage module; the information storage module stores first mapping information; the one or more processors call the computer instructions to cause the gateway device to execute: calling the information management module to obtain the first mapping information from the information storage module, and calling the information management module to obtain the device information of the first IoT device and the registration information of the first IoT device; calling the information management module to update the first mapping information according to the device information of the first IoT device and the registration information of the first IoT device to obtain the second mapping information; calling the information storage module to obtain the second mapping information from the information management module.

[0027] In combination with the fourth aspect, in one possible embodiment, the gateway device also includes a software development kit, which is used for the gateway device to communicate with the cloud service center; the one or more processors call the computer instructions to enable the gateway device to execute: calling the software development kit to send a registration query request to the cloud service center.

[0028] In combination with the fourth aspect, in one possible manner, the one or more processors call the computer instructions to cause the gateway device to execute: in response to the first mapping information not including the device information of the first IoT device, sending a mapping relationship query request to the cloud service center; the mapping relationship query request is used to request second mapping information; the second mapping information includes a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device; receiving a mapping relationship query response from the cloud service center; the mapping relationship query response includes the second mapping information; and obtaining the registration information of the first IoT device based on the device information of the first IoT device and the second mapping information.

[0029] In combination with the fourth aspect, in one possible manner, the one or more processors call the computer instruction to cause the gateway device to execute: receiving a first control instruction from an electronic device, and controlling the first IoT device according to the first control instruction.

[0030] In a fifth aspect, the present application provides an electronic device, which includes: one or more processors, a display screen and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute: in response to receiving a trigger operation for a device scanning control in the interface of a device management application, generate a device scanning instruction; send a device scanning instruction to a gateway device; the device scanning instruction is used to instruct the gateway device to scan IoT devices within the coverage area; receive a notification message from the gateway device, the notification message includes a device identification of a first IoT device; in response to the notification message, display the device identification of the first IoT device in the interface of the device management application; the first IoT device has been connected to the cloud service center.

[0031] In combination with the fifth aspect, in one possible manner, the one or more processors call the computer instructions to cause the electronic device to execute: in response to receiving a trigger operation for a first control control in the interface of the device management application, generate a first control instruction; send the first control instruction to the gateway device; the first control instruction is used to control the first IoT device.

[0032] In a sixth aspect, the present application provides a cloud service center, which includes: one or more processors, a display screen and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the cloud service center to execute: receiving a first access request from a gateway device; the first access request includes registration information of a first IoT device in a first state; the first state is used to indicate that the first IoT device has not connected to the cloud service center; according to the registration information of the first IoT device, the first IoT device is allowed to access, and the state of the first IoT device is updated to a second state; the second state is used to indicate that the first IoT device has connected to the cloud service center; sending a first access response to the gateway device; the first access response is used to indicate that the state of the first IoT device is updated to the second state.

[0033] In combination with the sixth aspect, in one possible manner, the one or more processors call the computer instructions to cause the cloud service center to execute: receiving a registration query request from a gateway device; the registration query request includes device information of the first IoT device; sending a registration query response to the gateway device based on the device information of the first IoT device; the registration query response includes the registration information of the first IoT device.

[0034] In combination with the sixth aspect, in one possible manner, the one or more processors call the computer instructions to cause the cloud service center to execute: receiving a mapping relationship query request from a gateway device; the mapping relationship query request is used to request second mapping information; the second mapping information includes a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device; sending a mapping relationship query response to the gateway device; the mapping relationship query response includes the second mapping information.

[0035] In the seventh aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in the first aspect above, or implements the method described in the second aspect above, or implements the method described in the third aspect above.

[0036] In an eighth aspect, the present application provides a chip system coupled to a memory, and the chip system is used to read and execute a computer program stored in the memory to implement the method described in the first aspect above, or to implement the method described in the second aspect above, or to implement the method described in the third aspect above.

[0037] In a ninth aspect, the present application provides a computer program product comprising instructions, which, when run on an electronic device, enables the electronic device to execute the method as described in the first aspect, or the method as described in the second aspect, or the method as described in the third aspect.

[0038] In the tenth aspect, the present application provides a device access system, which includes a gateway device, an electronic device, and a cloud service center. The gateway device is used to execute the method described in the first aspect above, the electronic device is used to execute the method described in the second aspect above, and the cloud service center is used to execute the method described in the third aspect above. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a schematic diagram of the system architecture applied to the embodiment of the present application;

[0040] Figure 2A This is a schematic diagram of the hardware structure of a gateway device provided in an embodiment of the present application;

[0041] Figure 2B This is a schematic diagram of the functional module structure of a gateway device provided in an embodiment of the present application;

[0042] Figure 2C This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0043] Figure 3 This is a flow chart of a device access method provided in an embodiment of the present application;

[0044] Figure 4A This is a schematic diagram of an interface for binding a device management application to a gateway device provided in an embodiment of the present application;

[0045] Figure 4B This is a schematic diagram of a gateway device setting interface provided in an embodiment of the present application;

[0046] Figure 4C and Figure 4D This is a schematic diagram of the interface for scanning IoT devices using a device management application according to an embodiment of the present application;

[0047] Figure 5 This is a schematic diagram of a gateway device updating first mapping information provided by an embodiment of the present application;

[0048] Figure 6 This is a schematic diagram of a process for configuring device information of an IoT device provided in an embodiment of the present application;

[0049] Figure 7 This is a schematic diagram of a configuration interface of a developer platform provided in an embodiment of the present application;

[0050] Figure 8A This is a schematic diagram of an interface of a device management application provided in an embodiment of the present application;

[0051] Figure 8B This is a schematic diagram of an interface of another device management application provided in an embodiment of the present application;

[0052] Figure 9 This is a schematic diagram of a process for an electronic device to display a device identification of a first IoT device provided by an embodiment of the present application;

[0053] Figure 10 This is a flow chart of another device access method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0054] The following is a clear and detailed description of the technical solutions in the embodiments of the present application, with reference to the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents the meaning of "or." For example, A / B can represent A or B. "and / or" in the text is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone.

[0055] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0056] References to "one embodiment" or "some embodiments" in this application mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this application do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0057] First, the system architecture used in the embodiments of the present application is introduced.

[0058] See Figure 1 , Figure 1 This is a schematic diagram of the system architecture used in the embodiment of this application. Figure 1As shown, the system architecture may include a cloud service center 111, an electronic device 112, an IoT device 113, and a gateway device 114. It is understood that Figure 1 The number and form of the devices shown are for example only and do not constitute a limitation on the embodiments of the present application. In actual applications, different Figure 1 The number of devices shown may include, for example, two or more IoT devices. Figure 1 The system architecture shown includes one IoT device as an example.

[0059] The cloud service center 111 may also be referred to as an IoT cloud, smart home cloud, cloud platform, cloud or device cloud, etc. The cloud service center may be used to store relevant data of the IoT device 113 and the gateway device 114. The electronic device 112 may be a mobile phone, tablet computer, laptop computer, personal computer, ultra-mobile personal computer, netbook, personal digital assistant, etc., which is not limited in the embodiments of the present application. The relevant data of the IoT device 113 may be viewed through the electronic device 112, and control instructions may be issued to the IoT device 113. The IoT device 113 may also be referred to as a sub-device, which may be a smart home device, such as a smart desk lamp, smart camera, smart door lock, smart socket strip or smart switch, etc. It may also be an in-vehicle device, wearable device, augmented reality (AR) / virtual reality (VR) device or other smart device. The embodiments of the present application do not limit the specific type of the IoT device 113. The gateway device 114 is a hardware device that connects the IoT device and the cloud service center, and may be used to implement data interaction between the IoT device and the cloud service center. Optionally, the gateway device and the IoT device 113 can be deployed in the same space, such as in the same room, or on the same floor, or in the same building, etc.

[0060] Currently, the cloud service center 111 can support the access of a large number of IoT devices. After the IoT devices are connected to the cloud service center, not only can the data of the IoT devices be managed through the cloud service center 111, but also the remote control of the IoT devices can be achieved. Figure 1Taking the IoT device 113 shown as an example, the existing device access solution requires the IoT device 113 to complete firmware adaptation and protocol adaptation based on the SDK provided by the cloud service center 111 before it can access the cloud service center. This device access method has the following shortcomings: ① The properties and parameters of each IoT device connected to the cloud service center must be defined separately. If the number of IoT devices is too large, the complexity of device access will increase; ② There are certain requirements for the development capabilities of IoT device manufacturers. Manufacturers need to adapt IoT devices based on the SDK provided by the cloud service center, making the operation process cumbersome; ③ IoT devices need to be equipped with a wireless communication module (such as a Bluetooth module or a wireless fidelity (WiFi) module) to adapt to the communication protocol of the cloud service center, which makes the production cost of IoT devices high.

[0061] Based on this, the embodiment of the present application provides a device access method that can improve the versatility and compatibility of IoT devices accessing the cloud service center, which is conducive to improving device access efficiency.

[0062] In an embodiment of the present application, the IoT device 113 does not need to be adapted based on the SDK provided by the cloud service center. The gateway device 114 can assist the IoT device in quickly accessing the cloud service center. Specifically, the IoT device can be located within the coverage area of ​​the gateway device 114, and the gateway device 114 can establish communication connections with the cloud service center 111, the electronic device 112, and the IoT device 113. The electronic device 112 can receive a device scan command triggered by the user and send the device scan command to the gateway device 114. In response to receiving the device scan command from the electronic device 112, the gateway device 114 can scan for IoT devices within the coverage area. In response to scanning an IoT device 113 (such as a smart desk lamp) that is not connected to the cloud service center 111, the gateway device 114 can obtain the registration information of the IoT device based on the device information of the IoT device 113. The gateway device 114 can then send a first access request to the cloud service center 111. The first access request can include the registration information of the IoT device 113. Based on the registration information of the IoT device 113, the cloud service center 111 can allow the IoT device to access.

[0063] The structures of the gateway device and the electronic device in this application are introduced below.

[0064] For example, see Figure 2A , Figure 2A This is a hardware structure diagram of a gateway device provided in an embodiment of the present application. Figure 2A As shown, the gateway device may include: a processor 101 , a memory 102 , a wireless communication module 103 , an antenna 104 , a network port 105 and a power module 106 .

[0065] The processor 101 may include one or more processing units, such as a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processor (DSP), a microprocessor (MCU), an artificial intelligence (AI) processor, or a processing module or processing circuit such as a programmable logic device (FPGA). Different processing units may be independent devices or integrated into one or more processors.

[0066] Memory 102 is used to store instructions and data. In some embodiments, memory 102 may be non-volatile memory, random access memory, flash memory, or read-only memory, but this embodiment of the present application is not limited thereto. In this embodiment of the present application, memory 102 may be used to store parameters related to IoT devices or cloud service centers, such as a mapping between device information of an IoT device and its registration information.

[0067] The wireless communication module 103 can be configured to communicate via a wireless local area network standard such as a WiFi network. The wireless communication module 103 can be one or more devices that integrate at least one communication processing module. The wireless communication module 103 can receive electromagnetic waves via the antenna 104, frequency modulate and filter the electromagnetic wave signals, and send the processed signals to the processor 101. The wireless communication module 103 can also receive signals to be sent from the processor 101, frequency modulate and amplify them, and convert them into electromagnetic waves for radiation through the antenna 104. The wireless communication module 103 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth (BT), near field communication technology (NFC), infrared technology (IR), etc. applied to gateway devices.

[0068] The network port 105 may include a wired network interface that can be configured to couple to the Internet via a wired network such as broadband, and can provide Internet access to multiple electronic devices. The network port 105 may also include a mobile communication module (not shown) that can be configured to connect to a core network via wireless communication technology.

[0069] The power module 106 may include a power supply, a power management component, etc. The power management component is used to manage the charging of the power supply and the supply of power to other modules.

[0070] It should be understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the gateway device. In other embodiments of this application, the gateway device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0071] For example, see Figure 2B , Figure 2B This is a schematic diagram of the functional module structure of a gateway device provided in an embodiment of the present application. Figure 2B As shown, the gateway device may include: a device discovery module, a device registration module, a device networking module, a device control module, a device upgrade module, a device information management module, and a gateway protocol management module.

[0072] The device discovery module can be used by the gateway device to scan and discover IoT devices, and can provide the protocol for IoT device discovery of third-party manufacturers. Specifically, it may include: an active discovery submodule, a passive discovery submodule, and a new device reporting submodule. Among them, the active discovery module can be used by the gateway device to actively initiate a scan of IoT devices within the coverage area, such as active discovery through periodic scanning. The passive discovery module can be used by the gateway device to scan IoT devices within the coverage area in response to a device scan instruction from an electronic device (such as a mobile phone). The new device reporting module can be used by the gateway device to receive a notification message from the IoT device, which is used to notify the gateway device that the IoT device is within its coverage area.

[0073] The device registration module allows gateway devices to register or delete the network addresses of IoT devices. Specifically, it includes a registration submodule, a deletion submodule, and a factory reset submodule. The registration submodule allows gateway devices to register the network addresses of IoT devices, the deletion submodule allows gateway devices to delete the network addresses of specific IoT devices, and the factory reset submodule allows gateway devices to restore factory settings and delete the network addresses of all saved IoT devices.

[0074] The device networking module allows gateway devices to connect to IoT devices using any possible communication protocol. Specifically, it includes a device connection submodule, a device disconnection submodule, and an authentication credential (authcode) management submodule. The device connection submodule allows the gateway device to establish a connection with a scanned IoT device. The device disconnection submodule allows the gateway device to disconnect from an established IoT device. The authcode management submodule allows the gateway device to store the authcodes of IoT devices.

[0075] The device control module allows gateway devices to control IoT devices. Specifically, it includes a control submodule, a status reporting submodule, and an event reporting submodule. The control submodule allows the gateway device to receive control commands for IoT devices. The status reporting submodule allows the gateway device to report IoT device status information to the cloud service center. The event reporting submodule allows the gateway device to report IoT device-related events to the cloud service center.

[0076] The device upgrade module can be used to provide an over-the-air (OTA) upgrade solution for IoT devices. It can include an automatic upgrade submodule and a manual upgrade submodule. The automatic upgrade submodule can be used to automatically detect whether an IoT device is to be upgraded. The manual upgrade submodule can be used to upgrade the IoT device in response to an upgrade instruction.

[0077] The device information management module can be used by the gateway device to manage the mapping relationship between the device information of the IoT device and the registration information of the IoT device.

[0078] The gateway protocol management module can be used to manage the communication protocol for interaction between the gateway device and the IoT device.

[0079] It can be understood that the above-mentioned functional modules are merely exemplary and do not constitute a specific limitation on the network device architecture of the present application. In other embodiments, the above-mentioned architecture may include more or fewer functional modules, and the present application does not impose any limitation on this.

[0080] For example, see Figure 2C , Figure 2C This is a hardware structure diagram of an electronic device provided in an embodiment of the present application. Figure 2CAs shown, the electronic device includes: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0081] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP) 110A, a modem processor 110B, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0082] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor.

[0083] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to electronic devices. The wireless communication module 160 can provide solutions for wireless communications including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc. applied to electronic devices. In an embodiment of the present application, the wireless communication module 160 can be used to send device scanning instructions to a gateway device, and can also be used to receive notification messages from a gateway device.

[0084] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (AMOLED), a flexible light emitting diode (FLED), Miniled, MicroLed, MicrooLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1. In the embodiment of the present application, the display screen 194 can be used to display the following Figures 4A-4D The interface shown, or it can also be used to display Figure 8A and Figure 8B The interface shown.

[0085] It is understood that the structures illustrated in the embodiments of the present application do not constitute specific limitations on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0086] The following is an introduction to the device access method of the embodiment of the present application.

[0087] See Figure 3 , Figure 3 This is a flow chart of a device access method provided by an embodiment of the present application. Figure 3 As shown, the method may include but is not limited to the following steps:

[0088] S301: The electronic device generates a device scanning instruction in response to receiving a trigger operation for a device scanning control in an interface of a device management application.

[0089] An electronic device may include a device management application that can be used to manage and control at least one IoT device. The interface of the device management application may include a device scan control. In response to receiving a trigger operation for the device scan control in the interface of the device management application, the electronic device may generate a device scan instruction. Optionally, the trigger operation for the device scan control may be a single-click operation or a double-click operation for the device scan control.

[0090] In some embodiments, the device management application can also be used to manage the gateway device, and the gateway device can be bound through the device management application. Here, the binding of the gateway device can be understood as binding the account information of the device management application to the gateway device. For example, see Figure 4A , Figure 4A This is a schematic diagram of an interface for binding a device management application to a gateway device provided by an embodiment of the present application. Figure 4A As shown, the interface 41 of the device management application may include a bind gateway device control 411. In response to a triggering operation on the bind gateway device control 411, the electronic device may establish a first binding relationship, which is a binding relationship between the gateway device and the account information currently logged into the device management application. Optionally, if there is an IoT device connected to the cloud service center under the gateway device, the IoT device connected to the cloud service center may be automatically bound to the current account.

[0091] After binding the gateway device, you can use the device management application to control the gateway device to scan IoT devices.

[0092] Optionally, the device management application can display a gateway device setting interface, and the gateway device setting interface can display a device scanning control, which can be used to control the gateway device to scan IoT devices within the coverage area. For example, see Figure 4B , Figure 4B This is a schematic diagram of the gateway device setting interface provided by the embodiment of the present application. Figure 4BAs shown, the gateway device settings interface 42 can display some basic information about the gateway device, such as the gateway device's uplink and downlink speeds and the gateway device's current network environment assessment. In addition, the gateway device settings interface 42 can include an Internet access settings control and a device scanning control 421. By triggering the Internet access settings control, the electronic device's Internet access time period and duration can be set. By triggering the device scanning control 421, the electronic device can be triggered to generate a device scanning instruction, which can then control the gateway device to scan for IoT devices within its coverage area.

[0093] Optionally, the home page of the device management application can also display a device scanning control. For example, see Figure 4C and Figure 4D , Figure 4C and Figure 4D This is a schematic diagram of an interface for scanning IoT devices using a device management application provided in an embodiment of the present application. Figure 4C As shown, the interface 43 of the device management application may include a device scanning control 431. When the electronic device detects a trigger operation for the device scanning control 431, a device scanning instruction may be generated and displayed. Figure 4D Interface 44 is shown.

[0094] In some embodiments, the electronic device may also periodically automatically generate a device scan command, for example, every five minutes. In other words, in this case, the electronic device may periodically generate a device scan command without the user having to trigger the device scan control, so that new IoT devices can be detected in a timely manner.

[0095] In some embodiments, when an IoT device moves from outside the coverage area of ​​a gateway device to within its coverage area, it can proactively send an access message to the gateway device. In other words, in this case, the electronic device may not generate a device scan instruction, but instead discover new IoT devices based on the access message reported by the IoT device. In response to receiving the access message from the IoT device, the gateway device may send a response message to the IoT device, which may indicate that the IoT device is allowed to access.

[0096] In some embodiments, the device management application can be used to set the mode of the gateway device to discovery mode or non-discovery mode. When the mode of the gateway device is set to discovery mode, the gateway device can scan IoT devices within the coverage area after receiving a scan instruction from an electronic device, or periodically and actively scan IoT devices within the coverage area, or receive access requests from IoT devices. When the mode of the gateway device is set to non-discovery mode, the gateway device will block scan instructions from electronic devices, or block access messages from IoT devices. In addition, the gateway device will not actively scan IoT devices within the coverage area.

[0097] S302: The electronic device sends a device scanning instruction to the gateway device. Correspondingly, the gateway device receives the device scanning instruction from the electronic device.

[0098] S303: In response to receiving the device scanning instruction from the electronic device, the gateway device scans the IoT devices within the coverage area.

[0099] Optionally, the gateway device can scan IoT devices within the coverage range based on the Bluetooth protocol, scan IoT devices within the coverage range based on the WiFi protocol, or scan IoT devices within the coverage range based on the CoAP protocol (an application layer protocol designed specifically for IoT devices in restricted environments).

[0100] In some embodiments, a gateway device may scan for IoT devices within its coverage area by broadcasting a scan request message to at least one IoT device, where the scan message may include the gateway device's network address. Upon receiving the scan message, the at least one IoT device may determine, based on the device's state, whether to send a scan response message to the gateway device. If the IoT device is to send a scan response message to the gateway device, the scan response message may be sent to the gateway device based on the gateway device's network address.

[0101] In some embodiments, the gateway device and the IoT device may be connected via a wired connection, such as a universal serial bus (USB) interface. If the gateway device detects that it is in a wired connection with an IoT device, it may be considered that the IoT device has been scanned.

[0102] S304 : In response to scanning a first IoT device in a first state, the gateway device obtains registration information of the first IoT device according to device information of the first IoT device.

[0103] The first state can be used to indicate that the first IoT device has not been connected to the cloud service center. The fact that the first IoT device has not been connected to the cloud service center can also be described as the fact that the first IoT device has not logged in to the cloud service center. That is to say, if the gateway device scans the first IoT device that has not been connected to the cloud service center, step S304 can be executed. The registration information of the first IoT device can be the account information used by the first IoT device to log in to the cloud service center. Here, the gateway device can establish a connection with the first IoT device by scanning the first IoT device, but the first IoT device cannot be remotely controlled by an electronic device before it is connected to the cloud service center.

[0104] Optionally, the first IoT device may send its device information to the gateway device. Alternatively, the gateway device may store device information of multiple IoT devices and, based on the device identifier of the first IoT device, retrieve the device information of the first IoT device from the device information of the multiple IoT devices.

[0105] The device information of the first IoT device may include one or more of the following: a name of the first IoT device, a serial number (SN), an Internet Protocol (IP) address, a manufacturer identifier, a firmware version, etc.

[0106] In some embodiments, the gateway device may store first mapping information, where the first mapping information includes a mapping relationship between device information of N IoT devices and registration information of the N IoT devices, where N is a positive integer.

[0107] If the first mapping information includes the device information of the first IoT device, that is, if the gateway device pre-stores a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device, the gateway device can obtain the registration information of the first IoT device based on the device information of the first IoT device and the first mapping information. For example, see Table 1, which shows a storage format for the first mapping information.

[0108] Table 1

[0109] IoT devices Device Information Registration Information Smart desk lamp A1 A2 sweeping robot B1 B2 air purifier C1 C2

[0110] For example, assuming that the gateway device scans a smart desk lamp that is not connected to the cloud service center (i.e., the first IoT device in the first state), then based on the first mapping information (i.e., Table 1) and the device information of the smart desk lamp (i.e., A1), the registration information of the smart desk lamp (i.e., A2) can be determined.

[0111] If the first mapping information does not include the device information of the first IoT device, that is, if the gateway device does not store the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device, the gateway device can obtain the registration information of the first IoT device by querying the cloud service center. Specifically, the gateway device can send a registration query request to the cloud service center, which can include the device information of the first IoT device. In response, the cloud service center can receive the registration query request from the gateway device. The cloud service center can send a registration query response to the gateway device, which includes the registration information of the first IoT device. In other words, the gateway device can only query the registration information of the first IoT device, and the cloud service center can send the registration information of the first IoT device to the gateway device. Alternatively, the gateway device can send a mapping relationship query request to the cloud service center, which requests the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device. The cloud service center can send a mapping relationship query response to the gateway device, which includes second mapping information, which can include the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device. The gateway device can obtain the registration information of the first IoT device from the second mapping information based on the device information of the first IoT device. That is to say, the gateway device can also query the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device. The cloud service center can only send the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device to the gateway device, or it can send the mapping relationship between the device information of multiple IoT devices and the registration information of multiple IoT devices to the gateway device, and the multiple devices may include the first IoT device.

[0112] Optionally, the gateway device may update the first mapping information based on the device information of the first IoT device and the registration information of the first IoT device to obtain the second mapping information. The first mapping information may be stored in a linked list data structure, and the gateway device may insert the mapping relationship between the device information of the first IoT device and the registration information of the first IoT device into the first mapping information using a linked list insertion method to obtain the second mapping information.

[0113] Optionally, the gateway device can also send query messages to the cloud service center at preset intervals. These query messages can be used to query the latest mapping information. In response to receiving the query message from the gateway device, the cloud service center can retrieve the latest mapping information from its storage space and then send a response message to the gateway device. In this way, the gateway device can regularly and proactively update the locally stored mapping information, so that when it discovers an IoT device within its coverage area that is not connected to the cloud service center, it can quickly obtain the registration information of the IoT device that is not connected to the cloud service center.

[0114] In some embodiments, the gateway device may include a software development kit (SDK), which may be an SDK for communicating between the gateway device and the cloud service center. The gateway device may call the SDK to complete information exchange with the cloud service center. Optionally, the gateway device may also include an information management module and an information storage module, and the information storage module may store the first mapping information.

[0115] For example, see Figure 5 , Figure 5 This is a schematic diagram of a gateway device updating first mapping information provided by an embodiment of the present application. Figure 5 As shown, the gateway device can call the gateway protocol management module to allow the first IoT device (such as IoT device 1) to access based on the gateway protocol. The way in which the gateway device updates the first mapping information may include that the gateway device calls the SDK to send a registration query request to the cloud service center, and the registration query request may include the device information of the first IoT device. The gateway device calls the SDK to receive a registration query response from the cloud service center, and the registration query response may include the registration information of the first IoT device. The gateway device calls the information management module to obtain the first mapping information from the information storage module, and calls the information management module to obtain the device information of the first IoT device and the registration information of the first IoT device, and then calls the information management module to update the first mapping information according to the device information and registration information of the first IOT device to obtain the second mapping information, and finally calls the information storage module to obtain the second mapping information from the information management module, that is, stores the updated second mapping information to the information management module.

[0116] It is understood that the cloud service center can store mappings between device information and registration information for multiple IoT devices. IoT device manufacturers can pre-configure the device information for IoT devices through the developer platform. Then, based on the device information of the IoT devices, they can register and obtain registration information for logging into the cloud service center. After configuring the mappings between the device information and registration information of the IoT devices, the mappings can be saved to the cloud service center. This allows the cloud service center to store mappings between the device information and registration information of the IoT devices.

[0117] For example, see Figure 6 , Figure 6 This is a flow chart of configuring device information of IoT devices provided by the embodiment of the present application. Figure 6 As shown, the device information of the IoT device can be configured through the configuration interface provided by the developer platform. After the device information of the IoT device is configured, the registration information for the IoT device to access the cloud service center can be obtained. Among them, the device information of the IoT device can be configured in the form of a Profile file (configuration file), and the Profile file can store the device information of the IoT device in the form of JSON (JavaScript Object Notation, JS object notation), and the Profile file can be stored in the cloud service center. After obtaining the registration information of the IoT device, the mapping relationship between the device information and the registration information of the IoT device can be configured through the developer platform, and then the device information and registration information of the IoT device can be stored in the cloud service center. In addition, the product information of the gateway device can also be configured through the developer platform, and the gateway configuration file configured with the product information of the gateway device can also be stored in the cloud service center, so that the gateway device can be connected to the cloud service center.

[0118] Take the IoT device as an example, a smart fan. Figure 7 , Figure 7 7 is a schematic diagram of a configuration interface of a developer platform provided in an embodiment of the present application. A new IoT device, namely a smart fan, can be created on the developer platform. After configuring the device information of the smart fan, basic information of the smart fan, such as the product model, product type, creation time, configuration status, and configuration progress, can be displayed in configuration interface 71.

[0119] In this way, IoT devices produced by any manufacturer can configure device information through the developer platform and then obtain registration information. The mapping relationship between the device information and registration information of the IoT device can be stored in the cloud service center. When the IoT device is connected through the gateway device, it can quickly obtain the registration information and log in to the cloud service center without the need for other adaptation processes. This access method is compatible and universal.

[0120] S305: The gateway device sends a first access request to the cloud service center. Correspondingly, the cloud service center receives the first access request from the gateway device.

[0121] The first access request may include registration information of the first IoT device. After the gateway device obtains the registration information of the first IoT device, it may send the first access request to the cloud service center.

[0122] S306: The cloud service center allows the first IoT device to access according to the registration information of the first IoT device, and updates the state of the first IoT device to the second state.

[0123] The second state can be used to indicate that the first IoT device has been connected to the cloud service center. The first IoT device having been connected to the cloud service center can also be described as the first IoT device having logged in to the cloud service center.

[0124] In some embodiments, the cloud service center can verify the registration information of the first IoT device. If the verification is successful, the first IoT device is allowed to access, that is, the first IoT device is allowed to log in and go online. If the verification fails, the first IoT device may not be allowed to access, and the reason for not allowing the first IoT device to access is sent to the gateway device. Among them, there are many ways for the cloud service center to verify the registration information of the first IoT device. For example, the cloud service center can compare the registration information of the first IoT device carried in the first access request with the registration information of the first IoT device stored in the cloud service center. If the registration information of the first IoT device carried in the first access request is consistent with the registration information of the first IoT device stored in the cloud service center, then the cloud service center can determine that the verification is successful. If the registration information of the first IoT device carried in the first access request is inconsistent with the registration information of the first IoT device stored in the cloud service center, then the cloud service center can determine that the verification is unsuccessful. In this way, it is helpful to improve the security of device access.

[0125] S307: The cloud service center sends a first access response to the gateway device. Correspondingly, the gateway device receives the first access response from the cloud service center.

[0126] The first access response may be used to indicate that the state of the first IoT device is updated to the second state. That is, after the first IoT device successfully accesses the cloud service center, the cloud service center may send the first access response to the gateway device.

[0127] S308: In response to receiving the first access response from the cloud service center, the gateway device sends a notification message to the electronic device. Accordingly, the electronic device receives the notification message from the gateway device.

[0128] The notification message can be used to notify the electronic device to display the identifier of the first IoT device. When the gateway device learns that the first IoT device has connected to the cloud service center, it can send a notification message to the electronic device.

[0129] S309 : In response to the notification message, the electronic device displays the device identification of the first IoT device in the second state in the interface of the device management application.

[0130] Optionally, the electronic device may further display the device status of the first IoT device in the interface of the device management application. The device status may include, for example, a text message “connected to the cloud service center”.

[0131] In some embodiments, after the first IoT device is connected to the cloud service center, a binding relationship can also be established between the registration information of the first IoT device and the account bound to the gateway device. The account bound to the gateway device is the account bound to the gateway device for logging into the device management application. For example, the account for logging into the device management application is account A. Account A and gateway device B can establish a binding relationship. After the IoT device C under gateway device B is connected to the cloud service center, a binding relationship can also be established between the registration information of IoT device C (assuming it is C2) and the account for logging into the device management application. In this way, by logging into account A on the device management application, the device identification of IoT device C can be displayed to the user through the interface of the device management application.

[0132] In some embodiments, after the first IoT device is connected to the cloud service center, the first IoT device can be controlled through the device management application. In response to selecting an operation for the first IoT device, the electronic device can display the device control interface corresponding to the first IoT device in the device management application, and the device control interface may include a first control control. In response to a triggering operation for the first control, the electronic device can generate a first control instruction, and the first control instruction can be used to control the first IoT device. Optionally, the electronic device can send the first control instruction to the gateway device to control the first IoT device through the gateway device. The electronic device can also send the first control instruction to the cloud service center, and the cloud service center will send the first control instruction to the gateway device. The first control instruction can be an on instruction, an off instruction, or an adjustment instruction, etc.

[0133] For example, assuming that the first IoT device is a smart desk lamp, after the smart desk lamp is connected to the cloud service center, the electronic device can display the device identification of the smart desk lamp in the interface of the device management application. Figure 8A , Figure 8A This is a schematic diagram of the interface of a device management application provided by an embodiment of the present application. Figure 8A As shown, the device management application interface 81 can display the device identifier 811 of the smart desk lamp in the form of an icon. Optionally, by clicking the device identifier 811 of the smart desk lamp, you can enter the device control interface corresponding to the smart desk lamp. Figure 8B , Figure 8B This is a schematic diagram of the interface of another device management application provided by the embodiment of the present application. Figure 8B As shown, the interface 82 of the device management application is the device control interface corresponding to the smart desk lamp, and the interface 82 may include a switch control control 821, a brightness control control 822, and a saturation control control 823. When the smart desk lamp is in the off state, the electronic device can generate an on instruction in response to the trigger operation on the switch control control 821 to control the smart desk lamp to turn on. In response to the trigger operation on the brightness control control 822, the electronic device can generate a corresponding brightness adjustment instruction to control the smart desk lamp to adjust the brightness. In response to the trigger operation on the saturation control control 823, the electronic device can generate a corresponding saturation adjustment instruction to control the smart desk lamp to adjust the saturation. When the smart desk lamp is in the on state, the electronic device can generate a off instruction in response to the trigger operation on the switch control control 821 to control the smart desk lamp to turn off.

[0134] For ease of understanding, the following describes the specific implementation process of the electronic device displaying the device identification of the first IoT device in the embodiment of the present application. Figure 9 , Figure 9 This is a flow chart of an electronic device displaying a device identification of a first IoT device provided by an embodiment of the present application. Figure 9 As shown, the following steps may be included:

[0135] Step 1: The electronic device displays a device scanning control in the interface of the device management application. Optionally, the device scanning control can be located in the gateway device setting interface of the device management application or on the homepage of the device management application.

[0136] Step 2: In response to receiving a trigger operation for the device scan control, the electronic device sends a device scan instruction to the gateway device. Optionally, the gateway device may include an SDK and a gateway protocol management module. The SDK can be used to enable the gateway device to communicate with the cloud service center, and the gateway protocol management module can be used to enable the gateway device to communicate with IoT devices based on the gateway protocol.

[0137] Step 3: In response to the device scan instruction from the electronic device, the gateway device calls the gateway protocol management module to broadcast a scan request message to at least one IoT device.

[0138] Step 4: The first IoT device that is not connected to the cloud service center may send a scan response message to the gateway device.

[0139] Step 5: In response to the scan response from the first IoT device, the gateway device invokes the SDK to obtain the registration information of the first IoT device. The cloud service center stores a mapping between the device information and registration information of the first IoT device. The gateway device can invoke the SDK to obtain the registration information of the first IoT device from the cloud service center.

[0140] Step 6: The gateway device sends a first access request to the cloud service center to request access to the first IoT device.

[0141] Step 7: The cloud service center allows the first IoT device to access and sends a first access response to the gateway device.

[0142] Step 8: In response to receiving the first access response from the cloud service center, the gateway device sends a notification message to the electronic device. The electronic device can receive the notification message from the gateway device based on an interconnection service (svc).

[0143] Step 9: The electronic device responds to the notification message by displaying the device identifier of the first IoT device in the interface of the device management application.

[0144] In an embodiment of the present application, the gateway device can assist the IoT device in quickly accessing the cloud service center by maintaining the mapping relationship between the device information and registration information of the IoT device. The IoT device does not need to be adapted based on the software development kit provided by the cloud service center, which is conducive to improving the efficiency of IoT devices accessing the cloud service center.

[0145] In some embodiments, the gateway device may include an SDK and an information management module. The following describes the device access method provided in the embodiment of the present application from the perspective of module interaction. Figure 10 , Figure 10 This is a flow chart of another device access method provided by an embodiment of the present application. Figure 10As shown, the method may include but is not limited to the following steps:

[0146] Optionally, S901: Initialize the information management module of the gateway device. The purpose of initializing the information management module of the gateway device is to ensure that the gateway device can scan IoT devices within the coverage area and promptly discover newly connected IoT devices.

[0147] The gateway device can periodically and proactively scan for IoT devices within its coverage area, or it can scan for IoT devices within its coverage area upon receiving a device scan instruction from an electronic device. Furthermore, the gateway device can also receive access messages reported by IoT devices after they connect to the gateway device without performing a scan.

[0148] S902: The electronic device generates a device scanning instruction in response to receiving a trigger operation for a device scanning control in an interface of a device management application.

[0149] S903: The electronic device sends a device scan instruction to the gateway device. Correspondingly, the gateway device receives the device scan instruction from the electronic device.

[0150] S904: In response to receiving the device scan instruction from the electronic device, the gateway device scans the IoT devices within the coverage area.

[0151] In the embodiment of the present application, steps S902 to S904 are Figure 3 The implementation principles and processes of steps S301 to S303 are similar and will not be repeated here.

[0152] S905 : In response to scanning a first IoT device in a first state, the gateway device determines whether the first mapping information includes device information of the first IoT device.

[0153] The gateway device may invoke the information management module to determine whether the first mapping information includes the device information of the first IoT device. Optionally, the gateway device may further include an information storage module. The first mapping information may be stored in the information storage module. The first mapping information may include a mapping relationship between the device information of N IoT devices and the registration information of the N IoT devices. The gateway device may invoke the information management module to obtain the first mapping information from the information storage module, and then determine whether the first mapping information includes the device information of the first IoT device.

[0154] In a case where the first mapping information includes the device information of the first IoT device, the gateway device may call the device information management module to execute step S906 .

[0155] S906: The gateway device calls the device information management module to obtain registration information of the first IoT device according to the device information of the first IoT device and the first mapping information.

[0156] The device information of the first IoT device and the registration information of the first IoT device may be in a one-to-one mapping relationship. The first mapping information may include a one-to-one correspondence between the device information of the first IoT device and the registration information of the first IoT device.

[0157] In a case where the first mapping information does not include the device information of the first IoT device, the gateway device may call the SDK and the device information management module to execute steps S907 to S909.

[0158] S907: The gateway device calls the SDK to send a registration query request to the cloud service center. Correspondingly, the cloud service center receives the registration query request from the gateway device.

[0159] Optionally, if the gateway device does not receive a registration query response from the cloud service center within a time threshold, it may resend the registration query request.

[0160] S908: The cloud service center sends a registration query response to the gateway device. Accordingly, the gateway device can call the SDK to receive the registration query response from the cloud service center.

[0161] Optionally, the registration query response may include the registration information of the first IoT device, or may include a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device. For example, the registration query response may include a mapping relationship between the device information of M IoT devices and the registration information of M IoT devices, where the M IoT devices may include the first IoT device.

[0162] S909: The gateway device calls the device information management module to update the first mapping information to the second mapping information, and obtains the registration information of the first IoT device according to the device information of the first IoT device and the second mapping information.

[0163] After the gateway device updates and obtains the second mapping information, it can store the second mapping information in the information storage module so that the registration information of other IoT devices can be easily obtained later.

[0164] S910: The gateway device sends a first access request to the cloud service center. In response, the cloud service center receives the first access request from the gateway device. The first access request includes registration information of the first IoT device.

[0165] The cloud service center can determine whether to allow access to the first IoT device based on the registration information of the first IoT device. If the first IoT device is allowed to access, the cloud service center can update the status of the first IoT device to indicate that it has been connected to the cloud service center. If the first IoT device is not allowed to access, an access failure message can be sent to the gateway device. The access failure message may include the reason why the cloud service center did not allow the first IoT device to access.

[0166] S911: The cloud service center sends a first access response to the gateway device. Accordingly, the gateway device may invoke the SDK to receive the first access response from the cloud service center. The first access response may indicate that the state of the first IoT device has been updated to a second state, and the second state may indicate that the first IoT device has connected to the cloud service center.

[0167] S912: The gateway device sends a notification message to the first IoT device. Correspondingly, the first IoT device receives the notification message from the gateway device.

[0168] S913 : In response to the notification message, the electronic device displays the device identification of the first IoT device in the second state in the interface of the device management application.

[0169] In the embodiment of the present application, step S912 and step S913 are Figure 3 The implementation principles and processes of steps S308 to S309 are similar and will not be repeated here.

[0170] By implementing the embodiments of the present application, after a gateway device scans an IoT device that is not connected to the cloud service center, it can obtain the IoT device's registration information based on the device information of the IoT device, and then assist the IoT device in connecting to the cloud service center based on the IoT device's registration information. During the entire device access process, the IoT device is then adapted based on the software development kit provided by the cloud service center, reducing the time consumed by the IoT device to connect to the cloud service center and helping to improve the efficiency of IoT device access to the cloud service center.

[0171] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).

[0172] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0173] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.

[0174] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.

[0175] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.

[0176] The above disclosure is only a preferred embodiment of the present application and is only a part of the embodiments of the present application. It cannot be used to limit the scope of rights of the present application.

Claims

1. A device access method, characterized in that: The method is applied to a gateway device, and the method includes: In response to receiving a device scanning instruction from the electronic device, scanning IoT devices within the coverage area; In response to scanning a first IoT device in a first state, obtaining registration information of the first IoT device according to device information of the first IoT device, wherein the first state is used to indicate that the first IoT device is not connected to the cloud service center; Sending a first access request to the cloud service center; the first access request includes registration information of the first IoT device; In response to receiving a first access response from the cloud service center, a notification message is sent to the electronic device, the notification message including the device identification of the first IoT device; the notification message is used to notify the electronic device to display the device identification of the first IoT device; the first access response is used to indicate that the status of the first IoT device is updated to a second state; the second state is used to indicate that the first IoT device has connected to the cloud service center.

2. The method according to claim 1, wherein The acquiring, according to the device information of the first IoT device, registration information of the first IoT device includes: In response to the first mapping information including the device information of the first IoT device, the registration information of the first IoT device is obtained according to the device information of the first IoT device and the first mapping information; the first mapping information includes a mapping relationship between the device information of N IoT devices and the registration information of the N IoT devices; N is a positive integer.

3. The method according to claim 2, wherein The method further comprises: In response to the first mapping information not including the device information of the first IoT device, sending a registration query request to the cloud service center; the registration query request includes the device information of the first IoT device; Receive a registration query response from the cloud service center; the registration query response includes registration information of the first IoT device.

4. The method according to claim 3, wherein The method further comprises: The first mapping information is updated according to the device information of the first IoT device and the registration information of the first IoT device to obtain second mapping information.

5. The method according to claim 4, wherein The gateway device includes an information management module and an information storage module; the information storage module stores the first mapping information; The updating the first mapping information according to the device information of the first IoT device and the registration information of the first IoT device to obtain the second mapping information includes: Calling the information management module to obtain the first mapping information from the information storage module, and calling the information management module to obtain the device information of the first IoT device and the registration information of the first IoT device; Calling the information management module to update the first mapping information according to the device information of the first IoT device and the registration information of the first IoT device to obtain second mapping information; The information storage module is called to obtain the second mapping information from the information management module.

6. The method according to claim 5, wherein The gateway device further includes a software development kit, which is used for the gateway device to communicate with the cloud service center; and sending a registration query request to the cloud service center includes: The software development kit is called to send a registration query request to the cloud service center.

7. The method according to claim 2, wherein The method further comprises: In response to the first mapping information not including the device information of the first IoT device, sending a mapping relationship query request to the cloud service center; the mapping relationship query request is used to request second mapping information; the second mapping information includes a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device; receiving a mapping relationship query response from the cloud service center; the mapping relationship query response including the second mapping information; Acquire registration information of the first IoT device according to the device information of the first IoT device and the second mapping information.

8. The method according to any one of claims 1 to 7, wherein: The method further comprises: Receive a first control instruction from the electronic device, and control the first IoT device according to the first control instruction.

9. A device access method, characterized in that: The method is applied to an electronic device, the electronic device including a device management application, and the method includes: In response to receiving a trigger operation for a device scan control in an interface of the device management application, generating a device scan instruction; Sending the device scanning instruction to the gateway device; the device scanning instruction is used to instruct the gateway device to scan IoT devices within the coverage area; receiving a notification message from the gateway device, where the notification message includes a device identifier of the first IoT device; In response to the notification message, the device identification of the first IoT device is displayed in the interface of the device management application; the first IoT device has been connected to the cloud service center.

10. The method according to claim 9, wherein The method further comprises: In response to receiving a trigger operation for a first control control in an interface of the device management application, generating a first control instruction; Send the first control instruction to the gateway device; the first control instruction is used to control the first IoT device.

11. A device access method, characterized in that: The method is applied to a cloud service center and includes: Receive a first access request from a gateway device; the first access request includes registration information of a first IoT device in a first state; the first state is used to indicate that the first IoT device is not connected to the cloud service center; Allowing access to the first IoT device according to the registration information of the first IoT device, and updating the state of the first IoT device to a second state; the second state is used to indicate that the first IoT device has been connected to the cloud service center; Send a first access response to the gateway device; the first access response is used to indicate that the state of the first IoT device is updated to the second state.

12. The method according to claim 11, wherein The method further comprises: Receive a registration query request from the gateway device; the registration query request includes device information of the first IoT device; Send a registration query response to the gateway device based on the device information of the first IoT device; the registration query response includes the registration information of the first IoT device.

13. The method according to claim 11, wherein The method further comprises: Receive a mapping relationship query request from the gateway device; the mapping relationship query request is used to request second mapping information; the second mapping information includes a mapping relationship between the device information of the first IoT device and the registration information of the first IoT device; Sending a mapping relationship query response to the gateway device; the mapping relationship query response includes the second mapping information.

14. A gateway device, characterized in that: The gateway device comprises a memory and one or more processors; the memory is coupled to the one or more processors and is used to store a computer program, wherein the computer program includes program instructions; the one or more processors call the program instructions so that the gateway device executes the method according to any one of claims 1 to 8.

15. An electronic device, characterized in that: The electronic device comprises a memory and one or more processors; the memory is coupled to the one or more processors and is used to store a computer program, the computer program comprising program instructions; the one or more processors call the program instructions so that the electronic device executes the method as claimed in claim 9 or 10.

16. A cloud service center, characterized in that: It includes a memory and one or more processors; the memory is coupled to the one or more processors and is used to store a computer program, and the computer program includes program instructions; the one or more processors call the program instructions so that the cloud service center executes the method described in any one of claims 11-13.

17. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8, or the method according to claim 9 or 10, or the method according to any one of claims 11 to 13.

18. A chip system, characterized in that: The chip system is coupled to a memory, and the chip system is used to read and execute a computer program stored in the memory to implement any one of the methods described in 1-8, or to implement the method described in claim 9 or 10, or to implement any one of the methods described in claims 11-13.