A method and apparatus for sharing a device

By assigning different permissions to target users, the security risks in sharing smart home devices are resolved, achieving higher security and privacy protection.

CN115730343BActive Publication Date: 2026-06-09HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2021-08-31
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing smart home device sharing technologies pose security risks, especially for devices with high security requirements, such as door locks, where accidental operation could compromise home safety.

Method used

By assigning different usage permissions to target users, allowing them to use different functions of smart home devices, such as basic functions, advanced functions, and super functions, fine-grained control over user permissions can be achieved.

Benefits of technology

It improves the security and privacy protection of device sharing, and avoids security risks caused by misoperation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115730343B_ABST
    Figure CN115730343B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of method and device of sharing equipment, it is related to terminal field, can specify the authority of shared user, to reduce the security risk caused by shared user misoperation.Its method is: first electronic device (mobile phone A) displays first interface, and first interface includes N equipment to be shared;First electronic device receives the operation that user selects target equipment and target user, and displays second interface, and second interface includes multiple options.Different options in multiple options correspond to different use permissions, and different use permissions allow the function attribute that target user uses to be different.First electronic device receives the operation that user selects target option from multiple options, and determines the operation of sharing target equipment with the use permission corresponding to target option to target user;Second electronic device displays third interface, and third interface includes the first control corresponding to the function attribute of the target device that allows target user to use, and first control is in operable state.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of terminals, and more particularly to a method and apparatus for sharing devices. Background Technology

[0002] With the development of technology, smart homes have become an integral part of people's lives. Users can use smart home applications (APPs) to control smart home devices (e.g., turn them on and off, set timers, operate them remotely, etc.), which can greatly improve the user experience.

[0003] Currently, smart home apps also support sharing smart home devices among family members. For example, user A can share device 1 with user B, allowing user B to control all functions of device 1.

[0004] However, for some devices with high security requirements, incorrect operation by user B could significantly impact home security. For example, a misoperation of the remote unlocking function of a door lock could pose a serious threat to family property and personal safety. Summary of the Invention

[0005] This application provides a method and apparatus for sharing devices, which can specify the permissions of the shared user, thereby reducing security risks caused by the shared user's misoperation.

[0006] In a first aspect, embodiments of this application provide a method for sharing a device, the method comprising: a first electronic device displaying a first interface, the first interface including a first control and N devices to be shared, where N is an integer greater than or equal to 1, the first control being used to indicate that the first interface is an interface for sharing devices; the first electronic device receiving an operation from a user selecting a target device from one or more devices to be shared; the first electronic device receiving an operation from a user selecting a target user; the first electronic device displaying a second interface, the second interface including multiple options, different options corresponding to different usage permissions, different usage permissions allowing the target user to use different functional attributes; the first electronic device receiving an operation from a user selecting a target option from the multiple options; the first electronic device receiving an operation from a user confirming to share the target device with the target user using the usage permission corresponding to the target option; and a second electronic device displaying a third interface, the third interface including a first control corresponding to the functional attributes of the target device allowed to be used by the target user, the first control being in an operable state.

[0007] Based on the method provided in this application, when sharing a target device with a target user, usage permissions can be specified for that user. Different usage permissions allow the target user to use different functional attributes. That is, users with different usage permissions can use different functions of the smart home device (smart lock). This makes the sharing of the device (smart home device) more secure and provides better privacy protection.

[0008] In one possible implementation, the first electronic device receiving the operation of selecting a target user includes: the first electronic device displaying a fourth interface, the fourth interface including one or more protocols for sharing the target device; the first electronic device receiving the operation of the user selecting a first protocol from the one or more protocols for sharing the target device, and receiving the operation of the user selecting a target user through the first protocol; or the first electronic device displaying a fifth interface, the fifth interface including one or more protocols for sharing the target device, and options for directly sharing the target device with one or more users; the first electronic device receiving the operation of the user selecting a target user from the options for directly sharing the target device with one or more users. That is, the target user can be selected based on a protocol for sharing the target device, or the target user can be selected directly, making it more flexible and convenient.

[0009] In one possible implementation, after the first electronic device receives the user's confirmation to share the target device with the target user according to the usage permissions corresponding to the target option, the method further includes: the first electronic device sending a request to share the device to a cloud server, the request carrying the target user's identifier and usage permissions; the cloud server receiving the request and matching the target user's usage permissions with the target device's functional attribute tags to obtain a first matching result, wherein the functional attribute tags are used to describe the type of functional attributes of the target device, and the matching result is used to indicate the functional attributes that the target user is allowed to use and the functional attributes that the target user is not allowed to use; the cloud server generating a first plugin based on the first matching result, the first plugin including the functional attributes that the target user is allowed to use; the cloud server sending the first plugin to a second electronic device; and the second electronic device receiving and installing the first plugin.

[0010] In this way, by matching the target user's access permissions with the functional attribute tags of the target device (e.g., a smart lock), and then obtaining the first plugin based on the matching result, the target user can use the functional attributes that are permitted to them, but cannot use functional attributes that are not permitted to them. This makes device sharing more secure and provides better privacy protection.

[0011] In one possible implementation, the type of functional attributes is categorized based on operational complexity; from highest to lowest complexity, these can include basic functionalities, advanced functionalities, and super functionalities. For example, ...Figure 14 As shown, features such as real-time viewing, near-field door opening, and battery level monitoring correspond to basic features. Features like remote door opening and fingerprint registration correspond to advanced features. Features such as password management, adding devices, and viewing historical camera video correspond to super features. Alternatively, features can be categorized based on security requirements; from highest to lowest security level, they can include non-security features, security features, and privacy features. The user being shared can directly use non-security features, use security features after entering a password, but cannot use privacy features. Privacy features can be restricted to the user who created the family. Alternatively, features can be categorized based on their function. For example, smart locks can be divided into control and management functions. The user being shared can be allowed to use control functions, management functions, or both. In short, features can be categorized from different dimensions to meet diverse user needs.

[0012] In one possible implementation, the functional attribute includes at least one field selected from attribute identifier ID, data type, and access method. The access method includes at least one of read, write, listen, or empty. The description of the functional attribute may also include other fields, such as a description field and a value range field, which are not limited in this application.

[0013] In one possible implementation, the method further includes: establishing a communication connection and binding between the first electronic device and the target device. After the first electronic device and the target device establish a binding relationship (successful pairing), the first electronic device can control all functions of the target device. Furthermore, the first electronic device can share some or all of the target device's functions with the second electronic device.

[0014] In one possible implementation, the method further includes: in response to a user opening the control interface of the target device, a first electronic device displays the control interface of the target device. The control interface displayed by the first electronic device includes second controls corresponding to all functional attributes of the target device, and the second controls are in an operable state. That is, the first electronic device can control all functions of the target device.

[0015] In one possible implementation, the target user's access permissions are set by default on the first electronic device. That is, the target user's access permissions can also be set by default, requiring no manual operation from the user.

[0016] In one possible implementation, multiple options correspond to first, second, and third permissions, respectively. The first permission indicates permission to directly use the target device's first functional attribute; the second permission indicates permission to directly use the target device's second functional attribute; and the third permission indicates permission to directly use the target device's third functional attribute. The first, second, and third functional attributes are not entirely identical. The first functional attribute can be a basic functional attribute of the target device, the second functional attribute can be a high-level functional attribute, and the third functional attribute can be a super-functional attribute.

[0017] In one possible implementation, if the target device is a door lock, the first functional attribute includes at least one of real-time status viewing, near-field door opening, and battery level viewing; the second functional attribute includes the first functional attribute plus at least one of remote door opening and biometric information entry; the third functional attribute includes the second functional attribute plus at least one of management password and viewing historical video from the camera. For example, a basic user (e.g., grandmother) can use basic functions such as real-time viewing, near-field door opening, and battery level viewing; an advanced user (e.g., mother) can use not only these basic functions but also advanced functions such as remote door opening and fingerprint entry; a super user (e.g., father) can use these basic functions, advanced functions such as remote door opening and fingerprint entry, and super functions such as management password and adding devices. This enhances the security and privacy protection of sharing smart home devices.

