Permission sharing method and electronic device

By displaying the sharing interface on the first electronic device and responding to user operations, the permission sharing of IoT devices is realized, and the cumbersome permission sharing process in the prior art is solved, thereby improving user experience and operation simplicity.

WO2025112740A1PCT designated stage expired Publication Date: 2025-06-05HUAWEI TECH CO LTD

Patent Information

Application Number
PCT/CN2024/116102
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-27
Filing Date
2024-08-30
Publication Date
2025-06-05

AI Technical Summary

Technical Problem

In the prior art, the permission sharing process of IoT devices is cumbersome, the user's operation is difficult, and complex steps such as scanning QR codes and entering an account are required.

Method used

By displaying a sharing interface on the first electronic device, detecting user operations, and responding to a proximity or touch operation, the control permissions of the first target smart device are shared to the second electronic device, simplifying the permission sharing steps.

Benefits of technology

It realizes the real-time and interactive improvement of permission sharing, and the user's operation is simple, reducing the difficulty of use and improving the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024116102_05062025_PF_FP_ABST
    Figure CN2024116102_05062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals. Provided are a permission sharing method and an electronic device. In the present application, a first electronic device can share a control permission of a smart device with a second electronic device by means of a simple bring-close or tapping operation, thereby simplifying a permission sharing step, and reducing the usage difficulty of a user. The method comprises: a first electronic device displaying a first sharing interface; and detecting an operation of a user on a first interface element in the first sharing interface, and in response to being brought close to or tapped against a second electronic device, the first electronic device sharing with the second electronic device a control permission of a first target smart device corresponding to the first interface element.
Need to check novelty before this filing date? Find Prior Art

Description

Authority sharing method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on November 27, 2023, with application number 202311604660.6 and application name “Authority Sharing Method and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a permission sharing method and electronic device. Background Art

[0003] With the rapid development of the Internet of Things (IoT) technology, a wide range of IoT devices have emerged, including smart wearables, smart refrigerators, smart curtains, smart door locks, and smart air purifiers. After logging into a first application account (such as a smart life application), an electronic device (such as a mobile phone or tablet) binds to an IoT device in response to a user's operation and obtains control permissions for the IoT device. Subsequently, the user can control the IoT device bound to the first application account by logging into the first application account, providing great convenience to the user.

[0004] In some scenarios, permission sharing allows other first-app accounts to gain control of the IoT device, allowing other users to control the IoT device by logging into other first-app accounts. However, during permission sharing, users typically need to open the device's QR code, record the first-app account, and use other applications to establish a sharing relationship between the other first-app account and the IoT device. This process is cumbersome and difficult for users to use.

[0005] Summary of the Invention

[0006] To solve the above technical problems, this application provides a permission sharing method and electronic device. The technical solution provided by this application allows a first electronic device to share the control permission of a smart device with a second electronic device through a simple approach or touch operation, thereby simplifying the permission sharing process and reducing user difficulty.

[0007] In order to achieve the above technical objectives, this application provides the following technical solutions:

[0008] In a first aspect, a permission sharing method is provided, applied to a first electronic device. The method includes: displaying a first sharing interface; detecting a user operation on a first interface element in the first sharing interface; and, in response to proximity or contact with a second electronic device, sharing control permissions of a first target smart device corresponding to the first interface element with the second electronic device.

[0009] In this way, the first electronic device and the second electronic device complete the sharing of device control authority based on near field communication, thereby improving the real-time and interactivity of authority sharing, thereby enhancing the user experience.

[0010] Moreover, during the device sharing process, the user only needs to simply approach or touch the first electronic device to trigger the first electronic device and the second electronic device to automatically complete the permission sharing, which is simple for the user to operate and effectively reduces the difficulty of user operation.

[0011] According to the first aspect, the method further includes: presenting an animation on the first sharing interface, where the animation is used to prompt the user to share the first target smart device corresponding to the first interface element to the second electronic device.

[0012] In this way, by displaying dynamic effects, users can quickly confirm the permission sharing status, achieve precise control of shared devices, and effectively improve the user experience.

[0013] According to the first aspect, or any implementation of the first aspect above, in response to approaching or touching the second electronic device, sharing the control permission of the first target smart device corresponding to the first interface element with the second electronic device includes: during the process of displaying the first sharing interface, in response to approaching or touching the second electronic device, establishing a communication connection with the second electronic device. Obtaining a first account logged in by the second electronic device through the communication connection. Based on the first account, sharing the control permission of the first target smart device corresponding to the first interface element in the first sharing interface with the second electronic device.

[0014] In some examples, the second electronic device may have an identification code pre-installed in it, or may generate the identification code in response to proximity or contact with the first electronic device. Subsequently, the first and second electronic devices establish a communication connection based on the identification code. This improves the security of the established communication connection and ensures the security of subsequent communications.

[0015] In some examples, the first account logged into the second electronic device is, for example, an account of a first application (such as a smart life application) used to manage smart devices by the second electronic device, or the first account is a device-level account, such as a Huawei account.

[0016] In this way, the first electronic device and the second electronic device establish a more stable communication connection based on the short-range communication connection to complete the sharing of the control authority of the smart device.

[0017] According to the first aspect, or any implementation of the first aspect above, in response to proximity or a bump with the second electronic device, sharing control permissions of a first target smart device corresponding to a first interface element with the second electronic device includes: during the display of the first sharing interface, in response to proximity or a bump with the second electronic device, establishing a communication connection with the second electronic device. Through the communication connection, sending a second account logged in by the first electronic device to the second electronic device, the second account being used to share control permissions of the first target smart device corresponding to the first interface element in the first sharing interface with the second electronic device.

[0018] In some examples, the first electronic device is a central control device. In response to proximity or contact, the second electronic device can obtain the second account of the first electronic device, thereby obtaining control permissions for smart devices in the home currently managed by the first electronic device. Optionally, the second account is the first application account or a device-level account.

[0019] In some examples, when the second electronic device requests permission sharing from the server based on the second account of the first electronic device, the server may also request authorization from the permission management device corresponding to the second account to ensure the security of permission sharing.

[0020] According to the first aspect, or any implementation of the first aspect above, the first interface element includes a display element associated with the first target smart device, and the method further includes: sharing the first interface element to the second electronic device.

[0021] According to the first aspect, or any implementation of the first aspect above, the first interface element is a card.

[0022] In this way, the second electronic device can not only obtain the permissions of the smart device shared by the first electronic device, but also directly obtain the interface elements shared by the first electronic device for controlling the smart device, thereby making it easier for the user to determine the entry point for controlling the smart device and simplifying the user's operation.

[0023] According to the first aspect, or any implementation of the first aspect above, the first interface element includes a display element associated with an added user, and the added user is used to control the first target smart device; in response to approaching or touching the second electronic device, the method also includes: displaying a second interface element, and the second interface element includes a display element associated with a user of the second electronic device.

[0024] In some examples, the first sharing interface includes a space management interface associated with the space where the first target smart device is located. Then, after the first electronic device determines that control permissions for the first target smart device have been shared with the second electronic device, it can display a second interface element on the first sharing interface to prompt the user that the second electronic device has obtained control permissions for the smart devices in the space where the first target smart device is located.

[0025] In some examples, the display element associated with the user of the second electronic device is, for example, an avatar of the first application logged into the second electronic device, a home icon, etc.

[0026] According to the first aspect, or any implementation of the first aspect above, the animation includes an animation of a first interface element associated with the first target smart device moving out, or an animation of a display element associated with a user of the second electronic device moving in.

[0027] In this way, by displaying the movement of elements in or out, users can have a vivid understanding of the permission sharing situation.

[0028] According to the first aspect, or any implementation method of the first aspect above, in response to approaching or touching the second electronic device, the control authority of the first target smart device corresponding to the first interface element is shared with the second electronic device, and it also includes: in response to approaching or touching the second electronic device, the control authority of the second target smart device corresponding to the first interface element is shared with the second electronic device, and the first target smart device and the second target smart device belong to the same space or the same scene.

[0029] In this way, during the home sharing process, the user only needs to perform a simple touch operation to trigger the first electronic device and the second electronic device to automatically complete the sharing of the home group. The user operation is simple and effectively reduces the difficulty of user operation.

[0030] Furthermore, the first electronic device and the second electronic device complete home sharing based on near field communication, thereby improving the real-time and interactivity of home sharing, thereby enhancing the user experience.

[0031] According to the first aspect, or any implementation method of the above first aspect, approaching or touching is based on one or more of the short-range wireless communication NFC technology, low-power BLE Bluetooth technology, and short-range local area network NAN communication technology.

[0032] This allows users to share control of a smart device managed by a first electronic device with a second electronic device through short-range communication, such as proximity or a tap. Compared to other device sharing methods, users no longer need to enter their Huawei ID or launch other apps on the first electronic device, significantly simplifying user operations.

[0033] According to the first aspect, or any implementation of the first aspect above, the control authority is an authority range specified by a user of the first electronic device.

[0034] In this way, the user can set the sharing permissions of the first target smart device according to needs.

[0035] In some examples, the sharing permission of the first electronic device to the second electronic device also includes the permission to share the scene or space. In some examples, the user can also set whether to allow the permission to edit the scene.

[0036] According to the first aspect, or any implementation of the first aspect above, the first sharing interface includes a device management interface for managing at least one smart device, or a space management interface associated with the space where the first target smart device is located.

[0037] According to the first aspect, or any implementation of the first aspect above, the first electronic device is a user terminal or a central control device in a space.

[0038] In a second aspect, a permission sharing method is provided, applied to a second electronic device. The method includes: in response to proximity or contact with a first electronic device, receiving control permissions for a first target smart device shared by the first electronic device, wherein the first target smart device displays an animation corresponding to a first interface element displayed on a first sharing interface of the first electronic device, the animation prompting a user that the second electronic device obtains control permissions for the first target smart device.

[0039] According to a second aspect, the animation includes an animation of a first interface element associated with the first target smart device moving in, and the first interface element moving out on the first sharing interface, or an animation of a display element associated with the user of the first electronic device moving in.

[0040] According to the second aspect, or any implementation of the second aspect above, the method further includes: adding a first interface element to the device management interface. Alternatively, switching the displayed first space management interface to a second space management interface, the first space management interface corresponding to a user of the second electronic device, and the second space management interface corresponding to the user of the first electronic device.

[0041] In some examples, users need to operate devices in their home when performing family sharing. Therefore, after obtaining control permissions for the home shared by the first electronic device, the second electronic device can switch to display the device management interface of the home, making it easier for users to operate devices.

[0042] According to the second aspect, or any implementation of the second aspect above, the first interface element is a card.

[0043] According to the second aspect, or any implementation of the second aspect above, receiving control permissions for a first target smart device shared by the first electronic device in response to proximity or bumping with the first electronic device includes: establishing a communication connection with the first electronic device in response to proximity or bumping with the first electronic device. Sending a first account logged in by the second electronic device to the first electronic device via the communication connection, the first account being used to share control permissions for the first target smart device with the second electronic device.

