A method for obtaining device control rights and a communication system

By implementing the method of sending a key when the second device is approached in the Internet of Things device and encrypting control instructions, the problem of control rights management when multiple users share the device is solved, and convenient control and efficient management of the device are realized.

CN114584412BActive Publication Date: 2025-05-27HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011375333.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-30
Publication Date
2025-05-27
Estimated Expiration
2040-11-30

AI Technical Summary

Technical Problem

In an IoT environment, when multiple users share the same device, how to easily manage control of the device is a question worth thinking about.

Method used

By detecting that the second device is close to the first device, a first key is sent and the key is encrypted and the control instructions are used to realize convenient control of the first device. The method includes the first device detecting the proximity of the second device, sending a first key, the second device encrypts the control instructions using the key, and sending the encrypted instructions to the first device, and the first device decrypts and executes the instructions.

Benefits of technology

It realizes convenient acquisition and management of device control rights and improves user experience. Especially in home or office environments, users can simply control home or office equipment through mobile terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114584412B_ABST
    Figure CN114584412B_ABST
Patent Text Reader

Abstract

A method for obtaining device control right and a communication system. The method is applied to a system including a first device and a second device. The first device detects that the second device is close to the first device; the first device sends a first key to the second device; after receiving the first key, the second device encrypts a control instruction using the first key; the control instruction is used to control the first device; the second device sends the encrypted control instruction to the first device; the first device decrypts the encrypted control instruction to obtain the control instruction and executes the control instruction. Therefore, when the second device is close to the first device, it can obtain the key of the first device, and based on this key, it can obtain the control right of the first device. This way of obtaining the device control right is relatively convenient and provides a better user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of terminals, and particularly to a method for obtaining device control rights and a communication system. Background Art

[0002] With the development of Internet of Things (IoT) technology in recent years, various types of IoT devices have entered thousands of households. For example, various household appliances at home. To facilitate user operation of the devices, a user's mobile terminal (such as a mobile phone) can control the devices. However, multiple users may use the same device. For example, there are multiple family members, and all family members need to use a certain household appliance. Then, how to manage the control rights of the device is a problem worthy of consideration. Summary of the Invention

[0003] The purpose of this application is to provide a method for obtaining device control rights and a communication system, which helps to conveniently obtain the control rights of a device.

[0004] In a first aspect, a method for obtaining device control rights is provided. The method can be applied to a system including a first device and a second device. The method includes: the first device detects that the second device is close to the first device; the first device sends a first key to the second device; after receiving the first key, the second device encrypts a control instruction using the first key; the control instruction is used to control the first device; the second device sends the encrypted control instruction to the first device; the first device decrypts the encrypted control instruction to obtain the control instruction and executes the control instruction.

[0005] That is to say, when the second device is close to the first device, it can obtain the first key of the first device, and then obtain the control rights of the first device based on the first key. This way of obtaining device control rights is relatively convenient. For example, if the first device is a household device and the second device is a mobile terminal (such as a mobile phone), when the user wants to control the household device, the user only needs to bring the mobile phone close to the household device to obtain the control rights of the household device, which is convenient to operate and provides a high user experience.

[0006] In a possible design, the method further includes: a first prompt message is displayed on the second device, and the first prompt message is used to prompt whether to apply for temporary control rights of the first device; when the second device receives a confirmation instruction, the second device sends a first application to the first device, and the first application is used to indicate that the second device applies for temporary control rights of the first device; the first device sending the first key to the second device includes: when the first device receives the first application from the second device, the first device sends the first key to the second device.

[0007] It can be understood that when the first device detects that the second device is close to the first device, it can automatically send the first key to the first device. Of course, for security reasons, when the first device detects that the second device is close, it does not temporarily send the first key to the second device, but sends the first key to the second device after receiving the first application from the second device. In this way, mis-sending of the key can be avoided. For example, it can prevent the user from unconsciously carrying the second device close to the first device and obtaining temporary control of the first device, thus better protecting the first device.

[0008] In a possible design, the first key has a validity period, and when the validity period is exceeded, the first key becomes invalid; wherein, the validity period is preset, or set by the user, or determined according to the type of the first device; among them, the validity periods of the first keys generated by different types of first devices are different. This method can avoid the key from being effective for a long time and improve security, because if the key is effective for a long time, the probability of being stolen is relatively high and the security is low.

[0009] In a possible design, the method further includes: when a preset condition is met, the second device terminates the temporary control right over the first device; wherein, the preset condition includes at least one of the following:

[0010] The usage duration of the first key exceeds the validity period; or,

[0011] A preset duration has elapsed since the moment when the first key is received from the second device; or,

[0012] The first device detects that a third device is approaching the first device; or,

[0013] An operation for terminating the second device's temporary control right over the first device is detected on the first device; or,

[0014] The first device receives an instruction from the owner of the first device, where the owner is a device that can control the first device through the cloud; the instruction is used to indicate terminating the second device's temporary control right over the first device; or,

[0015] The first device detects that the distance between the second device and the first device is greater than a second preset distance.

[0016] That is to say, when the second device is close to the first device, the control right obtained over the first device does not always take effect. When the above preset conditions are met, the control right is terminated. In this way, the security of the first device can be improved and the second device can be prevented from having long-term control over the first device.

[0017] In a possible design, the system further includes a fourth device, and the fourth device is the owner of the first device. The owner is a device that can control the first device through the cloud. Before the first device sends a first key to the second device, it further includes:

[0018] The first device sends a confirmation request to the fourth device. The confirmation request is used to confirm whether to agree that the second device obtains temporary control of the first device;

[0019] The first device sending the first key to the second device includes:

[0020] When the first device receives an approval instruction from the fourth device, it sends the first key to the second device.

[0021] That is to say, when the first device detects that the second device is approaching, it can request confirmation from the owner of the first device. When it receives the approval instruction from the owner, it sends the first key to the second device. This way of sending the key to the second device only with the consent of the owner can better protect the first device and has higher security.

[0022] In a possible design, the first device sending the confirmation request to the fourth device includes:

[0023] The first device sends a second application to the cloud. The second application is used to instruct the second device to apply for temporary control of the first device;

[0024] In response to the received second application, the cloud determines that the owner of the first device is the fourth device according to the mapping relationship between the device and the owner;

[0025] The cloud sends the confirmation request to the fourth device.

[0026] That is to say, the cloud records the owner of the device. When the first device requests confirmation from its owner, it can be implemented through the cloud. This way of sending the key to the second device only with the consent of the owner is more secure.

[0027] In a possible design, the method further includes: the first device generates an authentication-free duration and / or an authentication-free number of times; after the temporary control of the first device by the second device terminates, when the first device detects that the second device approaches the first device again, if it is determined that the authentication-free duration is not exceeded and / or the cumulative number of approaches of the second device does not exceed the authentication-free number of times, the confirmation to the fourth device is waived.

[0028] That is to say, after the second device obtains the temporary control right of the first device, the first device can generate an authentication-free duration and / or an authentication-free number of times to avoid frequently requesting its owner for confirmation.

[0029] In a possible design, when the first device receives an approval instruction from the fourth device, the first device sends a first key to the second device, including: after the first device receives the approval instruction from the fourth device, when the first device detects that the second device approaches the first device again, the first device sends the first key to the second device.

[0030] That is to say, when the first device detects that the second device is close, it requests the owner for confirmation. When the owner approves, if the first device detects that the second device is close again, it sends the key to the second device. This can avoid mis-sending the key and improve security.

[0031] In a possible design, the method further includes: the second device determines the functions in the first device that support the temporary control right; the control instruction sent by the second device to the first device is used to control the functions in the first device that support the temporary control right; where the function is a preset function in the first device, or a function specified by the user, or a function in the first device that has nothing to do with user privacy.

[0032] That is to say, the second device obtains the temporary control right of the first device, but the functions of the first device that can be controlled are limited. It can control the functions in the first device that support the temporary control right, and other functions cannot be controlled. In this way, relevant functions in the first device (such as functions related to user privacy) can be protected from being wantonly controlled, and the first device can be better protected.

[0033] In a possible design, the method further includes: a second prompt message is displayed on the second device, and the second prompt message is used to prompt whether to apply for the permanent control right of the first device;

[0034] When the second device receives a confirmation instruction, the second device sends a third application to the first device, and the third application is used to indicate that the second device applies for the permanent control right of the first device;

[0035] The first device sends the third application to the cloud;

[0036] In response to receiving the third application, the cloud records the second device as the owner of the first device, so that the second device can control the first device through the cloud.

[0037] That is to say, the second device can also apply to become the owner of the first device. When the cloud records that the owner of the first device is the second device, the second device can control the first device through the cloud.

[0038] In a possible design, the cloud, in response to the received third application, records that the second device is the owner of the first device, including:

[0039] In response to the third application, the cloud determines that the owner of the first device is the fourth device;

[0040] The cloud sends a confirmation request to the fourth device; the confirmation request is used to indicate whether to agree that the second device obtains permanent control of the first device;

[0041] When the cloud receives the consent instruction, it records that the owner of the first device is updated from the fourth device to the second device.

[0042] That is to say, if the owner of the first device is the fourth device, when the second device applies to become the owner of the first device, the cloud can request confirmation from the fourth device. If the consent instruction from the fourth device is received, the owner of the first device is updated to the second device, so that the second device can control the first device through the cloud. This method that requires confirmation from the original owner is more secure.

[0043] In a possible design, the system further includes a fourth device, the fourth device is the owner of the first device, and the owner is a device that can control the first device through the cloud; the method further includes:

[0044] A first operation is received on the fourth device, and the first operation is used to indicate turning on the short-distance communication function or the ultra-short-distance communication function of the first device;

[0045] In response to the first operation, the fourth device sends an instruction to the first device for indicating the first device to turn on the short-distance communication function or the ultra-short-distance communication function;

[0046] In response to the received instruction, the first device turns on the short-distance communication function or the ultra-short-distance communication function.

[0047] That is to say, the owner of the first device can control the enabling or disabling of the short - range communication function or the ultra - short - range communication function of the first device. When the short - range communication function or the ultra - short - range communication function of the first device is enabled, if the second device also enables the short - range communication function or the ultra - short - range communication function, when the second device gets close to the first device, it can obtain the temporary control right of the first device. This control method by the owner is more secure.

[0048] In a possible design, the first device sending the first key to the second device includes:

[0049] The first device uses NFC or WIFI Aware to send the first key to the second device.

[0050] It should be noted that NFC or WIFI Aware here is only an example, and other short - range communication technologies or ultra - short - range communication technologies are also acceptable. The embodiments of this application do not make limitations in this regard.

[0051] In a possible design, the first device detecting that the second device gets close to the first device includes:

[0052] The first device detects that the distance between the second device and the first device is less than a first threshold; and / or,

[0053] The first device detects that the signal strength of the second device is greater than a second threshold.

[0054] That is to say, the first device can determine whether the second device gets close to the first device by the distance or the signal strength. This information interaction method at close range has high security.

[0055] In a possible design, the first threshold is a value within the range of 0 cm to 30 cm; the second threshold is a value within the range of - 5 dbm to - 150 dbm.

[0056] It should be noted that the above values are only examples of the first threshold and the second threshold. The embodiments of this application do not make limitations on the specific values of the first threshold and the second threshold.

[0057] In a possible design, the first device is a home device, and the second device is a mobile terminal. The control instruction is used to control the turning on, turning off or adjusting of the operating parameters of the home device; wherein, the home device includes one or more of a television, a speaker, a game console, a lighting device, a cleaning device or a cooking device. Taking the mobile terminal as a mobile phone and the home device as a speaker as an example, the control instruction can be to turn on or off, play song XXX, switch to the next song, etc.

[0058] In a possible design, the first device is an office device, and the second device is a mobile terminal. The control instruction is used to control the turning on, turning off, or adjusting the operating parameters of the office device. Among them, the office device includes one or more of a projector, a printer, a copier, or a PC. Taking the mobile terminal as a mobile phone and the office device as a printer as an example, the control instruction can turn on or off the printer, start printing, stop printing, pause printing, and so on.

[0059] In a second aspect, a method for obtaining device control rights is provided, which is applied to the first device. The method includes:

[0060] The first device detects that the second device is close to the first device;

[0061] The first device sends a first key to the second device;

[0062] The first device receives the encrypted control instruction from the second device;

[0063] The first device decrypts the encrypted control instruction to obtain the control instruction and executes the control instruction.

[0064] In a possible design, the first device sending the first key to the second device includes:

[0065] When the first device receives a first application from the second device, it sends the first key to the second device.

[0066] In a possible design, the first key has a validity period, and when the validity period is exceeded, the first key becomes invalid. Among them, the validity period is preset, or set by the user, or determined according to the type of the first device. Among them, the validity periods of the first keys generated by different types of first devices are different.

[0067] In a possible design, the method further includes: when a preset condition is met, terminating the temporary control right of the second device over the first device. Among them, the preset condition includes at least one of the following:

[0068] The usage duration of the first key exceeds the validity period; or,

[0069] A preset duration has elapsed since the moment when the first key is received from the second device; or,

[0070] The first device detects that a third device is approaching the first device; or,

[0071] An operation for terminating the temporary control right of the second device over the first device is detected on the first device; or,

[0072] The first device receives an instruction from the owner of the first device, where the owner is a device that can control the first device through the cloud; the instruction is used to indicate terminating the temporary control right of the second device over the first device; or,

[0073] The first device detects that the distance between the second device and the first device is greater than a second preset distance.

[0074] In a possible design, before the first device sends a first key to the second device, it further includes:

[0075] The first device sends a confirmation request to a fourth device; the confirmation request is used to confirm whether to agree that the second device obtains the temporary control right of the first device; the fourth device is the owner of the first device, and the owner is a device that can control the first device through the cloud;

[0076] The first device sending the first key to the second device includes:

[0077] When the first device receives an approval instruction from the fourth device, it sends the first key to the second device.

[0078] In a possible design, the first device sending a confirmation request to the fourth device includes:

[0079] The first device sends a second application to the cloud, and the second application is used to indicate that the second device applies for the temporary control right of the first device; so that in response to the received second application, the cloud determines that the owner of the first device is the fourth device according to the mapping relationship between the device and the owner and sends the confirmation request to the fourth device.

[0080] In a possible design, the method further includes: the first device generates an authentication-free duration and / or an authentication-free number of times; after the temporary control right of the first device by the second device is terminated, when the first device detects that the second device approaches the first device again, if it is determined that the authentication-free duration is not exceeded and / or the cumulative approach times of the second device do not exceed the authentication-free number of times, confirmation to the fourth device is waived.

[0081] In a possible design, when the first device receives an approval instruction from the fourth device, sending the first key to the second device includes:

