[go: up one dir, main page]

WO2025112740A1 - Permission sharing method and electronic device - Google Patents

Permission sharing method and electronic device Download PDF

Info

Publication number
WO2025112740A1
WO2025112740A1 PCT/CN2024/116102 CN2024116102W WO2025112740A1 WO 2025112740 A1 WO2025112740 A1 WO 2025112740A1 CN 2024116102 W CN2024116102 W CN 2024116102W WO 2025112740 A1 WO2025112740 A1 WO 2025112740A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
sharing
interface
user
target smart
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/116102
Other languages
French (fr)
Chinese (zh)
Inventor
晏国淇
米昱豪
惠少博
付金鑫
代栓青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2025112740A1 publication Critical patent/WO2025112740A1/en
Pending legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/80Homes; Buildings
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/30Control
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/50Safety; Security of things, users, data or systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/041Key generation or derivation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W12/00Security arrangements; Authentication; Protecting privacy or anonymity
    • H04W12/04Key management, e.g. using generic bootstrapping architecture [GBA]
    • H04W12/043Key management, e.g. using generic bootstrapping architecture [GBA] using a trusted network node as an anchor
    • H04W12/0431Key distribution or pre-distribution; Key agreement
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • a permission sharing method is provided, which is applied to a first electronic device.
  • the method includes: displaying a first sharing interface. Detecting a user's operation on a first interface element in the first sharing interface, and in response to approaching or touching a second electronic device, sharing the control permission of a first target smart device corresponding to the first interface element to the second electronic device.
  • 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.
  • a first application such as a smart life application
  • the first account is a device-level account, such as a Huawei account.
  • 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.
  • sharing the control authority of the first target smart device corresponding to the first interface element to the second electronic device includes: in 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, sending the second account logged in by the first electronic device to the second electronic device, 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 to the second electronic device.
  • the first electronic device is a central control device, then in response to approaching or touching, the second electronic device can obtain the second account of the first electronic device, so that the second electronic device can obtain the control authority of the smart device in the home currently managed by the first electronic device.
  • the second account is the first application account or a device-level account.
  • the server may also request authorization from the permission management device corresponding to the second account to ensure the security of permission sharing.
  • the first interface element is a card.
  • the second electronic device can not only obtain the authority 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 facilitating the user to determine the entry to control the smart device and simplifying the user's operation.
  • 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.
  • 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 the control authority of the first target smart device has been shared with the second electronic device, the second interface element can be displayed on the first sharing interface to prompt the user that the second electronic device currently obtains the control authority of the smart device in the space where the first target smart device is located.
  • 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.
  • 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.
  • the control authority of the first target smart device corresponding to the first interface element in response to approaching or touching the second electronic device, is shared with the second electronic device, and 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.
  • 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 the difficulty of user operation is effectively reduced.
  • 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.
  • approaching or touching is based on one or more of the following communication technologies: NFC (near field communication) technology, BLE (low power consumption) Bluetooth technology, and NAN (near field local area network) communication technology.
  • NFC near field communication
  • BLE low power consumption
  • NAN near field local area network
  • users can share the control rights of the smart device managed by the first electronic device with the second electronic device through short-distance communication methods such as approaching or touching.
  • short-distance communication methods such as approaching or touching.
  • users no longer need to enter Huawei accounts or open other applications through the first electronic device, which effectively simplifies user operations.
  • the user can set the sharing permissions of the first target smart device according to needs.
  • the first electronic device may share permissions with the second electronic device including permissions to share scenes or spaces.
  • the user may also set permissions to allow editing of scenes.
  • the first sharing interface includes a user interface for managing at least one The device management interface of a smart device or the space management interface associated with the space where the first target smart device is located.
  • the first electronic device is a user terminal or a central control device in a space.
  • a permission sharing method is provided, which is applied to a second electronic device.
  • the method includes: in response to approaching or touching a first electronic device, receiving the control permission of 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 by the first electronic device on a first sharing interface, and the animation is used to prompt a user that the second electronic device obtains the control permission of the first target smart device.
  • 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 a user of the first electronic device moving in.
  • the method further includes: adding a first interface element in the device management interface.
  • the first space management interface corresponds to a user of the second electronic device
  • the second space management interface corresponds to a user of the first electronic device.
  • the second electronic device can switch to display the device management interface of the family, so as to facilitate the user to operate the device.
  • the first interface element is a card.
  • receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Through the communication connection, sending the first account logged in by the second electronic device to the first electronic device, the first account is used to share the control authority of the first target smart device with the second electronic device.
  • receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Obtaining a second account logged in by the first electronic device through the communication connection. Obtaining the control authority of the first target smart device based on the second account.
  • a first electronic device in a third aspect, includes: a processor, a memory and a display screen, the memory and the display screen are coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the first electronic device executes: displaying a first sharing interface.
  • the control authority of the first target smart device corresponding to the first interface element is shared with the second electronic device.
  • the processor 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.
  • the control authority of the first target smart device corresponding to the first interface element in response to approaching or touching the second electronic device, is shared with the second electronic device, including: in the process of displaying the first sharing interface, in response to approaching or touching the second electronic device, a communication connection is established with the second electronic device. Through the communication connection, a first account logged in by the second electronic device is obtained. 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 with the second electronic device.
  • sharing the control authority of the first target smart device corresponding to the first interface element to the second electronic device includes: in 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, sending the second account logged in by the first electronic device to the second electronic device, 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 to the second electronic device.
  • 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.
  • the first interface element is a card.
  • the first interface element includes an element associated with adding a user. display element, adding a user for controlling the first target smart device; in response to approaching or touching the second electronic device, when the processor reads computer instructions from the memory, the first electronic device also executes: displaying a second interface element, the second interface element including a display element associated with the user of the second electronic device.
  • 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.
  • the control authority of the first target smart device corresponding to the first interface element in response to approaching or touching the second electronic device, is shared with the second electronic device, and 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.
  • approaching or touching is based on one or more of the following communication technologies: NFC, low-power BLE, and NAN.
  • control authority is an authority range specified by a user of the first electronic device.
  • 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.
  • 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 a user of the first electronic device moving in.
  • the second electronic device when the processor reads the computer instruction from the memory, the second electronic device is also caused to execute: adding the first interface element in the device management interface. Or, the displayed first space management interface is switched to the second space management interface, the first space management interface corresponds to the user of the second electronic device, and the second space management interface corresponds to the user of the first electronic device.
  • the first interface element is a card.
  • receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Through the communication connection, sending the first account logged in by the second electronic device to the first electronic device, the first account is used to share the control authority of the first target smart device with the second electronic device.
  • receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Obtaining a second account logged in by the first electronic device through the communication connection. Obtaining the control authority of the first target smart device based on the second account.
  • an electronic device 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.
  • the 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.
  • a computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by an electronic device, the electronic device executes the method of the first aspect or any one of the implementations of the first aspect; or the electronic device executes the method of the second aspect or any one of the implementations of the second aspect.
  • a computer program also referred to as an instruction or code
  • a computer program product which, when executed on an electronic device, causes the electronic device to The electronic device is equipped to execute the method of the first aspect or any one of the implementation modes of the first aspect; or, the electronic device is enabled to execute the method of the second aspect or any one of the implementation modes of the second aspect.
  • a circuit system comprising 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.
  • a chip system 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, and 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.
  • FIG1 is a schematic diagram of a device permission sharing interface provided in an embodiment of the present application.
  • FIG. 2 is a second schematic diagram of a device permission sharing interface provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of a communication system for applying the authority sharing method provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application.
  • FIG6 is a third schematic diagram of a device permission sharing interface provided in an embodiment of the present application.
  • FIG8 is a fifth schematic diagram of a device permission sharing interface provided in an embodiment of the present application.
  • FIG9 is a sixth schematic diagram of a device authority sharing interface provided in an embodiment of the present application.
  • FIG11 is a seventh schematic diagram of a device authority sharing interface provided in an embodiment of the present application.
  • FIG12 is a schematic diagram of an eighth device authority sharing interface provided in an embodiment of the present application.
  • FIG13 is a second flowchart of the permission sharing method provided in an embodiment of the present application.
  • FIG14 is a ninth diagram of a device authority sharing interface provided in an embodiment of the present application.
  • FIG15 is a schematic diagram of a device permission sharing interface provided in an embodiment of the present application.
  • FIG16 is a schematic diagram 11 of a device authority sharing interface provided in an embodiment of the present application.
  • FIG17 is a third flowchart of the permission sharing method provided in an embodiment of the present application.
  • FIG18 is a fourth flowchart of a method for sharing permissions provided in an embodiment of the present application.
  • FIG19 is a flowchart of a method for sharing permissions according to an embodiment of the present application.
  • FIG20 is a schematic diagram of the structure of a first electronic device provided in an embodiment of the present application.
  • FIG. 21 is a schematic diagram of the structure of a second electronic device provided in an embodiment of the present application.
  • references to "one embodiment” or “some embodiments” etc. described in this specification mean that one or more embodiments of the present application include a particular feature, structure or characteristic described in conjunction with the embodiment.
  • the phrases “in one embodiment”, “in some other embodiments”, “in other embodiments”, etc. appearing in different places in this specification do not necessarily all 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 specified. "First” and “second” are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implying Indicate the number of technical features indicated.
  • the words “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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as “exemplarily” or “for example” is intended to present related concepts in a specific way.
  • the smart home system uses the residence as a platform and utilizes technologies such as the Internet of Things and automatic control to organically combine various electronic devices and application subsystems related to home life.
  • users can manage devices in the smart home system by logging into a smart life application account, such as smart wearable devices, smart refrigerators, smart curtains, smart door locks, and smart air purifiers.
  • 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 authority over the IoT device.
  • the smart life application account is the primary account for managing the IoT device.
  • the authority to control the IoT device can be shared with other electronic devices, and the smart life application account logged in by other electronic devices is a slave account.
  • the slave account can obtain authority to control some or all IoT devices under the primary account, and the control authority obtained by the slave account may be less than or equal to the control authority of the primary account over the IoT device.
  • the electronic device logged in to the primary account is the primary device
  • the electronic device logged in to the slave account is the slave device.
  • 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 the user's operation of clicking the ceiling light card 11, and can display a menu bar window 12 including the operation content that can be performed on the ceiling 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 ceiling light corresponding to the ceiling light card 11 with other electronic devices.
  • the mobile phone can display an interface 102 as shown in FIG. 1 (b), and display the sharing method of sharing permissions on the interface, such as scanning a code to share, sharing through a Huawei account, and sharing to friends in the address book.
  • the mobile phone detects the user's operation on the scan code sharing control 14, and determines that the user instructs to share the authority to control 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 also 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, so that device 1 shares the authority to control the ceiling light with device 2.
  • the user 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), and then the electronic device can share the control permissions of the device selected by the user with the device logged in with the Huawei account. It can be seen that in this process, it is more difficult for users to remember Huawei accounts.
  • the electronic device when sharing device permissions through address book friends, the electronic device needs to respond to user operations, pull up other applications, and display address book friend information for the user to select.
  • the user needs to browse and select the friend account to be shared. After that, the electronic device shares the control permissions of the device selected by the user to the device corresponding to the friend account selected by the user. It can be seen that in this process, the sharing path is relatively long, and other applications need to be pulled up, which makes the user operation cumbersome.
  • 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.
  • Fig. 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.
  • the communication system includes a first electronic device 100, a second electronic device 200, a third electronic device 300 and a server 400.
  • the first electronic device 100 may be a dedicated device for controlling smart home devices, or a device including the function of controlling smart home devices.
  • the first electronic device 100 may be a smart home device control panel, or a terminal device such as a mobile phone, a tablet, a smart speaker, a smart watch, etc.
  • the smart home device control panel is a dedicated device for controlling smart home devices in a smart home system.
  • the first electronic device 100 may be a fixed device or a portable device. The present application does not impose any special restrictions on the specific form of the first electronic device 100.
  • 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 .
  • 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.
  • the present application does not impose any special restrictions on the specific form of the third electronic device 300.
  • the operating system installed in the third electronic device 300 includes but is not limited to Or other operating systems.
  • the third electronic device 300 may not be installed with an operating system.
  • 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 an operating system is installed, and the operating system installed when an operating system is installed.
  • the third electronic device 300 is an IoT device.
  • the first electronic device 100 is installed with a first application.
  • the first application is capable of connecting to the IoT device, editing and controlling the IoT device.
  • the first electronic device 100 is connected to one or more third electronic devices 300 through the first application.
  • the first application is a smart life application.
  • 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.
  • 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.
  • 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.
  • the server 400 may be a device or network device with computing functions such as a cloud server or a network server.
  • the server 400 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing service center.
  • the server 400 may also be described as a smart home cloud platform, which is used to manage smart home devices included in the smart home system, scenes corresponding to the smart home devices, etc.
  • a wireless communication connection is established between the first electronic device 100 and the second electronic device 200.
  • the wireless communication technology for establishing 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.
  • Bluetooth e.g., traditional Bluetooth or Bluetooth low energy (BLE)
  • WLAN wireless local area networks
  • NFC near field communication
  • FM frequency modulation
  • IR infrared
  • 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.
  • a third-party device in the local area network, such as a router, a gateway, a smart device controller, a server, etc.
  • the second electronic device 200 is a device including 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 the one or more connected third electronic devices 300 can be controlled by the first application. It should be understood that the third electronic device 300 connected to the first electronic device 100 is the same as, or different from, or partially the same as the third electronic device 300 connected to the second electronic device 200.
  • 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.
  • the operating system is, for example, a smart home system
  • the third electronic device 300 is a smart home device.
  • the operating system is a smart office system
  • the third electronic device 300 is a smart office device.
  • the communication system may also be other communication systems such as a smart campus communication system, which is not limited in the present embodiment of the application. The following takes the case where the communication system is, for example, a smart home system and the third electronic device 300 is a smart home device as an example to describe in detail the permission sharing method provided in the present embodiment of the application.
  • 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. Structure, such as the hardware structure shown in Figure 4 or Figure 5.
  • FIG4 shows a schematic structural diagram of the first electronic device 100 .
  • 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.
  • 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
  • the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the first electronic device 100.
  • the first electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently.
  • the components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
  • 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 processor (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), etc.
  • AP application processor
  • GPU graphics processor
  • ISP image signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • Different processing units may be independent devices or integrated in one or more processors.
  • 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.
  • the processor 110 may also be provided with a memory for storing instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface 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, etc.
  • I2C inter-integrated circuit
  • I2S inter-integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous receiver/transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may include multiple groups of I2C buses.
  • the processor 110 may be coupled to the touch sensor, the charger, the flash, the camera 193, etc. through different I2C bus interfaces.
  • the processor 110 may be coupled to the touch sensor through the I2C interface, so that the processor 110 communicates with the touch sensor through the I2C bus interface to realize the touch function of the first electronic device 100.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193.
  • the MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc.
  • the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting 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.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc.
  • the USB interface 130 can be used to connect a charger to charge the first electronic device 100, and can also be used to transmit data between the first electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones.
  • the interface can also be used to connect other electronic devices, such as AR devices, etc.
  • the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the first electronic device 100.
  • the first electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
  • the charging management module 140 is used to receive charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive the wired charger input through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input via the wireless charging coil of the first electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device via the power management module 141.
  • 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 supplies power to the processor 110, the internal memory 121, the display screen 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 number, battery health status (leakage, impedance), etc.
  • the power management module 141 can also be set in the processor 110.
  • the power management module 141 and the charging management module 140 can also be set in the same device.
  • 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.
  • Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the first electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
  • antenna 1 can be reused as a diversity antenna for a wireless local area network.
  • the antenna can be used in combination with a tuning switch.
  • 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.
  • at least some of the functional modules of the mobile communication module 150 can be set in the processor 110.
  • 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.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low-frequency baseband signal to be sent 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.
  • the application processor outputs a sound signal through an audio device, or displays an image or video through a display screen 194.
  • the modem processor may be an independent device.
  • the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to 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, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110.
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
  • 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 the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation system
  • the first electronic device 100 communicates with the server 400 and the second electronic device 200 via the mobile communication module 150 or the wireless communication module 160 to achieve sharing of control authority of the third electronic device 300, etc.
  • the first electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, which 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 change display information.
  • 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), such as 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.
  • the first electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
  • the first electronic device 100 in response to a user operation, determines that the user indicates to share the third electronic device 300 during the process of displaying the first application through the display screen 194. Afterwards, in response to the user's touch operation, the identification code of the second electronic device 200 is obtained, and based on the identification code, the first electronic device 100 and the second electronic device 200 establish a secure communication connection. Afterwards, based on the interaction of the secure communication connection, the first electronic device 100 can obtain the account logged in by the second electronic device, and thus request the server 400 to obtain a sharing code for sharing the control authority of the third electronic device 300 with the second electronic device 200 through the wireless communication module 160. In this way, the second electronic device 200 can subsequently obtain the authority to control the third electronic device 300 based on the sharing code.
  • 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.
  • CMOS complementary metal oxide semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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.
  • the first electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
  • 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.
  • 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.
  • 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.
  • 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 signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
  • the first electronic device 100 can use the audio module 170, such as music playing, recording, etc.
  • the audio module 170 can include a speaker, a receiver, a microphone, a headphone interface, and an application processor to implement audio functions.
  • 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.
  • a touch sensor is also called a "touch control device”.
  • the touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called a "touch control screen”.
  • the touch sensor is used to detect touch operations acting on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to the touch operation can be provided through the display screen 194.
  • the touch sensor can also be arranged on the surface of the first electronic device 100, which is different from the position of the display screen 194.
  • the key 190 includes a power key, a volume key, etc.
  • the key 190 may be a mechanical key or a touch key.
  • the first electronic device 100 may receive key input and generate key signal input related to user settings and function control of the first electronic device 100.
  • 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.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • touch operations acting on different areas of the display screen 194 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminders, receiving messages, alarm clocks, games, etc.
  • the touch vibration feedback effect can also support customization.
  • Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be connected to or disconnected from the first electronic device 100 by inserting or removing the SIM card interface 195.
  • the first electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • 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.
  • Processor 401 can 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.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • the communication link 402 may include a pathway to transmit information between the above-mentioned components.
  • the communication interface can be a module, a circuit, a bus, an interface, a transceiver or other device capable of implementing a communication function, used to communicate with other devices.
  • the transceiver can be an independently arranged transmitter, which can be used to send information to other devices, and the transceiver can also be an independently arranged receiver, which is used to receive information from other devices.
  • the transceiver can also be a component that integrates the functions of sending and receiving information, and the embodiment of the present application does not limit the specific implementation of the transceiver.
  • the memory 403 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices 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, optical disc storage (including compressed optical 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 the 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 be independent and connected to the processor via the communication line 402.
  • the memory may also be integrated with the processor.
  • the memory 403 is used to store computer-executable instructions for implementing the solution of the present application, and the execution 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.
  • the computer-executable instructions in the embodiments of the present application may also be referred to as application code, instructions, computer program or other names, which are not specifically limited in the embodiments of the present application.
  • the processor 401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 5 .
  • the server 400 may include multiple processors, such as the processor 401 and the processor 405 in FIG5 .
  • processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor.
  • the processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).
  • the device structures described in FIG. 4 and FIG. 5 may also be applicable to a second electronic device or other two-party devices for authority sharing.
  • the permission sharing method provided in the embodiment of the present application is described in detail by 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 smart devices such as smart home devices), and the server 400 as a smart home cloud server as an example.
  • 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 smart devices such as smart home devices)
  • the server 400 as a smart home cloud server as an example.
  • the first electronic device starts a first application (such as a smart life application) in response to a user operation.
  • a first application such as a smart life application
  • the smart life application is used to manage at least one smart device included in the home.
  • the first electronic device when the first electronic device is running the first application, the first electronic device can share the control authority of at least one smart device in the home with the second electronic device in response to the user operation.
  • the control authority is the authority range specified by the user of the first electronic device.
  • the first electronic device determines that the shared control authority includes the authority to control the startup or shutdown of the smart device in response to the user's setting operation, but does not include the authority to adjust parameters, etc.
  • the first electronic device when the first electronic device displays the first sharing interface, it detects the user's operation on the first interface element in the first sharing interface, and it can be determined that the user instructs to share the control authority of the first target smart device corresponding to the first interface element with the second electronic device. Then, in response to approaching or touching the second electronic device, the first electronic device can share the control authority of the first target smart device corresponding to the first interface element with the second electronic device.
  • 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, through which the corresponding smart device can be controlled, so that the user can manage 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.
  • the approach or touch is based on one or more of NFC technology, BLE Bluetooth technology, and near-field local area network (neighbor awareness networking, NAN) communication technology.
  • the communication technology based on NAN is, for example, wireless fidelity surrounding awareness Wi-Fi aware communication technology.
  • the first electronic device displays a first sharing interface 601, which is a device management interface, including cards corresponding to multiple smart devices included in home (such as A's home), and the cards display some information, control buttons, etc. of the smart device.
  • the user can select the device to be shared according to his own needs.
  • 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.
  • the first electronic device detects the user's operation of clicking the shared 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).
  • the first electronic device detects the user's operation of instructing to share the device. Afterwards, as shown in the interface 602 in FIG. 6 (b), the first electronic device can display a window 64, and display a card 65 corresponding to the first target smart device selected by the user for sharing in the window 64. It should be understood that the number of devices selected by the user to share is one or more.
  • the window 64 also displays the device sharing method, as shown by reference numeral 66, and the first electronic device can display a prompt message to prompt the user to share the device by touching it.
  • users can share the control rights of the smart device managed by the first electronic device with the second electronic device through short-distance communication methods such as approaching or touching.
  • short-distance communication methods such as approaching or touching.
  • users no longer need to enter Huawei accounts or open other applications through the first electronic device, which effectively simplifies user operations.
  • 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.
  • 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.
  • the home managed by the second electronic device includes 11 smart devices, and the device management interface 701 displays the cards corresponding to the 11 smart devices.
  • the second electronic device obtains the control authority of 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).
  • 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).
  • 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 make it easier for the user to determine the entry point for controlling the smart device, thereby simplifying the user's operation.
  • the user can select one or more smart devices to be shared in the device management interface through the above method.
  • 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.
  • the above space is, for example, an entire home, or a room in a home, or an office or conference room in an office scenario.
  • the sharing of the control authority of the smart device in the scene includes not only the control authority of the smart device in the scene shared with the second electronic device, but also the editing authority of the scene.
  • the user can select the scope of the control authority to be shared.
  • 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 can 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.
  • 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.
  • 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.
  • the second electronic device can also obtain the first interface element shared by the first electronic device.
  • 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.
  • the user can share the control rights of multiple smart devices in a scene or space to a second electronic device through simple operations, thereby improving the user experience.
  • FIG10 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 FIG10 and the specific sequence 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:
  • a first electronic device detects that a user instructs a device sharing operation in a first application.
  • the first application is, for example, a smart life application for managing and controlling the third electronic device.
  • the operation of indicating the sharing device is, for example, an operation of the user selecting the third electronic device to be shared.
  • the first electronic device when the first electronic device displays the smart life application interface 601, it detects the user's operation on the card 61 and displays the menu bar window 62. Afterwards, the first electronic device detects the user's operation of clicking the shared device control 63 displayed in the menu bar window 62, and determines that the user's operation of indicating the sharing device is detected.
  • S1002 In response to a preset operation, the first electronic device obtains an identification code generated by the second electronic device.
  • the preset operation is, for example, an operation of tapping to initiate a near field communication connection (such as an NFC connection, etc.). It should be understood that the preset operation may also be other operations that are convenient for the user to implement, such as a shake operation, etc.
  • 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.
  • the second electronic device can mark the NFC mode as a 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.
  • the NFC mode of the first electronic device is a card reader mode.
  • the identification code generated by the second electronic device is, for example, a personal identification number (PIN) code.
  • PIN personal identification number
  • the second electronic device may not preset the identification code, but respond to the touch operation of the first electronic device, press Generate an identification code according to a preset period. In this way, the first electronic device can also obtain the identification code generated by the second electronic device.
  • the second electronic device is in any display interface, and generates an identification code in response to a touch operation of the first electronic device.
  • the second electronic device generates an identification code in response to the touch operation and starts the first application.
  • the first electronic device determines the second electronic device located nearby by Bluetooth distance measurement or the like.
  • the second electronic device is pre-installed with a vibration sensor, and in response to a preset operation of the user, the second electronic device can detect the touch operation through the vibration sensor and generate an identification code.
  • the second electronic device 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. Later, 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. Later, 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.
  • 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.
  • the first electronic device may send a Bluetooth connection request to the second electronic device.
  • the first electronic device sends the Bluetooth connection request to the second electronic device by Bluetooth broadcasting.
  • the second electronic device may turn on Bluetooth broadcasting to receive the Bluetooth connection request broadcasted by the first electronic device.
  • the first electronic device and the second electronic device may establish a Bluetooth connection.
  • the first electronic device and the second electronic device may negotiate a key based on the identification code of the second electronic device to generate a communication key. Subsequently, the first electronic device and the second electronic device encrypt the communication data using the communication key, thereby ensuring the security of the communication data transmission, that is, establishing a secure communication connection.
  • the first electronic device sends sin1 to the second electronic device, and the second electronic device sends sin2 to the second electronic device.
  • 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.
  • sin1 is, for example, a sin code preset 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 preset in the second electronic device, or a sin code generated by the second electronic device using a preset algorithm.
  • 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.
  • an identical number eg, a large number greater than a preset threshold
  • 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.
  • the first electronic device obtains the account number used to log in to the second electronic device through a secure communication connection.
  • the account logged into the second electronic device is, for example, the smart life application account currently managing the first target smart device.
  • the account may also be a device-level account, such as a Huawei account.
  • the first electronic device shares device permissions with the second electronic device. Based on this, the first electronic device is described as the owner device, and the account logged in by the first electronic device is ownerId. The second electronic device is described as a member device, and the account logged in by the second electronic device is UserId.
  • the second electronic device may send the UserId encrypted by 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.
  • the above steps S1002 and S1003 are optional steps.
  • 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.
  • the first electronic device sends the device identification of the device to be shared and the account number for logging in to the second electronic device to the server.
  • the first electronic device can determine the device to be shared and the device identifier of the device to be shared in response to the user's instruction to share the device. Then, after obtaining the account logged in by the second electronic device, the first electronic device can send the device identifier and the account to the server to request to obtain a sharing code for sharing the device corresponding to the device identifier with the account.
  • 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.
  • deviceId device identifier
  • S1006 The server generates a sharing code according to the device identification and the account used to log in to the second 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. Afterwards, the server may generate a corresponding sharing code (shareCode).
  • the sharing code generated by the server is configured with an expiration condition, which includes, for example, a usage count requirement, a usage time requirement, etc.
  • an expiration condition which includes, for example, a usage count requirement, a usage time requirement, etc.
  • the sharing code can be used at most once.
  • the server can also set a valid usage period for the sharing code, such as valid for 5 minutes.
  • S1007 The server sends a sharing code to the first electronic device.
  • S1008 The first electronic device sends a sharing code to the second electronic device.
  • the first electronic device after receiving the sharing code, the first electronic device encrypts the sharing code using the communication key. Then, the first electronic device sends the encrypted sharing code to the second electronic device.
  • the second electronic device receives the encrypted sharing code sent by the first electronic device. Then, the second electronic device can decrypt the encrypted sharing code to obtain the sharing code.
  • the second electronic device sends a device sharing request to the server, where the device sharing request carries a sharing code.
  • the second electronic device may send a device sharing request to the server to request control authority of the device corresponding to the sharing code carried in the device sharing request.
  • the server receives the device sharing request sent by the second electronic device.
  • the second electronic device 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.
  • S1010 The server establishes a sharing relationship between the second electronic device and the device to be shared according to the account number and sharing code logged in by the second electronic device.
  • 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 condition requirements. If the sharing code is correct, the server further parses and authenticates the sharing code. If the sharing code is wrong, the server sends a device sharing failure response to the second electronic device.
  • the server obtains the device identification and the first application account indicated by the sharing code. Afterwards, the server 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 can determine that the second electronic device meets the sharing conditions, and can share the device to be shared corresponding to the device identification with the second electronic device. If not, the server can determine that the second electronic device does not meet the sharing conditions, and can send a device sharing failure response to the second electronic device.
  • 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 identification of the device to be shared to the account logged in by the second electronic device.
  • the server may send a sharing success response to the second electronic device.
  • 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.
  • 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.
  • 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 cancel the sharing relationship with the device to be shared, etc.
  • 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.
  • 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.
  • the first electronic device and the second electronic device share the control authority of the device based on the near field communication, thereby improving the authority sharing.
  • the real-time and interactivity of sharing can enhance the user experience.
  • 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.
  • the permission sharing method can display a sharing animation after the device permissions are shared to help the user confirm the permission sharing status of the device.
  • the first electronic device presents an animation on the first sharing interface, which is used to prompt the user to share the first target smart device corresponding to the first interface element to the second electronic device.
  • the animation includes an animation of the first interface element associated with the first target smart device moving out.
  • the first electronic device determines that the ceiling light of the living room corresponding to card 65 has been successfully shared with the second electronic device. Then, as shown in interface 101 of FIG11 , the first electronic device can display a sharing animation of card 65 moving outside window 64, thereby vividly informing the user that the control authority of the current living room light has been shared with other devices.
  • the second electronic device displays an animation, which is used to prompt the second electronic device to obtain the control authority of the first target smart device.
  • the animation includes an animation of a first interface element associated with the first target smart device moving in.
  • the second electronic device can display the card 121 (i.e., the first interface element) corresponding to the ceiling light in the living room.
  • the display content of the card 121 corresponding to the ceiling light in the living room can be notified by the first electronic device or the server, or automatically generated by the second electronic device according to the device information.
  • the second electronic device displays multiple cards corresponding to multiple devices in order 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 (c) of Figure 12.
  • the user is vividly informed that the current 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.
  • the first electronic device shares the control authority of the first target smart device through interaction with the second electronic device and the server. Then, after the authority sharing is successful, the first electronic device and the second electronic device can also obtain the message of the successful sharing through interaction, thereby displaying the sharing animation.
  • FIG13 is a flowchart of another permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to FIG13 and the specific sequence 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:
  • the server sends a sharing success response to the second electronic device.
  • S1302 The server sends a sharing success response to the first electronic device.
  • 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.
  • the server can determine the first electronic device corresponding to the sharing code according to the sharing code carried in the device sharing request sent by the second electronic device. Then, after determining that the sharing relationship is established, the server can send a sharing success response to the first electronic device, and carry the device identification of the device to be shared and the first application account of the second electronic device in the sharing success response. In this way, after receiving the sharing success response, the first electronic device can determine which smart devices are shared with which control device.
  • the sharing success response sent by the server to the second electronic device carries the device information of the successfully shared smart device.
  • the sharing success 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 sharing success 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.
  • 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.
  • 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 embodiment of the present application does not limit the execution order of step S1301 or step S1302.
  • the server may send a sharing success response to the first electronic device or the second electronic device separately.
  • step S1302 is an optional step.
  • step S1301 is an optional step.
  • the first electronic device displays a sharing animation.
  • the first electronic device may display a sharing animation to prompt the user that the device has been shared with other devices.
  • the first electronic device shares the authority to control a certain smart device with other devices, the first electronic device still has the authority to control the smart device.
  • S1304 The second electronic device displays a sharing animation.
  • the second electronic device may display a sharing animation to prompt the user that the user has currently obtained permission to control the device.
  • step S1303 and step S1304 do not limit the execution order of step S1303 and step S1304, and whether to execute step S1303 or step S1304.
  • a user operating a second electronic device may need to control all third electronic devices in a home controlled by a first electronic device.
  • control authority over all third electronic devices can be shared, but the process of selecting a third electronic device may be more complicated and involve a large amount of data transmission.
  • 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 touching the second electronic device, the first electronic device may share the control authority of the smart device managed in the space management interface with the second electronic device.
  • the first electronic device displays a smart life application interface 1401. Among them, one or more homes are managed under the account currently logged in by the smart life application, as shown in reference numeral 141, and the home currently displayed is A's home. In response to the user's operation on the control indicated by reference numeral 141, the first electronic device displays a menu bar window 142. Thereafter, in response to the user's operation on the home management control 143 in the menu bar window 142, the first electronic device may display a home management interface 1402 as shown in (b) of FIG. 14 .
  • the first electronic device may display a home details page 1403 (i.e., a first sharing interface) as shown in (c) of FIG.
  • the home details page 1403 displays detailed information of A's home, such as home name, home location, family members, etc.
  • the first electronic device detects the user's operation on the add member control 145 (i.e., the first interface element), and determines that the user instructs to add family members 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.
  • 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.
  • the first electronic device may display a second interface element, which includes a display element associated with the user of the second electronic device.
  • the first electronic device may also display an animation, which includes an animation of a display element associated with the user of the second electronic device moving in.
  • the first electronic device displays a sharing animation, as shown in reference numeral 146 , and the first electronic device displays the avatar (or home icon) of the smart life application logged in by the second electronic device moving into the currently displayed Afterwards, as shown in interface 1501 of FIG. 15 , the first electronic device displays avatars 151 (i.e., second interface elements) in the family details page of A's home. If the 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.
  • avatars 151 i.e., second interface elements
  • the second electronic device may also display an animation.
  • the second electronic device displays a smart life application, as shown in reference numeral 161, the family managed under the account currently logged into the smart life application is B's family, and the number of devices included in the family is 11. Afterwards, in response to the user's touch operation, the second electronic device determines that the family sharing is successful. Then, as shown in interface 1602 in (b) of FIG16 , the second electronic device displays an animation of the avatar (or family icon) 162 of the smart life application logged into the first electronic device flying into the currently displayed smart life interface, thereby helping the user confirm that the family sharing has been completed.
  • the second electronic device can switch to display the device management interface of the family, so as to facilitate the user to operate the device.
  • the second electronic device can directly switch to display the device management interface corresponding to A's home that has been successfully shared, as shown by reference numeral 163. In this way, the user's home switching operation is simplified and the user's experience is improved.
  • 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 the difficulty of user operation is effectively reduced.
  • 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.
  • the first electronic device establishes a short-range communication connection in response to approaching or touching the second electronic device, thereby sharing the control authority of the first target smart device in the home to the second electronic device based on the short-range communication connection.
  • the method of sharing the control authority of the home group is described in detail below through the method shown in Figure 17.
  • the server can achieve permission sharing of all third electronic devices in a 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.
  • FIG17 is a flowchart of another permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to FIG17 and the specific sequence 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:
  • the first electronic device detects that a user instructs in a first application to add a family member.
  • 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.
  • 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.
  • the first electronic device obtains the account number used to log in to the second electronic device through a secure communication connection.
  • a preset operation (such as a tap operation) is detected, and it can be determined that an operation of the user indicating to add a family member is detected. That is, when 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 a tap operation without having to operate the add member control, thereby simplifying the user operation.
  • 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.
  • S1705 The first electronic device sends a home identifier and a second electronic device that the first application currently displays home to the server. The account you are logged in with.
  • the first electronic device detects a user's instruction to add a family member during the process of running the first application. Therefore, the first electronic device can determine which home managed by the first application account is currently displayed by the first application, and then obtain the family identification of the home. Then, after obtaining the account logged in by the second electronic device, the first electronic device can send the family identification and the account to the server to request a sharing code for adding the account to the home corresponding to the family identification.
  • the first electronic device sends to the server the home identifier (homeId) of the first application currently displaying home and the member UserId of the second electronic device.
  • homeId home identifier
  • only one home is managed under the account logged in by the first electronic device. Then, after obtaining the account logged in by the second electronic device, the first electronic device can directly send the account to the server to obtain the sharing code. That is, the first electronic device does not need to send the home identifier to the server again.
  • the server can also determine the unique home based on the account logged in by the first electronic device and generate the corresponding sharing code.
  • the server generates a sharing code according to the family identification and the account used to log in to the second 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. Afterwards, the server may generate a corresponding sharing code (shareCode).
  • the sharing code generated by the server is configured with an expiration condition, which includes, for example, a usage count requirement, a usage time requirement, etc.
  • an expiration condition which includes, for example, a usage count requirement, a usage time requirement, etc.
  • the sharing code can be used at most once.
  • the server can also set a valid usage period for the sharing code, such as valid for 5 minutes.
  • S1707 The server sends a sharing code to the first electronic device.
  • S1708 The first electronic device sends a sharing code to the second electronic device.
  • S1709 The second electronic device sends a family sharing request to the server, where the family sharing request carries a sharing code.
  • 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 joining the home corresponding to the homeId and sharing the home of the first electronic device.
  • 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.
  • the server establishes a sharing relationship between the second electronic device and the home indicated by the sharing code according to the account number and the sharing code used to log in to the second electronic device.
  • 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 condition requirements. If the sharing code is correct, the server further parses and authenticates the sharing code. If the sharing code is wrong, the server sends a family sharing failure response to the second electronic device.
  • the server obtains the family identification and the first application account indicated by the sharing code. Afterwards, the server determines whether the account logged in by the second electronic device that sends the family sharing request is the same as the first application account indicated by the sharing code. If so, the server can determine that the second electronic device meets the sharing conditions and can share the family corresponding to the family identification with the second electronic device. If not, the server can determine that the second electronic device does not meet the sharing conditions and can send a family sharing failure response to the second electronic device.
  • the server may send a home sharing success response to the second electronic device.
  • 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.
  • you can obtain the authority to manage the home such as establishing a communication connection with the devices in the home based on the device information carried in the successful response to home sharing.
  • 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.
  • 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 the difficulty of user operation is effectively reduced.
  • 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.
  • the above article introduces the permission sharing process by taking the example of the first electronic device actively performing a touch operation with the second electronic device to initiate the permission sharing process.
  • the second electronic device may also actively initiate the permission sharing process, and the following article introduces the process of the second electronic device actively initiating permission sharing in detail.
  • the first electronic device is a user terminal or a central control device in a space.
  • the second electronic device can obtain control rights for smart devices in the home managed by the central control device in response to approaching or touching the first electronic device.
  • FIG18 is a flowchart of another permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to FIG18 and the specific sequence 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:
  • 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.
  • 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.
  • the first electronic device after the first electronic device is started, it starts running the smart life application to trigger the NFC mode to be marked as tag mode.
  • the first electronic device is a dedicated device for managing at least one third electronic device.
  • 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, which is fixedly set at a certain location in the home, so that other users can bring the second electronic device into the home and request to join the group (home) managed by the first electronic device by touching it.
  • 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.
  • 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.
  • 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.
  • the second electronic device obtains the account number and family identification of the first electronic device through a secure communication connection.
  • 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.
  • the second account of the first electronic device acquired by the second electronic device may be a smart life application account, or may be a device-level account logged in by the first electronic device, such as a Huawei account.
  • 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.
  • S1804 The second electronic device sends a group joining request to the server, where the group joining request carries the account number and family identification used to log in to the first electronic device.
  • the second electronic device can send a group joining request to the server to request to join the home corresponding to the home ID under the account of the first application.
  • the server receives the group joining request sent by the second electronic device.
  • the server sends a permission acquisition request to the permission management device.
  • the rights management device sends a rights acquisition response to the server.
  • 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.
  • the rights management device is, for example, at least one device that has logged into the account and is currently logged in.
  • the server can determine that the mobile phone is a rights management device.
  • the server can determine that both the mobile phone and the tablet are rights management devices.
  • the permission management device is, for example, a device for registering an account of the first application.
  • the server may send a permission acquisition request to the authority management device to determine whether the user using the authority management device authorizes the second electronic device to join the group.
  • the permission acquisition request carries the family identifier and the account number logged in by the second electronic device.
  • the permission management device can display corresponding prompt information according to the family identifier and the account number of the first application to prompt the user to confirm whether to allow the account number of the first application to be added to the home corresponding to the family identifier.
  • the permission management device generates a permission acquisition response according to the user operation.
  • the rights management device may also determine the scope of the rights authorized by the user according to the user's operation, such as allowing the second electronic device to obtain the control rights of all devices in the home, or allowing the second electronic device to obtain the control rights of some devices in the home, or not allowing the second electronic device to obtain the control rights of the devices in the home.
  • the server adds the account logged in by the second electronic device to the group corresponding to the family identification according to the account logged in by the second electronic device.
  • 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 the sharing of the group (home).
  • the user only needs to perform a simple touch 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 the difficulty of user operation is effectively reduced.
  • 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.
  • the first electronic device and the second electronic device may also display corresponding sharing animations.
  • the sharing animation display process and display effect can refer to the sharing animation display process and display effect of the first electronic device and the second electronic device in the process of home sharing, and the present application embodiment will not repeat them.
  • 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. In this way, the interaction process is further simplified and the efficiency of device permission sharing is improved.
  • 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.
  • the first electronic device displays a first sharing interface.
  • the first electronic device is a user terminal or a central control device in a space.
  • 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.
  • S1902 Detecting a user's operation on a first interface element in a first sharing interface.
  • 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.
  • the first interface element is a card.
  • the second electronic device displays an animation effect.
  • the first electronic device presents an animation on the first sharing interface, where the animation is used to prompt the user to
  • the motion effect includes a first interface element associated with the first target smart device moving out, or a display element associated with the user of the second electronic device moving in.
  • 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.
  • 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.
  • step S1901 to step S1904 may refer to the relevant contents executed by the first electronic device or the second electronic device mentioned above, which will not be repeated here.
  • FIG20 is a schematic diagram of the structure of the first electronic device provided in an embodiment of the present application.
  • 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.
  • 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.
  • 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.
  • the display unit 2003 is used to support the first electronic device 2000 to execute S1304 in Figure 13; and/or is used to support the first electronic device 2000 to execute S1901 in Figure 19.
  • 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 to implement 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, and for the sake of brevity, they will not be repeated here.
  • the first electronic device 2000 shown in FIG20 may further include a storage unit (not shown in FIG20 ), in which a program or instruction is stored.
  • a storage unit not shown in FIG20
  • 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 FIG20 may execute the authority sharing method described in the above method embodiment.
  • 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.
  • the technical solution provided in the present 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.
  • FIG21 is a schematic diagram of the structure of a second electronic device provided in an embodiment of the present application.
  • 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 embodiment.
  • 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.
  • processing unit 2102 is used to support the second electronic device 2100 to execute S1902 in Figure 19.
  • the display unit 2103 is used to support the second electronic device 2100 to execute S1302 in Figure 13; and/or is used to support the second electronic device 2100 to execute S1904 in Figure 19.
  • 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 to implement the above
  • the corresponding process of the authority sharing method described in the 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, and will not be repeated here for the sake of brevity.
  • the second electronic device 2100 shown in FIG21 may further include a storage unit (not shown in FIG21 ), in which a program or instruction is stored.
  • a storage unit not shown in FIG21
  • the second electronic device 2100 shown in FIG21 may execute the authority sharing method described in the above method embodiment.
  • 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.
  • 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.
  • the processor in the chip system may be one or more.
  • the processor may be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, etc.
  • the processor may be a general-purpose processor implemented by reading software code stored in a memory.
  • the memory in the chip system may also be one or more.
  • the memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application.
  • 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 may be arranged on different chips respectively.
  • the embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.
  • the chip system can 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.
  • FPGA field programmable gate array
  • ASIC application specific integrated circuit
  • SoC system on chip
  • CPU central processor unit
  • NP network processor
  • DSP digital signal processor
  • MCU microcontroller unit
  • PLD programmable logic device
  • each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software.
  • 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.
  • An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored.
  • 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.
  • the embodiment of the present application also provides a computer program product.
  • the computer program product When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the permission sharing method in the above-mentioned embodiment.
  • an embodiment of the present application further provides a device.
  • the device may be a component or a module, and the device may include one or more processors and a memory connected to each other.
  • the memory is used to store a computer program.
  • the device executes the permission sharing method in the above-mentioned method embodiments.
  • the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
  • the steps of the method or algorithm described in conjunction with the disclosed content of the embodiments of the present application can be implemented in hardware or by a processor executing software instructions.
  • the software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art.
  • An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium.
  • 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) middle.
  • ASIC application specific integrated circuit
  • the disclosed method can be implemented in other ways.
  • the device embodiments described above are merely schematic.
  • 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.
  • 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.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
  • Computer-readable storage media include, but are not limited to, any of the following: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks, and other media that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • Automation & Control Theory (AREA)
  • Civil Engineering (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Business, Economics & Management (AREA)
  • Structural Engineering (AREA)
  • Architecture (AREA)
  • Telephone Function (AREA)
  • User Interface Of Digital Computer (AREA)

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.

Description

权限分享方法及电子设备Authority sharing method and electronic device

本申请要求于2023年11月27日提交国家知识产权局、申请号为202311604660.6、申请名称为“权限分享方法及电子设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of 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”, all contents of which are incorporated by reference in this application.

技术领域Technical Field

本申请涉及终端技术领域,尤其涉及一种权限分享方法及电子设备。The present application relates to the field of terminal technology, and in particular to a permission sharing method and electronic device.

背景技术Background Art

随着物联网(internet of things,IoT)技术的快速发展,各种IoT设备广泛出现,例如,智能穿戴设备、智能冰箱、智能窗帘、智能门锁和智能空气净化器等。电子设备(如手机、平板等)在登录第一应用(如智慧生活应用)账号后,响应于用户操作与IoT设备绑定后,获取到该IoT设备的控制权限。这样后续,用户通过登录该第一应用账号,可对与第一应用账号绑定的IoT设备进行控制,给用户带来了极大的便利。With the rapid development of the Internet of Things (IoT) technology, various IoT devices have emerged widely, such as smart wearable devices, smart refrigerators, smart curtains, smart door locks, and smart air purifiers. After logging into the first application account (such as smart life application), the electronic device (such as a mobile phone, tablet, etc.) obtains the control authority of the IoT device in response to the user's operation and binds to the IoT device. In this way, the user can control the IoT device bound to the first application account by logging into the first application account, which brings great convenience to the user.

在一些场景中,通过权限分享,其他第一应用账号也可获取到该IoT设备的控制权限,实现其他用户通过登录其他第一应用账号控制该IoT设备。但是,在权限分享过程中,用户通常需要打开设备二维码、记录第一应用账号、借助其他应用程序等方式,建立其他第一应用账号与该IoT设备的分享关系,操作过程繁琐,用户使用难度较大。In some scenarios, through permission sharing, other first application accounts can also obtain control permissions for the IoT device, allowing other users to control the IoT device by logging into other first application accounts. However, in the permission sharing process, users usually need to open the device QR code, record the first application account, and use other applications to establish a sharing relationship between other first application accounts and the IoT device. The operation process is cumbersome and difficult for users to use.

发明内容Summary of the invention

为了解决上述的技术问题,本申请提供了一种权限分享方法及电子设备。本申请提供的技术方案,通过简单的靠近或碰一碰操作,第一电子设备可将智能设备的控制权限分享给第二电子设备,从而简化权限分享步骤,降低用户使用难度。In order to solve the above technical problems, the present application provides a permission sharing method and electronic device. The technical solution provided by the present 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 steps and reducing the difficulty of user use.

为了实现上述的技术目的,本申请提供了如下技术方案:In order to achieve the above technical objectives, this application provides the following technical solutions:

第一方面,提供一种权限分享方法,应用于第一电子设备。该方法包括:显示第一分享界面。检测到用户对第一分享界面中的第一界面元素的操作,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。In a first aspect, a permission sharing method is provided, which is applied to a first electronic device. The method includes: displaying a first sharing interface. Detecting a user's operation on a first interface element in the first sharing interface, and in response to approaching or touching a second electronic device, sharing the control permission of a first target smart device corresponding to the first interface element to the second electronic device.

如此,第一电子设备和第二电子设备基于近场通信完成设备的控制权限的分享,提高权限分享的实时性和交互性,从而提升用户的使用体验。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.

并且,在设备分享过程中,用户只需要通过简单的靠近或碰一碰操作,即可触发第一电子设备和第二电子设备自动完成权限分享,用户操作简单,有效降低用户操作难度。Furthermore, during the device sharing process, the user only needs to approach or touch the first electronic device to trigger 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.

根据第一方面,方法还包括:在第一分享界面上呈现动效,动效用于提示用户将第一界面元素对应的第一目标智能设备分享至第二电子设备。According to the first aspect, the method further includes: presenting an animation on the first sharing interface, the animation being used to prompt the user to share the first target smart device corresponding to the first interface element to the second electronic device.

如此,通过显示动效,帮助用户快速确认权限分享情况,实现精准的控制已分享设备,有效提升用户的使用体验。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.

根据第一方面,或者以上第一方面的任意一种实现方式,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备,包括:在显示第一分享界面的过程中,响应于与第二电子设备的靠近或碰一碰,与第二电子设备建立通信连接。通过通信连接,获取第二电子设备登录的第一账号。根据第一账号,将第一分享界面中的第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。According to the first aspect, or any implementation 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, including: in the process of displaying the first sharing interface, in response to approaching or touching the second electronic device, a communication connection is established with the second electronic device. Through the communication connection, a first account logged in by the second electronic device is obtained. 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 with the second electronic device.

一些示例中,第二电子设备中预置有标识码,或者响应于与第一电子设备的靠近或碰一碰,第二电子设备生成该标识码。后续,第一电子设备和第二电子设备基于该标识码建立通信连接。从而提升建立的通信连接的安全性,保证后续的通信安全。In some examples, the second electronic device is pre-set with an identification code, or the second electronic device generates the identification code in response to approaching or touching the first electronic device. Subsequently, the first electronic device and the second electronic device 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.

一些示例中,第二电子设备登录的第一账号例如为第二电子设备登录的用于管理智能设备的第一应用(如智慧生活应用)的账号,或者,该第一账号为设备级账号,如华为账号。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.

如此,第一电子设备和第二电子设备基于短距离通信连接,建立更加稳定的通信连接,以完成智能设备的控制权限的分享。 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.

根据第一方面,或者以上第一方面的任意一种实现方式,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备,包括:在显示第一分享界面的过程中,响应于与第二电子设备的靠近或碰一碰,与第二电子设备建立通信连接。通过通信连接,向第二电子设备发送第一电子设备登录的第二账号,第二账号用于将第一分享界面中的第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。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 authority of the first target smart device corresponding to the first interface element to the second electronic device includes: in 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, sending the second account logged in by the first electronic device to the second electronic device, 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 to the second electronic device.

一些示例中,第一电子设备为中控设备,那么响应于靠近或碰一碰,第二电子设备可获取到第一电子设备的第二账号,从而第二电子设备可获取到第一电子设备当前管理的home中的智能设备的控制权限。可选地,第二账号为第一应用账号或设备级账号。In some examples, the first electronic device is a central control device, then in response to approaching or touching, the second electronic device can obtain the second account of the first electronic device, so that the second electronic device can obtain the control authority of the smart device in the home currently managed by the first electronic device. Optionally, the second account is the first application account or a device-level account.

一些示例中,第二电子设备在基于第一电子设备的第二账号向服务器请求权限分享的过程中,服务器还可向该第二账号对应的权限管理设备请求授权,以保证权限分享的安全性。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.

根据第一方面,或者以上第一方面的任意一种实现方式,第一界面元素包括与第一目标智能设备关联的显示元素,方法还包括:将第一界面元素分享至第二电子设备。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.

根据第一方面,或者以上第一方面的任意一种实现方式,第一界面元素为卡片。According to the first aspect, or any implementation of the first aspect above, the first interface element is a card.

如此,第二电子设备不仅能够获取到第一电子设备分享的智能设备的权限,还可直接获取到第一电子设备分享的用于控制该智能设备的界面元素,从而便于用户确定控制该智能设备的入口,简化用户的操作。In this way, the second electronic device can not only obtain the authority 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 facilitating the user to determine the entry to control the smart device and simplifying the user's operation.

根据第一方面,或者以上第一方面的任意一种实现方式,第一界面元素包括与添加用户关联的显示元素,添加用户用于控制第一目标智能设备;响应于与第二电子设备的靠近或碰一碰,方法还包括:显示第二界面元素,第二界面元素包括与第二电子设备的用户关联的显示元素。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.

一些示例中,第一分享界面包括与第一目标智能设备所在空间关联的空间管理界面。那么,第一电子设备在确定已将第一目标智能设备的控制权限分享至第二电子设备后,可在第一分享界面上显示第二界面元素,从而提示用户当前第二电子设备获取到该第一目标智能设备所在空间中的智能设备的控制权限。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 the control authority of the first target smart device has been shared with the second electronic device, the second interface element can be displayed on the first sharing interface to prompt the user that the second electronic device currently obtains the control authority of the smart device in the space where the first target smart device is located.

一些示例中,与第二电子设备的用户关联的显示元素例如为第二电子设备登录的第一应用的头像、家庭图标等。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.

根据第一方面,或者以上第一方面的任意一种实现方式,动效包括与第一目标智能设备关联的第一界面元素移出的动效,或者与第二电子设备的用户关联的显示元素移入的动效。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.

如此,通过显示元素的移入或移出,帮助用户生动形象的了解到权限分享情况。In this way, by displaying the movement of elements in or out, users can have a vivid understanding of the permission sharing situation.

根据第一方面,或者以上第一方面的任意一种实现方式,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备,还包括:响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第二目标智能设备的控制权限分享至第二电子设备,第一目标智能设备和第二目标智能设备属于同一空间或同一场景。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 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.

如此,在home分享过程中,用户只需要简单的碰一碰操作,即可触发第一电子设备和第二电子设备自动完成家庭群组的分享,用户操作简单,有效降低用户操作难度。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 the difficulty of user operation is effectively reduced.

并且,第一电子设备和第二电子设备基于近场通信完成home分享,提高home分享的实时性和交互性,从而提升用户的使用体验。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.

根据第一方面,或者以上第一方面的任意一种实现方式,靠近或碰一碰基于近距离无线通信NFC技术、低功耗BLE蓝牙技术、近距离局域网NAN通信技术中的一项或几项。According to the first aspect, or any implementation of the first aspect above, approaching or touching is based on one or more of the following communication technologies: NFC (near field communication) technology, BLE (low power consumption) Bluetooth technology, and NAN (near field local area network) communication technology.

如此,用户通过靠近或碰一碰的短距离通信方式,可实现将第一电子设备管理的智能设备的控制权限分享给第二电子设备。相比于其他设备分享方式,用户不必再通过第一电子设备输入华为账号、拉起其他应用等,有效简化用户操作。In this way, users can share the control rights of the smart device managed by the first electronic device with the second electronic device through short-distance communication methods such as approaching or touching. Compared with other device sharing methods, users no longer need to enter Huawei accounts or open other applications through the first electronic device, which effectively simplifies user operations.

根据第一方面,或者以上第一方面的任意一种实现方式,控制权限为第一电子设备的用户指定的权限范围。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.

如此,用户能够根据需求,设置第一目标智能设备可分享的权限。In this way, the user can set the sharing permissions of the first target smart device according to needs.

一些示例中,第一电子设备向第二电子设备分享权限还包括分享场景或空间的权限。一些示例中,用户还可对是否允许编辑场景的权限进行设置。In some examples, the first electronic device may share permissions with the second electronic device including permissions to share scenes or spaces. In some examples, the user may also set permissions to allow editing of scenes.

根据第一方面,或者以上第一方面的任意一种实现方式,第一分享界面包括用于管理至少一 个智能设备的设备管理界面,或者与第一目标智能设备所在空间关联的空间管理界面。According to the first aspect, or any one of the implementations of the first aspect above, the first sharing interface includes a user interface for managing at least one The device management interface of a smart device or the space management interface associated with the space where the first target smart device is located.

根据第一方面,或者以上第一方面的任意一种实现方式,第一电子设备为用户终端或空间中的中控设备。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.

第二方面,提供一种权限分享方法,应用于第二电子设备。该方法包括:响应于与第一电子设备的靠近或碰一碰,接收第一电子设备分享的第一目标智能设备的控制权限,其中,第一目标智能设备对应于第一电子设备在第一分享界面上显示的第一界面元素显示动效,动效用于提示用户第二电子设备获取第一目标智能设备的控制权限。In a second aspect, a permission sharing method is provided, which is applied to a second electronic device. The method includes: in response to approaching or touching a first electronic device, receiving the control permission of 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 by the first electronic device on a first sharing interface, and the animation is used to prompt a user that the second electronic device obtains the control permission of the first target smart device.

根据第二方面,动效包括与第一目标智能设备关联的第一界面元素移入的动效,第一界面元素在第一分享界面上移出。或者,与第一电子设备的用户关联的显示元素移入的动效。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 a user of the first electronic device moving in.

根据第二方面,或者以上第二方面的任意一种实现方式,方法还包括:在设备管理界面中添加第一界面元素。或者,将显示的第一空间管理界面切换为第二空间管理界面,第一空间管理界面对应于第二电子设备的用户,第二空间管理界面对应于第一电子设备的用户。According to the second aspect, or any implementation of the second aspect above, the method further includes: adding a first interface element in the device management interface. Alternatively, switching the displayed first space management interface 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 a user of the first electronic device.

一些示例中,用户进行家庭分享,是需要操作家庭中的设备。因此,第二电子设备在获取到第一电子设备分享的家庭的控制权限后,可切换显示该家庭的设备管理界面,从而方便用户进行设备操作。In some examples, when a user performs family sharing, he needs to operate the devices in the family. Therefore, after obtaining the control authority of the family shared by the first electronic device, the second electronic device can switch to display the device management interface of the family, so as to facilitate the user to operate the device.

根据第二方面,或者以上第二方面的任意一种实现方式,第一界面元素为卡片。According to the second aspect, or any implementation of the second aspect, the first interface element is a card.

根据第二方面,或者以上第二方面的任意一种实现方式,响应于与第一电子设备的靠近或碰一碰,接收第一电子设备分享的第一目标智能设备的控制权限,包括:响应于与第一电子设备的靠近或碰一碰,与第一电子设备建立通信连接。通过通信连接,向第一电子设备发送第二电子设备登录的第一账号,第一账号用于将第一目标智能设备的控制权限分享至第二电子设备。According to the second aspect, or any implementation of the second aspect above, in response to approaching or touching the first electronic device, receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Through the communication connection, sending the first account logged in by the second electronic device to the first electronic device, the first account is used to share the control authority of the first target smart device with the second electronic device.

根据第二方面,或者以上第二方面的任意一种实现方式,响应于与第一电子设备的靠近或碰一碰,接收第一电子设备分享的第一目标智能设备的控制权限,包括:响应于与第一电子设备的靠近或碰一碰,与第一电子设备建立通信连接。通过通信连接,获取第一电子设备登录的第二账号。根据第二账号,获取第一目标智能设备的控制权限。According to the second aspect, or any implementation of the second aspect above, in response to approaching or touching the first electronic device, receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Obtaining a second account logged in by the first electronic device through the communication connection. Obtaining the control authority of the first target smart device based on the second account.

第三方面,提供一种第一电子设备。该第一电子设备包括:处理器、存储器和显示屏,存储器和显示屏与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得第一电子设备执行:显示第一分享界面。检测到用户对第一分享界面中的第一界面元素的操作,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。In a third aspect, a first electronic device is provided. The first electronic device includes: a processor, a memory and a display screen, the memory and the display screen are coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, and when the processor reads the computer instructions from the memory, the first electronic device executes: displaying a first sharing interface. Upon detecting a user's operation on a first interface element in the first sharing interface, in response to approaching or touching 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.

根据第三方面,当处理器从存储器中读取计算机指令,还使得第一电子设备执行:在第一分享界面上呈现动效,动效用于提示用户将第一界面元素对应的第一目标智能设备分享至第二电子设备。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.

根据第三方面,或者以上第三方面的任意一种实现方式,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备,包括:在显示第一分享界面的过程中,响应于与第二电子设备的靠近或碰一碰,与第二电子设备建立通信连接。通过通信连接,获取第二电子设备登录的第一账号。根据第一账号,将第一分享界面中的第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。According to the third aspect, or any implementation of the third aspect, 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, including: in the process of displaying the first sharing interface, in response to approaching or touching the second electronic device, a communication connection is established with the second electronic device. Through the communication connection, a first account logged in by the second electronic device is obtained. 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 with the second electronic device.

根据第三方面,或者以上第三方面的任意一种实现方式,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备,包括:在显示第一分享界面的过程中,响应于与第二电子设备的靠近或碰一碰,与第二电子设备建立通信连接。通过通信连接,向第二电子设备发送第一电子设备登录的第二账号,第二账号用于将第一分享界面中的第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。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 authority of the first target smart device corresponding to the first interface element to the second electronic device includes: in 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, sending the second account logged in by the first electronic device to the second electronic device, 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 to the second electronic device.

根据第三方面,或者以上第三方面的任意一种实现方式,第一界面元素包括与第一目标智能设备关联的显示元素,当处理器从存储器中读取计算机指令,还使得第一电子设备执行:将第一界面元素分享至第二电子设备。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.

根据第三方面,或者以上第三方面的任意一种实现方式,第一界面元素为卡片。According to the third aspect, or any implementation of the third aspect, the first interface element is a card.

根据第三方面,或者以上第三方面的任意一种实现方式,第一界面元素包括与添加用户关联 的显示元素,添加用户用于控制第一目标智能设备;响应于与第二电子设备的靠近或碰一碰,当处理器从存储器中读取计算机指令,还使得第一电子设备执行:显示第二界面元素,第二界面元素包括与第二电子设备的用户关联的显示元素。According to the third aspect, or any implementation of the third aspect above, the first interface element includes an element associated with adding a user. display element, adding a user for controlling the first target smart device; in response to approaching or touching the second electronic device, when the processor reads computer instructions from the memory, the first electronic device also executes: displaying a second interface element, the second interface element including a display element associated with the user of the second electronic device.

根据第三方面,或者以上第三方面的任意一种实现方式,动效包括与第一目标智能设备关联的第一界面元素移出的动效,或者与第二电子设备的用户关联的显示元素移入的动效。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.

根据第三方面,或者以上第三方面的任意一种实现方式,响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备,还包括:响应于与第二电子设备的靠近或碰一碰,将第一界面元素对应的第二目标智能设备的控制权限分享至第二电子设备,第一目标智能设备和第二目标智能设备属于同一空间或同一场景。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 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.

根据第三方面,或者以上第三方面的任意一种实现方式,靠近或碰一碰基于近距离无线通信NFC技术、低功耗BLE蓝牙技术、近距离局域网NAN通信技术中的一项或几项。According to the third aspect, or any implementation method of the third aspect above, approaching or touching is based on one or more of the following communication technologies: NFC, low-power BLE, and NAN.

根据第三方面,或者以上第三方面的任意一种实现方式,控制权限为第一电子设备的用户指定的权限范围。According to the third aspect, or any implementation of the third aspect, the control authority is an authority range specified by a user of the first electronic device.

根据第三方面,或者以上第三方面的任意一种实现方式,第一分享界面包括用于管理至少一个智能设备的设备管理界面,或者与第一目标智能设备所在空间关联的空间管理界面。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.

根据第三方面,或者以上第三方面的任意一种实现方式,第一电子设备为用户终端或空间中的中控设备。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.

第四方面,提供一种第二电子设备。该第二电子设备包括:处理器、存储器和显示屏,存储器和显示屏与处理器耦合,存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当处理器从存储器中读取计算机指令,使得第二电子设备执行:响应于与第一电子设备的靠近或碰一碰,接收第一电子设备分享的第一目标智能设备的控制权限,其中,第一目标智能设备对应于第一电子设备在第一分享界面上显示的第一界面元素显示动效,动效用于提示用户第二电子设备获取第一目标智能设备的控制权限。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 are coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when the processor reads the computer instructions from the memory, the second electronic device executes: in response to approaching or touching the first electronic device, receiving the control authority of the first target smart device shared by the first electronic device, wherein the first target smart device displays an animation corresponding to the first interface element displayed by the first electronic device on the first sharing interface, and the animation is used to prompt the user that the second electronic device obtains the control authority of the first target smart device.

根据第四方面,动效包括与第一目标智能设备关联的第一界面元素移入的动效,第一界面元素在第一分享界面上移出。或者,与第一电子设备的用户关联的显示元素移入的动效。According to a fourth 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 a user of the first electronic device moving in.

根据第四方面,或者以上第四方面的任意一种实现方式,当处理器从存储器中读取计算机指令,还使得第二电子设备执行:在设备管理界面中添加第一界面元素。或者,将显示的第一空间管理界面切换为第二空间管理界面,第一空间管理界面对应于第二电子设备的用户,第二空间管理界面对应于第一电子设备的用户。According to the fourth aspect, or any implementation of the fourth aspect above, when the processor reads the computer instruction from the memory, the second electronic device is also caused to execute: adding the first interface element in the device management interface. Or, the displayed first space management interface is switched to the second space management interface, the first space management interface corresponds to the user of the second electronic device, and the second space management interface corresponds to the user of the first electronic device.

根据第四方面,或者以上第四方面的任意一种实现方式,第一界面元素为卡片。According to the fourth aspect, or any implementation of the fourth aspect, the first interface element is a card.

根据第四方面,或者以上第四方面的任意一种实现方式,响应于与第一电子设备的靠近或碰一碰,接收第一电子设备分享的第一目标智能设备的控制权限,包括:响应于与第一电子设备的靠近或碰一碰,与第一电子设备建立通信连接。通过通信连接,向第一电子设备发送第二电子设备登录的第一账号,第一账号用于将第一目标智能设备的控制权限分享至第二电子设备。According to the fourth aspect, or any implementation of the fourth aspect above, in response to approaching or touching the first electronic device, receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Through the communication connection, sending the first account logged in by the second electronic device to the first electronic device, the first account is used to share the control authority of the first target smart device with the second electronic device.

根据第四方面,或者以上第四方面的任意一种实现方式,响应于与第一电子设备的靠近或碰一碰,接收第一电子设备分享的第一目标智能设备的控制权限,包括:响应于与第一电子设备的靠近或碰一碰,与第一电子设备建立通信连接。通过通信连接,获取第一电子设备登录的第二账号。根据第二账号,获取第一目标智能设备的控制权限。According to the fourth aspect, or any implementation of the fourth aspect, in response to approaching or touching the first electronic device, receiving the control authority of the first target smart device shared by the first electronic device includes: in response to approaching or touching the first electronic device, establishing a communication connection with the first electronic device. Obtaining a second account logged in by the first electronic device through the communication connection. Obtaining the control authority of the first target smart device based on the second account.

第五方面,提供一种电子设备,该电子设备具有实现如上述第一方面及其中任一种可能的实现方式中所述的权限分享方法的功能;或者,该电子设备具有实现如上述第二方面及其中任一种可能的实现方式中所述的权限分享方法的功能。该功能可以通过硬件实现,也可以通过硬件执行相应地软件实现。该硬件或软件包括一个或多个与上述功能相对应的模块。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. The 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.

第六方面,提供一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当该计算机程序被电子设备执行时,使得电子设备执行第一方面或第一方面中任意一种实施方式的方法;或者,使得电子设备执行第二方面或第二方面中任意一种实施方式的方法。In a sixth aspect, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program (also referred to as an instruction or code), and when the computer program is executed by an electronic device, the electronic device executes the method of the first aspect or any one of the implementations of the first aspect; or the electronic device executes the method of the second aspect or any one of the implementations of the second aspect.

第七方面,提供一种计算机程序产品,当计算机程序产品在电子设备上运行时,使得电子设 备执行第一方面或第一方面中任意一种实施方式的方法;或者,使得电子设备执行第二方面或第二方面中任意一种实施方式的方法。In a seventh aspect, a computer program product is provided, which, when executed on an electronic device, causes the electronic device to The electronic device is equipped to execute the method of the first aspect or any one of the implementation modes of the first aspect; or, the electronic device is enabled to execute the method of the second aspect or any one of the implementation modes of the second aspect.

第八方面,提供一种电路系统,电路系统包括处理电路,处理电路被配置为执行第一方面或第一方面中任意一种实施方式的方法;或者,处理电路被配置为执行第二方面或第二方面中任意一种实施方式的方法。In an eighth aspect, a circuit system is provided, the circuit system comprising 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.

第九方面,提供一种芯片系统,包括至少一个处理器和至少一个接口电路,至少一个接口电路用于执行收发功能,并将指令发送给至少一个处理器,当至少一个处理器执行指令时,至少一个处理器执行第一方面或第一方面中任意一种实施方式的方法;或者,至少一个处理器执行第二方面或第二方面中任意一种实施方式的方法。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, and 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.

前述各个方面的技术效果可互相参考,此处不再赘述。The technical effects of the aforementioned aspects can be referenced to each other and will not be elaborated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请实施例提供的设备权限分享界面示意图一;FIG1 is a schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

图2为本申请实施例提供的设备权限分享界面示意图二;FIG. 2 is a second schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

图3为本申请实施例提供的权限分享方法应用的通信系统示意图;FIG3 is a schematic diagram of a communication system for applying the authority sharing method provided in an embodiment of the present application;

图4为本申请实施例提供的第一电子设备的硬件结构示意图;FIG4 is a schematic diagram of the hardware structure of a first electronic device provided in an embodiment of the present application;

图5为本申请实施例提供的服务器的硬件结构示意图;FIG5 is a schematic diagram of the hardware structure of a server provided in an embodiment of the present application;

图6为本申请实施例提供的设备权限分享界面示意图三;FIG6 is a third schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

图7为本申请实施例提供的设备权限分享界面示意图四;FIG. 7 is a fourth schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

图8为本申请实施例提供的设备权限分享界面示意图五;FIG8 is a fifth schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

图9为本申请实施例提供的设备权限分享界面示意图六;FIG9 is a sixth schematic diagram of a device authority sharing interface provided in an embodiment of the present application;

图10为本申请实施例提供的权限分享方法流程示意图一;FIG10 is a flowchart of a method for sharing permissions provided in an embodiment of the present application;

图11为本申请实施例提供的设备权限分享界面示意图七;FIG11 is a seventh schematic diagram of a device authority sharing interface provided in an embodiment of the present application;

图12为本申请实施例提供的设备权限分享界面示意图八;FIG12 is a schematic diagram of an eighth device authority sharing interface provided in an embodiment of the present application;

图13为本申请实施例提供的权限分享方法流程示意图二;FIG13 is a second flowchart of the permission sharing method provided in an embodiment of the present application;

图14为本申请实施例提供的设备权限分享界面示意图九;FIG14 is a ninth diagram of a device authority sharing interface provided in an embodiment of the present application;

图15为本申请实施例提供的设备权限分享界面示意图十;FIG15 is a schematic diagram of a device permission sharing interface provided in an embodiment of the present application;

图16为本申请实施例提供的设备权限分享界面示意图十一;FIG16 is a schematic diagram 11 of a device authority sharing interface provided in an embodiment of the present application;

图17为本申请实施例提供的权限分享方法流程示意图三;FIG17 is a third flowchart of the permission sharing method provided in an embodiment of the present application;

图18为本申请实施例提供的权限分享方法流程示意图四;FIG18 is a fourth flowchart of a method for sharing permissions provided in an embodiment of the present application;

图19为本申请实施例提供的权限分享方法流程示意图五;FIG19 is a flowchart of a method for sharing permissions according to an embodiment of the present application;

图20为本申请实施例提供的第一电子设备的结构示意图;FIG20 is a schematic diagram of the structure of a first electronic device provided in an embodiment of the present application;

图21为本申请实施例提供的第二电子设备的结构示意图。FIG. 21 is a schematic diagram of the structure of a second electronic device provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请以下各实施例中,“至少一个”、“一个或多个”是指一个或两个以上(包含两个)。The technical solutions in the embodiments of the present application are described below in conjunction with the accompanying drawings in the embodiments of the present application. Wherein, 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 the 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).