[0044] According to the second aspect, or any implementation of the second aspect above, receiving control permissions for a first target smart device shared by the first electronic device in response to proximity or bumping with the first electronic device includes: establishing a communication connection with the first electronic device in response to proximity or bumping with the first electronic device; obtaining, through the communication connection, a second account logged in by the first electronic device; and obtaining control permissions for the first target smart device based on the second account.

[0045] In a third aspect, a first electronic device is provided. The first electronic device includes: a processor, a memory, and a display screen, wherein the memory and the display screen are coupled to the processor, the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor reads the computer instructions from the memory, the first electronic device executes: displaying a first sharing interface. Upon detecting a user operation on a first interface element in the first sharing interface, in response to proximity or contact with a second electronic device, the control authority of the first target smart device corresponding to the first interface element is shared with the second electronic device.

[0046] According to the third aspect, when the processor reads computer instructions from the memory, it also enables the first electronic device to execute: presenting an animation on the first sharing interface, the animation is used to prompt the user to share the first target smart device corresponding to the first interface element to the second electronic device.

[0047] According to the third aspect, or any implementation of the third aspect above, in response to approaching or touching the second electronic device, sharing the control permission of the first target smart device corresponding to the first interface element with the second electronic device includes: during the process of displaying the first sharing interface, in response to approaching or touching the second electronic device, establishing a communication connection with the second electronic device. Obtaining a first account logged in by the second electronic device through the communication connection. Based on the first account, sharing the control permission of the first target smart device corresponding to the first interface element in the first sharing interface with the second electronic device.

[0048] According to the third aspect, or any implementation of the third aspect above, in response to approaching or touching the second electronic device, sharing control permissions of a first target smart device corresponding to a first interface element with the second electronic device includes: during the display of the first sharing interface, in response to approaching or touching the second electronic device, establishing a communication connection with the second electronic device. Through the communication connection, sending a second account logged in by the first electronic device to the second electronic device, the second account being used to share control permissions of the first target smart device corresponding to the first interface element in the first sharing interface with the second electronic device.

[0049] According to the third aspect, or any implementation of the third aspect above, the first interface element includes a display element associated with the first target smart device, and when the processor reads the computer instructions from the memory, it also enables the first electronic device to execute: sharing the first interface element to the second electronic device.

[0050] According to the third aspect, or any implementation of the third aspect above, the first interface element is a card.

[0051] According to the third aspect, or any implementation of the third aspect above, the first interface element includes a display element associated with the added user, and the added user is used to control the first target smart device; in response to approaching or touching the second electronic device, when the processor reads computer instructions from the memory, it also causes the first electronic device to execute: displaying the second interface element, the second interface element includes a display element associated with the user of the second electronic device.

[0052] According to the third aspect, or any implementation of the third aspect above, the animation includes an animation of a first interface element associated with the first target smart device moving out, or an animation of a display element associated with a user of the second electronic device moving in.

[0053] According to the third aspect, or any implementation method of the third aspect above, in response to approaching or touching the second electronic device, the control authority of the first target smart device corresponding to the first interface element is shared with the second electronic device, and it also includes: in response to approaching or touching the second electronic device, the control authority of the second target smart device corresponding to the first interface element is shared with the second electronic device, and the first target smart device and the second target smart device belong to the same space or the same scene.

[0054] According to the third aspect, or any implementation method of the above third aspect, approaching or touching is based on one or more of the short-range wireless communication NFC technology, low-power BLE Bluetooth technology, and short-range local area network NAN communication technology.

[0055] According to the third aspect, or any implementation of the third aspect above, the control authority is an authority range specified by a user of the first electronic device.

[0056] According to the third aspect, or any implementation of the third aspect above, the first sharing interface includes a device management interface for managing at least one smart device, or a space management interface associated with the space where the first target smart device is located.

[0057] According to the third aspect, or any implementation of the third aspect above, the first electronic device is a user terminal or a central control device in a space.

[0058] In a fourth aspect, a second electronic device is provided. The second electronic device includes: a processor, a memory, and a display screen, the memory and the display screen being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, and when the processor reads the computer instructions from the memory, causing the second electronic device to execute: in response to approaching or touching the first electronic device, receiving control authority for a first target smart device shared by the first electronic device, wherein the first target smart device displays an animation corresponding to a first interface element displayed on a first sharing interface of the first electronic device, the animation being used to prompt a user that the second electronic device obtains control authority for the first target smart device.

[0059] According to a fourth aspect, the animation includes an animation of a first interface element associated with the first target smart device moving in, the first interface element moving out on the first sharing interface, or an animation of a display element associated with the user of the first electronic device moving in.

[0060] According to the fourth aspect, or any implementation of the fourth aspect above, when the processor reads the computer instructions from the memory, it further causes the second electronic device to execute: adding the first interface element to the device management interface. Alternatively, the displayed first space management interface is switched to the second space management interface, the first space management interface corresponding to the user of the second electronic device, and the second space management interface corresponding to the user of the first electronic device.

[0061] According to the fourth aspect, or any implementation of the fourth aspect, the first interface element is a card.

[0062] According to a fourth aspect, or any implementation of the fourth aspect, in response to proximity or bumping with the first electronic device, receiving control permissions for a first target smart device shared by the first electronic device includes: establishing a communication connection with the first electronic device in response to proximity or bumping with the first electronic device. Sending a first account logged in by the second electronic device to the first electronic device via the communication connection, the first account being used to share control permissions for the first target smart device with the second electronic device.

[0063] According to the fourth aspect, or any implementation of the fourth aspect above, in response to proximity or bumping with the first electronic device, receiving control permissions for a first target smart device shared by the first electronic device includes: establishing a communication connection with the first electronic device in response to proximity or bumping with the first electronic device; obtaining a second account logged in by the first electronic device through the communication connection; and obtaining control permissions for the first target smart device based on the second account.

[0064] In a fifth aspect, an electronic device is provided, which has the function of implementing the permission sharing method as described in the first aspect and any possible implementation thereof; or, the electronic device has the function of implementing the permission sharing method as described in the second aspect and any possible implementation thereof. This function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0065] In a sixth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as instructions or code). When the computer program is executed by an electronic device, the electronic device performs the method of the first aspect or any one of the embodiments of the first aspect; or performs the method of the second aspect or any one of the embodiments of the second aspect.

[0066] In the seventh aspect, a computer program product is provided. When the computer program product is run on an electronic device, the electronic device executes the method of the first aspect or any one of the embodiments of the first aspect; or, the electronic device executes the method of the second aspect or any one of the embodiments of the second aspect.

[0067] In an eighth aspect, a circuit system is provided, the circuit system including a processing circuit, the processing circuit being configured to execute the method of the first aspect or any one of the embodiments of the first aspect; or, the processing circuit being configured to execute the method of the second aspect or any one of the embodiments of the second aspect.

[0068] In the ninth aspect, a chip system is provided, comprising at least one processor and at least one interface circuit, wherein the at least one interface circuit is used to perform transceiver functions and send instructions to the at least one processor. When the at least one processor executes the instructions, the at least one processor executes the method of the first aspect or any one of the embodiments of the first aspect; or, the at least one processor executes the method of the second aspect or any one of the embodiments of the second aspect.

[0069] The technical effects of the aforementioned aspects can be referenced with each other and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0070] FIG1 is a schematic diagram of a device permission sharing interface according to an embodiment of the present application;

[0071] FIG2 is a second schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

[0072] FIG3 is a schematic diagram of a communication system for applying the authority sharing method provided in an embodiment of the present application;

[0073] FIG4 is a schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application;

[0074] FIG5 is a schematic diagram of the hardware structure of a server provided in an embodiment of the present application;

[0075] FIG6 is a third diagram of a device authority sharing interface provided in an embodiment of the present application;

[0076] FIG7 is a fourth diagram of a device authority sharing interface provided in an embodiment of the present application;

[0077] FIG8 is a fifth diagram of a device permission sharing interface provided in an embodiment of the present application;

[0078] FIG9 is a sixth diagram of a device permission sharing interface provided in an embodiment of the present application;

[0079] FIG10 is a flowchart of a method for sharing permissions according to an embodiment of the present application;

[0080] FIG11 is a seventh schematic diagram of a device authority sharing interface provided in an embodiment of the present application;

[0081] FIG12 is a schematic diagram of an eighth device authority sharing interface provided in an embodiment of the present application;

[0082] FIG13 is a second flowchart of the permission sharing method provided in an embodiment of the present application;

[0083] FIG14 is a ninth diagram of a device authority sharing interface provided in an embodiment of the present application;

[0084] FIG15 is a schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

[0085] FIG16 is a schematic diagram 11 of a device authority sharing interface provided in an embodiment of the present application;

[0086] FIG17 is a third flowchart of the permission sharing method provided in an embodiment of the present application;

[0087] FIG18 is a fourth flowchart of the permission sharing method provided in an embodiment of the present application;

[0088] FIG19 is a fifth flowchart of the permission sharing method provided in an embodiment of the present application;

[0089] FIG20 is a schematic structural diagram of a first electronic device provided in an embodiment of the present application;

[0090] FIG21 is a schematic structural diagram of a second electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0091] The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to include expressions such as "one or more", unless there is a clear indication to the contrary in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two).

[0092] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

[0093] In the embodiments of this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0094] In some embodiments, the smart home system uses the home as a platform and leverages technologies such as the Internet of Things and automated control to organically integrate various electronic devices and application subsystems related to home life. Users can manage devices in the smart home system, such as smart wearables, smart refrigerators, smart curtains, smart door locks, and smart air purifiers, by logging into their smart life application accounts.

[0095] In some examples, after an electronic device (such as a mobile phone, tablet, etc.) logs in to a smart life application account, it binds to an IoT device in response to a user operation and obtains control permissions for the IoT device. In some examples, after an IoT device is bound to a smart life application account for the first time, the smart life application account becomes the primary account for managing the IoT device. After an electronic device logs in to the primary account, it can share the permissions to control the IoT device with other electronic devices, and the smart life application account logged in by other electronic devices is a slave account. That is, a slave account can obtain permissions to control some or all IoT devices under the primary account, and the control permissions obtained by the slave account may be less than or equal to the primary account's control permissions for the IoT device. Generally, for IoT devices, the electronic device logged in to the primary account is the primary device, and the electronic device logged in to the slave account is the slave device.

[0096] For example, as shown in Figure 1 (a), the mobile phone displays a smart life application interface 101, which is used to display cards of multiple IoT devices managed under the current smart life application account. The mobile phone detects that the user clicks on the dome light card 11, and can display a menu bar window 12 including the content of the operations that can be performed on the dome light card 11. The mobile phone detects the user's operation on the shared device control 13 displayed in the menu bar window 12, and determines that the user instructs to share the permission to control the dome light corresponding to the dome light card 11 with other electronic devices. Then, the mobile phone can display the interface 102 shown in Figure 1 (b), and display the sharing method of sharing permissions on the interface, such as scanning code sharing, sharing through Huawei account, and sharing with friends in the address book.