[0082] After the first device receives the consent instruction from the fourth device, when the first device detects that the second device approaches the first device again, the first device sends a first key to the second device.

[0083] In a possible design, the method further includes: the first device determines a function in the first device that supports temporary control rights; when the control instruction sent by the second device to the first device is used to control the function in the first device that supports temporary control rights, execute the control instruction;

[0084] Wherein, the function is a preset function in the first device, or a function specified by the user, or a function in the first device that has nothing to do with user privacy.

[0085] In a possible design, the method further includes:

[0086] The first device receives a third application from the second device, and the third application is used to indicate that the second device applies for permanent control rights over the first device;

[0087] The first device sends the third application to the cloud, so that in response to the received third application, the cloud records the second device as the owner of the first device, and further enables the second device to control the first device through the cloud.

[0088] In a possible design, the method further includes:

[0089] The first device receives an instruction from a fourth device; the instruction is used to instruct the first device to turn on the short-range communication function or the ultra-short-range communication function; the fourth device is the owner of the first device, and the owner is a device that can control the first device through the cloud;

[0090] In response to the received instruction, the first device turns on the short-range communication function or the ultra-short-range communication function.

[0091] In a possible design, the first device sending the first key to the second device includes:

[0092] The first device uses NFC or WIFI Aware to send the first key to the second device.

[0093] In a possible design, the first device detecting that the second device is close to the first device includes:

[0094] The first device detects that the distance between the second device and the first device is less than a first threshold; and / or,

[0095] The first device detects that the signal strength of the second device is greater than a second threshold value.

[0096] In a possible design, the first threshold value is a value within the range of 0 cm to 30 cm; the second threshold value is a value within the range of -5 dbm to -150 dbm.

[0097] In a possible design, the first device is a home device, and the second device is a mobile terminal. The control instruction is used to control the turning on, turning off, or adjusting the operating parameters of the home device; wherein, the home device includes one or more of a television, a speaker, a game console, a lighting device, a cleaning device, or a cooking device; or,

[0098] The first device is an office device, and the second device is a mobile terminal. The control instruction is used to control the turning on, turning off, or adjusting the operating parameters of the office device; wherein, the office device includes one or more of a projector, a printer, a copier, or a PC.

[0099] In a third aspect, a method for obtaining the control right of a device is further provided, which is applied to the second device. The method includes:

[0100] The second device detects being close to the first device;

[0101] The second device receives a first key from the first device;

[0102] The second device encrypts the control instruction using the first key; the control instruction is used to control the first device;

[0103] The second device sends the encrypted control instruction to the first device.

[0104] In a possible design, before the second device receives the first key from the first device, the method further includes:

[0105] A first prompt message is displayed on the second device, and the first prompt message is used to prompt whether to apply for temporary control right of the first device;

[0106] When the second device receives a confirmation instruction, it sends a first application to the first device, and the first application is used to indicate that the second device applies for temporary control right of the first device;

[0107] In a possible design, the first key has a validity period, and when the validity period is exceeded, the first key becomes invalid; wherein, the validity period is preset, or set by the user, or determined according to the type of the first device; wherein, the validity periods of the first keys generated by different types of first devices are different.

[0108] In a possible design, the method further includes: when a preset condition is satisfied, the second device terminates the temporary control right over the first device; wherein, the preset condition includes at least one of the following:

[0109] The usage duration of the first key exceeds the validity period; or,

[0110] A preset duration has elapsed since the moment when the first key is received from the second device; or,

[0111] An operation for terminating the temporary control right of the second device over the first device is detected on the second device; or,

[0112] The second device detects that the distance between the second device and the first device is greater than a second preset distance.

[0113] In a possible design, the method further includes:

[0114] The second device determines the functions in the first device that support the temporary control right; the control instructions sent by the second device to the first device are used to control the functions in the first device that support the temporary control right;

[0115] Wherein, the functions are preset functions in the first device, or functions specified by the user, or functions in the first device that have nothing to do with user privacy.

[0116] In a possible design, the method further includes:

[0117] The second device displays a second prompt message, and the second prompt message is used to prompt whether to apply for the permanent control right over the first device;

[0118] When the second device receives a confirmation instruction, it sends a third application to the first device, and the third application is used to indicate that the second device applies for the permanent control right over the first device; so that the first device applies to the cloud for the second device to be the owner of the first device.

[0119] In a possible design, the second device receives the first key from the first device, including:

[0120] Receiving the first key from the first device using NFC or WIFI Aware.

[0121] In a possible design, the second device detecting being close to the first device includes:

[0122] detecting that the distance between the second device and the first device is less than a first threshold; and / or,

[0123] detecting that the signal strength of the second device is greater than a second threshold.

[0124] In a possible design, the first threshold is a value within the range of 0 cm to 30 cm; the second threshold is a value within the range of -5 dbm to -150 dbm.

[0125] In a possible design, the first device is a home device, and the second device is a mobile terminal, and the control instruction is used to control the turning on, turning off or adjusting of the operating parameters of the home device; wherein, the home device includes one or more of a television, a speaker, a game console, a lighting device, a cleaning device or a cooking device; or, the first device is an office device, and the second device is a mobile terminal, and the control instruction is used to control the turning on, turning off or adjusting of the operating parameters of the office device; wherein, the office device includes one or more of a projector, a printer, a copier or a PC.

[0126] In a fourth aspect, a method for obtaining device control authority is provided, which is applied to a fourth device, and the method includes:

[0127] The fourth device applies to be the owner of the first device in the cloud; the owner is used to indicate a device that can control the first device through the cloud;

[0128] The fourth device receives a confirmation request from the first device; the confirmation request is used to confirm whether to agree that the second device obtains the control authority of the first device;

[0129] When the fourth device detects a confirmation operation, it sends an approval instruction to the first device, and the approval instruction is used to indicate agreeing that the second device obtains the control authority of the first device.

[0130] In a possible design, the method further includes: a first operation is received on the fourth device, and the first operation is used to indicate turning on the short-distance communication function or the ultra-short-distance communication function of the first device;

[0131] The fourth device responds to the first operation and sends an indication to the first device for indicating the first device to turn on the short-distance communication function or the ultra-short-distance communication function.

[0132] In response to the received indication, the first device enables the short - range communication function or the ultra - short - range communication function.

[0133] In a possible design, the fourth device may be a mobile terminal, such as a mobile phone, a tablet computer, a smart bracelet, a smart watch, etc., and the first device may be a home device, an office device, etc.

[0134] In a fifth aspect, a method for obtaining device control rights is further provided, which is applied to the cloud. The method includes:

[0135] The cloud receives an application from the first device, and the application is used to indicate that the second device applies for the control right of the first device;

[0136] The cloud determines that the owner of the first device is the fourth device according to the mapping relationship between the device and the owner; the owner is used to indicate the device that can control the first device through the cloud;

[0137] The cloud sends a confirmation request to the fourth device; the confirmation request is used to indicate whether to agree that the second device obtains the control right of the first device;

[0138] When the cloud receives an approval instruction from the fourth device, it sends an approval instruction to the first device, and the approval instruction is used to indicate agreement that the second device obtains the control right of the first device.

[0139] In a possible design, when the application is used to indicate that the second device applies to be the owner of the first device, the method further includes:

[0140] The cloud records that the owner of the first device is updated from the fourth device to the second device.

[0141] In a sixth aspect, a communication system is further provided, including: a first device and a second device;

[0142] Among them, the first device includes: one or more processors, a memory, and one or more programs; among them, the one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the first device, the first device performs the following steps:

[0143] Detect that the second device is close to the first device;

[0144] Send a first key to the second device;

[0145] The second device includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the second device, cause the second device to perform the following steps:

[0146] After receiving the first key, use the first key to encrypt the control instruction; the control instruction is used to control the first device;

[0147] Send the encrypted control instruction to the first device;

[0148] When the first device executes, cause the first device to further perform the steps of: decrypting the encrypted control instruction to obtain the control instruction and executing the control instruction.

[0149] In a possible design, when the instruction is executed by the second device, cause the second device to further perform the steps of:

[0150] Display a first prompt message for prompting whether to apply for temporary control of the first device;

[0151] When receiving a confirmation instruction, send a first application to the first device, the first application being used to indicate that the second device applies for temporary control of the first device;

[0152] When the instruction is executed by the first device, cause the first device to specifically perform the steps of:

[0153] When receiving the first application from the second device, send the first key to the second device.

[0154] In a possible design, the first key has a validity period, and when the validity period is exceeded, the first key becomes invalid; wherein, the validity period is preset, or set by the user, or determined according to the type of the first device; and the validity periods of the first keys generated by different types of first devices are different.

[0155] In a possible design, when the instruction is executed by the first device, cause the first device to further perform the steps of: when a preset condition is met, terminate the second device's temporary control of the first device; wherein, the preset condition includes at least one of the following:

[0156] The usage duration of the first key exceeds the validity period; or,

[0157] A preset duration has elapsed since the moment when the first key is received from the second device; or,

[0158] The first device detects that a third device approaches the first device; or,

[0159] An operation for terminating the temporary control right of the second device over the first device is detected on the first device; or,

[0160] The first device receives an instruction from the owner of the first device, where the owner is a device that can control the first device through the cloud; the instruction is used to indicate terminating the temporary control right of the second device over the first device; or,

[0161] The first device detects that the distance between the second device and the first device is greater than a second preset distance.

[0162] In a possible design, the communication system further includes a fourth device and a cloud, the fourth device is the owner of the first device, and the owner is a device that can control the first device through the cloud; when the instruction is executed by the first device, the first device specifically executes the steps of: sending a confirmation request to the fourth device; the confirmation request is used to confirm whether to agree that the second device obtains the temporary control right of the first device;

[0163] When receiving an approval instruction from the fourth device, send a first key to the second device.

[0164] In a possible design, when the instruction is executed by the first device, the first device specifically executes the steps of: sending a second application to the cloud, and the second application is used to instruct the second device to apply for the temporary control right of the first device;

[0165] The cloud includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions, when the instructions are executed by the cloud, the cloud executes the following steps:

[0166] In response to the received second application, the cloud determines that the owner of the first device is the fourth device according to the mapping relationship between the device and the owner;

[0167] Send the confirmation request to the fourth device.

[0168] In a possible design, when the instruction is executed by the first device, the first device further executes the steps of: generating a duration of authentication exemption, and / or, a number of authentication exemptions;

[0169] After the temporary control right of the second device over the first device terminates, when the first device detects that the second device approaches the first device again, if it is determined that the authentication-free duration has not expired and / or the cumulative number of approaches of the second device does not exceed the authentication-free number of times, the confirmation to the fourth device is waived.

[0170] In a possible design, when the instruction is executed by the first device, the first device specifically executes the steps of: after receiving the consent instruction from the fourth device, when the first device detects that the second device approaches the first device again, sending a first key to the second device.

[0171] In a possible design, when the instruction is executed by the second device, the second device also executes the steps of:

[0172] Determine the function in the first device that supports the temporary control right; the control instruction sent by the second device to the first device is used to control the function in the first device that supports the temporary control right;

[0173] Wherein, the function is a preset function in the first device, or a function specified by the user, or a function in the first device that has nothing to do with user privacy.

[0174] In a possible design, the system further includes a cloud;

[0175] When the instruction is executed by the second device, the second device also executes the steps of:

[0176] Display a second prompt message on the second device, where the second prompt message is used to prompt whether to apply for the permanent control right of the first device;

[0177] When the second device receives the confirmation instruction, send a third application to the first device, where the third application is used to indicate that the second device applies for the permanent control right of the first device;

[0178] When the instruction is executed by the first device, the first device also executes the steps of: the first device sends the third application to the cloud;

[0179] The cloud includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions, when the instructions are executed by the cloud, the cloud executes the following steps:

[0180] In response to the received third application, record the second device as the owner of the first device, so that the second device can control the first device through the cloud.

[0181] In a possible design, when the instruction is executed by the cloud, the cloud specifically executes the steps of:

[0182] In response to the third application, the cloud determines that the owner of the first device is the fourth device;

[0183] The cloud sends a confirmation request to the fourth device; the confirmation request is used to indicate whether to agree that the second device obtains permanent control of the first device;

[0184] When the cloud receives an approval instruction, record that the owner of the first device is updated from the fourth device to the second device.

[0185] In a possible design, the system further includes a fourth device, and the fourth device is the owner of the first device. The owner is a device that can control the first device through the cloud;

[0186] The fourth device includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the fourth device, the fourth device executes the following steps:

[0187] A first operation is received on the fourth device, and the first operation is used to indicate turning on the short-range communication function or short-distance communication function of the first device;

[0188] In response to the first operation, the fourth device sends an instruction to the first device for indicating the first device to turn on the short-range communication function or short-distance communication function;

[0189] When the instruction is executed by the first device, the first device executes the following steps: In response to the received instruction, turn on the short-range communication function or short-distance communication function.

[0190] In a possible design, when the instruction is executed by the first device, the first device specifically executes the steps of:

[0191] The first device uses NFC or WIFI Aware to send a first key to the second device.

[0192] In a possible design, when the instruction is executed by the first device, the first device specifically executes the steps of:

[0193] The first device detects that the distance between the second device and the first device is less than a first threshold; and / or,

[0194] The first device detects that the signal strength of the second device is greater than a second threshold value.

[0195] In a possible design, the first threshold value is a value within the range of 0 cm to 30 cm; the second threshold value is a value within the range of -5 dbm to -150 dbm.

[0196] In a possible design, the first device is a home device, and the second device is a mobile terminal. The control instruction is used to control the turning on, turning off, or adjusting of operating parameters of the home device. Among them, the home device includes one or more of a television, a speaker, a game console, a lighting device, a cleaning device, or a cooking device; or,

[0197] The first device is an office device, and the second device is a mobile terminal. The control instruction is used to control the turning on, turning off, or adjusting of operating parameters of the office device. Among them, the office device includes one or more of a projector, a printer, a copier, or a PC.

[0198] In a seventh aspect, an embodiment of the present application further provides an electronic device, including: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions. When the instructions are executed by the electronic device, the electronic device executes the method provided in any one of the second aspect to the fifth aspect as described above.

[0199] In an eighth aspect, an embodiment of the present application further provides an electronic device, and the electronic device includes modules / units that execute the method provided in any one of the second aspect to the fifth aspect as described above; these modules / units can be implemented by hardware or by hardware executing corresponding software.

[0200] In a ninth aspect, an embodiment of the present application further provides a chip, and the chip is coupled to the memory in the electronic device for calling a computer program stored in the memory and executing the technical solution provided in any one of the first aspect to the fifth aspect of the embodiment of the present application; in the embodiment of the present application, "coupling" means that two components are directly or indirectly combined with each other.