在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。术语“连接”包括直接连接和间接连接,除非另外说明。“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含 指明所指示的技术特征的数量。References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include a particular feature, structure or characteristic described in conjunction with the embodiment. Thus, the phrases "in one embodiment", "in some other embodiments", "in other embodiments", etc. appearing in different places in this specification do not necessarily all 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 specified. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implying Indicate the number of technical features indicated.

在本申请实施例中,“示例性地”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性地”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性地”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, the words "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 the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.

在一些实施例中,智能家居系统以住宅为平台,利用物联网、自动控制等技术,实现将与家居生活有关的各个电子设备、应用子系统有机的结合在一起。其中,用户通过登录智慧生活应用账号可管理智能家居系统中的设备,例如,智能穿戴设备、智能冰箱、智能窗帘、智能门锁和智能空气净化器等。In some embodiments, the smart home system uses the residence as a platform and utilizes technologies such as the Internet of Things and automatic control to organically combine various electronic devices and application subsystems related to home life. Among them, users can manage devices in the smart home system by logging into a smart life application account, such as smart wearable devices, smart refrigerators, smart curtains, smart door locks, and smart air purifiers.

一些示例中,电子设备(如手机、平板等)在登录智慧生活应用账号后,响应于用户操作与IoT设备绑定后,获取到该IoT设备的控制权限。一些示例中,IoT设备首次与智慧生活应用账号绑定后,该智慧生活应用账号为管理该IoT设备的主账号。电子设备登录该主账号后,可将控制该IoT设备的权限分享给其他电子设备,其他电子设备登录的智慧生活应用账号为从账号。即,从账号可获取到控制主账号下的部分或全部IoT设备的权限,从账号获取到的控制权限可小于或等于主账号对该IoT设备的控制权限。一般的,对于IoT设备,登录主账号的电子设备为主设备,登录从账号的电子设备为从设备。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 authority over 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 is the primary account for managing the IoT device. After the electronic device logs in to the primary account, the authority to control the IoT device can be shared with other electronic devices, and the smart life application account logged in by other electronic devices is a slave account. That is, the slave account can obtain authority to control some or all IoT devices under the primary account, and the control authority obtained by the slave account may be less than or equal to the control authority of the primary account over 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.