[0097] For example, the mobile phone detects the user's operation of the scan code sharing control 14 and determines that the user has instructed to share the control permission of the ceiling light with the peer device by scanning the QR code of the peer device. Then, as shown in Figure 2, the mobile phone (i.e., device 1) displays the code scanning interface. In addition, the user needs to open the QR code display interface of the peer device (i.e., device 2). After that, the user can use device 1 to scan the QR code displayed by device 2, and device 1 will share the control permission of the ceiling light with device 2.

[0098] It can be seen that in the above permission sharing process, users need to perform corresponding operations on both devices. The sharing path is relatively long and the operation is cumbersome, which affects user usage.

[0099] For example, when sharing device permissions through Huawei account sharing, the user needs to enter the Huawei account of the other device (such as the same as the Smart Life account of the other device). The electronic device can then share control permissions of the device selected by the user with the device logged in with the Huawei account. It can be seen that this process increases the difficulty for users to remember their Huawei account.

[0100] For example, when sharing device permissions through address book friends, the electronic device needs to respond to user actions, launch other applications, and display the address book friends' information for the user to select. The user must browse and select the friend account to share with. The electronic device then shares control permissions for the device selected by the user with the device corresponding to the selected friend account. As can be seen, this sharing process is relatively long and requires launching other applications, making the user's operation cumbersome.

[0101] Furthermore, after sharing device permissions through the various methods described above, users may have difficulty finding devices to which they have shared control permissions under the smart life app account that has obtained device control permissions. This can lead users to believe that the control permission sharing has failed, impacting their user experience. For example, if the smart life app account that has obtained device control permissions already has a large number of IoT devices, users may have difficulty locating the desired IoT device within the displayed information of multiple IoT devices, which can be quite challenging.

[0102] In this regard, an embodiment of the present application provides a permission sharing method. Through a simple approach or touch operation, a first electronic device can share the control authority of a smart device with a second electronic device, thereby simplifying the permission sharing steps and reducing the difficulty of user use.

[0103] Figure 3 is a schematic diagram of a communication system to which the authority sharing method provided in an embodiment of the present application is applied. As shown in Figure 2, the communication system includes a first electronic device 100, a second electronic device 200, a third electronic device 300 and a server 400.

[0104] Optionally, the first electronic device 100 may be a dedicated device for controlling smart home devices, or a device that includes the function of controlling smart home devices. For example, the first electronic device 100 may be a smart home device control panel, or a terminal device such as a mobile phone, tablet, smart speaker, or smart watch. A smart home device control panel is a dedicated device for controlling smart home devices in a smart home system. In some embodiments, the first electronic device 100 may be a fixed device or a portable device. This application does not impose any particular restrictions on the specific form of the first electronic device 100.

[0105] Optionally, as shown in FIG. 3 , the first electronic device 100 may be connected to one or more third electronic devices 300 for managing and controlling the third electronic devices 300 .

[0106] Optionally, the third electronic device 300 may be, for example, a speaker, a smart screen, a desk lamp, a light, a camera, an air purifier, a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a netbook, a wearable electronic device, an artificial intelligence terminal, or other terminal devices. This application does not impose any special restrictions on the specific form of the third electronic device 300. The operating system installed on the third electronic device 300 includes but is not limited to Or other operating systems. The third electronic device 300 may not have an operating system installed. In some embodiments, the third electronic device 300 may be a fixed device or a portable device. This application does not limit the specific type of the third electronic device 300, whether it has an operating system installed, or the operating system installed if an operating system is installed.

[0107] In some embodiments, the third electronic device 300 is an IoT device. The first electronic device 100 has a first application installed. The first application is capable of connecting to, editing, and controlling the IoT device. As shown in Figure 3, the first electronic device 100 connects to one or more third electronic devices 300 via the first application. Optionally, the first application is a smart living application.

[0108] In some examples, the first electronic device 100 completes the registration of the third electronic device 300 after logging into the first account of the first application. The first electronic device 100 sends the registration information of the third electronic device, such as device information, to the server 400. In some examples, the server 400 manages one or more third electronic devices 300 included in one or more homes on a home basis. During the registration process of the third electronic device 300, the server 400 adds the third electronic device 300 to the corresponding home. In some examples, one or more homes are managed under the first account of the first application logged in by the first electronic device 100. The server 400 can obtain the first account, one or more homes, and device information under different homes, and manage them.

[0109] Optionally, server 400 may be a device or network device with computing capabilities, such as a cloud server or a network server. Server 400 may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. Server 400 may also be described as a smart home cloud platform, used to manage smart home devices included in the smart home system and the scenarios corresponding to the smart home devices.

[0110] In some embodiments, a wireless communication connection is established between the first electronic device 100 and the second electronic device 200. The wireless communication technology used to establish the wireless communication connection includes, but is not limited to, at least one of the following: Bluetooth (BT) (e.g., traditional Bluetooth or Bluetooth low energy (BLE)), wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) networks), near field communication (NFC), Zigbee, frequency modulation (FM), infrared (IR), etc.

[0111] Optionally, the first electronic device 100 and the second electronic device 200 may also establish a communication connection through a third-party device in the local area network, such as a router, a gateway, a smart device controller, a server, etc.

[0112] In some embodiments, the second electronic device has the first application installed and is logged into a second account of the first application. In some examples, the second electronic device needs to obtain permission to control the third electronic device 300. The user can share the permission to control the third electronic device 300 with the second electronic device 200 by operating the first electronic device 100 that has the ability to control the third electronic device 300.

[0113] In some examples, the second electronic device 200 is a device that includes a function of controlling smart home devices, and the device type of the second electronic device 200 is the same as or different from the device type of the first electronic device 100. The second electronic device 200 can be connected to one or more third electronic devices 300 and control the one or more connected third electronic devices 300 through the first application. It should be understood that the third electronic device 300 connected to the first electronic device 100 and the third electronic device 300 connected to the second electronic device 200 are the same, different, or partially the same. The third electronic device 300 that the first electronic device 100 shares control authority with the second electronic device 200 is a device that has not established a connection with the second electronic device 200.

[0114] In some embodiments, the operating system is, for example, a smart home system, and the third electronic device 300 is a smart home device. Alternatively, the operating system is a smart office system, and the third electronic device 300 is a smart office device. Alternatively, the communication system may be another communication system, such as a smart campus communication system, which is not limited in this embodiment of the present application. The following describes in detail the permission sharing method provided in the embodiment of the present application, taking the communication system as a smart home system and the third electronic device 300 as a smart home device as an example.

[0115] Optionally, the first electronic device 100, the second electronic device 100, the third electronic device 300, and the server 400 in the embodiment of the present application may be implemented by different devices, and the different devices may have the same, similar, or somewhat different hardware structures, such as the hardware structure shown in Figure 4 or Figure 5.

[0116] For example, taking the first electronic device 100 having the hardware structure shown in FIG. 4 as an example, the hardware structure shown in FIG. 4 is described.

[0117] For example, FIG4 shows a schematic structural diagram of the first electronic device 100 .

[0118] The first 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 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.

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

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

[0121] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0122] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

[0123] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.

[0124] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor, charger, flash, camera 193, etc. via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor via the I2C interface, allowing the processor 110 to communicate with the touch sensor via the I2C bus interface, thereby implementing the touch function of the first electronic device 100.

[0125] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the first electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to implement the display function of the first electronic device 100.

[0126] The USB interface 130 is an interface that complies with USB standards and specifications, and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the first electronic device 100, or to transfer data between the first electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices.

[0127] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative description and does not constitute a structural limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may also adopt a different interface connection method from the above embodiments, or a combination of multiple interface connection methods.

[0128] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the first electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0129] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

[0131] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in first electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.

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

[0133] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs the sound signal through the audio device or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.

[0134] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied on the first electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0135] In some embodiments, the antenna 1 of the first electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the first electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0136] In some embodiments, the first electronic device 100 communicates with the server 400 and the second electronic device 200 through the mobile communication module 150 or the wireless communication module 160 to achieve sharing of control authority of the third electronic device 300, etc.

[0137] The first electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. The GPU is a microprocessor for image processing that connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.

[0138] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be manufactured using a liquid crystal display (LCD), for example, an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Mini-LED, Micro-LED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the first electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.

[0139] In some embodiments, while the first electronic device 100 is displaying the first application on the display screen 194, in response to a user operation, it determines that the user has instructed to share the third electronic device 300. Subsequently, in response to the user's tap operation, the first electronic device 100 obtains the identification code of the second electronic device 200. Based on this identification code, the first electronic device 100 and the second electronic device 200 establish a secure communication connection. Subsequently, based on the interaction of this secure communication connection, the first electronic device 100 can obtain the account logged in by the second electronic device, and then request a sharing code from the server 400 through the wireless communication module 160 to share control rights of the third electronic device 300 with the second electronic device 200. In this way, the second electronic device 200 can subsequently obtain permission to control the third electronic device 300 based on this sharing code.

[0140] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the first electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0141] 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 first electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored in the external memory card.

[0142] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the first electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the first electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.

[0143] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be set in the processor 110, or some functional modules of the audio module 170 can be set in the processor 110. The first electronic device 100 can use the audio module 170, such as music playback and recording. The audio module 170 may include a speaker, a receiver, a microphone, a headphone jack, and an application processor to implement audio functions.

[0144] The sensor module 180 may include a pressure sensor, a gyro sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, and the like.

[0145] A touch sensor, also known as a "touch device," can be provided on the display screen 194. The touch sensor and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor can also be provided on the surface of the first electronic device 100, at a location different from that of the display screen 194.

[0146] The buttons 190 include a power button, a volume button, etc. The buttons 190 may be mechanical buttons or touch buttons. The first electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the first electronic device 100.

[0147] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0148] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0149] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and disconnected from the first electronic device 100 by inserting or removing the SIM card into or from the SIM card interface 195. The first electronic device 100 may support one or N SIM card interfaces, where N is a positive integer greater than one.

[0150] For example, the server 400 having the hardware structure shown in FIG. 5 is taken as an example to describe the hardware structure shown in FIG. 5 .

[0151] 5 is a schematic diagram of the hardware structure of a server 400 provided in an embodiment of the present application. The server 400 includes at least one processor 401, a communication line 402, a memory 403, and at least one communication interface 404. The memory 403 may also be included in the processor 401.

[0152] It should be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on server 400. In other embodiments of the present application, server 400 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0153] The processor 401 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present application.

[0154] The communication link 402 may include a pathway for transmitting information between the aforementioned components.

[0155] Communication interface 404 is used to communicate with other devices. In embodiments of the present application, the communication interface can be a module, circuit, bus, interface, transceiver, or other device capable of implementing communication functions, used to communicate with other devices. Optionally, when the communication interface is a transceiver, the transceiver can be an independently provided transmitter that can be used to send information to other devices, or the transceiver can be an independently provided receiver that is used to receive information from other devices. The transceiver can also be a component that integrates the functions of sending and receiving information. Embodiments of the present application do not limit the specific implementation of the transceiver.