[0201] In a tenth aspect, an embodiment of the present application further provides a computer-readable storage medium, and the computer-readable storage medium includes a computer program. When the computer program runs on a computer, the computer executes the technical solution provided in any one of the first aspect to the fifth aspect as described above.

[0202] In an eleventh aspect, an embodiment of the present application further provides a program product, including instructions that, when running on a computer, cause the computer to execute the technical solution provided in any one of the first to fifth aspects described above.

[0203] In a twelfth aspect, an embodiment of the present application further provides a graphical user interface on an electronic device. The electronic device has a display screen, one or more memories, and one or more processors. The one or more processors are configured to execute one or more computer programs stored in the one or more memories. The graphical user interface includes the graphical user interface displayed when the electronic device executes the technical solution provided in any one of the second to fifth aspects described above.

[0204] For the beneficial effects of the second to twelfth aspects described above, please refer to the beneficial effects of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0205] Figure 1A Schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;

[0206] Figure 1B Schematic diagram of the software structure of an electronic device provided by an embodiment of the present application;

[0207] Figure 2 Schematic diagram of a communication system provided by an embodiment of the present application;

[0208] Figure 3 Schematic diagram of an application scenario provided by an embodiment of the present application;

[0209] Figure 4A Schematic diagram of the process for a second device to become the owner of a first device provided by an embodiment of the present application;

[0210] Figures 4B to 4D Schematic diagram of the GUI of a second device provided by an embodiment of the present application;

[0211] Figure 5A Schematic diagram of the process for a method of obtaining device control rights provided by an embodiment of the present application;

[0212] Figure 5B Schematic diagram of the GUI of a second device provided by an embodiment of the present application;

[0213] Figure 5C Schematic diagram of another communication system provided by an embodiment of the present application;

[0214] Figure 5D Schematic diagram of a third device approaching a first device provided by an embodiment of the present application;

[0215] Figure 6A Another schematic diagram of the process for obtaining device control rights provided by an embodiment of this application;

[0216] Figure 6B Schematic diagram of the GUIs of the second device and the third device provided by an embodiment of this application;

[0217] Figure 6C Schematic diagram of the GUI of the second device provided by an embodiment of this application;

[0218] Figure 7A Another schematic diagram of the process for obtaining device control rights provided by an embodiment of this application;

[0219] Figures 7B to 7C Schematic diagram of the GUI of the third device provided by an embodiment of this application;

[0220] Figure 8 Schematic diagram of the structure of the electronic device provided by an embodiment of this application. Detailed implementation manners

[0221] The following explains some terms in the embodiments of this application to facilitate understanding by those skilled in the art.

[0222] (1) Application (app)

[0223] A software program capable of implementing one or more specific functions. Generally, multiple applications can be installed in an electronic device. For example, camera applications, text message applications, multimedia message applications, image applications, various email applications, WeChat, QQ, WhatsApp Messenger, Line, Instagram, Kakao Talk, or DingTalk, etc. The applications mentioned below can be applications pre-installed when the electronic device leaves the factory, or applications downloaded from the network or obtained from other electronic devices by the user during the use of the electronic device (for example, applications sent by other electronic devices). The following mainly takes the Huawei Smart Life application as an example for introduction, but this solution is also applicable to other types of applications.

[0224] (2) Short-range communication and ultra-short-range communication

[0225] Short-distance communication is, for example, a communication technology with a communication distance less than a first threshold, and ultra-short-distance communication is, for example, a communication technology with a communication distance less than a second threshold, where the second threshold is less than the first threshold. For example, the second threshold can be any value within the range of 0 cm to 30 cm; for example, 30 cm, 20 cm, 10 cm, 5 cm, 4 cm, 3 cm, 2 cm, 1 cm, etc. For example, the first threshold can be any value within the range of 30 cm to 10 m, such as 10 m, 8 m, 5 m, 3 m, 1 m, etc. It should be noted that the values here are only examples and do not specifically limit the first threshold and the second threshold.

[0226] Compared with short-distance communication, ultra-short-distance communication supports a shorter communication distance. For example, an exemplary scenario is that a first device is close to a second device to achieve communication between the first device and the second device. The "close" here can be understood as the two devices being in contact, or basically in contact (such as the two devices being very close), in short, the distance between the two devices is very short, such as within the range of 0 cm to 5 cm.

[0227] The method for obtaining device control rights provided in this application can be applied to short-distance communication or ultra-short-distance communication. This article mainly takes ultra-short-distance communication as an example for introduction. Since the communication distance supported by ultra-short-distance communication technology is very short, the probability of information being stolen is relatively low and the security is relatively high.

[0228] Among them, there are various technologies that support short-distance communication, such as Wi-Fi and Bluetooth. There are also various technologies that support ultra-short-distance communication, such as NFC, Wi-Fi Aware technology, etc. Among them, the Wi-Fi Aware technology is responsible for the sensing and discovery part in the Wi-Fi technology and can help Wi-Fi devices sense surrounding services, such as surrounding devices, and then implement peer-to-peer (P2P) message interaction between two devices at close range through Wi-Fi Aware. Since WIFI-Aware can sense surrounding devices, it can implement various functions, such as sensing nearby people and establishing connections, and then adding friends, playing the same game, etc.; or discovering surrounding devices to achieve photo sharing or location sharing, etc.; or securely sending files to a printer without accessing a network (such as cellular or wireless), etc.

[0229] It should be noted that in addition to the NFC and Wi-Fi Aware listed above, with the evolution of communication technology, other ultra-short-distance communication technologies that may appear in the future can also be applied to this solution. Or, with the further development of current short-distance communication technologies (such as Bluetooth technology), ultra-short-distance communication may also be supported in the future, and then it can also be applied to this solution.

[0230] (3) Temporary control right

[0231] Among them, the temporary control right can be obtained based on ultra - short - distance communication technology. For example, when the user is at home and holds the mobile phone close to the speaker, the mobile phone obtains temporary control of the speaker through ultra - short - distance communication technology (such as NFC or Wi - Fi Aware). When the validity period expires, the temporary control right becomes invalid. If you want to continue to control the speaker, you can obtain the temporary control right again. Since the communication distance supported by ultra - short - distance communication technology is very short, the probability of information being stolen is relatively low. Therefore, the security of obtaining the temporary control right based on ultra - short - distance communication technology is relatively high. Of course, the temporary control right can also be obtained through short - distance communication technology, which is not limited in the embodiments of this application. This article mainly takes the use of ultra - short - distance communication technology to obtain the temporary control right as an example, and the specific implementation process will be introduced later.

[0232] (4) owner

[0233] The first device can control the second device through the cloud. Before that, the first device needs to register in the cloud as the owner of the second device. In other words, the cloud will record that the owner of the second device is the first device. In this way, the first device can control the second device through the cloud. Compared with the temporary control right, this control method is relatively long - lasting. Unless the first terminal cancels being the owner of the second terminal, when the cloud records that the first device is no longer the owner of the second device, the first device can no longer control the second device through the cloud. For the sake of convenient description, this control method through the cloud is called permanent control right or long - term control right, etc. However, it should be noted that the meaning of "permanent" or "long - term" does not mean "from beginning to end" or "forever", etc., but means that during the period when the cloud records that the second device is the first device's owner, the second device can control the first device through the cloud.

[0234] Among them, the process of the second device registering as the owner of the first device in the cloud will be introduced in Embodiment 1 later.

[0235] (4) In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, or c can represent: a, b, c, a and b, a and c, b and c, or a, b, and c, where a, b, and c can be single or multiple.

[0236] Moreover, unless otherwise stated, the ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the size, content, order, time sequence, priority, or importance of multiple objects, etc. For example, the first device, the second device, and the third device are only used to distinguish different devices, rather than indicating differences in the priority or importance of these devices, etc.

[0237] The method for obtaining device control rights provided by the embodiments of the present application can be applied to an electronic device. The following introduces the electronic device, the graphical user interface (GUI) for such an electronic device, and the embodiments for using such an electronic device. In some embodiments of the present application, the electronic device can be a portable electronic device, such as a mobile phone, a PAD, a portable computer, a wearable device with wireless communication function (such as a smart watch, smart glasses, smart bracelet, or smart helmet, etc.), or a vehicle-mounted device, etc. Exemplary embodiments of the portable electronic device include, but are not limited to, portable electronic devices equipped with or other operating systems. It should also be understood that in some other embodiments of the present application, the above-mentioned electronic device may not be a portable device. For example, it may also be a desktop computer, such as a PC, or it may also be a device such as a television.

[0238] Exemplarily, Figure 1A a structural schematic diagram of an electronic device 100 is given.

[0239] It should be understood that the illustrated electronic device 100 is only an example, and the electronic device 100 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0240] As Figure 1A , the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0241] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors. Among them, the controller may be the nerve center and command center of the electronic device. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions. A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may store the instructions or data just used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0242] The USB interface 130 is an interface compliant with the USB standard specification, which can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device, and can also be used to transfer data between the electronic device and peripheral devices. The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives inputs from the battery 142 and / or the charging management module 140 to supply power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, the wireless communication module 160, etc.

[0243] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic 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: Antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0244] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc. applied to the electronic device. The mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from antenna 1, filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 can be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 can be provided in the same device.

[0245] The wireless communication module 160 may provide solutions for wireless communications applied to an electronic device, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSSs), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0246] In some embodiments, antenna 1 of the electronic device is coupled to the mobile communication module 150, and antenna 2 is coupled to the wireless communication module 160, enabling the electronic device to communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may 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).

[0247] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 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 flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device may include one or N display screens 194, where N is a positive integer greater than 1.

[0248] The camera 193 is used to capture still images or videos. The camera 193 may include a front camera and a rear camera.

[0249] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store the operating system and software codes of at least one application program (such as the iQIYI application, the WeChat application, etc.). The data storage area can store the data generated during the use of the electronic device (such as images, videos, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0250] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device. The external memory card communicates with the processor 110 through the external memory interface 120 to achieve the data storage function. For example, save files such as pictures and videos in the external memory card.

[0251] The electronic device can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor, etc. Such as music playback, recording, etc.

[0252] The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The gyroscope sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B.

[0253] The gyroscope sensor 180B can be used for anti-shake during shooting. The barometric pressure sensor 180C is used to measure the barometric pressure. In some embodiments, the electronic device calculates the altitude based on the barometric pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation. The magnetic sensor 180D includes a Hall sensor. The electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device is a flip phone, the electronic device can detect the opening and closing of the flip based on the magnetic sensor 180D. Furthermore, according to the detected opening and closing state of the leather case or the flip, features such as automatic unlocking of the flip can be set. The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device in various directions (generally three axes). When the electronic device is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0254] The distance sensor 180F is used to measure distance. The electronic device can measure the distance through infrared or laser. In some embodiments, in the shooting scene, the electronic device can use the distance sensor 180F to measure the distance to achieve rapid focusing. The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode can be an infrared light-emitting diode. The electronic device emits infrared light outward through the light-emitting diode. The electronic device uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device. The electronic device can use the proximity light sensor 180G to detect when the user holds the electronic device close to the ear for a call, so as to automatically turn off the screen to achieve the purpose of power saving. The proximity light sensor 180G can also be used for automatic unlocking and locking of the leather case mode and pocket mode.

[0255] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness. The ambient light sensor 180L can also be used to automatically adjust the white balance during photography. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device is in the pocket to prevent accidental touch. The fingerprint sensor 180H is used to collect fingerprints. The electronic device can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application locks, fingerprint photography, fingerprint answering of incoming calls, etc.

[0256] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device utilizes the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device reduces the performance of the processor near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery 142 to avoid abnormal shutdown of the electronic device caused by low temperature. In some other embodiments, when the temperature is lower than yet another threshold, the electronic device boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0257] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also known as the "touch display screen". The touch sensor 180K is used to detect touch operations acting on it or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In some other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device, at a different position from that of the display screen 194.

[0258] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signals of the vibrating bone mass of the human vocal part. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulsation signals.

[0259] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys. They can also be touch keys. The electronic device can receive key inputs and generate key signal inputs related to the user settings and function controls of the electronic device. The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playing, etc.) can correspond to different vibration feedback effects. The indicator 192 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be in contact with and separated from the electronic device by being inserted into or removed from the SIM card interface 195.

[0260] It can be understood that Figure 1A the components shown do not specifically limit the mobile phone. The mobile phone in the embodiments of the present invention can include more or fewer components than Figure 1A those shown. In addition,Figure 1A The combination / connection relationship between components in

[0261] Figure 1B is the software structure block diagram of the electronic device 100 according to an embodiment of the present application.

[0262] As Figure 1B shown, the software structure of the electronic device 100 may be a layered architecture. For example, the software may be divided into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely the application layer, the application framework layer (framework, FWK), the Android runtime, and the system library, and the kernel layer.

[0263] The application layer may include a series of application packages. As Figure 1B shown, the application layer may include a camera, settings, a skin module, a user interface (UI), third-party applications, etc. Among them, the third-party applications may include WeChat, QQ, a gallery, a calendar, a call, a map, a navigation, WLAN, Bluetooth, music, video, short messages, etc.

[0264] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer may include some predefined functions. As Figure 1B shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, etc.

[0265] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The content provider is used to store and obtain data, and make this data accessible to applications. The data may include videos, images, audio, dialed and received calls, browsing history and bookmarks, a phone book, etc.

[0266] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a short message notification icon may include a view for displaying text and a view for displaying pictures.

[0267] The phone manager is used to provide the communication function of the electronic device. For example, the management of call states (including connection, hanging up, etc.).

[0268] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, and so on.

[0269] The notification manager enables applications to display notification messages in the status bar. It can be used to convey informative messages that can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform that a download is complete, a message reminder, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as the notification of a background-running application, or a notification that appears in the form of a dialog window on the screen. For example, it can prompt text messages in the status bar, emit a prompt sound, vibrate the electronic device, blink the indicator light, etc.

[0270] The Android runtime includes the core libraries and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0271] The core libraries consist of two parts: one part is the functional functions that need to be called by the Java language, and the other part is the core libraries of Android. The application layer and the application framework layer run in the virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0272] The system libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (such as OpenGL ES), 2D graphics engines (such as SGL), etc.

[0273] The surface manager is used to manage the display subsystem and provides the fusion of 2D and 3D layers for multiple applications.

[0274] The media libraries support the playback and recording of various common audio and video formats, as well as static image files, etc. The media libraries can support multiple audio and video coding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0275] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing, etc.

[0276] The 2D graphics engine is the drawing engine for 2D drawing.

