A method and system for controlling smart home devices

Through short-distance communication between the first electronic device and the second electronic device, automatic binding of smart home devices is realized, solving the problem of frequent user changes in hotel scenarios and improving user experience.

CN115576210BActive Publication Date: 2025-07-01NOKIA TECHNOLOGIES OY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110685507.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-21
Publication Date
2025-07-01
Estimated Expiration
2041-06-21

AI Technical Summary

Technical Problem

In hotel scenarios, users of smart home devices change frequently, and different users bind devices at different periods, and existing management solutions are difficult to meet this dynamic scenario demand.

Method used

Through short-range communication between the first electronic device and the second electronic device, automatic binding between the account and the device is realized, and the user can complete the binding of the whole-house equipment in just one step.

Benefits of technology

It significantly improves the user experience, simplifies the process of equipment binding, and adapts to the needs of frequent changes of users in hotel scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115576210B_ABST
    Figure CN115576210B_ABST
Patent Text Reader

Abstract

The present application provides a smart home control method and system, relating to the technical field of smart homes. The smart home system includes a second electronic device, a smart device, and a server. The smart device and the second electronic device are in the same local area network, and the smart device has been registered on the second electronic device. Among them, after short-range communication is performed between the first electronic device where the client logged in by the user's account is located and the second electronic device in the smart home system, the second electronic device can be automatically bound to the user's account, so that the user can control the second electronic device and the smart device registered on the second electronic device. Thus, the user can automatically complete the binding of all devices in the house with only one step of operation or even without any operation, improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of smart home, and in particular to a smart home control method and system. Background Art

[0002] With the popularization of smart home devices, the application of smart devices in hotels is also becoming more and more extensive. The management solution for smart home devices in the home scenario is relatively mature, while the management requirements for smart home devices in the hotel scenario are significantly different from those in the home scenario, which results in some scenario requirements in the hotel scenario that cannot be met by the current mainstream management solutions. For example, the users who bind devices in the hotel scenario change frequently and different users bind at different times, while the users who bind devices in the home scenario are fixed and basically remain unchanged. Therefore, how to provide a secure and easy-to-use technical solution for controlling smart home devices in the hotel scenario is a technical problem that urgently needs to be solved at present. Summary of the Invention

[0003] To solve the above technical problems, this application provides a smart home device control method, a first electronic device, a second electronic device, a server, a computer-readable storage medium, and a computer program product. The technical solution provided by this application enables users to automatically complete the binding of all devices in the house with only one step of operation or even without operation, significantly improving the user experience.

[0004] In a first aspect, a smart home control method is provided. This method is applied to a first electronic device. The first electronic device is provided with a client, the client logs in with a first account, and the client corresponds to a server. The method may include: The first electronic device communicates with a second electronic device in a short distance and obtains first information related to the second electronic device from the second electronic device. The first information includes a first identifier of the second electronic device. Among them, n smart devices are registered on the second electronic device, and the second electronic device and the n smart devices are in the same local area network, where n is a positive integer greater than or equal to 1. The first electronic device sends a first message to the server. The first message contains the first identifier, and the first message is used to obtain a first activation code representing the identity of the second electronic device. The first electronic device receives the first activation code sent by the server. The first electronic device sends a second message to the second electronic device. The second message contains the first account, and the second message is used to request binding the first account to the second electronic device. In response to receiving a third message sent by the second electronic device, the third message contains information indicating the second electronic device's consent to the binding, the first electronic device sends a fourth message to the second electronic device. The fourth message contains the first activation code, and the fourth message is used to instruct the second electronic device to register with the server using the first activation code. The first electronic device receives a seventh message and a twelfth message sent by the server. The seventh message includes device information of the second electronic device, and the twelfth message contains device information of the n smart devices. Among them, the seventh message is sent by the server when the second electronic device is registered on the server, and the twelfth message is sent by the server when the n smart devices respond to the registration instruction sent by the second electronic device and are registered on the server. The first electronic device outputs the device information of the second electronic device and the n smart devices. In this way, by the first electronic device configured with a client communicating with the second electronic device in a short distance, the account logged in on the client can be bound to the second electronic device, so that the user can automatically complete the binding of all devices in the house with only one step of operation or even without any operation, significantly improving the user experience. Exemplarily, one step of operation can be understood as the user only needs to bring the first electronic device close to the second electronic device.

[0005] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with gateway functions, or an electronic device not integrated with gateway functions. Exemplarily, the second electronic device may be a central device with gateway functions, such as a smart speaker, a smart screen, a router, etc.

[0006] According to the first aspect, after the first electronic device outputs the device information of the second electronic device and n smart devices, the method may further include: in response to the received device sharing operation, the first electronic device sends the device sharing information to the server, the device sharing information includes the account to be shared, and the device sharing information is used to instruct the server to bind the account to be shared with the second electronic device. In this way, the user can share the bound device with the companions, which improves the convenience of sharing, so that the companions can operate the second electronic device and / or the smart device.

[0007] According to the first aspect, or any implementation of the first aspect above, after the first electronic device outputs the device information of the second electronic device and the n smart devices, the method further includes: in response to the received unbinding instruction to unbind the second electronic device, the first electronic device sends a thirteenth message to the server, and the thirteenth message is used to instruct to unbind the binding relationship between the second electronic device and the first account. In this way, the user can complete the unbinding of the second electronic device with one click on the client, which improves the convenience of user operation and significantly improves the user experience.

[0008] According to the first aspect, or any implementation of the first aspect above, the first electronic device outputs device information of the second electronic device and n smart devices, including: the first electronic device displays the device information of the second electronic device and the n smart devices, and / or the first electronic device plays the device information of the second electronic device and the n smart devices through voice.

[0009] In a second aspect, a smart home control method is provided, which is applied to a second electronic device. The second electronic device is registered with n smart devices, and the second electronic device and the n smart devices are in the same local area network, where n is a positive integer greater than or equal to 1, and the method includes:

[0010] The second electronic device communicates with the first electronic device over a short distance and sends the first information to the first electronic device. The first information includes the first identifier of the second electronic device. The first electronic device is provided with a client, the client logs in with a first account, and the client corresponds to a server. The second electronic device receives a second message sent by the first electronic device. The second message contains the first account, and the second message is used to request binding the first account to the second electronic device. The second electronic device stores the first account and sends a third message to the first electronic device. The third message contains information indicating that the second electronic device agrees to the binding. The second electronic device receives a fourth message sent by the first electronic device. The fourth message contains a first activation code, and the fourth message is used to instruct the second electronic device to register with the server using the first activation code. The first activation code is generated when the server receives the first message sent by the first electronic device. The first message contains the first identifier, and the first activation code is used to represent the identity of the second electronic device. The second electronic device sends a fifth message to the server. The fifth message contains the first identifier and the first activation code, and the fifth message is used to request registering the second electronic device with the server. In response to receiving the sixth message sent by the server, the sixth message contains information indicating successful registration, the second electronic device sends an eighth message to the server. The eighth message contains the second identifiers of n smart devices, and the eighth message is used to request obtaining n second activation codes representing the identities of the n smart devices. The second electronic device receives the n second activation codes sent by the server, where one second activation code corresponds to one smart device. The second electronic device sends a ninth message to each of the n smart devices respectively. The ninth message contains the second activation code corresponding to the smart device, and the ninth message is used to instruct the smart device to register with the server using the second activation code corresponding to the smart device. In this way, by performing short-distance communication between the first electronic device configured with a client and the second electronic device, the account logged in on the client can be bound to the second electronic device, so that the user can automatically complete the binding of all devices in the house with only one step or even without any operation, significantly improving the user experience.

[0011] Exemplarily, the second electronic device can be a gateway, or an electronic device integrated with gateway functions, or an electronic device not integrated with gateway functions. Exemplarily, the second electronic device can be a central device with gateway functions, such as a smart speaker, a smart screen, a router, and so on.

[0012] According to a second aspect, after the second electronic device sends the ninth message to each of the n smart devices respectively, the method further includes: receiving a shared account sent by the server and storing the shared account. In this way, the account shared by the user can be bound to the second electronic device, so that the people accompanying the user can also use the second electronic device and the smart devices registered on the second electronic device.

[0013] According to a second aspect, or any implementation of the above second aspect, after the second electronic device sends the ninth message to n smart devices respectively, the method further includes: the second electronic device receives a fourteenth message sent by the server, where the fourteenth message is used to instruct the second electronic device to unbind from the first account; in response to the fourteenth message, the second electronic device clears the stored account information and the registration information registered on the server. In this way, the second electronic device can unbind the binding relationship with the account.

[0014] According to a second aspect, or any implementation of the above second aspect, the method further includes: the second electronic device sends a fifteenth message to n smart devices respectively, where the fifteenth message is used to instruct the smart devices to clear the registration information registered on the server. In this way, the smart devices can clear the information registered on the server, and thus do not need to send device status information to the server after the second electronic device unbinds from the user's account, improving the user experience.

[0015] In a third aspect, a smart home control method is provided, which is applied to a first electronic device. The first electronic device is provided with a client, the client logs in with a first account, and the client corresponds to a server. The method includes: the first electronic device performs short-range communication with a second electronic device and obtains first information related to the second electronic device from the second electronic device, where the first information includes a first identifier of the second electronic device; where the second electronic device registers n smart devices, the second electronic device and the n smart devices are in the same local area network, and n is a positive integer greater than or equal to 1; the first electronic device sends a first message to the server, the first message includes the first identifier, and the first message is used to obtain a first activation code representing the identity of the second electronic device; the first electronic device receives the first activation code sent by the server; the first electronic device sends a second message to the second electronic device, the second message includes the first account, and the second message is used to request to bind the first account to the second electronic device; the first electronic device receives a sixteenth message sent by the second electronic device, the sixteenth message includes information requesting to input a maintenance password, where the sixteenth message is sent when the second electronic device determines that it stores account information related to the user account and the first account is not included in the account information; in response to the received password input operation, the first electronic device sends a seventeenth message to the second electronic device, the seventeenth message includes the maintenance password; the first electronic device receives a twentieth message sent by the second electronic device, the twentieth message includes the device information of the second electronic device and the n smart devices; the first electronic device outputs the device information of the second electronic device and the n smart devices. In this way, by performing short-range communication between the first electronic device configured with a client and the second electronic device, the second electronic device can be maintained, so that the user can automatically complete the binding of all devices in the house with only one step or even without any operation, significantly improving the user experience.

[0016] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with a gateway function, or an electronic device not integrated with a gateway function. Exemplarily, the second electronic device may be a hub device with a gateway function, such as a smart speaker, a smart screen, a router, and the like.

[0017] According to the third aspect, after the first electronic device outputs the device information of the second electronic device and the n smart devices, the method further includes: in response to the received unbinding instruction, the first electronic device sends a twenty-first message to the second electronic device, the twenty-first message being used to instruct to release the binding relationship between the second electronic device and the account stored in the second electronic device. In this way, the second electronic device can be unbound on behalf of the owner of other accounts, thereby improving the convenience of operation.

[0018] In a fourth aspect, a smart home control method is provided, which is applied to a second electronic device. The second electronic device is registered with n smart devices, and the second electronic device and the n smart devices are in the same local area network, where n is a positive integer greater than or equal to 1. The method includes: the second electronic device communicates with the first electronic device over a short distance, and sends a first message to the first electronic device, where the first message includes a first identifier of the second electronic device, wherein the first electronic device is provided with a client, the client is logged with a first account, and the client corresponds to a server; the second electronic device receives a second message sent by the first electronic device, the second message includes the first account, and the second message is used to request that the first account be bound to the second electronic device; the second electronic device determines that account information related to the user account is stored, and the account information does not include the first account, and sends a sixteenth message to the first electronic device, the sixteenth message includes information requesting to enter a maintenance password; in response to the seventeenth message sent by the first electronic device, the seventeenth message includes the maintenance password, the second electronic device verifies the maintenance password, and when the verification passes, sends the device information of the second electronic device and the n smart devices to the first electronic device. In this way, by short-distance communication between a first electronic device configured with a client and a second electronic device, the second electronic device can be maintained, so that the user can automatically complete the binding of all the devices in the house with only one step or even no operation, which significantly improves the user experience.

[0019] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with a gateway function, or an electronic device not integrated with a gateway function. Exemplarily, the second electronic device may be a hub device with a gateway function, such as a smart speaker, a smart screen, a router, and the like.

[0020] According to the fourth aspect, after the second electronic device sends the device information of the second electronic device and n smart devices to the first electronic device, the method further includes: the second electronic device receives a twenty-first message sent by the first electronic device, the twenty-first message is used to instruct to release the binding relationship between the second electronic device and the account stored in the second electronic device; in response to the twenty-first message, the second electronic device sends a twenty-second message to the server, the twenty-second message is used to instruct the server to release the binding relationship between the second electronic device and the account stored in the second electronic device; in response to the twenty-third message sent by the server, the twenty-third message contains information of successful unbinding, and the second electronic device clears the account information stored in the second electronic device and the registration information registered on the server. In this way, the second electronic device can release the binding relationship with the account.

[0021] According to the fourth aspect, or any implementation of the fourth aspect above, the method further includes: the second electronic device sends a fifteenth message to n smart devices respectively, and the fifteenth message is used to instruct the smart device to clear the registration information of the smart device that has been registered on the server. In this way, the smart device can clear the information registered on the server, and then after the second electronic device is unbound from the user's account, it does not need to send device status information to the server, thereby improving the user experience.