[0156] The memory 403 may be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compact disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory may exist independently and be connected to the processor via a communication line 402. The memory may also be integrated with the processor.

[0157] The memory 403 is used to store computer-executable instructions for implementing the solution of the present application, and is controlled by the processor 401. The processor 401 is used to execute the computer-executable instructions stored in the memory 403, thereby implementing the authority sharing method provided in the following embodiments of the present application.

[0158] Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, instructions, computer programs or other names, which are not specifically limited in the embodiments of the present application.

[0159] In a specific implementation, as an embodiment, the processor 401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 5 .

[0160] In a specific implementation, as an embodiment, server 400 may include multiple processors, such as processor 401 and processor 405 in FIG5 . Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. A processor herein may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0161] The device structures described in FIG. 4 and FIG. 5 may also be applicable to a second electronic device or other two devices for authority sharing.

[0162] In the following, the permission sharing method provided in the embodiment of the present application is described in detail, taking the first electronic device 100 as a device having control authority over the third electronic device 300, the second electronic device 200 as a device that needs to obtain control authority over the third electronic device 300, the third electronic device 300 as an IoT device (such as a smart device such as a smart home device), and the server 400 as a smart home cloud server as an example.

[0163] In some embodiments, the first electronic device starts a first application (such as a smart life application) in response to a user operation. Optionally, the smart life application is used to manage at least one smart device included in the home.

[0164] In some examples, while a first electronic device is running a first application, the first electronic device may, in response to a user operation, share control permissions for at least one smart device in the home with a second electronic device. Optionally, the control permissions are permission ranges specified by the user of the first electronic device. For example, in response to a user's setting operation, the first electronic device may determine that the shared control permissions include permission to control the startup or shutdown of the smart device, but do not include permission to adjust parameters.

[0165] In some examples, when a first electronic device displays a first sharing interface and detects a user's operation on a first interface element in the first sharing interface, it can determine that the user instructed to share control permissions for a first target smart device corresponding to the first interface element with a second electronic device. Then, in response to approaching or touching the second electronic device, the first electronic device can share control permissions for the first target smart device corresponding to the first interface element with the second electronic device.

[0166] Optionally, the first sharing interface is a device management interface, which is used to display a card corresponding to at least one smart device in the home, and the card is used to control the corresponding smart device, so that the user can manage the at least one smart device through the device management interface. The first interface element is, for example, a card displayed on the first sharing interface.

[0167] Optionally, the approach or touch is based on one or more of NFC technology, BLE Bluetooth technology, and neighbor awareness networking (NAN) communication technology. Optionally, the communication technology based on NAN is, for example, wireless fidelity surrounding perception Wi-Fi aware communication technology. Optionally, in some sharing scenarios supported by possible short-range communication technologies, there is no need for clear approach or touch actions between devices. Instead, when the distance between devices is within a certain range, they can directly establish a connection through the corresponding communication technology and share with each other.