[0277] In addition, the system library may further include a backup judgment module for judging whether a file exists in the backup list. For example, when the file exists in the backup list, the backup judgment module determines that the file does not need to be backed up; for another example, when the file does not exist in the backup list, the backup judgment module determines that the file needs to be backed up.

[0278] The kernel layer is the layer between the hardware and the software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver.

[0279] The hardware layer may include various sensors, such as the acceleration sensor, gyroscope sensor, touch sensor, etc. involved in the embodiments of the present application.

[0280] Taking the second device obtaining the control right of the first device as an example, some working processes of the software and hardware of the electronic device 100 will be exemplarily described below.

[0281] For example, the touch sensor 180K on the first device receives a touch operation from the user, and the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including information such as touch coordinates and the timestamp of the touch operation). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation and the control corresponding to the click operation being a wifi icon as an example, the wifi module calls the interface of the application framework layer to start the wifi, for example, start the wifi Aware function. Similarly, the user can start the wifi Aware function on the second device, then the second device can discover the first device through wifi Aware, and the first device can also discover the second device through the second device. When the first device discovers the second device, it sends a key to the second device through the wifi Aware technology. After receiving the key, the second device obtains the temporary control right of the first device. For example, the second device sends a control instruction encrypted by the key to the first device. When the first device receives the encrypted control instruction, it uses the corresponding key for decryption to obtain the specific content of the control instruction and then executes it, thus realizing the temporary control of the first device by the second device.

[0282] It should be noted that the above takes the communication between the first device and the second device through wifi Aware as an example. It can be understood that other ultra-short range communication technologies are also feasible, and the embodiments of the present application do not make any limitations.

[0283] The present application can be applied to a system including multiple devices. For example, please refer to Figure 2 , which is a schematic diagram of a system provided by the present application. As Figure 2As shown in the figure, the system includes a first device, a second device, and a third device. Among them, the first device is the controlled device. The second device or the third device can be the owner of the first device. Taking the second device as the owner of the first device as an example, if the third device also wants to control the first device, it can obtain the control right of the first device.

[0284] One way is as follows: The user inputs the third user account of the third device on the owner of the first device (i.e., the second device). The second device sends a sharing application to the cloud, which is used to request the cloud to change the owner of the first device to the third device. After receiving the sharing application, the cloud can record that the owner of the first device is changed to the third device. Then, the third device can remotely control the first device through the cloud, that is, obtain the permanent control right of the first device.

[0285] Another way is as follows: The user uses the owner of the first device (i.e., the second device) to scan the QR code set on the third device to obtain the third user account of the third device, and then uses the previous method to obtain the permanent control right of the first device.

[0286] There is also another way: The user discovers multiple devices to be shared on the owner of the first device (i.e., the second device). The user selects one of the devices to be shared, which is the third device. Then the second device sends an application for creating a share to the cloud, and the cloud returns a shareCode. The owner sends the shareCode to the third device (such as by sending through an instant messaging application). The third device sends a confirmation instruction to the cloud, and the confirmation instruction includes the shareCode. After receiving the confirmation instruction, the cloud changes the owner of the first device from the second device to the third device according to the shareCode in the confirmation instruction.

[0287] It should be noted that the above three methods are all that the owner of the first device actively shares the permanent control right of the first device to the third device. In the case where multiple devices all expect to obtain the permanent control right of the first device, if the owner-active sharing method is used for each device, the operation is cumbersome and the pressure on the owner is great.

[0288] In view of this, the embodiment of the present application provides a method for obtaining the control right of a device. In this method, the third device can obtain the temporary control right of the first device through ultra-short-range communication technology (or short-range communication technology), without the active sharing of the owner of the first device, the operation is simple, and the pressure on the owner of the first device is small.

[0289] Among them, the first device can be, for example, various types of household electrical appliances at home, various office equipment in the office, and so on. Household electrical appliances include, for example, televisions, speakers, game consoles, lighting equipment (such as table lamps, chandeliers in the bedroom or living room, etc.), equipment related to cooking (abbreviated as cooking equipment, such as smart rice cookers, range hoods, water heaters, refrigerators, etc.), cleaning equipment (such as floor cleaning robots, washing machines, clothes drying equipment, etc.). Office equipment includes, for example, printers, copier, projectors, PCs, water dispensers, coffee machines, and so on.

[0290] The second device or the third device can be a mobile phone, a tablet computer, or wearable devices such as glasses, watches or bracelets, or a remote control, a stylus, etc., and the specific type is not limited. The third device and the second device can be the same. For example, both the third device and the second device are mobile phones, or both are tablet computers, or both are bracelets, etc. Or, the third device and the second device can also be different. For example, one of the third device and the second device is a mobile phone, and the other is a tablet computer; or, one is a mobile phone and the other is a bracelet. The specific combination form is not limited.

[0291] The method for obtaining device control rights provided by the embodiments of the present application can be applied to a variety of scenarios, such as the following scenarios:

[0292] Scenario 1, home scenario

[0293] Figure 3 FIG. is an exemplary schematic diagram of the home scenario provided by the embodiments of the present application. As Figure 3 shown, there are a television, a speaker, a table lamp, a projector, etc. set in the home. Of course, it also includes a refrigerator, an air conditioner, curtains, etc. (not shown in the figure). Moreover, there are family member A and family member B in the family. Taking the speaker as an example, mobile phone A of family member A or mobile phone B of family member B can obtain the temporary control right of the speaker through ultra-short range communication technology. For example, the WIFI Aware function is turned on on mobile phone A of family member A (the introduction of WIFI Aware can be seen in the previous glossary section), and the WIFI Aware function is also turned on on the speaker. The speaker can discover mobile phone A. For example, when the speaker determines that the distance between mobile phone A and the speaker is less than the threshold, it sends a key to mobile phone A. Mobile phone A encrypts the control instruction based on the key. The control instruction is used to control the speaker. Mobile phone A sends the encrypted control instruction to the speaker, and the speaker decrypts it using the corresponding key, obtains the specific content of the control instruction and executes it. In this way, the control of the speaker is realized (for example, the playback and pause of music can be controlled). If family member B wants to control the speaker, he can also obtain the temporary control right of the speaker in the same way and then control the speaker.

[0294] Optionally, the speaker may have been configured with an owner. In this case, whether to allow others to obtain temporary control of the speaker may depend on the will of the owner. For example, if the owner is willing for others to obtain temporary control of the speaker, the speaker can be set to an open mode in advance. In the open mode, other devices can obtain temporary control of the speaker. Of course, if the owner does not want others to obtain temporary control of the speaker, the open mode of the speaker can be turned off.

[0295] Optionally, in order to prevent anyone (such as a non-family member) from obtaining temporary control of the speaker, the consent of the owner is also obtained before obtaining temporary control of the speaker. With the consent of the owner, temporary control of the speaker can be obtained.

[0296] Optionally, the temporary control of the speaker has a valid duration. It can be understood that the temporary control is valid within a certain duration and becomes invalid after exceeding this duration. In this way, unrestricted control of the speaker can be avoided. For example, family member B is a middle school student. To prevent him from using the speaker unrestrictedly and affecting his studies, his temporary control of the speaker is only valid for one hour or half an hour, etc. Of course, family member B can also obtain permanent control of the speaker, that is, become the owner of the speaker. This application does not limit this. Similarly, if family member C is also included in the family, family member C can also obtain temporary or permanent control of the speaker.

[0297] Scenario 2, Office scenario

[0298] For example, a printer is set up in the office. When an office employee needs to print a document, they can obtain temporary control of the printer to print. For example, when employee A holds mobile phone A close to the printer, and the printer detects the approach of mobile phone A (such as the distance is less than the threshold), the printer sends a key to mobile phone A. Mobile phone A encrypts the control instruction with this key. The control instruction is used to control the printer. Mobile phone A sends the encrypted control instruction to the printer, and the printer decrypts it with the corresponding key, obtains the control instruction and executes it.

[0299] Optionally, the printer may be configured with an owner (such as the office administrator). When the owner turns on the open mode of the printer, others can obtain temporary control of the printer. Otherwise, others cannot obtain temporary control of the printer.

[0300] Optionally, to prevent anyone (e.g., non-office employees) from obtaining temporary control of the printer, consent from the owner can be obtained before obtaining temporary control of the printer. With the owner's consent, temporary control of the printer can be obtained. Optionally, the temporary control of the printer has a valid duration, that is, the temporary control is valid within a certain duration and becomes invalid after exceeding this duration. In this way, employees can be prevented from using the printer without limit.

[0301] Scenario Three, the store scenario

[0302] For example, taking a store selling home appliances as an example, to attract consumers to purchase, the store can display multiple home appliances. Consumers' mobile phones can obtain temporary control of a certain home appliance to experience its performance. For example, consumer A holds mobile phone A and approaches a certain home appliance in the store. When the home appliance detects the approach of mobile phone A (e.g., the distance is less than the threshold), it sends a key to mobile phone A. Mobile phone A uses this key to encrypt the control instruction, and the control instruction is used to control the home appliance. Mobile phone A sends the encrypted control instruction to the home appliance, and the home appliance uses the corresponding key to decrypt it, obtains the control instruction and executes it.

[0303] Optionally, when the home appliance is configured with an owner (such as a store employee), the owner can pre-set the home appliance to be in an open mode. In the open mode, consumers can obtain temporary control of the home appliance.

[0304] Optionally, to manage the temporary control of the home appliance, before obtaining temporary control of the home appliance, the consumer also needs to obtain the owner's consent. With the owner's consent, temporary control of the home appliance can be obtained. Optionally, the temporary control of the home appliance can have a valid duration, that is, the temporary control is valid within a certain duration and becomes invalid after exceeding this duration. In this way, consumers can be prevented from controlling the home appliances in the store without limit.

[0305] Several exemplary application scenarios provided by the embodiments of the present application are introduced above. Of course, in addition to the above scenarios, the embodiments of the present application can also be applied to other scenarios, which are not listed one by one in this application.

[0306] The following takes Figure 3 the application scenario shown as an example to specifically elaborate on the method for obtaining device control rights provided by the embodiments of the present application. Among them, the speaker is used as the first device, the mobile phone A of family member A is used as the second device, and the mobile phone B of family member B is used as the third device.

[0307] First, the process of the second device becoming the owner of the first device is introduced below, and then the process of the third device obtaining temporary control of the first device is introduced. Specifically, it includes the following Embodiment 1 to Embodiment 4.

[0308] Embodiment 1

[0309] This Embodiment 1 introduces the process of the second device becoming the owner of the first device, that is, the process of obtaining permanent control of the first device. This Embodiment 1 involves Figures 4A to 4D .

[0310] Figure 4A It is a schematic flow diagram of the second device obtaining permanent control of the first device provided by the embodiments of this application. As Figure 4A shown, this process includes:

[0311] S400, the first device is powered on. For example, it is powered on and used for the first time after leaving the factory

[0312] S401, the second device discovers the first device and shakes hands with the first device.

[0313] There are various ways for the second device to discover the first device. For example, the user turns on the wifi Aware function on the second device and turns on the wifi Aware function on the first device. The second device and the first device can discover each other through the wifi Aware function. Taking the second device as a mobile phone as an example, for example, the user can perform a downward sliding operation on the status bar at the top of the mobile phone screen to display the notification panel on the mobile phone screen. The user clicks the wifi icon on this notification panel to turn on the wifi Aware function. Taking the first device as a speaker as an example, after the speaker is powered on, it can automatically turn on the wifi Aware function, or there is a button set on the speaker, and the user controls the audio to turn on the wifi Aware function through this button. When the first device turns on the wifi Aware function, it broadcasts a signal. When the second device detects the signal broadcast by the first device, it discovers the first device. The signal broadcast by the first device includes, for example, the name, manufacturer, type, or device number of the first device. Of course, in addition to wifi Aware, the second device can also use other methods to discover the first device, such as Bluetooth.

[0314] Or, the user can also hold the second device and touch the first device. For example, use the NFC area on the second device to touch the NFC area on the first device to achieve the second device discovering the first device.

[0315] Alternatively, a first application is installed on the first device, and a second application is installed on the second device. The first application and the second application can be the same or different applications. The user can open the first application on the first device and also open the second application on the second device. The first application on the first device can provide a QR code, and the user scans the QR code through the second application on the second device, thereby realizing the process of the second device discovering the first device.

[0316] Alternatively, the second device can also discover the first device by scanning the product QR code pasted on the shell of the first device.

[0317] It should be noted that the above several methods are examples of the methods for the second device to discover the first device. In addition to the above methods, the second device can also use other methods to discover the first device, and the specific methods are not limited.

[0318] After the second device discovers the first device, it can shake hands with the first device. For example, the second device sends an instruction of "hello" to the first device. After receiving "hello", the first device sends a feedback instruction of "hi" to the second device.

[0319] Optionally, the above S401 may not be executed (so it is represented by a dotted line in the figure), that is, the second device can directly execute S402, that is, the second device does not need to discover the first device and shake hands with the first device, and can directly apply to the cloud for a registration code (i.e., S402), and then send the registration code to the first device (i.e., S404).

[0320] S402, the second device sends a request for obtaining a registration code to the cloud.

[0321] The cloud can be various types of servers. For example, it can be a single server, or a collection of multiple servers; or it can also be a single chip or a collection of multiple chips in a server; or a collection of multiple chips in multiple servers.

[0322] S403, the cloud sends a registration code to the second device.

[0323] It can be understood that before S403, there may also be steps: the cloud generates a registration code. The purpose of the second device requesting the registration code of the first device from the cloud is to request the cloud to record the association relationship between the second device and the registration code. For example, the association relationship can be the mapping relationship in Table 1 below:

[0324] Table 1

[0325] Registration code Device requesting the registration code AAAAAA Second device (e.g., Huawei P40)

[0326] Optionally, before S403, the second device has logged in to the cloud. For example, taking the Huawei SmartLife app on the second device as an example, after the second device opens the Huawei SmartLife app, it logs in to the second user account, and the Huawei SmartLife app logs in to the cloud based on the second user account. Therefore, the second user account is recognized as a device on the cloud side. Here, the second user account can be, for example, a Huawei system account, an email account, a mobile phone number, or an IMEI code, etc. Taking the Huawei system account as an example, optionally, considering that a Huawei system account can be logged in on multiple devices, the cloud side can identify it based on the combination of the Huawei system account + device identifier. For example, the Huawei system account A + mobile phone identifier is recognized as one device, and the Huawei system account A + tablet is recognized as another device. For the convenience of description, taking the example that a Huawei system account is only logged in on one device, then, the column where the device requesting the registration code is located in Table 1 above can be the Huawei system account logged in by the Huawei SmartLife app on the second device. For example, taking the Huawei system account as the mobile phone number 156 8090XXXX, then Table 1 above can be refined into Table 2 below:

[0327] Table 2

[0328] Registration code Device requesting the registration code AAAAAA 156 8090XXXX

[0329] In some embodiments, S402 and S403 may not be executed. For example, the second device does not need to request a registration code from the cloud. The second device can generate a registration code, or the registration code is pre-configured, or the user sets the registration code. The second device can send the registration code to the first device and the cloud respectively. After the first device sends an activation instruction containing the registration code to the cloud, the cloud compares the registration code from the second device and the registration code from the first device. If they are the same, it can record that the second device is the owner of the first device.

[0330] S404, the second device sends an activation instruction to the first device, and the activation instruction is used to instruct the first device to activate. The activation instruction may include the registration code (e.g., AAAAAA in the table above).

[0331] Optionally, before the second device activates the first device, it can also determine whether an operation for activating the first device triggered by the user is detected. If an operation for activating the first device is detected, in response to this operation, the second device sends an activation instruction to the first device. As an example, please refer to Figure 4B (a), which is a schematic diagram of the desktop of the second device. The desktop includes icons of various applications, including the icon of the SmartLife application. In response to an operation on this icon, the second device displays as Figure 4B(b) The interface shown, which includes a "+" button. In response to an operation on the "+" button, the second device displays as shown in Figure 4B (c). In this interface, it is prompted that the second device is discovering devices. When a device is discovered, it displays as shown in Figure 4B (d). In this interface, it includes the identifier of the discovered first device (such as a speaker). The identifier can be one or more of the device name, model, or icon. Since the first device has not been registered to the cloud after being powered on for the first time out of the factory, so in response to an operation on Figure 4B the icon of the first device (such as a speaker) in the interface shown in (d), it displays as shown in Figure 4C (a). In this interface, it includes an "Activate" button. The "Activate" button is used to activate the first device. So the above operation for activating the first device can be a click operation on Figure 4C the activate button in the interface of (a). Of course, it can also be other operations, such as a voice command for activating the first device, etc., which are not specifically limited.

[0332] S405, the second device receives the activation feedback from the first device.

[0333] For example, the activation feedback can be activation success, activation failure, activating, etc. Among them, S405 can be executed or not. Exemplarily, referring to Figure 4C (a) and Figure 4C (b), in response to the operation of clicking the "Activate" button, a prompt message "Activating the speaker" is displayed on the second device. Here, the speaker is the first device.

[0334] S406, the first device sends a key negotiation request to the cloud for requesting to negotiate a key with the cloud.

[0335] In S404, the second device sent the registration code to the first device. So the key negotiation request sent by the first device to the cloud can include the registration code. Since the cloud has recorded that the device applying for the registration code to the cloud is the second device (as shown in Table 1 or Table 2 above), so when the cloud receives the key negotiation request sent by the first device, based on the registration code therein, it can establish an association relationship between the second device and the first device. For example, S413 (which will be introduced later) can be immediately executed right after S406. However, since the first device has not successfully logged in to the cloud, the cloud can temporarily not establish the association relationship between the second device and the first device. When the first device successfully logs in to the cloud, then establish the association relationship between the second device and the first device, that is, S413. Among them, the process of the first device logging in to the cloud includes the following steps S407 to S411.

[0336] S407, the first device and the cloud each calculate a key.

[0337] Optionally, since it is a long connection between the first device and the cloud, it is necessary to avoid, as much as possible, one party directly sending the calculated key to the other party, resulting in leakage during the key transmission process. Therefore, the first device and the cloud can calculate the key respectively. For example, the first device and the cloud use the same key encryption algorithm to calculate the encryption key and the same key decryption algorithm for decryption. For example, the key negotiation request in S406 includes the key encryption algorithm and the key decryption algorithm used by the first device, and the cloud can use the same algorithms, that is, the first device and the cloud have agreed on the key encryption algorithm and the key decryption algorithm, and the key is not directly transmitted.

[0338] Optionally, S406 and S407 may not be executed. For example, the key is pre-configured in the first device and there is no need to calculate the key; or, the user of the first device can set the key by himself. Or, subsequent steps such as S408 etc. may also not use key encryption.

[0339] S408. The first device sends an activation instruction to the cloud, and this activation instruction is used to indicate to activate the first device in the cloud.

[0340] For example, the activation instruction may be encrypted using the key calculated by the first device. The cloud decrypts the encrypted activation instruction through the agreed key decryption algorithm. If the decryption is successful, the first device is activated.

[0341] S409. The first device receives the activation feedback sent by the cloud.

[0342] The activation feedback may include activation success or activation failure. Optionally, S409 may or may not be executed.

[0343] S410. The first device logs in to the cloud.

[0344] For example, the user enters the first user account and password on the first device and logs in to the cloud through the first user account and password. The first user account and the second user account of the second device mentioned above may be the same or different. For example, they are both the same Huawei system account. Or, the user can also enter the first user account and password of the first device on the second device, and then the second device sends the first user account and password to the first device, and the first device sends the first user account and password to the cloud.

[0345] S411. The first device receives the login feedback sent by the cloud.

[0346] After the cloud verifies the first user account and password, if the verification passes, it can send a login feedback to the first device, such as login success. Of course, if the verification fails, it can also send a login failure feedback to the first device.

[0347] So far, the first device has successfully logged in to the cloud. To enhance security, the cloud can assign a virtual ID to the first device, such as a string of randomly generated characters, numbers, etc. as the virtual ID that uniquely identifies the first device. In this way, the communication between the first device and the cloud can be carried out without carrying the first user account of the first device. Since the first user account may be the user's mobile phone number, and the communication between the first device and the cloud is a long connection, it is more likely to be attacked and easily lead to the leakage of the mobile phone number. For security reasons, the first device can interact with the cloud based on the virtual ID assigned by the cloud to avoid directly exposing the first user account. Of course, the cloud can also assign a virtual ID for uniquely identifying the second device, with the same principle.

[0348] S412. The second device receives the notification of successful activation sent by the cloud.

[0349] As described above, the cloud has recorded the association relationship between the second device and the registration code (such as Table 1 or Table 2 above). After the first device is activated and logged in to the cloud based on the registration code, the cloud can send a notification of successful activation of the first device to the second device. Alternatively, after S411, the first device can send a notification of successful activation to the second device. Exemplarily, as shown in Figure 4C (c), a prompt message "Speaker activation successful" is displayed on the second device, where the speaker is the first device.

[0350] S410 to S412 may not be executed, that is, after the first device sends the activation instruction to the cloud, the cloud directly executes S413, that is, the process of registering the second device as the owner of the first device is completed.

[0351] S413. The cloud records the association relationship between the first device and the second device, that is, the owner of the first device is the second device.

[0352] Optionally, after the first device logs in to the cloud, the cloud identifies the first device by the first user account (or the assigned virtual ID) of the first device. Therefore, the association relationship between the first device and the second device is actually the association relationship between the first user account and the second user account. Taking the second user account as the mobile phone number and the first user account as the speaker identifier as an example, please refer to Table 3 below for an example of the association relationship between the first device and the second device.

[0353] Table 3

[0354] First device Second device (owner of the first device) Huawei Speaker AM08 156 8090XXXX

[0355] After the first device logs in to the cloud, it can maintain an online state in the cloud. For example, it includes the following steps S414 to S422.

[0356] S414, Synchronize the information of the first device to the cloud. The information includes, for example, the type, model, manufacturer, etc. of the first device.

[0357] S415, The first device receives the synchronization feedback sent by the cloud. S415 is an optional step and can be executed or not.

[0358] Optionally, the above step S414 is preferably executed so that the cloud can accurately identify the first device based on the synchronization information reported by the first device. Of course, S414 can also not be executed. For example, the activation instruction sent by the first device in S408 can carry the information of the first device, so S414 can be not executed.

[0359] S416, Report the initial data of the first device to the cloud. The initial data includes, for example, the operating status information of the device. The operating status information includes, for example, whether the device is in the on state or the off state. Taking the device as a table lamp as an example, the operating information can also include the current brightness information, etc. Or, the initial data also includes the parameters set by the user for the first device. Taking the first device as a speaker as an example, the initial data of the speaker can include, for example, the song information in the speaker, etc. Or, if the user sets a startup password for the first device, the initial data can also include the startup password.

[0360] S417, The cloud sends a feedback on the initial data report to the first device. S417 is an optional step and can be executed or not.

[0361] Optionally, the above step S416 is preferably executed so that the cloud can accurately determine the status of the first device based on the operating status information reported by the first device. Of course, S416 can also not be executed, and the embodiments of the present application do not make any limitations.

[0362] In the above embodiments, the process of the first device completing activation and login in the cloud is introduced. It can be understood that the first device needs to be in the logged-in state so that the cloud can send control instructions to the first device in real time. The process of the first device being in the logged-in state can refer to steps S418 to S422.

[0363] S418, The first device requests the cloud to refresh the token of the first device.

[0364] S419, The first device receives the token.

[0365] S420, The first device maintains an online state with the cloud based on the token.

[0366] After the first device successfully logs in at S410, the cloud can generate a token, store the token, and then return the token value to the first device. After receiving the token, the first device saves it. When the first device sends information to the cloud, it sends the token and the first user account to the cloud together. After receiving the information sent by the first device, the cloud reads the token and compares it with the saved token value. If the token comparison is successful, it means that the first user account is in the logged-in state; otherwise, it means that the logged-in state of the first user account has expired and needs to log in again. Generally, the validity period of the token is relatively short, such as 2 days, 1 day, 6 hours, or 3 hours, etc.

[0367] Optionally, S418 to S420 can be executed periodically. For example, it can be executed once every period of time, or once every time the first device logs in to the cloud. The update of the key helps prevent other devices from stealing the old key to log in to the cloud to replace the first device.

[0368] Or, S418 to S420 can be not executed. For example, in S411, the cloud carries the token in the login feedback, and then the first device can use the token to maintain the online state without requesting the cloud to refresh the token. Another example is that the token has been pre-determined between the first device and the cloud before leaving the factory, and there is no need for the cloud to feedback the token to the first device, etc.

[0369] S421, the first device reports the heartbeat signal to the cloud.

[0370] S422, the first device receives the heartbeat feedback sent by the cloud.

[0371] The first device can periodically send heartbeat signals to the cloud to maintain the online state in the cloud.

[0372] S421 to S422 are optional steps and can be executed or not.

[0373] When the cloud records that the owner of the first device is the second device, the second device can control the first device through the cloud. For example, it can be achieved through the following steps S423 to S425.

[0374] S423, set the control policy for the first device on the second device.

[0375] For example, please refer to 4D. The control policy setting interface is displayed on the second device, and the setting interface includes control conditions, such as 8:00 in the morning; it also includes control methods, such as turning on the speaker and playing the song "xxx".

[0376] Optionally, S423 may or may not be executed. For example, the control strategy is set by default before the second device leaves the factory and does not need to be set.

[0377] S424, the second device sends the control strategy for the first device to the cloud.

[0378] For example, the second device sends Figure 4D the control strategy (including control conditions and control methods) set in to the cloud.

[0379] S425, the cloud controls the first device based on the control strategy.

[0380] Continuing with the Figure 4D control strategy shown as an example, when the cloud determines that the current time is 8 am, it sends an instruction to the first device (such as a speaker) to control the first device to turn on and play the song "xxx".

[0381] That is to say, after the second device sets the control strategy for the first device, the first device is controlled by the cloud based on the control strategy. Therefore, when the second device is far away from the first device, for example, the second device is a mobile phone and the user carries the mobile phone in the office, and the first device is a speaker placed at the user's home, the first device can also be controlled through the cloud.

[0382] Generally speaking, the second device becomes the owner of the first device means that the cloud records that the owner of the first device is the second device. Therefore, the cloud controls the first device based on the control strategy set by the owner (i.e., the second device), which is the permanent control right.

[0383] Embodiment 2

[0384] This Embodiment 2 introduces the process of the third device obtaining the temporary control right of the first device. Different from the permanent control right, the temporary control right can be obtained based on ultra-short-range communication technology without going through the cloud, which belongs to the ultra-short-distance communication between the third device and the first device point to point.

[0385] A possible scenario of the second embodiment is that the owner of the first device is the second device. Optionally, the first device supports the open mode, and the owner can turn on or off the open mode of the first device. When the first device turns on the open mode, the ultra-short-range communication function is enabled, and the third device can obtain temporary control of the first device based on the ultra-short-range communication function. When the first device turns off the open mode, the third device cannot obtain temporary control of the first device. Of course, in addition to the above scenario, the second embodiment is also applicable to other scenarios. For example, the first device is not configured with an owner. In this case, the first device can also enter the open mode. For example, a button for turning on or off the development mode is set on the first device, and the open mode is turned on or off through this button so that other devices can obtain temporary control of the first device. The second embodiment is mainly introduced by taking the previous scenario as an example. Specifically, the second embodiment involves Figures 5A to 5D 。

[0386] Figure 5A is a schematic flow diagram for the third device provided in the second embodiment to obtain temporary control of the first device. Figure 5A The shown process is introduced by taking the case where the owner of the first device is the second device as an example. Therefore, Figure 5A "The second device is the owner of the first device" is marked in Figure 5A As shown, the process includes:

[0387] S501, the second device controls the first device to be in the open mode.

[0388] Method 1, the second device (i.e., the owner of the first device) can control the first device to be in the open mode through the cloud. For example, the second device sends a first instruction to the cloud, and this first instruction is used to instruct the cloud to send a second instruction to the first device for instructing the second device to enter the open mode. For example, an interface as shown in Figure 5B (a) is displayed on the second device, and the identifier of the speaker is displayed in this interface. When the second device detects an operation on the speaker identifier, an interface as shown in Figure 5B (b) is displayed, and this interface includes an option for the open mode and a button 501 for turning on or off the option. When the second device detects an activation operation on the button 501, it sends the first instruction to the cloud so that the cloud sends the second instruction to the first device.

[0389] In the second method, the first device can also automatically enter the open mode without being controlled by the second device. For example, the first device automatically enters the open mode after being powered on, or enters the open mode under user trigger. For example, a button for controlling the first device to enter the open mode is set on the first device, and the first device is controlled to enter the open mode through this button; or after the first device receives a voice command for instructing the first device to enter the open mode, it automatically enters the open mode. In this case, S501 may not be executed, so S501 is represented by a dashed line in the figure.

[0390] For example, when the owner of the first device is the second device, the above method 1 or method 2 can be used. When the first device has not been configured with an owner, method 2 can be used.

[0391] S502, the first device enters the open mode.

[0392] In the open mode, the first device can enable ultra-short range communication functions, such as wifi AWare function, NFC function, etc.

