Device control method and apparatus

By binding a third-party device to an IoT device and periodically verifying control, combined with a cloud-based authorization mechanism, the problem of IoT device hijacking is solved, enabling proactive regaining of control and improving user experience and management efficiency.

CN115567565BActive Publication Date: 2026-03-20HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-30
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

When an IoT device is connected to a second terminal but not to other devices, the first terminal cannot actively revoke authorization, which leads to the IoT device being hijacked by the second terminal, causing inconvenience and security risks.

Method used

By periodically verifying the control rights of the second device after the IoT device is bound to the third device, the connection is disconnected if the latest control key is not obtained. Combined with the cloud authorization mechanism, this ensures that only the device with the master control can obtain the control key, thus preventing hijacking.

Benefits of technology

Effectively prevent IoT devices from being hijacked, improve user experience and management efficiency, ensure that only authorized devices can control IoT devices, and prevent unauthorized control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115567565B_ABST
    Figure CN115567565B_ABST
Patent Text Reader

Abstract

The application provides a device control method and device, which can prevent an IoT device from being hijacked by a second terminal when the second terminal does not have the control right of the IoT device, and belongs to the technical field of terminals. The method comprises the following steps: a first device sends first information to a second device, and then, if the first device determines that the second device does not obtain a first control key, the first device disconnects the connection with the second device. The first device has been bound with a third device, the first information is used for informing the second device to obtain the first control key, and the first control key is used for establishing a session between the second device and the first device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of Internet of Things, and in particular to a device control method and apparatus. BACKGROUND

[0002] With the development of Internet of Things (IoT) technology, more and more IoT devices, such as air conditioners, televisions, sound boxes, etc., support connection with other devices, such as mobile phones, computers, etc., to achieve control of these IoT devices through device linkage.

[0003] Specifically, when a certain device, such as a first terminal, needs to control an IoT device, it can request the cloud to assign a corresponding key (such as a first key) so that the first terminal can use the first key to control the IoT device. At this time, if the first terminal wants to authorize the control right of the IoT device to other devices, such as a second terminal different from the cloud account of the first terminal, the first terminal can request the cloud to assign a corresponding key (such as a second key) for the second terminal, so that the second terminal can use the second key to control the IoT device, thereby realizing the authorization of the control right.

[0004] However, when the IoT device is connected with the second terminal but not connected with other devices (such as the first terminal or the cloud), if the first terminal cancels the authorization, i.e., the second terminal no longer has the control right of the IoT device, but the second terminal does not disconnect the connection with the IoT device, the IoT device is hijacked by the second terminal. SUMMARY

[0005] Embodiments of the present application provide a device control method and apparatus to prevent the IoT device from being hijacked by the second terminal when the second terminal does not have the control right of the IoT device.

[0006] In a first aspect, a device control method is provided. The method includes: a first device sending first information to a second device, and then, if the first device determines that the second device does not obtain a first control key, disconnecting the connection with the second device. The first device has bound a third device, the first information is used to inform the second device to obtain the first control key, and the first control key is used for the second device to establish a session with the first device.

[0007] Based on the method of the first aspect, in a case that a certain IoT device (e.g., the first device) has bound a certain device (e.g., the third device), i.e., the third device has the control right of the first device, if another device (e.g., the second device) wants to continue to control the first device, the first device can initiate a control right verification to the second device, i.e., send the first information to indicate the second device to obtain the latest control key (e.g., the first control key). In this way, if the second device does not obtain the first control key, i.e., does not have the control right of the first device, the first device can disconnect the connection with the second device to avoid the first device being hijacked by the second device.

[0008] In a possible design, before the first device sends the first information to the second device, the method of the first aspect can further include that the first device receives second information from the third device, and thereby binds the third device according to the second information. The second information can be used to indicate that the first device needs to bind the third device. In this way, the first device can accurately bind the device (e.g., the third device) that it needs to bind according to the second information, so as to avoid misbinding.

[0009] Optionally, the first device binding the third device according to the second information can include that the first device determines that a corresponding relationship of the first device is not established according to the second information, and thereby establishes a first corresponding relationship between the first device and the third device. It can be seen that if the first device currently does not bind other devices, the third device is bound. In other words, the third device is the first device that binds the first device, i.e., the first device that has the control right (or the main control right) of the first device. In this way, if other devices want to control the first device subsequently, the first device can initiate a control right verification to the other devices according to the third device having the main control right, instead of initiating the control right verification to the third device, so as to avoid misverification.

[0010] Further, the second information can include an identifier of the first device, an identifier of a first user, and a second control key, where the first user is a user corresponding to the third device, the corresponding relationship of the first device is a corresponding relationship between the identifier of the first device and the identifier of the user, the first corresponding relationship is a corresponding relationship between the identifier of the first device and the identifier of the first user, and the second control key is used for the third device to establish a session with the first device. In other words, the first device binding the third device is to bind the identifier (e.g., an account) of the first user corresponding to the third device. In this case, if the first user logs in the same account using different devices, the first user can still control the first device through the binding relationship of the first user, without the first user needing to re-register and re-bind, so as to improve the user experience.

[0011] In a possible design, before the first device sends the first information to the second device, the method of the first aspect further includes: receiving, by the first device, third information from the second device. The third information is used by the second device to request control of the first device.

[0012] Optionally, the third information can include an identifier of a second user and an identifier of the first device. The second user is a user corresponding to the second device. In this way, the first device can determine that the identifier of the second user in the third information is different from the identifier of the first user corresponding to the identifier of the first device in the first correspondence, and thus determine that the second device is not the first device that has the control right of the first device, and further determine to initiate the control right verification (e.g., send the first information to the second device) to the second device instead of to other devices, thereby avoiding false verification.

[0013] In a possible design, the first information can include a verification value, and the verification value can be used to determine the first control key.

[0014] Optionally, the first control key is determined according to the verification value, a second control key, and an identifier of a second user. The second control key is used for the third device to establish a session with the first device, and the second user is a user corresponding to the second device. It can be seen that, since the second control key is stored locally on the first device and the first device does not send the second control key to the second device, the second device cannot determine the first control key by itself, thereby avoiding hijacking the first device by determining the first control key by itself when the second device does not have the control right.

[0015] In a second aspect, a device control method is provided. The method includes: receiving, by a second device, first information from a first device, and sending fourth information to a fourth device. The first information is used to inform the second device to obtain a first control key, and the first control key is used for the second device to establish a session with the first device. The fourth information is used to request the fourth device to determine the first control key.

[0016] According to the method of the first aspect and the second aspect, since the second device cannot determine the first control key by itself, but can only request the fourth device to determine the first control key, the first device can be prevented from being hijacked by determining the first control key by itself when the second device does not have the control right.

[0017] In a possible design, the first information can include a verification value, and the verification value is used by the fourth device to determine the first control key.

[0018] Optionally, the fourth information can comprise: an identity of the first device, an identity of the second user, and a check value. The second user is a user corresponding to the second device. It should be understood that, according to the method described in combination with the second aspect and the fourth aspect described below, in the case that the fourth device stores the first correspondence, the fourth device can determine that the identity of the second user corresponding to the identity of the first device in the fourth information is different from the identity of the first user corresponding to the identity of the first device in the first correspondence, and thus determine that the second user is not the first device that has the control right of the first device. In this way, the fourth device can further determine whether the second user has the control right of the first device, or whether the first user cancels the authorization of the control right of the first device, and thus determine whether to generate the second control key according to whether the first device cancels the authorization, so as to avoid the generation of the second control key by mistake, such as the generation of the second control key in the case that the first device cancels the authorization.

[0019] Optionally, after the second device sends the fourth information to the fourth device, the method described in the second aspect can further comprise: the second device receives the first control key from the fourth device, and thus sends the first control key to the first device, so that the second device can continue to control the first device in the case that the second device has the control right of the first device.

[0020] In a possible design, before the second device receives the first information from the first device, the second device sends third information to the first device. The third information is used by the second device to request to control the first device.

[0021] Optionally, the third information can comprise: an identity of the second user and an identity of the first device. The second user is a user corresponding to the second device.

[0022] In addition, other technical effects of the method described in the second aspect can refer to the technical effects of the method described in the first aspect, which will not be described herein again.

[0023] In a third aspect, a device control method is provided. The method comprises: a third device determining a second control key, and thus sending second information to a first device. The second control key is used by the third device to establish a session with the first device, and is also used by the first device to determine a first control key. The first control key is used by devices other than the third device to establish a session with the first device. The second information comprises the second control key, and the second information is used to instruct the first device to bind the third device.

[0024] According to the method of the first aspect and the third aspect, the second information is used to instruct the first device to bind the third device, so that the third device becomes the first device bound device and the first device control right device. In this way, if a second device wants to control the first device, the first device can initiate a control right check to the second device according to the binding relationship between the first device and the third device, that is, the first device can notify the second device to obtain the latest control key (such as the first control key). At this time, since the first device can determine the first control key according to the second control key, the first device can use the first control key to check whether the second device obtains the first control key, so as to determine whether the second device still has the control right of the first device. In this way, if the first device determines that the second device does not have the control right of the first device, the connection with the second device is disconnected, so as to avoid being hijacked by the second device.

[0025] In a possible design, the second information can further include an identifier of the third device and an identifier of the first user.

[0026] In a possible design, after the third device sends the second information to the first device, the method of the third aspect can further include that the third device sends fifth information to a fourth device. The fifth information is used to indicate that the third device authorizes the second device with the control right of the first device, so that the fourth device can subsequently determine that the second device, or a second user corresponding to the second device, has the control right of the first device, thereby determining the first control key for the second device, so that the second device can continue to control the first device in the case of having the control right of the first device.

[0027] Optionally, after the third device sends the fifth information to the fourth device, the method of the third aspect can further include that the third device sends sixth information to the fourth device. The sixth information is used to indicate that the third device cancels the authorization of the second device with the control right of the first device. In this way, the fourth device can subsequently determine that the second device does not have the control right of the first device according to the sixth information, thereby not determining the first control key for the second device, so that the second device cannot continue to control the first device, and the hijacking of the first device by the second device is avoided.

[0028] In addition, other technical effects of the method of the third aspect can refer to the technical effects of the methods of the first aspect and the second aspect, which will not be described here.

[0029] In a fourth aspect, a device control method is provided. The method can include that a fourth device receives fourth information from a second device, and analyzes the fourth information. The fourth information is used to request the fourth device to determine a first control key, the first control key is used for the second device to establish a session with a first device, and the first device has bound a third device.

[0030] In a possible design, after the fourth device parses the fourth information, the method in the fourth aspect can further include: determining, according to the fourth information, the first control key if the fourth device determines that the second device has the control right of the first device, and sending the first control key to the second device.

[0031] Optionally, the fourth information can include an identifier of the first device, an identifier of the second user, and a check value, the first control key is determined according to the check value, the second control key, and the identifier of the second user, the second control key is used to establish a session between the third device and the first device, and the second user is a user corresponding to the second device.