[0022] In the fifth aspect, a smart home control method is provided, which is applied to a server. The server corresponds to a client, the client logs in to a first account, and the client is set on a first electronic device. The method includes: the server receives a first message sent by the first electronic device, the first message includes a first identifier of the second electronic device, and the first message is used to obtain a first activation code representing the identity of the second electronic device, wherein the first identifier is obtained by the first electronic device through short-distance communication with the second electronic device, the second electronic device is registered with n smart devices, the second electronic device and the n smart devices are in the same local area network, and n is a positive integer greater than or equal to 1; the server generates a first activation code based on the first identifier, and sends the first activation code to the first electronic device. In this way, when the server receives a registration request from the second electronic device, it can determine whether the first activation code carried in the registration request is issued by it. When it is determined that it is issued by it, the server can agree to the registration of the second electronic device, thereby improving the security of device registration.

[0023] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with a gateway function, or an electronic device not integrated with a gateway function. Exemplarily, the second electronic device may be a hub device with a gateway function, such as a smart speaker, a smart screen, a router, and the like.

[0024] According to the fifth aspect, after the server sends the first activation code to the first electronic device, the method further includes: the server receives a fifth message sent by the second electronic device, the fifth message includes the first identifier and the first activation code, and the fifth message is used to request that the second electronic device be registered to the server; the server verifies the first activation code, and records the first identifier when the verification is passed, and sends a sixth message to the second electronic device, the sixth message includes information of successful registration; the server receives an eighth message sent by the second electronic device, the eighth message includes the second identifiers of n smart devices, and the eighth message is used to obtain n second activation codes representing the identities of the n smart devices; the server generates n second activation codes based on each of the n second identifiers, and sends the n second activation codes to the second electronic device; the server receives n tenth messages sent by the n smart devices, each of which includes the second identifier and the second activation code of a smart device, and the tenth message is used to request that the smart device be registered to the server; the server verifies the n second activation codes respectively, and records the second identifiers of the n smart devices respectively when the verification is passed; the server sends a seventh message and a twelfth message to the first electronic device, the seventh message includes device information of the second electronic device, and the twelfth message includes device information of the n smart devices. In this way, by short-distance communication between a first electronic device configured with a client and a second electronic device, the account logged in on the client can be bound to the second electronic device, so that the user only needs to operate in one step or even no operation to automatically complete the binding of all the devices in the house, which significantly improves the user experience.

[0025] According to the fifth aspect, or any implementation of the fifth aspect above, after the server sends the seventh message and the twelfth message to the first electronic device, the method further includes: the server receives the thirteenth message sent by the first electronic device, the thirteenth message is used to instruct to release the binding relationship between the second electronic device and the first account; the server updates the management authority of the second electronic device, and sends the fourteenth message to the second electronic device, the fourteenth message is used to instruct the second electronic device to release the binding relationship with the first account. In this way, the second electronic device can release the binding relationship with the first account.

[0026] According to the fifth aspect, or any implementation of the fifth aspect above, after the server sends the first activation code to the first electronic device, the method further includes: the server receives a twenty-second message sent by the second electronic device, the twenty-second message is used to indicate the release of the binding relationship between the second electronic device and the account stored in the second electronic device; the server updates the management authority of the second electronic device, and sends a twenty-third message to the second electronic device, the twenty-third message includes information on successful unbinding. In this way, the second electronic device can release the binding relationship with the account.

[0027] In a sixth aspect, a first electronic device is provided. The first electronic device is provided with a client, and a first account is logged in to the client. The first electronic device is configured to execute the method according to the first aspect and any implementation manner of the first aspect.

[0028] The sixth aspect and any implementation manner of the sixth aspect respectively correspond to the first aspect and any implementation manner of the first aspect. For the technical effects corresponding to the sixth aspect and any implementation manner of the sixth aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect above, which will not be elaborated here.

[0029] In a seventh aspect, a first electronic device is provided. The first electronic device is provided with a client, and a first account is logged in to the client. The first electronic device is configured to execute the method according to the third aspect and any implementation manner of the third aspect.

[0030] The seventh aspect and any implementation manner of the seventh aspect respectively correspond to the third aspect and any implementation manner of the third aspect. For the technical effects corresponding to the seventh aspect and any implementation manner of the seventh aspect, reference may be made to the technical effects corresponding to the third aspect and any implementation manner of the third aspect above, which will not be elaborated here.

[0031] In an eighth aspect, a second electronic device is provided. n intelligent devices are registered on the second electronic device, and the second electronic device and the n intelligent devices are in the same local area network, where n is a positive integer greater than or equal to 1. The second electronic device is configured to execute the method according to the second aspect and any implementation manner of the second aspect.

[0032] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with gateway functions, or an electronic device not integrated with gateway functions. Exemplarily, the second electronic device may be a central device with gateway functions, such as a smart speaker, a smart screen, a router, and so on.

[0033] The eighth aspect and any implementation manner of the eighth aspect respectively correspond to the second aspect and any implementation manner of the second aspect. For the technical effects corresponding to the eighth aspect and any implementation manner of the eighth aspect, reference may be made to the technical effects corresponding to the second aspect and any implementation manner of the second aspect above, which will not be elaborated here.

[0034] In a ninth aspect, a second electronic device is provided. n intelligent devices are registered on the second electronic device, and the second electronic device and the n intelligent devices are in the same local area network, where n is a positive integer greater than or equal to 1. The second electronic device is configured to execute the method according to the fourth aspect and any implementation manner of the fourth aspect.

[0035] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with gateway functions, or an electronic device without integrated gateway functions. Exemplarily, the second electronic device may be a central device with gateway functions, such as a smart speaker, a smart screen, a router, etc.

[0036] The ninth aspect and any implementation manner of the ninth aspect respectively correspond to the fourth aspect and any implementation manner of the fourth aspect. For the technical effects corresponding to the ninth aspect and any implementation manner of the ninth aspect, reference may be made to the technical effects corresponding to the fourth aspect and any implementation manner of the fourth aspect above, which will not be elaborated here.

[0037] In a tenth aspect, a server is provided, and the server is used to execute the methods in the fifth aspect and any implementation manner of the fifth aspect.

[0038] The tenth aspect and any implementation manner of the tenth aspect respectively correspond to the fifth aspect and any implementation manner of the fifth aspect. For the technical effects corresponding to the tenth aspect and any implementation manner of the tenth aspect, reference may be made to the technical effects corresponding to the fifth aspect and any implementation manner of the fifth aspect above, which will not be elaborated here.

[0039] In an eleventh aspect, a smart home control system is provided, including a client in the sixth aspect and any implementation manner of the sixth aspect, a second electronic device in the eighth aspect and any implementation manner of the eighth aspect, a server in the tenth aspect and any implementation manner of the tenth aspect, and n smart devices, where the n smart devices are registered on the second electronic device, the second electronic device and the n smart devices are in the same local area network, and n is a positive integer greater than or equal to 1.

[0040] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with gateway functions, or an electronic device without integrated gateway functions. Exemplarily, the second electronic device may be a central device with gateway functions, such as a smart speaker, a smart screen, a router, etc.

[0041] The eleventh aspect and any implementation manner of the eleventh aspect respectively correspond to the sixth aspect and any implementation manner of the sixth aspect, the eighth aspect and any implementation manner of the eighth aspect, and the tenth aspect and any implementation manner of the tenth aspect. For the technical effects corresponding to the eleventh aspect and any implementation manner of the eleventh aspect, reference may be made to the technical effects corresponding to the sixth aspect and any implementation manner of the sixth aspect, the eighth aspect and any implementation manner of the eighth aspect, and the tenth aspect and any implementation manner of the tenth aspect above, which will not be elaborated here.

[0042] In a twelfth aspect, there is provided a smart home control system, including a client as described in the seventh aspect and any implementation manner of the seventh aspect, a second electronic device as described in the ninth aspect and any implementation manner of the ninth aspect, a server as described in the tenth aspect and any implementation manner of the tenth aspect, and n smart devices, where the n smart devices are registered on the second electronic device, the second electronic device and the n smart devices are in the same local area network, and n is a positive integer greater than or equal to 1.

[0043] Exemplarily, the second electronic device may be a gateway, or an electronic device integrated with gateway functions, or an electronic device not integrated with gateway functions. Exemplarily, the second electronic device may be a central device with gateway functions, such as a smart speaker, a smart screen, a router, and so on.

[0044] The twelfth aspect and any implementation manner of the twelfth aspect respectively correspond to the seventh aspect and any implementation manner of the seventh aspect, the ninth aspect and any implementation manner of the ninth aspect, and the tenth aspect and any implementation manner of the tenth aspect. For the technical effects corresponding to the twelfth aspect and any implementation manner of the twelfth aspect, reference may be made to the technical effects corresponding to the seventh aspect and any implementation manner of the seventh aspect, the ninth aspect and any implementation manner of the ninth aspect, and the tenth aspect and any implementation manner of the tenth aspect as described above, which will not be elaborated here.

[0045] In a thirteenth aspect, there is provided a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when running on a first electronic device, causes the client on the first electronic device to execute the method as described in the first aspect and any implementation manner of the first aspect, or execute the method as described in the third aspect and any implementation manner of the third aspect.

[0046] The thirteenth aspect and any implementation manner of the thirteenth aspect correspond to the first aspect and any implementation manner of the first aspect, or correspond to the third aspect and any implementation manner of the third aspect. For the technical effects corresponding to the thirteenth aspect and any implementation manner of the thirteenth aspect, reference may be made to the technical effects corresponding to the first aspect and any implementation manner of the first aspect, or reference may be made to the technical effects corresponding to the third aspect and any implementation manner of the third aspect as described above, which will not be elaborated here.

[0047] In a fourteenth aspect, there is provided a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when running on a second electronic device, causes the second electronic device to execute the method as described in the second aspect and any implementation manner of the second aspect, or execute the method as described in the fourth aspect and any implementation manner of the fourth aspect.

[0048] The fourteenth aspect and any implementation of the fourteenth aspect correspond to the second aspect and any implementation of the second aspect, or to the fourth aspect and any implementation of the fourth aspect. For the technical effects corresponding to the fourteenth aspect and any implementation of the fourteenth aspect, reference may be made to the above-mentioned second aspect and any implementation of the second aspect, or to the technical effects corresponding to the fourth aspect and any implementation of the fourth aspect, which will not be elaborated here.

[0049] The fifteenth aspect provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when running on a server, causes the server to execute the method as described in the fifth aspect and any implementation of the fifth aspect.

[0050] The fifteenth aspect and any implementation of the fifteenth aspect correspond to the fifth aspect and any implementation of the fifth aspect. For the technical effects corresponding to the fifteenth aspect and any implementation of the fifteenth aspect, reference may be made to the above-mentioned fifth aspect and any implementation of the fifth aspect, which will not be elaborated here.

[0051] The sixteenth aspect provides a computer program product. When the computer program product runs on a first electronic device, it causes the client on the first electronic device to execute the method as described in the first aspect and any implementation of the first aspect, or to execute the method as described in the third aspect and any implementation of the third aspect.

[0052] The sixteenth aspect and any implementation of the sixteenth aspect correspond to the first aspect and any implementation of the first aspect, or to the third aspect and any implementation of the third aspect. For the technical effects corresponding to the sixteenth aspect and any implementation of the sixteenth aspect, reference may be made to the above-mentioned first aspect and any implementation of the first aspect, or to the technical effects corresponding to the third aspect and any implementation of the third aspect, which will not be elaborated here.

[0053] The seventeenth aspect provides a computer program product. When the computer program product runs on a second electronic device, it causes the second electronic device to execute the method as described in the second aspect and any implementation of the second aspect, or to execute the method as described in the fourth aspect and any implementation of the fourth aspect.

[0054] The seventeenth aspect and any implementation of the seventeenth aspect correspond to the second aspect and any implementation of the second aspect, or to the fourth aspect and any implementation of the fourth aspect. For the technical effects corresponding to the seventeenth aspect and any implementation of the seventeenth aspect, reference may be made to the above-mentioned second aspect and any implementation of the second aspect, or to the technical effects corresponding to the fourth aspect and any implementation of the fourth aspect, which will not be elaborated herein.

[0055] The eighteenth aspect provides a computer program product. When the computer program product runs on a server, it causes the server to execute the method as described in the fifth aspect and any implementation of the fifth aspect.

[0056] The eighteenth aspect and any implementation of the eighteenth aspect correspond to the fifth aspect and any implementation of the fifth aspect. For the technical effects corresponding to the eighteenth aspect and any implementation of the eighteenth aspect, reference may be made to the above-mentioned fifth aspect and any implementation of the fifth aspect, which will not be elaborated herein. Description of the Drawings

[0057] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0058] Figure 2 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;

[0059] Figure 3 It is a schematic flowchart of a method for controlling a smart home device provided by an embodiment of the present application;

[0060] Figure 4 is Figure 3 In the smart home device control method shown, it is a schematic flowchart of the steps for initializing the configuration of devices in a hotel;

[0061] Figure 5 is Figure 4 In the steps for initializing the configuration of devices in a hotel shown, it is a schematic flowchart of the steps for initializing the configuration of a gateway;

[0062] Figure 6 It is a schematic diagram of the interface display of an electronic device during the process of configuring a gateway provided by an embodiment of the present application;