示例性地,如图1中(a)所示,手机显示智慧生活应用界面101,该智慧生活应用界面101用于显示当前智慧生活应用账号下管理的多个IoT设备的卡片。手机检测到用户点击顶灯卡片11的操作,可显示包括可对该顶灯卡片11进行的操作内容的菜单栏窗口12。手机检测到用户对菜单栏窗口12中显示的共享设备控件13的操作,确定用户指示将控制顶灯卡片11对应的顶灯的权限分享给其他电子设备。那么,手机可显示如图1中(b)所示界面102,在界面上显示分享权限的共享方式,如扫码共享、通过华为账号共享、共享给通讯录好友。Exemplarily, as shown in FIG. 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 the user's operation of clicking the ceiling light card 11, and can display a menu bar window 12 including the operation content that can be performed on the ceiling 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 ceiling light corresponding to the ceiling light card 11 with other electronic devices. Then, the mobile phone can display an interface 102 as shown in FIG. 1 (b), and display the sharing method of sharing permissions on the interface, such as scanning a code to share, sharing through a Huawei account, and sharing to friends in the address book.

比如,手机检测到用户对扫码共享控件14的操作,确定用户指示通过扫描对端设备二维码的方式,将控制顶灯的权限分享该对端设备。那么,如图2所示,手机(即设备1)显示扫码界面。并且,用户还需要打开对端设备(即设备2)的二维码显示界面。之后,用户可通过设备1扫描设备2显示的二维码,实现设备1将控制顶灯的权限分享给设备2。For example, the mobile phone detects the user's operation on the scan code sharing control 14, and determines that the user instructs to share the authority to control 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 also 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, so that device 1 shares the authority to control the ceiling light with device 2.