[0032] Optionally, the second device having the control right of the first device can mean that the first device has bound the second device.

[0033] Optionally, before the fourth device determines that the second device has the control right of the first device, the method in the fourth aspect can further include: receiving, by the fourth device, fifth information from the third device, to bind the first device and the second device according to the fifth information. The fifth information is used to indicate that the third device authorizes the control right of the first device to the second device.

[0034] Further, the fourth device binding the first device and the second device according to the fifth information can include: determining, by the fourth device according to the fifth information, a second correspondence between the first device and the second device. The second correspondence is used to indicate that the identifier of the first device corresponds to the identifier of the second user. In other words, the first device binding the second device means binding the identifier (such as the account of the second user) of the first user corresponding to the second device. In this case, if the second user logs in to the same account using different devices, the second user can still control the first device through the binding relationship of the second user, without the first user reauthorizing, thereby improving the user experience.

[0035] In a possible design, after the fourth device parses the fourth information, the method in the fourth aspect can further include: sending, to the second device, seventh information if the fourth device determines that the second device does not have the control right of the first device. The seventh information is used to indicate that the second device does not have the control right of the first device.

[0036] Optionally, the second device not having the control right of the first device can mean that the first device has not bound the second device.

[0037] Optionally, before the fourth device determines that the second device does not have the control right of the first device, the method of the fourth aspect further includes: the fourth device receiving sixth information from the third device, so as to unbind the first device from the second device according to the sixth information. The sixth information is used to indicate that the third device cancels the authorization of the control right of the first device to the second device.

[0038] Further, the fourth device unbinding the first device from the second device according to the sixth information can include: the fourth device deleting a second correspondence between the first device and the second device according to the sixth information. The second correspondence is used to indicate that the identifier of the first device corresponds to the identifier of the second user, and the second user is a user corresponding to the second device.

[0039] In addition, other technical effects of the method of the fourth aspect can refer to the technical effects of the methods of the first aspect to the third aspect, which will not be described here.

[0040] In the fifth aspect, an electronic device is provided. The electronic device includes one or more processors, a memory, and a communication module. The memory stores one or more computer programs including instructions that, when executed by the electronic device, cause the electronic device to perform the method of any one of the first aspect to the fourth aspect.

[0041] In the sixth aspect, an Internet of Things system is provided. The system includes one or more electronic devices. The electronic devices are configured to perform the method of any one of the first aspect to the fourth aspect.

[0042] In the seventh aspect, a computer-readable storage medium is provided. The computer-readable storage medium includes a computer program or instructions. When the computer program or instructions are executed on a computer, the computer performs the method of any one of the first aspect to the fourth aspect.

[0043] In the eighth aspect, a computer program product is provided. The computer program product includes a computer program or instructions. When the computer program or instructions are executed on a computer, the computer performs the method of any one of the first aspect to the fourth aspect.

[0044] In the ninth aspect, a chip system is provided. The chip system is applied to an electronic device including a memory and a communication module. The chip system includes one or more interface circuits and one or more processors. The interface circuits and the processors are interconnected by a circuit. The interface circuits are configured to receive signals from the memory of the electronic device and send signals to the processors. The signals include computer instructions stored in the memory. When the processors execute the computer instructions, the electronic device performs the method of any one of the first aspect to the fourth aspect. BRIEF DESCRIPTION OF DRAWINGS

[0045] Figure 1 Architecture diagram of the Internet of Things system provided by the embodiments of the present application;

[0046] Figure 2 Structure diagram of the terminal device (for example, a mobile phone) provided by the embodiments of the present application;

[0047] Figure 3 Structure diagram of the IoT device (for example, a sound box) provided by the embodiments of the present application;

[0048] Figure 4 Application scenario diagram of the device control method provided by the embodiments of the present application;

[0049] Figure 5 Interaction interface provided by the embodiments of the present application Figure 1 ;

[0050] Figure 6A Interaction interface provided by the embodiments of the present application Figure 2 ;

[0051] Figure 6B Interaction interface provided by the embodiments of the present application Figure 3 ;

[0052] Figure 6C Interaction interface provided by the embodiments of the present application Figure 4 ;

[0053] Figure 7 Interaction interface provided by the embodiments of the present application Figure 5 ;

[0054] Figure 8 Interaction interface diagram six provided by the embodiments of the present application;

[0055] Figure 9 Interaction interface provided by the embodiments of the present application Figure 7 ;

[0056] Figure 10 Interaction interface provided by the embodiments of the present application Figure 8 ;

[0057] Figure 11 Interaction interface provided by the embodiments of the present application Figure 9 ;

[0058] Figure 12 Interaction interface provided by the embodiments of the present application Figure 10 ;

[0059] Figure 13 Flowchart of the device control method provided by the embodiments of the present application Figure 1 ;

[0060] Figure 14 Flowchart of the device control method provided by the embodiment of the present application Figure 2 ;

[0061] Figure 15 Structure diagram of the electronic device provided by the embodiment of the present application. DETAILED DESCRIPTION

[0062] The physical network system in the prior art will be introduced first.

[0063] In the prior art, the physical network system can generally include a first terminal, a second terminal, an IoT device and a cloud.

[0064] If the first terminal wants to control the IoT device, the first terminal can be bound with the IoT device and request the cloud to assign a corresponding key (such as a first key) so that the first terminal uses the first key to establish a session between the first terminal and the IoT device to control the IoT device through the session. At this time, if the first terminal wants to authorize the control right of the IoT device to other devices, such as to the second terminal which logs in a cloud account different from the cloud account of the first terminal, the first terminal can instruct the second terminal to bind the IoT device and request the cloud or directly assign a corresponding key (such as a second key) for the second terminal by the first terminal so that the second terminal can use the second key to establish a session between the second terminal and the IoT device to control the IoT device through the session, thereby realizing the authorization of the control right.

[0065] After the second terminal obtains the authorization of the control right of the IoT device, the second terminal can connect and control the IoT device. However, in the case that the IoT device is connected with the second terminal and controlled by the second terminal, if the first terminal wants to cancel the authorization, but the IoT device can only communicate with the second terminal and can only receive the control instructions of the second terminal because the IoT device is a Bluetooth device and does not have the ability to communicate directly with the cloud, the first terminal will not be able to instruct the IoT device to disconnect with the second terminal, so the second terminal can always maintain the connection with the IoT device and control the IoT device, thereby causing the IoT device to be hijacked by the second terminal.

[0066] Currently, in order to solve the problem that the IoT device is hijacked by the second terminal, the IoT device can only be disconnected from the second terminal through manual notification. For example, the user of the first terminal manually notifies (sends a message, makes a phone call, or tells in person, etc.) the user of the second terminal to disconnect the second terminal from the IoT device, so that the user of the second terminal performs a user operation of disconnecting the second terminal from the IoT device, or the user of the second terminal performs a user operation of deleting the IoT device from the device list of the second terminal, so as to cancel the hijacking of the IoT device. In this process, if the user of the second terminal does not agree to disconnect the connection and does not perform the above-mentioned user operation, the IoT device will still be hijacked by the second terminal. Currently, whether the first terminal can successfully cancel the control right authorization of the IoT device depends on the second terminal. There is no method to enable the first terminal to actively "reclaim" the control right of the IoT device.

[0067] For ease of understanding, two specific scenarios are introduced below.

[0068] Scenario 1: The smart door lock is hijacked by the tenant.

[0069] The first terminal is the landlord's mobile phone, the second terminal is the tenant's mobile phone, and the IoT device is the tenant's smart door lock. In this case, during the tenant's occupancy period, the landlord can authorize the tenant to control the smart door lock through the mobile phone, so that the tenant can control the opening and closing of the smart door lock through the mobile phone to enter and exit the rental house. However, when the tenant's occupancy period expires, the landlord cannot cancel the control right of the smart door lock authorized to the tenant through the mobile phone, and the tenant can still control the opening and closing of the smart door lock through the mobile phone, so that the tenant can still freely enter and exit the rental house, which causes inconvenience to the landlord's life and even brings safety hazards.

[0070] Scenario 2: The earphone is hijacked by another user.

[0071] The first terminal is the mobile phone of user 1, the second terminal is the mobile phone of user 2, and the IoT device is the earphone of user 1. In this case, if user 2 wants to use the earphone, user 1 can authorize user 2 to control the earphone through the mobile phone, so that user 2 can use the earphone. However, when user 1 wants to use the earphone, if the mobile phone of user 2 is still connected to the earphone of user 1 at this time, the earphone of user 1 can only be controlled by the mobile phone of user 2, so that user 1 cannot cancel the control right of the earphone authorized to user 2 through the mobile phone, so that user 2 can still use the earphone, which causes inconvenience to the use of user 1.

[0072] Therefore, the embodiments of the present application provide a device control method, system, electronic device and apparatus, which can enable the first terminal in the above-mentioned scenarios to actively "reclaim" the control right of the IoT device, and effectively avoid the hijacking of the IoT device.

[0073] The technical solutions in the application will be described below with reference to the drawings.

[0074] Figure 1 For the architecture schematic diagram of the Internet of Things system 100 in the embodiments of the application, the device control method provided by the embodiments of the application can be applied to the Internet of Things system 100 as shown in the figure. Figure 1 As shown in the figure, the Internet of Things system 100 can include one or more electronic devices, such as a first device 101, a second device 102, a third device 103, and a fourth device 104. Figure 1

[0075] Among them, the first device 101, the second device 102, and the third device 103 can be terminal devices, which can specifically be a mobile phone, a tablet computer, a television (also referred to as a smart screen, a large-screen device, etc.), a notebook computer, an ultra-mobile personal computer (UMPC), a handheld computer, a netbook, a personal digital assistant (PDA), a wearable electronic device, a vehicle-mounted device (also referred to as a car machine), an augmented reality (AR) device, a virtual reality (VR) device, etc.; or can also be an IoT device, such as a headset, a television, a sound box, a door lock, a refrigerator, an oven, a microwave oven, an air conditioner, a sweeping robot, a smart lamp, a camera, etc., without limitation. The fourth device 104 can be a network device, or a cloud device or a cloud platform (hereinafter referred to as a cloud platform), which can specifically be a server, such as a database server, an application server, etc., and can be a single server or a server cluster, without limitation. In a typical scenario, the first device 101 is an IoT device, the second device 102 and the third device 103 are terminal devices, and the fourth device 104 is a cloud platform.

[0076] ​The first device 101 can communicate with the second device 102 and the third device 103 respectively, the second device 102 can communicate with the first device 101 respectively, the third device 103 can communicate with the first device 101 respectively, and the fourth device 104 can communicate with the second device 102 and the third device 103 respectively. The wired connection can be established by using a universal serial bus (USB). Alternatively, the wireless connection can be established by using cellular communication, Bluetooth Low Energy (BLE), Wireless Fidelity (Wi-Fi), Near Field Communication (NFC), Voice over Internet Protocol (VoIP), or communication protocols that support network slicing architecture. In addition, optionally, a wired or wireless communication connection may be established between the first device 101 and the fourth device 104, or no wired or wireless communication connection may be established, without limitation; wherein, the device control method provided in the embodiments of this application is particularly applicable to scenarios in which no wired or wireless communication connection is established between the first device 101 and the fourth device 104; of course, the device control method provided in the embodiments of this application can also be applied to scenarios in which a wired or wireless communication connection is established between the first device 101 and the fourth device 104.