[0018] In one possible implementation, the target user has a fourth permission. This fourth permission indicates that the user is allowed to directly use the fourth functional attribute of the target device, and to use the fifth functional attribute of the target device after entering a preset password. The fourth and fifth functional attributes are different. The fourth functional attribute can refer to a non-security function of the target device, which the target user can use directly. The fifth functional attribute can refer to a security function of the target device, which the target user can use by entering a password.

[0019] In one possible implementation, the method further includes: the cloud server receiving a device model of the target device from the target device or the first electronic device, the device model including multiple functional attributes of the target device, each of the multiple functional attributes corresponding to a functional attribute label.

[0020] In one possible implementation, the first plugin includes all functional attributes of the target device. Among these, the functional attributes accessible to the target user are readable and writable, while those not accessible to the target user are non-readable and writable. Alternatively, the first plugin only includes the functional attributes accessible to the target user, and these accessible attributes are readable and writable. In this way, after the second electronic device installs the first plugin, it can only operate on the functional attributes of the target device that are accessible to the target user, thus enhancing the security and privacy protection of device sharing.

[0021] In one possible implementation, the second electronic device displaying the third interface includes: the second electronic device displaying a first control, which is in an operable state; or the second electronic device displaying second controls corresponding to all functional attributes of the target device, the second controls including the first controls and third controls corresponding to functional attributes that are not allowed to be used by the target user, the first controls being in an operable state and the third controls being grayed out. For example, such as... Figure 10 As shown in (a), a second electronic device (e.g., mobile phone B or mobile phone C) can display the functional interface 360 ​​(third interface) of the target device (e.g., a smart lock). Interface 360 ​​includes a smart lock icon 361, a smart lock status (e.g., locked) 362, and a function control area 363. The function control area 363 may include a near-field unlock button, a remote lock button, and a real-time viewing button (i.e., a first control, which may include one or more controls), thus presenting a smart lock functional interface different from that of mobile phone A. Alternatively, as... Figure 10 As shown in (b), mobile phone B or mobile phone C can display the smart lock's functional interface 370. Interface 370 includes a smart lock icon 371, the smart lock's status (e.g., locked) 372, and a functional control area 373. The functional control area 373 may include a near-field unlock button, a remote lock button, a real-time view button, a fingerprint enrollment button, and a password management button (i.e., a second control, which includes a first control and a third control). The near-field unlock button, remote lock button, and real-time view button are available (belonging to the first control), while the remote unlock button, fingerprint enrollment button, and password management button are grayed out (belonging to the third control), i.e., unavailable.

[0022] Secondly, embodiments of this application provide a method for sharing a family home. The method includes: a first electronic device displaying a sixth interface, the sixth interface including a fourth control and N families to be shared, where N is an integer greater than or equal to 1, and the fourth control indicating that the sixth interface is an interface for sharing families; the first electronic device receiving an operation from a user selecting a target family from one or more families to be shared; the first electronic device receiving an operation from a user selecting a target user; the first electronic device displaying a seventh interface, the seventh interface including multiple options, different options corresponding to different usage permissions, and different usage permissions allowing the target user to use different functional attributes; the first electronic device receiving an operation from a user selecting a target option from the multiple options; the first electronic device receiving an operation from a user confirming to share the target family with the target user using the usage permissions corresponding to the target option; and a second electronic device displaying an eighth interface, the eighth interface being a control interface for a first device in the target family, the first device being any device in the target family, the eighth interface including a fourth control corresponding to the functional attributes of the first device allowed to be used by the target user, and the fourth control being in an operable state.

[0023] Based on the method provided in this application, when sharing a target home with a target user, usage permissions can be specified for that user. Different usage permissions allow the target user to use different functional attributes of the devices in the target home. That is, users with different usage permissions can use different functions of the devices in the target home (e.g., smart locks). This makes the sharing of devices (smart home devices) more secure and provides better privacy protection.

[0024] In one possible implementation, the first electronic device receiving the operation of selecting a target user includes: the first electronic device displaying a ninth interface, the ninth interface including one or more protocols for sharing a target household; the first electronic device receiving the operation of the user selecting a first protocol from one or more protocols for sharing a target household, and receiving the operation of the user selecting a target user through the first protocol; or the first electronic device displaying a tenth interface, the tenth interface including one or more protocols for sharing a target household, and an option for directly sharing the target household with one or more users; the first electronic device receiving the operation of the user selecting a target user from the option of directly sharing the target household with one or more users.

[0025] In one possible implementation, the method further includes: a first electronic device sending a shared family request to a cloud server, the request carrying the identifier and usage permissions of the target user; the cloud server receiving the shared family request and matching the target user's usage permissions with the functional attribute tags of all devices in the target family to obtain a second matching result, the functional attribute tags describing the type of functional attributes of the devices, and the second matching result indicating the functional attributes that the target user is allowed to use and the functional attributes that the target user is not allowed to use for each device in the entire set; the cloud server generating a second plugin based on the second matching result, the second plugin including the functional attributes that the target user is allowed to use for each device in the entire set; the cloud server sending the second plugin to a second electronic device; the second electronic device receiving and installing the second plugin; and the second electronic device displaying the control interface of the first device in the entire set, the control interface of the first device including a fourth control corresponding to the functional attributes that the target user is allowed to use for the first device, the fourth control being in an operable state.

[0026] In one possible implementation, the type of functional attribute is classified according to the complexity of the operation; or the type of functional attribute is classified according to the security requirements; or the type of functional attribute is classified according to the function of the functional attribute.

[0027] In one possible implementation, the functional attribute includes at least one field selected from attribute identifier ID, data type, and access method, where the access method includes at least one of read, write, listen, or empty.

[0028] In one possible implementation, multiple options correspond to a first permission, a second permission, and a third permission, respectively. The first permission indicates a first functional attribute that allows direct use of all devices in the target household, the second permission indicates a second functional attribute that allows direct use of all devices in the target household, and the third permission indicates a third functional attribute that allows direct use of all devices in the target household. The first, second, and third functional attributes are different.

[0029] In one possible implementation, if the target household includes a door lock device, the first functional attribute of the door lock device includes at least one of real-time status viewing, near-field door opening, and battery level viewing; the second functional attribute of the door lock device includes the first functional attribute of the door lock device as well as at least one of remote door opening and biometric information entry; the third functional attribute of the door lock device includes the second functional attribute of the door lock device as well as at least one of management password and viewing historical video from the camera.

[0030] In one possible implementation, the second plugin includes all functional attributes of all devices in the target household, wherein the functional attributes that the target user can use are readable and writable, and the functional attributes that the target user cannot use are not readable and writable; or the second plugin only includes the functional attributes that the target user can use from all functional attributes of all devices in the target household, wherein the functional attributes that the target user can use are readable and writable.

[0031] In one possible implementation, the second electronic device displays an eighth interface, which includes: the second electronic device displays a fourth control, which is in an operable state; or the second electronic device displays a fifth control corresponding to all the functional attributes of the first device, the fifth control including the fourth control and a sixth control corresponding to the functional attributes that are not allowed to be used by the target user, the fourth control being in an operable state and the sixth control being grayed out.

[0032] Thirdly, this application provides a chip system including one or more interface circuits and one or more processors. The interface circuits and processors are interconnected via lines.