[0063] Figure 7 is Figure 4 In the steps for initializing the configuration of devices in a hotel shown, it is a schematic flowchart of the steps for initializing the configuration of a smart device;

[0064] Figure 8It is a schematic diagram of the interface display of an electronic device provided by an embodiment of the present application;

[0065] Figure 9 It is Figure 4 In the steps of initializing the configuration of the devices in the hotel shown, it is a schematic flowchart of the step of the gateway discovering intelligent devices;

[0066] Figure 10 It is a schematic diagram of the interface display of an electronic device provided by an embodiment of the present application;

[0067] Figure 11 It is a schematic diagram of the interface display of an electronic device provided by an embodiment of the present application;

[0068] Figure 12 It is Figure 3 In the method for controlling smart home devices shown, it is a schematic flowchart of the step of a customer checking into a hotel and binding devices;

[0069] Figure 13 It is a schematic diagram of the interface display of an electronic device provided by an embodiment of the present application;

[0070] Figure 14 It is a schematic flowchart of a customer controlling a smart table lamp provided by an embodiment of the present application;

[0071] Figure 15 It is a schematic diagram of the interface display of an electronic device provided by an embodiment of the present application;

[0072] Figure 16 It is Figure 3 In the method for controlling smart home devices shown, it is a schematic flowchart of the step of a customer sharing a device with fellow travelers;

[0073] Figure 17 It is Figure 3 In the method for controlling smart home devices shown, it is a schematic flowchart of the step of a customer or a hotel administrator unbinding a device;

[0074] Figure 18 It is a schematic diagram of the interface display of an electronic device during the process of a customer unbinding a device provided by an embodiment of the present application;

[0075] Figure 19 It is a schematic flowchart of a smart home control method provided by an embodiment of the present application;

[0076] Figure 20 It is a schematic flowchart of another smart home control method provided by an embodiment of the present application;

[0077] Figure 21 It is a schematic flowchart of yet another smart home control method provided by an embodiment of the present application;

[0078] Figure 22 It is a schematic flowchart of still another smart home control method provided by an embodiment of the present application. Specific embodiments

[0079] The terms used in the following embodiments are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include expressions such as "one or more", unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of the present application, "at least one" and "one or more" mean one or more than two (including two). The term "and / or" is used to describe the association relationship of associated objects and indicates that three relationships may exist; for example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B may be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0080] Reference to "one embodiment" or "some embodiments" etc. described in this specification means that a specific feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, statements such as "in one embodiment", "in some embodiments", "in other some embodiments", "in still other embodiments" etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "comprise", "include", "have" and their variants all mean "include but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise stated.

[0081] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features.

[0082] In the embodiments of the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplarily" or "for example" is intended to present relevant concepts in a specific manner.

[0083] Exemplarily, taking the hotel scenario as an example below, in combination withFigure 1 To illustrate the application scenario of this application.

[0084] For example, Figure 1 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 1 As shown, the gateway 11, smart speaker 12, smart lamp 13 and smart TV 14 are all deployed in the same place (for example, in the same room in a hotel) and belong to the same manager. The mobile phone 15 belongs to the customer, who can be a person staying in the hotel. The gateway 11, smart speaker 12, smart lamp 13 and smart TV 14 can be in the same local area network, and the smart speaker 12, smart lamp 13 and smart TV 14 have all been registered on the gateway 11 (for example, the gateway 11 stores the device information of the smart speaker 12, smart lamp 13 and smart TV 14). The mobile phone 15 is installed with a smart home management application, which can be used to manage devices such as the gateway 11, smart speaker 12, smart lamp 13 and smart TV 14.

[0085] In this solution, when the customer to whom the mobile phone 15 belongs enters the place to which the gateway 11 belongs, the customer can log in to the smart home management application on the mobile phone 15, use the mobile phone 15 to communicate with the gateway 11 in close proximity, and build a secure communication channel. After receiving the binding request from the mobile phone 15, the gateway 11 can agree to bind if it is not bound by other customers, and register itself to the server 16, and notify the smart speaker 12, smart table lamp 13 and smart TV 14 to register with the server 16. Afterwards, the customer to whom the mobile phone 15 belongs can view the gateway 11, smart speaker 12, smart table lamp 13 and smart TV 14 in the smart home management application installed on the mobile phone 15, and then can control the gateway 11, smart speaker 12, smart table lamp 13 and smart TV 14 through the mobile phone 15. Therefore, based on short-distance secure transmission, the binding of multiple devices provides users with a safe and easy-to-use technical solution for controlling smart home devices.

[0086] In addition, when the customer to whom the mobile phone 15 belongs leaves the place to which the gateway 11 belongs, the customer can initiate an unbinding instruction to the gateway 15 through the smart home management application on the mobile phone 15. After receiving the unbinding instruction initiated by the customer, the server 16 can clear the correspondence between the customer and the gateway 15, the smart speaker 12, the smart desk lamp 13 and the smart TV 14, and notify the gateway 15 to unbind the customer. Afterwards, after receiving the notification from the server 16, the gateway 15 can clear the customer's permission information. In this way, the unbinding between the gateway 15 and the customer is achieved, so that the customer no longer has the control authority over the gateway 15 and the devices registered to the gateway 15 after leaving the place to which the gateway 11 belongs.

[0087] In one example, the gateway 11 can be the entry point for the mobile phone 15 to access the smart home system to which the gateway 11 belongs. It can be an independent device or can be hosted as a service on a smart device, such as being hosted on the smart TV 14, etc.

[0088] In one example, connections can be established via a network between the server 16 and the gateway 11, smart speaker 12, smart table lamp 13, smart TV 14, and mobile phone 15 for long-distance communication. For example, the network can be a local area network (LAN) or a wide area network (WAN) (e.g., the Internet). Communication between the mobile phone 15 and the gateway 11 can be based on short-distance communication methods such as near field communication (NFC) or neighborhood aware networking (NAN) that controls the transmission power. Connections between the gateway 11 and smart devices such as the smart speaker 12, smart table lamp 13, or smart TV 14 can be established through powerline communication (PLC), Ethernet cable, wireless fidelity (Wi-Fi), Bluetooth, Zigbee, and other technologies.

[0089] It can be understood that Figure 1 each of the electronic devices shown in can also be replaced by other electronic devices, such as tablet computers, wearable devices, etc. Exemplarily, the electronic devices involved in this solution can include, but are not limited to, those equipped with

[0090] Exemplarily, Figure 2 shows a schematic diagram of the hardware structure of an electronic device. Among them, the electronic device can be Figure 1 any of the electronic devices shown in Figure 2 As shown, the electronic device 200 can include: a processor 210, a memory 220, and a communication module 230. Among them, the processor 210, the memory 220, and the communication module 230 can be connected via a bus or other means.

[0091] In this solution, the processor 210 is the computing core and control core of the electronic device 200. The processor 210 may include one or more processing units. For example, the processor 210 may include one or more of an application processor (AP), a modem, 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). Among them, different processing units may be independent devices or integrated in one or more processors.

[0092] The memory 220 may store a program that can be run by the processor 210, enabling the processor 210 to execute the method provided in this application. The memory 220 may also store data. The processor 210 may read the data stored in the memory 220. The memory 220 and the processor 210 may be provided separately. Optionally, the memory 220 may also be integrated in the processor 210.

[0093] The communication module 230 may include at least one of a mobile communication module and a wireless communication module. Among them, when the communication module 230 includes a mobile communication module, the communication module 230 may provide a solution for wireless communication including 2G / 3G / 4G / 5G, etc. applied to the electronic device 200. For example, 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), New Radio (NR), etc.

[0094] The communication module 230 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The communication module 230 may receive electromagnetic waves through at least one antenna, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modem for demodulation. The communication module 230 may also amplify the signal modulated by the modem and convert it into electromagnetic waves through the antenna for radiation. In some examples, at least some functional modules of the communication module 230 may be provided in the processor 210. In some examples, at least some functional modules of the communication module 230 and at least some modules of the processor 210 may be provided in the same device. When the communication module 230 includes a wireless communication module, the communication module 230 may provide solutions for wireless communications applied to the electronic device 200, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), etc. The communication module 230 may be one or more devices integrating at least one communication processing module. The communication module 230 receives electromagnetic waves through the antenna, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 210. The communication module 230 may also receive the signals to be sent from the processor 210, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna for radiation.

[0095] It can be understood that Figure 2 the schematic structure does not constitute a specific limitation on the electronic device 200. In other embodiments of this solution, the electronic device 200 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0096] Next, in combination with Figure 3 , the technical solution provided by this application will be described in detail. Exemplarily, Figure 3 FIG. shows a schematic flowchart of a method for controlling a smart home device provided by an embodiment of this application. As Figure 3 shown, the method may include the following steps:

[0097] S1. A step of initializing and configuring the devices in the hotel.

[0098] Specifically, the step of initializing the devices in the hotel is used to initialize the devices in the hotel. In the embodiments of the present application, the hotel administrator can log in to the client to initialize the devices in the hotel, so that the customers who check in to the hotel later can bind to the devices in the hotel and use the devices in the hotel.

[0099] It should be noted that S1 is not an essential step of this method. That is, in the execution of this method, S1 is not necessarily executed every time.

[0100] S2. The step for the customer to check in to the hotel and bind the device.

[0101] Specifically, after initializing the devices in the hotel, when the customer checks in to the hotel, the customer can log in to the client and bind their user account to the devices in the hotel, so that the customer can control the devices in the hotel on the client.

[0102] S3. The step for the customer to share the device with fellow travelers.

[0103] Specifically, after binding the device, the customer can share the bound device with fellow travelers, so that the fellow travelers can also control the devices in the hotel on the client.

[0104] It should be noted that S3 is not an essential step of this method. That is, in the execution of this method, S3 is not necessarily executed every time, nor does it have to be not executed every time, nor does it have to be executed every time.

[0105] S4. The step for the customer or the hotel administrator to unbind the device.

[0106] Specifically, after the customer checks out, the customer can actively unbind the device on the client, so that the customers who check in later can bind to the device. In addition, when the customer forgets to unbind the device, the hotel administrator can also unbind the relationship between the device and the customer on the client, so that the customers who check in later can bind to the device.

[0107] Next, in combination with Figure 4 , the step of initializing the devices in the hotel in the smart home device control method provided by the present application will be described in detail. In the embodiments of the present application, before the hotel is put into operation, the hotel administrator can perform an initial configuration on the devices in the hotel; wherein, the initial configuration can include the initial configuration of the gateway and the initial configuration of the smart devices other than the gateway. Exemplarily, Figure 4 is a schematic flowchart of the step of initializing the devices in the hotel in the smart home device control method provided by the embodiments of the present application. As Figure 4As shown in the figure, the steps for initializing the configuration of the devices in the hotel may include:

[0108] S41. Initialize the configuration of the gateway.

[0109] Specifically, the administrator of the hotel can initialize the configuration of the gateway before the hotel is put into operation. For example, configure the network for the gateway, etc.

[0110] It should be noted that S41 is not an essential step of this method. That is, in the execution of this method, S41 does not need to be executed every time. Exemplarily, if the gateway is carried on the router in the hotel, then at this time the gateway has been connected to the network in the hotel through the network cable. Therefore, at this time, it is not necessary to configure the network for the gateway, that is, S41 does not need to be executed.

[0111] S42. Initialize the configuration of the intelligent devices other than the gateway.

[0112] Specifically, the administrator of the hotel can initialize the configuration of the intelligent devices before the hotel is put into operation. For example, configure the network for the intelligent devices, etc.

[0113] S43. The gateway discovers the intelligent devices in the local area network.

[0114] After initializing the configurations of both the gateway and the intelligent devices, the gateway can discover the intelligent devices in the same local area network as it. Thus, the initialization configuration of the devices in the hotel is completed.

[0115] Exemplarily, the specific steps of S41 can be as Figure 5 shown. Specifically, S41 may include the following steps:

[0116] S410. The first device used by the administrator accesses the network in the room where the gateway is located.

[0117] Specifically, when the administrator initializes the configuration of the gateway, the first device used by the administrator can first be connected to the network in the room where the gateway is located; where at this time the gateway is not connected to the network. Exemplarily, each room in the hotel can be separately configured with a network. Exemplarily, a client related to the control of smart home devices is installed on the first device, such as the Huawei Smart Life client, etc.

[0118] S411. The client logged in by the administrator obtains the first identification code in the gateway.

[0119] Specifically, the administrator can log in to the client on the first device (such as a mobile phone) with the management account and password where the client is installed. After that, the client logged in by the administrator can obtain the first identification code in the gateway with the assistance of the administrator.

[0120] Exemplarily, a first identification code may be pre - set on the gateway, such as a personal identification number (PIN). Exemplarily, the first identification code may be pre - set in the NFC tag on the gateway. At this time, the administrator can use the first device to touch the gateway so that the client logged in by the administrator can obtain the first identification code. Exemplarily, the first identification code may also be pre - set in a graphic code (such as a QR code) on the gateway. At this time, the administrator can use the first device to scan the graphic code so that the client logged in by the administrator can obtain the first identification code. Exemplarily, the first identification code may be pre - set in the NFC tag on the gateway and also in the graphic code on the gateway. At this time, the administrator can use any method to enable the client logged in by the administrator to obtain the first identification code.