可以看出,在上述权限分享过程中,用户需要在两端设备上进行相应的操作,分享路径比较长,操作繁琐,影响用户的使用。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.

又比如,在通过华为账号共享的方式进行设备权限分享的过程中,用户需要输入对端设备的华为账号(如与对端设备的智慧生活账号相同),之后电子设备可将用户选中的设备的控制权限分享给登录该华为账号的设备。可以看出,在此过程中,增加用户记忆华为账号的难度。For another 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), and then the electronic device can share the control permissions of the device selected by the user with the device logged in with the Huawei account. It can be seen that in this process, it is more difficult for users to remember Huawei accounts.

再比如,在通过通讯录好友的方式进行设备权限分享的过程中,电子设备需要响应于用户操作,拉起其他应用,并显示通讯录好友信息供用户选择,用户需要浏览并选择需要分享的好友账号。之后,电子设备将用户选中的设备的控制权限分享给用户选择的好友账号对应的设备。可以看出,在此过程中,分享路径比较长,还需要拉起其他应用,用户操作繁琐。For another example, when sharing device permissions through address book friends, the electronic device needs to respond to user operations, pull up other applications, and display address book friend information for the user to select. The user needs to browse and select the friend account to be shared. After that, the electronic device shares the control permissions of the device selected by the user to the device corresponding to the friend account selected by the user. It can be seen that in this process, the sharing path is relatively long, and other applications need to be pulled up, which makes the user operation cumbersome.

此外,在上述通过各种方式完成设备权限分享后,用户在获取到控制设备权限的智慧生活应用账号下查找已经分享控制权限的设备存在一定的难度。那么,用户可能认为控制权限分享失败,影响用户的使用体验。比如,获取到控制设备权限的智慧生活应用账号下已经存在较多的IoT设备,用户需要在多个IoT设备的显示信息中查找所需的IoT设备,难度较大。In addition, after completing the sharing of device permissions through various methods mentioned above, it is difficult for users to find devices that have shared control permissions under the smart life application account that has obtained the control device permission. Then, users may think that the control permission sharing has failed, affecting the user experience. For example, there are already many IoT devices under the smart life application account that has obtained the control device permission. Users need to find the required IoT device in the display information of multiple IoT devices, which is difficult.

对此,本申请实施例提供一种权限分享方法,通过简单的靠近或碰一碰操作,第一电子设备可将智能设备的控制权限分享给第二电子设备,从而简化权限分享步骤,降低用户使用难度。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.

图3为本申请实施例提供的权限分享方法应用的通信系统的示意图。如图2所示,该通信系统包括第一电子设备100、第二电子设备200、第三电子设备300和服务器400。Fig. 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 Fig. 2, the communication system includes a first electronic device 100, a second electronic device 200, a third electronic device 300 and a server 400.

可选的,第一电子设备100可以为控制智能家居设备的专用设备,或者为包括控制智能家居设备功能的设备。例如,第一电子设备100可以为智能家居设备控制面板,或者为手机、平板、智能音响、智能手表等终端设备。其中,智能家居设备控制面板为用于控制智能家居系统中的智能家居设备的专用设备。在一些实施例中,第一电子设备100可以为固定式设备,也可以为便携 式设备。本申请对第一电子设备100的具体形式不做特殊限制。Optionally, the first electronic device 100 may be a dedicated device for controlling smart home devices, or a device including 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, a tablet, a smart speaker, a smart watch, etc. Among them, the 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. The present application does not impose any special restrictions on the specific form of the first electronic device 100.

可选的,如图3所示,第一电子设备100可与一个或多个第三电子设备300连接,用于管理和控制第三电子设备300。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 .

可选的,第三电子设备300例如可以为音箱、智慧屏、台灯、电灯、摄像头、空气净化器、手机、平板电脑、个人计算机(personal computer,PC)、个人数字助理(personal digital assistant,PDA)、上网本、可穿戴电子设备、人工智能(artificial intelligence)终端等终端设备,本申请对第三电子设备300的具体形式不做特殊限制。第三电子设备300安装的操作系统包括但不限于或者其它操作系统。第三电子设备300也可以不安装有操作系统。在一些实施例中,第三电子设备300可以为固定式设备,也可以为便携式设备。本申请对第三电子设备300的具体类型、有无安装操作系统、在有安装操作系统下所安装的操作系统均不作限制。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. The present application does not impose any special restrictions on the specific form of the third electronic device 300. The operating system installed in the third electronic device 300 includes but is not limited to Or other operating systems. The third electronic device 300 may not be installed with an operating system. 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 an operating system is installed, and the operating system installed when an operating system is installed.

在一些实施例中,第三电子设备300为IoT设备。第一电子设备100中安装有第一应用。其中,第一应用为能够与IoT设备连接,对IoT设备进行编辑以及控制。如图3所示,第一电子设备100通过第一应用连接一个或多个第三电子设备300。可选的,第一应用为智慧生活应用。In some embodiments, the third electronic device 300 is an IoT device. The first electronic device 100 is installed with a first application. The first application is capable of connecting to the IoT device, editing and controlling the IoT device. As shown in FIG. 3 , the first electronic device 100 is connected to one or more third electronic devices 300 through the first application. Optionally, the first application is a smart life application.

一些示例中,第一电子设备100在登录第一应用的第一账号后,完成第三电子设备300的注册。第一电子设备100将第三电子设备的注册信息,如包括设备信息,发送至服务器400。一些示例中,服务器400以家庭(home)为单位,管理一个或多个home包括的一个或多个第三电子设备300,第三电子设备300在注册过程中,服务器400将第三电子设备300加入到对应的home。一些示例中,第一电子设备100登录的第一应用的第一账号下管理有一个或多个home,服务器400可获取到该第一账号、一个或多个home、不同home下的设备信息,并进行管理。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.

可选的,服务器400可以是云服务器或者网络服务器等具有计算功能的设备或网络设备。服务器400可以是一台服务器,也可以是由多台服务器组成的服务器集群,或者是一个云计算服务中心。服务器400也可以描述为智能家居云平台,用于管理智能家居系统中包含的智能家居设备、智能家居设备对应的场景等。Optionally, the server 400 may be a device or network device with computing functions such as a cloud server or a network server. The server 400 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing service center. The server 400 may also be described as a smart home cloud platform, which is used to manage smart home devices included in the smart home system, scenes corresponding to the smart home devices, etc.

在一些实施例中,第一电子设备100和第二电子设备200之间建立有无线通信连接。其中,建立无线通信连接的无线通信技术包括但不限于以下的至少一种:蓝牙(bluetooth,BT)(例如,传统蓝牙或者低功耗(bluetooth low energy,BLE)蓝牙),无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),近距离无线通信(near field communication,NFC),紫蜂(Zigbee),调频(frequency modulation,FM),红外(infrared,IR)等。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 for establishing 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.

可选的,第一电子设备100和第二电子设备200也可以通过局域网中的第三方设备建立通信连接,第三方设备例如是路由器、网关、智能设备控制器、服务器等。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.

在一些实施例中,第二电子设备中安装有第一应用,并登录第一应用的第二账号。一些示例中,第二电子设备需要获取到控制第三电子设备300的权限,用户可通过操作具有控制该第三电子设备300的第一电子设备100,向第二电子设备200分享控制该第三电子设备300的权限。In some embodiments, the second electronic device has the first application installed and the second account of the first application logged in. In some examples, the second electronic device needs to obtain the permission to control the third electronic device 300, and 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.

一些示例中,第二电子设备200为包括控制智能家居设备功能的设备,第二电子设备200的设备类型与第一电子设备100的设备类型相同或不相同。第二电子设备200可连接一个或多个第三电子设备300,通过第一应用控制该已连接的一个或多个第三电子设备300。应理解,第一电子设备100连接的第三电子设备300和第二电子设备200连接的第三电子设备300相同、或不相同、或部分相同。第一电子设备100向第二电子设备200分享控制权限的第三电子设备300为未与第二电子设备200建立连接的设备。In some examples, the second electronic device 200 is a device including 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 the one or more connected third electronic devices 300 can be controlled by the first application. It should be understood that the third electronic device 300 connected to the first electronic device 100 is the same as, or different from, or partially the same as the third electronic device 300 connected to the second electronic device 200. 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.

在一些实施例中,上述操作系统例如为智能家居系统,第三电子设备300为智能家居设备。或者,上述操作系统为智能办公系统,第三电子设备300为智能办公设备。或者,上述通信系统也可以为智能校园通信系统等其他通信系统,本申请实施例对此不做限制。下文以上述通信系统例如为智能家居系统,第三电子设备300为智能家居设备为例,对本申请实施例提供的权限分享方法进行详细介绍。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 also be other communication systems such as a smart campus communication system, which is not limited in the present embodiment of the application. The following takes the case where the communication system is, for example, a smart home system and the third electronic device 300 is a smart home device as an example to describe in detail the permission sharing method provided in the present embodiment of the application.

可选的,本申请实施例中的第一电子设备100、第二电子设备100、第三电子设备300、服务器400可以通过不同的设备实现,不同的设备可以具有相同、相似或具有一定差异性的硬件结 构,比如图4或如图5所示的硬件结构。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. Structure, such as the hardware structure shown in Figure 4 or Figure 5.

例如,以第一电子设备100具有如图4所示的硬件结构为例,对图4所示的硬件结构进行说明。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.

示例性的,图4示出了第一电子设备100的一种结构示意图。Exemplarily, FIG4 shows a schematic structural diagram of the first electronic device 100 .

第一电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。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.

可以理解的是,本申请实施例示意的结构并不构成对第一电子设备100的具体限定。在本申请另一些实施例中,第一电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present application does 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 in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。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 processor (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), etc. Different processing units may be independent devices or integrated in one or more processors.

控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。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.

处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface 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, etc.

I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器,使处理器110与触摸传感器通过I2C总线接口通信,实现第一电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor through the I2C interface, so that the processor 110 communicates with the touch sensor through the I2C bus interface to realize the touch function of the first electronic device 100.

MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现第一电子设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现第一电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the shooting 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.

USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为第一电子设备100充电,也可以用于第一电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the first electronic device 100, and can also be used to transmit data between the first electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.

可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对第一电子设备100的结构限定。在本申请另一些实施例中,第一电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration 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 different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充 电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过第一电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the wired charger input through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive the wireless charging input via the wireless charging coil of the first electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device via the power management module 141.

电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。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 supplies power to the processor 110, the internal memory 121, the display screen 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 number, battery health status (leakage, impedance), etc. 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.

第一电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。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.

天线1和天线2用于发射和接收电磁波信号。第一电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

移动通信模块150可以提供应用在第一电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。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.

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent 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 the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device, or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

无线通信模块160可以提供应用在第一电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to 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, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

在一些实施例中,第一电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得第一电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(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,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。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 the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).

在一些实施例中,第一电子设备100通过移动通信模块150或无线通信模块160和服务器400、第二电子设备200通信,实现第三电子设备300的控制权限的分享等。 In some embodiments, the first electronic device 100 communicates with the server 400 and the second electronic device 200 via the mobile communication module 150 or the wireless communication module 160 to achieve sharing of control authority of the third electronic device 300, etc.

第一电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The first electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which 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 change display information.

显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),例如采用有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Mini-led,Micro-led,Micro-oled,量子点发光二极管(quantum dot light emitting diodes,QLED)等生产制造。在一些实施例中,第一电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。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), such as 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 1 or N display screens 194, where N is a positive integer greater than 1.

在一些实施例中,第一电子设备100在通过显示屏194显示第一应用的过程中,响应于用户操作,确定用户指示分享第三电子设备300。之后,响应于用户的碰一碰操作,获取第二电子设备200的标识码,基于该标识码,第一电子设备100和第二电子设备200建立安全通信连接。之后,基于该安全通信连接的交互,第一电子设备100可获取到第二电子设备登录的账号,从而通过无线通信模块160向服务器400请求获取向第二电子设备200分享第三电子设备300的控制权限的分享码。这样后续第二电子设备200可基于该分享码,获取到控制第三电子设备300的权限。In some embodiments, the first electronic device 100, in response to a user operation, determines that the user indicates to share the third electronic device 300 during the process of displaying the first application through the display screen 194. Afterwards, in response to the user's touch operation, the identification code of the second electronic device 200 is obtained, and based on the identification code, the first electronic device 100 and the second electronic device 200 establish a secure communication connection. Afterwards, based on the interaction of the secure communication connection, the first electronic device 100 can obtain the account logged in by the second electronic device, and thus request the server 400 to obtain a sharing code for sharing the control authority of the third electronic device 300 with the second electronic device 200 through the wireless communication module 160. In this way, the second electronic device 200 can subsequently obtain the authority to control the third electronic device 300 based on the sharing code.

摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,第一电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。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 optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted 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.

外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展第一电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。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 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external memory card.

内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储第一电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行第一电子设备100的各种功能应用以及数据处理。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.