[0033] The aforementioned chip system can be applied to a first electronic device, a second electronic device, or a cloud server, including a communication module and a memory. The interface circuit is used to receive signals from the memory of the first electronic device, the second electronic device, or the cloud server, and to send the received signals to the processor, the signals including computer instructions stored in the memory. When the processor executes the computer instructions, the first electronic device, the second electronic device, or the cloud server can perform the methods described in the first aspect or the second aspect, and any possible design embodiments thereof.

[0034] Fourthly, this application provides a computer-readable storage medium including computer instructions. When the computer instructions are executed on a first electronic device, a second electronic device, or a cloud server (such as a mobile phone), they cause the first electronic device, the second electronic device, or the cloud server to perform the methods described in the first aspect or the second aspect and any possible design thereof.

[0035] Fifthly, this application provides a computer program product that, when run on a computer, causes the computer to perform the method described in the first aspect or the second aspect and any possible design thereof.

[0036] Sixthly, this application provides an apparatus for sharing a device, including a processor coupled to a memory, the memory storing program instructions that, when executed by the processor, cause the apparatus to implement the method described in the first or second aspect and any possible design thereof. The apparatus may be a first electronic device, a second electronic device, or a cloud server; or it may be a component of a first electronic device, a second electronic device, or a cloud server, such as a chip.

[0037] In a seventh aspect, this application provides an apparatus for sharing a device, which can be divided into different logical units or modules according to function, each unit or module performing different functions, so that the apparatus performs the method described in the first aspect or the second aspect and any possible design method thereof.

[0038] Eighthly, this application provides a system for sharing devices, including a first electronic device, a second electronic device, and a cloud server, wherein the first electronic device, the second electronic device, or the cloud server respectively perform certain steps and cooperate with each other to implement the method described in the first aspect or the second aspect and any possible design of the above.

[0039] It is understood that the beneficial effects achieved by the chip system described in the third aspect, the computer-readable storage medium described in the fourth aspect, the computer program product described in the fifth aspect, the apparatus described in the sixth and seventh aspects, and the system described in the eighth aspect can be referred to the beneficial effects in the first or second aspect and any possible design embodiments thereof, which will not be repeated here. Attached Figure Description

[0040] Figure 1 A schematic diagram of a system architecture provided for an embodiment of this application;

[0041] Figure 2 A schematic diagram of a device provided in an embodiment of this application;

[0042] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0043] Figure 4 A schematic diagram provided for an embodiment of this application;

[0044] Figure 5 This is yet another display schematic diagram provided for an embodiment of this application;

[0045] Figure 6 This is yet another display schematic diagram provided for an embodiment of this application;

[0046] Figure 7This is yet another display schematic diagram provided for an embodiment of this application;

[0047] Figure 8 This is yet another display schematic diagram provided for an embodiment of this application;

[0048] Figure 9 This is yet another display schematic diagram provided for an embodiment of this application;

[0049] Figure 10 This is yet another display schematic diagram provided for an embodiment of this application;

[0050] Figure 11 This is yet another display schematic diagram provided for an embodiment of this application;

[0051] Figure 12 This is yet another display schematic diagram provided for an embodiment of this application;

[0052] Figure 13 A schematic diagram of signal interaction provided in an embodiment of this application;

[0053] Figure 14 A schematic diagram of a functional attribute and a functional attribute label provided in an embodiment of this application;

[0054] Figure 15 A schematic diagram illustrating a functional attribute, functional attribute label, and usage permissions provided in an embodiment of this application;

[0055] Figure 16 This is yet another schematic diagram of signal interaction provided in an embodiment of this application;

[0056] Figure 17 This is a schematic diagram of a chip system provided in an embodiment of this application. Detailed Implementation

[0057] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. In the description of this application, unless otherwise stated, "at least one" refers to one or more, and "more than one" refers to two or more. Furthermore, to facilitate a clear description of the technical solutions of the embodiments of this application, the terms "first," "second," etc., are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first," "second," etc., do not limit the quantity or execution order, and that "first," "second," etc., do not necessarily imply differences.

[0058] Currently, smart home apps support sharing smart devices among family members. For example, user A can share device 1 with user B, allowing user B to control all functions of device 1.

[0059] However, for some devices with high security requirements, incorrect operation by user B could have a significant impact on home security. For example, a malfunction in the door lock's unlocking function could pose a serious threat to family property and personal safety.

[0060] To address the aforementioned issues, this application proposes a method for sharing smart device functions. When users share smart home devices in their home, different function usage permissions can be authorized for different family members. For example, when user A shares device 1 with user B, if user B is a young person (father or mother), then all functions of device 1 are allowed; if user B is an elderly person (grandfather or grandmother) or a young person (child), then basic functions are allowed. This can better eliminate security risks.

[0061] like Figure 1 The diagram illustrates a system according to an embodiment of this application. The system may include home appliances, a cloud server, a first electronic device, and a second electronic device. The first electronic device, the second electronic device, and the home appliances can access a Wi-Fi network (e.g., a router), and the router can communicate with the cloud server via a wired network (e.g., Ethernet). Alternatively, the first and second electronic devices can also communicate with the cloud server via 2G / 3G / 4G / 5G networks. Both the first and second electronic devices have a smart home application (APP) installed. The first or second electronic device can control the home appliances through the cloud server corresponding to the smart home APP. The first and second electronic devices have different permissions to control the home appliances, thus the functions that the first electronic device can control differ from the functions that the second electronic device can control.

[0062] like Figure 2 As shown, the first electronic device may include a device sharing module 101, a device display module 102, a permission setting module 103, a device model 104, a device authentication module 105, and a discovery / connection module 106, etc.

[0063] Among them, the device sharing module 101 is used to share specific smart devices (e.g., smart door locks) in the home with other family members through a smart home APP (e.g., Honor Home) or to share the home (i.e., all smart devices in the home).

[0064] Device display module 102: Used to display functions on the smart home APP based on the device model.

[0065] Permission setting module 103: Used to set the permissions corresponding to users.

[0066] Device Profile 104: Used to describe the functional properties and exposed services of a device. A service refers to an independent and meaningful functional group that can be reused across different types of terminal devices. A functional property is the smallest unit describing the state and function of a terminal device and is also a basic component of a service. The description of a functional property may include fields such as property identifier (ID), data type, and access method. Access methods for functional properties include read (readable, the device can read the property), write (writeable, the device can modify the property), listen (reportable, the device can report the property), and empty (not readable or writable). Of course, the description of a functional property may also include other fields, such as description fields and value range fields; this application does not limit this.

[0067] For example, a smart door lock device model can be shown below:

[0068]

[0069] Device authentication module 105: This is a functional module that performs authentication between the device, the account cloud server, and the business cloud server of the home device when the first electronic device establishes a relationship with the home device.

[0070] Discovery / Connection Module 106: This is a functional module for smart home apps to discover home devices via Wi-Fi or Bluetooth and bind the home devices to the account.

[0071] The cloud server may include a device model 201, a device authentication module 202, a permission matching module 203, and a communication module 204. The device model 201 can be referenced from the description of device model 104. The device model 201 stored in the cloud server may be sent to the cloud server by a first electronic device or a home appliance. The device authentication module 202 is a functional module used by the cloud server to authenticate the first or second electronic device. The permission matching module 203 is used to match user permissions with the functional attribute tags of the home appliance (see step 1303 for a detailed description). The communication module 204 is used to communicate with the first electronic device, the second electronic device, or the home appliance.

[0072] The second electronic device may include a device display module 301, a device model 302, a discovery / connection module 303, and a processing module 304. The device display module 301 can be referenced to the description of device display module 102, and the discovery / connection module 303 can be referenced to the description of discovery / connection module 106. The device model 302 may be distributed to the second electronic device by a cloud server. The processing module 304 can be used to install plugins. These plugins may be programs written for specific applications (e.g., smart home apps) and can be used to add functionality to those applications.