[0121] Exemplarily, the first identification code can also be randomly generated. At this time, when the administrator uses the first device to touch the gateway, the gateway can generate the first identification code randomly during the touch operation and send the first identification code to the client logged in by the administrator. In addition, when the gateway is carried on a device with a display screen, the first identification code randomly generated by the gateway can be presented to the administrator in the form of a graphic code on the display screen so that the administrator can use the first device to scan the graphic code to obtain the first identification code.

[0122] S412. The client logged in by the administrator discovers and logs in to the gateway.

[0123] Specifically, the administrator can add or search for devices on the client he / she logs in to, or the client logged in by the administrator can automatically execute the process of discovering devices. Exemplarily, as shown in (a) of Figure 6 , the administrator can select the "Search for Devices" button at area 61 to discover devices. It can be understood that after the gateway is started, it can perform self - inspection to determine whether it is configured with a network. Among them, when the gateway determines that it is not configured with a network, the gateway can broadcast its own device information (such as the identifier of the gateway, etc.) to the outside so that it can be discovered by other devices; when the client logged in by the administrator receives the device information broadcast by the gateway, the client logged in by the administrator can know the information of the gateway and thus discover the gateway. In addition, the gateway can also broadcast its unconfigured network information. After the client logged in by the administrator receives the unconfigured network information of the gateway, it can determine to execute the network configuration process instead of the binding process.

[0124] After the client logged in by the administrator searches for a device, it can present the device it searches for to the administrator for the administrator to select. Exemplarily, as shown in (b) of Figure 6 , the client logged in by the administrator can present a device list to the administrator.

[0125] When the devices found by the client logged in by the administrator include a gateway, the administrator can select the gateway to perform initial configuration on the gateway. Exemplarily, continue to refer to Figure 6 the (b) of

[0126] After the client logged in by the administrator receives the selection operation of the administrator, the client logged in by the administrator can display a gateway login interface, on which the administrator needs to enter the login name and password of the gateway. After the administrator enters the login name and password of the gateway, the client logged in by the administrator can access the gateway, and at this time, the client logged in by the administrator can perform initial configuration on the gateway. In one example, the login name and password can be reserved on the gateway.

[0127] Exemplarily, as Figure 6 shown in the (c) of

[0128] S413. The client logged in by the administrator negotiates with the gateway based on the first identification code to determine the first shared key required for secure communication between the two.

[0129] Specifically, before performing initial configuration on the gateway, the client logged in by the administrator can negotiate with the gateway based on the first identification code to obtain the first shared key. Both of them can use the first shared key to encrypt communication information and send the encrypted communication information to the other party to ensure communication security. Exemplarily, after the client logged in by the administrator obtains the first identification code, it can use the first identification code to negotiate with the gateway through the simple password exponential key exchange (SPEKE) algorithm to determine the first shared key.

[0130] Exemplarily, taking the client logged in by the administrator as Client, the gateway as Gateway, and the first identification code as p, the process of determining the first shared key is described as follows:

[0131] 1). Client generates a random public key / private key pair U A / V A , encrypts U A with p to obtain E p (U A ), and sends E p (U A)Send to the Gateway.

[0132] 2), The Gateway decrypts E with the pre - placed p p (U A ), and obtains the public key U of the Client A = Dp(E p (U A ))). The Gateway generates a random first shared key K, and then encrypts K with U A to obtain U A (K), and then encrypts U A (K) with p to obtain E p (U A (K)), and sends E p (U A (K)) to the Client.

[0133] 3), The Client decrypts E p (U A (K)), and obtains K = V A (E p (U A (K)))). The Client generates a random challenge number C A , encrypts C A with K to obtain E k (C A ), and sends it to the Gateway.

[0134] 4), The Gateway decrypts E k (C A ), and obtains C A . The Gateway generates a random challenge number C B , and encrypts (C A || C B ) with K to obtain E k (C A || C B ), and sends it to the Client.

[0135] 5), The Client decrypts E k (C A || C B ), and obtains C A and C B . The Client encrypts C B with K to obtain E k (C B ), and sends it to the Gateway.

[0136] 6), The Gateway decrypts E k (CB ) to obtain C B . If the above steps are successfully completed, the Client and the Gateway successfully negotiate the first shared key K, that is, the first shared key K is determined. Among them, in the subsequent communication process, the Client and the Gateway can use the first shared key K to encrypt the communication information and then send the encrypted communication information to the other party.

[0137] It can be understood that after the first shared key is negotiated between the client logged in by the administrator and the gateway, all the information in the subsequent communication between the two can be encrypted using the first shared key and then transmitted to the other party. For the convenience of description, the processes of encryption and decryption will not be described in the subsequent steps.

[0138] Exemplarily, taking the client logged in by the administrator as the Client, the gateway as the Gateway, the first shared key as K, and the data to be sent as f as an example, the information sending process is described. This process is specifically as follows: 1). The Client encrypts f using K to obtain E k (f), and sends E k (f) to the Gateway. 2). The Gateway decrypts E k (f) using K to obtain f.

[0139] S414. The client logged in by the administrator obtains the first public key of the gateway.

[0140] Specifically, after the first shared key is negotiated between the client logged in by the administrator and the gateway, the client logged in by the administrator can send a public key acquisition request to the gateway. After that, the gateway can encrypt its own first public key using the first shared key and send it to the client logged in by the administrator. After that, the client logged in by the administrator decrypts the information sent by the gateway, that is, obtains the first public key. Among them, the client logged in by the administrator obtains the public key of the gateway mainly to facilitate the subsequent negotiation of keys between the gateway and the smart device during the discovery of the smart device by the gateway.

[0141] S415. The client logged in by the administrator configures the network for the gateway.

[0142] Specifically, this step is mainly to configure the network for the gateway, such as selecting the network that the gateway needs to join and the joining password of the network, etc., so that the gateway can access the wireless network in the hotel.

[0143] Exemplarily, continue to refer to Figure 6 . In (c), after the administrator selects the "Next" button at area 65, the client logged in by the administrator can display the network configuration interface, that is, display the interface as shown in Figure 6 . In (d), at this time, the administrator can select the network that he hopes the gateway to join. Continue to refer to Figure 6In (d), the administrator can select the "Room A" network at area 66. Then, the administrator can enter the network password of "Room A" at area 67 and select the "Next" button at area 68. After that, the client logged in by the administrator can send the network name and password configured by the administrator to the gateway. Thus, the network configuration for the gateway is completed.

[0144] S416. The gateway accesses the configured network.

[0145] Specifically, after receiving the configuration information sent by the client logged in by the administrator, the gateway can join the configured network according to the network name and password in the configuration information.

[0146] Thus, the initial network configuration work for the gateway is completed. At this time, the just-configured gateway can be viewed in the client logged in by the administrator. Exemplarily, as Figure 6 shown in (e), the just-configured gateway A can be seen on the client logged in by the administrator.

[0147] Exemplarily, the specific steps of S42 can be as Figure 7 shown. Specifically, S42 can include the following steps:

[0148] S420. The first device used by the administrator accesses the network in the room where the smart device belongs.

[0149] Specifically, when the administrator performs the initial configuration on the smart device, the administrator can first connect the first device used by the administrator to the network in the room where the smart device belongs; where at this time, the smart device is not connected to the network. Exemplarily, each room in a hotel can be separately configured with a network. Exemplarily, a client related to the control of smart home devices is installed on the first device, such as the Huawei Smart Life client, etc.

[0150] It should be noted that S420 is not an essential step of this method. That is, in the execution of this method, S420 is not necessarily executed every time. Exemplarily, after the administrator configures the gateway, if the administrator continues to configure the smart device in the room where the gateway belongs, then S420 can be not executed; if the administrator does not configure the smart device in the room where the gateway belongs, but configures the smart device in the room where other gateways belong, then S420 needs to be executed.

[0151] It can be understood that in the embodiments of the present application, the networks in the rooms where different gateways belong can be different, which is convenient for configuring the gateway and the smart devices in the same room as the gateway, and avoids configuration errors during the subsequent process of the gateway discovering the smart devices. In addition, it is also convenient to protect the privacy of customers after they check in, and prevent lawbreakers from obtaining customer information from the local area network.

[0152] S421. The client logged in by the administrator obtains the second identification code in the intelligent device.

[0153] Specifically, the administrator can log in to the client on the first device (such as a mobile phone) installed with the client using the management account and password. After that, the client logged in by the administrator can obtain the second identification code in the intelligent device with the assistance of the administrator.

[0154] Exemplarily, a second identification code can be preset in the intelligent device, such as a personal identification number (PIN code). Exemplarily, the second identification code can be preset in the NFC tag on the intelligent device. At this time, the administrator can use the first device to touch the intelligent device so that the client logged in by the administrator can obtain the second identification code. Exemplarily, the second identification code can also be preset in the graphic code (such as a two-dimensional code) on the intelligent device. At this time, the administrator can use the first device to scan the graphic code so that the client logged in by the administrator can obtain the second identification code. Exemplarily, the second identification code can be preset in the NFC tag on the intelligent device and also in the graphic code on the intelligent device. At this time, the administrator can use any method to make the client logged in by the administrator obtain the second identification code.

[0155] Exemplarily, the second identification code can also be randomly generated. At this time, when the administrator uses the first device to touch the intelligent device, the intelligent device can generate a second identification code randomly during the touch operation and send the second identification code to the client logged in by the administrator. In addition, when the intelligent device has a display screen, the second identification code randomly generated by the intelligent device can be presented to the administrator in the form of a graphic code so that the administrator can use the first device to scan the graphic code to obtain the second identification code.

[0156] S422. The client logged in by the administrator discovers the intelligent device.

[0157] Specifically, the administrator can add or search for devices on the client logged in by him / her. Exemplarily, continue to refer to Figure 6 a, the administrator can select the "Search for Devices" button at area 61 to discover the device. It can be understood that after the intelligent device is started, it can perform self-check to determine whether it is configured with a network. Among them, when the intelligent device determines that it is not configured with a network, the intelligent device can broadcast its own device information (such as the identifier of the intelligent device, etc.) to the outside so as to be discovered by other devices; when the client logged in by the administrator receives the device information broadcast by the intelligent device, the client logged in by the administrator can know the information of the intelligent device and thus discover the intelligent device.

[0158] After the client logged in by the administrator searches for a device, it can present the devices it has searched for to the administrator for the administrator to select. Exemplarily, referring back to Figure 6 the (b) of

[0159] When the devices searched by the client logged in by the administrator include smart devices, the administrator can select a smart device to perform initial configuration on the smart device. Exemplarily, as Figure 8 shown, the administrator can select "Smart Device a" at area 81.

[0160] S423. The client logged in by the administrator negotiates with the smart device based on the second identification code to determine the second shared key required for secure communication between the two.

[0161] Specifically, before performing initial configuration on the smart device, the client logged in by the administrator can negotiate with the smart device based on the second identification code to obtain the first shared key. Both of them can use this second shared key to encrypt communication information and send the encrypted communication information to the other party to ensure communication security. Exemplarily, after the client logged in by the administrator obtains the second identification code, it can use this second identification code to negotiate with the smart device through the simple password exponential key exchange (SPEKE) algorithm to determine the second shared key. For the negotiation process, reference can be made to the previous description and will not be elaborated here.

[0162] It can be understood that after the client logged in by the administrator and the smart device negotiate the second shared key, the information communicated between the two subsequently can be encrypted using this second shared key and then transmitted to the other party. For the convenience of narration, the processes of encryption and decryption will not be described in the subsequent steps.

[0163] S424. The client logged in by the administrator sends the first public key of the gateway to the smart device and obtains the second public key of the smart device.

[0164] Specifically, after the client logged in by the administrator negotiates the second shared key with the smart device, the client logged in by the administrator can use the second shared key to encrypt the first public key of the gateway and send it to the smart device. After receiving the encrypted information, the smart device can decrypt it to obtain the first public key of the gateway. After that, the smart device can use the second shared key to encrypt its own second public key and send it to the client logged in by the administrator. The client logged in by the administrator decrypts the information sent by the smart device to obtain the second public key. Among them, the main reason for the client logged in by the administrator to obtain the public key of the smart device is to inform the gateway of the public key of the smart device subsequently, so that the gateway and the smart device can negotiate keys during the process of the gateway discovering the smart device.

[0165] S425. The client logged in by the administrator configures a network for the smart device.

[0166] Specifically, this step is mainly to configure a network for the smart device, such as selecting the network that the smart device needs to join and the joining password of the network, etc., so that the smart device can access the wireless network in the hotel.

[0167] In one example, in order to enable the gateway to discover the smart device, the network configured for the smart device can be the same as the network configured for the gateway to ensure that the gateway and the smart device are in the same local area network.

[0168] Exemplarily, continue to refer to Figure 8 , after the administrator selects "Smart Device a" at area 81, the client logged in by the administrator can display the network configuration interface, that is, display the interface as shown in Figure 6 (d). At this time, the administrator can select the network that he hopes the smart device to join. Continue to refer to Figure 6 (d). The administrator can select the "Room a" network at area 66. Then, the administrator can enter the network password of "Room a" at area 67 and select the "Next" button at area 68. After that, the client logged in by the administrator can send the network name and password configured by the administrator to Smart Device a. Thus, the network configuration for Smart Device a is completed.

[0169] S426. The smart device accesses the configured network.

[0170] Specifically, after the smart device receives the configuration information sent by the client logged in by the administrator, it can join the configured network according to the network name and password in the configuration information.

[0171] Thus, the initial network configuration work for the smart device is completed.