[0077] Exemplarily, in the Internet of Things system 100, if the third device 103 wants to control the first device 101, and the first device 101 is currently not bound to other devices, or in other words, is not controlled by other devices, the third device 103, or in other words, the first user (i.e., the first user corresponding to the third device 103, such as the user of the third device 103) can bind with the first device 101 to have the control right of the first device 101, so as to control the first device 101, such as controlling the sound box to play audio, the television to play video, the smart door lock to open and close the lock, and the like. Moreover, since the third device 103 is bound with the first device 101, the first device 101 is not bound to other devices, and therefore the third device 103 can be the first bound device of the first device 101, i.e., the master control device of the first device 101. In this way, the control right of the first device 101 possessed by the third device 103 can be the master control right, i.e., the third device 103 can not only control the first device 101, but also authorize the control right of the first device 101 to other devices, so that the other devices can also control the first device 101. For example, the third device can authorize the control right of the first device 101 to the second device 102, or in other words, the second user (i.e., the user corresponding to the second device 102, such as the user of the second device 102), through the cloud platform 104, so that the second device 102 can also bind with the first device 101 to have the control right of the first device 101, so as to control the first device 101. Wherein, the account (such as the account on the cloud platform) of the second device 102 is different from the account (such as the account on the cloud platform) of the third device 103. Moreover, since the second device 102 is bound with the first device 101, the first device 101 has been bound to the third device 103, and therefore the second device 102 can be the non-first bound device of the first device 101, i.e., the slave control device of the first device 101. In this way, the control right of the first device 101 possessed by the second device 102 can be the slave control right, i.e., the second device 102 can control the first device 101, but cannot authorize the control right of the first device 101 to other devices.

[0078] Afterwards, when the second device 102 controls the first device 101, since the first device 101 determines that the second device 102 possesses the slave control right instead of the master control right, the control right verification can be initiated to the second device 102 periodically, such as instructing the second device 102 to acquire the latest control key. At this time, if the third device 103 does not cancel the authorization, such as not canceling the authorization of the control right of the first device 101 to the second device 102 on the cloud platform 104, the second device 102 can complete the control right verification through the cloud platform 104, such as acquiring the latest control key from the cloud platform 104, so as to continue to control the second device 102 using the latest control key. However, if the third device 103 cancels the authorization, such as canceling the authorization of the control right of the first device 101 to the second device 102 on the cloud platform 104, the second device 102 cannot complete the control right verification through the cloud platform 104, such as being unable to acquire the latest control key from the cloud platform 104. In this way, the first device 101 will disconnect the communication connection with the second device 102 because the second device 102 does not acquire the latest control key, so as to avoid the first device 101 being hijacked by the second device 102.

[0079] It should be noted that the above-mentioned binding of the first device 101 to the third device 103 can be binding to the first user corresponding to the third device 103, such as establishing the correspondence between the identifier of the first device 101 and the identifier of the first user, or the account of the first user. In this way, the above-mentioned third device 103 possessing the control right of the first device 101 can be considered as the first user possessing the control right of the first device 101. In this case, if the first user logs in to the same account using different devices, the first user can still control the first device through the binding relationship of the first user, without the first user needing to re-register and re-bind, so as to improve the user experience. Similarly, the above-mentioned binding of the first device 101 to the second device 102 can also be binding to the second user corresponding to the second device 102, such as establishing the correspondence between the identifier of the first device 101 and the identifier of the second user, or the account of the second user. In this way, the above-mentioned second device 102 possessing the control right of the first device 101 can also be considered as the second user possessing the control right of the first device 101. In this case, if the second user logs in to the same account using different devices, the second user can still control the first device through the binding relationship of the second user, without the first user needing to re-authorize, so as to also improve the user experience. In addition, for the first device 101, the user possessing the master control right (such as the first user) can be unique, such as one and only one, but the user possessing the slave control right (such as the second user) can be diverse, such as one or more, so that the user possessing the master control right can uniformly manage the control right of the user possessing the slave control right, such as authorization and cancellation of authorization, so as to improve the management efficiency.

[0080] Figure 2 A structural schematic diagram of a terminal device (e.g., a mobile phone) is provided for an embodiment of the present application. As shown, the second device 102 can include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headset jack 270D, a sensor module 280, and the like. Figure 2

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

[0082] The processor 210 can further include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory can hold instructions or data that the processor 210 has just used or is using repeatedly. If the processor 210 needs to use the instructions or data again, it can directly call them from the memory. This avoids repeated access and reduces the waiting time of the processor 210, thus improving the efficiency of the system.

[0083] The wireless communication function of the terminal device can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor, and the baseband processor, and the like.

[0084] The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the terminal device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0085] ​The mobile communication module 250 can provide solutions for wireless communication including 2G / 3G / 4G / 5G, etc. applied on the terminal device. The mobile communication module 250 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed signals to the modem processor for demodulation. The mobile communication module 250 can also amplify the signals modulated by the modem processor, and radiate the signals as electromagnetic waves by the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 250 can be disposed in the processor 210. In some embodiments, at least part of the functional modules of the mobile communication module 250 can be disposed in the same device as at least part of the modules of the processor 210.

[0086] The wireless communication module 260 can provide solutions for wireless communication including wireless local area networks (WLAN) such as Wi-Fi network, BLE, global navigation satellite system (GNSS), frequency modulation (FM), NFC, infrared (IR) technology, etc. applied on the terminal device. The wireless communication module 260 can be one or more devices integrated with at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 can also receive signals to be transmitted from the processor 210, perform frequency modulation and amplification on the signals, and radiate the signals as electromagnetic waves by the antenna 2.

[0087] In some embodiments, antenna 1 and mobile communication module 250 of the terminal device are coupled, and antenna 2 and wireless communication module 260 are coupled, so that the terminal device can communicate with the network and other devices through wireless communication technology. The wireless communication technology can include: GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include: global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS).

[0088] The terminal device implements display functions through the GPU, the display screen 294, and the application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 can include one or more GPUs that execute program instructions to generate or change display information.

[0089] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), etc. In some embodiments, the terminal device can include 1 or N display screens 194, and N is a positive integer greater than 1.

[0090] The terminal device can implement the shooting function through the ISP, the camera 293, the video codec, the GPU, the display screen 294, and the application processor, etc.

[0091] ISP is used to process the data feedback by the camera 293. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and conversion into a visible image. ISP can also optimize the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, ISP can be provided in the camera 293.

[0092] The camera 293 is used to capture still images or videos. Objects generate optical images through lenses and project them onto photosensitive elements. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard RGB, YUV, or other format image signal. In some embodiments, the terminal device can include one or N cameras 293, where N is a positive integer greater than 1.

[0093] The digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device is performing frequency point selection, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0094] The video codec is used for digital video compression or decompression. The terminal device can support one or more video codecs. In this way, the terminal device can play or record videos in multiple encoding formats, such as moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0095] The external memory interface 220 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device. The external memory card communicates with the processor 210 through the external memory interface 220 to realize data storage functions. For example, music, video, and other files can be saved in the external memory card.

[0096] The internal memory 221 can be used to store computer executable program codes, which include instructions. The processor 210 performs various functional applications and data processing of the terminal device by running the instructions stored in the internal memory 221. The internal memory 221 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), and the like. The data storage area can store data (such as audio data, a phone book, etc.) created during use of the terminal device, and the like. In addition, the internal memory 221 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.

[0097] The terminal device can realize audio functions through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the earphone interface 270D, the application processor, and the like. For example, music playing, recording, and the like.

[0098] The audio module 270 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 270 can also be used to encode and decode audio signals. In some embodiments, the audio module 270 can be disposed in the processor 210, or part of the functions of the audio module 270 can be disposed in the processor 210.

[0099] The speaker 270A, also known as a “loudspeaker”, is used to convert an audio electrical signal into a sound signal. The terminal device can listen to music or listen to a hands-free call through the speaker 270A.

[0100] The receiver 270B, also known as a “earpiece”, is used to convert an audio electrical signal into a sound signal. When the terminal device answers a call or a voice message, the voice can be heard by placing the receiver 270B close to the ear.

[0101] The microphone 270C, also known as a “microphone” or “sound collector”, is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can make a sound by placing the mouth close to the microphone 270C, and input the sound signal into the microphone 270C. The terminal device can be provided with at least one microphone 270C. In other embodiments, the terminal device can be provided with two microphones 270C, which can not only collect sound signals, but also realize a noise reduction function. In other embodiments, the terminal device can be provided with three, four or more microphones 270C, which can not only collect sound signals and reduce noise, but also identify the source of the sound, realize a directional recording function, and the like.

[0102] The headphone jack 270D is used to connect wired headphones. The headphone jack 270D can be a USB 230 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0103] The sensor module 280 may include: pressure sensor, gyroscope sensor, barometric pressure sensor, magnetic sensor, accelerometer, distance sensor, proximity sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor, bone conduction sensor, etc.

[0104] Of course, the terminal device may also include: a charging management module, a power management module, a battery, buttons, indicators, and one or more SIM card interfaces, etc., and this application embodiment does not impose any restrictions on this.

[0105] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal device. In other embodiments of this application, the terminal device may include more or fewer components than illustrated, or combine some components, or split some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. Furthermore, the connection of the device described in the embodiments of this application may be a direct connection or an indirect connection, such as a connection relayed through other devices, and is not limited thereto. The transmission described in the embodiments of this application may be a direct transmission or an indirect transmission, such as a transmission forwarded through other devices, and is not limited thereto.

[0106] Figure 3 This is a structural schematic diagram of an IoT device (e.g., a speaker) provided in an embodiment of this application, as shown below. Figure 3 As shown, an IoT device may include: a processor 310, a memory 320, a wireless communication module 330, and a power supply 340.

[0107] The memory 320 can be used to store application code, such as application code for pairing and connecting IoT devices with the aforementioned mobile phone. The processor 310 can control the execution of the aforementioned application code to achieve the function of verifying control rights in this embodiment of the application.

[0108] The memory 320 may also store an address used to uniquely identify the IoT device. Additionally, the memory 320 may store connection data of devices previously successfully paired with the IoT device. For example, this connection data could be the address of a device that has been successfully paired with the IoT device. Based on this connection data, the IoT device can automatically pair with the device without needing to configure the connection, such as performing authentication. The aforementioned address can be a media access control (MAC) address.

[0109] The wireless communication module 330 supports short-range data exchange between IoT devices and various devices, such as the aforementioned mobile phone. In some embodiments, the wireless communication module 340 can be a transceiver. The IoT device can establish a wireless connection with the aforementioned mobile phone through the transceiver, such as Bluetooth, Wi-Fi, NFC connection, etc., to achieve short-range data exchange between the two.