[0073] The home appliance may include a device display module 401, a permission comparison module 402, and a device model 403. The device display module 401 is used to display functions. The permission comparison module 402 is used to compare the permissions of different users. Thus, the home appliance can allow different users to use different functions based on their permissions. The device model 403 can be referenced to the description of device model 104. Device model 404 may be a factory setting in the home appliance.

[0074] For example, the first or second electronic device in the embodiments of this application may be a mobile phone, tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as cellular phone, personal digital assistant (PDA), augmented reality (AR) / virtual reality (VR) device, etc., which can install the above-mentioned smart home applications. The embodiments of this application do not impose special restrictions on the specific form of the electronic device.

[0075] The home devices provided in this application can be large screens (smart screens, televisions), speakers, cameras, air conditioners, refrigerators, smart curtains, table lamps, chandeliers, rice cookers, security equipment (such as smart door locks), personal computers (PCs), and other devices that can access a home wireless local area network. Home devices can also be IoT devices, such as smartwatches, smart bracelets, smart glasses, tablets, etc. Home devices can also be car audio systems, car air conditioners, etc. This application does not impose any special limitations on the specific form of the home devices. The home devices may include a wireless fidelity (Wi-Fi) module to connect to the home local area network.

[0076] The method provided in this application embodiment can be applied to the field of smart homes, which may include scenarios such as home security, indoor monitoring, and family care.

[0077] In this embodiment of the application, taking electronic devices 200 (such as mobile phones) as examples of the first and second electronic devices, the structure of the first and second electronic devices provided in this embodiment of the application will be illustrated by example. Figure 3 As shown, the electronic device 200 (such as a mobile phone) may include: a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.

[0078] The aforementioned sensor module 280 may include sensors such as pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, and bone conduction sensors.

[0079] It is understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device 200. In other embodiments, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0080] Processor 210 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0081] The wireless communication function of electronic device 200 can be implemented through antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, modem processor, and baseband processor. In some embodiments, antenna 1 of electronic device 200 is coupled to mobile communication module 250, and antenna 2 is coupled to wireless communication module 260, enabling electronic device 200 to communicate with networks and other devices through wireless communication technology.

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

[0083] The mobile communication module 250 can provide wireless communication solutions, including 2G / 3G / 4G / 5G, for use on the electronic device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves via the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. For example, in one possible implementation of this application embodiment, a first electronic device or a second electronic device can communicate with a cloud server through the mobile communication module 250.

[0084] The mobile communication module 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 250 can be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 and at least some modules of the processor 210 can be housed in the same device.

[0085] The wireless communication module 260 can provide wireless communication solutions for use on the electronic device 200, including WLAN (such as Wi-Fi), Bluetooth, GNSS, FM, NFC, and infrared (IR) technologies. For example, in one possible implementation of this application embodiment, the first electronic device and the second electronic device can access a temporary network (such as a Wi-Fi network) provided by a router through the wireless communication module 260.

[0086] The wireless communication module 260 can be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signal, and sends the processed signal to processor 210. The wireless communication module 260 can also receive signals to be transmitted from processor 210, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0087] Electronic device 200 implements display functions through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0088] The display screen 294 is used to display images, videos, etc. The display screen 294 includes a display panel. For example, in this embodiment, the display screen 294 can be used to display the application interface of the first APP, such as a device sharing interface, a device search interface, and a QR code scanning interface.

[0089] In this embodiment of the application, the display screen 294 can be used to display, for example, Figures 4-12 The display interface.