[0172] Exemplarily, the specific steps of S43 can be as shown in Figure 9 (A). Among them,Figure 9 The step shown in (A) is the step where the administrator actively triggers the gateway to discover intelligent devices. Specifically, S43 may include the following steps:

[0173] S4311. The client logged in by the administrator sends a device discovery instruction to the gateway.

[0174] Specifically, after the administrator configures the gateway and the intelligent device, the administrator can log in to the gateway from the client logged in by the administrator and select to let the gateway discover the device. Exemplarily, as Figure 10 shown, after the administrator logs in to the gateway, the administrator can select the "Discover Devices" button at area 101. After that, the client logged in by the administrator can send a device discovery instruction to the gateway.

[0175] After the administrator controls the gateway to perform device discovery through the client logged in by the administrator, that is, after issuing the device discovery instruction, the client logged in by the administrator can send a device discovery instruction to the gateway. Exemplarily, the device discovery instruction may include the second public key of the intelligent device so that the gateway can learn the public key of the intelligent device and negotiate a shared key with the intelligent device.

[0176] S4312. The gateway multicasts a device discovery request.

[0177] Specifically, since the gateway and the intelligent device are connected to the same local area network, the gateway can multicast a device discovery request in this local area network. Exemplarily, the device discovery request may carry the device information of the gateway. Exemplarily, the device identifier of the gateway may include the identity identifier of the gateway, such as the product serial number, host address, etc.

[0178] S4313. The intelligent device sends its identity identifier to the gateway.

[0179] Specifically, the intelligent device in the same network as the gateway, after receiving the device discovery request sent by the gateway, can send its own identity identifier to the gateway.

[0180] In an example, if the intelligent device has already stored the device information of the gateway, it indicates that the intelligent device has been registered to the gateway. At this time, the intelligent device does not need to send its identity identifier to the gateway again.

[0181] S4314. The gateway uses its own public key and the public key of the intelligent device to negotiate with the intelligent device to determine the third shared key required for secure communication between the two.

[0182] Specifically, after the gateway obtains the identity identifier of the intelligent device, it can query the public key of the intelligent device based on this identity identifier. Subsequently, the gateway can use its own public key and the public key of the intelligent device to negotiate with the intelligent device through the station-to-station (STS) key negotiation algorithm to obtain a third shared key that both can share. Subsequently, both can use this third shared key to encrypt the communication information and send the encrypted communication information to the other party, thereby realizing the communication security between the two.

[0183] It can be understood that after the gateway and the intelligent device negotiate the third shared key, all subsequent communication information between the two can be encrypted using this third shared key and then transmitted to the other party. For the convenience of description, the processes of encryption and decryption will not be described in the subsequent steps.

[0184] S4315. The intelligent device registers with the gateway.

[0185] Specifically, after negotiating the shared key between the gateway and the intelligent device, the gateway can record the device information of the intelligent device. At the same time, the device information of the gateway can also be recorded in the intelligent device. Exemplarily, the device identifier of the intelligent device can include the identity identifier of the intelligent device, such as the product serial number, host address, etc. The device identifier of the gateway can include the identity identifier of the gateway, such as the product serial number, host address, etc.

[0186] At this point, the gateway has discovered the intelligent devices in the same local area network as it.

[0187] Exemplarily, the specific steps of S43 can also be as Figure 9 shown in (B) of Figure 9 The steps shown in (B) of are the steps for the gateway to automatically trigger the discovery of intelligent devices. Since it is difficult for the gateway to keep sending broadcasts all the time, in order to improve efficiency, when the intelligent device goes online, the intelligent device can send a broadcast indicating that it has gone online. After the gateway receives this broadcast, it can start discovering the device. In addition, since the gateway and the intelligent device need to negotiate a shared key during the process of the gateway discovering the intelligent device, and the prerequisite for negotiating the shared key is that the gateway needs to know the public key of the intelligent device in advance, and the intelligent device needs to know the public key of the gateway in advance. Therefore, after the client logged in by the administrator obtains the public key of the intelligent device, the client logged in by the administrator can actively send the public key of the intelligent device to the gateway so that the gateway can know the public key of the intelligent device in time. It can be understood that since the client logged in by the administrator has sent the public key of the gateway to the intelligent device when configuring the intelligent device, the client logged in by the administrator does not need to send the public key of the gateway to the intelligent device again at this time.

[0188] Specifically, S43 can include the following steps:

[0189] S4321. The smart device sends online information.

[0190] After the smart device is turned on, it can broadcast information that it is online in the local area network. Exemplarily, the online information can be understood as information that the smart device is turned on.

[0191] S4322. The gateway multicasts a device discovery request.

[0192] S4323. The smart device sends an identity to the gateway.

[0193] S4324. The gateway negotiates with the smart device using its own public key and the public key of the smart device to determine the third shared key required for secure communication between the two.

[0194] S4325. The smart device is registered to the gateway.

[0195] At this point, the gateway discovers the smart devices in the same LAN.

[0196] In one example, after the gateway discovers the smart device, the administrator can view the smart device discovered by the gateway in the gateway. Figure 11 As shown, after the administrator logs in to the gateway using the client that has been logged in, he can view the smart devices discovered by the gateway, such as smart device a and smart device b.

[0197] Furthermore, in order to facilitate the administrator to maintain the gateway and the devices registered on the gateway, the administrator can set a maintenance password for the gateway to lock the relationship between the gateway and the smart device, and prevent people other than the administrator (such as guests staying in the hotel, etc.) from arbitrarily changing the relationship between the gateway and the smart device. Exemplarily, after the initial configuration of the gateway or smart device is completed, the client logged in by the administrator can guide the administrator to set a maintenance password.

[0198] This completes the initialization configuration.

[0199] Combine the following Figure 12 , the steps of checking in a customer to a hotel and binding a device in the smart home device control method provided by the present application are described in detail. In an embodiment of the present application, after the hotel is put into operation, customers can check in to the hotel; wherein, after checking in to the hotel, the customer can bind the gateway in the room where he / she is staying to control the smart devices registered in the gateway. The second device used by the customer can perform short-distance communication with the gateway, and the second device can perform long-distance communication with the server corresponding to the client installed on the second device. In addition, long-distance communication can be performed between the gateway and the server. Exemplarily, Figure 12In the smart home device control method provided by the embodiments of this application, it is a schematic flowchart of the steps for a customer to check into a hotel and bind a device. As Figure 12 shown, the steps for a customer to check into a hotel and bind a device may include:

[0200] S1201. The client logged in by the customer obtains the identity identifier of the gateway and the third identification code in the gateway.

[0201] Specifically, the customer can log in to the client on the second device (such as a mobile phone) installed with the client using the registered user account and password. After that, the client logged in by the customer can obtain the identity identifier of the gateway and the third identification code in the gateway with the assistance of the customer. For the process of obtaining the third identification code, see the above description and will not be elaborated here. For the identity identifier of the gateway, the gateway can send its own identity identifier simultaneously or at different times when sending the third identification code to the client logged in by the customer.

[0202] S1202. The client logged in by the customer requests the first activation code from the server.

[0203] Specifically, after the client logged in by the customer obtains the identity identifier of the gateway, it can send the identity identifier of the gateway to the server to request the first activation code from the server. Among them, the first activation code is mainly used to represent the identity of the gateway.

[0204] S1203. The server sends the first activation code to the client logged in by the customer.

[0205] Specifically, after the server receives the request from the client logged in by the customer, it can randomly generate the first activation code based on the identity identifier of the gateway. Exemplarily, the first activation code may be composed of multiple random numbers. After the server generates the first activation code, it can send the first activation code to the client logged in by the customer.

[0206] S1204. The client logged in by the customer negotiates with the gateway based on the third identification code to determine the fourth shared key required for secure communication between the two.

[0207] Specifically, before binding the gateway, in order to ensure the communication security between the two, the client logged in by the customer negotiates with the gateway based on the third identification code to obtain the fourth shared key. For the detailed process, see the above description and will not be elaborated here. The fourth shared key is mainly used to encrypt communication information during communication between the two.

[0208] It can be understood that after the client logged in by the customer and the gateway negotiate the fourth shared key, the information of subsequent communication between the two can be encrypted using the fourth shared key and then transmitted to the other party. For the convenience of narration, the processes of encryption and decryption will not be described in the subsequent steps.

[0209] S1205. The client logged in by the customer sends a binding request to the gateway.

[0210] Specifically, after obtaining the fourth shared key, the client logged in by the customer can encrypt the binding request based on the fourth shared key and send the encrypted binding request to the gateway. The binding request is a request to bind the user account of the client logged in by the customer to the gateway. Among them, the binding request may carry a first account identifier for characterizing the customer account. Exemplarily, the first account identifier for characterizing the customer account may be a hash value obtained by performing a hash calculation on the customer account.

[0211] S1206. The gateway determines whether it is bound.

[0212] Specifically, after the gateway receives the binding request encrypted based on the fourth shared key, it can decrypt the information to obtain the binding request. After the gateway is bound, the gateway may store an account identifier for characterizing the user account of the customer. Therefore, when the gateway receives the binding request sent by the client logged in by the customer, the gateway can determine whether it stores an account identifier. If the gateway stores an account identifier, it means that the gateway has been bound to other customers. At this time, the gateway can prohibit the current customer from binding, and at this time, the gateway can feedback information indicating binding failure to the client logged in by the customer. If the gateway does not store an account identifier, it means that the gateway has not been bound to other customers. At this time, the gateway can agree to bind to the current customer and perform subsequent steps.

[0213] In one example, after the gateway agrees to bind to the current customer, the gateway can record the customer account information of the customer. For example, record the account identifier of the customer.

[0214] S1207. The gateway sends information indicating agreement to bind to the client logged in by the customer.

[0215] S1208. The client logged in by the customer sends a first activation code to the gateway.

[0216] S1209. The gateway registers with the server.

[0217] Specifically, after the gateway receives the first activation code sent by the client for customer login, the gateway can send its own identity identifier and the first activation code to the server. After the server receives the identity identifier and the first activation code sent by the gateway, it can query whether the first activation code is the one it just allocated from the record of the generated activation codes. If the server determines that the first activation code is the one it just allocated, it can agree to the gateway's registration. At this time, the server can record the information of the gateway (such as the identity identifier), and associate the gateway with the customer's account. In addition, to avoid user data leakage, the server can allocate an identifier representing the gateway's identity to the gateway, where the server can record this identifier and use it as the information of the gateway.

[0218] S12010. The server sends the registration result to the gateway.

[0219] S12011. The gateway sends the registration result to the client for customer login.

[0220] S12012. The server pushes the device information of the gateway to the client for customer login.

[0221] S12013. The gateway batch-applies to the server for the second activation codes corresponding to each intelligent device.

[0222] Specifically, the gateway can send the identity identifiers of each intelligent device registered on it to the server to batch-apply to the server for the second activation codes corresponding to each intelligent device. The second activation code is mainly used to represent the identity of the intelligent device.

[0223] S12014. The server sends the second activation codes of each intelligent device to the gateway.

[0224] Specifically, after the server receives the identity identifiers of each intelligent device, it can randomly generate the corresponding second activation codes based on the identity identifiers of each device. Exemplarily, the second activation code can be composed of multiple random numbers. After the server generates the second activation code, it can send the second activation code to the gateway.

[0225] S12015. The gateway sends the second activation code of the intelligent device to the intelligent device.

[0226] S12016. The intelligent device registers with the server.

[0227] Specifically, after receiving the second activation code sent by the gateway, the intelligent device can send its own identity identifier and the second activation code to the server. After receiving the identity identifier and activation code sent by the intelligent device, the server can query in the record of the generated activation code whether the second activation code was just assigned by it. If the server determines that the second activation code was just assigned by it, it can agree to the registration of the intelligent device. At this time, the server can record the information of the intelligent device (such as the identity identifier), and associate the intelligent device with the customer's account. In addition, to avoid the leakage of user data, the server can assign an identifier representing the identity of the intelligent device to the intelligent device, where the server can record this identifier and use this identifier as the information of the intelligent device.

[0228] S12017. The server sends the registration result to the intelligent device.

[0229] S12018. The intelligent device sends the registration result to the gateway.

[0230] S12019. The server records the corresponding relationship among the gateway, the intelligent device and the customer's account.

[0231] S12020. The server pushes the device information of the intelligent device to the client logged in by the customer.

[0232] In one example, after the gateway registers to the server, the gateway can record the information of its registration, so that the gateway can report its own status information (such as whether it is online, the current operating parameters, etc.) in real time or periodically. In addition, after the intelligent device registers to the server, the intelligent device can also record the information of its registration, so that the intelligent device can report its own status information (such as whether it is online, the current operating parameters, etc.) in real time or periodically. Exemplarily, taking the intelligent device as an intelligent table lamp, the intelligent table lamp can report its light brightness information to the server once every preset time interval (such as 30 minutes, 1 hour, etc.).

[0233] It can be understood that in the embodiments of the present application, the intelligent device needs to use the second activation code to register with the server, mainly to enable the server to identify whether the intelligent device is a counterfeit device. If the intelligent device is a counterfeit device, the server can prohibit the registration of the intelligent device.

[0234] It can be understood that when the information on the server is updated, the server can push the updated information to the client logged in by the customer, so that the customer can timely learn the latest information.