[0393] Optionally, neither S501 nor S502 may be executed. For example, when the open mode is not configured in the first device, after the first device is powered on (such as the first power-on after leaving the factory), it can automatically enter step S503 without manual setting by the user.

[0394] S503, the first device generates a key.

[0395] The key can have multiple types, such as symmetric key and asymmetric key.

[0396] I. Symmetric Cryptography key, also known as private key encryption, that is, the sender and receiver of the information use the same key for encryption and decryption. In other words, the key used by the first device and the third device is the same.

[0397] II. Asymmetric Cryptography key refers to a combination of a public key and a private key. When the sender uses the public key to encrypt the message, the receiver can use the paired private key to decrypt it; or when the sender uses the private key to encrypt the message, the receiver can use the paired public key to decrypt it.

[0398] Optionally, S503 may not be executed, so it is represented by a dashed line in the figure. For example, the key is pre-configured by default when the first device leaves the factory, or it can also be set by the user and does not need to be generated by the first device.

[0399] Optionally, to ensure security, the key has a validity period. The key is effective within the validity period and becomes invalid after the validity period expires. Among them, there are various ways to set the validity period of the key. For example, the validity period of the key is determined according to the type of the first device. The method of determining the validity period of the key according to the type of the first device can be executed by the second device, or by the cloud, or also by the first device. Taking the execution by the second device as an example, for example, before the second device S501, the second device determines the type of the first device, determines the validity period of the key of the first device according to the type of the first device, and then sends the validity period to the first device. For example, the types include, for example, entertainment type, office type, cleaning type, optimizing sleep type, intelligent wake-up type, and so on. Among them, the entertainment type includes, for example, televisions, game consoles, etc., the office type includes, for example, printers, copiers, faxes, projectors, etc., the cleaning type includes, for example, floor-sweeping robots, air purifiers, etc., the optimizing sleep type includes, for example, table lamps, sockets, humidifiers, etc., and the intelligent wake-up type includes, for example, curtains, speakers, alarm clocks, etc. Exemplarily, the validity period of the key of the entertainment type device is less than the first threshold, and the validity period of the key of the office type device is less than the second threshold, and the first threshold is less than the second threshold to avoid unrestricted control of the entertainment type device. For another example, the validity period of the optimizing sleep type device is less than the third threshold, and the third threshold is greater than the first threshold. For example, the key of the table lamp is greater than the key of the television to avoid the user frequently obtaining the key of the table lamp to control the table lamp.

[0400] Alternatively, the validity period of the key of the first device can be set by default or set by the user. Taking the user setting as an example, the user can set the validity period of the key of the first device on the first device or the second device. If the user is on the second device, the second device sends the set validity period to the first device through the cloud.

[0401] S504, the first device queries the functions supported by the first device for temporary control rights.

[0402] For example, if the first device is a speaker, its capabilities not only include functions such as playing, pausing, stopping, and switching songs, but may also include deleting and downloading songs; it may also include naming the speaker, setting a power-on password (or voice wake-up command), etc. Generally speaking, functions such as deleting songs, naming the speaker, and setting the power-on password belong to user privacy, and these functions may not support temporary control rights. Therefore, the first device can query the cloud to find out which functions on the first device support temporary control rights and which do not. For example, the cloud stores profile files corresponding to various types of devices, and this profile file is used to describe the functions that support temporary control rights in the corresponding type of device. For example, the first device sends a query instruction to the cloud, and this query instruction includes the device type of the first device (for example, Huawei Speaker MI08). After receiving the query instruction, the cloud determines the profile file corresponding to the device type based on the device type of the first device, and then sends this profile file to the first device. The first device can determine which functions support temporary control rights based on the profile file.

[0403] For example, continuing with the example where the first device is a speaker, based on the profile file corresponding to the speaker, it is determined that the functions of deleting songs, naming, and setting the power-on password in the speaker do not support temporary control rights. Then, when the third device obtains temporary control rights over the speaker, the third device cannot delete the songs in the speaker or set the power-on password of the speaker.

[0404] It should be noted that the first device can query the functions that support temporary control rights in the first device in the cloud, or query other devices. For example, please refer to Figure 5C As shown, the cloud is connected to the resource server, and the resource server stores profile files corresponding to various types of devices. The first device can directly query the profile file corresponding to the device type of the first device from the resource server; or, the first device still sends a query request to the cloud, and the cloud then queries the resource server and sends the result queried from the resource server to the first device.

[0405] Optionally, S504 may or may not be executed. For example, the situations where S504 is not executed include: the first device locally stores the profile file, and based on the locally stored profile file, it can be determined which functions support temporary control rights, without querying the cloud. Or, the functions that support temporary control rights on the first device are set when the first device leaves the factory, or the user specifies which functions support temporary control rights, without judging based on the profile file; or, by default, all functions of the first device support temporary control rights, without querying.

[0406] S505, the first device detects that the third device approaches the first device.

[0407] For example, the third device approaching the first device can be that the NFC area on the third device approaches the NFC area on the first device; when the first device detects the NFC signal from the third device, it determines that the third device is approaching. For example, please refer to Figure 5D (a). The third device is, for example, a mobile phone, and the user uses the mobile phone to approach the first device (such as a speaker). Or, the third device turns on wifi AWare, and the first device turns on wifi AWare. When the first device detects the wifi Aware signal of the third device, it determines that the third device is approaching. Of course, in addition to wifi Aware and NFC, Bluetooth technology can also be used, which is not limited in the embodiments of the present application.

[0408] S506, the first device sends a key to the third device.

[0409] Optionally, when the first device detects that the third device is approaching, it can automatically send a key to the third device. Or, when the third device approaches the first device, a prompt message can pop up on the third device, and this prompt message is used to prompt the user whether to apply for the control right of the first device. For example, please refer to Figure 5D (b). The identification of the first device (such as a speaker) and the button of "Apply for Permission" are displayed on the third device. If it detects the click operation of the user on the "Apply for Permission" button, it sends an application to the first device. After receiving the application, the first device sends a key to the third device. Of course, in order to facilitate the user to distinguish whether the applied control right is temporary or permanent, Figure 5D the "Apply for Permission" button in (b) can be replaced with a "Apply for Temporary Control Right" button.

[0410] Alternatively, before sending the key to the third device, the first device may also determine the distance between the third device and the first device. If the distance is less than a preset distance, the key is sent to the third device. There are various ways to determine the distance between the third device and the first device. For example, laser ranging. Or, taking the case where Wi-Fi Aware is turned on on the third device and Wi-Fi Aware is turned on on the first device as an example, when the first device detects that the signal strength of the Wi-Fi Aware of the third device is greater than a preset value, it is determined that the distance between the third device and the first device is less than the preset distance. When the first device determines that the distance between the third device and the first device is less than the preset distance, the key is sent to the third device. Exemplarily, the preset distance may be any value within the range of 0 cm to 30 cm, such as 1 cm, 2 cm, 3 cm, 4 cm, 5 cm, etc. If the preset distance is set relatively small, it can avoid accidental connections. For example, it can prevent the third device from accidentally obtaining the key of the first device when the user passes by the first device with the third device.

[0411] Alternatively, before sending the key to the third device, the first device may also determine whether the signal strength of the third device is greater than a threshold. The threshold may be any value within the range of -5 dbm to -150 dbm. For example, -10 dbm, -15 dbm, -20 dbm, -25 dbm, -30 dbm, -35 dbm, -40 dbm, -45 dbm, -50 dbm, -60 dbm, -70 dbm, etc. For example, taking the case where Wi-Fi Aware is turned on on the third device and Wi-Fi Aware is turned on on the first device as an example, when the first device detects that the signal strength of the Wi-Fi Aware of the third device is greater than a preset value, the key is sent to the third device.

[0412] If the first device uses a symmetric key, the first device sends the symmetric key to the third device to ensure the key consistency between the third device and the first device. If the first device uses an asymmetric key (i.e., including a public key and a private key), the first device may use the public key and send the private key corresponding to the public key to the third device; or, the first device uses the private key and sends the public key corresponding to the private key to the third device. Since the communication distance between the third device and the first device is short, the possibility of the key being intercepted is low and the security is high.

[0413] Optionally, the order between S502 to S506 is not limited. For example, S503 may be executed immediately after S505, that is, a key is generated when the first device detects the approach of the third device. Or, S504 may also be executed before S502, that is, the first device queries the function that supports temporary control rights in advance.

[0414] Optionally, the key can be sent in plaintext. Since the first device uses ultra-short range communication technology to send the key, the communication distance is short, the probability of the key being intercepted is low, and the security is high. Of course, for even higher security, the key can also be sent in ciphertext, that is, the key is encrypted and then the encrypted key is sent. This application does not make any restrictions on this. It can be understood that if the key is sent encrypted, the decryption method can be pre-set. For example, the decryption method is pre-configured in the third device. Then when the third device receives the encrypted key, it can use the pre-configured decryption method to decrypt and obtain the key.

[0415] S507. The third device queries the capabilities of the first device that support temporary control rights.

[0416] Step S507 is an optional step and can be executed or not. For example, the situations where S507 is not executed can include: by default, all functions of the first device support temporary control rights, or, in S506, the first device sends the profil file and the key to the third device together, and the third device does not need to obtain the profil file corresponding to the first device from the cloud.

[0417] S508. The third device sends a control instruction to the first device, and the control instruction is encrypted based on the key sent by the first device.

[0418] Taking the first device as a speaker as an example, the control instructions can be: "Power on", "Power off", "Switch to the next song", "Play song XXX", and so on.

[0419] S509. The first device decrypts to obtain the control instruction and executes it.

[0420] If the key sent by the first device is a symmetric key, then the third device uses this key to encrypt the control instruction. When the first device receives the encrypted control instruction, it uses the same key pair for decryption. If the key sent by the first device is the public key in the asymmetric key, that is, the third device uses this public key to encrypt the control instruction. When the first device receives the encrypted control instruction, it uses the private key corresponding to the public key for decryption. If the key sent by the first device is the private key in the asymmetric key, that is, the third device uses this private key to encrypt the control instruction. When the first device receives the encrypted control instruction, it uses the public key corresponding to the private key for decryption.

[0421] From the above S505, S506, S508, and S509, it can be seen that the control of the first device by the third device is based on ultra-short range communication technology. Therefore, the owner of the first device recorded on the cloud side is still the second device (see Table 3 above).

[0422] Optionally, after the third device obtains the temporary control right of the first device, the first device can also send a prompt message to its owner (i.e., the second device). For example, the prompt message is: The third device has obtained the temporary control right of your Huawei Speaker MI08.

[0423] In this application, the temporary control right has a validity period, which takes effect within the validity period and becomes invalid after the validity period expires.

[0424] Exemplarily, the validity period of the temporary control right can be set by one or more of the following methods.

[0425] Method 1: The validity period of the temporary control right is related to the validity period of the key of the first device. When the key takes effect, the temporary control right takes effect; when the key becomes invalid, the temporary control right becomes invalid. For example, after the first device enters the open mode, it immediately generates a key and sends the key to the third device when it detects the third device approaching. Suppose the first device generates a key at time t1, detects the third device approaching at time t1 + 20 min and sends the key to the third device, and the validity period of the key is 60 min. Therefore, at time t1 + 60 min (i.e., 40 min later), the key automatically becomes invalid, and correspondingly, the temporary control right becomes invalid. In this case, the validity period of the temporary control right may be less than the validity period of the key. Or, the first device generates a key and sends the key to the third device when it detects the third device approaching, then the validity period of the key and the validity period of the temporary control right are almost the same. Among them, the setting method of the validity period of the key of the first device has been introduced before and will not be repeated here.

[0426] Of course, after the third device obtains the temporary control right of the first device, before the key of the first device is about to become invalid, the first device can also generate a new key and then send the new key to the third device so that the third device can temporarily control the first device based on the new key. This application embodiment does not limit this.

[0427] Method 2: The validity period of the temporary control right of the first device is determined according to the type of the first device. For example, when the third device approaches the first device, the first device can send the type of the first device to the third device, and the third device determines the validity period of the temporary control right of the first device according to the type of the first device. Or, continuing with Figure 5A as an example, before, after, or at the same time when the second device controls the first device to enter the open mode in S501, the second device can obtain the type of the first device, then determine the validity period of the temporary control right of the first device according to the type of the first device, and then send the determined validity period to the first device through the cloud. The introduction of the type of the first device has been introduced before and will not be repeated here.

[0428] Method 2 is different from Method 1. For example, if the temporary control right of the first device is determined to be 2 hours by Method 2, and the validity period of the key of the first device is 60 minutes, then when the first device updates the key within 2 hours, it is necessary to send the updated key to the third device so that the third device can control the first device based on the updated key until 2 hours are reached.

[0429] Method 3: The validity period of the temporary control right of the first device is set by the user. Method 3 can be set on the third device, on the second device, or also on the first device. Taking the setting on the second device as an example, please refer to Figure 5B (b). The second device displays the setting option for the valid duration of the temporary control right of the first device (such as a speaker). The user can set the validity period of the temporary control right of the first device through this setting option, and the second device sends the set validity period to the first device through the cloud. The implementation principle of setting the validity period of the temporary control right of the first device on the third device is the same as that on the second device, so it will not be repeated here. If it is set on the first device, for example, the first device includes a button for setting the validity period of the temporary control right of the first device, and the user sets the validity period of the temporary control right of the first device according to this button.

[0430] Method 4: The temporary control right of the first device is set by default when the first device leaves the factory.

[0431] Method 5: The user can manually stop the temporary control right of the first device. Method 5 can be executed on the third device, or on its owner (i.e., the second device), or also on the first device. For example, there is a button for stopping the temporary control right of the first device on the third device, the second device, or the first device, and the user stops the temporary control right of the first device through this button. For example, please refer to Figure 5B (b). When the second device detects the operation of the close button 501, it sends an instruction to the cloud to stop the temporary control right of the first device, and the cloud sends the instruction to the first device, and the first device stops receiving the control of the third device.

[0432] Method 6: If the first device detects the approach of the fourth device, the fourth device sends a new key (different from the key sent to the third device) so that the fourth device can obtain the temporary control right of the first device based on the new key, then the temporary control right of the third device over the first device automatically becomes invalid. Simply put, the temporary control right of the third device over the first device becomes invalid because it is covered by the temporary control right of the fourth device over the first device.