[0090] For ease of understanding, the following example illustrates the UI interface involved in the method provided in this application embodiment, using the process of a user of mobile phone A (first electronic device) (e.g., YOYO) sharing a device (e.g., a smart lock) or a home (e.g., YOYO's home) with other users.

[0091] After mobile phone A is paired with the smart door lock (target device), such as Figure 4 As shown in (a), in response to the user selecting the smart door lock 302 on the homepage 301 of the smart home APP (e.g., Honor Home), as... Figure 4 As shown in (b), mobile phone A can display the smart lock's control interface 303. The smart lock interface 303 may include a smart lock icon 304, a smart lock status (locked) 305, and a smart lock function control area 306. The smart lock function control area 306 may include all the smart lock's function control buttons. For example, it may include buttons for near-field unlocking (e.g., face recognition unlocking, password unlocking, fingerprint unlocking, Bluetooth unlocking, QR code unlocking, etc.), remote locking, real-time viewing (also known as real-time status viewing, i.e., viewing the lock's status, including locked and unlocked states), remote unlocking, biometric information enrollment (fingerprint, face information, iris information, etc.), and password management.

[0092] The following is through Figure 5 – Figure 10 This section explains the process of a user of mobile phone A (e.g., YOYO) sharing a smart lock with other users (the users corresponding to mobile phones B or C). It's important to note that mobile phone A is the device bound to the smart lock; therefore, mobile phone A has the highest privileges (i.e., it can operate all functions of the smart lock). Mobile phone A can share some or all of the smart lock's functions with mobile phone B or mobile phone C. Mobile phone A can be considered the master device, and mobile phone B or mobile phone C can be considered slave devices. For example... Figure 5 As shown in (a), in response to the user selecting the "My" tab 311 on the main interface 310 of the smart home, as... Figure 5 As shown in (b), mobile phone A can display interface 312, which may include user-related information (e.g., user avatar, level, account, etc.) and corresponding control options (e.g., sharing option 313, message center, forum, etc.). The response to user actions on sharing option 313 (e.g., click or long press, etc., are not limited in this application). Figure 5As shown in (c), in response to the user selecting the Shared Devices tab 316a, mobile phone A can display the Device Sharing Interface 315 (first interface). The Device Sharing Interface 315 can include multiple home devices that can be shared (N devices to be shared). For example, it can include home devices such as TVs, routers, speakers, and smart locks. If the user selects the selection button 316b corresponding to the smart lock (target device), in response to the user's operation on the OK button 316c, as shown in (c), the device sharing interface 315 can display the device sharing interface 316a. Figure 7 As shown in (a), phone A can display the sharing interface 317. Or, as... Figure 6 As shown in (a), in response to the user's long press operation on the smart door lock 302, as Figure 6 As shown in (b), phone A can display a pop-up window 317, which may include multiple operation options, such as the "move to desktop" option, the "share" option 318, and the "rename" option. In response to the user selecting the "share" option 318, as shown... Figure 7 As shown in (a), phone A can display sharing interface 317 (fourth interface). Interface 317 can include various methods for sharing devices (device sharing protocols), such as adding members by scanning a QR code, adding members by Honor account, etc. Adding members. Optionally, interface 317 can also include users who have recently (within one week or one month) shared devices or families. Users can directly select recent users to share devices without scanning QR codes, entering account information, or other steps. Selecting from the list is quick and easy. Responding to a user's (e.g., YOYO's) selection of the nearest user, Mary (the target user), such as... Figure 7 As shown in (b), mobile phone A can display interface 320, which may include a selected user 321, a permission management button 322, and an immediate share button 323. Before immediately sharing, the user can manage permissions for the selected user. For example, in response to the user's operation of the permission management button 322, such as... Figure 7 As shown in (c), phone A can display a permission management pop-up 324 (second interface). Pop-up 324 can include options such as basic permissions, advanced permissions, and super permissions. If the user selects basic permissions (target option), in response to the user's action on the OK button, as shown... Figure 7As shown in (d), mobile phone A can display prompt message 325, indicating to user Mary that her permissions are basic. Then, in response to the user's action on the "Share Now" button 323, mobile phone A can share the basic functions of the device (smart lock) with user Mary. Here, basic permissions correspond to the basic functions of the smart lock; that is, users authorized with basic permissions can only use the basic functions of the smart lock. Advanced permissions correspond to the advanced functions of the smart lock; that is, users authorized with advanced permissions can use the advanced functions of the smart lock. Super permissions correspond to the basic functions of the smart lock; that is, users authorized with super permissions can use the super functions of the smart lock. For example, basic functions may include real-time viewing, near-field unlocking, and battery level monitoring; advanced functions may include remote unlocking and fingerprint enrollment; and super functions may include password management, adding devices, and viewing historical video from the camera.

[0093] like Figure 8 As shown in (a), after user Mary opens the smart home app on phone B, phone B can display a pop-up window 331 on the smart home app interface 330. Pop-up window 331 may include the prompt text "YOYO shares the smart lock with you," and may also include a reject button 332 and an accept button 333. In response to the user's action on the accept button 333, as shown in (a),... Figure 8 As shown in (b), a card 334 corresponding to the smart lock can be added to the smart home APP interface 330. Furthermore, the number of devices can be refreshed in the display area 335, from 3 devices to 4 devices. Additionally, phone B can display notification messages in the notification bar, which are used to notify other users to share the smart lock with "me". In response to a user clicking on a notification message in the notification bar, phone B can be redirected to the smart home APP.

[0094] In another possible design, such as Figure 7 As shown in (a), if a user of mobile phone A (e.g., YOYO) uses... Choose to share the smart lock with user Amy. For example... Figure 9 As shown in (a), user Amy can use mobile phone C... The application receives message 341 sent by user YOYO and responds to user click message 341, such as Figure 9 As shown in (b), mobile phone C can display the Honor Home interface 342. Interface 342 may include an image 343 and prompt text 344. Image 343 is used to inform the user about the application scenarios of Honor Home. Prompt text 344 is used to prompt the user to open Honor Home to view smart devices shared by other users. Interface 342 may also include an accept button 345, responding to the user's operation of the accept button 345, such as... Figure 9As shown in (c), mobile phone C can display pop-up 346, which is used to prompt the user that they are about to leave. Open Honor Home. The pop-up window 346 may also include a cancel button 347 and an allow button 348. In response to the user clicking the allow button 348, such as... Figure 9 As shown in (d), mobile phone C can open the smart home APP and display a pop-up window 331 on the smart home APP interface 330. The pop-up window 331 may include the prompt text "YOYO shares the smart lock with you," and may also include a reject button 332 and an accept button 333. In response to the user's operation of the accept button 333, the smart lock can be added to Amy's home, so that user Amy can control the smart lock.

[0095] For example, if the user corresponding to phone B or phone C has basic permissions, such as... Figure 10 As shown in (a), mobile phone B or mobile phone C can display the smart lock's functional interface 360 ​​(third interface). Interface 360 ​​includes a smart lock icon 361, the smart lock's status (e.g., locked) 362, and a function control area 363. The function control area 363 may include a near-field unlock button, a remote lock button, and a real-time viewing button (i.e., a first control, which may include one or more controls), thus presenting a smart lock's functional interface different from that of mobile phone A. Or, as... Figure 10 As shown in (b), mobile phone B or mobile phone C can display the smart lock's functional interface 370. Interface 370 includes a smart lock icon 371, the smart lock's status (e.g., locked) 372, and a functional control area 373. The functional control area 373 may include a near-field unlock button, a remote lock button, a real-time view button, a fingerprint enrollment button, and a password management button (i.e., a second control, which includes a first control and a third control). The near-field unlock button, remote lock button, and real-time view button are available (belonging to the first control), while the remote unlock button, fingerprint enrollment button, and password management button are grayed out (belonging to the third control), i.e., unavailable.

[0096] The following is through Figure 11 – Figure 12 The process of a user of mobile phone A (e.g., YOYO) sharing their home (e.g., YOYO's home) with other users is described.

[0097] like Figure 11As shown in (a), in response to the user selecting the Shared Homes tab 370 (fourth control), phone A can display the Home Sharing interface 315 (sixth interface). The Home Sharing interface 315 can display the homes the user has joined, such as YOYO's home. Of course, it can also include other homes the user has joined; this is not limited here. In response to the user's operation on the control 371 corresponding to YOYO's home, such as... Figure 11 As shown in (b), mobile phone A can display a family management interface 372, which may include information such as family name (e.g., YOYO), family location (e.g., Xi'an), and may also include an "Add Member" button 373. In response to the user's action on the "Add Member" button 373, such as... Figure 11 As shown in (c), mobile phone A can display interface 374, which can include various sharing methods, such as adding members by scanning a QR code, adding members by Honor account, etc. Family sharing can be achieved by adding members. Optionally, interface 317 can also include users who have recently shared devices or families. Users can directly select recent users for family sharing without scanning a QR code, entering an account, or... Selecting from the list is quick and easy. After a user adds a member (target user), the user can further select permissions for the target user, see reference. Figure 7 The details and related descriptions will not be elaborated here.

[0098] If a user of phone A (e.g., YOYO) uses... Choose to share your family with user Amy. For example... Figure 12 As shown in (a), user Amy can use mobile phone C... The application receives message 380 from user YOYO and responds to user click message 380, such as... Figure 12 As shown in (b), phone C can display the Honor Home interface 381. Interface 381 may include a prompt image and prompt text to prompt the user to open Honor Home and view other users' shared homes. Interface 342 may also include an accept button 382, ​​responding to the user's action on the accept button 382, ​​such as... Figure 12 As shown in (c), mobile phone C can display pop-up 383, which is used to prompt the user that they are about to leave. Open Honor Home. In response to the user clicking the Allow button (384 error), such as... Figure 12As shown in (d), mobile phone C can open the smart home APP and display a pop-up window 386 on the smart home APP interface 385. The pop-up window 386 may include the prompt text "YOYO invites you to enter YOYO's home". In response to the user's operation of the accept button 387, YOYO's home can be added to user Amy's smart home, so that user Amy can control all the smart devices in YOYO's home.

[0099] like Figure 13 As shown, this application provides a method for sharing the functions of smart home devices. Taking a mobile phone A as the first electronic device, a mobile phone B as the second electronic device, and a smart door lock as the smart home device as an example, the method includes:

[0100] 1301. Connect and bind mobile phone A to the smart door lock.

[0101] In one implementation, mobile phone A and the smart lock can be connected to the same local area network, thus establishing a network connection between them. After launching the smart home app on mobile phone A, in response to the user's device addition operation, mobile phone A can scan for nearby devices using short-range communication technology (e.g., Bluetooth / Wi-Fi proximity discovery). Once mobile phone A detects the smart lock, it can add it to the smart home app. During the process of adding the smart lock, mobile phone A can enter an account and password, or a mobile phone number / username and verification code to bind the smart lock.

[0102] After mobile phone A is paired with the smart lock, in response to the user selecting the smart lock, mobile phone A can display the smart lock's control interface. The smart lock's control interface can include all the smart lock's functions, each of which is operational. The smart lock's control interface displayed on mobile phone A can be as follows: Figure 4 As shown in (b) above. It should be noted that... Figure 4 The image shown is merely an example of the control interface for a smart lock on mobile phone A. All control buttons for the smart lock may not be displayed on the same screen, and this application does not impose any limitations on this.

[0103] In one possible design, the control interface of the smart lock on mobile phone A can include multiple interfaces, each with different control buttons. For example, the smart lock could have two control interfaces: a status management interface and a settings interface. The status management interface could include function buttons such as near-field unlocking, remote locking, real-time viewing, and remote unlocking, while the settings interface could include control buttons such as fingerprint enrollment and password management.

[0104] 1302. In response to the user's operation of sharing the device, mobile phone A sends a request to the cloud server to share the device.

[0105] For example, such as Figure 7 As shown in (d), after the user selects the user to be shared (Mary), in response to the user clicking the "Share Now" button 323, mobile phone A can send a request to the cloud server to share the smart lock.

[0106] The request to share a device may include the identifier of the family member selected by user YOYO (e.g., Mary) and that family member's permission information. The family member's identifier may include the family member's application account (e.g., Honor account, etc.). This includes information such as the account, etc., or the ID of a device used by a family member (e.g., phone B). Permissions for family members (e.g., Mary) can be manually set by the user (e.g., YOYO). Family member permissions can be basic, advanced, or super-permissions.

[0107] In some embodiments, basic permissions correspond to the basic functions of a smart device (e.g., a smart lock), meaning that users authorized with basic permissions can only use the basic functions of the smart lock. Advanced permissions correspond to the advanced functions of a smart device (e.g., a smart lock), meaning that users authorized with advanced permissions can use the advanced functions of the smart lock. Super permissions correspond to the super functions of a smart device (e.g., a smart lock), meaning that users authorized with super permissions can use the super functions of the smart lock. Basic functions may include real-time viewing, near-field unlocking, and battery level monitoring; advanced functions, in addition to basic functions, may also include remote unlocking and fingerprint enrollment; super functions, in addition to advanced functions, may also include management passwords, adding devices, and viewing historical video footage from the camera.

[0108] If the person being shared (family member) has permission to use basic functions, they can be called a basic user; if the person being shared has permission to use advanced functions, they can be called an advanced user; if the person being shared has permission to use super functions, they can be called a super user.

[0109] 1303. In response to receiving a request to share a device, the cloud server matches the user's access permissions with the functional attribute tags of the smart lock.

[0110] The functional attribute tags of a smart lock can be included in its device model. The device model can be sent to the cloud server after the smart lock connects to Wi-Fi, or it can be sent by the smart lock to mobile phone A via near-field communication (e.g., Bluetooth) after the smart lock is paired with mobile phone A, and then from mobile phone A to the cloud server. The device model can also be predefined within the smart lock itself.

[0111] The device model of a smart door lock can include multiple functional attributes (functional attributes can also be simply referred to as functions). Each functional attribute can correspond to a functional attribute tag, which is used to describe the type of functional attribute.

[0112] In one possible design, the types of functional attributes can be categorized based on operational complexity. These can be categorized from highest to lowest complexity as basic functions, advanced functions, and super functions. That is, functional attribute tags include tags for basic functions, advanced functions, and super functions. For example, such as... Figure 14 As shown, features such as real-time viewing, near-field door opening, and battery level monitoring correspond to the basic feature attribute tags. Features such as remote door opening and fingerprint enrollment correspond to the advanced feature attribute tags. Features such as password management, adding devices, and viewing camera historical video correspond to the super feature attribute tags.

[0113] In another possible design, the types of functional attributes can be categorized according to security requirements. These can be arranged from highest to lowest security level, including insecure functions, secure functions, and privacy functions. That is, the functional attribute labels would include labels for insecure functions, secure functions, and privacy functions. The user sharing the data would have the following permissions: direct access to insecure functions, access to secure functions after entering a password, and inaccessibility to privacy functions. Privacy functions could be restricted to the user who created the family.

[0114] In another possible design, the functional attributes can be categorized based on their purpose. For example, the functions of a smart lock can be divided into control functions and management functions. That is, the functional attribute labels include labels such as control function and management function. The permissions of the user being shared can be: allowed to use control functions; allowed to use management functions; or allowed to use both control and management functions.

[0115] Matching the user's access permissions with the functional attribute tags of the shared device (smart lock) can mean that the cloud server determines the permitted and prohibited functions for the user based on these permissions. If the smart lock's functional attribute tags are categorized according to functional complexity requirements, then if the user has basic permissions, they are allowed to use basic functions but not advanced or super functions. If they have advanced permissions, they are allowed to use advanced functions but not super functions. If they have super permissions, they are allowed to use super functions (i.e., all functions of the device are permitted). In this embodiment, a user with basic permissions can be called a basic user; a user with advanced permissions can be called an advanced user; and a user with super permissions can be called a super user.

[0116] For example, such as Figure 15 As shown, if the person being shared (family member) is the grandmother, and the grandmother's corresponding permission is basic, then the grandmother can use basic functions such as real-time viewing, near-field door opening, and checking battery level. If the person being shared (family member) is the mother, and the mother's corresponding permission is advanced, then the mother can not only use basic functions such as real-time viewing, near-field door opening, and checking battery level, but also advanced functions such as remote door opening and fingerprint enrollment. If the person being shared (family member) is the father, and the father's corresponding permission is super-permission, then the father can use basic functions such as real-time viewing, near-field door opening, and checking battery level, advanced functions such as remote door opening and fingerprint enrollment, as well as super-permission functions such as managing passwords and adding devices.

[0117] 1304. The cloud server can generate the first plugin based on the matching results.

[0118] For example, when the matching result (first matching result) indicates that the user being shared with is allowed to use basic functions but not advanced or super functions, the first plugin can be a plugin that includes the basic functions of the smart lock. Alternatively, the first plugin can be a plugin that includes all functions of the smart lock, where the basic functions are available and other functions (functions in advanced or super functions other than the basic functions) are disabled. When the matching result indicates that the user being shared with is allowed to use advanced functions but not super functions, the first plugin can be a plugin that includes the advanced functions of the smart lock. Alternatively, the first plugin can be a plugin that includes all functions of the smart lock, where the advanced functions are available and other functions (functions in super functions other than the advanced functions) are disabled. When the matching result indicates that the user being shared with is allowed to use super functions, the first plugin can be a plugin that includes all functions of the smart lock. The plugin can be a program written for a specific application (e.g., a smart home app) and can be used to add functionality to that specific application.

[0119] 1305. The cloud server sends the first plugin to the device corresponding to the shared user (e.g., mobile phone B).

[0120] 1306. Install the first plugin on phone B.

[0121] like Figure 8 As shown in (a), after the user clicks the accept button 333, mobile phone B can receive the first plugin from the cloud server and install the first plugin.

[0122] 1307. Mobile phone B displays the control interface of the smart lock, which includes some of the functions of the smart lock.

[0123] After installing the first plugin on phone B, the corresponding functions of the smart lock can be added to the smart home app. Phone B will then display the smart lock's control interface, which includes some of the smart lock's functions. If the user corresponding to phone B has basic permissions, the control interface displayed on phone B will include the smart lock's basic functions. If the user corresponding to phone B has advanced permissions, the control interface displayed on phone B will include the smart lock's advanced functions. If the user corresponding to phone B has superuser permissions, the control interface displayed on phone B will include all of the smart lock's functions.

[0124] This application's embodiments differentiate the functions of smart home devices using different functional attribute tags, and then match user access permissions with the functional attribute tags of the smart home device (smart lock), allowing users with different access permissions to use different functions of the smart home device (smart lock). For example, a basic user (e.g., grandmother) can use basic functions such as real-time viewing, near-field unlocking, and battery level monitoring; an advanced user (e.g., mother) can not only use basic functions such as real-time viewing, near-field unlocking, and battery level monitoring, but also advanced functions such as remote unlocking and fingerprint enrollment; a super user (e.g., father) can use basic functions such as real-time viewing, near-field unlocking, and battery level monitoring, advanced functions such as remote unlocking and fingerprint enrollment, and super functions such as management passwords and adding devices. This enhances the security and privacy protection of sharing smart home devices.

[0125] Step 1301 can be... Figure 2 The discovery / connection module 106 performs this step. Step 1302 can be... Figure 2 The device sharing module 101 in the middle performs the steps. Steps 1303 and 1304 can be... Figure 2 The permission matching module 203 in the middle is executed. Step 1305 can be... Figure 2 The communication module 204 in the middle performs this step. Step 1306 can be... Figure 2 The processing module 304 executes this step. Step 1307 can be... Figure 2 The device display module 301 in the middle performs the operation.

[0126] like Figure 16 As shown, this application provides a device sharing method, taking mobile phone A as the first electronic device and mobile phone B as the second electronic device as an example, including:

[0127] 1601. Connect and bind mobile phone A to the smart door lock.

[0128] 1602. In response to the user's operation of sharing a family, mobile phone A sends a request to the cloud server to share a family.

[0129] For example, such as Figure 11 As shown in (a), in response to user YOYO's action of sharing the family (YOYO's home, i.e. the target family), mobile phone A can send a request to the cloud server for sharing the family.