音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。第一电子设备100可以通过音频模块170,例如音乐播放,录音等。音频模块170可以包括扬声器,受话器,麦克风,耳机接口,以及应用处理器等实现音频功能。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 signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110. The first electronic device 100 can use the audio module 170, such as music playing, recording, etc. The audio module 170 can include a speaker, a receiver, a microphone, a headphone interface, and an application processor to implement audio functions.

传感器模块180可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器,骨传导传感器等。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.

触摸传感器,也称“触控器件”。触摸传感器可以设置于显示屏194,由触摸传感器与显示屏194组成触摸屏,也称“触控屏”。触摸传感器用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器也可以设置于第一电子设备100的表面,与显示屏194所处的位置不同。A touch sensor is also called a "touch control device". The touch sensor can be arranged on the display screen 194, and the touch sensor and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor can also be arranged on the surface of the first electronic device 100, which is different from the position of the display screen 194.

按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。第一电子设备100可以接收按键输入,产生与第一电子设备100的用户设置以及功能控制有关的键信号输入。 The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The first electronic device 100 may receive key input and generate key signal input related to user settings and function control of the first electronic device 100.

马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。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.

指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和第一电子设备100的接触和分离。第一电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the first electronic device 100 by inserting or removing the SIM card interface 195. The first electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1.

例如,以服务器400具有如图5所示的硬件结构为例,对图5所示的硬件结构进行说明。For example, taking the server 400 having the hardware structure shown in FIG. 5 as an example, the hardware structure shown in FIG. 5 is described.

图5所示为本申请实施例提供的服务器400的硬件结构示意图。该服务器400包括至少一个处理器401,通信线路402,存储器403以及至少一个通信接口404。其中,存储器403还可以包括于处理器401中。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.

可以理解的是,本申请实施例示意的结构并不构成对服务器400的具体限定。在本申请另一些实施例中,服务器400可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the server 400. In other embodiments of the present application, the server 400 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