[0235] So far, the customer has completed the device binding. At this time, the customer can view the gateway and each intelligent device registered under the gateway on the client logged in by the customer. Exemplarily, such as Figure 13As shown, on the client where the customer logs in, the gateway A bound to the customer's account can be seen, as well as the smart devices A and B registered under this gateway.

[0236] Furthermore, the customer can control each smart device through the client where the customer logs in.

[0237] Exemplarily, taking the smart device as a smart table lamp as an example, the process of the customer controlling the smart device will be described. As Figure 14 shown, it includes the following steps:

[0238] S1401. The client where the customer logs in receives the brightness adjustment instruction issued by the customer for the smart table lamp.

[0239] After the customer logs in to the client, the customer can control the smart table lamp under the gateway bound by the customer. For example, issue a brightness adjustment instruction. Exemplarily, as Figure 15 shown, the customer can adjust the brightness of the smart table lamp through the brightness adjustment control at area C1. After the customer adjusts the brightness, the client where the customer logs in immediately receives the brightness adjustment instruction issued by the customer. Exemplarily, the brightness adjustment instruction may include a target brightness adjustment value, such as adjusting to 60% brightness, etc.

[0240] S1402. The client where the customer logs in sends the brightness adjustment instruction to the server.

[0241] S1403. The server sends the brightness adjustment instruction to the smart table lamp.

[0242] S1404. The smart table lamp adjusts the brightness.

[0243] After the smart table lamp receives the brightness adjustment instruction, it adjusts the brightness according to the brightness adjustment instruction.

[0244] Thus, the control of the smart table lamp can be realized.

[0245] Next, in combination with Figure 16 , in the smart home device control method provided by this application, the steps for the customer to share the device with fellow travelers will be described in detail. Among them, after the resident customer binds the device, the customer can share the bound device with his fellow travelers. In one example, the fellow travelers can default to being unable to bind or control the device, and must be shared by the resident user to the fellow travelers before they can control. Exemplarily, Figure 16 is the schematic flow diagram of the steps for the customer to share the device with fellow travelers in the smart home device control method provided by the embodiment of this application. As Figure 16 shown, the steps for the customer to share the device with fellow travelers may include:

[0246] S1601. The client where the customer logs in obtains the account information of the fellow traveler.

[0247] Specifically, after the client logged in with the user's account and password binds a device, the client can initiate device sharing to the accounts of the user's peers. Exemplarily, when the user enters the account information of a peer on the logged-in client, the logged-in client obtains the account information of the peer. Exemplarily, the user can use the logged-in client to scan a graphic code (such as a QR code) containing the account information of the peer, so that the logged-in client can obtain the account information of the peer.

[0248] S1602. The client logged in by the user sends a sharing request to the server. The sharing request carries the account information of the peer.

[0249] S1603. The server records the sharing information.

[0250] S1604. The server sends the sharing information to the client logged in by the peer.

[0251] Specifically, the server can send the sharing information to the account of the peer. Since the peer logs in to the client with their own account, when the server sends the sharing information to the account of the peer, the client logged in by the peer can receive the sharing information.

[0252] S1605. The client logged in by the peer responds to the peer's operation of accepting sharing and sends information indicating acceptance of sharing to the server.

[0253] Specifically, after the client logged in by the peer receives the sharing information, it can display the sharing information for the peer to receive the sharing. After the peer receives the sharing, the client logged in by the peer can send information indicating acceptance of sharing to the server.

[0254] S1606. The server updates the management authority of the gateway.

[0255] Specifically, after the server receives the information indicating acceptance of sharing sent by the client logged in by the peer, the server can update the management authority of the gateway. Exemplarily, the server can change the management authority of the gateway from the user's account to the user's account and the account of the peer, thereby updating the management authority of the gateway.

[0256] S1607. The server sends an account identifier representing the user account of the peer to the gateway.

[0257] S1608. The gateway stores the account identifier.

[0258] S1609. The gateway sends information indicating successful storage to the server.

[0259] S1610. The server sends a sharing success message to the client that the peer has logged into.

[0260] S1611. The server sends the device information of the gateway and the smart devices registered under the gateway to the client logged in by the peer.

[0261] At this point, the peers can view the gateway and the smart devices under the gateway on the client they log in to, and can control the smart devices.

[0262] Combine the following Figure 17 , the steps of unbinding the device for the customer or the hotel administrator in the smart home device control method provided by this application are described in detail. Among them, the customer can actively unbind the device, and the hotel administrator can also unbind the device for the customer. For example, Figure 17 A flowchart of the steps of unbinding a device for a customer or a hotel administrator in the smart home device control method provided in an embodiment of the present application.

[0263] For example, Figure 17 As shown in (A), the steps for the customer to unbind the device may include:

[0264] S1711. The client logged in by the customer receives the unbinding instruction to the gateway issued by the customer.

[0265] Specifically, the client can unbind the gateway on the client that he / she logged in. For example, as shown in FIG18(a), the client can select the gateway a in the area a1 on the client that he / she logged in, and then a prompt to delete the device may be displayed, that is, the following may be displayed: Figure 18 (b) shows the interface. Figure 18 (b), after the customer selects "Delete Device" in area a2, the client logged in by the customer receives the unbinding instruction for the gateway issued by the customer.

[0266] S1712. The client logged in by the customer sends an unbinding message to the server.

[0267] Specifically, after the client logged in by the customer receives the unbinding instruction issued by the customer, it can send the device information of the gateway that the customer needs to unbind to the server. Among them, the device information of the gateway that the customer needs to unbind can include the identity of the gateway.

[0268] S1713. The server updates the management authority of the gateway.

[0269] Specifically, the server can clear the management authority of the gateway. For example, before the server clears the management authority of the gateway, the management authority is that the customer can manage the gateway; after the server clears the management authority of the gateway, the management authority can be empty. At this time, the gateway is not controlled.

[0270] S1714. The server sends a successful unbinding message to the client logged in by the customer.

[0271] Specifically, after the server updates the management authority of the gateway, the customer can no longer control the gateway and the intelligent devices registered on the gateway. After that, the server can send a successful unbinding message to the client logged in by the customer. After the client logged in by the customer receives the successful unbinding message, the device information of the gateway and the intelligent devices is no longer displayed thereon.

[0272] S1715. The server sends an unbinding instruction to the gateway.

[0273] S1716. The gateway clears the permission information.

[0274] Specifically, after receiving the unbinding instruction sent by the server, the gateway can clear the account information stored therein, thereby achieving the clearing of the permission information. In one example, if the gateway records the information that it has been registered to the server, when the gateway clears the permission, it can also clear the recorded information.

[0275] S1717. The gateway sends an information clearing instruction to the intelligent device.

[0276] Specifically, when the intelligent device records the information that it has been registered to the server, the gateway can send an information clearing instruction to the intelligent device so that the intelligent device clears the information that it has been registered to the server recorded therein.

[0277] S1718. The intelligent device clears the information that it has been registered to the server recorded therein.

[0278] S1719. The intelligent device sends a successful clearing message to the gateway.

[0279] S17110. The gateway sends a successful unbinding message to the server.

[0280] It can be understood that after the gateway sends a failed unbinding message to the server, the server can send an unbinding instruction to the gateway again, that is, execute the steps of S1715 - S1719 again until the server receives the successful unbinding message sent by the gateway.

[0281] Thus, the customer completes the device unbinding.

[0282] Exemplarily, such as Figure 17As shown in (B), the steps for the hotel administrator to unbind the device may include:

[0283] S1721. The first device used by the administrator accesses the network in the room to which the gateway belongs.

[0284] Specifically, when the administrator unbinds the device for the customer, the administrator can enter the room where the customer stays and connect the first device he uses to the network in that room. Among them, the first device can access the network provided by the router in the room to which the gateway belongs.

[0285] S1722. The client logged in by the administrator obtains the identity identifier of the gateway and the fourth identification code in the gateway.

[0286] Specifically, the administrator can log in to the client on the first device (such as a mobile phone) installed with the client using the management account and password. After that, the client logged in by the administrator can obtain the fourth identification code in the gateway with the assistance of the administrator, such as a personal identification number (PIN code). Among them, the fourth identification code can be randomly generated or pre - placed in the gateway, which is not limited here. For example, the administrator can use the first device to touch the gateway to obtain the fourth identification code. The process of obtaining the fourth identification code is described in detail above and will not be repeated here.

[0287] S1723. The client logged in by the administrator requests the third activation code from the server.

[0288] Specifically, after the client logged in by the administrator obtains the identity identifier of the gateway, it can send the identity identifier of the gateway to the server to request the third activation code from the server. Among them, the third activation code is mainly used to represent the identity of the gateway.

[0289] S1724. The server sends the third activation code to the client logged in by the administrator.

[0290] Specifically, after the server receives the request from the client logged in by the administrator, it can randomly generate the third activation code based on the identity identifier of the gateway. Exemplarily, the third activation code can be composed of multiple random numbers. After generating the third activation code, the server can send the third activation code to the client logged in by the administrator.

[0291] S1725. The client logged in by the administrator negotiates with the gateway based on the fourth identification code to determine the fifth shared key required for their secure communication.

[0292] Specifically, after the client logged in by the administrator obtains the fourth identification code, it can use this fourth identification code to negotiate with the gateway through the simple password exponential key exchange (SPEKE) algorithm based on password authentication to determine the fifth shared key. For details, please refer to the description above and will not be elaborated here.

[0293] It can be understood that after the client logged in by the administrator and the gateway negotiate the fifth shared key, all subsequent communication information between the two can be encrypted using this fifth shared key and then transmitted to the other party. For the convenience of narration, the processes of encryption and decryption will not be described in the subsequent steps.

[0294] S1726. The client logged in by the administrator sends a binding request to the gateway.

[0295] Specifically, after obtaining the fifth shared key, the client logged in by the administrator can encrypt the binding request based on the fifth shared key and send the encrypted binding request to the gateway. This binding request is to request binding the management account of the client logged in by the administrator with the gateway. Among them, the binding request may carry a third account identifier for representing the management account. Exemplarily, the third account identifier for representing the management account may be a hash value obtained by performing a hash calculation on the management account.

[0296] S1727. The gateway determines that it cannot be bound.

[0297] Specifically, after the gateway receives the binding request sent by the client logged in by the administrator, since the gateway has been bound to the client, at this time, the administrator cannot be bound again. At this time, the gateway can determine that it cannot be bound.

[0298] S1728. The gateway sends information requesting the input of the maintenance password to the client logged in by the administrator.

[0299] S1729. The client logged in by the administrator sends the maintenance password to the gateway.

[0300] S1730. The gateway feeds back the password verification result.

[0301] S1731. The client logged in by the administrator sends an information query request to the gateway.

[0302] S1732. The gateway feeds back device information to the client logged in by the administrator.

[0303] Specifically, the gateway can send its own device information and the device information of the intelligent devices registered on it to the client logged in by the administrator, so that the client logged in by the administrator can display the gateway and the intelligent devices registered on the gateway to the user, and then maintain the gateway and the intelligent devices registered on the gateway.

[0304] S1733. The client logged in by the administrator receives the unbinding instruction for the gateway issued by the administrator.

[0305] Specifically, the administrator can unbind the gateway for the customer on the client logged in by the administrator. Exemplarily, as shown in (a) of Figure 18 , the administrator can select the gateway a at area a1 on the client logged in by the administrator. After that, a prompt for deleting the device can be displayed, that is, an interface as shown in (b) of Figure 18 can be displayed. Continuing to refer to (b) of Figure 18 , after the administrator selects "Delete Device" at area a2, the client logged in by the administrator receives the unbinding instruction for the gateway issued by the administrator.

[0306] S1734. The client logged in by the administrator sends the unbinding instruction to the gateway.

[0307] S1735. The gateway sends the unbinding information to the server.

[0308] Specifically, after receiving the unbinding instruction issued by the client logged in by the administrator, the gateway can send its own device information to the server. Among them, the device information of the gateway can include the identity identifier of the gateway.

[0309] S1736. The server updates the management permission of the gateway.

[0310] S1737. The server sends the information that the permission update is successful to the gateway.

[0311] Specifically, after the server updates the management permission of the gateway, the customer can no longer control the gateway and the intelligent devices registered on the gateway. That is, it can be understood that the unbinding is successful at this time. Therefore, the server can send the information that the permission update is successful to the gateway.

[0312] S1738. The gateway sends the information that the unbinding is successful to the client logged in by the administrator.

[0313] Specifically, after receiving the information that the unbinding is successful sent by the server, the gateway can send the information that the unbinding is successful to the client logged in by the administrator.

[0314] It can be understood that if the gateway receives the information that the permission update fails sent by the server, the gateway can re-send the unbinding information to the server.

[0315] S1739. The gateway clears the permission information.

[0316] Specifically, after the gateway receives the information indicating successful permission update sent by the server, it can clear the account information stored therein, thereby achieving the clearing of the permission information. In one example, when there is information recorded in the gateway indicating that it has been registered with the server, when clearing the permission, the gateway can also clear this recorded information.

[0317] S1740. The gateway sends an information clearing instruction to the intelligent device.

[0318] Specifically, when there is information recorded in the intelligent device indicating that it has been registered with the server, the gateway can send an information clearing instruction to the intelligent device so that the intelligent device clears the information recorded therein indicating that it has been registered with the server.

[0319] S1741. The intelligent device clears the information recorded therein indicating that it has been registered with the server.

[0320] S1742. The intelligent device sends a message indicating successful clearing to the gateway.