[0110] The power supply 340 can be used to power the various components included in an IoT device. In some embodiments, the power supply 340 can be a battery, such as a rechargeable battery.

[0111] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on IoT devices. If the IoT device is of a different type, it may have more... Figure 3 The more or fewer components shown can be combined into two or more components, or they can have different component configurations. For example, if the IoT device is a speaker, it can also include: a speaker, a microphone, etc.; if the IoT device is a television, it can also include: a display screen, a speaker, etc.; if the IoT device is an air conditioner, it can also include: a compressor, a condenser coil, etc., and there are no limitations on this. Furthermore, Figure 3 The various components shown can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing or application-specific integrated circuits.

[0112] Figure 4 This is a schematic diagram illustrating an application scenario of a device control method provided in an embodiment of this application.

[0113] Figures 5-12 An interactive interface diagram provided for an embodiment of this application.

[0114] The following describes the device control method provided in this application embodiment using mobile phone 1 as the third device, mobile phone 2 as the second device, and speaker 3 as the first device as an example.

[0115] Exemplarily, assuming that the user corresponding to the mobile phone 1, or the user of the mobile phone 1 is called "user A", the user corresponding to the mobile phone 2, or the user of the mobile phone 2 is called "user B", if the sound box 3 is a new device, such as a device that has not been controlled by user A before, user A needs to bind the sound box 3 through the mobile phone 1 first, such as establishing the corresponding relationship between the identity document (ID) of user A, such as the account ID, and the identity of the sound box 3, to obtain the control right of the sound box 3. Among them, the account ID of user A can be the identity allocated by the cloud platform for the registered account of user A after user A registers to the cloud platform. The identity of the sound box 3 can be the identity allocated by the cloud platform for the sound box 3 when the sound box 3 registers to the cloud platform. In this way, in the case that user A is bound with the sound box 3, user A can authorize the control right of the sound box 3 to user B through the mobile phone 1, so that user B can also control the sound box 3 through the mobile phone 2, which will be introduced in detail below.

[0116] In the embodiment of the present application, as shown in (a) of Figure 5 , the mobile phone 1 can display a main interface 501. Among them, the main interface 501 can be the interface displayed after the mobile phone 1 is turned on, but not as a limitation, it can also be other interfaces, such as background interfaces, such as minus one screen. The main interface 501 can include various applications (APPs) installed on the mobile phone 1, for example, it can include icons of APPs that come with the mobile phone 1, such as clock, calendar, gallery, memo, application store, settings, music player, calculator, sports health, camera, phone, information, address book, smart life 502 and the like, for example, it can also include third-party APPs, such as WeChat, QQ, Alipay, online games and the like.

[0117] If user A wants to bind a certain device, user A can click the smart life 502 in the main interface 501. In response to the operation, the mobile phone 1 can jump from the main interface 501 to the APP interface 503 of the smart life 502 (as shown in (b) of Figure 5 ). In the APP interface 503, "2 devices" can be used to indicate that user A has bound 2 devices, such as TV 4 and TV 5, and the icons of TV 4 and TV 5 can be displayed near "2 devices", such as below, so that user A knows the specific types of the bound devices. Both "+" 504 and "user A's home" 505 can be used to bind new devices and authorize the control right of the bound devices to other devices, but the difference lies in that "+" 504 realizes the above functions in the granularity of devices, and "user A's home" 505 realizes the above functions in the granularity of groups, which will be introduced below.

[0118] A. Bind new devices in the granularity of devices:

[0119] As shown in (a) of Figure 5As shown in (b), if user A wants to add and bind a specific device, they can click the "+" button 504. In response to this action, phone 1 can display a secondary menu 601 near the "+" button 504. Figure 6A (As shown). The secondary menu 601 may include: Add Device 602, Authorize Device, etc. Add Device 602 can be used to bind a new device, and Authorize Device can be used to grant control of an already bound device to another user (see below for specific implementation details). Figure 9 and Figure 10 (Related introduction).

[0120] It should be understood that the use of a secondary menu 601 is merely an exemplary implementation method and is not intended to be limiting. For example, in response to the operation of clicking "+" 504, mobile phone 1 can jump from the APP interface 503 to a new interface, such as the device addition / authorization interface, which also includes: the aforementioned add device 602, authorize device, etc., to realize the aforementioned device binding and authorization control functions.

[0121] Furthermore, if user A clicks "Add Device" 602, in response to this operation, mobile phone 1 can jump from the APP interface 603 to the device search interface 604. Figure 6B (As shown), on the other hand, mobile phone 1 can search for nearby devices, such as speaker 3, and thus display speaker 3's icon 605 in the device search interface 604. If user A clicks icon 605, in response to this operation, on the one hand, mobile phone 1 can establish a binding relationship between user A and speaker 3, such as establishing a correspondence between user A's identifier and speaker 3's identifier; on the other hand, mobile phone 1 can jump from the device search interface 604 back to the APP interface 606 (e.g., ...). Figure 6C (As shown). It should be understood that since user A has already bound speaker 3, the icon in the APP interface 606 can be changed from the previous "2 devices" to "3 devices" to indicate that user A has bound 3 devices, such as speaker 3, TV 4 and TV 5. The icon of speaker 3 can also be newly displayed near the 3 devices, as shown below, so that user A can easily know the specific type of the newly bound device.

[0122] B. Bind new devices at the group level:

[0123] like Figure 5 As shown in (b), if user A wants to add and bind a device to the group, they can click "User A's Home" 505. In response to this operation, mobile phone 1 can jump from the APP interface 503 to the group management interface 701. Figure 7As shown in (a)). The group management interface 701 can include icons for each group, such as Individual, Living Room 702, and Bedroom. Furthermore, each group icon can display the number of devices within that group; for example, Individual includes 0 devices, Living Room 702 includes 1 device, and Bedroom includes 1 device, for user management convenience. Taking Living Room 702 as an example, if user A wants to bind a new device to Living Room 702, they can click on Living Room 702. In response to this operation, mobile phone 1 can jump from the group management interface 701 to the living room management interface 703. The living room management interface 703 can include icons for devices in Living Room 702, such as TV 4, and may also include: Add Device 604 and Authorize Device. Add Device 602 can be used to bind a new device to Living Room 702, and Authorize Device can be used to authorize control of devices already bound to Living Room 702, such as TV 4, to other users (for specific implementation details, please refer to the following). Figure 9 and Figure 10 (Related introduction).

[0124] Furthermore, if user A clicks "Add Device" 704, in response to this operation, mobile phone 1 can jump from the living room management interface 703 to the device search interface 801. Figure 8 As shown in (a) above, on the other hand, mobile phone 1 can search for nearby devices, such as speaker 3, and display the speaker 3 icon 802 in the device search interface 801. Thus, if user A clicks icon 802, in response to this operation, mobile phone 1 can establish a binding relationship between user A and speaker 3, such as a correspondence between user A's identifier and speaker 3's identifier. Furthermore, mobile phone 1 can also jump back from the device search interface 801 to the APP interface 803 (e.g., ...). Figure 8 (as shown in (b)). It should be understood that since user A has already bound speaker 3, the icon in the APP interface 803 can be changed from the previous "2 devices" to "3 devices" to indicate that user A has bound 3 devices, such as speaker 3 and TV 4 in the living room, and TV 5 in the bedroom. The icon of speaker 3 can also be newly displayed near "3 devices", as shown below, so that user A knows the specific type of the newly bound device.

[0125] It should be noted that, taking speaker 3 as an example, according to Figure 6C as well as Figure 8As shown in (b), if speaker 3 is bound at the device level, then speaker 3 is an independent bound device and does not belong to any group. If speaker 3 is bound at the group level, then speaker 3 can belong to the corresponding group, such as the living room. In other words, users can choose the appropriate binding method according to their actual needs. For example, if a user wants to control a device independently, they can use the device-level binding method described above. If a user wants to control a group, such as group sharing or group playback, they can use the group-level binding method described above.

[0126] Furthermore, still taking speaker 3 as an example, the cloud platform can determine that user A has primary control over speaker 3 based on the binding relationship between user A and speaker 3, and thus assign a control key, such as key 1, to mobile phone 1. In this way, mobile phone 1 can send key 1, along with the binding relationship between user A and speaker 3, to speaker 3. Correspondingly, for speaker 3, it can determine that user A has control over speaker 3 based on the binding relationship between user A and speaker 3. Thus, speaker 3 and mobile phone 1 can establish a session using key 1 for encrypted communication, achieving encrypted control to ensure control security and prevent control from being stolen. It should be understood that the cloud platform can assign different control keys to different devices of the same user, so that the control key used by each device is different from the control keys used by other devices, thus preventing interference and further improving the security of encrypted communication. For example, the cloud platform assigns key 1 to user A's mobile phone 1, and key 1 to user A's other devices, such as mobile phone 3... Figure 4 (Not shown) Assign a key X, and key 1 and key X are different. In this way, mobile phone 1 and speaker 3 can establish a session using key 1, and mobile phone 3 and speaker 3 can establish a session using key X.

[0127] Furthermore, after user A is paired with speaker 3, they can authorize control of the paired device, such as speaker 3, to other users, such as user B. As mentioned above... Figure 5 As can be seen from the relevant introduction, user A can authorize control at the device level or at the group level, which will be described below.

[0128] 1. The equipment has authorized control over particle size:

[0129] like Figure 6C As shown, if user A wants to grant control of a device to another user, they can click the "+" key (607). In response to this action, phone 1 can display a secondary menu (901) near the "+" key (607). Figure 9 (As shown in (a)). Then, user A can click to authorize device 902. In response to this operation, mobile phone 1 can jump from APP interface 903 to device authorization interface 904. Figure 9The device authorization interface 904 can include icons of all the devices that have been bound by user A, such as the TV 4 in the living room, the TV 5 in the bedroom, and the sound box 3 that is not grouped. Further, user A can select the corresponding device in the device authorization interface 904, such as by long pressing or clicking the corresponding device. The selected device can be marked with a check mark, so that user A can deselect the device to correct the mistake. Alternatively, the icon of the selected device can be highlighted, vibrated, or the like, to distinguish it from other icons. User A can select one device, such as the sound box 3, or multiple devices, such as the sound box 3, the TV 4, and the TV 5. For example, if user A selects the sound box 3, user A can click the confirm authorization 905. In response to the operation, the phone 1 can jump from the device authorization interface 904 to a user selection interface 1001 (as shown in (a) of FIG. 10). Figure 10 In addition, if user A wants to cancel the authorization, user A can click the cancel authorization 907. In response to the operation, the phone 1 can return from the device authorization interface 904 to the APP interface 903.