处理器401可以是一个通用中央处理器(central processing unit,CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本申请方案程序执行的集成电路。Processor 401 can 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.

通信线路402可包括一通路,在上述组件之间传送信息。The communication link 402 may include a pathway to transmit information between the above-mentioned components.

通信接口404,用于与其他设备通信。在本申请实施例中,通信接口可以是模块、电路、总线、接口、收发器或者其它能实现通信功能的装置,用于与其他设备通信。可选的,当通信接口是收发器时,该收发器可以为独立设置的发送器,该发送器可用于向其他设备发送信息,该收发器也可以为独立设置的接收器,用于从其他设备接收信息。该收发器也可以是将发送、接收信息功能集成在一起的部件,本申请实施例对收发器的具体实现不做限制。Communication interface 404, used to communicate with other devices. In the embodiment of the present application, the communication interface can be a module, a circuit, a bus, an interface, a transceiver or other device capable of implementing a communication function, used to communicate with other devices. Optionally, when the communication interface is a transceiver, the transceiver can be an independently arranged transmitter, which can be used to send information to other devices, and the transceiver can also be an independently arranged receiver, which is used to receive information from other devices. The transceiver can also be a component that integrates the functions of sending and receiving information, and the embodiment of the present application does not limit the specific implementation of the transceiver.

存储器403可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路402与处理器相连接。存储器也可以和处理器集成在一起。The memory 403 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices 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, optical disc storage (including compressed optical 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 the 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 be independent and connected to the processor via the communication line 402. The memory may also be integrated with the processor.

其中,存储器403用于存储用于实现本申请方案的计算机执行指令,并由处理器401来控制执行。处理器401用于执行存储器403中存储的计算机执行指令,从而实现本申请下述实施例提供的权限分享方法。The memory 403 is used to store computer-executable instructions for implementing the solution of the present application, and the execution 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.

可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码、指令、计算机程序或者其它名称,本申请实施例对此不作具体限定。Optionally, the computer-executable instructions in the embodiments of the present application may also be referred to as application code, instructions, computer program or other names, which are not specifically limited in the embodiments of the present application.

在具体实现中,作为一种实施例,处理器401可以包括一个或多个CPU,例如图5中的CPU0和CPU1。In a specific implementation, as an embodiment, the processor 401 may include one or more CPUs, such as CPU0 and CPU1 in FIG. 5 .

在具体实现中,作为一种实施例,服务器400可以包括多个处理器,例如图5中的处理器401和处理器405。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。In a specific implementation, as an embodiment, the server 400 may include multiple processors, such as the processor 401 and the processor 405 in FIG5 . Each of these processors may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor here may refer to one or more devices, circuits, and/or processing cores for processing data (e.g., computer program instructions).

上述图4和图5描述的设备结构也可适用于诸如第二电子设备或其他用于权限分享的双方设备。 The device structures described in FIG. 4 and FIG. 5 may also be applicable to a second electronic device or other two-party devices for authority sharing.

下文以第一电子设备100为具有第三电子设备300的控制权限的设备,第二电子设备200为需要获取该第三电子设备300的控制权限的设备,第三电子设备300为IoT设备(如智能家居设备等智能设备),服务器400为智能家居云服务器为例,对本申请实施例提供的权限分享方法进行详细介绍。In the following, the permission sharing method provided in the embodiment of the present application is described in detail by 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 smart devices such as smart home devices), and the server 400 as a smart home cloud server as an example.

在一些实施例中,第一电子设备响应于用户操作,启动第一应用(如智慧生活应用)。可选地,该智慧生活应用用于管理home中包括的至少一个智能设备。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.

一些示例中,第一电子设备在运行第一应用的过程中,第一电子设备响应于用户操作,可将home中的至少一个智能设备的控制权限分享给第二电子设备。可选地,控制权限为第一电子设备的用户指定的权限范围。比如,第一电子设备响应于用户的设置操作,确定分享的控制权限包括控制智能设备启动或关闭的权限,但不包括参数调整的权限等。In some examples, when the first electronic device is running the first application, the first electronic device can share the control authority of at least one smart device in the home with the second electronic device in response to the user operation. Optionally, the control authority is the authority range specified by the user of the first electronic device. For example, the first electronic device determines that the shared control authority includes the authority to control the startup or shutdown of the smart device in response to the user's setting operation, but does not include the authority to adjust parameters, etc.

一些示例中,第一电子设备显示第一分享界面的过程中,检测到用户对第一分享界面中的第一界面元素的操作,可确定用户指示将该第一界面元素对应的第一目标智能设备的控制权限分享给第二电子设备。那么,第一电子设备响应于与第二电子设备的靠近或碰一碰,可将该第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。In some examples, when the first electronic device displays the first sharing interface, it detects the user's operation on the first interface element in the first sharing interface, and it can be determined that the user instructs to share the control authority of the first target smart device corresponding to the first interface element with the second electronic device. Then, in response to approaching or touching the second electronic device, the first electronic device can share the control authority of the first target smart device corresponding to the first interface element with the second electronic device.

可选地,第一分享界面为设备管理界面,用于显示home中的至少一个智能设备对应的卡片,通过该卡片用于可实现控制相应的智能设备,从而通过该设备管理界面用户可实现管理至少一个智能设备。第一界面元素例如为第一分享界面上显示的卡片。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, through which the corresponding smart device can be controlled, so that the user can manage 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.

可选地,靠近或碰一碰基于NFC技术、BLE蓝牙技术、近距离局域网(neighbor awareness networking,NAN)通信技术中的一项或几项。可选地,基于NAN的通信技术例如为无线保真周边感知Wi-Fi aware通信技术。可选地,在一些可能的近距离通信技术支持的分享场景中,也可以无需设备之间有明确的靠近或碰触动作,而是设备间的距离在一定范围内时,即可直接通过相应的通信技术建立连接并进行相互之间的分享。Optionally, the approach or touch is based on one or more of NFC technology, BLE Bluetooth technology, and near-field local area network (neighbor awareness networking, NAN) communication technology. Optionally, the communication technology based on NAN is, for example, wireless fidelity surrounding awareness Wi-Fi aware communication technology. Optionally, in some possible sharing scenarios supported by short-distance communication technology, there is no need for clear approach or touch actions between devices. Instead, when the distance between devices is within a certain range, a connection can be directly established through the corresponding communication technology and sharing can be carried out between each other.

示例性地,如图6中(a)所示,第一电子设备显示第一分享界面601,该分享界面601为设备管理界面,包括home(如A的家)中包括的多个智能设备分别对应的卡片,卡片上显示有该智能设备的部分信息、控制按钮等,用户可以根据自身的需求,选择需要分享的设备。例如,第一电子设备检测到用户对卡片61(即第一界面元素)的操作,显示菜单栏窗口62。之后,第一电子设备检测到用户点击菜单栏窗口62中显示的共享设备控件63的操作,确定用户指示将卡片61对应的客厅的顶灯(即第一目标智能设备)进行分享。即,第一电子设备检测到用户指示分享设备的操作。之后,如图6中(b)所示界面602,第一电子设备可显示窗口64,在窗口64中显示用户选择分享的第一目标智能设备对应的卡片65,应理解用户选择分享的设备数量为一个或多个。并且,在窗口64中还显示有设备分享的方式,如附图标记66所示,第一电子设备可显示提示信息,以提示用户可通过碰一碰的方式进行设备分享。Exemplarily, as shown in FIG. 6 (a), the first electronic device displays a first sharing interface 601, which is a device management interface, including cards corresponding to multiple smart devices included in home (such as A's home), and the cards display some information, control buttons, etc. of the smart device. The user can select the device to be shared according to his own 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's operation of clicking the shared 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 the interface 602 in FIG. 6 (b), the first electronic device can display a window 64, and display a card 65 corresponding to the first target smart device selected by the user for sharing in the window 64. It should be understood that the number of devices selected by the user to share is one or more. In addition, the window 64 also displays the device sharing method, as shown by reference numeral 66, and the first electronic device can display a prompt message to prompt the user to share the device by touching it.

如此,用户通过靠近或碰一碰的短距离通信方式,可实现将第一电子设备管理的智能设备的控制权限分享给第二电子设备。相比于其他设备分享方式,用户不必再通过第一电子设备输入华为账号、拉起其他应用等,有效简化用户操作。In this way, users can share the control rights of the smart device managed by the first electronic device with the second electronic device through short-distance communication methods such as approaching or touching. Compared with other device sharing methods, users no longer need to enter Huawei accounts or open other applications through the first electronic device, which effectively simplifies user operations.

在一些实施例中,第一界面元素包括与第一目标智能设备关联的显示元素,第一电子设备还可将第一界面元素分享至第二电子设备。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.

比如,第一界面元素为卡片,那么在上述示例场景中,第一电子设备还可将该卡片分享给第二电子设备。那么,第二电子设备在显示该卡片后,用户可通过该卡片对第一目标智能设备进行控制。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.

示例性地,如图7中(a)所示的设备管理界面701,如附图标记71所示,第二电子设备管理的home(如B的家)包括11个智能设备,设备管理界面701显示有这11个智能设备分别对应的卡片。后续,第二电子设备响应于与第一电子设备的靠近或碰一碰获取到第一目标智能设备(如客厅的灯)的控制权限,并获取到该第一目标智能设备对应的第一界面元素(如客厅的灯对应的卡片)。那么,如图7中(b)所示界面702,如附图标记72所示,第二电子设备管理的B的家中的智能设备的数量变为12个,并且第二电子设备可显示第一界面元素(如卡片73)。Exemplarily, as shown in the device management interface 701 in (a) of FIG. 7 , as shown in the figure mark 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 the cards corresponding to the 11 smart devices. Subsequently, the second electronic device obtains the control authority of 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 FIG. 7 , as shown in the figure mark 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).

如此,第二电子设备不仅能够获取到第一电子设备分享的智能设备的权限,还可直接获取到 第一电子设备分享的用于控制该智能设备的界面元素,从而便于用户确定控制该智能设备的入口,简化用户的操作。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 make it easier for the user to determine the entry point for controlling the smart device, thereby simplifying the user's operation.

在一些实施例中,用户可通过上述方法,在设备管理界面中选择待分享的一个或多个智能设备。一些示例中,第一电子设备可根据用户操作,创建场景或空间。那么,用户也可直接选择待分享的场景或空间,这样第一电子设备可根据用户的操作,直接将用户选择的场景或空间中的多个智能设备的控制权限分享至第二电子设备。即,第一分享界面包括用于管理至少一个智能设备的设备管理界面,或者与第一目标智能设备所在空间关联的空间管理界面。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.

可选地,上述空间例如为整个家庭、或者为家庭中的房间、或者为办公场景中的办公室、会议室等。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 scenario.

可选地,场景中的智能设备的控制权限的分享不仅包括分享给第二电子设备的对该场景中的智能设备的控制权限,还可以包括对该场景的编辑权限。可选地,用户可选择分享的控制权限的范围。Optionally, the sharing of the control authority of the smart device in the scene includes not only the control authority of the smart device in the scene shared with the second electronic device, but also the editing authority of the scene. Optionally, the user can select the scope of the control authority to be shared.

示例性地,如图8所示,第一电子设备在智慧生活应用界面801上显示的第一界面元素不仅包括对应于智能设备的卡片81,还包括对应于场景的卡片82以及对应于空间的卡片83。那么,第一电子设备响应于用户对卡片82(或卡片83)的操作,可确定用户指示将卡片82(或卡片83)对应的场景(或空间)中的多个智能设备的控制权限分享至第二电子设备。例如,多个智能设备包括第一目标智能设备和第二目标智能设备,第一目标智能设备和第二目标智能设备属于同一空间或同一场景,响应于与第二电子设备的靠近或碰一碰,第一电子设备将第一界面元素对应的第一目标智能设备和第二目标智能设备的控制权限分享至第二电子设备。Exemplarily, 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 can 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.

相应的,如图9所示,第二电子设备还可以获取到第一电子设备分享的第一界面元素。如界面901所示,第二电子设备可显示第一电子设备分享的场景卡片91、空间卡片92、设备卡片93。Correspondingly, as shown in Figure 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.

如此,在更加丰富的智能设备管理场景中,用户可通过简单的操作,将场景或空间中的多个智能设备的控制权限分享至第二电子设备,提升用户的使用体验。In this way, in a richer smart device management scenario, the user can share the control rights of multiple smart devices in a scene or space to a second electronic device through simple operations, thereby improving the user experience.

在一些场景中,第一电子设备响应于与第二电子设备的靠近或碰一碰,建立短距离通信连接,从而基于该短距离通信连接,实现将第一目标智能设备的控制权限分享至第二电子设备。如下通过图10所示方法,对该短距离通信连接建立以及基于该短距离通信连接进行控制权限分享的方法进行详细介绍。In some scenarios, the first electronic device establishes a short-distance communication connection in response to approaching or touching the second electronic device, thereby sharing the control authority of the first target smart device to the second electronic device based on the short-distance communication connection. The method shown in Figure 10 is used as follows to introduce in detail the method of establishing the short-distance communication connection and sharing the control authority based on the short-distance communication connection.

图10为本申请实施例所提供的一种权限分享方法的流程示意图。需要说明的是,该方法并不以图10以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:FIG10 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 FIG10 and the specific sequence 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:

S1001、第一电子设备检测到用户在第一应用中指示分享设备的操作。S1001: A first electronic device detects that a user instructs a device sharing operation in a first application.

其中,第一应用例如为用于管理、控制第三电子设备的智慧生活应用。指示分享设备的操作例如为用户选择待分享的第三电子设备的操作。The first application is, for example, a smart life application for managing and controlling the third electronic device. The operation of indicating the sharing device is, for example, an operation of the user selecting the third electronic device to be shared.

示例性地,如图6中(a)所示,第一电子设备显示智慧生活应用界601的过程中,检测到用户对卡片61的操作,显示菜单栏窗口62。之后,第一电子设备检测到用户点击菜单栏窗口62中显示的共享设备控件63的操作,确定检测到用户指示分享设备的操作。For example, as shown in FIG6(a), when the first electronic device displays the smart life application interface 601, it detects the user's operation on the card 61 and displays the menu bar window 62. Afterwards, the first electronic device detects the user's operation of clicking the shared device control 63 displayed in the menu bar window 62, and determines that the user's operation of indicating the sharing device is detected.

S1002、响应于预设操作,第一电子设备获取第二电子设备生成的标识码。S1002: In response to a preset operation, the first electronic device obtains an identification code generated by the second electronic device.

一些示例中,预设操作例如为碰一碰等拉起近场通信连接(如NFC连接等)的操作。应理解,预设操作还可以为其他便于用户实施的操作,如摇一摇操作等。In some examples, the preset operation is, for example, an operation of tapping to initiate a near field communication connection (such as an NFC connection, etc.). It should be understood that the preset operation may also be other operations that are convenient for the user to implement, such as a shake operation, etc.

在一些实施例中,第二电子设备响应于用户操作,启动第一应用后,生成标识码,并将该标识码写入到NFC标签中。可选地,第二电子设备在将标识码写入到NFC标签中后,可将NFC模式标记为标签(tag)模式。这样后续,第一电子设备和第二电子设备检测到用户的碰一碰操作后,第一电子设备可读取第二电子设备的NFC标签中的预置的标识码。可选地,第一电子设备的NFC模式为读卡器模式。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 a 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 a card reader mode.

可选地,第二电子设备生成的标识码例如为个人识别密码(personal identification number,PIN)码。Optionally, the identification code generated by the second electronic device is, for example, a personal identification number (PIN) code.

一些示例中,第二电子设备也可不预置识别码,而是响应于第一电子设备的碰一碰操作,按 照预设周期生成标识码。这样,第一电子设备也可获取到第二电子设备生成的标识码。可选地,第二电子设备处于任意显示界面,响应于第一电子设备的碰一碰操作,生成标识码。可选地,第二电子设备响应于碰一碰操作生成标识码并启动第一应用。In some examples, the second electronic device may not preset the identification code, but respond to the touch operation of the first electronic device, press Generate an identification code according to a preset period. In this way, the first electronic device can also obtain the identification code generated by the second electronic device. Optionally, the second electronic device is in any display interface, and generates an identification code in response to a touch operation of the first electronic device. Optionally, the second electronic device generates an identification code in response to the touch operation and starts the first application.

比如,第一电子设备通过蓝牙测距等方式,确定位于附近的第二电子设备。并且,第二电子设备中预置有震动传感器,响应于用户的预设操作,第二电子设备通过震动传感器可检测到该碰一碰操作后,生成标识码。For example, the first electronic device determines the second electronic device located nearby by Bluetooth distance measurement or the like. In addition, the second electronic device is pre-installed with a vibration sensor, and in response to a preset operation of the user, the second electronic device can detect the touch operation through the vibration sensor and generate an identification code.

在一些实施例中,第二电子设备在启动第一应用,并将生成的标识码写入到NFC标签中后,将自身的NFC模式标记为tag模式。后续,如第二电子设备在第一应用中,检测到用户指示分享设备的操作,可再将NFC模式标记修改为读卡器模式。可选地,第二电子设备的NFC模式为读卡器模式时,可删除NFC标签中的标识码。后续在第二电子设备退出设备分享界面后,可再触发生成标识码。或者,第二电子设备不删除NFC标签中的标识码。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. Later, 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. Later, 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.

如此,相比于其他共享方式,用户不必再通过第一电子设备输入华为账号、拉起其他应用等,有效简化用户操作。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.

S1003、第一电子设备和第二电子设备基于标识码协商通信密钥,建立安全通信连接。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.

在一些实施例中,第一电子设备在获取到第二电子设备的标识码后,可向第二电子设备发送蓝牙连接请求。可选地,第一电子设备通过蓝牙广播的方式,向第二电子设备发送蓝牙连接请求。相应的,第二电子设备在碰一碰操作后,可开启蓝牙广播,以接收第一电子设备广播的蓝牙连接请求。In some embodiments, after acquiring the identification code of the second electronic device, the first electronic device may send a Bluetooth connection request to the second electronic device. Optionally, the first electronic device sends the Bluetooth connection request to the second electronic device by Bluetooth broadcasting. Correspondingly, after the bump operation, the second electronic device may turn on Bluetooth broadcasting to receive the Bluetooth connection request broadcasted by the first electronic device.

在一些实施例中,响应于蓝牙连接请求,第一电子设备和第二电子设备可建立蓝牙连接。一些示例中,为保证蓝牙通信的安全性,第一电子设备和第二电子设备可基于第二电子设备的标识码,进行密钥协商,以生成通信密钥。后续,第一电子设备和第二电子设备通过该通信密钥对通信数据进行加密,从而保证通信数据传输的安全性,即实现建立安全通信连接。In some embodiments, in response to the Bluetooth connection request, the first electronic device and the second electronic device may establish a Bluetooth connection. In some examples, to ensure the security of Bluetooth communication, the first electronic device and the second electronic device may negotiate a key based on the identification code of the second electronic device to generate a communication key. Subsequently, the first electronic device and the second electronic device encrypt the communication data using the communication key, thereby ensuring the security of the communication data transmission, that is, establishing a secure communication connection.

一些示例中,在通信密钥协商过程中,第一电子设备向第二电子设备发送sin1,第二电子设备向第二电子设备发送sin2。之后,第一电子设备和第二电子设备可基于sin1、sin2以及第二电子设备的标识码,生成相同的通信密钥。可选地,sin1例如为第一电子设备中预置的sin码,或者为第一电子设备通过预设算法生成的sin码。Sin2例如为第二电子设备中预置的sin码,或者为第二电子设备通过预设算法生成的sin码。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. Afterwards, 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 preset 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 preset in the second electronic device, or a sin code generated by the second electronic device using a preset algorithm.

另一些示例中,第一电子设备和第二电子设备中预置有一个相同的数字(如大于预设阈值的大数),第一电子设备和第二电子设备根据该数字和第二电子设备的标识码,可生成相同的通信密钥。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.

应理解,除上述示例的两种通信密钥协商方法外,第一电子设备和第二电子设备还可以通过其他方法进行通信密钥协商,本申请实施例对此不再一一示例。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.

S1004、第一电子设备通过安全通信连接,获取第二电子设备登录的账号。S1004: The first electronic device obtains the account number used to log in to the second electronic device through a secure communication connection.

一些示例中,第二电子设备登录的账号例如为当前管理第一目标智能设备的智慧生活应用账号。或者,该账号也可以为设备级的账号,如华为账号。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 may also be a device-level account, such as a Huawei account.

在一些实施例中,在设备分享过程中,第一电子设备向第二电子设备分享设备权限。基于此,描述第一电子设备为所有人(owner)设备,第一电子设备登录的账号为ownerId。描述第二电子设备为成员(member)设备,第二电子设备登录的账号为UserId。In some embodiments, during the device sharing process, the first electronic device shares device permissions with the second electronic device. Based on this, the first electronic device is described as the owner device, and the account logged in by the first electronic device is ownerId. The second electronic device is described as a member device, and the account logged in by the second electronic device is UserId.

在一些实施例中,第二电子设备在与第一电子设备建立安全通信连接后,可将通过通信密钥加密后的UserId发送至第一电子设备。一些示例中,第二电子设备也可响应于第一电子设备发送的账号获取请求,向第一电子设备发送该UserId。In some embodiments, after establishing a secure communication connection with the first electronic device, the second electronic device may send the UserId encrypted by 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.

可选地,上述步骤S1002和步骤S1003为可选步骤,响应于预设操作,第一电子设备也可直接获取到第二电子设备登录的第一账号(如智慧生活账号或华为账号)。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.

S1005、第一电子设备向服务器发送待分享设备的设备标识和第二电子设备登录的账号。S1005: The first electronic device sends the device identification of the device to be shared and the account number for logging in to the second electronic device to the server.

在一些实施例中,第一电子设备响应于用户指示分享设备的操作,可确定待分享设备以及待分享设备的设备标识。那么,第一电子设备在获取到第二电子设备登录的账号后,可向服务器发送该设备标识和该账号,以请求获取向该账号分享该设备标识对应的设备的分享码。 In some embodiments, the first electronic device can determine the device to be shared and the device identifier of the device to be shared in response to the user's instruction to share the device. Then, after obtaining the account logged in by the second electronic device, the first electronic device can send the device identifier and the account to the server to request to obtain a sharing code for sharing the device corresponding to the device identifier with the account.

比如,第一电子设备向服务器发送待分享设备的设备标识(deviceId)和第二电子设备的member UserId。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.

S1006、服务器根据设备标识和第二电子设备登录的账号,生成分享码。S1006: The server generates a sharing code according to the device identification and the account used to log in to the second electronic device.

在一些实施例中,服务器在接收到第一电子设备发送的deviceId和member UserId后,确定deviceId对应的第三电子设备为第一电子设备登录的账号下控制的设备。之后,服务器可生成相应的分享码(shareCode)。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. Afterwards, the server may generate a corresponding sharing code (shareCode).

一些示例中,服务器生成的分享码配置有失效条件,失效条件例如包括使用次数要求、使用时间要求等。比如,为保证设备权限分享的安全性,该分享码的使用次数最多为一次。可选地,服务器还可为该分享码设置有效使用期限,如5分钟内有效等。In some examples, the sharing code generated by the server is configured with an expiration condition, which includes, for example, a usage count requirement, a usage time requirement, etc. 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 a valid usage period for the sharing code, such as valid for 5 minutes.

S1007、服务器向第一电子设备发送分享码。S1007: The server sends a sharing code to the first electronic device.

在一些实施例中,服务器在生成分享码后,向第一电子设备反馈该分享码。相应的,第一电子设备接收服务器反馈的分享码。In some embodiments, after generating the sharing code, the server feeds back the sharing code to the first electronic device. Correspondingly, the first electronic device receives the sharing code fed back by the server.

S1008、第一电子设备向第二电子设备发送分享码。S1008: The first electronic device sends a sharing code to the second electronic device.

在一些实施例中,第一电子设备在接收到分享码后,利用通信密钥对该分享码进行加密。之后,第一电子设备向第二电子设备发送该加密后的分享码。相应的,第二电子设备接收第一电子设备发送的加密后的分享码。之后,第二电子设备可对该加密后的分享码进行解密,以获取到分享码。In some embodiments, after receiving the sharing code, the first electronic device encrypts the sharing code using the communication key. Then, the first electronic device sends the encrypted sharing code to the second electronic device. Correspondingly, the second electronic device receives the encrypted sharing code sent by the first electronic device. Then, the second electronic device can decrypt the encrypted sharing code to obtain the sharing code.

S1009、第二电子设备向服务器发送设备分享请求,该设备分享请求中携带有分享码。S1009: The second electronic device sends a device sharing request to the server, where the device sharing request carries a sharing code.

在一些实施例中,第二电子设备在获取到分享码后,可向服务器发送设备分享请求,以请求获取该设备分享请求中携带的分享码对应的设备的控制权限。相应的,服务器接收第二电子设备发送的设备分享请求。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 of 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.

一些示例中,第二电子设备在第一应用处于登录自己的第一应用账号的情况下,向服务器发送设备分享请求,以使得自己的第一应用账号能够获取到待分享设备的控制权限。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.

S1010、服务器根据第二电子设备登录的账号和分享码,建立第二电子设备和待分享设备的分享关系。S1010: The server establishes a sharing relationship between the second electronic device and the device to be shared according to the account number and sharing code logged in by the second electronic device.

在一些实施例中,服务器在接收到设备分享请求后,对该分享码进行解析和鉴权。比如,服务器确定该分享码是否正确,如通过该分享码是否为服务器生成且满足失效条件要求,确定该分享码是否正确。若分享码正确,服务器进一步对该分享码进行解析和鉴权。若分享码错误,服务器向第二电子设备发送设备分享失败响应。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 condition requirements. If the sharing code is correct, the server further parses and authenticates the sharing code. If the sharing code is wrong, the server sends a device sharing failure response to the second electronic device.

之后,在分享码正确的情况下,服务器获取该分享码指示的设备标识和第一应用账号。之后,服务器确定发送设备分享请求的第二电子设备登录的账号是否与分享码指示的第一应用账号相同。若是,服务器可确定第二电子设备满足分享条件,可将该设备标识对应的待分享设备分享给第二电子设备。若否,服务器可确定第二电子设备不满足分享条件,可向第二电子设备发送设备分享失败响应。Afterwards, if the sharing code is correct, the server obtains the device identification and the first application account indicated by the sharing code. Afterwards, the server 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 can determine that the second electronic device meets the sharing conditions, and can share the device to be shared corresponding to the device identification with the second electronic device. If not, the server can determine that the second electronic device does not meet the sharing conditions, and can send a device sharing failure response to the second electronic device.

在一些实施例中,服务器通过第一应用的账号管理该账号下的一个或多个第三电子设备。那么,服务器可通过将待分享设备的设备标识添加到第二电子设备登录的账号下,建立第二电子设备和待分享设备的分享关系。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 identification of the device to be shared to the account logged in by the second electronic device.

在一些实施例中,服务器建立第二电子设备和待分享设备的分享关系后,可向第二电子设备发送分享成功响应。可选地,分享成功响应中携带有待分享设备的设备信息,如设备标识、设备媒体访问控制(media access control,MAC)地址等。这样,第二电子设备在接收到分享成功响应后,可获取到控制待分享设备的权限,如根据分享成功响应中携带的设备信息,与待分享设备建立通信连接。可选地,控制待分享设备的权限例如包括使用待分享设备的权限、再次分享待分享设备的权限、解除与待分享设备的分享关系的权限等。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 cancel the sharing relationship with the device to be shared, etc.

一些示例中,第二电子设备对于待分享设备的控制权限小于或等于第一电子设备对于待分享设备的控制权限。一些示例中,第一电子设备可根据用户操作,确定分享给第二电子设备控制该待分享设备的权限范围。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.

如此,第一电子设备和第二电子设备基于近场通信完成设备的控制权限的分享,提高权限分 享的实时性和交互性,从而提升用户的使用体验。In this way, the first electronic device and the second electronic device share the control authority of the device based on the near field communication, thereby improving the authority sharing. The real-time and interactivity of sharing can enhance the user experience.

并且,在设备分享过程中,用户只需要通过简单的碰一碰操作,即可触发第一电子设备和第二电子设备自动完成权限分享,用户操作简单,有效降低用户操作难度。Furthermore, 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.

在一些场景中,由于第二电子设备可能控制有其他设备,那么在设备分享完成后,用户可能并不知道设备已经分享成功,或者找不到已分享的设备的控制入口,影响用户的使用体验。基于此,本申请实施例提供的权限分享方法,在设备的权限分享后,第一电子设备和/或第二电子设备可显示分享动画,以帮助用户确认设备的权限分享情况。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 cannot 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 after the device permissions are shared to help the user confirm the permission sharing status of the device.

一些示例中,第一电子设备在第一分享界面上呈现动效,该动效用于提示用户将第一界面元素对应的第一目标智能设备分享至第二电子设备。例如,该动效包括与第一目标智能设备关联的第一界面元素移出的动效。In some examples, the first electronic device presents an animation on the first sharing interface, which is used to prompt 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.

示例性地,如图6中(b)所示界面602,响应于用户的碰一碰操作,第一电子设备确定已经成功将卡片65对应的客厅的顶灯分享给第二电子设备。那么,如图11所示界面101,第一电子设备可显示卡片65向窗口64外移动的分享动画,从而生动形象的告知用户,当前客厅的灯的控制权限已经分享给了其他设备。For example, as shown in interface 602 in (b) of FIG6 , in response to the user's tap operation, the first electronic device determines that the ceiling light of the living room corresponding to card 65 has been successfully shared with the second electronic device. Then, as shown in interface 101 of FIG11 , the first electronic device can display a sharing animation of card 65 moving outside window 64, thereby vividly informing the user that the control authority of the current living room light has been shared with other devices.

另一些示例中,第二电子设备显示动效,该动效用于提示第二电子设备获取第一目标智能设备的控制权限。例如,该动效包括与第一目标智能设备关联的第一界面元素移入的动效。In some other examples, the second electronic device displays an animation, which is used to prompt the second electronic device to obtain the control authority of 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.

示例性地,如图12中(a)所示,第二电子设备显示智慧生活应用界面1201的过程中,响应于用户的碰一碰操作,确定已经成功获取到第一电子设备控制的客厅的顶灯的控制权限。那么,如图12中(b)所示界面1202,第二电子设备可显示客厅的顶灯对应的卡片121(即第一界面元素)。可选地,客厅的顶灯对应的卡片121的显示内容可由第一电子设备或服务器通知,或者第二电子设备根据设备信息自动生成。For example, as shown in (a) of FIG12, during the process of the second electronic device displaying the smart life application interface 1201, in response to the user's touch operation, it is determined that the control authority of the ceiling light in the living room controlled by the first electronic device has been successfully obtained. Then, as shown in the interface 1202 in (b) of FIG12, the second electronic device can display the card 121 (i.e., the first interface element) corresponding to the ceiling light in the living room. Optionally, the display content of the card 121 corresponding to the ceiling light in the living room can be notified by the first electronic device or the server, or automatically generated by the second electronic device according to the device information.

一些示例中,在智慧生活应用界面上,第二电子设备按照一定的规则,按顺序显示多个设备对应的多张卡片。如按照设备位置、设备使用频率、设备类型等,排列设备对应的卡片的显示位置。因此,第二电子设备在获取到客厅的顶灯的控制权限并显示对应的卡片121后,可显示动画,直至卡片121移动到如图12中(c)所示界面1203中所示的合适的显示位置。即,通过移入动效,生动形象的告知用户,当前第二电子设备已经获取到了客厅的灯的控制权限,并且帮助用户快速确定客厅的灯对应的卡片121的显示位置,便于用户操作该客厅的灯对应的卡片121。In some examples, on the smart life application interface, the second electronic device displays multiple cards corresponding to multiple devices in order 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 (c) of Figure 12. That is, through the moving-in animation, the user is vividly informed that the current 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.

在一些实施例中,如上述图10所示的方法,第一电子设备通过与第二电子设备和服务器的交互,实现第一目标智能设备的控制权限的分享。那么,在权限分享成功后,第一电子设备和第二电子设备也可通过交互,获取到该分享成功的消息,从而显示分享动画。In some embodiments, as shown in the method of FIG10 above, the first electronic device shares the control authority of the first target smart device through interaction with the second electronic device and the server. Then, after the authority sharing is successful, the first electronic device and the second electronic device can also obtain the message of the successful sharing through interaction, thereby displaying the sharing animation.

图13为本申请实施例所提供的又一种权限分享方法的流程示意图。需要说明的是,该方法并不以图13以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:FIG13 is a flowchart of another permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to FIG13 and the specific sequence 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:

S1301、服务器向第二电子设备发送分享成功响应。S1301. The server sends a sharing success response to the second electronic device.

S1302、服务器向第一电子设备发送分享成功响应。S1302: The server sends a sharing success response to the first electronic device.

在一些实施例中,服务器在确定建立第二电子设备和待分享设备的分享关系后,可分别向第一电子设备和第二电子设备发送分享成功响应,以告知第一电子设备和第二电子设备当前服务器已将待分享设备的权限分享给第二电子设备。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.

一些示例中,服务器根据接收到的第二电子设备发送的设备分享请求中携带的分享码,可确定该分享码对应的第一电子设备。那么,服务器在确定建立分享关系后,可向第一电子设备发送的分享成功响应,并在该分享成功响应中携带待分享设备的设备标识和第二电子设备的第一应用账号。这样,第一电子设备在接收到分享成功响应后,能够确定将哪些智能设备分享给了哪一控制设备。In some examples, the server can determine the first electronic device corresponding to the sharing code according to the sharing code carried in the device sharing request sent by the second electronic device. Then, after determining that the sharing relationship is established, the server can send a sharing success response to the first electronic device, and carry the device identification of the device to be shared and the first application account of the second electronic device in the sharing success response. In this way, after receiving the sharing success response, the first electronic device can determine which smart devices are shared with which control device.

一些示例中,服务器向第二电子设备发送的分享成功响应中携带有分享成功的智能设备的设备信息。或者,服务器向第二电子设备发送的分享成功响应中不携带分享成功的智能设备的设备信息,而第一电子设备在接收到分享成功响应后,通过与第二电子设备之间的安全通信连接,向第二电子设备发送该分享成功的智能设备的设备信息。 In some examples, the sharing success response sent by the server to the second electronic device carries the device information of the successfully shared smart device. Alternatively, the sharing success 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 sharing success 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.

一些示例中,服务器可先向第一电子设备发送分享成功响应,再向第二电子设备发送分享成功响应。或者,服务器可先向第二电子设备发送分享成功响应,再向第一电子设备发送分享成功响应。即,本申请实施例不限制步骤S1301或步骤S1302的执行顺序。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 embodiment of the present application does not limit the execution order of step S1301 or step S1302.

另一些示例中,服务器可单独向第一电子设备或第二电子设备发送分享成功响应。In other examples, the server may send a sharing success response to the first electronic device or the second electronic device separately.

比如,服务器向第二电子设备发送分享成功响应后,第二电子设备确定分享成功响应指示的已经分享成功的设备对应的第一电子设备。之后,第二电子设备通过与第一电子设备之间的安全通信连接,向第一电子设备发送设备分享成功指示,该设备分享成功指示中携带有已分享成功的智能设备的设备标识。这样,第一电子设备在接收到设备分享成功指示后,也可确定该设备标识对应的设备已经分享给第二电子设备。即,步骤S1302为可选步骤。For example, after the server sends a sharing success response to the second electronic device, the second electronic device determines the first electronic device corresponding to the device that has been successfully shared indicated by the sharing success response. Afterwards, the second electronic device sends a device sharing success indication to the first electronic device through a secure communication connection with the first electronic device, and the device sharing success indication carries the device identification of the successfully shared smart device. In this way, after receiving the device sharing success indication, the first electronic device can also determine that the device corresponding to the device identification has been shared with the second electronic device. That is, step S1302 is an optional step.

又比如,服务器向第一电子设备发送分享成功响应后,第一电子设备确定分享成功响应指示的已经分享成功的设备以及对应的第二电子设备。之后,第一电子设备通过与第二电子设备之间的安全通信连接,向第二电子设备发送设备分享成功指示,该设备分享成功指示中携带有已分享成功的智能设备的设备信息。这样,第二电子设备在接收到设备分享成功指示后,也可确定获取到该设备信息对应的设备的控制权限。即,步骤S1301为可选步骤。For another example, after the server sends a sharing success response to the first electronic device, the first electronic device determines the device that has been successfully shared indicated by the sharing success response and the corresponding second electronic device. Afterwards, the first electronic device sends a device sharing success indication to the second electronic device through a secure communication connection with the second electronic device, and the device sharing success indication carries the device information of the successfully shared smart device. In this way, after receiving the device sharing success indication, the second electronic device can also determine the control authority of the device corresponding to the device information. That is, step S1301 is an optional step.

S1303、第一电子设备显示分享动画。S1303: The first electronic device displays a sharing animation.

在一些实施例中,第一电子设备在确定已经分享成功的设备后,可显示分享动画,以提示用户当前已将该设备分享给其他设备。In some embodiments, after determining that a device 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.

应理解,第一电子设备将控制某智能设备的权限分享给其他设备后,第一电子设备仍具有控制该智能设备的权限。It should be understood that after the first electronic device shares the authority to control a certain smart device with other devices, the first electronic device still has the authority to control the smart device.

S1304、第二电子设备显示分享动画。S1304: The second electronic device displays a sharing animation.

在一些实施例中,第二电子设备在确定已经分享成功的设备后,可显示分享动画,以提示用户当前已获取到控制该设备的权限。In some embodiments, after determining that a 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.

应理解,本申请实施例不限制步骤S1303和步骤S1304的执行顺序,以及是否执行步骤S1303或步骤S1304。It should be understood that the embodiments of the present application do not limit the execution order of step S1303 and step S1304, and whether to execute step S1303 or step S1304.

如此,通过显示分享动画,帮助用户快速确认设备分享情况,实现精准的控制已分享设备,有效提升用户的使用体验。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.

在一些场景中,操作第二电子设备的用户可能需要控制第一电子设备控制的某个home中的全部第三电子设备,通过如上述图10所示方法,可实现全部第三电子设备的控制权限的分享,但选择第三电子设备的过程可能较为复杂,且数据传输量较大。In some scenarios, a user operating a second electronic device may need to control all third electronic devices in a home controlled by a first electronic device. Through the method shown in FIG. 10 above, control authority over all third electronic devices can be shared, but the process of selecting a third electronic device may be more complicated and involve a large amount of data transmission.

在一些实施例中,第一电子设备显示的第一分享界面还可以为与第一目标智能设备所在的空间关联的空间管理界面。这样,响应于与第二电子设备的靠近或碰一碰,第一电子设备可将该空间管理界面中管理的智能设备的控制权限分享至第二电子设备。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 touching the second electronic device, the first electronic device may share the control authority of the smart device managed in the space management interface with the second electronic device.

示例性地,如图14中(a)所示,第一电子设备显示智慧生活应用界面1401。其中,当前智慧生活应用登录的账号下管理一个或多个home,如附图标记141所示,当前显示的home为A的家。响应于用户对附图标记141指示的控件的操作,第一电子设备显示菜单栏窗口142。之后,响应于用户对菜单栏窗口142中的家庭管理控件143的操作,第一电子设备可显示如图14中(b)所示的家庭管理界面1402。响应于用户在家庭管理界面1402上对控件144的操作,第一电子设备可显示如图14中(c)所示的家庭详情页1403(即第一分享界面)。在家庭详情页1403上显示有A的家的详情信息,如家庭名称、家庭位置、家庭成员等。之后,第一电子设备检测到用户对添加成员控件145(即第一界面元素)的操作,确定用户指示在A的家中添加家庭成员。之后,第一电子设备响应于到用户的碰一碰操作后,确定将当前显示的A的家分享给第二电子设备。Exemplarily, as shown in (a) of FIG. 14 , the first electronic device displays a smart life application interface 1401. Among them, one or more homes are managed under the account currently logged in by the smart life application, as shown in reference numeral 141, and the home currently displayed is A's home. In response to the user's operation on the control indicated by reference numeral 141, the first electronic device displays a menu bar window 142. Thereafter, in response to the user's operation on the home management control 143 in the menu bar window 142, the first electronic device may display a home management interface 1402 as shown in (b) of FIG. 14 . In response to the user's operation on the control 144 on the home management interface 1402, the first electronic device may display a home details page 1403 (i.e., a first sharing interface) as shown in (c) of FIG. The home details page 1403 displays detailed information of A's home, such as home name, home location, family members, etc. Thereafter, the first electronic device detects the user's operation on the add member control 145 (i.e., the first interface element), and determines that the user instructs to add family members 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.

一些示例中,第一界面元素包括与添加用户关联的显示元素,如添加成员控件145。其中,该添加用户用于控制第一目标智能设备。那么,在家庭中的智能设备分享成功后,第一电子设备可显示第二界面元素,该第二界面元素包括与所述第二电子设备的用户关联的显示元素。可选地,第一电子设备也可显示动效,该动效包括与第二电子设备的用户关联的显示元素移入的动效。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. Then, after the smart device in the home is 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 an animation of a display element associated with the user of the second electronic device moving in.

示例性地,如图14中(d)所示界面1404,第一电子设备显示分享动画,如附图标记146所示,第一电子设备显示第二电子设备登录的智慧生活应用的头像(或家庭图标)移入到当前显示 的家庭详情页的动画。之后,如图15所示界面1501,第一电子设备在A的家的家庭详情页上家庭成员部分显示头像151(即第二界面元素),如该头像151为第二电子设备登录的智慧生活应用账号的头像,这样用户能够确认当前家庭已成功分享给第二电子设备。For example, as shown in interface 1404 in (d) of FIG. 14 , the first electronic device displays a sharing animation, as shown in reference numeral 146 , and the first electronic device displays the avatar (or home icon) of the smart life application logged in by the second electronic device moving into the currently displayed Afterwards, as shown in interface 1501 of FIG. 15 , the first electronic device displays avatars 151 (i.e., second interface elements) in the family details page of A's home. If the 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.

一些示例中,在智能设备的权限分享成功后,第二电子设备也可显示动效。In some examples, after the permissions of the smart device are shared successfully, the second electronic device may also display an animation.

示例性地,如图16中(a)所示界面1601,第二电子设备显示智慧生活应用,如附图标记161所示,当前智慧生活应用登录的账号下管理的家庭为B的家,家中包括的设备数量为11个。之后,响应于用户的碰一碰操作,第二电子设备确定家庭分享成功。那么,如图16中(b)所示界面1602,第二电子设备显示第一电子设备登录的智慧生活应用的头像(或家庭图标)162飞入到当前显示的智慧生活界面的动画,从而帮助用户确认已完成家庭分享。For example, as shown in interface 1601 in (a) of FIG16 , the second electronic device displays a smart life application, as shown in reference numeral 161, the family managed under the account currently logged into the smart life application is B's family, and the number of devices included in the family is 11. Afterwards, in response to the user's touch operation, the second electronic device determines that the family sharing is successful. Then, as shown in interface 1602 in (b) of FIG16 , the second electronic device displays an animation of the avatar (or family icon) 162 of the smart life application logged into the first electronic device flying into the currently displayed smart life interface, thereby helping the user confirm that the family sharing has been completed.

一些示例中,用户进行家庭分享,是需要操作家庭中的设备。因此,第二电子设备在获取到第一电子设备分享的家庭的控制权限后,可切换显示该家庭的设备管理界面,从而方便用户进行设备操作。In some examples, when a user performs family sharing, he needs to operate the devices in the family. Therefore, after obtaining the control authority of the family shared by the first electronic device, the second electronic device can switch to display the device management interface of the family, so as to facilitate the user to operate the device.

示例性地,如图16中(c)所示界面1603,第二电子设备在显示家庭分享动画后,如附图标记163所示,可直接切换显示分享成功的A的家对应的设备管理界面。这样,简化用户进行家庭切换的操作,提升用户的使用体验。For example, as shown in interface 1603 in (c) of FIG16 , after displaying the home sharing animation, the second electronic device can directly switch to display the device management interface corresponding to A's home that has been successfully shared, as shown by reference numeral 163. In this way, the user's home switching operation is simplified and the user's experience is improved.

可选地,实现第一电子设备和第二电子设备显示分享动画的其他内容,可参考上述图13所示的步骤S1301-步骤S1304的相关内容,本申请实施例对此不再赘述。Optionally, to enable the first electronic device and the second electronic device to display other contents of the shared animation, reference may be made to the relevant contents of steps S1301 to S1304 shown in FIG. 13 above, which will not be described in detail in this embodiment of the present application.

如此,在home分享过程中,用户只需要简单的碰一碰操作,即可触发第一电子设备和第二电子设备自动完成家庭群组的分享,用户操作简单,有效降低用户操作难度。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 the difficulty of user operation is effectively reduced.

并且,第一电子设备和第二电子设备基于近场通信完成home分享,提高home分享的实时性和交互性,从而提升用户的使用体验。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.

在一些场景中,第一电子设备响应于与第二电子设备的靠近或碰一碰,建立短距离通信连接,从而基于该短距离通信连接,实现将home中的第一目标智能设备的控制权限分享至第二电子设备。如下通过图17所示方法,对家庭群组控制权限分享的方法进行详细介绍。In some scenarios, the first electronic device establishes a short-range communication connection in response to approaching or touching the second electronic device, thereby sharing the control authority of the first target smart device in the home to the second electronic device based on the short-range communication connection. The method of sharing the control authority of the home group is described in detail below through the method shown in Figure 17.

一些示例中,服务器可通过将第二电子设备的第一应用账号添加为第一电子设备的第一应用账号中某一home的家庭成员的方式,实现home中全部第三电子设备的权限分享,丰富设备权限分享场景,提升用户的使用体验。In some examples, the server can achieve permission sharing of all third electronic devices in a 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.

图17为本申请实施例所提供的又一种权限分享方法的流程示意图。需要说明的是,该方法并不以图17以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:FIG17 is a flowchart of another permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to FIG17 and the specific sequence 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:

S1701、第一电子设备检测到用户在第一应用中指示添加家庭成员的操作。S1701: The first electronic device detects that a user instructs in a first application to add a family member.

在一些实施例中,第一电子设备的第一应用中提供有添加家庭成员的入口。例如,用户可通过输入华为账号的方式,添加家庭成员。可以看出,由于用户需要记忆华为账号,难度较大。因此,基于如上述图10示例的权限分享方法,第一电子设备和第二电子设备也可基于近场通信的方式,完成家庭成员的添加。In some embodiments, the first application of the first electronic device provides an entry for adding family members. For example, the user can add family members by entering a Huawei account. It can be seen that it is difficult for the user to remember the Huawei account. Therefore, based on the permission sharing method as shown in the example of FIG. 10 above, the first electronic device and the second electronic device can also complete the addition of family members based on near field communication.

示例性地,如图14中(c)所示的家庭详情页1403,第一电子设备检测到用户对添加成员控件145的操作,确定用户指示在A的家中添加家庭成员。Exemplarily, as shown in the family details page 1403 in (c) of FIG. 14 , 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.

S1702、响应于预设操作,第一电子设备获取第二电子设备生成的标识码。S1702: In response to a preset operation, the first electronic device obtains an identification code generated by the second electronic device.

S1703、第一电子设备和第二电子设备基于标识码协商通信密钥,建立安全通信连接。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.

S1704、第一电子设备通过安全通信连接,获取第二电子设备登录的账号。S1704: The first electronic device obtains the account number used to log in to the second electronic device through a secure communication connection.

在一些实施例中,第一电子设备在显示家庭详情页(如家庭详情页1403)的过程中,检测到预设操作(如碰一碰操作),可确定检测到用户指示添加家庭成员的操作。即,在第一电子设备显示家庭详情页的过程中,用户可直接通过碰一碰操作,触发第一电子设备添加家庭成员,而不必再对添加成员控件进行操作,从而简化用户操作。In some embodiments, when the first electronic device is displaying a family details page (such as family details page 1403), a preset operation (such as a tap operation) is detected, and it can be determined that an operation of the user indicating to add a family member is detected. That is, when 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 a tap operation without having to operate the add member control, thereby simplifying the user operation.

可选地,步骤S1702-步骤S1704的其他内容,可参考上述步骤S1002-步骤S1004的相关内容,在此不再赘述。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.

S1705、第一电子设备向服务器发送第一应用当前正在显示home的家庭标识和第二电子设备 登录的账号。S1705: The first electronic device sends a home identifier and a second electronic device that the first application currently displays home to the server. The account you are logged in with.

在一些实施例中,第一电子设备在运行第一应用的过程中,检测到用户指示添加家庭成员的操作。因此,第一电子设备可确定当前第一应用显示的为第一应用账号下管理的哪一home,进而可获取到该home的家庭标识。那么,第一电子设备在获取到第二电子设备登录的账号后,可向服务器发送该家庭标识和该账号,以请求获取实现将该账号添加到该家庭标识对应的home的分享码。In some embodiments, the first electronic device detects a user's instruction to add a family member during the process of running the first application. Therefore, the first electronic device can determine which home managed by the first application account is currently displayed by the first application, and then obtain the family identification of the home. Then, after obtaining the account logged in by the second electronic device, the first electronic device can send the family identification and the account to the server to request a sharing code for adding the account to the home corresponding to the family identification.

比如,第一电子设备向服务器发送第一应用当前正在显示home的家庭标识(homeId)和第二电子设备的member UserId。For example, the first electronic device sends to the server the home identifier (homeId) of the first application currently displaying home and the member UserId of the second electronic device.

一些示例中,第一电子设备登录的账号下只管理一个home。那么,第一电子设备在获取到第二电子设备登录的账号后,可直接向服务器发送该账号,以获取分享码。即,第一电子设备不必再向服务器发送该家庭标识,服务器后续也可基于第一电子设备登录的账号,确定唯一的home,生成对应的分享码。In some examples, only one home is managed under the account logged in by the first electronic device. Then, after obtaining the account logged in by the second electronic device, the first electronic device can directly send the account to the server to obtain the sharing code. That is, the first electronic device does not need to send the home identifier to the server again. The server can also determine the unique home based on the account logged in by the first electronic device and generate the corresponding sharing code.

S1706、服务器根据家庭标识和第二电子设备登录的账号,生成分享码。S1706. The server generates a sharing code according to the family identification and the account used to log in to the second electronic device.

在一些实施例中,服务器在接收到第一电子设备发送的homeId和member UserId后,确定homeId对应的home为第一电子设备登录的账号下管理的home。之后,服务器可生成相应的分享码(shareCode)。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. Afterwards, the server may generate a corresponding sharing code (shareCode).

一些示例中,服务器生成的分享码配置有失效条件,失效条件例如包括使用次数要求、使用时间要求等。比如,为保证设备权限分享的安全性,该分享码的使用次数最多为一次。可选地,服务器还可为该分享码设置有效使用期限,如5分钟内有效等。In some examples, the sharing code generated by the server is configured with an expiration condition, which includes, for example, a usage count requirement, a usage time requirement, etc. 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 a valid usage period for the sharing code, such as valid for 5 minutes.

S1707、服务器向第一电子设备发送分享码。S1707: The server sends a sharing code to the first electronic device.

S1708、第一电子设备向第二电子设备发送分享码。S1708: The first electronic device sends a sharing code to the second electronic device.

S1709、第二电子设备向服务器发送家庭分享请求,该家庭分享请求中携带有分享码。S1709: The second electronic device sends a family sharing request to the server, where the family sharing request carries a sharing code.

在一些实施例中,第二电子设备向服务器发送的家庭分享请求中携带有分享码,该分享码用于分享homeId对应的home中的第三电子设备的控制权限,实现加入到homeId对应的home中,从而实现对第一电子设备的home的分享。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 joining the home corresponding to the homeId and sharing the home of the first electronic device.

可选地,步骤S1707-步骤S1709的其他内容,可参考上述步骤S1007-步骤S1009的相关内容,在此不再赘述。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.

S1710、服务器根据第二电子设备登录的账号和分享码,建立第二电子设备和分享码指示的home的分享关系。S1710. The server establishes a sharing relationship between the second electronic device and the home indicated by the sharing code according to the account number and the sharing code used to log in to the second electronic device.

在一些实施例中,服务器在接收到家庭分享请求后,对该分享码进行解析和鉴权。比如,服务器确定该分享码是否正确,如通过该分享码是否为服务器生成且满足失效条件要求,确定该分享码是否正确。若分享码正确,服务器进一步对该分享码进行解析和鉴权。若分享码错误,服务器向第二电子设备发送家庭分享失败响应。In some embodiments, after receiving the 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 generated by the server and meets the expiration condition requirements. If the sharing code is correct, the server further parses and authenticates the sharing code. If the sharing code is wrong, the server sends a family sharing failure response to the second electronic device.

之后,在分享码正确的情况下,服务器获取该分享码指示的家庭标识和第一应用账号。之后,服务器确定发送家庭分享请求的第二电子设备登录的账号是否与为该分享码指示的第一应用账号相同。若是,服务器可确定第二电子设备满足分享条件,可将该家庭标识对应的家庭分享给第二电子设备。若否,服务器可确定第二电子设备不满足分享条件,可向第二电子设备发送家庭分享失败响应。Afterwards, if the sharing code is correct, the server obtains the family identification and the first application account indicated by the sharing code. Afterwards, the server determines whether the account logged in by the second electronic device that sends the family sharing request is the same as the first application account indicated by the sharing code. If so, the server can determine that the second electronic device meets the sharing conditions and can share the family corresponding to the family identification with the second electronic device. If not, the server can determine that the second electronic device does not meet the sharing conditions and can send a family sharing failure response to the second electronic device.

在一些实施例中,服务器通过第一应用的账号管理该账号下的一个或多个家庭。那么,服务器在确定将第一电子设备的家庭分享给第二电子设备后,可获取第一电子设备登录的账号下管理的该家庭的信息,如包括家庭标识、家庭下记录的至少一个第三电子设备的设备信息等。之后,服务器在第二电子设备登录的第一应用账号下创建新的家庭,并将该新创建的家庭的信息设置为分享成功的第一电子设备的家庭的信息,从而实现建立第二电子设备和家庭标识对应的home的分享关系。In some embodiments, the server manages one or more households under the account of the first application through the account of the first application. Then, after determining to share the household of the first electronic device with the second electronic device, the server can obtain the information of the household managed under the account logged in by the first electronic device, such as the household identification, the device information of at least one third electronic device recorded under the household, etc. Afterwards, the server creates a new household under the first application account logged in by the second electronic device, and sets the information of the newly created household to the information of the household of the first electronic device that has been successfully shared, thereby establishing a sharing relationship between the second electronic device and the home corresponding to the household identification.

在一些实施例中,服务器建立第二电子设备和家庭标识对应的home的分享关系后,可向第二电子设备发送家庭分享成功响应。可选地,分享成功响应中携带有该home的信息,如包括家庭标识、home下记录的至少一个第三电子设备的设备信息等。这样,第二电子设备在接收到家庭分 享成功响应后,可获取到管理该home的权限,如根据家庭分享成功响应中携带的设备信息,与home中的设备建立通信连接。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. After a successful response to home sharing, you can obtain the authority to manage the home, such as establishing a communication connection with the devices in the home based on the device information carried in the successful response to home sharing.

一些示例中,第二电子设备对于分享的home的控制权限小于或等于第一电子设备对于分享的home的控制权限。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.

如此,在home分享过程中,用户只需要简单的碰一碰操作,即可触发第一电子设备和第二电子设备自动完成家庭群组的分享,用户操作简单,有效降低用户操作难度。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 the difficulty of user operation is effectively reduced.

并且,第一电子设备和第二电子设备基于近场通信完成home分享,提高home分享的实时性和交互性,从而提升用户的使用体验。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.

上文以第一电子设备主动与第二电子设备进行碰一碰操作,发起权限分享过程为例,对权限分享过程进行介绍。在一些示例中,第二电子设备也可主动发起权限分享过程,下文对第二电子设备主动发起权限分享的过程进行详细介绍。The above article introduces the permission sharing process by taking the example of the first electronic device actively performing a touch operation with the second electronic device to initiate the permission sharing process. In some examples, the second electronic device may also actively initiate the permission sharing process, and the following article introduces the process of the second electronic device actively initiating permission sharing in detail.

一些示例中,第一电子设备用户终端或空间中的中控设备。一些场景中,在第一电子设备为中控设备的情况下,第二电子设备响应于与第一电子设备的靠近或碰一碰,可获取到该中控设备管理的home中的智能设备的控制权限。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 rights for smart devices in the home managed by the central control device in response to approaching or touching the first electronic device.

图18为本申请实施例所提供的又一种权限分享方法的流程示意图。需要说明的是,该方法并不以图18以及以下所述的具体顺序为限制,应当理解,在其它实施例中,该方法其中部分步骤的顺序可以根据实际需要相互交换,或者其中的部分步骤也可以省略或删除。该方法包括如下步骤:FIG18 is a flowchart of another permission sharing method provided in an embodiment of the present application. It should be noted that the method is not limited to FIG18 and the specific sequence 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:

S1801、第二电子设备在显示第一应用的过程中,响应于预设操作,获取第一电子设备预置的标识码。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.

在一些实施例中,第一电子设备中预置有标识码,将该标识码写入到NFC标签中,并将NFC模式标记为标签(tag)模式。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.

一些示例中第一电子设备在启动后,开始运行智慧生活应用,以触发标记NFC模式为tag模式。In some examples, after the first electronic device is started, it starts running the smart life application to trigger the NFC mode to be marked as tag mode.

一些示例中,第一电子设备为用于管理至少一个第三电子设备的专用设备。如第一电子设备为智能家居设备控制面板、智能家居设备中控屏等。第一电子设备为固定设备,固定设置于家中的某一位置,这样其他用户携带第二电子设备进入家中后,可通过碰一碰等操作,请求加入第一电子设备管理的群组(home)。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, which is fixedly set at a certain location in the home, so that other users can bring the second electronic device into the home and request to join the group (home) managed by the first electronic device by touching it.

一些示例中,第一电子设备用于管理当前自身所在的home中的至少一个第三电子设备。比如,第一电子设备登录的第一应用账号下存在多个home,但是第一电子设备(如智能家居设备控制面板)在登录该第一应用账号后,会根据定位,显示与当前位置匹配的home界面,从而实现管理当前自身所在的home中的第三电子设备。或者,第一电子设备在登录该第一应用账号的过程中,服务器确定该第一电子设备所在的home,从而使得该第一电子设备在登录第一应用账后,只可显示该home的设备管理界面,管理该home中的设备。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.

S1802、第一电子设备和第二电子设备基于标识码协商通信密钥,建立安全通信连接。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.

S1803、第二电子设备通过安全通信连接,获取第一电子设备登录的账号和家庭标识。S1803. The second electronic device obtains the account number and family identification of the first electronic device through a secure communication connection.

一些示例中,在第一电子设备登录的账号下的home数量为一个的情况下,第一电子设备也可不必向第二电子设备反馈家庭标识。后续,服务器可根据第一电子设备登录的账号,确定唯一的home。In some examples, when the number of homes under the account logged in by the first electronic device is 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.

一些示例中,第二电子设备获取到的第一电子设备的第二账号可以为智慧生活应用账号,也可以为第一电子设备登录的设备级的账号,如华为账号。In some examples, the second account of the first electronic device acquired by the second electronic device may be a smart life application account, or may be a device-level account logged in by the first electronic device, such as a Huawei account.

可选地,步骤S1802-步骤S1803的其他内容,可参考上述步骤S1003-步骤S1004的相关内容,在此不再赘述。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.

S1804、第二电子设备向服务器发送群组加入请求,该群组加入请求携带有第一电子设备登录的账号和家庭标识。S1804: The second electronic device sends a group joining request to the server, where the group joining request carries the account number and family identification used to log in to the first electronic device.

在一些实施例中,第二电子设备在获取到第一电子设备登录的账号和家庭标识后,可向服务器发送群组加入请求,以请求加入第一应用的账号下家庭标识对应的home。相应的,服务器接收第二电子设备发送的群组加入请求。 In some embodiments, after obtaining the account and home ID of the first electronic device, the second electronic device can send a group joining request to the server to request to join the home corresponding to the home ID under the account of the first application. Correspondingly, the server receives the group joining request sent by the second electronic device.

S1805、服务器向权限管理设备发送权限获取请求。S1805. The server sends a permission acquisition request to the permission management device.

S1806、权限管理设备向服务器发送权限获取响应。S1806. The rights management device sends a rights acquisition response to the server.

在一些实施例中,服务器获取群组加入请求中携带的第一应用的账号,确定该账号对应的权限管理设备。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.

可选地,权限管理设备例如为已登录该账号且当前该账号为登录状态的至少一个设备。比如,用户在手机、平板等多个设备上均登录过该账号,当前手机中该账号处于登录状态,服务器可确定手机为权限管理设备。或者,手机和平板中该账号均处于登录状态,那么服务器可确定手机和平板均为权限管理设备。Optionally, the rights management device is, for example, at least one device that has logged into the account and is currently logged in. For example, if the user has logged into 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 can determine that the mobile phone is a rights management device. Alternatively, if the account is logged in on both the mobile phone and the tablet, the server can determine that both the mobile phone and the tablet are rights management devices.

可选地,权限管理设备例如为注册该第一应用的账号的设备。Optionally, the permission management device is, for example, a device for registering an account of the first application.

在一些实施例中,服务器在确定权限管理设备后,可向权限管理设备发送权限获取请求,以确定使用权限管理设备的用户是否授权第二电子设备加入到群组中。In some embodiments, after determining the authority management device, the server may send a permission acquisition request to the authority management device to determine whether the user using the authority management device authorizes the second electronic device to join the group.

可选地,权限获取请求中携带有家庭标识和第二电子设备登录的账号。这样,权限管理设备在接收到权限获取请求后,可根据家庭标识和第一应用的账号,显示相应的提示信息,以提示用户确认是否允许该第一应用的账号加入到家庭标识对应的home中。之后,权限管理设备根据用户操作,生成权限获取响应。Optionally, the permission acquisition request carries the family identifier and the account number logged in by the second electronic device. In this way, after receiving the permission acquisition request, the permission management device can display corresponding prompt information according to the family identifier and the account number of the first application to prompt the user to confirm whether to allow the account number of the first application to be added to the home corresponding to the family identifier. Afterwards, the permission management device generates a permission acquisition response according to the user operation.

在一些实施例中,在授权过程中,权限管理设备也可根据用户操作,确定用户指示授权的权限范围。如允许第二电子设备获取到home中全部设备的控制权限、或者允许第二电子设备获取到home中部分设备的控制权限、或者不允许第二电子设备获取到home中的设备的控制权限等。In some embodiments, during the authorization process, the rights management device may also determine the scope of the rights authorized by the user according to the user's operation, such as allowing the second electronic device to obtain the control rights of all devices in the home, or allowing the second electronic device to obtain the control rights of some devices in the home, or not allowing the second electronic device to obtain the control rights of the devices in the home.

S1808、服务器根据第二电子设备登录的账号,将第二电子设备登录的账号添加到家庭标识对应的群组中。S1808. The server adds the account logged in by the second electronic device to the group corresponding to the family identification according to the account logged in by the second electronic device.

在一些实施例中,服务器根据接收到的权限获取响应,确定第二电子设备是否获得授权。比如,权限获取响应指示第二电子设备未获得授权,服务器可向第二电子设备发送群组加入失败响应。又比如,权限获取响应指示第二电子设备获得授权,服务器可将第二电子设备登录的账号添加到家庭标识对应的群组中,从而建立第二电子设备和家庭标识对应的群组的分享关系,完成群组(home)的分享。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 the sharing of the group (home).

如此,在群组分享过程中,用户只需要简单的碰一碰操作,即可触发第二电子设备自动加入到第一电子设备管理的家庭群组中,用户操作简单,有效降低用户操作难度。In this way, during the group sharing process, the user only needs to perform a simple touch 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 the difficulty of user operation is effectively reduced.

并且,第一电子设备和第二电子设备基于近场通信完成群组分享,提高群组分享的实时性和交互性,从而提升用户的使用体验。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.

在一些实施例中,在群组分享完成后,第一电子设备和第二电子设备也可显示相应的分享动画。其中,分享动画显示过程和显示效果,可参考上述第一电子设备和第二电子设备进行home分享过程中的分享动画显示过程和显示效果,本申请实施例对此不再赘述。In some embodiments, after the group sharing is completed, the first electronic device and the second electronic device may also display corresponding sharing animations. The sharing animation display process and display effect can refer to the sharing animation display process and display effect of the first electronic device and the second electronic device in the process of home sharing, and the present application embodiment will not repeat them.

在一些实施例中,第一电子设备中也可预置有是否允许进行home分享的权限,这样服务器也可不必再向权限管理设备进行授权申请。如此,进一步简化交互流程,提升设备权限分享效率。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. In this way, the interaction process is further simplified and the efficiency of device permission sharing is improved.

可选地,图19为本申请实施例所提供的又一种权限分享方法的流程示意图。如图19所示,该方法包括如下步骤。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.

S1901、第一电子设备显示第一分享界面。S1901: The first electronic device displays a first sharing interface.

可选地,第一电子设备为用户终端或空间中的中控设备。Optionally, the first electronic device is a user terminal or a central control device in a space.

可选地,第一分享界面包括用于管理至少一个智能设备的设备管理界面,或者与第一目标智能设备所在空间关联的空间管理界面。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.

S1902、检测到用户对第一分享界面中的第一界面元素的操作。S1902: Detecting a user's operation on a first interface element in a first sharing interface.

可选地,第一界面元素包括与第一目标智能设备关联的显示元素。第一电子设备可将第一界面元素分享至第二电子设备。例如,第一界面元素为卡片。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.

S1903、响应于与第二电子设备的靠近或碰一碰,第一电子设备将第一界面元素对应的第一目标智能设备的控制权限分享至第二电子设备。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.

S1904、第二电子设备显示动效。S1904. The second electronic device displays an animation effect.

可选地,第一电子设备在第一分享界面上呈现动效,该动效用于提示用户将第一界面元素对 应的第一目标智能设备分享至第二电子设备。可选地,动效包括与第一目标智能设备关联的第一界面元素移出的动效,或者与第二电子设备的用户关联的显示元素移入的动效。Optionally, the first electronic device presents an animation on the first sharing interface, where the animation is used to prompt the user to Optionally, the motion effect includes a first interface element associated with the first target smart device moving out, or a display element associated with the user of the second electronic device moving in.

如此,第一电子设备和第二电子设备基于近场通信完成设备的控制权限的分享,提高权限分享的实时性和交互性,从而提升用户的使用体验。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.

并且,在设备分享过程中,用户只需要通过简单的碰一碰操作,即可触发第一电子设备和第二电子设备自动完成权限分享,用户操作简单,有效降低用户操作难度。Furthermore, 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.

可选地,步骤S1901-步骤S1904的其他内容,可参考上述第一电子设备或第二电子设备执行的相关内容,在此不再赘述。Optionally, other contents of step S1901 to step S1904 may refer to the relevant contents executed by the first electronic device or the second electronic device mentioned above, which will not be repeated here.

以上结合图6-图19详细说明了本申请实施例提供的权限分享方法。以下结合图20详细说明本申请实施例提供的第一电子设备,结合图21详细说明本申请实施例提供的第二电子设备。The above is a detailed description of the permission sharing method provided in the embodiment of the present application in combination with Figures 6 to 19. The following is a detailed description of the first electronic device provided in the embodiment of the present application in combination with Figure 20, and a detailed description of the second electronic device provided in the embodiment of the present application in combination with Figure 21.

在一种可能的设计中,图20为本申请实施例提供的第一电子设备的结构示意图。如图20所示,第一电子设备2000可以包括:收发单元2001、处理单元2002以及显示单元2003。第一电子设备2000可用于实现上述方法实施例中涉及的第一电子设备的功能。In a possible design, FIG20 is a schematic diagram of the structure of the first electronic device provided in an embodiment of the present application. As shown in FIG20, 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.

可选地,收发单元2001,用于支持第一电子设备2000执行图10中的S1002、S1003、S1004、S1005、S1007以及S1008;和/或,用于支持第一电子设备2000执行图13中的S1302;和/或,用于支持第一电子设备2000执行图17中的S1702、S1703、S1704、S1705、S1707以及S1708;和/或,用于支持第一电子设备2000执行图18中的S1801、S1802以及S1803;和/或,用于支持第一电子设备2000执行图19中的S1903。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.

可选地,处理单元2002,用于支持第一电子设备2000执行图10中的S1001;和/或,用于支持第一电子设备2000执行图17中的S1701;和/或,用于支持第一电子设备2000执行图19中的S1902。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.

可选地,显示单元2003,用于支持第一电子设备2000执行图13中的S1304;和/或,用于支持第一电子设备2000执行图19中的S1901。Optionally, the display unit 2003 is used to support the first electronic device 2000 to execute S1304 in Figure 13; and/or is used to support the first electronic device 2000 to execute S1901 in Figure 19.

其中,收发单元可以包括接收单元和发送单元,可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。第一电子设备2000中的各个单元的操作和/或功能分别为了实现上述方法实施例中所述的权限分享方法的相应流程,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能单元的功能描述,为了简洁,在此不再赘述。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 to implement 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, and for the sake of brevity, they will not be repeated here.

可选地,图20所示的第一电子设备2000还可以包括存储单元(图20中未示出),该存储单元中存储有程序或指令。当收发单元2001、处理单元2002以及显示单元2003执行该程序或指令时,使得图20所示的第一电子设备2000可以执行上述方法实施例中所述的权限分享方法。Optionally, the first electronic device 2000 shown in FIG20 may further include a storage unit (not shown in FIG20 ), 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 FIG20 may execute the authority sharing method described in the above method embodiment.

图20所示的第一电子设备2000的技术效果可以参考上述方法实施例中所述的权限分享方法的技术效果,此处不再赘述。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.

除了以第一电子设备2000的形式以外,本申请提供的技术方案也可以为第一电子设备中的功能单元或者芯片,或者与第一电子设备匹配使用的装置。In addition to being in the form of the first electronic device 2000, the technical solution provided in the present 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.

在一种可能的设计中,图21为本申请实施例提供的第二电子设备的结构示意图。如图21所示,第二电子设备2100可以包括:收发单元2101、处理单元2102以及显示单元2103。第二电子设备2100可用于实现上述方法实施例中涉及的第二电子设备的功能。In one possible design, FIG21 is a schematic diagram of the structure of a second electronic device provided in an embodiment of the present application. As shown in FIG21, 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 embodiment.

可选地,收发单元2101,用于支持第二电子设备2100执行图10中的S1002、S1003、S1004、S1008以及S1009;和/或,用于支持第二电子设备2100执行图13中的S1301;和/或,用于支持第二电子设备2100执行图17中的S1702、S1703、S1704、S1708以及S1709;和/或,用于支持第二电子设备2100执行图18中的S1801、S1802、S1803以及S1804;和/或,用于支持第二电子设备2100执行图19中的S1903。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.

可选地,处理单元2102,用于支持第二电子设备2100执行图19中的S1902。Optionally, the processing unit 2102 is used to support the second electronic device 2100 to execute S1902 in Figure 19.

可选地,显示单元2103,用于支持第二电子设备2100执行图13中的S1302;和/或,用于支持第二电子设备2100执行图19中的S1904。Optionally, the display unit 2103 is used to support the second electronic device 2100 to execute S1302 in Figure 13; and/or is used to support the second electronic device 2100 to execute S1904 in Figure 19.

其中,收发单元可以包括接收单元和发送单元,可以由收发器或收发器相关电路组件实现,可以为收发器或收发模块。第二电子设备2100中的各个单元的操作和/或功能分别为了实现上述 方法实施例中所述的权限分享方法的相应流程,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能单元的功能描述,为了简洁,在此不再赘述。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 to implement the above The corresponding process of the authority sharing method described in the 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, and will not be repeated here for the sake of brevity.

可选地,图21所示的第二电子设备2100还可以包括存储单元(图21中未示出),该存储单元中存储有程序或指令。当收发单元2101、处理单元2102以及显示单元2103执行该程序或指令时,使得图21所示的第二电子设备2100可以执行上述方法实施例中所述的权限分享方法。Optionally, the second electronic device 2100 shown in FIG21 may further include a storage unit (not shown in FIG21 ), 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 FIG21 may execute the authority sharing method described in the above method embodiment.

图21所示的第二电子设备2100的技术效果可以参考上述方法实施例中所述的权限分享方法的技术效果,此处不再赘述。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.

除了以第二电子设备2100的形式以外,本申请提供的技术方案也可以为第二电子设备中的功能单元或者芯片,或者与第二电子设备匹配使用的装置。In addition to being in the form of the second electronic device 2100, the technical solution provided in the present 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.

本申请实施例还提供一种芯片系统,包括:处理器,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。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.

可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。Optionally, the processor in the chip system may be one or more. The processor may be implemented by hardware or by software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor implemented by reading software code stored in a memory.

可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请实施例并不限定。示例性地,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请实施例对存储器的类型,以及存储器与处理器的设置方式不作具体限定。Optionally, the memory in the chip system may also be one or more. The memory may be integrated with the processor or may be separately arranged with the processor, which is not limited in the embodiments of the present application. Exemplarily, 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 may be arranged on different chips respectively. The embodiments of the present application do not specifically limit the type of memory and the arrangement of the memory and the processor.

示例性地,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。Exemplarily, the chip system can 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.

应理解,上述方法实施例中的各步骤可以通过处理器中的硬件的集成逻辑电路或者软件形式的指令完成。结合本申请实施例所公开的方法步骤可以直接体现为硬件处理器执行完成,或者用处理器中的硬件及软件模块组合执行完成。It should be understood that each step in the above method embodiment can be completed by an integrated logic circuit of hardware in a processor or by instructions in the form of software. 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.

本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当该计算机程序在计算机上上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的权限分享方法。An embodiment of the present application also provides a computer-readable storage medium, in which a computer program is stored. 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.

本申请实施例还提供一种计算机程序产品,当该计算机程序产品在计算机上运行时,使得计算机执行上述相关步骤,以实现上述实施例中的权限分享方法。The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is caused to execute the above-mentioned related steps to implement the permission sharing method in the above-mentioned embodiment.

另外,本申请实施例还提供一种装置。该装置具体可以是组件或模块,该装置可包括相连的一个或多个处理器和存储器。其中,存储器用于存储计算机程序。当该计算机程序被一个或多个处理器执行时,使得装置执行上述各方法实施例中的权限分享方法。In addition, an embodiment of the present application further provides a device. The device may be a component or a module, and the device 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 executes the permission sharing method in the above-mentioned method embodiments.

其中,本申请实施例提供的装置、计算机可读存储介质、计算机程序产品或芯片均用于执行上文所提供的对应的方法。因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。Among them, the device, computer-readable storage medium, computer program product or chip provided in the embodiments of the present application are used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

结合本申请实施例公开内容所描述的方法或者算法的步骤可以硬件的方式来实现,也可以是由处理器执行软件指令的方式来实现。软件指令可以由相应地软件模块组成,软件模块可以被存放于随机存取存储器(random access memory,RAM)、闪存、只读存储器(read only memory,ROM)、可擦除可编程只读存储器(erasable programmable ROM,EPROM)、电可擦可编程只读存储器(electrically EPROM,EEPROM)、寄存器、硬盘、移动硬盘、只读光盘(CD-ROM)或者本领域熟知的任何其它形式的存储介质中。一种示例性的存储介质耦合至处理器,从而使处理器能够从该存储介质读取信息,且可向该存储介质写入信息。当然,存储介质也可以是处理器的组成部分。处理器和存储介质可以位于专用集成电路(application specific integrated circuit,ASIC) 中。The steps of the method or algorithm described in conjunction with the disclosed content of the embodiments of the present application can be implemented in hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in random access memory (RAM), flash memory, read only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, read-only compact disks (CD-ROMs) or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC) middle.