[0168] For example, as shown in FIG6 (a), the first electronic device displays a first sharing interface 601. This sharing interface 601 is a device management interface that includes cards corresponding to multiple smart devices included in a home (such as A's home). The cards display partial information, control buttons, etc. of the smart devices. The user can select the devices to be shared according to their needs. For example, the first electronic device detects the user's operation on card 61 (i.e., the first interface element) and displays a menu bar window 62. Afterwards, the first electronic device detects the user clicking on the sharing device control 63 displayed in the menu bar window 62 and determines that the user instructs to share the ceiling light in the living room corresponding to card 61 (i.e., the first target smart device). That is, the first electronic device detects the user's operation of instructing to share the device. Afterwards, as shown in FIG6 (b) interface 602, the first electronic device may display a window 64, in which a card 65 corresponding to the first target smart device selected by the user for sharing is displayed. It should be understood that the number of devices selected for sharing by the user is one or more. In addition, the device sharing method is also displayed in the window 64. As shown by reference numeral 66, the first electronic device can display a prompt message to prompt the user to share the device by touching it.

[0169] This allows users to share control of a smart device managed by a first electronic device with a second electronic device through short-range communication, such as proximity or a tap. Compared to other device sharing methods, users no longer need to enter their Huawei ID or launch other apps on the first electronic device, significantly simplifying user operations.

[0170] In some embodiments, the first interface element includes a display element associated with the first target smart device, and the first electronic device can also share the first interface element with the second electronic device.

[0171] For example, if the first interface element is a card, then in the above example scenario, the first electronic device can also share the card with the second electronic device. Then, after the second electronic device displays the card, the user can control the first target smart device through the card.

[0172] For example, as shown in the device management interface 701 in (a) of FIG7 , as shown in the reference numeral 71, the home managed by the second electronic device (such as B's home) includes 11 smart devices, and the device management interface 701 displays cards corresponding to these 11 smart devices. Subsequently, the second electronic device obtains control authority for the first target smart device (such as the light in the living room) in response to approaching or touching the first electronic device, and obtains the first interface element corresponding to the first target smart device (such as the card corresponding to the light in the living room). Then, as shown in the interface 702 in (b) of FIG7 , as shown in the reference numeral 72, the number of smart devices in B's home managed by the second electronic device becomes 12, and the second electronic device can display the first interface element (such as card 73).

[0173] In this way, the second electronic device can not only obtain the permissions of the smart device shared by the first electronic device, but also directly obtain the interface elements shared by the first electronic device for controlling the smart device, thereby making it easier for the user to determine the entry point for controlling the smart device and simplifying the user's operation.

[0174] In some embodiments, the user can select one or more smart devices to be shared in the device management interface through the above method. In some examples, the first electronic device can create a scene or space based on user operations. Then, the user can also directly select the scene or space to be shared, so that the first electronic device can directly share the control rights of multiple smart devices in the scene or space selected by the user to the second electronic device based on the user's operation. That is, the first sharing interface includes a device management interface for managing at least one smart device, or a space management interface associated with the space where the first target smart device is located.

[0175] Optionally, the above space is, for example, an entire home, or a room in a home, or an office or conference room in an office setting.

[0176] Optionally, the sharing of the control authority of the smart device in the scene includes not only sharing the control authority of the smart device in the scene with the second electronic device, but also includes editing authority of the scene. Optionally, the user can select the scope of the shared control authority.

[0177] For example, as shown in FIG8 , the first interface element displayed by the first electronic device on the smart life application interface 801 includes not only a card 81 corresponding to a smart device, but also a card 82 corresponding to a scene and a card 83 corresponding to a space. Then, in response to the user's operation on card 82 (or card 83), the first electronic device may determine that the user instructs to share the control rights of multiple smart devices in the scene (or space) corresponding to card 82 (or card 83) with the second electronic device. For example, the multiple smart devices include a first target smart device and a second target smart device, and the first target smart device and the second target smart device belong to the same space or the same scene. In response to approaching or touching the second electronic device, the first electronic device shares the control rights of the first target smart device and the second target smart device corresponding to the first interface element with the second electronic device.

[0178] 9 , the second electronic device can also obtain the first interface element shared by the first electronic device. As shown in interface 901 , the second electronic device can display a scene card 91 , a space card 92 , and a device card 93 shared by the first electronic device.

[0179] In this way, in a richer smart device management scenario, users can share the control permissions of multiple smart devices in a scene or space to a second electronic device through simple operations, thereby improving the user experience.

[0180] In some scenarios, a first electronic device establishes a short-range communication connection in response to proximity or contact with a second electronic device, thereby sharing control permissions of the first target smart device with the second electronic device based on this short-range communication connection. The following describes in detail the method for establishing a short-range communication connection and sharing control permissions based on this short-range communication connection, using the method shown in Figure 10.

[0181] Figure 10 is a flowchart of a permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to Figure 10 and the specific order described below. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0182] S1001: A first electronic device detects a user instructing a device sharing operation in a first application.

[0183] The first application is, for example, a smart life application for managing and controlling the third electronic device. The operation of instructing the sharing device is, for example, an operation of the user selecting the third electronic device to be shared.

[0184] For example, as shown in FIG6(a), while the first electronic device is displaying the smart life application interface 601, it detects a user operation on a card 61 and displays a menu bar window 62. Subsequently, the first electronic device detects a user click on a shared device control 63 displayed in the menu bar window 62 and determines that a user operation to share a device has been detected.

[0185] S1002: In response to a preset operation, the first electronic device obtains an identification code generated by the second electronic device.

[0186] In some examples, the preset operation is, for example, a tap operation to initiate a near field communication connection (such as an NFC connection). It should be understood that the preset operation can also be other operations that are convenient for the user to implement, such as a shake operation.

[0187] In some embodiments, the second electronic device generates an identification code after launching the first application in response to a user operation, and writes the identification code into the NFC tag. Optionally, after writing the identification code into the NFC tag, the second electronic device can mark the NFC mode as tag mode. In this way, after the first electronic device and the second electronic device detect the user's bump operation, the first electronic device can read the preset identification code in the NFC tag of the second electronic device. Optionally, the NFC mode of the first electronic device is reader mode.

[0188] Optionally, the identification code generated by the second electronic device is, for example, a personal identification number (PIN) code.

[0189] In some examples, the second electronic device may not have a pre-set identification code, but instead generate an identification code according to a preset period in response to a tap operation on the first electronic device. In this way, the first electronic device can also obtain the identification code generated by the second electronic device. Optionally, the second electronic device generates an identification code in response to a tap operation on the first electronic device while in any display interface. Optionally, the second electronic device generates an identification code in response to the tap operation and launches the first application.

[0190] For example, the first electronic device determines the second electronic device located nearby through Bluetooth distance measurement or other methods. In addition, the second electronic device is pre-installed with a vibration sensor. In response to a preset user operation, the second electronic device can detect the touch operation through the vibration sensor and generate an identification code.

[0191] In some embodiments, after the second electronic device starts the first application and writes the generated identification code into the NFC tag, it marks its own NFC mode as tag mode. Subsequently, if the second electronic device detects the user's instruction to share the device in the first application, it can modify the NFC mode mark to reader mode. Optionally, when the NFC mode of the second electronic device is reader mode, the identification code in the NFC tag can be deleted. Subsequently, after the second electronic device exits the device sharing interface, it can trigger the generation of the identification code again. Alternatively, the second electronic device does not delete the identification code in the NFC tag.

[0192] In this way, compared with other sharing methods, users no longer need to enter their Huawei account or open other applications through the first electronic device, which effectively simplifies user operations.

[0193] S1003: The first electronic device and the second electronic device negotiate a communication key based on the identification code and establish a secure communication connection.

[0194] In some embodiments, after obtaining the identification code of the second electronic device, the first electronic device may send a Bluetooth connection request to the second electronic device. Alternatively, the first electronic device may send the Bluetooth connection request to the second electronic device via Bluetooth broadcast. Correspondingly, after performing the bump operation, the second electronic device may enable Bluetooth broadcast to receive the Bluetooth connection request broadcast by the first electronic device.

[0195] In some embodiments, in response to a Bluetooth connection request, the first and second electronic devices may establish a Bluetooth connection. In some examples, to ensure the security of Bluetooth communication, the first and second electronic devices may negotiate a key based on the identification code of the second electronic device to generate a communication key. Subsequently, the first and second electronic devices encrypt communication data using the communication key, thereby ensuring the security of communication data transmission, thereby establishing a secure communication connection.

[0196] In some examples, during the communication key negotiation process, the first electronic device sends sin1 to the second electronic device, and the second electronic device sends sin2 to the second electronic device. Subsequently, the first electronic device and the second electronic device may generate the same communication key based on sin1, sin2, and the identification code of the second electronic device. Optionally, sin1 is, for example, a sin code pre-set in the first electronic device, or a sin code generated by the first electronic device using a preset algorithm. Sin2 is, for example, a sin code pre-set in the second electronic device, or a sin code generated by the second electronic device using a preset algorithm.

[0197] In other examples, the first electronic device and the second electronic device are pre-set with an identical number (eg, a large number greater than a preset threshold), and the first electronic device and the second electronic device can generate the same communication key based on the number and the identification code of the second electronic device.

[0198] It should be understood that in addition to the two communication key negotiation methods exemplified above, the first electronic device and the second electronic device may also perform communication key negotiation through other methods, which will not be exemplified one by one in the embodiments of the present application.

[0199] S1004: The first electronic device obtains the login account of the second electronic device through a secure communication connection.

[0200] In some examples, the account logged into the second electronic device is, for example, the smart life application account currently managing the first target smart device. Alternatively, the account can also be a device-level account, such as a Huawei account.

[0201] In some embodiments, during device sharing, a first electronic device shares device permissions with a second electronic device. Based on this, the first electronic device is described as the owner device, and the account used to log in to the first electronic device is ownerId. The second electronic device is described as the member device, and the account used to log in to the second electronic device is UserId.

[0202] In some embodiments, after establishing a secure communication connection with the first electronic device, the second electronic device may send the UserId encrypted with the communication key to the first electronic device. In some examples, the second electronic device may also send the UserId to the first electronic device in response to an account acquisition request sent by the first electronic device.

[0203] Optionally, the above steps S1002 and S1003 are optional steps. In response to a preset operation, the first electronic device can also directly obtain the first account (such as a Smart Life account or a Huawei account) logged in by the second electronic device.

[0204] S1005: The first electronic device sends the device identification of the device to be shared and the account number used to log in to the second electronic device to the server.

[0205] In some embodiments, in response to a user's instruction to share a device, the first electronic device may determine the device to be shared and the device identifier of the device to be shared. Then, after obtaining the account number logged in by the second electronic device, the first electronic device may send the device identifier and the account number to the server to request a sharing code for sharing the device corresponding to the device identifier with the account number.

[0206] For example, the first electronic device sends the device identifier (deviceId) of the device to be shared and the member UserId of the second electronic device to the server.

[0207] S1006. The server generates a sharing code according to the device identification and the account number logged in by the second electronic device.

[0208] In some embodiments, after receiving the deviceId and member UserId sent by the first electronic device, the server determines that the third electronic device corresponding to the deviceId is a device controlled by the account logged in by the first electronic device. Thereafter, the server may generate a corresponding share code (shareCode).

[0209] In some examples, the sharing code generated by the server is configured with expiration conditions, such as a usage limit or a usage time limit. For example, to ensure the security of device permission sharing, the sharing code can be used at most once. Optionally, the server can also set an expiration period for the sharing code, such as 5 minutes.

[0210] S1007: The server sends a sharing code to the first electronic device.

[0211] In some embodiments, after generating the sharing code, the server feeds the sharing code back to the first electronic device. Correspondingly, the first electronic device receives the sharing code fed back by the server.

[0212] S1008: The first electronic device sends a sharing code to the second electronic device.

[0213] In some embodiments, after receiving the sharing code, the first electronic device encrypts the sharing code using the communication key. The first electronic device then sends the encrypted sharing code to the second electronic device. In response, the second electronic device receives the encrypted sharing code sent by the first electronic device. The second electronic device then decrypts the encrypted sharing code to obtain the sharing code.

[0214] S1009: The second electronic device sends a device sharing request to the server, where the device sharing request carries a sharing code.

[0215] In some embodiments, after obtaining the sharing code, the second electronic device may send a device sharing request to the server to request control authority for the device corresponding to the sharing code carried in the device sharing request. Correspondingly, the server receives the device sharing request sent by the second electronic device.

[0216] In some examples, when the first application is logged in to its own first application account, the second electronic device sends a device sharing request to the server so that its own first application account can obtain control authority over the device to be shared.

[0217] S1010: The server establishes a sharing relationship between the second electronic device and the device to be shared based on the account and sharing code logged in by the second electronic device.

[0218] In some embodiments, after receiving the device sharing request, the server parses and authenticates the sharing code. For example, the server determines whether the sharing code is correct, such as by determining whether the sharing code is generated by the server and meets the expiration requirements. If the sharing code is correct, the server further parses and authenticates the sharing code. If the sharing code is incorrect, the server sends a device sharing failure response to the second electronic device.

[0219] Afterwards, if the sharing code is correct, the server obtains the device identifier and first application account indicated by the sharing code. The server then determines whether the account logged in by the second electronic device that sent the device sharing request is the same as the first application account indicated by the sharing code. If so, the server determines that the second electronic device meets the sharing conditions and can share the device to be shared corresponding to the device identifier with the second electronic device. If not, the server determines that the second electronic device does not meet the sharing conditions and can send a device sharing failure response to the second electronic device.

[0220] In some embodiments, the server manages one or more third electronic devices under the account of the first application through the account of the first application. Then, the server can establish a sharing relationship between the second electronic device and the device to be shared by adding the device identifier of the device to be shared to the account logged in by the second electronic device.

[0221] In some embodiments, after the server establishes a sharing relationship between the second electronic device and the device to be shared, it may send a sharing success response to the second electronic device. Optionally, the sharing success response carries device information of the device to be shared, such as a device identifier, a device media access control (MAC) address, etc. In this way, after receiving the sharing success response, the second electronic device can obtain the authority to control the device to be shared, such as establishing a communication connection with the device to be shared based on the device information carried in the sharing success response. Optionally, the authority to control the device to be shared includes, for example, the authority to use the device to be shared, the authority to share the device to be shared again, the authority to terminate the sharing relationship with the device to be shared, etc.

[0222] In some examples, the second electronic device's control authority over the device to be shared is less than or equal to the first electronic device's control authority over the device to be shared. In some examples, the first electronic device can determine the scope of authority to share with the second electronic device to control the device to be shared based on user operations.

[0223] In this way, the first electronic device and the second electronic device complete the sharing of device control authority based on near field communication, thereby improving the real-time and interactivity of authority sharing, thereby enhancing the user experience.

[0224] Moreover, during the device sharing process, the user only needs to perform a simple touch operation to trigger the first electronic device and the second electronic device to automatically complete the permission sharing, which is simple for the user to operate and effectively reduces the difficulty of user operation.

[0225] In some scenarios, since the second electronic device may control other devices, after the device sharing is completed, the user may not know that the device has been shared successfully, or may not be able to find the control entrance of the shared device, which affects the user's experience. Based on this, the permission sharing method provided in the embodiment of the present application can display a sharing animation on the first electronic device and / or the second electronic device after the device permissions are shared to help the user confirm the device permission sharing status.

[0226] In some examples, the first electronic device presents an animation on the first sharing interface, which prompts the user to share the first target smart device corresponding to the first interface element to the second electronic device. For example, the animation includes an animation of the first interface element associated with the first target smart device moving out.

[0227] For example, as shown in interface 602 in FIG6(b), in response to the user's tap operation, the first electronic device determines that the living room ceiling light corresponding to card 65 has been successfully shared with the second electronic device. Then, as shown in interface 101 in FIG11, the first electronic device may display a sharing animation of card 65 moving out of window 64, thereby vividly informing the user that control of the living room light has been shared with the other device.

[0228] In other examples, the second electronic device displays an animation that prompts the second electronic device to obtain control permission for the first target smart device. For example, the animation includes an animation of a first interface element associated with the first target smart device moving in.

[0229] For example, as shown in Figure 12(a), while the second electronic device is displaying smart life application interface 1201, in response to a user's tap operation, it determines that it has successfully obtained control permission for the living room ceiling light controlled by the first electronic device. Then, as shown in interface 1202 in Figure 12(b), the second electronic device may display card 121 (i.e., the first interface element) corresponding to the living room ceiling light. Optionally, the display content of card 121 corresponding to the living room ceiling light may be notified by the first electronic device or server, or automatically generated by the second electronic device based on device information.

[0230] In some examples, on the smart life application interface, the second electronic device displays multiple cards corresponding to multiple devices in sequence according to certain rules. For example, the display position of the cards corresponding to the devices is arranged according to the device location, device usage frequency, device type, etc. Therefore, after the second electronic device obtains the control authority of the ceiling light in the living room and displays the corresponding card 121, it can display an animation until the card 121 moves to the appropriate display position shown in the interface 1203 shown in Figure 12 (c). That is, through the moving-in animation, the user is vividly informed that the second electronic device has obtained the control authority of the living room light, and helps the user quickly determine the display position of the card 121 corresponding to the living room light, so that the user can operate the card 121 corresponding to the living room light.

[0231] In some embodiments, as shown in the method of FIG10 above, the first electronic device shares control permissions of the first target smart device through interaction with the second electronic device and the server. After the permissions are successfully shared, the first and second electronic devices can also interact to obtain a message indicating the sharing success, thereby displaying a sharing animation.

[0232] Figure 13 is a flow chart of another permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to Figure 13 and the specific order described below. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0233] S1301. The server sends a sharing success response to the second electronic device.

[0234] S1302: The server sends a sharing success response to the first electronic device.

[0235] In some embodiments, after determining that a sharing relationship is established between the second electronic device and the device to be shared, the server may send a sharing success response to the first electronic device and the second electronic device respectively to inform the first electronic device and the second electronic device that the current server has shared the permissions of the device to be shared with the second electronic device.

[0236] In some examples, the server can determine the first electronic device corresponding to the sharing code based on the sharing code carried in the device sharing request sent by the second electronic device. After confirming that the sharing relationship has been established, the server can send a sharing success response to the first electronic device, and the sharing success response can include the device identifier of the device to be shared and the first application account of the second electronic device. In this way, after receiving the sharing success response, the first electronic device can determine which smart devices have been shared with which control device.

[0237] In some examples, the successful sharing response sent by the server to the second electronic device carries the device information of the successfully shared smart device. Alternatively, the successful sharing response sent by the server to the second electronic device does not carry the device information of the successfully shared smart device, and after receiving the successful sharing response, the first electronic device sends the device information of the successfully shared smart device to the second electronic device through the secure communication connection between the first electronic device and the second electronic device.