[0130] The request for a shared family can include the identifier of the family member selected by user YOYO (e.g., Amy, the target user) and the family member's permission information. The family member's identifier can include the family member's application account (e.g., Honor account, etc.). This includes information such as the account, etc., or the ID of a device used by a family member (e.g., phone B). Permissions for family members (e.g., Mary or Amy) can be manually set by the user (e.g., YOYO). Family member permissions can be basic, advanced, or super permissions.

[0131] 1603. In response to the request to receive a shared home, the cloud server matches the user's access permissions with the functional attribute tags of all smart devices in the shared home.

[0132] The cloud server can match the access permissions of the shared user with the functional attribute tags of each smart device in all the smart devices in the shared home. For the specific matching process, please refer to step 1303, which describes how the cloud server matches the access permissions of the shared user with the functional attribute tags of the smart lock. It will not be elaborated here.

[0133] 1604. The cloud server can generate a second plugin based on the matching results.

[0134] For example, when the matching result (second matching result) indicates that the person being shared with is allowed to use basic functions but not advanced or super functions, the second plugin could be a plugin that includes the basic functions of all devices in YOYO's home. This plugin could be a program written for a specific application (e.g., a smart home app) and could be used to add functionality to that specific application. Alternatively, the second plugin could be a plugin that includes all functions of all devices in YOYO's home, where the basic functions are available and other functions (advanced and super functions) are disabled. When the matching result indicates that the person being shared with is allowed to use advanced functions but not super functions, the second plugin could be a plugin that includes the advanced functions of all devices in YOYO's home. Alternatively, the second plugin could be a plugin that includes all functions of all devices in YOYO's home, where the advanced functions are available and other functions (super functions) are disabled. When the matching result indicates that the person being shared with is allowed to use super functions, the second plugin could be a plugin that includes all functions of all devices in YOYO's home.

