Device login method, electronic device, and storage medium
By binding and authenticating the central agent login device with the central device, the security and user experience issues during the IoT device central device login process are solved, convenient registration and control of the device are achieved, and the project installation efficiency and user experience are improved.
Patent Information
- Application Number
- CN202111145149.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-28
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-09-28
AI Technical Summary
In real estate development projects, there are security issues with the transmission and management of administrator account passwords during the IoT device hub device login process. Especially in the case of default passwords or unique passwords for each family, the user experience is poor and vulnerable to attacks. In addition, the pre-installation configuration is complex, affecting the work efficiency and user experience of engineering installers.
Through the binding process of the central agent login device and the central device, the login code and authentication credentials are used to achieve secure connection and registration of the device, simplify the login process, support the registration and control of backup devices, avoid recording the administrator password, and improve user experience and work efficiency.
It simplifies the login process of central equipment, improves the work efficiency of engineering installation personnel, enhances user experience, ensures the convenience of secure connection and control of equipment, and adapts to backup plans when equipment is damaged.
Smart Images

Figure CN115883118B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of information technology, and in particular to a device login method, an electronic device, and a storage medium. Background Art
[0002] With the development of smart home devices, more and more Internet of Things (IoT) devices support binding to smartphone IoT apps, allowing remote / near-end control through mobile apps, and then intelligent linkage with other IoT devices.
[0003] IoT devices and IoT apps typically connect using wireless technologies such as Wi-Fi, Bluetooth, and Zig-bee. Devices that support Wi-Fi can connect directly to the internet via IP, allowing them to access the IoT smart home platform. However, devices using protocols like Bluetooth and Zig-bee cannot directly access the internet and typically require Bluetooth or Zig-bee gateways to convert their data to IP before accessing the IoT smart home platform.
[0004] IoT devices in the home typically connect to a hub device first, which then connects to the IoT app or IoT cloud through the hub device proxy. This convergence of IoT device connections enables unified control, unified data analysis, and cross-device intelligent linkage. These hub devices are typically integrated home service hubs, resident in the home, and require constant power. Examples include smart speakers, smart TVs, smart routers, and set-top boxes.
[0005] In real estate development projects, broadband services are often not available for pre-installation, leaving the home network disconnected from the internet. Therefore, an IoT home hub device is often used as an edge cloud proxy to manage all local IoT devices, edit device linkage rules, and execute device linkage as an edge rule engine.
[0006] To log in to the above-mentioned central device, if you do not have an IoT solution account (such as a Huawei account), you need to set up a new local administrator account and password to log in to the above-mentioned central device. This administrator password can be set up separately for pre-installed configuration, or it can reuse the existing system administrator account and password of the central device. For example, when the above-mentioned central device is a home router, the legitimacy of the user can be verified by verifying the administrator account and password of the home router.
[0007] The administrator account and password of the above-mentioned central device need to be passed to the end user, and generally the pre-installation is set in batches (for example, all houses in a real estate complex, a building, or a unit type). Therefore, if the default password is set when the house is delivered, if the user does not change the password, it is easy for someone to break through the default password later and control the IoT devices in the whole house; or if it is set to one password per family, you need to consider how to pass it to the user, such as printing it out and giving it to the user. If the user loses the password, all pre-installed configurations need to be reset and reconfigured. Even if the user changes to his or her own password as soon as he or she receives the house, since the configuration is pre-installed and not commonly used, it may be forgotten later, causing inconvenience to the user. Summary of the Invention
[0008] The embodiments of the present application provide a device login method, an electronic device, and a storage medium to provide a way to log in to a home hub device and bind the above-mentioned hub device, thereby simplifying the process of logging in to the hub device, improving the work efficiency of engineering installation personnel, and further improving the user experience.
[0009] In a first aspect, an embodiment of the present application provides a device login method, applied to a first device, comprising:
[0010] The first device displays a login code, wherein the login code is used for the second device to log in to the first device; wherein the first device may be a central agent login device, such as a home control panel, and the second device may be a mobile device, such as a mobile phone.
[0011] The first device receives a login request sent by the second device and sends a first response message to the second device; wherein the login request includes a login code; the first response message is used to indicate that the first device is not connected to a third device; wherein the third device may be a main hub device.
[0012] The first device receives the master device registration information sent by the second device, and registers with the third device based on the master device registration information;
[0013] The first device establishes a secure connection with the third device; the first device sends a master device online message to the second device; wherein the master device online message is used to notify the second device that a secure connection has been established with the third device.
[0014] In the embodiment of the present application, by binding the central agent login device to the central device, the process of logging into the central device can be simplified, the work efficiency of engineering installation personnel can be improved, and the user experience can be improved.
[0015] In one possible implementation, the main device registration information includes the device ID and authentication credential AuthCode of the third device.
[0016] One possible implementation method also includes:
[0017] The first device receives a fourth device registration information request sent by the second device; wherein the fourth device registration information request is used to request registration information of a fourth device; wherein the fourth device may be a slave hub device or a backup hub device.
[0018] The first device sends a fourth device registration information request to the third device;
[0019] The first device receives registration information of the fourth device sent by the third device;
[0020] The first device sends the registration information of the fourth device to the second device;
[0021] The first device receives a fourth device online message sent by the third device, wherein the fourth device online message is used to indicate that the third device has established a secure connection with the fourth device;
[0022] The first device sends a message indicating that the fourth device is online to the second device.
[0023] In an embodiment of the present application, registering the fourth device on the third device through a central proxy login device can simplify the registration process of the fourth device.
[0024] In one possible implementation, the third device is a master hub device, and the fourth device is a slave hub device or a backup hub device; wherein the third device can receive device registration, and the fourth device does not receive device registration.
[0025] The embodiment of the present application further provides a device login method, which is applied to a first device, where the first device is registered with a third device and a secure connection is established between the first device and the third device, including:
[0026] The first device displays a login code; wherein the login code is used by the second device to log in to the first device;
[0027] The first device receives the login request sent by the second device and sends a third response message to the second device; wherein the login request includes a login code; the third response message is used to indicate that the first device has established a secure connection with the third device;
[0028] The first device receives a new device registration information request sent by the second device; wherein the new device registration information request is used to request new registration information of the first device;
[0029] The first device sends a new device registration information request to the third device;
[0030] The first device receives new device registration information sent by the third device; wherein the new device registration information is used to represent the newly added registration information of the first device;
[0031] The first device sends the new device registration information to the second device;
[0032] The first device receives a new device online message sent by the third device; wherein the new device online message is used to indicate that the third device has established a secure connection with the newly added first device;
[0033] The first device sends a new device online message to the second device.
[0034] In an embodiment of the present application, a central agent login device can be added, so that when any central agent login device is damaged, a spare central agent login device can be used to improve work efficiency.
[0035] One possible implementation method also includes:
[0036] The first device receives a new device addition notification sent by the second device; wherein the new device addition notification is used to instruct the third device to add the first device as a newly added access point;
[0037] The first device sends a new device addition notification to the third device.
[0038] The embodiment of the present application further provides a device login method, which is applied to a first device, wherein the first device and a fifth device have been registered on a third device, and the fifth device has established a secure connection with the third device, including:
[0039] The first device searches for the third device;
[0040] The first device receives a fifth response message sent by the third device; wherein the fifth response message includes an identity identifier of the third device;
[0041] The first device establishes a secure connection with the third device;
[0042] The first device displays a login code; wherein the login code is used by the second device to log in to the first device;
[0043] The first device receives a login request sent by the second device; wherein the login request includes a login code;
[0044] The first device sends device control information of the third device to the second device; wherein the device control information of the third device includes information of a fifth device that can be controlled by the third device;
[0045] The first device receives a control instruction sent by the second device, wherein the control instruction is used to control the fifth device;
[0046] The first device sends the control instruction to the third device.
[0047] In an embodiment of the present application, the IoT device controlled by the main hub device can be directly controlled by logging into the device through the hub agent. There is no need to distinguish which device is the main hub device, nor is there any need to record the administrator password of the main hub device, thereby improving the user experience.
[0048] One possible implementation method also includes:
[0049] The first device receives a sixth response message or a device state change event sent by the fifth device; wherein the sixth response message is used to indicate that the fifth device has completed control based on the control instruction; and the device state change event is used to indicate an event of a state change of the fifth device;
[0050] The first device sends a sixth response message or a device state change event to the second device.
[0051] The embodiment of the present application further provides a device login method, which is applied to a sixth device and includes:
[0052] The sixth device displays a login code, wherein the login code is used by the second device to log in to the sixth device;
[0053] The sixth device receives the login request sent by the second device; wherein the login request includes a login code;
[0054] The sixth device generates master device registration information; wherein the master device registration information includes the device ID and authentication credential AuthCode of the sixth device; the sixth device can receive device registration; the sixth device is an access point;
[0055] The sixth device searches for the unregistered fourth device;
[0056] The sixth device receives an eighth response message sent by the unregistered fourth device; wherein the eighth response message includes basic information of the unregistered fourth device;
[0057] The sixth device generates fourth device registration information for the unregistered fourth device; wherein the fourth device registration information includes the registration information of the unregistered fourth device;
[0058] The sixth device establishes an encrypted connection with the unregistered fourth device;
[0059] The sixth device sends the fourth device registration information to the unregistered fourth device;
[0060] The sixth device establishes a secure connection with the unregistered fourth device;
[0061] The sixth device sends the fourth device online message to the second device; wherein the fourth device online message is used to indicate that the sixth device has established a secure connection with the unregistered fourth device.
[0062] In an embodiment of the present application, by deploying the central agent login function and the central function on one device, the agent login and main central functions can be realized at the same time, thereby improving the efficiency of device login and registration.
[0063] In a second aspect, an embodiment of the present application provides a device login apparatus, applied to a first device, comprising:
[0064] A display module, configured to display a login code on the first device; wherein the login code is used by the second device to log in to the first device;
[0065] A login module, configured for the first device to receive a login request sent by the second device and send a first response message to the second device; wherein the login request includes a login code; and the first response message is used to indicate that the first device is not connected to the third device;
[0066] A first registration module, configured for the first device to receive the master device registration information sent by the second device, and to register with the third device based on the master device registration information;
[0067] A connection module, configured to establish a secure connection between the first device and the third device;
[0068] The first sending module is used for the first device to send a master device online message to the second device; wherein the master device online message is used to notify the second device that a secure connection has been established with the third device.
[0069] In one possible implementation, the main device registration information includes the device ID and authentication credential AuthCode of the third device.
[0070] In one possible implementation, the device login apparatus further includes:
[0071] A request module, configured for the first device to receive a fourth device registration information request sent by the second device; wherein the fourth device registration information request is used to request registration information of the fourth device;
[0072] The second registration module is configured to: transmit a registration information request of the fourth device to the third device via the first device; receive the registration information of the fourth device sent by the third device; and transmit the registration information of the fourth device to the second device via the first device;
[0073] The second sending module, the first device receives the fourth device online message sent by the third device; wherein the fourth device online message is used to indicate that the third device has established a secure connection with the fourth device; the first device sends the fourth device online message to the second device.
[0074] In one possible implementation, the third device is a master hub device, and the fourth device is a slave hub device or a backup hub device; wherein the third device can receive device registration, and the fourth device does not receive device registration.
[0075] The embodiment of the present application further provides a device login apparatus, which is applied to a first device, the first device has been registered with a third device, and the first device has established a secure connection with the third device, including:
[0076] A display module, configured to display a login code on the first device; wherein the login code is used by the second device to log in to the first device;
[0077] a login module configured to receive, by the first device, a login request sent by the second device, and send a third response message to the second device; wherein the login request includes a login code; and the third response message is used to indicate that a secure connection has been established between the first device and the third device;
[0078] A registration module configured to receive, at a first device, a new device registration information request sent by a second device; wherein the new device registration information request is used to add new registration information of the first device; the first device sends the new device registration information request to a third device; the first device receives the new device registration information sent by the third device; wherein the new device registration information is used to indicate the newly added registration information of the first device; and the first device sends the new device registration information to the second device;
[0079] The sending module is used for the first device to receive a new device online message sent by the third device; wherein the new device online message is used to indicate that the third device has established a secure connection with the newly added first device; the first device sends the new device online message to the second device.
[0080] In one possible implementation, the device login apparatus further includes:
[0081] The new device indication module is used for the first device to receive a new device addition notification sent by the second device; wherein the new device addition notification is used to instruct the third device to add the first device as a newly added access point; the first device sends the new device addition notification to the third device.
[0082] The embodiment of the present application further provides a device login apparatus, which is applied to a first device, wherein the first device and a fifth device have been registered on a third device, and the fifth device has established a secure connection with the third device, including:
[0083] A search module, configured for the first device to search for a third device; the first device receives a fifth response message sent by the third device; wherein the fifth response message includes an identity identifier of the third device;
[0084] A connection module, configured to establish a secure connection between the first device and the third device;
[0085] A display module, configured to display a login code on the first device; wherein the login code is used by the second device to log in to the first device;
[0086] A login module, configured for the first device to receive a login request sent by the second device; wherein the login request includes a login code;
[0087] A device control module is used for the first device to send device control information of a third device to the second device; wherein the device control information of the third device includes information of a fifth device that can be controlled by the third device; the first device receives the control instruction sent by the second device; wherein the control instruction is used to control the fifth device; and the first device sends the control instruction to the third device.
[0088] In one possible implementation, the device login apparatus further includes:
[0089] An information feedback module is used for the first device to receive a sixth response message or a device state change event sent by the fifth device; wherein the sixth response message is used to indicate that the fifth device has completed control based on the control instruction; the device state change event is used to indicate an event of a state change of the fifth device; the first device sends the sixth response message or the device state change event to the second device.
[0090] The embodiment of the present application further provides a device login apparatus, applied to a sixth device, including:
[0091] A display module, configured to display a login code on the sixth device; wherein the login code is used by the second device to log in to the sixth device;
[0092] A login module, configured for the sixth device to receive a login request sent by the second device; wherein the login request includes a login code;
[0093] The first generating module is configured to generate master device registration information for the sixth device; wherein the master device registration information includes the device ID and authentication credential AuthCode of the sixth device; the sixth device can receive device registration; and the sixth device is an access point;
[0094] A search module, configured for the sixth device to search for an unregistered fourth device;
[0095] a receiving module, configured for the sixth device to receive an eighth response message sent by the unregistered fourth device; wherein the eighth response message includes basic information of the unregistered fourth device;
[0096] A first generating module, wherein the sixth device generates fourth device registration information for the unregistered fourth device; wherein the fourth device registration information includes registration information of the unregistered fourth device;
[0097] a first connection module, configured to establish an encrypted connection between the sixth device and the unregistered fourth device;
[0098] a first sending module, configured for the sixth device to send the fourth device registration information to an unregistered fourth device;
[0099] a second connection module, configured for the sixth device to establish a secure connection with the unregistered fourth device;
[0100] The second sending module is used for the sixth device to send the fourth device online message to the second device; wherein the fourth device online message is used to indicate that the sixth device has established a secure connection with the unregistered fourth device.
[0101] In a third aspect, an embodiment of the present application provides a first device, including:
[0102] A memory, wherein the memory is used to store computer program code, wherein the computer program code includes instructions, and when the first device reads the instructions from the memory, the first device performs the following steps:
[0103] The first device displays a login code; wherein the login code is used by the second device to log in to the first device;
[0104] The first device receives the login request sent by the second device and sends a first response message to the second device; wherein the login request includes a login code; the first response message is used to indicate that the first device is not connected to the third device;
[0105] The first device receives the master device registration information sent by the second device, and registers with the third device based on the master device registration information;
[0106] The first device establishes a secure connection with the third device;
[0107] The first device sends a master device online message to the second device; wherein the master device online message is used to notify the second device that a secure connection has been established with the third device.
[0108] In one possible implementation, the main device registration information includes the device ID and authentication credential AuthCode of the third device.
[0109] In one possible implementation, when the instruction is executed by the first device, the first device further performs the following steps:
[0110] The first device receives a fourth device registration information request sent by the second device, wherein the fourth device registration information request is used to request registration information of the fourth device;
[0111] The first device sends a fourth device registration information request to the third device;
[0112] The first device receives registration information of the fourth device sent by the third device;
[0113] The first device sends the registration information of the fourth device to the second device;
[0114] The first device receives a fourth device online message sent by the third device, wherein the fourth device online message is used to indicate that the third device has established a secure connection with the fourth device;
[0115] The first device sends a message indicating that the fourth device is online to the second device.
[0116] In one possible implementation, the third device is a master hub device, and the fourth device is a slave hub device or a backup hub device; wherein the third device can receive device registration, and the fourth device does not receive device registration.
[0117] The embodiment of the present application further provides a first device, including:
[0118] A memory, wherein the memory is used to store computer program code, wherein the computer program code includes instructions. The first device has been registered with the third device, and the first device has established a secure connection with the third device. When the first device reads the instructions from the memory, the first device performs the following steps:
[0119] The first device displays a login code; wherein the login code is used by the second device to log in to the first device;
[0120] The first device receives the login request sent by the second device and sends a third response message to the second device; wherein the login request includes a login code; the third response message is used to indicate that the first device has established a secure connection with the third device;
[0121] The first device receives a new device registration information request sent by the second device; wherein the new device registration information request is used to request new registration information of the first device;
[0122] The first device sends a new device registration information request to the third device;
[0123] The first device receives new device registration information sent by the third device; wherein the new device registration information is used to represent the newly added registration information of the first device;
[0124] The first device sends the new device registration information to the second device;
[0125] The first device receives a new device online message sent by the third device; wherein the new device online message is used to indicate that the third device has established a secure connection with the newly added first device;
[0126] The first device sends a new device online message to the second device.
[0127] In one possible implementation, when the instruction is executed by the first device, the first device further performs the following steps:
[0128] The first device receives a new device addition notification sent by the second device; wherein the new device addition notification is used to instruct the third device to add the first device as a newly added access point;
[0129] The first device sends a new device addition notification to the third device.
[0130] The embodiment of the present application further provides a first device, including:
[0131] A memory, wherein the memory is configured to store computer program code, wherein the computer program code includes instructions. The first device and the fifth device are registered on the third device, and the fifth device has established a secure connection with the third device. When the first device reads the instructions from the memory, the first device performs the following steps:
[0132] The first device searches for the third device;
[0133] The first device receives a fifth response message sent by the third device; wherein the fifth response message includes an identity identifier of the third device;
[0134] The first device establishes a secure connection with the third device;
[0135] The first device displays a login code; wherein the login code is used by the second device to log in to the first device;
[0136] The first device receives a login request sent by the second device; wherein the login request includes a login code;
[0137] The first device sends device control information of the third device to the second device; wherein the device control information of the third device includes information of a fifth device that can be controlled by the third device;
[0138] The first device receives a control instruction sent by the second device, wherein the control instruction is used to control the fifth device;
[0139] The first device sends the control instruction to the third device.
[0140] In one possible implementation, when the instruction is executed by the first device, the first device further performs the following steps:
[0141] The first device receives a sixth response message or a device state change event sent by the fifth device; wherein the sixth response message is used to indicate that the fifth device has completed control based on the control instruction; and the device state change event is used to indicate an event of a state change of the fifth device;
[0142] The first device sends a sixth response message or a device state change event to the second device.
[0143] The embodiment of the present application further provides a sixth device, including:
[0144] A memory, the memory being used to store computer program code, the computer program code including instructions, and when the sixth device reads the instructions from the memory, the sixth device performs the following steps:
[0145] The sixth device displays a login code, wherein the login code is used by the second device to log in to the sixth device;
[0146] The sixth device receives the login request sent by the second device; wherein the login request includes a login code;
[0147] The sixth device generates master device registration information; wherein the master device registration information includes the device ID and authentication credential AuthCode of the sixth device; the sixth device can receive device registration; the sixth device is an access point;
[0148] The sixth device searches for the unregistered fourth device;
[0149] The sixth device receives an eighth response message sent by the unregistered fourth device; wherein the eighth response message includes basic information of the unregistered fourth device;
[0150] The sixth device generates fourth device registration information for the unregistered fourth device; wherein the fourth device registration information includes the registration information of the unregistered fourth device;
[0151] The sixth device establishes an encrypted connection with the unregistered fourth device;
[0152] The sixth device sends the fourth device registration information to the unregistered fourth device;
[0153] The sixth device establishes a secure connection with the unregistered fourth device;
[0154] The sixth device sends the fourth device online message to the second device; wherein the fourth device online message is used to indicate that the sixth device has established a secure connection with the unregistered fourth device.
[0155] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer executes the method described in the first aspect.
[0156] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed by a computer, is used to execute the method described in the first aspect.
[0157] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in whole or in part on a memory not packaged with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0158] Figure 1 Provides a master-slave hub mode architecture schematic diagram for the embodiment of the present application;
[0159] Figure 2 Provides a schematic diagram of the master-slave hub mode architecture for the embodiment of this application;
[0160] Figure 3 A schematic diagram of the session key negotiation process provided in an embodiment of the present application;
[0161] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0162] Figure 5 A schematic diagram of the application scenario architecture provided by the embodiment of the present application;
[0163] Figure 6 A flowchart of an embodiment of the device login method provided by this application;
[0164] Figure 7 A flowchart of another embodiment of the device login method provided by this application;
[0165] Figure 8 A flowchart of another embodiment of the device login method provided by this application;
[0166] Figure 9 A flowchart of another embodiment of the device login method provided by this application;
[0167] Figure 10 A schematic diagram of the structure of an embodiment of the device login device provided by this application;
[0168] Figure 11 A schematic structural diagram of another embodiment of the device login apparatus provided by this application;
[0169] Figure 12 A schematic structural diagram of another embodiment of the device login apparatus provided by this application;
[0170] Figure 13 This is a structural diagram of another embodiment of the device login device provided in this application. DETAILED DESCRIPTION
[0171] The following describes the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents "or." For example, A / B can represent A or B. "And / or" in this document is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, or B exists alone.
[0172] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature defined as "first" or "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.
[0173] With the development of smart home devices, more and more Internet of Things (IoT) devices support binding to smartphone IoT apps, allowing remote / near-end control through mobile apps, and then intelligent linkage with other IoT devices.
[0174] IoT devices and IoT apps typically connect using wireless technologies such as Wi-Fi, Bluetooth, and Zig-bee. Devices that support Wi-Fi can connect directly to the internet via IP, allowing them to access the IoT smart home platform. However, devices using protocols like Bluetooth and Zig-bee cannot directly access the internet and typically require Bluetooth or Zig-bee gateways to convert their data to IP before accessing the IoT smart home platform.
[0175] IoT devices in the home typically connect to a hub device first, which then connects to the IoT app or IoT cloud through the hub device proxy. This convergence of IoT device connections enables unified control, unified data analysis, and cross-device intelligent linkage. These hub devices are typically integrated home service hubs, resident in the home, and require constant power. Examples include smart speakers, smart TVs, smart routers, and set-top boxes.
[0176] In real estate development projects, in pre-installation scenarios, since there's no cloud platform or account, an IoT home hub device is often used as an edge cloud proxy to manage all local IoT devices, edit device linkage rules, and execute device linkage as an edge rule engine. Pre-installation refers to collaboration between IoT solution providers and real estate companies to install and test smart devices during the renovation phase, before the project is delivered to the final residents. This allows for direct control of IoT devices and automated local linkage upon move-in.
[0177] During pre-installation configuration, the house usually has IP network and Wi-Fi, but generally does not have the ability to access the Internet. This is because users generally need to apply for broadband services to access the Internet. Considering the broadband operators (China Telecom, China Mobile, China Unicom, China Netcom, etc.) and different broadband packages that users will choose, real estate developers generally do not directly provide broadband services to residents when decorating their houses.
[0178] Due to the lack of Internet, pre-installation and maintenance engineers can only debug IoT devices and set up automatic linkage rules on local home hub devices. Device registration and rule data will not be transmitted to the IoT cloud service. In addition, because general verification accounts and passwords (such as Huawei accounts) require connecting to cloud services, and it is not certain what account the end user uses to log in, pre-installation configurations are generally accountless.
[0179] Compared to retrofitting, pre-installation allows for planning and pre-laying of device installations during renovations, so pre-installation often uses wired connections (e.g., Ethernet cables or PLCs). Retrofitting IoT devices is typically installed after renovations, making it difficult to modify wiring. Therefore, retrofitting IoT devices often use wireless connections (Wi-Fi, Zig-bee, Z-Wave, Bluetooth, etc.).
[0180] To log in to the above-mentioned central device, if you do not have an IoT solution account (such as a Huawei account), you need to set up a new local administrator account and password to log in to the above-mentioned central device. This administrator password can be set up separately for pre-installed configuration, or it can reuse the existing system administrator account and password of the central device. For example, when the above-mentioned central device is a home router, the legitimacy of the user can be verified by verifying the administrator account and password of the home router.
[0181] The administrator account and password of the above-mentioned central device need to be passed to the end user, and generally the pre-installation is set in batches (for example, all houses in a real estate complex, a building, or a unit type). Therefore, if the default password is set when the house is delivered, if the user does not change the password, it is easy for someone to break through the default password later and control the IoT devices in the whole house; or if it is set to one password per family, you need to consider how to pass it to the user, such as printing it out and giving it to the user. If the user loses the password, all pre-installed configurations need to be reset and reconfigured. Even if the user changes to his or her own password as soon as he or she receives the house, since the configuration is pre-installed and not commonly used, it may be forgotten later, causing inconvenience to the user.
[0182] Based on the above problems, the embodiments of the present application provide a device login method, which is applied to an electronic device 100. The electronic device 100 can be a terminal with a display screen. The electronic device 100 can also be referred to as a terminal device, user equipment (UE), access terminal, subscriber unit, subscriber station, remote station, remote terminal, user terminal, wireless communication device, user agent, or user device. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device 100 that implements the technical solution.
[0183] In order to more clearly illustrate the application scenarios of the embodiments of the present application, the networking mode of the central device and its automated linkage rules (If This Then That, IFTTT) are first introduced below.
[0184] In whole-home smart systems, multiple hubs may be deployed simultaneously, creating a master-slave hub network. Typically, only one hub executes services, while the other hubs serve as slaves or backup hubs. Whole-home smart systems refer to a complete smart home solution, typically encompassing various smart appliances, hubs, IoT apps, and other components / network elements.
[0185] Networking Mode 1
[0186] Figure 1 The architecture diagram of the master-slave networking mode. Figure 1 As shown, the client can read data from the master node or the slave node at the same time, but the client can only write data on the master node and cannot write data on the slave node. The master node can automatically synchronize data to the slave node.
[0187] Networking Mode 2
[0188] Figure 2 The architecture diagram of the active / standby networking mode. Figure 2As shown, clients can only read and write data from the primary node, but cannot access the backup node. The primary node can synchronize data to the backup node. If the primary node fails, the node that executes the business can be switched from the primary node to the backup node.
[0189] In addition, the above-mentioned automated linkage rules are often used in IoT devices to allow users to specify certain fixed conditions to automatically trigger the execution of certain device settings, thereby achieving a device automation experience that does not require manual triggering by the user. Among them, the trigger conditions are usually timing, geographic fences, and other IoT device states becoming a specified state (for example, when the temperature of the temperature sensor reaches 30 degrees, or when the power of the living room light is turned on or off, etc.). The execution action is usually to specify a device to perform a certain function setting, for example, turn on the power of the living room light, adjust the air conditioning temperature to 26°C, play a specified voice, send a mobile phone reminder (requires an account and cloud service), etc. Setting and executing these automated linkage rules usually requires an automated rule engine, which is usually deployed on the IoT cloud service platform or the central device in the user's home.
[0190] Then, through Figure 3 Further introduce the session key negotiation method between IoT devices and central devices. It can be understood that the above Figure 3 The session key negotiation method between an IoT device and a hub device is shown as an example only, but is not limited to this. In some embodiments, a session key negotiation method between an IoT device and an IoT app may also be included. Furthermore, the session key negotiation method between an IoT device and a hub device can also take various forms, and the following only shows one example, but is not limited to this.
[0191] Figure 3 This is the session key negotiation process between the IoT device and the hub device, such as Figure 3 As shown, the above process includes:
[0192] In step 301, the central device has the information of the IoT device when the device is bound. The information of the IoT device may include information such as the device ID and AuthCode. The IoT device also obtains the above IoT device information from the central device when registering.
[0193] In step 302 , the hub device discovers the IoT device by sending a multicast message, or the IoT device discovers the hub device by sending a multicast message.
[0194] In step 303, the IoT device sends the ID of the IoT device to the hub device via a unicast message.
[0195] In step 304 , the central device derives a random number RN1 and sends RN1 to the IoT device.
[0196] In step 305 , the IoT device derives a random number RN2 and derives a session key Key1 based on RN1 , RN2 and AuthCode, where Key1 = RN1 + RN2 + AuthCode.
[0197] In step 306, the IoT device sends RN2 to the central device, and the central device derives the session key Key2 based on the above RN1, RN2 and AuthCode, where Key2 = RN1 + RN2 + AuthCode.
[0198] Then, the central device uses Key2 to encrypt and decrypt the control instructions or reported sensor events, and the IoT device uses Key1 to encrypt and decrypt the control instructions or reported sensor events.
[0199] It is understandable that the above Figure 3 The above is only an example of a session key negotiation method, but is not limited thereto. In some embodiments, other forms of session key negotiation methods may also be used.
[0200] The following combination Figure 4 First, an exemplary electronic device provided in the following embodiments of the present application is introduced. Figure 4 FIG2 shows a schematic structural diagram of an electronic device 100. The electronic device 100 may be a central agent login device.
[0201] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, 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.
[0202] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 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.
[0203] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0204] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0205] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0206] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0207] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0208] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0209] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0210] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0211] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0212] The GPIO interface can be configured via software. It can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0213] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0214] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0215] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0216] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0217] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0218] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0219] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0220] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0221] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0222] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0223] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0224] Display screen 194 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0225] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0226] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0227] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0228] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0229] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0230] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0231] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0232] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0233] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0234] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0235] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0236] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.
[0237] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0238] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0239] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.
[0240] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0241] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0242] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.
[0243] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0244] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0245] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0246] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.
[0247] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0248] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.
[0249] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.
[0250] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.
[0251] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0252] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0253] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0254] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0255] Now combined Figure 5-Figure 9 The device login method provided in the embodiment of the present application is described.
[0256] Figure 5 This is a schematic diagram of an application scenario of an embodiment of the present application. The above application scenario is mainly aimed at the pre-installed whole-house smart scenario, and the application scenario is suitable for the scenario of using IoTAPP to log in for the first time to select the main hub device. When the installation and maintenance personnel bind the hub device, they cannot use the account mechanism provided by the IoT solution and can only verify on the local device. In this case, the hub login agent node function is deployed on the local device with a screen, and the device with a screen generates a random verification code / QR code at each login instead of the user recording a fixed password, and automatically discovers and connects to the main hub device through the agent node, avoiding the user's own perception of the status of the master / slave hub device, and there is no need to record the IP address of the hub device. Figure 5 As shown, the above application scenario may include a mobile device 10, a hub agent login device 20, a main hub device 30, a backup hub device 31, an IoT device 40 and an IoT gateway 41. Among them, an IoT APP is installed on the mobile device 10. It can be understood that the main hub device 30 can be connected to multiple slave hub devices 31 and multiple proxy login devices 20. In addition, the main hub device 30 can directly control the IoT device 40, and can also control the IoT device 41 through the IoT gateway 41.
[0257] like Figure 6 The figure shows a flow chart of an embodiment of the device login method provided by the embodiment of the present application, including:
[0258] Step 601: The central agent login device 20 displays the login code.
[0259] Specifically, the central proxy login device 20 can periodically and dynamically display the login code, or the login code can be dynamically generated by the user by pressing a button on the central proxy login device 20. In a specific implementation, the login code can be 4-8 random numbers, or a random QR code that can include the IP address of the central proxy login device 20 and the login random number. It is understood that the login code can be used by the mobile device to log in to the central proxy login device 20;
[0260] In step 602 , the user starts the IoT APP on the mobile device 10 .
[0261] Specifically, a user can click the IoT APP icon on the screen of a mobile device 10 (e.g., a mobile phone) to launch the IoT APP. It is understood that the user's click operation can be a single click or a double click, and the embodiment of the present application does not specifically limit the click operation.
[0262] Step 603: The user logs in to the central agent login device 20 through the IoT APP.
[0263] Specifically, after the user starts the above-mentioned IoT APP, the above-mentioned IoT APP can be used to log in to the central agent login device 20. Exemplarily, the user can scan the QR code displayed by the central agent login device 20 through the above-mentioned IoT APP, or enter the login code displayed by the central agent login device 20 to log in to the above-mentioned central agent login device 20. Among them, the above-mentioned login code can be used to verify the login identity. In addition, the above-mentioned login code can also be used as a password to use the Password based Authenticated Key Exchange (PAKE) protocol to negotiate and derive a session key to verify the login identity.
[0264] In step 604 , the central proxy login device 20 sends a first response message to the IoT APP. The first response message is used to indicate that the central proxy login device 20 is not bound to any central device.
[0265] Specifically, since the central agent login device 20 is not connected to any central device at this time, the central agent login device 20 sends a first response message to the IoT APP. The first response message is used to notify the IoT APP that the central agent login device 20 is not bound to any central device.
[0266] In step 605 , the IoT APP sends a multicast message based on the received first response message. The multicast message is used to search for unbound hub devices in the local network.
[0267] Specifically, when the IoT APP receives the first response message sent by the central agent login device 20, it recognizes that the central agent login device 20 has not yet bound any central device. At this time, the IoT APP can send a multicast message. Among them, the multicast message can be used to search for unbound central devices in the local network. It is understandable that the number of unbound central devices in the local network can be one or more.
[0268] In step 606 , the main hub device 30 receives the multicast message and sends a second response message to the IoT APP.
[0269] Specifically, when any hub device in the local network (e.g., the master hub device 30) receives a multicast message sent by the IoT APP, it can send a second response message to the IoT APP. The second response message can be a unicast message, and the second response message can be used to inform the IoT APP of the basic information of the hub device (e.g., the master hub device 30). Exemplarily, the second response message can include information such as the device name, IP address, serial number SN, MAC address, device type, model, version number, and a list of functions supported by the device.
[0270] In step 607 , the IoT APP determines the main hub device 30 , and establishes an encrypted connection with the determined main hub device 30 to establish an encrypted channel.
[0271] Specifically, when the IoT APP receives the second response message sent by the hub device, it can obtain the basic information of all hub devices in the local network, thereby determining a hub device among the above hub devices as the master hub device 30. In specific implementation, the methods for determining the master hub device 30 may include the following two methods:
[0272] Method 1: Manual selection
[0273] After the IoT APP receives the basic information of the hub device, it can display a list of hub devices on the IoT APP interface. The user can click to select a hub device in the list as the main hub device 30. Then, other hub devices can be used as backup hub devices 31.
[0274] Method 2: Automatic selection
[0275] After receiving the basic information of the hub device, the IoT APP can automatically select a hub device as the main hub device 30 and other hub devices as backup hub devices 31 based on the type, version number, supported functions and other conditions of the hub device.
[0276] Then, after the IoT APP determines the main hub device 30, it can establish an encrypted connection with the determined main hub device 30. The encrypted connection can use, for example, the PAKE protocol with a default PIN code. It is understandable that in some embodiments, the encrypted connection can also use, for example, the Simple Password Exponential Key Exchange (SPEKE) protocol with a default PIN code. The embodiment of the present application does not specifically limit the protocol used to establish the encrypted connection.
[0277] Step 608: The main hub device 30 is initialized and generates a device ID and an authentication credential AuthCode.
[0278] Specifically, after the main hub device 30 establishes a secure connection with the IoT APP, it can be initialized. The above initialization may include the following operations. For example, the main hub device 30 can be set as the main device, and the main device can carry the device proxy registration service. At the same time, the main hub device 30 can also be an access point gateway. In this case, the main hub device 30 can derive the main device registration information, wherein the main device registration information can include the device ID and authentication credential AuthCode of the main hub device 30. The above authentication credential AuthCode can be a symmetric key authentication, that is, the device controller and the controlled device both have the same authentication credential, so as to negotiate whether the authentication credential AuthCode of the two parties is the same. It can be understood that the above symmetric key authentication is the simplest authentication method. Relatively speaking, there is a more complex but more secure authentication method, such as the asymmetric key method. For the asymmetric key method, the device controller and the controlled device each have their own identity authentication credentials (public-private key pair). During the device binding phase, after a secure session channel is established between the IoT APP and the hub device, their respective private keys are exchanged. Then, when the connection is discovered, the legitimacy of the identity can be verified by using the other party's public key to verify the other party's private key signature data.
[0279] In step 609 , the main hub device 30 sends an initialization success message and main device registration information to the IoT APP.
[0280] Specifically, when the master hub device 30 is initialized, the IoT APP can send an initialization success message, which is used to notify the IoT APP that the master hub device 30 has completed the initialization operation. Further, the master hub device 30 can also send master device registration information to the IoT APP.
[0281] In step 610 , the IoT APP sends the main device registration information to the central agent login device 20 .
[0282] Specifically, after receiving the master device registration message sent by the master hub device 30, the IoT APP can send the master device registration message and the IP address and device identifier of the master hub device 30 to the hub agent login device 20. The IP address and device identifier of the master hub device 30 can be obtained from the basic information of the hub device in step 607.
[0283] Step 611: the central agent login device 20 requests registration from the main central device 30 according to the main device registration information.
[0284] Specifically, after the central proxy login device 20 receives the master device registration message and the IP address and device identifier of the master hub device 30 sent by the IoT APP, it can request registration from the master hub device 30 based on the master device registration information. This registration request is used to register the central proxy login device 20 as a device on the master hub device 30. After the central proxy login device 20 completes registration on the master hub device 30, the master hub device 30 can mark the central proxy login device 20 as registered.
[0285] In step 612, the central proxy login device 20 establishes a secure connection with the main central device 30, establishes a secure session channel, and maintains the secure session channel.
[0286] Specifically, when the central agent login device 20 completes the registration on the main hub device 30, the main hub device 30 can establish a secure connection based on the authentication credentials AuthCode obtained during registration, thereby enabling the central agent login device 20 to establish a secure session channel with the main hub device 30 and maintain the secure session channel. It can be understood that the encrypted connection in the above step 607 is a channel established between the mobile device 10 and the main hub device 30. Since the mobile device 10 and the main hub device 30 do not know each other, they can only establish an encrypted channel through the default PIN code to interact. After the central agent login device 20 is registered with the main hub device 30, a secure session channel can be established for communication based on the device credentials (for example, authentication credentials AuthCode) agreed upon by both parties. Therefore, there is no need to establish an encrypted channel as shown in step 607 between the central agent login device 20 and the main hub device 30.
[0287] Step 613: the central proxy login device 20 sends a main central device online message to the IoT APP.
[0288] Specifically, after the central proxy login device 20 establishes a connection with the main hub device 30, the main hub device online message can be sent to the IoT APP, thereby completing the registration and binding between the central proxy login device 20 and the main hub device 30. It is understandable that in the following steps, the IoT APP and the main hub device 30 will not communicate directly, but the IoT APP will communicate indirectly with the main hub device 30 through the central proxy login device 20.
[0289] In step 614 , the IoT APP sends a backup device registration information request to the main hub device 30 to apply for backup device registration information.
[0290] Optionally, if the local network also includes other hub devices (for example, a backup hub device 31), the user can also bind the above-mentioned backup hub device 31 through the IoT APP. It is understandable that the number of the above-mentioned backup hub devices 31 can be 0, 1, or multiple. If the local network includes at least one backup hub device 31, the IoT APP can send a backup device registration information request to the main hub device 30 to apply for backup device registration information, wherein the backup device registration information can include the device ID and authentication credentials AuthCode of the backup hub device 31. It should be noted that the backup device registration information request can be sent by the IoT APP to the hub agent login device 20, and forwarded to the main hub device 30 by the hub agent login device 20.
[0291] In step 615 , the main hub device 30 sends the device ID and authentication credential AuthCode of the backup hub device 31 to the IoT APP.
[0292] Optionally, after the main hub device 30 receives the backup device registration information request sent by the IoT APP, it can derive the device ID and authentication credentials AuthCode of the backup hub device 31, and can send the device ID and authentication credentials AuthCode of the backup hub device 31 to the IoT APP. It should be noted that the above-mentioned backup device registration information (for example, the device ID and authentication credentials AuthCode of the backup hub device 31) can be sent to the IoT APP by the hub agent login device 20, and forwarded to the IoT APP by the hub agent login device 20.
[0293] In step 616 , the IoT APP initiates an encrypted connection with the backup hub device 31 to establish an encrypted channel.
[0294] Optionally, when the IoT APP receives the backup device registration information (e.g., the device ID and authentication credentials AuthCode of the backup hub device 31) sent by the main hub device 30, it can initiate an encrypted connection with the backup hub device 31. The above-mentioned encrypted connection can be, for example, based on SPEKE negotiation without a PIN code. For details, please refer to step 607, which will not be repeated here.
[0295] Step 617: Initialize the backup hub device 31.
[0296] Optionally, after the backup hub device 31 establishes a connection with the IoT APP, it can be initialized. The initialization of the backup hub device 31 can refer to the initialization of the main hub device 30 and will not be repeated here. However, it should be noted that the backup hub device 31 does not accept device registration.
[0297] In step 618 , the IoT APP sends the backup device registration information and the IP address and device identifier of the main hub device 30 to the backup hub device 31 .
[0298] Optionally, the IoT APP sends the backup device registration information (eg, the device ID and authentication credentials AuthCode of the backup hub device 31 ) and the IP address and device identification of the main hub device 30 to the backup hub device 31 .
[0299] In step 619 , the backup hub device 31 registers with the main hub device 30 based on the backup device registration information.
[0300] Optionally, after the backup hub device 31 receives the backup device registration information, the IP address and the device identifier of the main hub device 30 sent by the IoT APP, the backup hub device 31 can be registered as a device on the main hub device 30 based on the backup device registration information. After the backup hub device 31 completes registration on the main hub device 30, the main hub device 30 can mark the backup hub device 31 as registered.
[0301] In step 620 , the backup hub device 31 establishes a secure connection with the main hub device 30 , establishes a secure session channel, and maintains the secure session channel.
[0302] Optionally, after the backup hub device 31 completes registration on the main hub device 30, it can establish a secure connection with the main hub device 30 and maintain the secure session channel. The specific method for the backup hub device 31 to establish a secure connection with the main hub device 30 can refer to the method for the hub agent login device 20 to establish a secure connection with the main hub device 30 in step 612, which will not be repeated here.
[0303] Step 621 , the main hub device 30 sends a backup hub device online message to the hub agent login device 20 .
[0304] Optionally, after the backup hub device 31 establishes a connection with the main hub device 30, the main hub device 30 may send a backup hub device online message to the hub agent login device 20, wherein the backup hub device online message is used to notify IoTAPP that the backup hub device 31 is online.
[0305] In step 622, the central agent login device 20 sends the backup central device online message to the IoT APP.
[0306] In an embodiment of the present application, the above process can realize the task of selecting and binding the main hub device when the IoT APP logs in for the first time. The user does not need to remember the cumbersome management password of the main hub device to complete the first login and binding tasks, thereby improving the work efficiency of the installer and improving the user experience.
[0307] The above Figure 6 This article introduces the application scenario of first-time login and binding to the main hub. Figure 7 The application scenario of the newly added central agent login device 20 is introduced. In the above application scenario, the main central device 30 has completed the binding with a central agent login device 20 and established a connection with the central agent login device 20. However, in actual application, if the central agent login device 20 fails, it will affect the installation and operation personnel, resulting in the inability to log in to the main central device. Therefore, in the application scenario of the embodiment of the present application, a new central agent login device 20 can be added, thereby allowing the installation and operation personnel to flexibly select the central agent login device 20, thereby avoiding the problem of the central agent login device 20 being damaged or failing and causing the task to be unable to be completed.
[0308] like Figure 7 FIG. 1 is a flow chart of another embodiment of the device login method provided in an embodiment of the present application, including:
[0309] Step 701: The central agent login device 20 displays the login code.
[0310] Specifically, the central proxy login device 20 (hereinafter referred to as "proxy device 1" for ease of explanation) can periodically and dynamically display a login code, or the login code can be dynamically generated by the user by pressing a button on the proxy device 1. In a specific implementation, the login code can be 4-8 random digits, or a random QR code, which can include the IP address of the proxy device 1 and the login random number.
[0311] In step 702 , the user starts the IoT APP in the mobile device 10 .
[0312] Step 703: The user logs in to the proxy device 1 through the IoT APP.
[0313] Specifically, after a user launches the IoT app, they can use it to log in to proxy device 1. For example, the user can use the IoT app to scan a QR code displayed on proxy device 1, or enter a login code displayed on proxy device 1. The login code can be used to verify the login identity. Furthermore, the login identity can be verified by using the login code as a password and using the Password Based Authenticated Key Exchange (PAKE) protocol to negotiate and derive a session key.
[0314] In step 704 , the proxy device 1 sends a third response message to the IoT APP. The third response message is used to indicate that the proxy device 1 has been connected to the main hub device 30 .
[0315] Specifically, since the proxy device 1 is connected to the main hub device 30 at this time, the proxy device 1 can send a third response message to the IoT APP, and the third response message is used to notify the IoT APP that the proxy device 1 is connected to the main hub device 30.
[0316] In step 705 , the IoT APP sends a multicast message based on the received third response message. The multicast message is used to search for unregistered central agent login devices in the local network.
[0317] Specifically, when the IoT APP receives the third response message sent by the proxy device 1, it identifies that the proxy device 1 has been bound to the main hub device 30. At this time, the IoT APP can send a multicast message. Among them, the multicast message can be used to search for unregistered hub proxy login devices in the local network. It can be understood that the number of unregistered hub proxy login devices in the local network can be one or more. The embodiment of the present application is exemplified by an unregistered hub proxy login device, but it does not constitute a limitation of the embodiment of the present application.
[0318] Step 706: The unregistered central agent login device receives the multicast message and sends a fourth response message to the IoT APP.
[0319] Specifically, when any unregistered central proxy login device in the local network (for the convenience of explanation, the unregistered central proxy login device will be referred to as "proxy device 2" below) receives the multicast message sent by the IoT APP, the proxy device 2 can send a fourth response message to the IoT APP. The fourth response message can be a unicast message, and the fourth response message can be used to inform the IoT APP of the basic information of the proxy device 2. Exemplarily, the fourth response message may include the device name, IP address, serial number SN, MAC address, device type, model, version number, a list of functions supported by the device, and other information of the proxy device 2.
[0320] In step 707 , the IoT APP sends a new device registration information request to the main hub device 30 to apply for new device registration information.
[0321] Specifically, after the IoT APP receives the basic device information sent by proxy device 2, the device list of the central proxy login device can be displayed on the IoT APP display interface. Among them, the device list of the central proxy login device can include proxy device 1 and proxy device 2. Proxy device 1 can be in a registered state, and proxy device 2 can be in an unregistered state. At this time, the user can choose to bind the above-mentioned proxy device 2, thereby making proxy device 2 also in a registered state. Then, in subsequent tasks, either proxy device 1 or proxy device 2 can be selected as the access point, avoiding the inability to complete the task due to damage or failure of either proxy device.
[0322] In a specific implementation, after the user determines to bind the above-mentioned proxy device, for example, the user can select proxy device 2 as a new access point in the device list in the display interface of the above-mentioned IoT APP, and in response to the user's operation, the IoTAPP can send a new device registration information request to the main hub device 30 to apply for new device registration information. Among them, the new device registration information can be the registration information of the proxy device 2. In other words, the new device registration information request is used to request the registration information of the proxy device 2, and the registration information of the proxy device 2 can include the device ID and authentication credentials AuthCode of the proxy device 2. It should be noted that the new device registration information request can be sent by the IoT APP to the proxy device 1, and forwarded by the proxy device 1 to the main hub device 30.
[0323] In step 708 , the main hub device 30 derives the device ID and authentication credential AuthCode of the proxy device 2 .
[0324] Specifically, after receiving the new device registration information request sent by the agent device 1 , the main hub device 30 may derive the registration information of the agent device 2 (eg, the device ID and the authentication credential AuthCode).
[0325] In step 709 , the main hub device 30 sends the new device registration information to the IoT APP.
[0326] Specifically, after the main hub device 30 derives the new device registration information, that is, the registration information of the proxy device 2, it can send the new device registration information to the IoT app. It should be noted that the new device registration information request can be sent by the main hub device 30 to the IoT app and forwarded to the IoT app by the proxy device 1.
[0327] In step 710 , the IoT APP initiates an encrypted connection with the proxy device 2 to establish an encrypted channel.
[0328] Specifically, after the IoT App receives the new device registration information (e.g., the device ID and authentication credentials AuthCode of proxy device 2) from the master hub device 30, it can initiate an encrypted connection with proxy device 2 to establish an encrypted channel. The encrypted connection can, for example, be based on a SPEKE negotiation without a PIN code. For details, see step 607, which will not be repeated here.
[0329] In step 711 , the IoT APP sends new device registration information and the IP address and device identifier of the main hub device 30 to the proxy device 2 .
[0330] Specifically, the IoT APP sends the new device registration information (eg, the device ID and authentication credentials AuthCode of the proxy device 2 ) and the IP address and device identification of the main hub device 30 to the proxy device 2 .
[0331] In step 712 , the proxy device 2 registers with the main hub device 30 based on the new device registration information.
[0332] Specifically, after the proxy device 2 receives the new device registration information, the IP address and the device identifier of the main hub device 30 sent by the IoT APP, the proxy device 2 can be registered as a device on the main hub device 30 based on the new device registration information. After the proxy device 2 completes registration on the main hub device 30, the main hub device 30 can mark the proxy device 2 as registered.
[0333] In addition, when the proxy device 2 registers on the main hub device 30, it can also carry a capability identifier, which can be used to characterize the capability of the proxy device 2 as a hub proxy login device, that is, the proxy device 2 can also serve as a registered access point.
[0334] In step 713 , the proxy device 2 establishes a secure connection with the main hub device 30 and establishes a secure session channel.
[0335] Specifically, after the proxy device 2 completes registration on the main hub device 30, it can establish a secure connection with the main hub device 30, establish a secure session channel, and maintain the secure session channel. The specific method for establishing a secure connection between the proxy device 2 and the main hub device 30 can refer to the method for establishing a secure connection between the hub proxy login device 20 and the main hub device 30 in step 612, which will not be repeated here.
[0336] In step 714 , the main hub device 30 sends a new device online message to the IoT APP.
[0337] Specifically, after the proxy device 2 establishes a connection with the main hub device 30, the main hub device 30 can send a new device online message to the IoT APP, wherein the new device online message is used to notify the IoT APP that the proxy device 2 has been online, and the proxy device 2 can serve as a newly added hub proxy login device. It should be noted that the above-mentioned new device online message can be sent by the main hub device 30 to the proxy device 1, and forwarded by the proxy device 1 to the IoT APP.
[0338] Step 715: The user adds a new central agent device.
[0339] Specifically, when the IoT APP receives the new device online message sent by the main hub device 30, it can ask the user on the display interface of the IoT APP whether to add the proxy device 2 as a new hub proxy login device. At this time, the user can select the proxy device 2 as the new hub proxy login device (login node).
[0340] In step 716 , the IoT APP sends a new device addition notification to the main hub device 30 .
[0341] Specifically, if the user selects to add proxy device 2 as the new hub proxy login device, the IoT APP can send a new device addition notification to the main hub device 30. The new device addition notification is used to notify the main hub device 30 that the user has selected proxy device 2 as the new hub proxy login device, and to notify the main hub device 30 to update the new hub proxy login device list. It should be noted that the above-mentioned new device addition notification can be sent by the IoT APP to proxy device 1, and forwarded by proxy device 1 to the main hub device 30.
[0342] In step 717 , the main hub device 30 updates settings based on the new device addition notification.
[0343] Specifically, after receiving the new device addition notification sent by the IoT APP, the main hub device 30 can update the settings. For example, it can add the proxy device 2 to the list of hub proxy login devices. After the main hub device 30 updates the settings, the user can also log in to the main hub device 30 using the IP address and login code of the proxy device 2. This allows the user to arbitrarily select the proxy device 1 or the proxy device 2 to log in to the main hub device 30, thereby increasing the user's flexibility in selection and improving the user experience.
[0344] Next, the following Figure 8 The application scenario of controlling IoT devices is further introduced. In the above application scenario, the user has bound the main hub device 30, the backup hub device 31, the hub agent login device 20, and the IoT device 40. It can be understood that, optionally, the above IoT device 40 can be replaced with the IoT gateway 41. The following only takes the IoT device 40 as an example for explanation. Among them, a connection has been established between the backup hub device 31 and the IoT device 40 and the main hub device 30, and a session channel is maintained. At this time, the user does not need to distinguish which hub device is the main hub device. He only needs to control the IoT device 40 through the hub agent login device 20, and there is no need to remember the administrator password of the main hub device 30. This can improve the work efficiency of the installation and maintenance personnel, and thus improve the user experience.
[0345] like Figure 8 FIG. 1 is a flow chart of another embodiment of the device login method provided in the embodiment of the present application, including:
[0346] Step 801: The central agent login device 20 starts and searches for the central device.
[0347] Specifically, when the hub agent login device 20 is started, it can search for hub devices to find the main hub device 30. Exemplarily, the hub agent login device 20 can send a multicast search message to all hub devices in the local network, and the search message is used to search for the main hub device 30.
[0348] Step 802 , the main hub device 30 sends a fifth response message to the hub agent login device 20 .
[0349] Specifically, when the main hub device 30 receives the multicast message sent by the hub agent login device 20, it can send a fifth response message to the hub agent login device 20. The fifth response message can be used to notify the hub agent login device 20 that the device that sent the fifth response message is the main hub device 30. It can be understood that the above-mentioned fifth response message can be sent in unicast form. The fifth response message may include the identity of the main hub device 30 (for example, information such as device ID and IP address).
[0350] Step 803 , the central proxy login device 20 establishes a secure connection with the main central device 30 .
[0351] Specifically, when the central proxy login device 20 receives the fifth response message sent by the main central device 30, it can establish a secure connection with the main central device 30 that sent the fifth response message and maintain a secure session channel. Figure 6 The embodiments shown will not be described in detail here.
[0352] Step 804: the central agent login device 20 displays the login code.
[0353] Specifically, the central proxy login device 20 may periodically and dynamically display the login code, or the login code may be dynamically generated by the user by pressing a button on the central proxy login device 20. In a specific implementation, the login code may be 4-8 random digits, or a random QR code, which may include the IP address of the central proxy login device 20 and the login random number.
[0354] In step 805 , the user starts the IoT APP in the mobile device 10 .
[0355] Step 806 , the user logs in to the central agent login device 20 through the IoT APP.
[0356] Specifically, after the user starts the above-mentioned IoT APP, the above-mentioned IoT APP can be used to log in to the central agent login device 20. Exemplarily, the user can scan the QR code displayed by the central agent login device 20 through the above-mentioned IoT APP, or enter the login code displayed by the central agent login device 20 to log in to the above-mentioned central agent login device 20. Among them, the above-mentioned login code can be used to verify the login identity. In addition, the above-mentioned login code can also be used as a password to use the Password based Authenticated Key Exchange (PAKE) protocol to negotiate and derive a session key to verify the login identity.
[0357] In step 807 , the central proxy login device 20 sends the device control information of the main central device 30 to the IoT APP.
[0358] Specifically, after the user logs in to the central agent login device 20 through the IoT APP, the central agent login device 20 can send the device control information of the main central device 30 to the IoT APP to notify the IoT APP of the information of the IoT devices 40 that the main central device 30 can control.
[0359] Step 808 : In response to the user's control operation, the IoT APP sends a control instruction to the IoT device 40 .
[0360] Specifically, when the IoT APP receives the information of the main hub device 30 sent by the central agent login device 20, it can obtain the information of the IoT device 40 controlled by the main hub device 30. Then, the user can select the IoT device 40 for control on the IoT APP display interface. In response to the user's control operation, the IoT APP can send a control instruction to the IoT device 40 to control the corresponding IoT device 40. It should be noted that the above-mentioned control instruction can be sent by the IoT APP to the central agent login device 20, forwarded by the central agent login device 20 to the main hub device 30, and then forwarded to the IoT device 40 by the main hub device 30.
[0361] Step 809 : The IoT device 40 receives the control instruction and returns a sixth response message.
[0362] Specifically, when the IoT device 40 receives the above-mentioned control instruction, it can perform corresponding operations based on the above-mentioned control instruction. For example, if the above-mentioned control instruction is a configuration instruction, the IoT device 40 can perform corresponding configuration on the IoT device. After the configuration of the IoT device 40 is completed, a sixth response message can be sent to the IoT APP. For example, the sixth response message can be a configuration completion message, which is used to notify the IoT APP that the IoT device 40 has been configured. It can be understood that the IoT device 40 can also actively report the device status change event to the IoT APP. The device status change event is used to characterize the event of the state change of the IoT device. It should be noted that the above-mentioned sixth response message or device status change event can be sent by the IoT device 40 to the main hub device 30, forwarded by the main hub device 30 to the hub agent login device 20, and then forwarded to the IoT APP by the hub agent login device 20.
[0363] Next, the following Figure 9 The application scenario in which the central agent login device is co-deployed with the main central device is further introduced. In the above application scenario, the user has not yet bound any central device, wherein the central agent login device and any central device are deployed on the same device (for the convenience of explanation, the device will be referred to as a "co-deployed device" below). In a specific implementation, the co-deployed device may include a central agent login module and a central module, the central agent login module may realize the functions of the central agent login device, and the central module may realize the functions of the central device (for example, the main central device 30).
[0364] like Figure 9FIG. 1 is a flow chart of another embodiment of the device login method provided in the embodiment of the present application, including:
[0365] Step 901: The central agent login module displays the login code.
[0366] Specifically, the co-deployed device can periodically display a login code through the central proxy login module, or the login code can be dynamically generated by the user by pressing a button on the co-deployed device. In a specific implementation, the login code can be 4-8 random digits, or a random QR code that includes the IP address of the co-deployed device and the login random number.
[0367] In step 902 , the user starts the IoT APP in the mobile device 10 .
[0368] Step 903: The user logs in to the co-deployed device through the IoT APP.
[0369] Specifically, after the user starts the above-mentioned IoT APP, the above-mentioned IoT APP can be used to log in to the co-deployed device. In response to the user's operation, the IoT APP can send a login request to the central agent login module of the co-deployed device to log in to the above-mentioned co-deployed device. Exemplarily, the user can scan the QR code displayed by the co-deployed device through the above-mentioned IoT APP, or enter the login code displayed by the co-deployed device to log in to the above-mentioned co-deployed device. Among them, the above-mentioned login code can be used to verify the login identity. In addition, the above-mentioned login code can also be used as a password to use the Password based Authenticated Key Exchange (PAKE) protocol to negotiate and derive a session key to verify the login identity.
[0370] In step 904 , the central proxy login module in the co-deployed device receives the login request of the IoT APP and forwards the login request to the central module.
[0371] Specifically, the co-deployed device can receive the login request sent by the IoT APP through the central proxy login module. When the central proxy login module receives the login request sent by the IoT APP, it can determine whether it is co-deployed with the central module. If the central proxy login module determines that it is co-deployed with the central module, it can forward the login request to the central module.
[0372] In step 905 , the hub module is initialized and the co-deployed device is set as the main hub device 30 .
[0373] Specifically, after the hub module receives the login request forwarded by the hub proxy login module, it can be initialized. This initialization can include setting the co-deployed device as the master hub device 30, meaning that the co-deployed device can receive registrations from other devices. Subsequently, the device ID and authentication credentials AuthCode of the master hub device 30 can be derived, and the co-deployed device can be marked as an access point.
[0374] Step 906: The central module sends a seventh response message to the central agent login module.
[0375] Specifically, when the central module completes initialization, it can send a seventh response message to the central agent login module. Among them, the seventh response message can be used to notify the IoT APP that the registration has been successful. Then, the central agent login module can forward the seventh response message to the IoT APP.
[0376] Step 907: The co-deployed device sends a multicast message to search for unregistered backup hub devices 31 in the local network.
[0377] Specifically, when the hub module completes initialization, the co-deployed device can send multicast messages through the hub module to the unregistered backup hub devices 31 in the local network. It can be understood that the number of the above-mentioned unregistered backup hub devices 31 can be one or more. The following only takes one unregistered backup hub device 31 as an example for explanation, but it does not constitute a limitation on the embodiments of the present application.
[0378] Step 908 : The unregistered backup hub device 31 sends an eighth response message to the hub module of the co-deployed device.
[0379] Specifically, when the unregistered backup hub device 31 receives a multicast message sent by the hub module of the co-deployed device, it can send an eighth response message to the hub module of the co-deployed device, and the eighth response message can be in the form of a unicast. The eighth response message may include basic information of the backup hub device, and the basic information may include, for example, the device name, IP address, serial number SN, MAC address, device type, model, version number, a list of functions supported by the device, and the like.
[0380] In step 909 , the hub module of the co-deployed device derives the device ID and authentication credential AuthCode of the backup hub device 31 .
[0381] Specifically, after the hub module of the co-deployed device receives the eighth response message sent by the backup hub device 31 , it can derive a corresponding device ID and authentication credential AuthCode for the backup hub device 31 .
[0382] Step 910 : The hub module of the co-deployed device establishes an encrypted connection with the backup hub device 31 .
[0383] Specifically, the co-deployed device can establish an encrypted connection with the standby hub device 31 through the hub module, thereby establishing an encrypted channel. The encrypted connection can be established through SPEKE negotiation without a PIN code. The specific process of establishing the encrypted connection can be referenced. Figure 6 The embodiments shown will not be described in detail here.
[0384] In step 911 , the hub module of the co-deployed device sends the registration information to the backup hub device 31 .
[0385] Specifically, after the hub module of the co-deployed device establishes a secure connection with the backup hub device 31, registration information may be sent to the backup hub device 31. The registration information may include the device ID and authentication credentials AuthCode of the backup hub device 31.
[0386] Step 912: The backup hub device 31 establishes a secure connection with the hub module of the co-deployed device.
[0387] Specifically, after the backup hub device 31 receives the above-mentioned registration information (for example, the device ID and authentication credentials AuthCode of the backup hub device 31), it can use the above-mentioned registration information to establish a secure connection with the hub module of the co-deployed device, thereby establishing a secure session channel. It can be understood that the encrypted connection in the above-mentioned step 910 is the channel established before the backup hub device 31 is registered to the main hub device 30. Since the backup hub device 31 and the main hub device 30 do not know each other, they can only establish an encrypted channel through the default PIN code to interact. After the backup hub device 31 is registered to the main hub device 30, the above-mentioned encrypted channel is no longer used. Instead, a secure session channel can be established for communication based on the device credentials (for example, authentication credentials AuthCode) agreed upon by both parties. In this way, the registration of the backup hub device 31 on the co-deployed device can be completed.
[0388] In step 913 , the co-deployed device sends an online message of the backup hub device 31 to the IoT APP.
[0389] Specifically, after the hub module of the co-deployed device establishes a connection with the backup hub device 31, it can send an online message of the backup hub device 31 to the hub agent login module, and the hub agent login module can forward the online message of the backup hub device 31 to the IoT APP. The online message of the backup hub device 31 is used to notify the IoT APP that the backup hub device 31 has established a connection with the co-deployed device (that is, the main hub device 30).
[0390] It should be noted that the above Figure 6-Figure 9The illustrated embodiment merely illustrates the application scenario of the backup hub device, but does not constitute a limitation on the embodiments of the present application. In some embodiments, the backup hub device may also be replaced with a slave hub device.
[0391] Figure 10 This is a structural diagram of an embodiment of the device login device of this application, as shown in Figure 10 As shown, the device login apparatus 1000 is applied to a first device and may include: a display module 1010, a login module 1020, a first registration module 1030, a connection module 1040 and a first sending module 1050; wherein,
[0392] Display module 1010, configured to display a login code on the first device; wherein the login code is used by the second device to log in to the first device;
[0393] Login module 1020, configured for the first device to receive a login request sent by the second device and send a first response message to the second device; wherein the login request includes a login code; and the first response message is used to indicate that the first device is not connected to the third device;
[0394] A first registration module 1030 is configured for the first device to receive the master device registration information sent by the second device and register with the third device based on the master device registration information;
[0395] A connection module 1040 is configured to establish a secure connection between the first device and the third device;
[0396] The first sending module 1050 is configured to send a master device online message to a second device via the first device; wherein the master device online message is used to notify the second device that a secure connection has been established with the third device.
[0397] In one possible implementation, the main device registration information includes the device ID and authentication credential AuthCode of the third device.
[0398] In one possible implementation, the device login apparatus 1000 further includes:
[0399] Request module 1060, configured for the first device to receive a fourth device registration information request sent by the second device; wherein the fourth device registration information request is used to request registration information of the fourth device;
[0400] The second registration module 1070 is configured to: transmit a registration information request of a fourth device to a third device via the first device; receive the registration information of the fourth device sent by the third device; and transmit the registration information of the fourth device to the second device via the first device;
[0401] In the second sending module 1080, the first device receives a fourth device online message sent by the third device, wherein the fourth device online message is used to indicate that the third device has established a secure connection with the fourth device; the first device sends the fourth device online message to the second device.
[0402] In one possible implementation, the third device is a master hub device, and the fourth device is a slave hub device or a backup hub device; wherein the third device can receive device registration, and the fourth device does not receive device registration.
[0403] Figure 11 This is a structural diagram of another embodiment of the device login device of this application, such as Figure 11 As shown, the above-mentioned device login device 1100 is applied to the first device, the first device has been registered in the third device, and the first device has established a secure connection with the third device, and can include: a display module 1110, a login module 1120, a registration module 1130 and a sending module 1140; wherein,
[0404] Display module 1110, configured to display a login code on the first device; wherein the login code is used by the second device to log in to the first device;
[0405] Login module 1120, configured for the first device to receive a login request sent by the second device and send a third response message to the second device; wherein the login request includes a login code; and the third response message is used to indicate that a secure connection has been established between the first device and the third device;
[0406] Registration module 1130, configured for the first device to receive a new device registration information request sent by the second device, wherein the new device registration information request is used to add registration information of the first device; the first device to send the new device registration information request to the third device; the first device to receive the new device registration information sent by the third device, wherein the new device registration information is used to represent the newly added registration information of the first device; and the first device to send the new device registration information to the second device.
[0407] The sending module 1140 is used for the first device to receive a new device online message sent by the third device; wherein the new device online message is used to indicate that the third device has established a secure connection with the newly added first device; the first device sends the new device online message to the second device.
[0408] In one possible implementation, the device login apparatus 1100 further includes:
[0409] The newly added device indication module 1150 is used for the first device to receive a new device addition notification sent by the second device; wherein the new device addition notification is used to instruct the third device to add the first device as a newly added access point; the first device sends the new device addition notification to the third device.
[0410] Figure 12 This is a structural diagram of another embodiment of the device login device of this application, as shown in FIG. Figure 12 As shown, the device login apparatus 1200 is applied to the first device, the first device and the fifth device have been registered in the third device, and the fifth device has established a secure connection with the third device, and may include: a search module 1210, a connection module 1220, a display module 1230, a login module 1240 and a device control module 1250; wherein,
[0411] Search module 1210, configured for the first device to search for the third device; the first device receives a fifth response message sent by the third device; wherein the fifth response message includes an identity identifier of the third device;
[0412] A connection module 1220 is configured to establish a secure connection between the first device and the third device;
[0413] Display module 1230, configured to display a login code on the first device; wherein the login code is used by the second device to log in to the first device;
[0414] Login module 1240, configured for the first device to receive a login request sent by the second device; wherein the login request includes a login code;
[0415] Device control module 1250 is used for the first device to send device control information of a third device to the second device; wherein the device control information of the third device includes information of a fifth device that can be controlled by the third device; the first device receives the control instruction sent by the second device; wherein the control instruction is used to control the fifth device; the first device sends the control instruction to the third device.
[0416] In one possible implementation, the device login apparatus 1200 further includes:
[0417] The information feedback module 1260 is used for the first device to receive the sixth response message or device state change event sent by the fifth device; wherein the sixth response message is used to indicate that the fifth device has completed control based on the control instruction; the device state change event is used to indicate an event of a state change of the fifth device; the first device sends the sixth response message or device state change event to the second device.
[0418] Figure 13 This is a structural diagram of another embodiment of the device login device of this application, as shown in FIG. Figure 13 As shown, the device login apparatus 1300 is applied to the sixth device and may include: a display module 1310, a login module 1320, a first generation module 1330, a search module 1340, a receiving module 1350, a first generation module 1360, a first sending module 1370, a connection module 1380 and a second sending module 1390; wherein,
[0419] Display module 1310, configured to display a login code on the sixth device; wherein the login code is used by the second device to log in to the sixth device;
[0420] Login module 1320, configured for the sixth device to receive a login request sent by the second device; wherein the login request includes a login code;
[0421] The first generating module 1330 is configured to generate master device registration information for the sixth device; wherein the master device registration information includes the device ID and authentication credential AuthCode of the sixth device; the sixth device can receive device registration; and the sixth device is an access point;
[0422] Search module 1340, configured for the sixth device to search for an unregistered fourth device;
[0423] Receiving module 1350, configured for the sixth device to receive an eighth response message sent by the unregistered fourth device; wherein the eighth response message includes basic information of the unregistered fourth device;
[0424] The second generating module 1360, the sixth device generates fourth device registration information for the unregistered fourth device; wherein the fourth device registration information includes registration information of the unregistered fourth device;
[0425] A first connection module 1370 is configured to establish an encrypted connection between the sixth device and the unregistered fourth device;
[0426] A first sending module 1380 is configured for the sixth device to send the fourth device registration information to an unregistered fourth device;
[0427] A second connection module 1390 is configured to enable the sixth device to establish a secure connection with the unregistered fourth device;
[0428] The second sending module 13A0 is used for the sixth device to send the fourth device online message to the second device; wherein the fourth device online message is used to indicate that the sixth device has established a secure connection with the unregistered fourth device.
[0429] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0430] It is understandable that, in order to realize the above functions, the above-mentioned electronic device 100 and the like include hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by those skilled in the art that, in combination with the units and algorithm steps of the various examples described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0431] In the embodiment of the present application, the functional modules of the electronic device 100 and the like can be divided according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, there may be other division methods.
[0432] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0433] The functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0434] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
[0435] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A device login method, applied to a first device, characterized in that: The method comprises: The first device displays a login code; wherein the login code is used for the second device to log in to the first device; The first device receives the login request sent by the second device and sends a first response message to the second device; wherein the login request includes the login code; and the first response message is used to indicate that the first device is not connected to the third device; The first device receives the master device registration information sent by the second device, and registers with the third device based on the master device registration information; The first device establishes a secure connection with the third device; The first device sends a master device online message to the second device; wherein the master device online message is used to notify the second device that the first device has established a secure connection with the third device.
2. The method according to claim 1, characterized in that The main device registration information includes the device ID and authentication credential AuthCode of the third device.
3. The method according to claim 1 or 2, characterized in that The method further comprises: The first device receives a fourth device registration information request sent by the second device, wherein the fourth device registration information request is used to request registration information of the fourth device; The first device sends the fourth device registration information request to the third device; The first device receives registration information of the fourth device sent by the third device; The first device sends the registration information of the fourth device to the second device; The first device receives a fourth device online message sent by the third device; wherein the fourth device online message is used to indicate that the third device has established a secure connection with the fourth device; The first device sends the fourth device online message to the second device.
4. The method according to claim 3, characterized in that The third device is a master hub device, and the fourth device is a slave hub device or a backup hub device; wherein, the third device can receive device registration, and the fourth device does not receive device registration.
5. A device login method, applied to a first device, characterized in that: The first device has been registered with a third device, and the first device has established a secure connection with the third device. The method includes: The first device displays a login code; wherein the login code is used for the second device to log in to the first device; The first device receives the login request sent by the second device and sends a third response message to the second device; wherein the login request includes the login code; and the third response message is used to indicate that the first device has established a secure connection with the third device; The first device receives a new device registration information request sent by the second device; wherein the new device registration information request is used to request registration information of the newly added first device; The first device sends the new device registration information request to the third device; The first device receives the new device registration information sent by the third device; wherein the new device registration information is used to represent the registration information of the newly added first device; The first device sends the new device registration information to the second device; The first device receives a new device online message sent by the third device; wherein the new device online message is used to indicate that the third device has established a secure connection with the newly added first device; The first device sends the new device online message to the second device.
6. The method according to claim 5, characterized in that The method further comprises: The first device receives a new device addition notification sent by the second device; wherein the new device addition notification is used to instruct the third device to use the newly added first device as a newly added access point; The first device sends the new device addition notification to the third device.
7. A device login method, applied to a first device, characterized in that: The first device and the fifth device have been registered on the third device, the fifth device has established a secure connection with the third device, and the method includes: The first device searches for the third device; The first device receives a fifth response message sent by the third device; wherein the fifth response message includes an identity identifier of the third device; The first device establishes a secure connection with the third device; The first device displays a login code; wherein the login code is used for the second device to log in to the first device; The first device receives a login request sent by the second device; wherein the login request includes the login code; The first device sends device control information of the third device to the second device; wherein the device control information of the third device includes information of a fifth device controllable by the third device; The first device receives a control instruction sent by the second device; wherein the control instruction is used to control the fifth device; The first device sends the control instruction to the third device.
8. The method according to claim 7, characterized in that The method further comprises: The first device receives a sixth response message or a device state change event sent by the fifth device; wherein the sixth response message is used to indicate that the fifth device has completed control based on the control instruction; and the device state change event is used to indicate an event of a state change of the fifth device; The first device sends the sixth response message or the device state change event to the second device.
9. A device login method, applied to a sixth device, characterized in that: The method comprises: The sixth device displays a login code; wherein the login code is used by the second device to log in to the sixth device; The sixth device receives the login request sent by the second device; wherein the login request includes the login code; The sixth device generates master device registration information; wherein the master device registration information includes the device ID and authentication credential AuthCode of the sixth device; the sixth device can receive device registration; the sixth device is an access point; The sixth device searches for an unregistered fourth device; The sixth device receives an eighth response message sent by the unregistered fourth device; wherein the eighth response message includes basic information of the unregistered fourth device; The sixth device generates fourth device registration information for the unregistered fourth device; wherein the fourth device registration information includes the registration information of the unregistered fourth device; The sixth device establishes an encrypted connection with the unregistered fourth device; The sixth device sends the fourth device registration information to the unregistered fourth device; The sixth device establishes a secure connection with the unregistered fourth device; The sixth device sends a fourth device online message to the second device, wherein the fourth device online message is used to indicate that the sixth device has established a secure connection with the unregistered fourth device.
10. A first device, characterized in that: include: A memory, the memory is used to store computer program code, the computer program code includes instructions, when the first device reads the instructions from the memory, the first device executes the method according to any one of claims 1 to 8.
11. A sixth device, characterized in that: The method comprises: a memory for storing computer program codes, wherein the computer program codes include instructions. When the sixth device reads the instructions from the memory, the sixth device executes the method according to claim 9.
12. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on the first device or the sixth device, cause the first device to execute the method according to any one of claims 1 to 8, or cause the sixth device to execute the method according to claim 9.
Citation Information
Patent Citations
Method and system for realizing intelligent binding between Internet of Things device and controller
CN106685917A
Control method, device and system
CN111049799A