通过以上的实施方式的描述,本领域技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明。实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成;即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Through the description of the above implementation methods, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed; that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

在本申请所提供的几个实施例中,应该理解到,所揭露的方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的。例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式;例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,模块或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in the present application, it should be understood that the disclosed method can be implemented in other ways. The device embodiments described above are merely schematic. 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.

另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

计算机可读存储介质包括但不限于以下的任意一种:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。Computer-readable storage media include, but are not limited to, any of the following: USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks or optical disks, and other media that can store program codes.

以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。 The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims (22)

一种权限分享方法,其特征在于,应用于第一电子设备,所述方法包括:A permission sharing method, characterized in that it is applied to a first electronic device, and 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. 根据权利要求1所述的方法,其特征在于,所述方法还包括: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. 根据权利要求1或2所述的方法,其特征在于,所述响应于与第二电子设备的靠近或碰一碰,将所述第一界面元素对应的第一目标智能设备的控制权限分享至所述第二电子设备,包括:The method according to claim 1 or 2, characterized in that, in response to approaching or touching the second electronic device, sharing the control authority of the first target smart device corresponding to the first interface element to the second electronic device comprises: 在显示第一分享界面的过程中,响应于与第二电子设备的靠近或碰一碰,与所述第二电子设备建立通信连接;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. 根据权利要求1或2所述的方法,其特征在于,所述响应于与第二电子设备的靠近或碰一碰,将所述第一界面元素对应的第一目标智能设备的控制权限分享至所述第二电子设备,包括:The method according to claim 1 or 2, characterized in that, in response to approaching or touching the second electronic device, sharing the control authority of the first target smart device corresponding to the first interface element to the second electronic device comprises: 在显示第一分享界面的过程中,响应于与第二电子设备的靠近或碰一碰,与所述第二电子设备建立通信连接;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. 根据权利要求1-4任意一项所述的方法,其特征在于,所述第一界面元素包括与所述第一目标智能设备关联的显示元素,所述方法还包括:The method according to any one of claims 1 to 4, wherein the first interface element comprises a display element associated with the first target smart device, and the method further comprises: 将所述第一界面元素分享至所述第二电子设备。The first interface element is shared to the second electronic device. 根据权利要求5所述的方法,其特征在于,所述第一界面元素为卡片。The method according to claim 5 is characterized in that the first interface element is a card. 根据权利要求1-6任意一项所述的方法,其特征在于,所述第一界面元素包括与添加用户关联的显示元素,所述添加用户用于控制所述第一目标智能设备;所述响应于与第二电子设备的靠近或碰一碰,所述方法还包括: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. 根据权利要求2所述的方法,其特征在于,所述动效包括与所述第一目标智能设备关联的所述第一界面元素移出的动效,或者与所述第二电子设备的用户关联的显示元素移入的动效。The method according to claim 2 is 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. 根据权利要求1-8任意一项所述的方法,其特征在于,所述响应于与第二电子设备的靠近或碰一碰,将所述第一界面元素对应的第一目标智能设备的控制权限分享至所述第二电子设备,还包括:The method according to any one of claims 1 to 8, wherein in response to approaching or touching a second electronic device, sharing the control authority of a first target smart device corresponding to the first interface element with the second electronic device, further comprises: 响应于与所述第二电子设备的靠近或碰一碰,将所述第一界面元素对应的第二目标智能设备的控制权限分享至所述第二电子设备,所述第一目标智能设备和所述第二目标智能设备属于同一空间或同一场景。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. 根据权利要求1-9任意一项所述的方法,其特征在于,所述靠近或碰一碰基于近距离无线通信NFC技术、低功耗BLE蓝牙技术、近距离局域网NAN通信技术中的一项或几项。The method according to any one of claims 1 to 9 is characterized in that the approach or touch is based on one or more of the following technologies: NFC technology, BLE technology, and NAN technology. 根据权利要求1-10任意一项所述的方法,其特征在于,所述控制权限为所述第一电子设备的用户指定的权限范围。The method according to any one of claims 1-10 is characterized in that the control authority is a permission range specified by a user of the first electronic device. 根据权利要求1-11任意一项所述的方法,其特征在于,所述第一分享界面包括用于管理至少一个智能设备的设备管理界面,或者与所述第一目标智能设备所在空间关联的空间管理界面。The method according to any one of claims 1-11 is 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. 根据权利要求1-12任意一项所述的方法,其特征在于,所述第一电子设备为用户终端或空间中的中控设备。The method according to any one of claims 1-12 is characterized in that the first electronic device is a user terminal or a central control device in a space. 一种权限分享方法,其特征在于,应用于第二电子设备,所述方法包括: A permission sharing method, characterized in that it is applied to a second electronic device, and the method comprises: 响应于与第一电子设备的靠近或碰一碰,接收所述第一电子设备分享的第一目标智能设备的控制权限,其中,所述第一目标智能设备对应于所述第一电子设备在第一分享界面上显示的第一界面元素;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. 根据权利要求14所述的方法,其特征在于,所述动效包括与所述第一目标智能设备关联的所述第一界面元素移入的动效,所述第一界面元素在所述第一分享界面上移出;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. 根据权利要求14或15所述的方法,其特征在于,所述方法还包括: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. 根据权利要求16所述的方法,其特征在于,所述第一界面元素为卡片。The method according to claim 16 is characterized in that the first interface element is a card. 根据权利要求14-17任意一项所述的方法,其特征在于,所述响应于与第一电子设备的靠近或碰一碰,接收所述第一电子设备分享的第一目标智能设备的控制权限,包括:The method according to any one of claims 14 to 17, wherein the receiving, in response to approaching or touching the first electronic device, the control authority of the first target smart device shared by 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. 根据权利要求14-17任意一项所述的方法,其特征在于,所述响应于与第一电子设备的靠近或碰一碰,接收所述第一电子设备分享的第一目标智能设备的控制权限,包括:The method according to any one of claims 14 to 17, wherein 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. 一种电子设备,其特征在于,包括:处理器、存储器和显示屏,所述存储器和所述显示屏与所述处理器耦合,所述存储器用于存储计算机程序代码,所述计算机程序代码包括计算机指令,当所述处理器从所述存储器中读取所述计算机指令,使得所述电子设备执行如权利要求1-13中任意一项所述的方法;或者,使得所述电子设备执行如权利要求14-19中任意一项所述的方法。An electronic device, characterized in that it 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 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. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求1-13中任意一项所述的方法;或者,使得所述电子设备执行如权利要求14-19中任意一项所述的方法。A computer-readable storage medium, characterized in that the computer-readable storage medium includes a computer program, and when the computer program is run on an electronic device, 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. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-13中任意一项所述的方法;或者,使得所述计算机执行如权利要求14-19中任意一项所述的方法。 A computer program product, characterized in that when the computer program product is run on a computer, the computer is caused to execute the method as described in any one of claims 1 to 13; or, the computer is caused to execute the method as described in any one of claims 14 to 19.
PCT/CN2024/116102 2023-11-27 2024-08-30 Permission sharing method and electronic device Pending WO2025112740A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311604660.6A CN120050127A (en) 2023-11-27 2023-11-27 Authority sharing method and electronic equipment
CN202311604660.6 2023-11-27