[0135] 1605. The cloud server distributes the second plugin to the device corresponding to the shared user (e.g., mobile phone B).

[0136] 1606. Install the second plugin on phone B.

[0137] like Figure 12 As shown in (d), after the user clicks the accept button 387, mobile phone B can receive the second plugin from the cloud server and install the second plugin.

[0138] 1607. Mobile phone B displays the control interface of any device in YOYO's home. Each device's control interface includes some of the device's functions.

[0139] After installing the second plugin on phone B, basic functions for all devices in YOYO's home can be added to the smart home app. Phone B can then display the control interface for any device in YOYO's home (e.g., the TV), including some of its functions. If the user corresponding to phone B has basic permissions, the TV control interface displayed on phone B can include the TV's basic functions. If the user corresponding to phone B has advanced permissions, the TV control interface displayed on phone B can include the TV's advanced functions. If the user corresponding to phone B has superuser permissions, the TV control interface displayed on phone B can include all of the TV's functions.

[0140] Step 1601 can be... Figure 2 The discovery / connection module 106 performs this step. Step 1602 can be... Figure 2 The device sharing module 101 in the middle performs the steps. Steps 1603 and 1604 can be... Figure 2 The permission matching module 203 in the middle is executed. Step 1605 can be... Figure 2 The communication module 204 in the middle performs this step. Step 1606 can be... Figure 2 The processing module 304 executes this step. Step 1607 can be... Figure 2 The device display module 301 in the middle performs the operation.

[0141] Based on the method provided in this application, when sharing a target home with a target user, usage permissions can be specified for that user. Different usage permissions allow the target user to use different functional attributes of the devices in the target home. That is, users with different usage permissions can use different functions of the devices in the target home (e.g., smart locks). This makes the sharing of devices (smart home devices) more secure and provides better privacy protection.

[0142] This application also provides a chip system, such as... Figure 17 As shown, the chip system includes at least one processor 1701 and at least one interface circuit 1702. The processor 1701 and the interface circuit 1702 are interconnected via lines. For example, the interface circuit 1702 can be used to receive signals from other devices (e.g., the memory of an electronic device). As another example, the interface circuit 1702 can be used to send signals to other devices (e.g., the processor 1701).

[0143] For example, interface circuit 1702 can read instructions stored in the memory of an electronic device and send those instructions to processor 1701. When the instructions are executed by processor 1701, they can cause the first electronic device and the second electronic device (such as...) to... Figure 3 The electronic device 200 shown or the cloud server executes the steps in the above embodiments.

[0144] Of course, the chip system may also include other discrete components, and this application embodiment does not specifically limit this.

[0145] This application embodiment also provides a computer-readable storage medium, which includes computer instructions, and the computer instructions are used in a first electronic device, a second electronic device (such as...). Figure 3 When the electronic device 200 shown is running on the cloud server, it causes the first electronic device and the second electronic device (such as...) to... Figure 3 The electronic device 200 shown or the cloud server executes the various functions or steps performed by mobile phone A or mobile phone B or the cloud server in the above method embodiment.

[0146] This application also provides a computer program product that, when run on a computer, causes the computer to perform various functions or steps performed by the first electronic device, the second electronic device, or the cloud server in the above method embodiments.

[0147] This application also provides a device for sharing devices. The device can be divided into different logical units or modules according to their functions. Each unit or module performs different functions, so that the device can perform the various functions or steps performed by the first electronic device, the second electronic device, or the cloud server in the above method embodiments.

[0148] Through the above description of the embodiments, those skilled in the art can clearly understand that the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

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

[0150] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0151] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0153] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for sharing equipment, characterized in that, The method includes: The first electronic device displays a first interface, which includes a first control and N devices to be shared, where N is an integer greater than or equal to 1. The first control is used to indicate that the first interface is an interface for sharing devices. The first electronic device receives an operation from the user to select a target device from the N devices to be shared; The first electronic device receives the user's selection of the target user; The first electronic device displays a second interface, which includes multiple options. Different options correspond to different usage permissions, and different usage permissions allow the target user to use different functional attributes. The first electronic device receives an operation from the user to select a target option from the plurality of options; The first electronic device receives an operation from the user confirming that the target device is shared with the target user with the usage permissions corresponding to the target option; The first electronic device sends a request to the cloud server to share the device, and the request to share the device carries the identifier of the target user and the user's usage rights. The cloud server receives the request from the shared device and matches the target user's access permissions with the target device's functional attribute tags to obtain a first matching result. The functional attribute tags describe the types of functional attributes of the target device, and the matching result indicates the functional attributes that the target user is allowed to use and those that are not. The types of functional attributes are categorized based on operational complexity, security requirements, or the function of the functional attribute. The cloud server generates a first plugin based on the first matching result. The first plugin only includes the functional attributes that the target user is allowed to use from all the functional attributes of the target device. The functional attributes that the target user is allowed to use are readable and writable. The cloud server sends the first plugin to the second electronic device; The second electronic device receives and installs the first plug-in; The second electronic device displays a third interface, which includes a first control corresponding to the functional attributes of the target device that the target user can use, and the first control is in an operable state.