[0433] Of course, the third device and the fourth device can also simultaneously have the temporary control right of the first device. For example, when the third device and the fourth device successively obtain the temporary control right of the first device, the temporary control right obtained by the third device will not be overwritten by the temporary control right obtained by the fourth device, but coexist with the temporary control right obtained by the fourth device. In this case, both the third device and the fourth device can temporarily control the first device. Exemplarily, the first device can determine whether the temporary control rights of the third device and the fourth device can coexist according to the type of the first device. For example, if the first device is a device optimized for sleep (such as a table lamp), the temporary control rights of the third device and the fourth device can coexist, that is, both the third device and the fourth device have the temporary control right of the table lamp. Another example is that if the first device is an office device (such as a projector), the temporary control rights of the third device and the fourth device cannot coexist. That is, before the temporary control right of the projector obtained by the third device expires, if the fourth device obtains the temporary control right of the projector, the temporary control right of the third device will automatically expire.

[0434] Optionally, in Embodiment 1, it is introduced that the first device can be connected to the cloud and receive the control of the cloud. In Embodiment 2, it is introduced that the first device can be temporarily controlled based on receiving the control from the second device. If the module used for connecting the first device to the cloud in the first device is called the first module (such as a wifi module), and the module used for connecting the first device to the third device is called the second module (such as an NFC module), then before the first device enters the open mode, the second module can be in the closed state. After the first device enters the open mode, the second module is in the open state. Optionally, when the second module is open, the first module can be closed or not closed. If both the second module and the first module are open, that is, the first device can receive the temporary control from the third device based on the ultra-short range communication function and can also receive the control from the owner. Or, after the first device enters the open mode, the first module and the second module can be switched periodically. For example, during the period when the first module is open, the second module is closed. During this period, the first device can receive the temporary control from the third device based on the ultra-short range communication function and cannot receive the control from the cloud. When the opening duration of the first module reaches the set duration, it automatically closes, and the second module opens. At this time, the first device cannot receive the temporary control from the third device and can receive the control from the cloud. Among them, the opening cycles of the first module and the second module can be the same or different, and can be set by default or by the user.

[0435] In summary, in Embodiment 2, the third device can obtain the temporary control right of the first device to achieve the temporary control of the first device.

[0436] Embodiment 3

[0437] When the third device obtains the temporary control right of the first device in the second embodiment, it does not need to be confirmed by the owner of the first device (i.e., the second device). The difference between the third embodiment and the second embodiment is that: before the third device obtains the temporary control right of the first device in the third embodiment, it needs to be confirmed by the owner of the first device (i.e., the second device), and the temporary control right of the first device can be obtained after the owner's confirmation. Specifically, the drawings involved in this third embodiment include Figures 6A to 6B 。

[0438] Figure 6A is a schematic flowchart of the third device obtaining the temporary control right of the first device provided in this third embodiment. As Figure 6A shown, the process includes:

[0439] S601, the second device controls the first device to be in the open mode.

[0440] S602, the first device enters the open mode.

[0441] Optionally, S601 and S602 may or may not be executed, and the principle is the same as that of S501 and S502 in the second embodiment, and will not be repeated here.

[0442] S603, the first device queries the functions supported by the first device for the temporary control right.

[0443] Optionally, S603 may or may not be executed, and the principle is the same as that of S504 in the second embodiment, and will not be repeated here.

[0444] S604, the first device detects that the third device is approaching the first device.

[0445] For the implementation principle of S604, please refer to S505 in the second embodiment, and will not be repeated here.

[0446] In the second embodiment, when the first device detects that the third device is approaching, it sends a key to the first device. Different from the second embodiment, in this third embodiment, when the first device detects that the third device is approaching, it requests the confirmation of the owner of the first device, and sends a key to the third device under the condition of the owner's confirmation. Specifically, it is implemented through steps S605 to S614.

[0447] S605, the first device sends a request to the cloud, and this request is used to indicate that the third device requests the temporary control right of the first device.

[0448] Optionally, the device identifier of the first device may be carried in the request. Since the cloud stores the first device and the owner of the first device (such as Table 3 above), the cloud can determine its owner (i.e., the second device) based on the device identifier of the first device. Then, the cloud sends the request to the owner, that is, S606.

[0449] S606. The cloud sends the request to the second device.

[0450] S607. The second device sends an approval instruction to the cloud.

[0451] Optionally, before S607, a prompt message may be displayed on the second device, such as Figure 6B the prompt message shown in (a): Amy's mobile phone (i.e., the identification information of the third device) applies for temporary control of the speaker. Do you agree? Two buttons, namely "Agree" and "Disagree", are also displayed. If the second device detects a click operation on the "Agree" button, it sends an approval instruction to the cloud, that is, S608. If the second device detects a click operation on the "Disagree" button, it sends a rejection instruction to the cloud. The cloud may send the rejection instruction to the first device, and then the first device forwards the rejection instruction to the third device. The user of the third device knows that the application for temporary control of the first device is rejected. For example, see Figure 6B (b). A prompt message is displayed on the third device: The application for temporary control of the speaker you applied for has been rejected. The user of the third device can reapply for temporary control of the first device through the "Reapply" button or can give up the temporary control of the first device through the "Cancel" button.

[0452] S608. The cloud sends an approval instruction to the first device.

[0453] S609. The first device generates a key. The implementation principle of the key can be referred to the introduction in Embodiment 2. S609 may not be executed. The principle is referred to Embodiment 2.

[0454] S610. The first device detects that the third device approaches the first device again.

[0455] S610 is an optional step and can be executed or not. If S610 is not executed, that is, the third device only needs to approach the first device once to obtain the key of the first device. If S610 is executed, the third device needs to approach the first device twice. The first approach is to apply for temporary control of the first device from the owner of the first device. After the owner agrees, the second approach is made to obtain the key of the first device. Optionally, in order to prompt the user to make the second approach in a timely manner, when the first device receives the approval instruction, it may send a prompt message to the third device, which is used to prompt the user to approach the first device again. For example, seeFigure 6B (c) A prompt message is displayed on the third device: The temporary control right of the speaker you applied for (i.e., the first device) has been approved. Please approach the speaker again.

[0456] Alternatively, the first device can record the first time when the third device approached last time, and also record the second time when the third device approaches again. If the time difference between the first time and the second time is less than the threshold, the key is sent to the third device without requesting the owner to confirm again. In this way, it is possible to avoid the third device requesting confirmation from the owner every time it approaches the first device.

[0457] S611, the first device sends the key to the third device.

[0458] S612, the third device queries the function of the first device that supports the temporary control right. S612 can be executed or not, and the principle can be referred to S507 in Embodiment 2.

[0459] S613, the third device sends a control instruction to the first device, and the control instruction is encrypted using the key.

[0460] S614, the first device decrypts to obtain the control instruction and executes the control instruction.

[0461] For the implementation principle of the above S611 to S614, please refer to Embodiment 2 and will not be repeated here.

[0462] In summary, in this Embodiment 3, when the third device approaches the first device, with the authorization of the owner of the first device, the third device can obtain the temporary control right of the first device, avoiding the temporary control right of the first device being obtained by anyone and enhancing security.

[0463] Optionally, if the method for obtaining the temporary control right in Embodiment 2 (i.e., the method without owner confirmation) is regarded as the first method, and the method for obtaining the temporary control right in Embodiment 3 (i.e., the method that requires owner confirmation) is regarded as the second method, the first device, the second device, or the third device can default to using the first method or the second method. Alternatively, a switching button is set on the third device, the second device, or the first device, and through this switching button, the switching between the first method and the second method can be achieved. Taking the second device as an example, please refer to Figure 6C (a) The identifier of the activated device (such as the speaker) is displayed. When an operation on the speaker identifier is detected, the interface shown in Figure 6C (b) is displayed. This interface includes an open mode and an authentication mode. When the button of the open mode is selected, the first device is notified to use the first method. When the button of the authentication mode is selected, the first device is notified to use the second method.

[0464] Optionally, in the third embodiment, the temporary control right also has a validity period. The temporary control right becomes effective within the validity period and becomes invalid after the validity period expires. For the setting method of the validity period, refer to the second embodiment.

[0465] Considering a situation, for example, the validity period of the temporary control right is relatively short, such as 10 minutes. If you want to continue to control the first device after 10 minutes, you need to obtain the temporary control right of the first device again. In this case, if you need to obtain the temporary control right of the first device multiple times within a certain period, the owner needs to confirm multiple times. To avoid the frequent confirmation of the owner, within the preset period after the third device obtains the temporary control right of the first device, if the third device obtains the temporary control right of the first device again, it can be done without the confirmation of the owner, that is, using the method of the second embodiment. For example, assume that the preset period is 1 hour. The user's mobile phone obtains the temporary control right of the speaker at 10:00, and the validity period is 30 minutes. Before 11:00, if the user's mobile phone approaches the speaker again to obtain its temporary control right, it can be done without the confirmation of the owner.

[0466] Or, to avoid the frequent confirmation of the owner, after the third device obtains the temporary control right of the first device, the third device is allowed to obtain the temporary control right of the first device without authentication for a preset number of times. The so-called obtaining without authentication means using the method of the second embodiment without the confirmation of the owner. For example, assume that the preset number of times is 3 times. The user's mobile phone obtains the temporary control right of the speaker at 10:00, and the validity period is 30 minutes. After that, the third device has 3 opportunities to obtain the temporary control right of the first device without authentication. When obtaining it for the 4th time, the confirmation of the owner is required.

[0467] Embodiment Four

[0468] In the above second to third embodiments, the third device obtains the temporary control right of the first device. In this fourth embodiment, it is introduced that the third device obtains the permanent control right of the first device, that is, the third device becomes the owner of the first device. Optionally, if the first device has not been configured with an owner yet, the third device can register as the owner of the first device on the cloud side by the method of the first embodiment. If the first device has been configured with an owner, and the owner is the second device. In this case, if there can only be one owner of the first device, that is, the third device replaces the second device as the owner of the first device. If there can be multiple owners of the first device, that is, both the third device and the second device become the owners of the first device. This fourth embodiment takes the third device replacing the first device as the owner of the first device as an example. Specifically, the drawings involved in this embodiment include Figures 7A to 7B . Among them, Figure 7ASchematic diagram of the process for the third device provided in the fourth embodiment to obtain the permanent control right of the first device. This process is introduced taking the second device as the owner of the first device as an example. Therefore, Figure 7A it is marked that "the second device is the owner of the first device". As Figure 7A shown, this process may include:

[0469] S701, the second device controls the first device to enter the open mode.

[0470] S702, the first device enters the open mode.

[0471] Optionally, S701 and S702 may or may not be executed. The principle is the same as that of S501 and S502 in the second embodiment, and will not be repeated here.

[0472] S703, the first device detects that the third device approaches the first device.

[0473] For the implementation principle of S703, please refer to S505 in the second embodiment, and no repeated description will be given.

[0474] In the second embodiment, when the first device detects that the third device approaches, a key is sent to the first device, and the third device obtains the temporary control right of the first device based on this key. Different from the second embodiment, in the fourth embodiment, when the first device detects that the third device approaches, it can record in the cloud that the owner of the first device is the third device, that is, the third device obtains the permanent control right of the first device. This is specifically implemented through steps S704 to S712.

[0475] S704, the third device sends an application for permanent control right to the first device.

[0476] For example, please refer to Figure 7B (a), which is the display interface when the third device approaches the first device. The interface includes a button of "Apply for permanent control right". In response to the click operation on the button of "Apply for permanent control right", the third device sends an application for permanent control right to the first device.

[0477] Optionally, S704 may or may not be executed. For example, when the first device detects that the third device approaches, it automatically enters S705.

[0478] S705, the first device sends the application to the cloud.

[0479] S706, the cloud sends the application to the second device.

[0480] S707, the second device sends an approval instruction to the cloud.

[0481] Optionally, S706 and S707 are optional steps and can be executed or not. If not executed, that is, the third device obtaining the permanent control right of the first device does not require the consent of the owner of the first device (i.e., the second device). If S706 and S707 are executed, that is, the third device obtaining the permanent control right of the first device requires the consent of the owner of the first device (i.e., the second device). With the consent of the owner of the first device, the third device obtains the permanent control right of the first device.

[0482] Optionally, if taking the way that requires the consent of the owner of the first device to obtain the permanent control right of the first device as the first method, and taking the way that does not require the consent of the owner of the first device to obtain the permanent control right of the first device as the second method, the third device can default to use the first method or the second method; or, a switching button can be set on the second device or the first device, and the first method or the second method can be set through this switching button.

[0483] S708, the cloud records that the owner of the first device is the third device.

[0484] For example, before S708, if the owner of the first device is the second device, then in S708, the cloud can update the owner of the first device from the second device to the third device. For example, Table 3 above is updated to Table 4 below:

[0485] Table 4

[0486] First device Third device (owner of the first device) Huawei Speaker AM08 185 0810XXXX

[0487] S709, the cloud sends an indication message of successful application for the permanent control right to the third device.

[0488] Optionally, S709 can be executed or not. For example, as Figure 7B (b) shows, the third device displays a prompt message: The application for the permanent control right of the first device (i.e., the speaker) is successful.

[0489] After the cloud records that the owner of the first device is the third device, the third device can control the first device through the cloud. For example, the following steps S710 to S712.

[0490] S710, set a control policy for the first device on the third device.

[0491] Optionally, S710 can be executed or not, and the implementation principle can refer to S423 in Embodiment 1.

[0492] S711, the third device sends the control policy to the cloud.

[0493] S712. The cloud controls the first device based on the control policy.

[0494] For the implementation principles of S711 to S712, refer to S424 to S425 in Embodiment 1.

[0495] It should be noted that Figure 7B Taking the example that only the button of "Apply for Permanent Control Right" is displayed on the third device, it can be understood that the third device can respectively display the button of "Apply for Temporary Control Right" and the button of "Apply for Permanent Control Right", and the user can select the corresponding button to click according to the needs to apply for the corresponding control right. For example, refer to Figure 7C . If applying for temporary control right, it can be implemented in the manner of Embodiment 2 or Embodiment 3. If applying for permanent control right, it can be implemented in the manner of Embodiment 4.

[0496] Taking the example that the third device directly applies for the permanent control right of the first device above, it can be understood that before the third device applies for the permanent control right of the first device, it can first determine whether the third device has the temporary control right of the first device. If so, it can apply for the permanent control of the first device. Otherwise, it cannot apply for the permanent control right of the first device.

[0497] Based on the above embodiments, the embodiments of the present application further provide an electronic device, and the electronic device may be the first device, the second device, the third device, the fourth device or the cloud in the above text. As Figure 8 shown, the electronic device 800 may include: one or more processors 801, a memory 802, and one or more computer programs (not shown in the figure). The above components may be coupled through one or more communication buses 804.

[0498] Among them, the memory 802 stores one or more computer programs, and the one or more computer programs include instructions; the processor 801 calls the instructions stored in the memory 802, so that the electronic device 800 executes the method for obtaining device control right provided by the embodiments of the present application.