[0238] In some examples, the server may first send a sharing success response to the first electronic device, and then send a sharing success response to the second electronic device. Alternatively, the server may first send a sharing success response to the second electronic device, and then send a sharing success response to the first electronic device. That is, the embodiments of the present application do not limit the execution order of step S1301 or step S1302.

[0239] In other examples, the server may send a sharing success response to the first electronic device or the second electronic device separately.

[0240] For example, after the server sends a successful sharing response to the second electronic device, the second electronic device determines that the device indicated by the successful sharing response corresponds to the first electronic device. Subsequently, the second electronic device, through a secure communication connection with the first electronic device, sends a successful device sharing indication to the first electronic device. This successful device sharing indication carries the device identifier of the successfully shared smart device. Thus, upon receiving the successful device sharing indication, the first electronic device can also determine that the device corresponding to the device identifier has been shared with the second electronic device. That is, step S1302 is an optional step.

[0241] For another example, after the server sends a successful sharing response to the first electronic device, the first electronic device determines the device that has been successfully shared as indicated by the successful sharing response and the corresponding second electronic device. Subsequently, the first electronic device sends a successful device sharing indication to the second electronic device through a secure communication connection with the second electronic device. This successful device sharing indication carries the device information of the successfully shared smart device. Thus, after receiving the successful device sharing indication, the second electronic device can also determine that it has obtained control authority for the device corresponding to the device information. That is, step S1301 is an optional step.

[0242] S1303: The first electronic device displays a sharing animation.

[0243] In some embodiments, after determining the device that has been shared successfully, the first electronic device may display a sharing animation to prompt the user that the device has been shared with other devices.

[0244] It should be understood that after the first electronic device shares the authority to control a smart device with other devices, the first electronic device still has the authority to control the smart device.

[0245] S1304: The second electronic device displays a sharing animation.

[0246] In some embodiments, after determining that the device has been shared successfully, the second electronic device may display a sharing animation to prompt the user that the user has currently obtained permission to control the device.

[0247] It should be understood that the embodiment of the present application does not limit the execution order of step S1303 and step S1304, and whether step S1303 or step S1304 is executed.

[0248] In this way, by displaying the sharing animation, users can quickly confirm the device sharing status, accurately control the shared devices, and effectively improve the user experience.

[0249] In some scenarios, the user operating the second electronic device may need to control all third electronic devices in a home controlled by the first electronic device. Through the method shown in Figure 10 above, the control authority of all third electronic devices can be shared, but the process of selecting the third electronic device may be more complicated and the data transmission volume is large.

[0250] In some embodiments, the first sharing interface displayed by the first electronic device may also be a space management interface associated with the space where the first target smart device is located. In this way, in response to approaching or bumping the second electronic device, the first electronic device may share control permissions for the smart devices managed in the space management interface with the second electronic device.

[0251] For example, as shown in FIG14(a), the first electronic device displays a smart life application interface 1401. The account currently logged into the smart life application manages one or more homes, as indicated by reference numeral 141. The currently displayed home is A's home. In response to a user operating the control indicated by reference numeral 141, the first electronic device displays a menu bar window 142. Subsequently, in response to a user operating the home management control 143 in menu bar window 142, the first electronic device may display a home management interface 1402 as shown in FIG14(b). In response to a user operating control 144 on home management interface 1402, the first electronic device may display a home details page 1403 (i.e., a first sharing interface) as shown in FIG14(c). Home details page 1403 displays detailed information about A's home, such as the home name, home location, and family members. Subsequently, the first electronic device detects a user operating the add member control 145 (i.e., a first interface element) and determines that the user has instructed to add a family member to A's home. Afterwards, the first electronic device determines to share the currently displayed A's home with the second electronic device in response to the user's tap operation.

[0252] In some examples, the first interface element includes a display element associated with adding a user, such as the add member control 145. The added user is used to control the first target smart device. After the smart devices in the home are successfully shared, the first electronic device may display a second interface element, which includes a display element associated with the user of the second electronic device. Optionally, the first electronic device may also display an animation, which includes a display element associated with the user of the second electronic device moving in.

[0253] For example, as shown in interface 1404 in FIG. 14(d), the first electronic device displays a sharing animation. As shown in reference numeral 146, the first electronic device displays an animation of the avatar (or family icon) of the smart life application logged in by the second electronic device moving to the currently displayed family details page. Subsequently, as shown in interface 1501 in FIG. 15, the first electronic device displays avatars 151 (i.e., the second interface element) in the family details section of A's home. If avatar 151 is the avatar of the smart life application account logged in by the second electronic device, the user can confirm that the current home has been successfully shared with the second electronic device.

[0254] In some examples, after the permissions of the smart device are successfully shared, the second electronic device may also display an animation.

[0255] For example, as shown in interface 1601 in Figure 16(a), the second electronic device displays a smart life application. As indicated by reference numeral 161, the home managed by the account currently logged into the smart life application is B's home, which includes 11 devices. Subsequently, in response to the user's tap operation, the second electronic device determines that home sharing is successful. Then, as shown in interface 1602 in Figure 16(b), the second electronic device displays an animation of the avatar (or home icon) 162 of the smart life application logged into by the first electronic device flying into the currently displayed smart life interface, thereby helping the user confirm that home sharing has been completed.

[0256] In some examples, users need to operate devices in their home when performing family sharing. Therefore, after obtaining control permissions for the home shared by the first electronic device, the second electronic device can switch to display the device management interface of the home, making it easier for users to operate devices.

[0257] For example, as shown in interface 1603 in FIG16(c), after displaying the home sharing animation, the second electronic device can directly switch to displaying the device management interface corresponding to A's home that has been successfully shared, as shown by reference numeral 163. This simplifies the user's home switching operation and improves the user experience.

[0258] Optionally, to enable the first electronic device and the second electronic device to display other content of the shared animation, reference may be made to the relevant content of steps S1301 to S1304 shown in FIG13 above, which will not be described in detail in this embodiment of the present application.

[0259] In this way, during the home sharing process, the user only needs to perform a simple touch operation to trigger the first electronic device and the second electronic device to automatically complete the sharing of the home group. The user operation is simple and effectively reduces the difficulty of user operation.

[0260] Furthermore, the first electronic device and the second electronic device complete home sharing based on near field communication, thereby improving the real-time and interactivity of home sharing, thereby enhancing the user experience.

[0261] In some scenarios, a first electronic device establishes a short-range communication connection in response to proximity or contact with a second electronic device. This short-range communication connection allows the control rights of the first target smart device in the home to be shared with the second electronic device. The following describes a method for sharing control rights within a home group, as shown in Figure 17.

[0262] In some examples, the server can achieve permission sharing of all third electronic devices in the home by adding the first application account of the second electronic device as a family member of a home in the first application account of the first electronic device, enriching the device permission sharing scenarios and improving the user experience.

[0263] Figure 17 is a flowchart of another permission sharing method provided by an embodiment of the present application. It should be noted that the method is not limited to Figure 17 and the specific order described below. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0264] S1701: The first electronic device detects that a user instructs to add a family member in a first application.

[0265] In some embodiments, the first application of the first electronic device provides an entry for adding family members. For example, a user can add a family member by entering a Huawei ID. As can be seen, this is difficult because the user needs to remember the Huawei ID. Therefore, based on the permission sharing method illustrated in Figure 10 above, the first and second electronic devices can also complete the addition of family members through near-field communication.

[0266] For example, as shown in the family details page 1403 in (c) of FIG14 , the first electronic device detects the user's operation on the add member control 145 and determines that the user instructs to add a family member to A's home.

[0267] S1702: In response to a preset operation, the first electronic device obtains an identification code generated by the second electronic device.

[0268] S1703: The first electronic device and the second electronic device negotiate a communication key based on the identification code and establish a secure communication connection.

[0269] S1704: The first electronic device obtains the login account of the second electronic device through a secure communication connection.

[0270] In some embodiments, when the first electronic device is displaying a family details page (e.g., family details page 1403), if a preset operation (e.g., a tap operation) is detected, the first electronic device may determine that a user operation to add a family member has been detected. That is, while the first electronic device is displaying the family details page, the user can directly trigger the first electronic device to add a family member through the tap operation without having to operate the add member control, thereby simplifying the user operation.

[0271] Optionally, for other contents of step S1702 to step S1704, reference may be made to the relevant contents of the above-mentioned step S1002 to step S1004, which will not be repeated here.

[0272] S1705. The first electronic device sends to the server the home identifier of the first application currently displaying home and the account number logged in by the second electronic device.

[0273] In some embodiments, while running a first application, a first electronic device detects a user's instruction to add a family member. Therefore, the first electronic device can determine which home managed by the first application account is currently displayed by the first application, and can then obtain the home ID of the home. Then, after obtaining the account logged in by the second electronic device, the first electronic device can send the home ID and the account to the server to request a sharing code for adding the account to the home corresponding to the family ID.

[0274] For example, the first electronic device sends the home identifier (homeId) of the first application currently displaying home and the member UserId of the second electronic device to the server.

[0275] In some examples, the account logged into by the first electronic device manages only one home. Then, after obtaining the account logged into by the second electronic device, the first electronic device can directly send this account to the server to obtain a sharing code. In other words, the first electronic device does not need to send the home identifier to the server again. The server can then determine a unique home based on the account logged into by the first electronic device and generate a corresponding sharing code.

[0276] S1706. The server generates a sharing code based on the family ID and the account logged in by the second electronic device.

[0277] In some embodiments, after receiving the homeId and member UserId sent by the first electronic device, the server determines that the home corresponding to the homeId is the home managed under the account logged in by the first electronic device. Thereafter, the server may generate a corresponding sharing code (shareCode).

[0278] In some examples, the sharing code generated by the server is configured with expiration conditions, such as a usage limit or a usage time limit. For example, to ensure the security of device permission sharing, the sharing code can be used at most once. Optionally, the server can also set an expiration period for the sharing code, such as 5 minutes.

[0279] S1707: The server sends a sharing code to the first electronic device.

[0280] S1708: The first electronic device sends a sharing code to the second electronic device.

[0281] S1709: The second electronic device sends a family sharing request to the server, where the family sharing request carries a sharing code.

[0282] In some embodiments, the home sharing request sent by the second electronic device to the server carries a sharing code, which is used to share the control authority of the third electronic device in the home corresponding to the homeId, thereby adding it to the home corresponding to the homeId, thereby realizing the sharing of the home of the first electronic device.

[0283] Optionally, for other contents of step S1707 to step S1709, reference may be made to the relevant contents of the above-mentioned step S1007 to step S1009, which will not be repeated here.

[0284] S1710. The server establishes a sharing relationship between the second electronic device and the home indicated by the sharing code according to the account and sharing code used by the second electronic device to log in.

[0285] In some embodiments, after receiving a family sharing request, the server parses and authenticates the sharing code. For example, the server determines whether the sharing code is correct, such as by determining whether the sharing code is server-generated and meets the expiration criteria. If the sharing code is correct, the server further parses and authenticates the sharing code. If the sharing code is incorrect, the server sends a family sharing failure response to the second electronic device.