[0130] Further, in one aspect, the user selection interface 1001 can include icons of users that have been authorized, such as the icon 1002 of user B, the icon of user C, and the like. In this way, if user A wants to authorize the sound box 3 to user B, user A can directly click the icon 1002 of user B to more conveniently authorize the sound box 3 to a user that has been authorized, such as user B. In addition, the icons of the users that have been authorized can be sorted according to the frequency of authorization, such as from high to low, from top to bottom, to more conveniently allow user A to select a user that is frequently authorized, to further improve the user experience. For example, if user A authorizes user B more frequently than user C, the icons can be arranged from top to bottom as follows: the icon 1002 of user B, the icon of user C. On the other hand, the user selection interface 1001 can also include a user input box 1003, to allow user A to authorize a user that has not been authorized. For example, if user A wants to authorize the sound box 3 to a user that has not been authorized, such as user D, user A can input the account of user D in the user input box 1003, and then click the authorize 1004 to authorize the sound box 3 to user D.

[0131] It should be understood that the above authorization methods are merely examples and are not limiting. For example, after user A clicks the confirm authorization 905, the phone 1 can directly authorize the sound box 3 to the user corresponding to the phone 1 that is currently connected. For example, if the phone 1 is currently connected to the phone of user B through Bluetooth, NFC, or Wi-Fi, the phone 1 can directly authorize the sound box 3 to user B.

[0132] Optionally, if authorization is successful, mobile phone 1 can display a success message on the current interface, such as user selection interface 1001, indicating that speaker 3 has been authorized to user B, so that the user can be promptly informed that control has been successfully authorized, thus providing a basis for the user to revoke authorization later. Furthermore, mobile phone 1 can also jump from user selection interface 1001 to authorization management interface 1005. Figure 10 (As shown in (b)). The authorization management interface 1005 may include: an icon for user B, an icon for the device with authorization control, such as the icon for speaker 3, and a cancellation authorization option 1006. Of course, if authorization fails, mobile phone 1 can display an authorization failure message on the current interface, such as the user selection interface 1001, indicating that speaker 3 has not been successfully authorized, so that the user can be aware of this and re-authorize.

[0133] 2. Grant control at the group level:

[0134] like Figure 8 As shown in (b), if user A wants to delegate control of one or more devices in the group to other users, they can click "User A's Home" 804. In response to this operation, mobile phone 1 can jump from the APP interface 803 to the group management interface 1101. Figure 11 As shown in (a) in the diagram, user A can delegate control of one or more devices in each group, such as the control of speaker 3 and / or TV 4 in living room 1102, and / or the control of TV 5 in bedroom, to other users. Taking living room 1102 as an example, if user A wants to delegate control of speaker 3 and / or TV 4 in living room 1102 to other users, they can click on living room 1102. In response to this operation, mobile phone 1 can jump from group management interface 1101 to living room management interface 1103. Figure 11 (as shown in (b)). Further, user A can select the icon of the corresponding device in the living room management interface 1103, such as by long-pressing the icon. A selection marker can be displayed near the selected device so that user A can deselect it and correct the mistake. Alternatively, the icon of the selected device can be highlighted or shaken to distinguish it. User A can select a single device, such as speaker 3, or multiple devices, such as speaker 3 and TV 4. Taking speaker 3 as an example, user A can click on authorized device 1104. In response to this operation, mobile phone 1 can jump from the living room management interface 1103 to the user selection interface 1201. Figure 12 (as shown in (a)).

[0135] Further, the user selection interface 1201 can include icons of all users in the user group corresponding to "User A's home", such as an icon 1202 of user B, an icon of user C, and the like. In this way, if user A wants to authorize the control right of the sound box 3 to user B, user A can directly click the icon 1202 of user B to conveniently authorize the control right, such as the control right of the sound box 3, to a user in the user group, such as user B. In addition, the icons of all users in the user group can also be sorted according to the authorization frequency, such as being arranged in order from top to bottom according to the authorization frequency from high to low, so that user A can more conveniently authorize the control right to a user in the user group who is frequently authorized, to further improve the user experience. In addition, the user selection interface 1201 can also include a user input box 1203, so that user A can authorize the control right to a user who is not in the user group. For example, if user D is a user who is not in the user group, user A can input the account of user D in the user input box 1203, and then click the authorization 1204 to authorize the control right of the sound box 3 to user D.

[0136] It should be understood that the above authorization manner is only an example and is not limited. For example, Figure 11 As shown, in the group management interface 1101, user A can directly select a certain group, such as long-pressing to select the living room 1102. In response to the long-pressing operation, the phone 1 can determine that all devices in the selected group, such as the television 4 and the sound box 3, need to be authorized to control the right, so that the phone 1 can directly jump from the group management interface 1101 to the user selection interface 1201 to reduce the number of interface jumps, thereby improving the user experience. For another example, after user A clicks the authorized device 1104, in response to the operation, the phone 1 can directly authorize the control right of the sound box 3 to a user in the user group and currently connected to the phone 1, to reduce the user's operation, thereby improving the user experience. For example, if the user group includes user B and user C, and the phone 1 is currently connected to the phone of user B through Bluetooth, NFC or Wi-Fi, the phone 1 can directly authorize the control right of the sound box 3 to user B.

[0137] Alternatively, if the authorization is successful, the phone 1 can display a prompt information of successful authorization on the current interface, such as the user selection interface 1201, such as the sound box 3 has been authorized to user B, so that the user can know the successful authorization of the control right in time, thereby providing a basis for the user to make a decision for subsequent cancellation of authorization. In addition, the phone 1 can also jump from the user selection interface 1201 to the authorization management interface 1205 Figure 12(b) in FIG. 12B, or (b) in FIG. 12C. In the interface, the user B's icon, the device that has the control right, such as the icon of the sound box 3 (living room), and the cancel authorization 1206 can be included. Of course, if the authorization fails, the phone 1 can display a prompt information of authorization failure on the current interface, such as the user selection interface 1201, such as the sound box 3 is not successfully authorized, so that the user can know in time and re-authorize.

[0138] Further, still taking the authorization to the user B as an example, the phone 1 can send the user B's identity and the sound box 3's identity to the cloud platform. For the cloud platform, since the cloud platform has determined that the user A has the master control right of the sound box 3, the cloud platform can determine that the user B has the slave control right of the sound box 3 according to the user B's identity and the sound box 3's identity, and thus can send the sound box 3's identity to the phone 2. In this way, the phone 2 can send the sound box 3's identity and the user B's identity to the sound box 3 to initiate the control of the sound box 3. Correspondingly, for the sound box 3, since the sound box 3 locally records the binding relationship between the user A and the sound box 3, the sound box 3 can determine that the user who initiates the control is not the user A according to the user B's identity and the sound box 3's identity, and thus determine that the user B has the slave control right of the sound box 3. In this way, the sound box 3 can periodically initiate the control right verification to the user B to avoid being hijacked by the user B. For example, for a certain period, the sound box 3 can randomly generate a verification value, such as the verification value 1. Then, on the one hand, the sound box 3 can determine the latest control key, such as the key 3, according to the verification value 1, the key 1 and the user B's identity, and on the other hand, the sound box 3 can notify the phone 2 to obtain the latest control key, such as sending the verification value 1 to the phone 2, so that the phone 2 forwards the verification value 1 to the cloud platform. In this way, if the user A does not cancel the control right authorization of the user B on the cloud platform, after the cloud platform receives the verification value 1, it still determines that the user B has the slave control right of the sound box 3, and thus determines the latest control key, i.e. the key 3, according to the verification value 1, the key 1 and the user B's identity, and sends the key 3 to the phone 2, so that the phone 2 can obtain the same key as the sound box 3, and thus continue to establish a session with the sound box 3 using the key 3, and thus continue to control the sound box 3. Conversely, if the user A cancels the control right authorization of the user B, the cloud platform can no longer determine the key 3 according to the verification value 1, the key 1 and the user B's identity, so that the phone 2 cannot obtain the same control key as the sound box 3, and thus cannot continue to control the sound box 3, so as to avoid the phone 2 hijacking the sound box 3. Figure 10 (b) in FIG. 12B, or (b) in FIG. 12C. In the interface, the user B's icon, the device that has the control right, such as the icon of the sound box 3 (living room), and the cancel authorization 1206 can be included. Of course, if the authorization fails, the phone 1 can display a prompt information of authorization failure on the current interface, such as the user selection interface 1201, such as the sound box 3 is not successfully authorized, so that the user can know in time and re-authorize. Figure 12 (b) in FIG. 12B, or (b) in FIG. 12C. In the interface, the user B's icon, the device that has the control right, such as the icon of the sound box 3 (living room), and the cancel authorization 1206 can be included. Of course, if the authorization fails, the phone 1 can display a prompt information of authorization failure on the current interface, such as the user selection interface 1201, such as the sound box 3 is not successfully authorized, so that the user can know in time and re-authorize.

[0139] The above is combined with the above Figures 4-12The application embodiment provides an application scenario and an interactive interface of the device control method. To facilitate understanding, the implementation principle of the device control method is specifically introduced below.

[0140] Exemplarily, still taking the third device as the mobile phone 1, the second device as the mobile phone 2, and the first device as the sound box 3, the overall flow of the device control method provided by the application embodiment can include: the mobile phone 1 can register the sound box 3 to the cloud platform, so that the cloud platform can bind the sound box 3 and the mobile phone 1 (or in other words, bind the sound box 3 and the user A). Then, the mobile phone 1 can notify the sound box 3 to bind the user A. Wherein, since the user A is the first user to bind the sound box 3, the user A has the master control right of the sound box 3, so as to authorize the user B to control the sound box 3 on the cloud platform, so that the cloud platform can bind the sound box 3 and the user B. Wherein, since the user B is not the first user to bind the sound box 3, the user B has the slave control right of the sound box 3. In this way, the user B can initiate the control of the sound box 3 through the mobile phone 2. At this time, the sound box 3 can determine that the user who initiates the control is not the user A who has the master control right according to the binding relationship between the sound box 3 and the user A, so as to periodically initiate the control right verification to the user B. For example, for a certain period, the sound box 3 can notify the mobile phone 2 to obtain the latest control key. After the mobile phone 2 receives the notification sent by the sound box 3 to request the mobile phone 2 to obtain the latest control key, the mobile phone 2 can request the cloud platform to determine the latest control key for the mobile phone 2. At this time, if the user A does not cancel the control right authorization of the user B on the cloud platform, that is, the cloud platform still records the binding relationship between the sound box 3 and the user B, the cloud platform determines that the user B has the slave control right of the sound box 3, so that the cloud platform determines the latest control key and sends the latest control key to the mobile phone 2, so that the user B can continue to control the sound box 3 by using the mobile phone 2. Conversely, if the user A has canceled the control right authorization of the user B on the cloud platform, that is, the cloud platform has deleted the binding relationship between the sound box 3 and the user B, the cloud platform determines that the user B does not have the slave control right of the sound box 3, so that the cloud platform does not determine the latest control key, and the mobile phone 2 cannot obtain the latest control key. In this way, the sound box 3 can determine that the mobile phone 2 does not obtain the latest control key, such as the sound box 3 does not receive the latest control key from the mobile phone 2 within a timeout period, so that the sound box 3 disconnects the connection with the mobile phone 2.