2. The method according to claim 1, characterized in that, The first electronic device receiving the operation of selecting the target user includes: The first electronic device displays a fourth interface, which includes one or more protocols for sharing the target device; The first electronic device receives an operation from the user selecting a first protocol from one or more protocols for sharing the target device, and receives an operation from the user selecting the target user through the first protocol; or The first electronic device displays a fifth interface, which includes one or more protocols for sharing the target device, and options for directly sharing the target device with one or more users; The first electronic device receives an operation from the user to select the target user from the option of directly sharing the target device with one or more users.

3. The method according to claim 1 or 2, characterized in that, The functional attributes include at least one of the following fields: attribute identifier ID, data type, and access method. The access method includes at least one of the following: read, write, listen, or empty.

4. The method according to claim 1 or 2, characterized in that, The method further includes: The first electronic device establishes a communication connection and binds with the target device.

5. The method according to claim 1 or 2, characterized in that, The method further includes: In response to the user's operation of opening the control interface of the target device, the first electronic device displays the control interface of the target device. The control interface displayed by the first electronic device includes second controls corresponding to all functional attributes of the target device, and the second controls are in an operable state.

6. The method according to claim 1 or 2, characterized in that, The usage permissions of the target user are set by default by the first electronic device.

7. The method according to claim 1 or 2, characterized in that, The multiple options correspond to the first permission, the second permission, and the third permission, respectively. Wherein, the first permission is used to indicate that the first functional attribute of the target device can be used directly, the second permission is used to indicate that the second functional attribute of the target device can be used directly, and the third permission is used to indicate that the third functional attribute of the target device can be used directly. The first functional attribute, the second functional attribute, and the third functional attribute are not completely the same.

8. The method according to claim 7, characterized in that, If the target device is a door lock device The first functional attribute includes at least one of the following: real-time status viewing, near-field door opening, and battery level viewing; The second functional attribute includes the first functional attribute and at least one of remote door opening and biometric information entry; The third functional attribute includes the second functional attribute and at least one of the following: management password and viewing historical video from the camera.

9. The method according to claim 1 or 2, characterized in that, The target user's permissions are the fourth permissions, which indicate that the fourth functional attribute of the target device can be used directly, and the fifth functional attribute of the target device can be used after entering a preset password. The fourth functional attribute and the fifth functional attribute are different.

10. The method according to claim 1 or 2, characterized in that, The method further includes: The cloud server receives a device model of the target device from the target device or the first electronic device. The device model includes multiple functional attributes of the target device, and each of the multiple functional attributes corresponds to a functional attribute label.

11. The method according to claim 1 or 2, characterized in that, The first plugin includes all functional attributes of the target device. Among these, the functional attributes that the target user is allowed to use are readable and writable, while the functional attributes that the target user is not allowed to use are not readable and writable.

12. The method according to claim 1 or 2, characterized in that, The second electronic device displays the third interface, including: The second electronic device displays the first control, and the first control is in an operable state; or The second electronic device displays a second control corresponding to all the functional attributes of the target device. The second control includes a first control and a third control corresponding to the functional attributes that the target user is not allowed to use. The first control is in an operable state, and the third control is grayed out.

13. A method for sharing equipment, characterized in that, The method includes: The first electronic device displays a sixth interface, which includes a fourth control and N households to be shared, where N is an integer greater than or equal to 1. The fourth control is used to indicate that the sixth interface is an interface for sharing households. The first electronic device receives an operation from the user to select a target household from the N households to be shared; The first electronic device receives the user's selection of the target user; The first electronic device displays a seventh interface, which includes multiple options. Different options correspond to different usage permissions, and different usage permissions allow the target user to use different functional attributes. The first electronic device receives an operation from the user to select a target option from the plurality of options; The first electronic device receives an operation from the user confirming that the target family is shared with the target user with the usage permissions corresponding to the target option; The first electronic device sends a request to the cloud server to share a home, the request carrying the identifier of the target user and the user's usage permissions; The cloud server receives the request from the shared family and matches the target user's access permissions with the functional attribute tags of all devices in the target family to obtain a second matching result. The functional attribute tags are used to describe the type of functional attributes of the device. The second matching result is used to indicate the functional attributes that the target user is allowed to use and the functional attributes that the target user is not allowed to use for each of the devices. The type of functional attribute is divided according to the complexity of operation, or according to the security requirements, or according to the function of the functional attribute. The cloud server generates a second plugin based on the second matching result. The second plugin includes only the functional attributes that the target user is allowed to use from all functional attributes of all devices in the target household. The functional attributes that the target user is allowed to use are readable and writable. The cloud server sends the second plugin to the second electronic device; The second electronic device receives and installs the second plug-in; The second electronic device displays the control interface of the first device among all the devices. The control interface of the first device includes a fourth control corresponding to the functional attributes that the target user is allowed to use by the first device, and the fourth control is in an operable state.

14. The method according to claim 13, characterized in that, The first electronic device receiving the operation of selecting the target user includes: The first electronic device displays a ninth interface, which includes one or more protocols for sharing the target family; The first electronic device receives an operation from the user selecting a first protocol from one or more protocols for sharing the target household, and receives an operation from the user selecting the target user through the first protocol; or The first electronic device displays a tenth interface, which includes one or more protocols for sharing the target family, and options for directly sharing the target family with one or more users; The first electronic device receives an operation from the user to select the target user from the option of directly sharing the target family with one or more users.

15. The method according to claim 13 or 14, characterized in that, The functional attributes include at least one of the following fields: attribute identifier ID, data type, and access method. The access method includes at least one of the following: read, write, listen, or empty.

16. The method according to claim 13 or 14, characterized in that, The multiple options correspond to the first permission, the second permission, and the third permission, respectively. Wherein, the first permission is used to indicate that the first functional attribute of all devices in the target household is allowed to be used directly, the second permission is used to indicate that the second functional attribute of all devices in the target household is allowed to be used directly, and the third permission is used to indicate that the third functional attribute of all devices in the target household is allowed to be used directly. The first functional attribute, the second functional attribute and the third functional attribute are different.

17. The method according to claim 16, characterized in that, If the target household includes door lock devices. The first functional attribute corresponding to the door lock device includes at least one of the following: real-time status viewing, near-field door opening, and battery level viewing; The second functional attribute corresponding to the door lock device includes the first functional attribute corresponding to the door lock device and at least one of remote door opening and biometric information entry. The third functional attribute corresponding to the door lock device includes the second functional attribute corresponding to the door lock device and at least one of the following: management password and viewing historical video from the camera.

18. The method according to claim 13 or 14, characterized in that, The second plugin includes all functional attributes of all devices in the target household. Among these functional attributes, the functional attributes that the target user is allowed to use are readable and writable, while the functional attributes that the target user is not allowed to use are not readable and writable.

19. The method according to claim 13 or 14, characterized in that, The second electronic device displays the eighth interface, which includes: The second electronic device displays the fourth control, which is in an operable state; or The second electronic device displays a fifth control corresponding to all the functional attributes of the first device. The fifth control includes the fourth control and a sixth control corresponding to the functional attributes that the target user is not allowed to use. The fourth control is in an operable state, and the sixth control is grayed out.

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

21. A computer-readable storage medium, characterized in that, Includes computer instructions; When the computer instructions are executed on the first electronic device, the second electronic device, or the cloud server, the first electronic device, the second electronic device, or the cloud server performs the method as described in any one of claims 1-19.

22. A first electronic device, characterized in that, The device includes a processor coupled to a memory storing program instructions that, when executed by the processor, cause the first electronic device to perform the method of any one of claims 1-19.

23. A second electronic device, characterized in that, The device includes a processor coupled to a memory storing program instructions that, when executed by the processor, cause the second electronic device to perform the method of any one of claims 1-19.

24. A cloud server, characterized in that, The system includes a processor coupled to a memory, the memory storing program instructions, which, when executed by the processor, cause the cloud server to implement the method of any one of claims 1-19.