[0286] If the sharing code is correct, the server retrieves the family ID and first application account indicated by the sharing code. The server then determines whether the account logged into the second electronic device that sent the family sharing request is the same as the first application account indicated by the sharing code. If so, the server determines that the second electronic device meets the sharing conditions and can share the family corresponding to the family ID with the second electronic device. If not, the server determines that the second electronic device does not meet the sharing conditions and can send a family sharing failure response to the second electronic device.

[0287] In some embodiments, the server manages one or more homes under the first application account through the account. After determining to share the home of the first electronic device with the second electronic device, the server may obtain information about the home managed under the account logged in by the first electronic device, such as the home identifier and device information of at least one third electronic device recorded under the home. The server then creates a new home under the first application account logged in by the second electronic device and sets the information of the newly created home as the information of the home of the first electronic device that was successfully shared, thereby establishing a sharing relationship between the second electronic device and the home corresponding to the home identifier.

[0288] In some embodiments, after the server establishes a sharing relationship between the second electronic device and the home corresponding to the home identifier, it may send a home sharing success response to the second electronic device. Optionally, the sharing success response carries information about the home, such as the home identifier, device information of at least one third electronic device recorded under the home, etc. In this way, after receiving the home sharing success response, the second electronic device can obtain permission to manage the home, such as establishing a communication connection with the devices in the home based on the device information carried in the home sharing success response.

[0289] In some examples, the control authority of the second electronic device over the shared home is less than or equal to the control authority of the first electronic device over the shared home.

[0290] In this way, during the home sharing process, the user only needs to perform a simple touch operation to trigger the first electronic device and the second electronic device to automatically complete the sharing of the home group. The user operation is simple and effectively reduces the difficulty of user operation.

[0291] Furthermore, the first electronic device and the second electronic device complete home sharing based on near field communication, thereby improving the real-time and interactivity of home sharing, thereby enhancing the user experience.

[0292] The above describes the permission sharing process using the example of a first electronic device proactively tapping a second electronic device to initiate permission sharing. In some examples, the second electronic device can also proactively initiate permission sharing. The following describes the process of proactively initiating permission sharing by the second electronic device in detail.

[0293] In some examples, the first electronic device is a user terminal or a central control device in a space. In some scenarios, when the first electronic device is a central control device, the second electronic device can obtain control permissions for smart devices in the home managed by the central control device in response to approaching or touching the first electronic device.

[0294] Figure 18 is a flowchart of another permission sharing method provided by an embodiment of the present application. It should be noted that the method is not limited to Figure 18 and the specific order described below. It should be understood that in other embodiments, the order of some steps in the method can be interchanged according to actual needs, or some steps can be omitted or deleted. The method includes the following steps:

[0295] S1801: The second electronic device obtains an identification code preset by the first electronic device in response to a preset operation while displaying the first application.

[0296] In some embodiments, an identification code is pre-installed in the first electronic device, the identification code is written into the NFC tag, and the NFC mode is marked as a tag mode.

[0297] In some examples, after the first electronic device is started, it starts running a smart life application to trigger the NFC mode to be marked as a tag mode.

[0298] In some examples, the first electronic device is a dedicated device for managing at least one third electronic device. For example, the first electronic device is a smart home device control panel, a smart home device central control screen, etc. The first electronic device is a fixed device, fixedly set in a certain location in the home. When other users bring the second electronic device into the home, they can request to join the group (home) managed by the first electronic device by tapping it, etc.

[0299] In some examples, the first electronic device is used to manage at least one third electronic device in the home where it is currently located. For example, there are multiple homes under the first application account logged in by the first electronic device, but after logging in to the first application account, the first electronic device (such as a smart home device control panel) will display a home interface that matches the current location based on the positioning, thereby managing the third electronic device in the home where it is currently located. Alternatively, when the first electronic device is logging in to the first application account, the server determines the home where the first electronic device is located, so that after logging in to the first application account, the first electronic device can only display the device management interface of the home and manage the devices in the home.

[0300] S1802: The first electronic device and the second electronic device negotiate a communication key based on the identification code and establish a secure communication connection.

[0301] S1803. The second electronic device obtains the account number and family identification of the first electronic device through a secure communication connection.

[0302] In some examples, if the number of homes under the account logged in by the first electronic device is only one, the first electronic device may not need to feedback the home identifier to the second electronic device. Subsequently, the server may determine a unique home based on the account logged in by the first electronic device.

[0303] In some examples, the second account of the first electronic device obtained by the second electronic device may be a smart life application account, or a device-level account used to log in to the first electronic device, such as a Huawei account.

[0304] Optionally, for other contents of step S1802 to step S1803, reference may be made to the relevant contents of the above-mentioned step S1003 to step S1004, which will not be repeated here.

[0305] S1804: The second electronic device sends a group joining request to the server. The group joining request carries the account number and family identifier used by the first electronic device for login.

[0306] In some embodiments, after obtaining the account and home ID of the first electronic device, the second electronic device can send a group join request to the server to request to join the home corresponding to the home ID under the account of the first application. In response, the server receives the group join request sent by the second electronic device.

[0307] S1805. The server sends a permission acquisition request to the permission management device.

[0308] S1806. The rights management device sends a rights acquisition response to the server.

[0309] In some embodiments, the server obtains the account of the first application carried in the group joining request, and determines the permission management device corresponding to the account.

[0310] Optionally, the rights management device is, for example, at least one device that has logged in to the account and is currently logged in. For example, if the user has logged in to the account on multiple devices, such as a mobile phone and a tablet, and the account is currently logged in on the mobile phone, the server may determine that the mobile phone is the rights management device. Alternatively, if the account is logged in on both the mobile phone and the tablet, the server may determine that both the mobile phone and the tablet are rights management devices.

[0311] Optionally, the rights management device is, for example, a device for registering an account of the first application.

[0312] In some embodiments, after determining the rights management device, the server may send a rights acquisition request to the rights management device to determine whether the user of the rights management device authorizes the second electronic device to join the group.

[0313] Optionally, the permission acquisition request includes the family identifier and the account number used to log in to the second electronic device. Upon receiving the permission acquisition request, the permission management device can display a corresponding prompt based on the family identifier and the account number of the first application, prompting the user to confirm whether to allow the first application account to be added to the home corresponding to the family identifier. The permission management device then generates a permission acquisition response based on the user's operation.

[0314] In some embodiments, during the authorization process, the rights management device may also determine the scope of the rights authorized by the user based on the user's operation, such as allowing the second electronic device to obtain control rights for all devices in the home, allowing the second electronic device to obtain control rights for some devices in the home, or not allowing the second electronic device to obtain control rights for devices in the home.

[0315] S1808. The server adds the account logged in by the second electronic device to the group corresponding to the family identifier according to the account logged in by the second electronic device.

[0316] In some embodiments, the server determines whether the second electronic device is authorized based on the received permission acquisition response. For example, if the permission acquisition response indicates that the second electronic device is not authorized, the server may send a group joining failure response to the second electronic device. For another example, if the permission acquisition response indicates that the second electronic device is authorized, the server may add the account logged in by the second electronic device to the group corresponding to the home identifier, thereby establishing a sharing relationship between the second electronic device and the group corresponding to the home identifier, and completing group (home) sharing.

[0317] In this way, during the group sharing process, the user only needs to perform a simple tap operation to trigger the second electronic device to automatically join the family group managed by the first electronic device. The user operation is simple and effectively reduces the difficulty of user operation.

[0318] Furthermore, the first electronic device and the second electronic device complete group sharing based on near field communication, thereby improving the real-time and interactivity of group sharing, thereby enhancing the user experience.

[0319] In some embodiments, after group sharing is completed, the first electronic device and the second electronic device may also display a corresponding sharing animation. The display process and effects of the sharing animation can be referenced to the display process and effects of the sharing animation during home sharing between the first electronic device and the second electronic device described above, and will not be further described in this embodiment of the application.

[0320] In some embodiments, the first electronic device may also be pre-set with permissions to allow home sharing, so that the server does not need to apply for authorization from the permission management device. This further simplifies the interaction process and improves the efficiency of device permission sharing.

[0321] Optionally, Figure 19 is a flow chart of another permission sharing method provided in an embodiment of the present application. As shown in Figure 19, the method includes the following steps.

[0322] S1901: The first electronic device displays a first sharing interface.

[0323] Optionally, the first electronic device is a user terminal or a central control device in a space.

[0324] Optionally, the first sharing interface includes a device management interface for managing at least one smart device, or a space management interface associated with the space where the first target smart device is located.

[0325] S1902: Detecting a user operation on a first interface element in a first sharing interface.

[0326] Optionally, the first interface element includes a display element associated with the first target smart device. The first electronic device can share the first interface element with the second electronic device. For example, the first interface element is a card.

[0327] S1903: In response to approaching or touching the second electronic device, the first electronic device shares the control authority of the first target smart device corresponding to the first interface element with the second electronic device.

[0328] S1904: The second electronic device displays an animation effect.

[0329] Optionally, the first electronic device presents an animation on the first sharing interface, prompting the user to share the first target smart device corresponding to the first interface element to the second electronic device. Optionally, the animation includes an animation of the first interface element associated with the first target smart device moving out, or an animation of a display element associated with the user of the second electronic device moving in.

[0330] In this way, the first electronic device and the second electronic device complete the sharing of device control authority based on near field communication, thereby improving the real-time and interactivity of authority sharing, thereby enhancing the user experience.

[0331] Moreover, during the device sharing process, the user only needs to perform a simple touch operation to trigger the first electronic device and the second electronic device to automatically complete the permission sharing, which is simple for the user to operate and effectively reduces the difficulty of user operation.

[0332] Optionally, for other contents of step S1901 to step S1904, reference may be made to the relevant contents executed by the first electronic device or the second electronic device mentioned above, which will not be repeated here.

[0333] The above describes in detail the permission sharing method provided by the embodiment of the present application in conjunction with Figures 6 to 19. The following describes in detail the first electronic device provided by the embodiment of the present application in conjunction with Figure 20, and the second electronic device provided by the embodiment of the present application in conjunction with Figure 21.

[0334] In one possible design, Figure 20 is a schematic diagram of the structure of a first electronic device provided in an embodiment of the present application. As shown in Figure 20, the first electronic device 2000 may include: a transceiver unit 2001, a processing unit 2002, and a display unit 2003. The first electronic device 2000 may be used to implement the functions of the first electronic device involved in the above method embodiment.

[0335] Optionally, the transceiver unit 2001 is used to support the first electronic device 2000 to execute S1002, S1003, S1004, S1005, S1007 and S1008 in Figure 10; and / or to support the first electronic device 2000 to execute S1302 in Figure 13; and / or to support the first electronic device 2000 to execute S1702, S1703, S1704, S1705, S1707 and S1708 in Figure 17; and / or to support the first electronic device 2000 to execute S1801, S1802 and S1803 in Figure 18; and / or to support the first electronic device 2000 to execute S1903 in Figure 19.