[0141] Continuing the above example, in the device control method provided by the embodiments of the present application, the sound box 3 periodically initiates a control right verification to the mobile phone 2 (or user B) to determine whether the mobile phone 2 currently still has the control right of the sound box 3; if the sound box 3 determines that the mobile phone 2 no longer has the control right of the sound box 3, the sound box 3 actively disconnects the connection with the mobile phone 2 to avoid being hijacked by the mobile phone 2. In an implementation manner, the sound box 3 initiates the control right verification can be achieved by notifying the mobile phone 2 to obtain the latest control key, and in the device control method provided by the embodiments of the present application, the devices that can determine the latest control key include the sound box 3 and the cloud platform, but do not include the mobile phone 2, so that the mobile phone 2 needs to request the latest control key from the cloud platform to obtain the latest control key, and cannot confirm the latest control key by itself. At the same time, when the user A of the mobile phone 1 cancels the control right authorization of the sound box 3 of the user B, the cloud platform is synchronously notified, so that the cloud platform can obtain the information of whether the user B still has the control right of the sound box 3 in time. Therefore, in the case that the cloud platform determines that the user B no longer has the control right of the sound box 3, even if the cloud platform receives the message of requesting the latest control key sent by the mobile phone 2, the cloud platform will not send the latest control key to the mobile phone 2, or the cloud platform will not execute the step of determining the latest control key. Therefore, the mobile phone 2 cannot obtain the latest control key, and then the sound box 3 determines that the control right verification of the mobile phone 2 fails, and the sound box 3 actively disconnects the connection with the mobile phone 2 to avoid being hijacked by the mobile phone 2.

[0142] Based on the above introduction of the overall flow of the device control method provided by the embodiments of the present application, next, several possible implementation manners of the device control method provided by the embodiments of the present application are described in detail.

[0143] Figure 13 Flowchart of the device control method provided by the embodiments of the present application Figure 1 As shown in Figure 13 , the specific flow of the device control method can include:

[0144] S1301, the mobile phone 1 discovers the sound box 3.

[0145] The mobile phone 1 can discover the sound box 3 by scanning, such as scanning by Bluetooth, Wi-Fi, or NFC, etc., to obtain the device information of the sound box 3, and the device information can include at least one of the following: device type, device model, device version, or device manufacturer, etc., which is not limited by the embodiments of the present application.

[0146] S1302, the mobile phone 1 registers the sound box 3 to the cloud platform.

[0147] The speaker 3 registers to the cloud platform can be that the cloud platform records the speaker 3, assigns a corresponding identifier to the speaker 3, and determines the control key of the mobile phone 1, such as the key 1 (or the second control key). The key 1 can be used for the mobile phone 1 to establish a session (such as a control session) with the speaker 3, so that the mobile phone 1 controls the speaker 3 through the session. In addition, the key 1 can be used for the cloud platform to determine other control keys, such as the key 3 (or the first control key), to establish a session with the speaker 3 by other devices (such as the mobile phone 2) other than the mobile phone 1, so that other devices control the speaker 3 through the session. The specific implementation can be referred to in S1313 below, and will not be described here.

[0148] Specifically, the mobile phone 1 can send the device information of the speaker 3 and the identifier of the user A, such as the account identifier, to the cloud platform. Correspondingly, the cloud platform can determine that the speaker 3 is an unregistered device according to the device information of the speaker 3, and assign an identifier of the speaker 3 and the key 1 to the speaker 3 to complete the registration of the speaker 3. After that, on the one hand, the cloud platform can establish a binding relationship between the user A and the speaker 3, such as a corresponding relationship between the identifier of the user A and the identifier of the speaker 3, so as to determine that the user A has the master control right of the speaker 3. On the other hand, the cloud platform can send the identifier of the speaker 3 and the key 1 to the mobile phone 1, such as packaged or separated, so that the mobile phone 1 can also establish a binding relationship between the user A and the speaker 3.

[0149] S1303, the mobile phone 1 notifies the speaker 3 to bind the user A.

[0150] Because the speaker 3 is currently not bound to any user, the mobile phone 1 can also notify the speaker 3 to bind the user A when completing the registration. For example, the mobile phone 1 sends the identifier of the user A, the identifier of the speaker 3 and the key 1 (which can be carried in the second information) to the speaker 3, so that the speaker 3 can accurately bind the user it needs to bind according to the identifier of the user A and the identifier of the speaker 3, that is, establish a binding relationship between the user A and the speaker 3, such as a corresponding relationship between the identifier of the user A and the identifier of the speaker 3, to avoid misbinding. In addition, because the user A is the first user to bind the speaker 3, that is, the first user to have the control right (or the master control right) of the speaker 3. In this way, if other users want to control the speaker 3 subsequently, the speaker 3 can determine that the user A has the master control right, and thus initiate a control right verification to the other users, without initiating a control right verification to the user A, thereby avoiding misverification; that is, the speaker 3 can not initiate a control right verification to the user who has the master control right.

[0151] S1304, the mobile phone 1 sends a session negotiation request to the speaker 3, and the speaker 3 receives the session negotiation request from the mobile phone 1.

[0152] The session negotiation request can be used to request the sound box 3 to establish a control session with the mobile phone 1, such as a control session between the mobile phone 1 and the sound box 3, so that the mobile phone 1 can subsequently control the sound box 3 through the control session. Specifically, the session negotiation request can include the identifier of the user A and a random number (RN), such as RN1. The RN1 can be randomly generated by the mobile phone 1, and is used by the sound box 3 to generate a session key of the control session, such as the key 2. The specific implementation can be referred to the related description in S1305 below, and will not be described here.

[0153] S1305, the sound box 3 determines the session key.

[0154] After the sound box 3 receives the session negotiation request, the identity of the user A who requests to establish the control session can be determined according to the identifier of the user A in the session negotiation request and the established binding relationship between the user A and the sound box 3, that is, the user who has the master control right of the sound box 3. In this way, the sound box 3 can determine the session key, such as the key 2, according to the key 1, the RN1 in the session negotiation request, and the RN2. The RN2 can be randomly generated by the sound box 3.

[0155] S1306, the sound box 3 sends a session negotiation response to the mobile phone 1, and the mobile phone 1 receives the session negotiation response from the sound box 3.

[0156] The session negotiation response can be used to indicate that the sound box 3 has accepted the request of the mobile phone 1, and the sound box 3 can establish the control session with the mobile phone 1. The session negotiation response can include the RN2.

[0157] It should be understood that the execution sequence of determining the session key by the sound box 3 and sending the session negotiation response in S1305 and S1306 is not limited.

[0158] S1307, the mobile phone 1 determines the session key.

[0159] After the mobile phone 1 receives the session negotiation response, the mobile phone 1 can determine the session key, such as the key 2, according to the key 1, the RN1, and the RN2 in the session negotiation response. In this way, the mobile phone 1 and the sound box 3 have the same session key, so that it can be considered that the control session is established. Subsequently, the mobile phone 1 and the sound box 3 can use the key 2 for encrypted communication, so that the sound box 3 can respond to the control of the mobile phone 1 and perform corresponding operations, such as playing audio, adjusting the volume of playing audio, and the like.

[0160] It should be understood that the above S1304-S1307 is an exemplary way of establishing a control session, and is not limiting, and other ways of establishing a control session can also be applicable to the embodiments of the present application. For example, the phone 1 and the sound box 3 can also establish a control session using a secure remote password (SRP) protocol. Specifically, the above key 1 can be considered as a password in the SRP protocol, so that the phone 1 can determine RN3, and determine a public key and a private key pair, such as public key 1 and private key 1, according to RN3 and the password. Similarly, the sound box 3 can determine RN4, and determine a public key and a private key pair, such as public key 2 and private key 2, according to RN4 and the password. In this way, the phone 1 and the sound box 3 can exchange their respective public keys with each other, thereby completing the establishment of the control session.

[0161] In addition, the above S1304-S1307 is an optional step. For example, after the phone 1 binds the sound box 3, if it is necessary to control the sound box 3 or to transmit data to the sound box 3, S1304-S1307 can be performed, otherwise, S1304-S1307 can not be performed.

[0162] S1308, the phone 1 sends authorization information to the cloud platform, and the cloud platform receives the authorization information from the phone 1.

[0163] The authorization information can be used to indicate that the phone 1 authorizes the control right of the sound box 3 to the user B, and can include: an identifier of the user B, such as an account identifier, and an identifier of the sound box 3. The identifier of the user B can be an identifier pre-stored by the phone 1, or can be an identifier obtained in real time by the phone 1, such as an identifier of the user B input by the user A. In other words, the phone 1 can send the identifier of the user B and the identifier of the sound box 3 to indicate that the control right of the sound box 3 is authorized to the user B.

[0164] In some implementations, the execution of step S1308 is triggered by the above Figures 5-12 user operation (such as the operation of the user A).

[0165] S1309, the cloud platform determines that the user B has a slave control right of the sound box 3.

[0166] After the cloud platform receives the authorization information, it can determine whether the user B has a master control right or a slave control right of the sound box 3 according to the identifier of the user B and the identifier of the sound box 3 in the authorization information. Since the cloud platform records the binding relationship (or master binding relationship) between the sound box 3 and the user A, that is, the user A has a master control right of the sound box 3, the cloud platform can determine that the user B has a slave control right of the sound box 3, and establish a binding relationship (or slave binding relationship) between the user B (such as the identifier of the user B) and the sound box 3 (such as the identifier of the sound box 3).

[0167] S1310, the cloud platform sends first notification information to the mobile phone 2, and the mobile phone 2 receives the first notification information from the cloud platform.

[0168] The first notification information can be used to indicate that the device to be controlled by the mobile phone 2 is the sound box 3, and can include the identifier of the sound box 3.

[0169] Alternatively, the cloud platform can directly send the first notification information to the mobile phone 2, or can also send the first notification information to the mobile phone 2 when the mobile phone 2 is online, such as logging in to the cloud platform, which is not limited.

[0170] S1311, the mobile phone 2 sends a control request to the sound box 3, and the sound box 3 receives the control request from the mobile phone 2.

[0171] The control request (or third information) can be used to request to control the sound box 3, and can include the identifier of the user B and the identifier of the sound box 3.

[0172] S1312, the sound box 3 determines that the user B has the secondary control right.

[0173] Similar to the judgment principle of the cloud platform, after receiving the control request, the sound box 3 can determine, according to the identifier of the user B in the control request, whether the user B has the primary control right or the secondary control right of the sound box 3. Since the sound box 3 has recorded the binding relationship between the sound box 3 and the user A, that is, the user A has the primary control right of the sound box 3, the sound box 3 can determine that the user initiating the control is not the user having the primary control right of the sound box 3, that is, the user B has the secondary control right of the sound box 3. For the user having the secondary control right of the sound box 3, the sound box 3 needs to periodically initiate the control right verification for the user B to verify whether the user B still has the secondary control right of the sound box 3 at present, so as to avoid being hijacked by the user B. The specific implementation can be referred to the related description in S1313-S1324 below, which will not be described here.