[0499] In the above embodiments provided by the present application, the method provided by the embodiments of the present application is introduced from the perspective of the electronic device as the execution subject. In order to implement each function in the method provided by the embodiments of the present application, the terminal device may include a hardware structure and / or a software module, and implement the above functions in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module. Whether a certain function among the above functions is executed in the form of a hardware structure, a software module, or a combination of a hardware structure and a software module depends on the specific application and design constraint conditions of the technical solution.

[0500] As used in the foregoing embodiments, depending on the context, the term "when" or "after" may be construed to mean "if" or "after" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "when determining" or "if detecting (the stated condition or event)" may be construed to mean "if determining" or "in response to determining" or "when detecting (the stated condition or event)" or "in response to detecting (the stated condition or event)". Additionally, in the foregoing embodiments, relational terms such as first, second, etc. are used to distinguish one entity from another entity, without limiting any actual relationship and order between these entities.

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

[0502] Those skilled in the art should be able to realize that in one or more of the above examples, the functions described in the embodiments of the present application may be implemented by hardware, software, firmware, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes computer storage media and communication media, where the communication media includes any medium that facilitates the transmission of a computer program from one place to another. The storage media may be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0503] The specific embodiments described above further elaborate on the objectives, technical solutions, and beneficial effects of the embodiments of the present application. It should be understood that the above description is only the specific embodiments of the embodiments of the present application and is not used to limit the protection scope of the embodiments of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the embodiments of the present application shall be included within the protection scope of the embodiments of the present application. The above description of the present application's specification enables any person skilled in the art to utilize or implement the content of the embodiments of the present application. Any modifications based on the disclosed content should be considered obvious to those skilled in the art. The basic principles described in the embodiments of the present application can be applied to other variations without departing from the essence and scope of the invention of the present application. Therefore, the content disclosed in the embodiments of the present application is not limited to the described embodiments and designs, but can also be extended to the maximum scope consistent with the principles of the present application and the newly disclosed features.

[0504] Although the present application has been described in connection with specific features and their embodiments, it is obvious that various modifications and combinations can be made without departing from the spirit and scope of the embodiments of the present application. Accordingly, the present specification and the drawings are merely exemplary illustrations of the present application defined by the appended claims and are considered to have covered any and all modifications, variations, combinations, or equivalents within the scope of the present application. Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the embodiments of the present application are also intended to include these changes and modifications.

Claims

1. A method for obtaining device control rights, which is applied to a system including a first device and a second device, characterized in that, the method includes: the first device detects that the second device is close to the first device; the first device sends a confirmation request to a fourth device, where the confirmation request is used to confirm whether to agree that the second device obtains temporary control rights of the first device, and the fourth device is the owner of the first device, and the owner of the first device is a device that can control the first device through the cloud; the first device receives an approval instruction sent by the fourth device; the first device sends a first key to the second device; after receiving the first key, the second device encrypts a control instruction with the first key; the control instruction is used to control the first device; the second device sends the encrypted control instruction to the first device; the first device decrypts the encrypted control instruction to obtain the control instruction and executes the control instruction.

2. The method according to claim 1, characterized in that, the method further includes: a first prompt message is displayed on the second device, and the first prompt message is used to prompt whether to apply for temporary control rights of the first device; when the second device receives a confirmation instruction, it sends a first application to the first device, and the first application is used to indicate that the second device applies for temporary control rights of the first device; the first device sending the first key to the second device includes: when the first device receives the first application from the second device, it sends the first key to the second device.

3. The method according to claim 1, characterized in that, the first key has a validity period, and when the validity period is exceeded, the first key becomes invalid; wherein, the validity period is preset, or set by the user, or determined according to the type of the first device; among them, the validity periods of the first keys generated by different types of first devices are different.

4. The method according to claim 2, characterized in that, the method further includes: when a preset condition is met, the temporary control right of the first device by the second device is terminated; wherein, the preset condition includes at least one of the following: the usage duration of the first key exceeds the validity period; or, a preset duration is reached starting from the moment when the first key is received by the second device; or, the first device detects that a third device is close to the first device; or, an operation for terminating the temporary control right of the first device by the second device is detected on the first device; or, the first device receives an instruction from the owner of the first device, and the instruction is used to indicate terminating the temporary control right of the first device by the second device; or, the first device detects that the distance between the second device and the first device is greater than a second preset distance.

5. The method according to claim 1, characterized in that, the first device sending the confirmation request to the fourth device includes: The first device sends a second application to the cloud, and the second application is used to instruct the second device to apply for temporary control of the first device; In response to receiving the second application, the cloud determines, according to the mapping relationship between the device and the owner, that the owner of the first device is the fourth device; The cloud sends the confirmation request to the fourth device.

6. The method according to claim 1, wherein, the method further includes: the first device generates an authentication-free duration and / or an authentication-free number of times; After the temporary control right of the first device by the second device terminates, when the first device detects that the second device approaches the first device again, if it is determined that the authentication-free duration is not exceeded and / or the cumulative number of times the second device approaches does not exceed the authentication-free number of times, the confirmation to the fourth device is waived.

7. The method according to any one of claims 1-6, wherein, When the first device receives the consent instruction from the fourth device and sends the first key to the second device, it includes: After the first device receives the consent instruction from the fourth device, when the first device detects that the second device approaches the first device again, it sends the first key to the second device.

8. The method according to any one of claims 1-6, wherein, the method further includes: The second device determines the functions in the first device that support the temporary control right; the control instruction sent by the second device to the first device is used to control the functions in the first device that support the temporary control right; wherein, the function is a preset function in the first device, or a function specified by the user, or a function in the first device that has nothing to do with user privacy.

9. The method according to claim 1, wherein, the method further includes: A second prompt message is displayed on the second device, and the second prompt message is used to prompt whether to apply for permanent control of the first device; When the second device receives the confirmation instruction, it sends a third application to the first device, and the third application is used to instruct the second device to apply for permanent control of the first device; The first device sends the third application to the cloud; In response to receiving the third application, the cloud records the second device as the owner of the first device, so that the second device can control the first device through the cloud.

10. The method according to claim 9, wherein, When the cloud records the second device as the owner of the first device in response to receiving the third application, it includes: In response to the third application, the cloud determines that the owner of the first device is the fourth device; The cloud sends a confirmation request to the fourth device; the confirmation request is used to indicate whether to agree that the second device obtains the permanent control right of the first device; When the cloud receives the consent instruction, it records that the owner of the first device is updated from the fourth device to the second device.

11. The method according to any one of claims 1-6, wherein, The method further includes: Receiving, on the fourth device, a first operation for instructing to turn on the short - range communication function or the ultra - short - range communication function of the first device; In response to the first operation, the fourth device sends an instruction for instructing the first device to turn on the short - range communication function or the ultra - short - range communication function to the first device; In response to the received instruction, the first device turns on the short - range communication function or the ultra - short - range communication function.

12. The method according to any one of claims 1 - 6, wherein, The first device sending the first key to the second device includes: The first device uses NFC or WIFI Aware to send the first key to the second device.

13. The method according to any one of claims 1 - 6, wherein, The first device detecting that the second device is close to the first device includes: The first device detecting that the distance between the second device and the first device is less than a first threshold; and / or, The first device detecting that the signal strength of the second device is greater than a second threshold.

14. The method according to claim 13, wherein, The first threshold is a value within the range of 0 cm to 30 cm; the second threshold is a value within the range of - 5 dbm to - 150 dbm.

15. The method according to any one of claims 1 - 6, wherein, The first device is a home device, the second device is a mobile terminal, and the control instruction is used to control the turning on, turning off or adjusting the operating parameters of the home device; wherein, the home device includes one or more of: a television, a speaker, a game console, a lighting device, a cleaning device or a cooking device; Or, The first device is an office device, the second device is a mobile terminal, and the control instruction is used to control the turning on, turning off or adjusting the operating parameters of the office device; wherein, the office device includes one or more of: a projector, a printer, a copier or a PC.

16. A communication system, wherein, includes: A first device and a second device; Wherein, the first device includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the first device, cause the first device to perform the following steps: Detecting that the second device is close to the first device; Sending a confirmation request to a fourth device, the confirmation request being used to confirm whether to agree that the second device obtains temporary control of the first device, the fourth device being the owner of the first device, and the owner of the first device being a device that can control the first device through the cloud; Receiving an approval instruction sent by the fourth device; Sending a first key to the second device; The second device includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the second device, cause the second device to perform the following steps: After receiving the first key, encrypt the control instruction using the first key; the control instruction is used to control the first device; Send the encrypted control instruction to the first device; When the instruction is executed by the first device, cause the first device to further perform the steps of: decrypting the encrypted control instruction to obtain the control instruction and executing the control instruction.

17. The communication system according to claim 16, wherein, When the instruction is executed by the second device, cause the second device to further perform the steps of: Display a first prompt message for prompting whether to apply for temporary control of the first device; When receiving a confirmation instruction, send a first application to the first device, the first application being used to indicate that the second device applies for temporary control of the first device; When the instruction is executed by the first device, cause the first device to specifically perform the steps of: When receiving the first application from the second device, send a first key to the second device.

18. The communication system according to claim 16, wherein, The first key has a validity period, and when the validity period is exceeded, the first key becomes invalid; wherein, the validity period is preset, or set by the user, or determined according to the type of the first device; wherein, the validity periods of the first keys generated by different types of first devices are different.

19. The communication system according to claim 17, wherein, When the instruction is executed by the first device, cause the first device to further perform the steps of: when a preset condition is met, terminate the second device's temporary control of the first device; wherein, the preset condition includes at least one of the following: The usage duration of the first key exceeds the validity period; or, A preset duration has elapsed since the moment when the first key is received from the second device; or, The first device detects that a third device is approaching the first device; or, An operation for terminating the second device's temporary control of the first device is detected on the first device; or, The first device receives an instruction from the owner of the first device, the instruction being used to indicate terminating the second device's temporary control of the first device; or, The first device detects that the distance between the second device and the first device is greater than a second preset distance.

20. The communication system according to claim 16, wherein, When the instruction is executed by the first device, cause the first device to specifically perform the steps of: sending a second application to the cloud, the second application being used to indicate that the second device applies for temporary control of the first device; The cloud includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the cloud, cause the cloud to perform the following steps: In response to receiving the second application, the cloud determines that the owner of the first device is the fourth device according to the mapping relationship between the device and the owner; Send the confirmation request to the fourth device.

21. The communication system according to claim 16, wherein, When the instruction is executed by the first device, the first device is further caused to perform the steps of: generating an authentication-free duration, and / or, an authentication-free number of times; After the temporary control right of the second device over the first device terminates, when the first device detects that the second device approaches the first device again, if it is determined that the authentication-free duration is not exceeded, and / or, the cumulative number of times the second device approaches does not exceed the authentication-free number of times, the confirmation to the fourth device is waived.

22. The communication system according to any one of claims 16-21, wherein, When the instruction is executed by the first device, the first device is specifically caused to perform the steps of: after receiving the consent instruction from the fourth device, when the first device detects that the second device approaches the first device again, send a first key to the second device.

23. The communication system according to any one of claims 16-21, wherein, When the instruction is executed by the second device, the second device is further caused to perform the steps of: Determine the functions in the first device that support the temporary control right; the control instruction sent by the second device to the first device is used to control the functions in the first device that support the temporary control right; wherein, the function is a preset function in the first device, or a function specified by the user, or a function in the first device that has nothing to do with user privacy.

24. The communication system according to claim 16, wherein, The system further includes a cloud; When the instruction is executed by the second device, the second device is further caused to perform the steps of: Display a second prompt message on the second device, where the second prompt message is used to prompt whether to apply for the permanent control right of the first device; When the second device receives the confirmation instruction, send a third application to the first device, where the third application is used to indicate that the second device applies for the permanent control right of the first device; When the instruction is executed by the first device, the first device is further caused to perform the steps of: the first device sends the third application to the cloud; The cloud includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the cloud, cause the cloud to perform the following steps: In response to the received third application, record the second device as the owner of the first device, so that the second device can control the first device through the cloud.

25. The communication system according to claim 24, wherein, when the instruction is executed by the cloud, the cloud specifically executes the steps of: in response to the third application, the cloud determines that the owner of the first device is the fourth device; the cloud sends a confirmation request to the fourth device; the confirmation request is used to indicate whether to agree that the second device obtains permanent control of the first device; when the cloud receives an approval instruction, record that the owner of the first device is updated from the fourth device to the second device.

26. The communication system according to any one of claims 16-21, wherein, the fourth device includes: one or more processors, a memory, and one or more programs; wherein, the one or more programs are stored in the memory, and the one or more programs include instructions that, when executed by the fourth device, cause the fourth device to execute the following steps: a first operation is received on the fourth device, and the first operation is used to indicate turning on the short-range communication function or short-distance communication function of the first device; in response to the first operation, the fourth device sends an instruction to the first device for indicating the first device to turn on the short-range communication function or short-distance communication function; when the instruction is executed by the first device, the first device executes the following steps: in response to the received instruction, turn on the short-range communication function or short-distance communication function.

27. The communication system according to any one of claims 16-21, wherein, when the instruction is executed by the first device, the first device specifically executes the steps of: the first device uses NFC or WIFI Aware to send a first key to the second device.

28. The communication system according to any one of claims 16-21, wherein, when the instruction is executed by the first device, the first device specifically executes the steps of: the first device detects that the distance between the second device and the first device is less than a first threshold; and / or, the first device detects that the signal strength of the second device is greater than a second threshold.

29. The communication system according to claim 28, wherein, the first threshold is a value within the range of 0 cm to 30 cm; the second threshold is a value within the range of -5 dbm to -150 dbm.

30. The communication system according to any one of claims 16-21, wherein, the first device is a home device, the second device is a mobile terminal, and the control instruction is used to control the turning on, turning off or adjusting the operating parameters of the home device; wherein, the home device includes: one or more of a television, a speaker, a game console, a lighting device, a cleaning device or a cooking device; or, The first device is an office device, the second device is a mobile terminal, and the control instruction is used to control the turning on, turning off or adjusting the operating parameters of the office device; wherein, the office device includes one or more of a projector, a printer, a copier or a PC.

31. A computer-readable storage medium, characterized in that, the computer-readable storage medium is used to store a computer program, and when the computer program runs on a computer, the computer is caused to execute the method according to any one of claims 1 to 15.

32. A computer program product, characterized in that, the computer program product includes computer program code, and when the computer program code runs on a computer, the computer is caused to execute the method according to any one of claims 1 to 15.

Citation Information

Patent Citations

  • Smart home device sharing system and method, and electronic device

    WO2020155014A1