[0336] Optionally, the processing unit 2002 is used to support the first electronic device 2000 to execute S1001 in Figure 10; and / or to support the first electronic device 2000 to execute S1701 in Figure 17; and / or to support the first electronic device 2000 to execute S1902 in Figure 19.

[0337] Optionally, the display unit 2003 is used to support the first electronic device 2000 to execute S1304 in Figure 13; and / or to support the first electronic device 2000 to execute S1901 in Figure 19.

[0338] Among them, the transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the first electronic device 2000 are respectively for implementing the corresponding processes of the authority sharing method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit. For the sake of brevity, they are not repeated here.

[0339] Optionally, the first electronic device 2000 shown in Figure 20 may further include a storage unit (not shown in Figure 20), in which a program or instruction is stored. When the transceiver unit 2001, the processing unit 2002, and the display unit 2003 execute the program or instruction, the first electronic device 2000 shown in Figure 20 can execute the permission sharing method described in the above method embodiment.

[0340] The technical effects of the first electronic device 2000 shown in FIG. 20 may refer to the technical effects of the authority sharing method described in the above method embodiment, and will not be repeated here.

[0341] In addition to being in the form of the first electronic device 2000, the technical solution provided in this application may also be a functional unit or chip in the first electronic device, or a device used in conjunction with the first electronic device.

[0342] In one possible design, Figure 21 is a schematic diagram of the structure of a second electronic device provided in an embodiment of the present application. As shown in Figure 21, the second electronic device 2100 may include: a transceiver unit 2101, a processing unit 2102, and a display unit 2103. The second electronic device 2100 may be used to implement the functions of the second electronic device involved in the above method embodiments.

[0343] Optionally, the transceiver unit 2101 is used to support the second electronic device 2100 to execute S1002, S1003, S1004, S1008 and S1009 in Figure 10; and / or to support the second electronic device 2100 to execute S1301 in Figure 13; and / or to support the second electronic device 2100 to execute S1702, S1703, S1704, S1708 and S1709 in Figure 17; and / or to support the second electronic device 2100 to execute S1801, S1802, S1803 and S1804 in Figure 18; and / or to support the second electronic device 2100 to execute S1903 in Figure 19.

[0344] Optionally, the processing unit 2102 is used to support the second electronic device 2100 to execute S1902 in Figure 19.

[0345] Optionally, the display unit 2103 is used to support the second electronic device 2100 to execute S1302 in Figure 13; and / or to support the second electronic device 2100 to execute S1904 in Figure 19.

[0346] Among them, the transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the second electronic device 2100 are respectively for implementing the corresponding processes of the authority sharing method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit. For the sake of brevity, they are not repeated here.

[0347] Optionally, the second electronic device 2100 shown in Figure 21 may further include a storage unit (not shown in Figure 21) in which a program or instruction is stored. When the transceiver unit 2101, the processing unit 2102, and the display unit 2103 execute the program or instruction, the second electronic device 2100 shown in Figure 21 can execute the permission sharing method described in the above method embodiment.

[0348] The technical effects of the second electronic device 2100 shown in FIG. 21 may refer to the technical effects of the authority sharing method described in the above method embodiment, and will not be repeated here.

[0349] In addition to being in the form of the second electronic device 2100, the technical solution provided in this application may also be a functional unit or chip in the second electronic device, or a device used in conjunction with the second electronic device.

[0350] An embodiment of the present application also provides a chip system, including: a processor, the processor is coupled to a memory, the memory is used to store programs or instructions, when the program or instructions are executed by the processor, the chip system implements the method in any of the above method embodiments.

[0351] Optionally, there may be one or more processors in the chip system. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

[0352] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in the embodiments of the present application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. The embodiments of the present application do not specifically limit the type of memory or the configuration of the memory and the processor.

[0353] Exemplarily, the chip system may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on chip (SoC), a central processor unit (CPU), a network processor (NP), a digital signal processor (DSP), a microcontroller unit (MCU), a programmable logic device (PLD) or other integrated chips.

[0354] It should be understood that each step in the above method embodiment can be completed by hardware integrated logic circuits in a processor or by software instructions. The method steps disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware processor, or by a combination of hardware and software modules in a processor.

[0355] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the computer executes the above-mentioned related steps to implement the permission sharing method in the above-mentioned embodiment.

[0356] An embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the permission sharing method in the above-mentioned embodiment.

[0357] In addition, an embodiment of the present application further provides a device. The device may be a component or module, and may include one or more processors and a memory connected to each other. The memory is used to store a computer program. When the computer program is executed by one or more processors, the device performs the rights sharing method described in each of the above method embodiments.

[0358] The apparatus, computer-readable storage medium, computer program product, or chip provided in the embodiments of the present application are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0359] The steps of the method or algorithm described in conjunction with the disclosure of the embodiments of the present application can be implemented in a hardware manner or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a register, a hard disk, a mobile hard disk, a read-only compact disc (CD-ROM) or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC).

[0360] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed; that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-mentioned systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0361] In the several embodiments provided in this application, it should be understood that the disclosed methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation; for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of modules or units, which can be electrical, mechanical or other forms.

[0362] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0363] Computer-readable storage media include, but are not limited to, any of the following: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and other media that can store program code.

[0364] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A permission sharing method, characterized in that: Applied to a first electronic device, the method includes: Display the first sharing interface; A user operation on a first interface element in the first sharing interface is detected, and in response to approaching or touching a second electronic device, the control authority of a first target smart device corresponding to the first interface element is shared with the second electronic device.

2. The method according to claim 1, characterized in that The method further comprises: An animation is presented on the first sharing interface, where the animation is used to prompt the user to share the first target smart device corresponding to the first interface element to the second electronic device.

3. The method according to claim 1 or 2, characterized in that: The step of sharing the control authority of the first target smart device corresponding to the first interface element to the second electronic device in response to approaching or touching the second electronic device includes: During the process of displaying the first sharing interface, in response to approaching or touching the second electronic device, establishing a communication connection with the second electronic device; Obtaining, through the communication connection, a first account for logging into the second electronic device; According to the first account, the control authority of the first target smart device corresponding to the first interface element in the first sharing interface is shared to the second electronic device.

4. The method according to claim 1 or 2, characterized in that: The step of sharing the control authority of the first target smart device corresponding to the first interface element to the second electronic device in response to approaching or touching the second electronic device includes: During the process of displaying the first sharing interface, in response to approaching or touching the second electronic device, establishing a communication connection with the second electronic device; Through the communication connection, a second account logged in by the first electronic device is sent to the second electronic device, and the second account is used to share the control authority of the first target smart device corresponding to the first interface element in the first sharing interface with the second electronic device.

5. The method according to any one of claims 1 to 4, characterized in that: The first interface element includes a display element associated with the first target smart device, and the method further includes: The first interface element is shared to the second electronic device.

6. The method according to claim 5, characterized in that The first interface element is a card.

7. The method according to any one of claims 1 to 6, characterized in that: The first interface element includes a display element associated with an added user, and the added user is used to control the first target smart device; in response to approaching or touching the second electronic device, the method further includes: A second interface element is displayed, the second interface element comprising a display element associated with a user of the second electronic device.

8. The method according to claim 2, characterized in that: The animation includes an animation of the first interface element associated with the first target smart device moving out, or an animation of the display element associated with the user of the second electronic device moving in.

9. The method according to any one of claims 1 to 8, characterized in that: The step of sharing the control authority of the first target smart device corresponding to the first interface element to the second electronic device in response to approaching or touching the second electronic device also includes: In response to approaching or touching the second electronic device, the control authority of the second target smart device corresponding to the first interface element is shared with the second electronic device, and the first target smart device and the second target smart device belong to the same space or the same scene.

10. The method according to any one of claims 1 to 9, characterized in that: The approach or touch is based on one or more of the short-range wireless communication NFC technology, the low-power BLE Bluetooth technology, and the short-range local area network NAN communication technology.

11. The method according to any one of claims 1 to 10, characterized in that: The control authority is an authority range specified by a user of the first electronic device.

12. The method according to any one of claims 1 to 11, characterized in that: The first sharing interface includes a device management interface for managing at least one smart device, or a space management interface associated with the space where the first target smart device is located.

13. The method according to any one of claims 1 to 12, characterized in that: The first electronic device is a user terminal or a central control device in a space.

14. A method for sharing authority, characterized in that: Applied to a second electronic device, the method includes: In response to approaching or touching a first electronic device, receiving control authority of a first target smart device shared by the first electronic device, wherein the first target smart device corresponds to a first interface element displayed by the first electronic device on a first sharing interface; Display an animation, where the animation is used to prompt the user that the second electronic device obtains control authority over the first target smart device.

15. The method according to claim 14, characterized in that The animation includes an animation of the first interface element associated with the first target smart device moving in, and the first interface element moving out on the first sharing interface; Alternatively, a display element associated with the user of the first electronic device moves in.

16. The method according to claim 14 or 15, characterized in that The method further comprises: Add the first interface element in the device management interface; or, The displayed first space management interface is switched to a second space management interface, the first space management interface corresponds to a user of the second electronic device, and the second space management interface corresponds to the user of the first electronic device.

17. The method according to claim 16, characterized in that The first interface element is a card.

18. The method according to any one of claims 14 to 17, characterized in that: The step of receiving the control authority of the first target smart device shared by the first electronic device in response to approaching or touching the first electronic device comprises: In response to approaching or bumping with a first electronic device, establishing a communication connection with the first electronic device; Through the communication connection, a first account logged in by the second electronic device is sent to the first electronic device, and the first account is used to share the control authority of the first target smart device with the second electronic device.

19. The method according to any one of claims 14 to 17, characterized in that: The step of receiving the control authority of the first target smart device shared by the first electronic device in response to approaching or touching the first electronic device comprises: In response to approaching or bumping with a first electronic device, establishing a communication connection with the first electronic device; Obtaining, through the communication connection, a second account for logging into the first electronic device; According to the second account, the control authority of the first target smart device is obtained.

20. An electronic device, characterized in that: include: A processor, a memory and a display screen, wherein the memory and the display screen are coupled to the processor, the memory is used to store computer program codes, and the computer program codes include computer instructions. When the processor reads the computer instructions from the memory, the electronic device executes the method as described in any one of claims 1 to 13; or, the electronic device executes the method as described in any one of claims 14 to 19.

21. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a computer program, which, when executed on an electronic device, enables the electronic device to execute the method as claimed in any one of claims 1 to 13; or enables the electronic device to execute the method as claimed in any one of claims 14 to 19.

22. A computer program product, characterized in that When the computer program product is executed on a computer, the computer is enabled to execute the method according to any one of claims 1 to 13; or the computer is enabled to execute the method according to any one of claims 14 to 19.

Citation Information

Patent Citations

  • Intelligent device sharing method, device and equipment

    CN110198257A

  • Cross-device control method, device and system

    CN112260907A

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

    CN113272745A

  • Method and device for sharing application interface, electronic equipment and readable storage medium

    CN113452945A

  • Method and device for sharing equipment

    CN115730343A

Cited By

  • Content storage method and electronic equipment

    CN121541824A