[0174] S1313, the sound box 3 determines the latest control key.

[0175] Taking the first period as an example, before the start of the period, such as at the first preset time point before the start, the sound box 3 can generate a verification value, such as a random verification value 1, so that the sound box 3 determines the latest control key, such as key 3, according to the key 1, the identifier of the user B and the verification value 1, so that the sound box 3 can determine whether the mobile phone 2 can obtain the same key according to the key 3, thereby verifying the control right of the user B.

[0176] S1314, the sound box 3 sends first verification information to the mobile phone 2, and the mobile phone 2 receives the first verification information from the sound box 3.

[0177] Still taking the first period as an example, before the start of the period, at a second preset time point before the start, the sound box 3 sends first check information (or first information) to the mobile phone 2, to inform the mobile phone 2 to obtain the latest control key, such as key 3. Wherein, the first check information can also include the above-mentioned check value 1.

[0178] It should be understood that the first preset time point and the second preset time point can be the same or different, and are not limited.

[0179] S1315, the mobile phone 2 sends a first check request to the cloud platform, and the cloud platform receives the first check request from the mobile phone 2.

[0180] Wherein, the first check request (or fourth information) can be used to request the cloud platform to determine the latest control key for the mobile phone 2. The first check request can include: the above-mentioned check value 1, the identifier of the sound box 3 and the identifier of the user B. In addition, the first check request can be generated by the mobile phone 2 according to the first check information.

[0181] S1316, the cloud platform determines that the user B has the slave control right of the sound box 3.

[0182] After the cloud platform receives the first check request, it can determine whether the user B has the slave control right of the sound box 3 according to the identifier of the user B in the first check request. Wherein, since the user A does not cancel the control right authorization of the user B at this time on the cloud platform, that is, the cloud platform still records the binding relationship between the user B and the sound box 3, the cloud platform determines that the user B has the slave control right of the sound box 3, so as to determine the latest control key, such as key 3, according to key 1, the identifier of the user B and the check value 1.

[0183] S1317, the cloud platform sends the latest control key to the mobile phone 2, and the mobile phone 2 receives the latest control key from the cloud platform.

[0184] In this way, the user B can continue to control the sound box 3 in the case of having the control right of the sound box 3.

[0185] It should be understood that the sending time point of S1317 should be before the start of the first period. That is, in addition, the second preset time point and the time interval when the first period starts need to meet that S1317 is executed before the start of the first period.

[0186] S1318, the mobile phone 2 and the sound box 3 establish a control session in the first period according to the latest control key.

[0187] The specific implementation of S1318 can refer to the related description in S1305-S1307 described above. That is, the process of establishing a control session by the mobile phone 2 and the sound box 3 is similar to the process of establishing a control session by the mobile phone 1 and the sound box 3 described above, and thus is not described here again.

[0188] S1319, the mobile phone 1 sends authorization cancellation information to the cloud platform, and the cloud platform receives the authorization cancellation information from the mobile phone 1.

[0189] The authorization cancellation information can be used to indicate that the user A needs to cancel the control right authorization of the user B, and can include the identifier of the user A, the identifier of the user B, and the identifier of the sound box 3. In other words, the authorization cancellation information can indicate that the user A needs to cancel the control right authorization of the user B to the sound box 3 through the identifier of the user A, the identifier of the user B, and the identifier of the sound box 3. Accordingly, the cloud platform can delete the binding relationship between the user B and the sound box 3 according to the authorization cancellation information, or determine that the user B no longer has the control right of the sound box 3.

[0190] In some implementations, the execution of step S1319 is triggered by the user operation (such as the operation of the user A) shown in (b) of the above Figure 10 , or (b) of the above Figure 12 .

[0191] S1320, the sound box 3 updates the control key.

[0192] Before the start of the second period, at a third preset time point before the start, that is, at a time point before the end of the first period, the sound box 3 can continue to generate a check value, such as a random check value 2, so as to update the control key according to the key 1, the identifier of the user B and the check value 2, such as updating the key 3 to the key 4, so that the sound box 3 can determine whether the mobile phone 2 can obtain the same key according to the key 4, thereby realizing the continuous verification of the control right of the user B.

[0193] S1321, the sound box 3 sends second check information to the mobile phone 2, and the mobile phone 2 receives the second check information from the sound box 3.

[0194] Before the start of the second period, at a fourth preset time point before the start, that is, at a corresponding time point within the first period, the sound box 3 can also send second check information (or first information) to the mobile phone 2 to notify the mobile phone 2 to obtain the latest control key, such as the key 4. The second check information can also include the check value 2 described above.

[0195] It should be understood that the third preset time point and the fourth preset time point can be the same or different, and are not limited. S1322, the mobile phone 2 sends a second check request to the cloud platform, and the cloud platform receives the second check request from the mobile phone 2.

[0196] The second check request (or the fourth information) can be used to request the cloud platform to determine the latest control key for the mobile phone 2. The second check request can further include the check value 2, the identifier of the sound box 3, and the identifier of the user B. In addition, the second check request can be generated by the mobile phone 2 according to the second check information.

[0197] In addition, the execution order of S1319 and S1320-S1322 is not limited. That is, S1319 can occur before S1323, that is, the control authorization of the user B can be cancelled before the cloud platform determines the latest control key.

[0198] S1323, the cloud platform determines that the user B does not have the slave control right of the sound box 3.

[0199] The cloud platform can determine whether the user B still has the slave control right of the sound box 3 according to the identifier of the user B in the second check request after receiving the second check request. According to the related description in S1319, since the user A has cancelled the control authorization of the user B on the cloud platform, that is, the slave binding relationship between the user B and the sound box 3 has been deleted, the cloud platform can determine that the user B does not have the control right of the sound box 3.

[0200] It should be understood that if the cloud platform determines that the user B does not have the control right of the sound box 3, the latest control key (such as key 4) is not generated to avoid mistakenly generating the latest control key, such as generating the latest control key in the case where the user A cancels the authorization.

[0201] S1324, the cloud platform sends second notification information to the mobile phone 2, and the mobile phone 2 receives the second notification information from the cloud platform.

[0202] The second notification information can be used to notify the user B that the user B does not have the slave control right of the sound box 3.

[0203] It should be understood that S1324 is an optional step, that is, the cloud platform can actively notify the user B that the user B does not have the slave control right of the sound box 3; or it can not be notified, so that the mobile phone 2 can determine that the user B does not have the slave control right of the sound box 3 based on a timeout, such as still not receiving the control key from the cloud platform at the beginning of the second period.

[0204] S1325, the sound box 3 disconnects the connection with the mobile phone 2.

[0205] If the sound box 3 determines that the mobile phone 2 does not obtain the key 4, such as still not receiving the key 4 from the mobile phone 2 at the beginning of the second period, it is determined that the user B does not have the slave control right of the sound box 3, so that the connection with the mobile phone 2 can be actively disconnected to cooperate with the mobile phone 1 to cancel the authorization.

[0206] In addition, in some other implementations, the mobile phone 2 can also actively disconnect from the speaker 3, such as disconnecting from the mobile phone 2 according to the second notification information.

[0207] It should be pointed out that, Figure 13 In the process shown, since the aforementioned key 1 is stored locally on the speaker 3 and the cloud platform respectively, and neither the speaker 3 nor the cloud platform sends key 1 to the mobile phone 2, the mobile phone 2 has never obtained key 1. Therefore, the mobile phone 2 cannot determine the latest control key (such as key 3 or key 4) based on key 1. This can prevent the mobile phone 2 from hijacking the speaker 3 by determining the latest control key on its own when it has no control, thereby improving the reliability of authorization.

[0208] It should be understood that the method by which the speaker 3 and the cloud platform determine the latest control key may differ from that used in other systems. Figure 13 The embodiments exemplify the method. That is, key 3 may not be determined based on key 1, user B's identifier, and verification value 1, and key 4 may not be determined based on key 1, user B's identifier, and verification value 2. Keys 3 and 4 may also be determined based on different... Figure 13 The methods demonstrated in the illustrative embodiments are used to determine the control keys, and this application does not limit the methods for determining keys 3 and 4. Any control key determination method that allows the speaker 3 and the cloud platform to determine the control key but not the mobile phone 1 does not exceed the scope of this application. In other words, if a certain control key determination method enables the speaker 3 and the cloud platform to determine the control key while simultaneously preventing the mobile phone 2 from doing so, then such a control key determination method does not exceed the scope of this application.

[0209] Figure 14 Flowchart of the device control method provided in the embodiments of this application Figure 2 ,like Figure 14 As shown, this device control method can be applied to the first device (the speaker 3 mentioned above), the second device (the mobile phone 2 mentioned above), the third device (the mobile phone 1 mentioned above), and the fourth device (the cloud platform mentioned above). The specific process may include:

[0210] S1401, the third device determines the second control key.

[0211] Specifically, the second control key is used to establish a session (such as a control session) between the third device and the first device, so that the third device can control the first device through the session. Furthermore, the second control key is also used by the first device to determine a first control key, which is used by devices other than the third device to establish a session with the first device, so that devices other than the third device can control the first device through the session.

[0212] As an optional mode, the third device can receive the second control key from the fourth device, or the third device can determine the second control key by itself, which is not limited.

[0213] S1402, the third device sends second information to the first device, and the first device receives the second information from the third device.

[0214] The second information includes the second control key, and the second information is used to instruct the first device to bind the third device. In this way, the first device can bind the third device according to the second information. For example, if the first device determines that the corresponding relationship of the first device is not established according to the second information, that is, the first device does not currently bind other devices, the first corresponding relationship between the first device and the third device is established, that is, the third device is bound. In other words, the third device is the first device that binds the first device, that is, the first device that has the control right (or the main control right) of the first device. In this way, if other devices want to control the first device subsequently, the first device can initiate the control right verification according to the third device having the main control right, so as to avoid the misverification.

[0215] As an implementation mode of the first device binding the third device, the second information can further include the identifier of the third device and the identifier of the first user. In this way, the first device can accurately bind the device it needs to bind according to the second information, such as establishing the first corresponding relationship between the identifier of the third device and the user corresponding to the third device, such as the identifier of the first user, so as to avoid misbinding. In addition, it should be pointed out that the first device binds the third device to bind the identifier (such as the account of the first user) of the first user corresponding to the third device. In this case, if the first user logs in to the same account using different devices, the first user can still control the first device through the binding relationship of the first user, without the first user needing to re-register and re-bind, thereby improving the user experience.

[0216] It should be understood that after the third device sends the second information to the first device, the third device can further send fifth information to the fourth device. The fifth information is used to instruct the third device to authorize the control right of the first device to the second device.