Publications (1)

Publication Number Publication Date
WO2025112740A1 true WO2025112740A1 (en) 2025-06-05

Family

ID=95760474

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/116102 Pending WO2025112740A1 (en) 2023-11-27 2024-08-30 Permission sharing method and electronic device

Country Status (2)

Country Link
CN (1) CN120050127A (en)
WO (1) WO2025112740A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110198257A (en) * 2019-05-27 2019-09-03 苏宁智能终端有限公司 A kind of method, device and equipment that smart machine is shared
CN112260907A (en) * 2020-07-01 2021-01-22 华为技术有限公司 Cross-device control method, device and system
CN113272745A (en) * 2019-01-31 2021-08-17 华为技术有限公司 Smart home equipment sharing system and method and electronic equipment
CN113452945A (en) * 2020-03-27 2021-09-28 华为技术有限公司 Method and device for sharing application interface, electronic equipment and readable storage medium
CN115730343A (en) * 2021-08-31 2023-03-03 荣耀终端有限公司 Method and device for sharing equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113272745A (en) * 2019-01-31 2021-08-17 华为技术有限公司 Smart home equipment sharing system and method and electronic equipment
CN110198257A (en) * 2019-05-27 2019-09-03 苏宁智能终端有限公司 A kind of method, device and equipment that smart machine is shared
CN113452945A (en) * 2020-03-27 2021-09-28 华为技术有限公司 Method and device for sharing application interface, electronic equipment and readable storage medium
CN112260907A (en) * 2020-07-01 2021-01-22 华为技术有限公司 Cross-device control method, device and system
CN115730343A (en) * 2021-08-31 2023-03-03 荣耀终端有限公司 Method and device for sharing equipment

Also Published As

Publication number Publication date
CN120050127A (en) 2025-05-27

Similar Documents

Publication Publication Date Title
US12335217B2 (en) Notification processing system, method, and electronic device
JP7324311B2 (en) Audio and video playback method, terminal, and audio and video playback device
WO2020192714A1 (en) Device control page display method, related apparatus and system
US10028080B2 (en) Method and apparatus for establishing communication between an image photographing apparatus and a user device
EP4224830B1 (en) Data sharing method, apparatus and system, and electronic device
WO2022068670A1 (en) Method for touching to establish wireless connection between devices, electronic device, and chip
CN114741008B (en) Distributed cross-device cooperation method, electronic device and communication system
WO2020224447A1 (en) Method and system for adding smart home device to contacts
WO2020042119A1 (en) Message transmission method and device
CN114173193A (en) Method and electronic device for playing multimedia stream
CN114980048B (en) NFC communication method, electronic device and system
CN112995731B (en) Method and system for switching multimedia devices
US20240354044A1 (en) Screen sharing method, related electronic device, and system
CN117425227A (en) Method and device for establishing session based on WiFi direct connection
CN114845297B (en) Application program access method, electronic device and storage medium
CN113178906A (en) Charging method, charging device, electronic device and storage medium
WO2025112740A1 (en) Permission sharing method and electronic device
WO2024001812A1 (en) Message management method, electronic device and system
US20240316466A1 (en) Service access method, terminal, and system
WO2024198667A9 (en) Configuration method and electronic device
CN116055233A (en) A method, terminal, and system for network distribution of Internet of Things devices
CN119155679B (en) A device-to-device communication method, system, and storage medium
CN115734169B (en) Communication system and communication method
EP4472144A1 (en) Device login method, electronic device and system
US20250219822A1 (en) Device control method and apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24895841

Country of ref document: EP

Kind code of ref document: A1