[0321] At this point, the administrator of the hotel has completed unbinding the device for the customer.

[0322] It should be noted that S1722 - S1732 can also be understood as the process of the administrator maintaining the device. Among them, after S1732, the administrator can view the information of the gateway and the intelligent devices registered on the gateway. At this time, the administrator can maintain the gateway and the intelligent devices registered on the gateway, such as equipment maintenance, etc.

[0323] It can be understood that in the embodiments of the present application, the device used by the administrator needs to communicate with the gateway at a short distance to obtain the information of the gateway and the intelligent devices registered on the gateway. Thus, the administrator cannot remotely obtain the information of the devices used by the users, thereby protecting the privacy and security of the users. Exemplarily, there is a camera device in the guest room. At this time, the administrator can only use the device used by him / her to communicate with the gateway in the guest room to obtain the information of the camera device. And after the customer checks into the guest room, it is difficult for the administrator to casually enter the guest room, which makes it impossible for the administrator to casually obtain the information of the camera device, thus protecting the user privacy and avoiding the leakage of user privacy.

[0324] It should be noted that in the embodiments of the present application, the operations performed by the client can all be understood as the operations performed by the device where the client is located.

[0325] Exemplarily, Figure 19 shows a schematic flowchart of another smart home device control method. Among them, in Figure 19Among them, a client related to the control of smart home devices is installed on the first electronic device. The first account is logged in on the client, and the client corresponds to a server. The first electronic device can perform short-range communication with the second electronic device, and the second electronic device can perform long-range communication with the server. n smart devices are pre-registered on the second electronic device, that is, the n smart devices are pre-bound to the second electronic device, and the second electronic device and the n smart devices are in the same local area network, where n is a positive integer greater than or equal to 1. In one example, the second electronic device can be a gateway or an electronic device integrated with gateway functions, which can be understood as the entrance for the first electronic device to access the smart home system to which the second electronic device belongs. Exemplarily, when the second electronic device is an electronic device with gateway functions, the second electronic device can be a central device, such as a smart speaker, a smart TV, a smart screen, etc. Exemplarily, the first electronic device can be the device used by the customer described above. For example, the first electronic device can be the Figure 1 mobile phone 15 described above; the second electronic device can be the Figure 1 gateway 11 described above; the smart device can be the Figure 1 smart speaker 12, smart table lamp 13 and smart TV 14 described above; the server can be the Figure 1 server 16 described above.

[0326] As Figure 19 shown, the smart home device control method may include the following steps:

[0327] S1901. The first electronic device performs short-range communication with the second electronic device and obtains first information related to the second electronic device from the second electronic device. The first information includes the first identifier of the second electronic device.

[0328] Specifically, the first electronic device can touch the second electronic device or scan the QR code on the second electronic device to obtain the first identifier of the second electronic device. For the process of obtaining the first identifier, please refer to the description above and will not be elaborated here.

[0329] S1902. The first electronic device sends a first message to the server. The first message contains the first identifier, and the first message is used to obtain the first activation code representing the identity of the second electronic device.

[0330] Specifically, after the first electronic device obtains the first identifier of the second electronic device, it can send the first identifier to the server to obtain the first activation code representing the identity of the second electronic device from the server.

[0331] S1903. The server responds to the first message and generates a first activation code based on the first identifier.

[0332] Specifically, after receiving the first message, the server can randomly generate a first activation code based on the first identifier. Exemplarily, the first activation code can be composed of multiple random numbers.

[0333] S1904. The server sends the first activation code to the first electronic device.

[0334] S1905. The first electronic device sends a second message to the second electronic device. The second message includes the first account number, and the second message is used to request binding the first account number to the second electronic device.

[0335] Specifically, after obtaining the first activation code, the first electronic device can send a second message including the first account number to the second electronic device to request binding the first account number to the second electronic device. Exemplarily, the second message can be understood as a message related to the binding request.

[0336] S1906. The second electronic device responds to the second message, agrees to bind to the first account number, and stores the first account number.

[0337] Specifically, after receiving the second message, if the second electronic device does not store account information therein, it can agree to bind to the first account number and store the first account number.

[0338] S1907. The second electronic device sends a third message to the first electronic device. The third message includes information that the second electronic device agrees to bind.

[0339] S1908. The first electronic device responds to the third message and sends a fourth message to the second electronic device. The fourth message includes the first activation code, and the fourth message is used to instruct the second electronic device to register with the server using the first activation code.

[0340] S1909. The second electronic device responds to the fourth message and sends a fifth message to the server. The fifth message includes the first identifier and the first activation code, and the fifth message is used to request registration with the server.

[0341] Specifically, after receiving the message including the first activation code, the second electronic device can send a message including the first identifier and the first activation code to the server to request registration with the server.

[0342] S1910. The server responds to the fifth message, agrees to register the second electronic device, and records the first identifier.

[0343] Specifically, the server can query from the record of the activation code it generated whether the first activation code was just assigned by it. If the server determines that the first activation code was just assigned by it, it can agree to the registration of the second electronic device. At this time, the server can record the information of the second electronic device (such as the first identifier), and associate the second electronic device with the customer's account. In addition, to prevent user data leakage, the server can assign an identifier representing the identity of the second electronic device to the second electronic device, where the server can record this identifier and use this identifier as the information of the second electronic device.

[0344] S1911. The server sends a sixth message to the second electronic device, and the sixth message contains information indicating successful registration.

[0345] S1912. The server sends a seventh message to the first electronic device, and the seventh message contains the device information of the second electronic device.

[0346] S1913. In response to the sixth message, the second electronic device sends an eighth message to the server. The eighth message contains the second identifiers of n smart devices, and the eighth message is used to request to obtain n second activation codes representing the identities of the n smart devices, where one second activation code corresponds to one smart device.

[0347] Specifically, after the second electronic device is registered on the server, the second electronic device can batch-apply to the server for the second activation codes corresponding to each smart device, so that subsequent smart devices can be registered on the server.

[0348] S1914. In response to the eighth message, the server generates n second activation codes based on the second identifiers of the n smart devices.

[0349] Specifically, after receiving the eighth message, the server can randomly generate the second activation codes corresponding to each smart device based on the second identifiers of each smart device. Exemplarily, the second activation code can be composed of multiple random numbers.

[0350] S1915. The server sends n second activation codes to the second electronic device.

[0351] S1919. The second electronic device sends a ninth message to the smart device, and the ninth message contains the second activation code. The ninth message is used to instruct the smart device to register with the server using the second activation code.

[0352] S1917. In response to the ninth message, the smart device sends a tenth message to the server. The tenth message contains the second identifier and the second activation code of the smart device, and the tenth message is used to request registration to the server.

[0353] S1918. In response to the tenth message, the server agrees to the registration of the smart device and records the second identifier.

[0354] Specifically, the server can query the record of the activation code it generates to see whether the second activation code is the one it has just assigned. If the server determines that the second activation code is the one it has just assigned, it can agree to the registration of the smart device. At this time, the server can record the information of the smart device (such as the second identifier), and associate the smart device with the customer's account. In addition, in order to avoid user data leakage, the server can assign an identifier representing the identity of the smart device to the smart device, where the server can record the identifier and use the identifier as the information of the smart device. S1919. The server sends the eleventh message to the smart device, and the eleventh message contains information that the registration is successful.

[0355] S1920: The server sends a twelfth message to the first electronic device, the twelfth message including device information of the smart device. It is understandable that the seventh message and the twelfth message may be sent separately or in combination and sent simultaneously, which is not limited here.

[0356] S1921. The first electronic device outputs device information of the second electronic device and the smart device.

[0357] Specifically, the first electronic device can output the device information of the second electronic device and the smart device so that the user can view the second electronic device and the smart device. Exemplarily, the first electronic device can display the device information of the second electronic device and the smart device, and can also broadcast the device information of the second electronic device and the smart device by voice announcement. Exemplarily, when the seventh message and the twelfth message are sent separately, the first electronic device can display the device information of the second electronic device when the seventh message is received, and display the device information of the smart device when the twelfth message is received. When the seventh message and the twelfth message are sent at the same time, the first electronic device can display the device information of the second electronic device and the smart device at the same time when the seventh message and the twelfth message are received, or it can display the device information of the second electronic device and the smart device in time sharing, which is not limited here.

[0358] Further, after S1921, the second electronic device and / or smart device may be controlled. Taking the unbinding relationship between the first account and the second electronic device as an example, for example, Figure 20 As shown, the unbinding process may include the following steps:

[0359] S1922: The first electronic device receives an unbinding instruction.

[0360] S1923. The first electronic device sends a thirteenth message to the server, where the thirteenth message is used to instruct to release the binding relationship between the second electronic device and the first account.

[0361] S1924. The server responds to the thirteenth message and updates the management permission of the second electronic device.

[0362] Specifically, the server can clear the management permission of the second electronic device. For example, before the server clears the management permission of the second electronic device, the management permission is that the customer can manage the second electronic device; after the server clears the management permission of the second electronic device, the management permission can be empty. At this time, the second electronic device is not controlled.

[0363] S1925. The server sends a fourteenth message to the second electronic device, and the fourteenth message is used to instruct the second electronic device to unbind from the first account.

[0364] S1926. The second electronic device responds to the fourteenth message and clears the stored account information and the registration information registered on the server.

[0365] Specifically, when the second electronic device unbinds from the account, it can clear the stored account information, thereby achieving the unbinding. In addition, the second electronic device can also clear the registration information registered on the server, so that the second electronic device no longer feeds back device information to the server.

[0366] S1927. The second electronic device sends a fifteenth message to the intelligent device, and the fifteenth message is used to instruct the intelligent device to clear the registration information registered on the server by the intelligent device.

[0367] S1928. The intelligent device responds to the fifteenth message and clears the registration information registered on the server.

[0368] Specifically, the intelligent device can clear the registration information registered on the server, so that the intelligent device no longer feeds back device information to the server.

[0369] Exemplarily, Figure 21 shows a schematic flowchart of another smart home device control method. Among them, in Figure 21Among them, a client related to the control of smart home devices is installed on the first electronic device. The first account is logged in on the client, and the client corresponds to a server. The first electronic device can perform short-range communication with the second electronic device, and the second electronic device can perform long-range communication with the server. n smart devices are pre-registered on the second electronic device, that is, the n smart devices are pre-bound to the second electronic device, and the second electronic device and the n smart devices are in the same local area network, where n is a positive integer greater than or equal to 1. In one example, the second electronic device can be a gateway or an electronic device integrated with gateway functions, which can be understood as the entrance for the first electronic device to access the smart home system to which the second electronic device belongs. Exemplarily, when the second electronic device is an electronic device with gateway functions, the second electronic device can be a central device, such as a smart speaker, a smart TV, a smart screen, etc. Exemplarily, the first electronic device can be the device used by the administrator described above; the second electronic device can be the gateway 11 described above Figure 1 in the above; the smart device can be the smart speaker 12, the smart table lamp 13, and the smart TV 14 described above Figure 1 in the above; the server can be the server 16 described above Figure 1 in the above.

[0370] As Figure 21 shown, the smart home device control method may include the following steps:

[0371] S2001. The first electronic device performs short-range communication with the second electronic device and obtains first information related to the second electronic device from the second electronic device. The first information includes the first identifier of the second electronic device.

[0372] S2002. The first electronic device sends a first message to the server. The first message contains the first identifier, and the first message is used to obtain the first activation code representing the identity of the second electronic device.

[0373] S2003. The server responds to the first message and generates a first activation code based on the first identifier.

[0374] S2004. The server sends the first activation code to the first electronic device.

[0375] S2005. The first electronic device sends a second message to the second electronic device. The second message contains the first account, and the second message is used to request to bind the first account to the second electronic device.

[0376] S2006. The second electronic device responds to the second message and prohibits binding with the first account.

[0377] Specifically, after the second electronic device receives the second message, if it stores account information and the account information does not include the first account, it can be prohibited to bind with the first account, thereby preventing the second electronic device from being bound to multiple people. It is understandable that when the second electronic device is bound to an account, the user can share the second electronic device with other users through device sharing, thereby realizing the binding of the second electronic device to multiple people.

[0378] S2007. The second electronic device sends a sixteenth message to the first electronic device, where the sixteenth message includes information requesting input of a maintenance password.

[0379] S2008. The first electronic device receives a password input operation.

[0380] S2009. The first electronic device sends a seventeenth message to the second electronic device, where the seventeenth message includes a maintenance password.

[0381] S2010. The second electronic device responds to the seventeenth message and sends an eighteenth message to the first electronic device, where the eighteenth message includes a password verification result.

[0382] Specifically, after the second electronic device receives the maintenance password, it can compare the maintenance password with the password set by the administrator stored in it, and the verification is successful when the two are the same.

[0383] S2011. The first electronic device responds to the eighteenth message and sends a nineteenth message to the second electronic device, where the nineteenth message includes an information query request.

[0384] S2012: The second electronic device responds to the nineteenth message and sends a twentieth message to the first electronic device, where the twentieth message includes device information of the second electronic device and the smart device.

[0385] S2013. The first electronic device responds to the twentieth message and outputs device information of the second electronic device and the smart device.

[0386] Further, after S2013, the second electronic device and / or smart device may be controlled, for example, the binding relationship between the second electronic device and the account may be released. Taking the unbinding relationship between the account and the second electronic device as an example, for example, Figure 22 As shown, the unbinding process may include the following steps:

[0387] S2014. The first electronic device receives an unbinding instruction.

[0388] S2015. The first electronic device sends a twenty-first message to the second electronic device, where the twenty-first message is used to instruct to release the binding relationship between the second electronic device and the account.

[0389] S2016. The second electronic device responds to the twenty-first message and sends a twenty-second message to the server, where the twenty-second message includes information on releasing the binding relationship between the second electronic device and the account.

[0390] S2017. The server responds to the twenty-second message and updates the management authority of the second electronic device.

[0391] S2018. The server sends a twenty-third message to the second electronic device, where the twenty-third message includes information indicating successful unbinding.

[0392] S2019. The second electronic device responds to the twenty-third message and sends a twenty-fourth message to the first electronic device, where the twenty-fourth message includes information about successful unbinding.

[0393] S2020. The second electronic device clears the stored account information and the registration information registered on the server.

[0394] S2021. The second electronic device sends a fifteenth message to the smart device, where the fifteenth message is used to instruct the smart device to clear registration information that has been registered by the smart device on the server.

[0395] S2022. The smart device responds to the fifteenth message and clears the registration information that has been registered on the server.

[0396] It is understandable that all or part of any features of any embodiment of the present application can be freely and arbitrarily combined without contradiction, and the combined technical solutions are also within the scope of the present application.

[0397] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.

[0398] The method steps in the embodiments of this application can be implemented in a hardware manner or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), flash memory, read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), registers, hard disks, removable hard disks, CD-ROM, or any other form of storage medium well-known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC.

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

[0400] It can be understood that the various numerical numbers involved in the embodiments of this application are only for convenience of description and are not used to limit the scope of the embodiments of this application.

Claims

1. A smart home control method, characterized in that, The method is applied to a first electronic device, the first electronic device is provided with a client, the client is logged in with a first account, and the client corresponds to a server, and the method includes: The first electronic device communicates with the second electronic device over a short distance, and obtains first information related to the second electronic device from the second electronic device, wherein the first information includes a first identifier of the second electronic device; wherein the second electronic device is registered with n smart devices, and the second electronic device and the n smart devices are in the same local area network, and n is a positive integer greater than or equal to 1; The first electronic device sends a first message to a server, the first message including the first identifier, and the first message is used to obtain a first activation code representing the identity of the second electronic device; The first electronic device receives the first activation code sent by the server; The first electronic device sends a second message to the second electronic device, where the second message includes the first account, and the second message is used to request binding the first account with the second electronic device; In response to receiving a third message sent by the second electronic device, the third message including information that the second electronic device agrees to bind, the first electronic device sends a fourth message to the second electronic device, the fourth message including the first activation code, and the fourth message is used to instruct the second electronic device to register with the server using the first activation code; The first electronic device receives a seventh message and a twelfth message sent by the server, wherein the seventh message includes device information of the second electronic device, and the twelfth message includes device information of n smart devices, wherein the seventh message is sent by the server when the second electronic device is registered on the server, and the twelfth message is sent by the server when n smart devices register on the server in response to a registration instruction sent by the second electronic device; The first electronic device outputs device information of the second electronic device and n of the smart devices.

2. The method according to claim 1, characterized in that After the first electronic device outputs the device information of the second electronic device and the n smart devices, the method further includes: In response to the received device sharing operation, the first electronic device sends device sharing information to the server, where the device sharing information includes the account to be shared, and the device sharing information is used to instruct the server to bind the account to be shared with the second electronic device.

3. The method according to claim 1, characterized in that After the first electronic device outputs the device information of the second electronic device and the n smart devices, the method further includes: In response to the received unbinding instruction for unbinding from the second electronic device, the first electronic device sends a thirteenth message to the server, where the thirteenth message is used to instruct to unbind the binding relationship between the second electronic device and the first account.

4. The method according to any one of claims 1 to 3, characterized in that The first electronic device outputs device information of the second electronic device and the n smart devices, including: The first electronic device displays the device information of the second electronic device and the n smart devices, and / or, the first electronic device plays the device information of the second electronic device and the n smart devices through voice.

5. A smart home control method, characterized in that, The method is applied to a second electronic device, which is registered with n smart devices. The second electronic device and the n smart devices are in the same local area network, where n is a positive integer greater than or equal to 1. The method includes: The second electronic device communicates with the first electronic device in a short distance and sends a first message to the first electronic device. The first message includes a first identifier of the second electronic device. Among them, the first electronic device is provided with a client, the client logs in with a first account, and the client corresponds to a server. The second electronic device receives a second message sent by the first electronic device. The second message contains the first account, and the second message is used to request binding the first account to the second electronic device. The second electronic device stores the first account and sends a third message to the first electronic device. The third message contains information indicating that the second electronic device agrees to the binding. The second electronic device receives a fourth message sent by the first electronic device. The fourth message contains a first activation code. The fourth message is used to instruct the second electronic device to register with the server using the first activation code. The first activation code is generated when the server receives a first message sent by the first electronic device. The first message contains the first identifier, and the first activation code is used to represent the identity of the second electronic device. The second electronic device sends a fifth message to the server. The fifth message contains the first identifier and the first activation code. The fifth message is used to request registering the second electronic device to the server. In response to receiving a sixth message sent by the server, the sixth message contains information indicating successful registration. The second electronic device sends an eighth message to the server. The eighth message contains second identifiers of the n smart devices. The eighth message is used to request obtaining n second activation codes representing the identities of the n smart devices. The second electronic device receives the n second activation codes sent by the server. Among them, one second activation code corresponds to one smart device. The second electronic device sends ninth messages to the n smart devices respectively. The ninth message contains the second activation code corresponding to the smart device. The ninth message is used to instruct the smart device to register with the server using the second activation code corresponding to the smart device.

6. The method according to claim 5, wherein After the second electronic device sends ninth messages to the n smart devices respectively, the method further includes: Receiving the account to be shared sent by the server and storing the account to be shared.

7. The method according to claim 5 or 6, characterized in that, After the second electronic device sends ninth messages to the n smart devices respectively, the method further includes: The second electronic device receives a fourteenth message sent by the server, where the fourteenth message is used to instruct the second electronic device to unbind from the first account; In response to the fourteenth message, the second electronic device clears the stored account information and the registration information registered on the server.

8. The method according to claim 7, wherein The method further comprises: The second electronic device sends a fifteenth message to the n smart devices respectively, and the fifteenth message is used to instruct the smart device to clear the registration information that has been registered by the smart device on the server.

9. A smart home control method, characterized in that, The method is applied to a first electronic device, the first electronic device is provided with a client, the client is logged in with a first account, and the client corresponds to a server, and the method includes: The first electronic device communicates with the second electronic device over a short distance, and obtains first information related to the second electronic device from the second electronic device, wherein the first information includes a first identifier of the second electronic device; wherein the second electronic device is registered with n smart devices, and the second electronic device and the n smart devices are in the same local area network, and n is a positive integer greater than or equal to 1; The first electronic device sends a first message to a server, the first message including the first identifier, and the first message is used to obtain a first activation code representing the identity of the second electronic device; The first electronic device receives the first activation code sent by the server; The first electronic device sends a second message to the second electronic device, where the second message includes the first account, and the second message is used to request binding the first account with the second electronic device; The first electronic device receives a sixteenth message sent by the second electronic device, the sixteenth message including information requesting input of a maintenance password, wherein the sixteenth message is sent when the second electronic device determines that it stores account information related to a user account, and the account information does not include the first account; In response to the received password input operation, the first electronic device sends a seventeenth message to the second electronic device, wherein the seventeenth message includes a maintenance password; The first electronic device receives a twentieth message sent by the second electronic device, where the twentieth message includes device information of the second electronic device and n of the smart devices; The first electronic device outputs device information of the second electronic device and n of the smart devices.

10. The method according to claim 9, wherein After the first electronic device outputs the device information of the second electronic device and the n smart devices, the method further includes: In response to the received unbinding instruction, the first electronic device sends a twenty-first message to the second electronic device, where the twenty-first message is used to instruct to release the binding relationship between the second electronic device and the account stored in the second electronic device.

11. A smart home control method, characterized in that, The method is applied to a second electronic device, where n smart devices are registered with the second electronic device, and the second electronic device and the n smart devices are in the same local area network, where n is a positive integer greater than or equal to 1, and the method includes: The second electronic device communicates with the first electronic device over a short distance and sends first information to the first electronic device, wherein the first information includes a first identifier of the second electronic device, wherein the first electronic device is provided with a client, the client is logged in with a first account, and the client corresponds to a server; The second electronic device receives, by the second electronic device, a second message sent by the first electronic device, where the second message includes the first account, and the second message is used to request binding of the first account with the second electronic device; The second electronic device determines that account information related to the user account is stored, and the account information does not include the first account, and sends a sixteenth message to the first electronic device, where the sixteenth message includes information requesting input of a maintenance password; In response to the seventeenth message sent by the first electronic device, the seventeenth message including a maintenance password, the second electronic device verifies the maintenance password, and when the verification passes, sends device information of the second electronic device and n smart devices to the first electronic device.

12. The method according to claim 11, wherein After the second electronic device sends the device information of the second electronic device and the n smart devices to the first electronic device, the method further includes: The second electronic device receives a twenty-first message sent by the first electronic device, where the twenty-first message is used to instruct to release the binding relationship between the second electronic device and the account stored in the second electronic device; In response to the twenty-first message, the second electronic device sends a twenty-second message to the server, where the twenty-second message is used to instruct the server to release the binding relationship between the second electronic device and the account stored in the second electronic device; In response to the twenty-third message sent by the server, the twenty-third message includes information of successful unbinding, and the second electronic device clears the account information stored in the second electronic device and the registration information registered on the server.

13. The method according to claim 12, wherein The method further comprises: The second electronic device sends a fifteenth message to the n smart devices respectively, and the fifteenth message is used to instruct the smart device to clear the registration information that has been registered by the smart device on the server.

14. A smart home control method, characterized in that, The method is applied to a server, the server corresponds to a client, the client is logged in with a first account, and the client is set on a first electronic device. The method includes: The server receives a first message sent by a first electronic device, the first message including a first identifier of a second electronic device, the first message being used to obtain a first activation code representing an identity of the second electronic device, wherein the first identifier is obtained by the first electronic device through short-range communication with the second electronic device, the second electronic device is registered with n smart devices, the second electronic device and the n smart devices are in the same local area network, and n is a positive integer greater than or equal to 1; The server generates the first activation code based on the first identifier, and sends the first activation code to the first electronic device; The server receives a fifth message sent by the second electronic device, where the fifth message includes the first identifier and the first activation code, and the fifth message is used to request to register the second electronic device to the server; The server verifies the first activation code, records the first identifier when the verification is successful, and sends a sixth message to the second electronic device, wherein the sixth message includes information that the registration is successful; The server receives an eighth message sent by the second electronic device, the eighth message including the second identifications of the n smart devices, and the eighth message is used to obtain n second activation codes representing the identities of the n smart devices; The server generates n second activation codes based on each of the n second identifiers, and sends the n second activation codes to the second electronic device; The server receives n tenth messages sent by n smart devices, each of the tenth messages includes a second identifier and a second activation code of the smart device, and the tenth message is used to request to register the smart device to the server; The server verifies the n second activation codes respectively, and records the second identifiers of the n smart devices respectively when the verification passes; The server sends a seventh message and a twelfth message to the first electronic device, the seventh message including device information of the second electronic device, and the twelfth message including device information of n smart devices.

15. The method according to claim 14, characterized in that, After the server sends the seventh message and the twelfth message to the first electronic device, the method further includes: The server receives a thirteenth message sent by the first electronic device, where the thirteenth message is used to instruct to release the binding relationship between the second electronic device and the first account; The server updates the management authority of the second electronic device, and sends a fourteenth message to the second electronic device, where the fourteenth message is used to instruct the second electronic device to release the binding relationship with the first account.

16. The method according to claim 14, characterized in that, After the server sends the first activation code to the first electronic device, the method further includes: The server receives a twenty-second message sent by the second electronic device, where the twenty-second message is used to instruct to release the binding relationship between the second electronic device and the account stored in the second electronic device; The server updates the management authority of the second electronic device, and sends a twenty-third message to the second electronic device, where the twenty-third message includes information that the unbinding is successful.

17. A first electronic device, characterized in that, The first electronic device is provided with a client, the client is logged with a first account, and the first electronic device is used to execute the method as described in any one of claims 1-4 and 9-10.

18. A second electronic device, characterized in that, The second electronic device is registered with n smart devices, the second electronic device and the n smart devices are in the same local area network, n is a positive integer greater than or equal to 1, and the second electronic device is used to execute the method described in any one of claims 5-8 and 11-13.

19. The second electronic device according to claim 18, wherein The second electronic device is a gateway or an electronic device integrated with gateway functions.

20. A server, characterized in that, The server is used to execute the method described in any one of claims 14-16.

21. A computer-readable storage medium storing a computer program, which, when running on a first electronic device, causes the first electronic device to execute the method described in any one of claims 1-4 and 9-10.

22. A computer-readable storage medium storing a computer program, which, when running on a second electronic device, causes the second electronic device to execute the method described in any one of claims 5-8 and 11-13.

23. A computer-readable storage medium storing a computer program, which, when running on a server, causes the server to execute the method described in any one of claims 14-16.

Citation Information

Patent Citations

  • Binding method of terminal and home gateway

    CN105992306A