[0217] In this way, on one hand, the fourth device can bind the first device and the second device according to the fifth information, so as to determine that the second device has the control right of the first device. Specifically, the fourth device can determine the second correspondence between the first device and the second device according to the fifth information. The second correspondence can be used to indicate that the identifier of the first device corresponds to the identifier of the second user. In other words, the first device binds the second device to the identifier (such as the account of the second user) of the first user corresponding to the second device. In this case, if the second user logs in the same account by using different devices, the second user can still control the first device through the binding relationship of the second user, without the authorization of the first user again, so as to improve the user experience.

[0218] On the other hand, the fourth device can also notify the second device, so that the second device can send the third information to the first device. The third information can be used to request the control right of the first device by the second device, and can include the identifier of the second user and the identifier of the first device. The second user can be the user corresponding to the second device.

[0219] S1403, the first device sends the first information to the second device, and the second device receives the first information from the first device.

[0220] The first information is used to notify the second device to obtain the first control key, or in other words, to initiate the verification of the control right of the second device by the first device. The first information can include a verification value, which can be used to determine the first control key.

[0221] Specifically, for the first device, since the first device has bound the third device, after receiving the third information, the first device can determine that the identifier of the second user corresponding to the identifier of the first device in the third information is different from the identifier of the first user corresponding to the identifier of the first device in the first correspondence, so as to determine that the second device is not the first device that has the control right of the first device, and further determine to initiate the verification of the control right to the second device, instead of initiating the verification of the control right to other devices, so as to avoid false verification.

[0222] S1404, the second device sends the fourth information to the fourth device, and the fourth device receives the fourth information from the third device.

[0223] The fourth information is used to request the fourth device to determine the first control key. The fourth information can include the identifier of the first device, the identifier of the second user, and the verification value.

[0224] S1405, the fourth device parses the fourth information.

[0225] The fourth device can determine whether the second device has the control right of the first device according to the fourth information.

[0226] Specifically, in a case that the fourth device stores the first correspondence, the fourth device can determine that the identity of the second user corresponding to the identity of the first device in the fourth information is different from the identity of the first user corresponding to the identity of the first device in the first correspondence, and thus determine that the second user is not the first device that has the control right of the first device. In this way, the fourth device can further determine whether the second user has the control right of the first device, or whether the first user cancels the control right authorization of the first device, and thus determine whether to generate the second control key according to whether the first device cancels the authorization, so as to avoid the false generation of the second control key, such as still generating the second control key in a case that the first device cancels the authorization.

[0227] For example, if the second device receives the sixth information from the first device before determining whether the second user has the control right of the first device. The sixth information can be used to indicate that the third device cancels the authorization of the control right of the first device to the second device. Accordingly, the fourth device can cancel the binding between the first device and the second device according to the sixth information, such as deleting the second correspondence between the first device and the second device. In this way, when determining whether the second user has the control right of the first device, the second device can determine that the second device does not have the control right of the first device according to that the first device is not bound to the second device, and thus determine the first control key for the second device, so that the second device cannot continue to control the first device, avoiding the hijacking of the first device by the second device. Moreover, the fourth device can send the seventh information to the second device to indicate that the second device does not have the control right of the first device.

[0228] S1406, if the first device determines that the second device does not obtain the first control key, the connection with the second device is disconnected.

[0229] It should be understood that the above S1405-S1406 is an example in which the second device does not have the control right of the first device, but is not limited. For example, if the second device receives the sixth information from the first device before determining whether the second user has the control right of the first device, the fourth device determines that the second device has the control right of the first device, i.e., the first device has bound the second device, and thus determines the first control key, such as determining the first control key according to the check value, the second control key and the identity of the second user. In this way, the fourth device can send the first control key to the second device, so that the second device forwards the first control key to the first device.

[0230] Further, for the first device, since the first device can also determine the first control key according to the check value, the second control key and the identity of the second user. Thus, the first device can determine that the first control key from the second device is the same as the first control key determined by itself, so as to determine that the second device obtains the first control key, and then maintains the connection with the second device, so that the second device can continue to control the first device in the case that the second device has the control right of the first device.

[0231] It should also be understood that, since the second control key is saved locally in the first device and the fourth device respectively, and neither the first device nor the fourth device sends the second control key to the second device, so that the second device cannot determine the first control key by itself, thereby avoiding hijacking the first device by determining the first control key by itself in the case that the second device does not have the control right.

[0232] In summary, according to the device control method, Figure 14 It can be known that, in the case that a certain IoT device (such as the first device) has bound a certain device (such as the third device), that is, the third device has the control right of the first device, if another device, such as the second device, wants to continue to control the first device, the first device can initiate the control right check to the second device, that is, send the first information, to indicate the second device to obtain the latest control key (such as the first control key). In this way, if the second device does not obtain the first control key, that is, does not have the control right of the first device, the first device can disconnect the connection with the second device, so as to avoid the first device being hijacked by the second device.

[0233] As shown in Figure 15 The electronic device specifically can include a display screen 1507, one or more processors 1502, a memory 1503, a communication module 1508, one or more application programs (not shown), and one or more computer programs 1504. The above devices can be connected through one or more communication buses 1505. The one or more computer programs 1504 are stored in the above memory 1503 and are configured to be executed by the one or more processors 1502. The one or more computer programs 1504 include instructions that can be used to execute the related steps performed by the mobile phone in the above embodiments. The electronic device can also include a touch sensor 1506 (the touch sensor 1506 and the display screen 1507 can be integrated into a touch screen 1501), a mouse and the like input device.

[0234] Exemplarily, the embodiment of the present application discloses a chip system. The chip system is applied to an electronic device comprising a memory and a communication module; the chip system comprises one or more interface circuits and one or more processors; the interface circuit and the processor are interconnected through a line; the interface circuit is used for receiving a signal from the memory of the electronic device and sending the signal to the processor, and the signal comprises computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the above-mentioned device control method.

[0235] It should be understood that the term "and / or" in this document merely describes an association relationship of associated objects, and indicates that there can be three relationships, for example, A and / or B can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. In addition, the character " / " in this document generally represents an "or" relationship between the front and rear associated objects, but can also represent an "and / or" relationship, which can be understood according to the context before and after.

[0236] In this application, "at least one" means one or more, and "multiple" means two or more. "At least one of the following" or the like means any combination of these items, including any combination of single item or multiple items. For example, at least one of a, b, or c can represent a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.

[0237] It should be understood that in various embodiments of the present application, the size of the sequence number of the above processes does not mean the order of execution, and the execution order of the processes should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0238] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of functional modules is taken as an example, and in actual application, the above-mentioned functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here.

[0239] The functional units in each embodiment of the embodiments of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0240] The integrated unit described above, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application, essentially or in other words, the part that contributes to the prior art, or all or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes several instructions to cause a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, and various media that can store program codes.

[0241] The above is only a specific implementation of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any changes or replacements within the technical scope disclosed by the embodiments of the present application should be covered within the protection scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims

1. A device control method, characterized in that, include: The first device periodically sends first information to the second device, wherein the first device is bound to the third device, the first information is used by the first device to determine whether the second device has control over the first device, the first information is used to notify the second device to obtain the first control key, and the first control key is used by the second device to establish a session with the first device; If the first device determines that the second device has not obtained the first control key, it disconnects from the second device.

2. The method according to claim 1, characterized in that, Before the first device sends the first information to the second device, the method further includes: The first device receives second information from the third device, wherein the second information is used to indicate that the first device needs to bind to the third device; The first device binds to the third device based on the second information.

3. The method according to claim 2, characterized in that, The first device binds the third device based on the second information, including: Based on the second information, the first device determines that no corresponding relationship has been established with the first device. The first device establishes a first correspondence between itself and the third device.

4. The method according to claim 3, characterized in that, The second information includes: the identifier of the first device, the identifier of the first user, and the second control key, wherein the first user is the user corresponding to the third device, the correspondence of the first device is the correspondence between the identifier of the first device and the identifier of the user, the first correspondence is the correspondence between the identifier of the first device and the identifier of the first user, and the second control key is used for the third device to establish a session with the first device.

5. The method according to any one of claims 1-4, characterized in that, Before the first device sends the first information to the second device, the method further includes: The first device receives third information from the second device, wherein the third information is used by the second device to request control of the first device.

6. The method according to claim 5, characterized in that, The third information includes: the identifier of the second user and the identifier of the first device, wherein the second user is the user corresponding to the second device.

7. The method according to any one of claims 1-3, characterized in that, The first information includes a checksum, which is used to determine the first control key.

8. The equipment control method according to claim 7, characterized in that, The first control key is determined based on the verification value, the second control key, and the identifier of the second user. The second control key is used for the third device to establish a session with the first device, and the second user is the user corresponding to the second device.

9. A device control method, characterized in that, include: The second device periodically receives first information from the first device, wherein the first information is used by the first device to determine whether the second device has control over the first device, the first information is used to notify the second device to obtain a first control key, and the first control key is used by the second device to establish a session with the first device. The second device sends a fourth message to the fourth device, wherein the fourth message is used to request the fourth device to determine the first control key.

10. The method according to claim 9, characterized in that, The first information includes a verification value, which is used by the fourth device to determine the first control key.

11. The method according to claim 10, characterized in that, The fourth information includes: the identifier of the first device, the identifier of the second user, and the verification value, wherein the second user is the user corresponding to the second device.

12. The method according to claim 11, characterized in that, After the second device sends the fourth information to the fourth device, the method further includes: The second device receives the first control key from the fourth device; The second device sends the first control key to the first device.

13. The method according to any one of claims 9-12, characterized in that, Before the second device receives the first information from the first device, the method further includes: The third information sent by the second device to the first device, wherein the third information is used by the second device to request control of the first device.

14. The method according to claim 13, characterized in that, The third information includes: the identifier of the second user and the identifier of the first device, wherein the second user is the user corresponding to the second device.

15. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory; Communication module; The memory stores one or more computer programs, the one or more computer programs including instructions that, when executed by the electronic device, cause the electronic device to perform the method as described in any one of claims 1-8, or to perform the method as described in any one of claims 9-14.

16. A computer-readable storage medium storing instructions, characterized in that, When the instructions are executed on an electronic device, the electronic device causes the electronic device to perform the method as described in any one of claims 1-8, or to perform the method as described in any one of claims 9-14.

17. A computer program product, characterized in that, The computer program product includes: a computer program or instructions that, when executed on a computer, cause the computer to perform the method as described in any one of claims 1-8, or to perform the method as described in any one of claims 9-14.

18. A chip system, characterized in that, The chip system is applied to an electronic device including a memory and a communication module; the chip system includes one or more interface circuits and one or more processors; the interface circuits and the processors are interconnected via lines; the interface circuits are used to receive signals from the memory of the electronic device and send the signals to the processors, the signals including computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device performs the method as described in any one of claims 1-8, or performs the method as described in any one of claims 9-14.

Citation Information

Patent Citations

  • KMIP protocol-based key management client server method and system and medium

    CN109274646A

  • System and method for secure communications with internet-of-things devices

    US20170359343A1