Sharing authorization method and apparatus, and storage medium
By displaying a list of contacts from social applications on smart home devices and generating message tracking identifiers, the device sharing process is simplified, the complexity and security issues of device sharing across account systems are resolved, and secure and efficient device permission management is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2021-03-22
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, the cross-account sharing authorization process for smart home devices is complex and insecure, especially since sharing codes are easily exploited by unauthorized users, leading to the leakage of device permissions.
By displaying a contact list from a social application on the first electronic device, receiving a selection signal, sending a sharing request to the smart home server, generating a device sharing record, and returning a message tracking identifier, the sharing authorization information is sent to the second electronic device using the social application, thus avoiding the use of sharing codes and ensuring the security of device permissions.
It simplifies the sharing process for smart home devices, improves the security and reliability of device sharing, and prevents sharing errors and permission leaks.
Smart Images

Figure CN115114607B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of smart home, and in particular to a sharing authorization method and device and a storage medium. BACKGROUND
[0002] With the continuous development of Internet of Things technology, smart home devices are becoming more and more popular, and smart home applications are becoming more and more widely used. The wide application of smart home applications provides users with more convenient and comfortable home life. If a guest needs to stay for a period of time, the host needs to share some smart home devices with the guest.
[0003] In related technologies, the sharing authorization of smart home devices in a single account system (i.e., a smart home application) has high requirements for shared users, and the shared users need to install a smart home application on their mobile phones. If not, the sharing process of the smart home device will be very complex. The shared user needs to download the smart home application, then apply for an account, and perform a series of settings on the smart home application. The sharing operation steps are complex. In the sharing authorization of smart home devices across account systems (i.e., a smart home application and a social application), a sharing code is usually used. However, the sharing code is easy to lose, and any user can obtain the permission to share the smart home device through the authentication of the smart home server according to the sharing code. The security of this method is low. Related technologies have not yet provided a reasonable and effective sharing authorization method. SUMMARY
[0004] Therefore, a sharing authorization method, device and storage medium are provided. The embodiments of the present application provide a sharing authorization method, device and storage medium, which can reduce the sharing operation steps of smart home devices and ensure the security of sharing authorization.
[0005] In a first aspect, the embodiments of the present application provide a sharing authorization method, which is used in a first electronic device, and the method comprises the following steps:
[0006] displaying a contact list in a social application when receiving a device sharing signal in a smart home application, the device sharing signal being a trigger signal acting on a device identifier of a smart home device to be shared, and the contact list comprising at least one shared object;
[0007] sending a sharing request information to a smart home server when receiving a selection signal acting on the shared object, the sharing request information being used to instruct the smart home server to generate a device sharing record and return a message tracking identifier, the device sharing record being used to indicate that the shared object has the permission to share the smart home device, and the message tracking identifier being used to uniquely identify the device sharing record;
[0008] The social application is invoked to send sharing authorization information to the second electronic device of the recipient, the sharing authorization information including the message tracking identifier.
[0009] In this implementation, when the first electronic device receives a device sharing signal from the smart home application, it displays a contact list in the social application. When it receives a selection signal applied to the target device, it sends a sharing request to the smart home server. The smart home server generates a device sharing record and returns a message tracking identifier, thereby enabling the first electronic device to call the social application to send sharing authorization information to the target device's second electronic device. On one hand, the first electronic device sends the sharing authorization information, including the message tracking identifier, to the second electronic device via the social application, eliminating the need for the second electronic device to install the smart home application and reducing the steps involved in sharing smart home devices. On the other hand, since the smart home server carries the information of the target device, namely the device sharing record, which indicates that the target device has the permission to share smart home devices, and the sharing authorization information does not use risky sharing codes but uses secure message tracking identifiers, only the second electronic device can obtain the permission to share smart home devices by being authenticated by the smart home server based on this sharing authorization information. Even if the sharing authorization information is leaked, there is no risk of sharing errors, ensuring the credibility and security of the device sharing authorization method.
[0010] In one possible implementation, sending a sharing request to the smart home server upon receiving a selection signal applied to the shared object includes:
[0011] When a selection signal is received applied to the shared object, the target public identifier of the shared object is obtained. The target public identifier is the account identifier of the shared object in the social application generated for the smart home application.
[0012] The sharing request information is sent to the smart home server. The sharing request information includes a first account identifier, the target public identifier, and the device identifier of the smart home device. The first account identifier is the account identifier of the sharing object in the smart home application.
[0013] In this implementation, when the first electronic device receives a selection signal applied to the object to be shared, it obtains the target public identifier of the social account of the object to be shared (i.e., social account for smart home application) and sends a sharing request message carrying the target public identifier to the smart home server so that the smart home server can subsequently generate and store device sharing records, thereby further ensuring the credibility and security of the device sharing authorization method.
[0014] In another possible implementation, obtaining the target public identifier of the shared object when a selection signal applied to the shared object is received includes:
[0015] When a selection signal is received that is applied to the object to be shared, a pre-share request information is sent to the social server. The pre-share request information is used to instruct the social server to generate and return the target public identifier of the object to be shared.
[0016] Receive the target public identifier returned by the social server.
[0017] In this implementation, the first electronic device obtains the target public identifier of the social account of the object to be shared from the social server through pre-sharing request information, so as to subsequently send sharing request information carrying the target public identifier to the smart home server.
[0018] In another possible implementation, the sharing request information is further used to instruct the smart home server to query a second account identifier corresponding to the target public identifier based on the target public identifier and a preset binding relationship. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application. The device sharing record is generated based on the query result.
[0019] In this implementation, through the pre-sharing action, the smart home server queries whether the target public identifier of the shared object is bound to the second account identifier. Based on the query result, a device sharing record is generated. This allows the smart home server to authenticate the identity of the shared object based on the stored device sharing record, regardless of whether the target public identifier of the shared object is bound to the second account identifier.
[0020] In another possible implementation, the sharing request information is also used to instruct the smart home server to generate a first device sharing record when it finds the second account identifier corresponding to the target public identifier. The first device sharing record contains the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier.
[0021] In this implementation, if the target public identifier of the shared object is bound to the second account identifier, the smart home server directly associates the shared object with the smart home device to be shared, generates and saves the first device sharing record. The first device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier and the second account identifier. Even if the sharing information is lost, the second electronic device of the shared object can still obtain the permission to share the smart home device by logging into the smart home application.
[0022] In another possible implementation, the sharing request information is also used to instruct the smart home server to generate a second device sharing record when it does not find the second account identifier corresponding to the target public identifier. The second device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0023] In this implementation, when the smart home server does not find a second account identifier corresponding to the target public identifier, it generates a second device sharing record. The second device sharing record includes a message tracking identifier, a device identifier of the smart home device, a first account identifier, and a target public identifier. This allows the smart home server to authenticate the identity of the shared object based on the stored device sharing record, even if the target public identifier and the second account identifier of the shared object are not bound together.
[0024] Secondly, embodiments of this application provide a sharing authorization method for use in a smart home server, the method comprising:
[0025] When a sharing request is received from the first electronic device, a device sharing record is generated. The device sharing record is used to indicate that the object to be shared has the permission to share the smart home device to be shared.
[0026] A message tracking identifier is returned to the first electronic device, which is used to uniquely identify the sharing record of the device.
[0027] In one possible implementation, the sharing request information includes a first account identifier, a target public identifier, and a device identifier of the smart home device. The first account identifier is the account identifier of the sharing object in the smart home application, and the target public identifier is the account identifier of the shared object in the social application generated for the smart home application.
[0028] In another possible implementation, the generating device shares records, including:
[0029] Based on the target public identifier and the preset binding relationship, query the second account identifier corresponding to the target public identifier. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application.
[0030] The device sharing record is generated based on the query results.
[0031] In another possible implementation, generating the device sharing record based on the query results includes:
[0032] When the second account identifier corresponding to the target public identifier is found, a first device sharing record is generated. The first device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier.
[0033] In another possible implementation, generating the device sharing record based on the query results includes:
[0034] When no second account identifier corresponding to the target public identifier is found, a second device sharing record is generated. The second device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0035] In another possible implementation, after returning the message tracking identifier to the first electronic device, the method further includes:
[0036] Receive authentication request information sent by the second electronic device, wherein the authentication request information includes the message tracking identifier;
[0037] Retrieve the device sharing record corresponding to the message tracking identifier;
[0038] When the device sharing record indicates that the shared object has permission to share the smart home device, a response success message is sent to the second electronic device, the response success message being used to indicate that the sharing of the smart home device was successful.
[0039] In this implementation, after the smart home server receives the authentication request information carrying the message tracking identifier sent by the second electronic device, it obtains the device sharing record corresponding to the message tracking identifier, and authenticates the identity of the shared object based on the device sharing record. If it is identified that the shared object has the permission to share smart home devices, it sends a response success message to the second electronic device. Even if the sharing authorization information is leaked, there will be no risk of sharing errors, further ensuring the effectiveness of the device sharing authorization method.
[0040] In another possible implementation, the device sharing record includes a second account identifier; the step of sending a response success message to the second electronic device when the device sharing record indicates that the shared object has permission to share the smart home device includes:
[0041] When the second account identifier in the device sharing record is the same as the account identifier of the shared object in the smart home application, the response success information is sent to the second electronic device.
[0042] In this implementation, the target public identifier of the shared object is bound to the second account identifier. When the smart home server determines that the second account identifier in the device sharing record is the same as the account identifier of the shared object in the smart home application, it confirms that the identity authentication of the shared object is successful and sends a response success message to the second electronic device, which further ensures the credibility and security of the device sharing authorization method.
[0043] In another possible implementation, the device sharing record includes a target public identifier; the method further includes:
[0044] Obtain the public identifier of the shared object from the social server;
[0045] Generate a binding relationship between the public identifier of the shared object and the second account identifier;
[0046] When the device sharing record indicates that the shared object has permission to share the smart home device, a response success message is sent to the second electronic device, including:
[0047] When the target public identifier in the device sharing record is the same as the public identifier of the shared object, the response success information is sent to the second electronic device.
[0048] In this implementation, the target public identifier of the shared object and the second account identifier are not bound together. After receiving the authentication request information carrying the message tracking identifier from the second electronic device, the smart home server obtains the public identifier of the shared object from the social server and generates a binding relationship between the public identifier of the shared object and the second account identifier. Thus, it binds the current second account identifier. After successful binding, it obtains the device sharing record corresponding to the message tracking identifier. When it is determined that the target public identifier in the device sharing record is the same as the public identifier of the shared object, it is determined that the identity authentication of the shared object is successful, and a response success message is sent to the second electronic device, further ensuring the credibility and security of the device sharing authorization method.
[0049] Thirdly, embodiments of this application provide a sharing authorization device for use in a first electronic device, the device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to:
[0050] When a device sharing signal is received from the smart home application, a contact list in the social application is displayed. The device sharing signal is a trigger signal that acts on the device identifier of the smart home device to be shared. The contact list includes at least one object to be shared with.
[0051] When a selection signal is received applied to the object to be shared, a sharing request message is sent to the smart home server. The sharing request message is used to instruct the smart home server to generate a device sharing record and return a message tracking identifier. The device sharing record is used to indicate that the object to be shared has the permission to share the smart home device. The message tracking identifier is used to uniquely identify the device sharing record.
[0052] The social application is invoked to send sharing authorization information to the second electronic device of the recipient, the sharing authorization information including the message tracking identifier.
[0053] In one possible implementation, the processor is further configured to:
[0054] When a selection signal is received applied to the shared object, the target public identifier of the shared object is obtained. The target public identifier is the account identifier of the shared object in the social application generated for the smart home application.
[0055] The sharing request information is sent to the smart home server. The sharing request information includes a first account identifier, the target public identifier, and the device identifier of the smart home device. The first account identifier is the account identifier of the sharing object in the smart home application.
[0056] In another possible implementation, the processor is further configured as follows:
[0057] When a selection signal is received that is applied to the object to be shared, a pre-share request information is sent to the social server. The pre-share request information is used to instruct the social server to generate and return the target public identifier of the object to be shared.
[0058] Receive the target public identifier returned by the social server.
[0059] In another possible implementation, the sharing request information is further used to instruct the smart home server to query a second account identifier corresponding to the target public identifier based on the target public identifier and a preset binding relationship. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application. The device sharing record is generated based on the query result.
[0060] In another possible implementation, the sharing request information is also used to instruct the smart home server to generate a first device sharing record when it finds the second account identifier corresponding to the target public identifier. The first device sharing record contains the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier.
[0061] In another possible implementation, the sharing request information is also used to instruct the smart home server to generate a second device sharing record when it does not find the second account identifier corresponding to the target public identifier. The second device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0062] Fourthly, embodiments of this application provide a sharing authorization device for use in a smart home server, the device comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to:
[0063] When a sharing request is received from the first electronic device, a device sharing record is generated. The device sharing record is used to indicate that the object to be shared has the permission to share the smart home device to be shared.
[0064] A message tracking identifier is returned to the first electronic device, which is used to uniquely identify the sharing record of the device.
[0065] In one possible implementation, the sharing request information includes a first account identifier, a target public identifier, and a device identifier of the smart home device. The first account identifier is the account identifier of the sharing object in the smart home application, and the target public identifier is the account identifier of the shared object in the social application generated for the smart home application.
[0066] In another possible implementation, the processor is further configured as follows:
[0067] Based on the target public identifier and the preset binding relationship, query the second account identifier corresponding to the target public identifier. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application.
[0068] The device sharing record is generated based on the query results.
[0069] In another possible implementation, the processor is further configured as follows:
[0070] When the second account identifier corresponding to the target public identifier is found, a first device sharing record is generated. The first device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier.
[0071] In another possible implementation, the processor is further configured as follows:
[0072] When no second account identifier corresponding to the target public identifier is found, a second device sharing record is generated. The second device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0073] In another possible implementation, the processor is further configured as follows:
[0074] Receive authentication request information sent by the second electronic device, wherein the authentication request information includes the message tracking identifier;
[0075] Retrieve the device sharing record corresponding to the message tracking identifier;
[0076] When the device sharing record indicates that the shared object has permission to share the smart home device, a response success message is sent to the second electronic device, the response success message being used to indicate that the sharing of the smart home device was successful.
[0077] In another possible implementation, the device sharing record includes a second account identifier; the processor is further configured to:
[0078] When the second account identifier in the device sharing record is the same as the account identifier of the shared object in the smart home application, the response success information is sent to the second electronic device.
[0079] In another possible implementation, the device sharing record includes a target public identifier; the processor is further configured to:
[0080] Obtain the public identifier of the shared object from the social server;
[0081] Generate a binding relationship between the public identifier of the shared object and the second account identifier;
[0082] When the target public identifier in the device sharing record is the same as the public identifier of the shared object, the response success information is sent to the second electronic device.
[0083] Fifthly, embodiments of this application provide a non-volatile computer-readable storage medium storing computer program instructions thereon, which, when executed by a processor, implement the method provided by the first aspect or any possible implementation of the first aspect.
[0084] In a sixth aspect, embodiments of this application provide a non-volatile computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the method provided by the second aspect or any possible implementation thereof.
[0085] In a seventh aspect, embodiments of this application provide a sharing authorization device, the device comprising at least one unit, the at least one unit being used to implement the method provided by the first aspect or any possible implementation of the first aspect.
[0086] Eighthly, embodiments of this application provide a sharing authorization device, the device comprising at least one unit, the at least one unit being used to implement the method provided by the second aspect or any possible implementation of the second aspect.
[0087] Ninthly, embodiments of this application provide a computer program product including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in an electronic device, a processor in the electronic device executes the method provided by the first aspect or any possible implementation thereof.
[0088] In a tenth aspect, embodiments of this application provide a computer program product including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in an electronic device, a processor in the electronic device executes the method provided by the second aspect or any possible implementation thereof.
[0089] Eleventhly, embodiments of this application provide a sharing authorization method for a smart home device sharing system, the smart home device sharing system including a first electronic device, a second electronic device, a smart home device to be shared, and a smart home server; the method includes:
[0090] When the first electronic device receives a device sharing signal from the smart home application, it displays a contact list from the social application. The device sharing signal is a trigger signal that acts on the device identifier of the smart home device to be shared. The contact list includes at least one object to be shared with.
[0091] When the first electronic device receives a selection signal applied to the object to be shared, it sends a sharing request to the smart home server.
[0092] When the smart home server receives the sharing request information sent by the first electronic device, it generates a device sharing record, which is used to indicate that the object to be shared has the permission to share the smart home device to be shared.
[0093] The smart home server returns a message tracking identifier to the first electronic device, which is used to uniquely identify the sharing record of the device.
[0094] The first electronic device invokes the social application to send sharing authorization information to the second electronic device of the recipient, the sharing authorization information including the message tracking identifier.
[0095] In a twelfth aspect, embodiments of this application provide a smart home device sharing system, the smart home device sharing system including a first electronic device, a second electronic device, a smart home device to be shared, and a smart home server;
[0096] The first electronic device is configured to display a contact list in a social application when it receives a device sharing signal from a smart home application, wherein the device sharing signal is a trigger signal acting on the device identifier of the smart home device to be shared, and the contact list includes at least one object to be shared with; and when it receives a selection signal acting on the object to be shared with, it sends a sharing request to the smart home server.
[0097] The smart home server is configured to generate a device sharing record when it receives the sharing request information sent by the first electronic device. The device sharing record is used to indicate that the object to be shared has the permission to share the smart home device to be shared. The server also returns a message tracking identifier to the first electronic device. The message tracking identifier is used to uniquely identify the device sharing record.
[0098] The first electronic device is further configured to invoke the social application to send sharing authorization information to the second electronic device of the shared object, wherein the sharing authorization information includes the message tracking identifier. Attached Figure Description
[0099] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this application together with the specification and serve to explain the principles of this application.
[0100] Figure 1 A schematic diagram of the structure of a smart home device sharing system provided in an exemplary embodiment of this application is shown.
[0101] Figure 2 A schematic diagram of the structure of a first electronic device provided in an exemplary embodiment of this application is shown.
[0102] Figure 3 A software structure block diagram of a first electronic device provided in an exemplary embodiment of this application is shown.
[0103] Figure 4 A flowchart illustrating a sharing authorization method provided in an exemplary embodiment of this application is shown.
[0104] Figure 5 A schematic diagram of the interface involved in the sharing authorization method provided by an exemplary embodiment of this application is shown.
[0105] Figure 6 A schematic diagram of the interface involved in the sharing authorization method provided by another exemplary embodiment of this application is shown.
[0106] Figure 7 A schematic diagram of the interface involved in the sharing authorization method provided by another exemplary embodiment of this application is shown.
[0107] Figure 8 A flowchart of a sharing authorization method provided by another exemplary embodiment of this application is shown.
[0108] Figure 9 A flowchart of a sharing authorization method provided by another exemplary embodiment of this application is shown.
[0109] Figure 10 A flowchart of a sharing authorization method provided by another exemplary embodiment of this application is shown.
[0110] Figure 11 A block diagram of a sharing licensing apparatus provided in an exemplary embodiment of this application is shown.
[0111] Figure 12 A block diagram of a sharing licensing apparatus provided in another exemplary embodiment of this application is shown. Detailed Implementation
[0112] Various exemplary embodiments, features, and aspects of this application will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.
[0113] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.
[0114] Furthermore, to better illustrate this application, numerous specific details are provided in the following detailed embodiments. Those skilled in the art should understand that this application can be implemented without certain specific details. In some instances, methods, means, components, and circuits well-known to those skilled in the art have not been described in detail in order to highlight the main points of this application.
[0115] First, the application scenarios involved in this application will be introduced.
[0116] Please refer to Figure 1 This illustration shows a schematic diagram of a smart home device sharing system provided in an exemplary embodiment of this application. The smart home device sharing system includes a first electronic device 11, a second electronic device 12, a router 13, smart home devices 14, and a smart home server 15. The first electronic device 11 is connected to the smart home devices 14. The smart home devices 14 include one or more smart home devices.
[0117] The first electronic device 11 can communicate with the router 13 and connect to the smart home server 15 through the router 13. The smart home device 14 can also connect to the smart home server 15 through the router 13. The first electronic device 11 can send control commands to the smart home device 14 through the smart home server 15.
[0118] The first electronic device 11 is equipped with an application for controlling the smart home device 14, which is referred to as a smart home application in this embodiment. The smart home server 15 may be an application server corresponding to the smart home application.
[0119] The first electronic device 11 is also equipped with a social application. The smart home device sharing system also includes a social server (not shown in the figure), which can be the application server corresponding to the social application. For example, if the social application is an instant messaging application, the social server can be the instant messaging server corresponding to that instant messaging application.
[0120] The first electronic device 11 can connect to the second electronic device 12 and send information about the smart home device 14 to the second electronic device 12, enabling the second electronic device 12 to send control commands to the smart home device 14 via the router 13. The first electronic device 11 can connect to the second electronic device 12 via a mobile network, or via short-range wireless communication methods such as Bluetooth, WLAN direct connection, or near-field communication (NFC).
[0121] The first electronic device 11 and the second electronic device 12 involved in the embodiments of this application can be mobile phones, tablet computers, laptops, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, virtual reality devices, etc. The embodiments of this application do not limit them in this way.
[0122] In this embodiment of the application, the user using the first electronic device 11 is referred to as the sharing object, and the user using the second electronic device 12 is referred to as the shared object.
[0123] The smart home devices 14 involved in the embodiments of this application may be smart speakers, robot vacuum cleaners, smart plugs, smart lights, smart body fat scales, smart desk lamps, air purifiers, smart refrigerators, smart air conditioners, smart washing machines, smart water heaters, smart microwave ovens, smart rice cookers, smart curtains, smart fans, smart TVs, smart set-top boxes, etc. The embodiments of this application do not limit this to any particular type.
[0124] Next, we will introduce an exemplary first electronic device 11 provided in the embodiments of this application. Figure 2 A schematic diagram of the structure of a first electronic device 11 provided in an exemplary embodiment of this application is shown.
[0125] The first electronic device 11 may include a processor 210, an external memory interface 220, an internal memory 221, a 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 251, a wireless communication module 252, 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 SIM card interface 295, etc. The sensor module 280 may include a gyroscope sensor 280A, an accelerometer sensor 280B, a proximity sensor 280G, a fingerprint sensor 280H, and a touch sensor 280K (of course, the first electronic device 11 may also include other sensors, such as a temperature sensor, a pressure sensor, a distance sensor, a magnetic sensor, an ambient light sensor, a barometric pressure sensor, a bone conduction sensor, etc., which are not shown in the figure).
[0126] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the first electronic device 11. In other embodiments of this application, the first electronic device 11 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.
[0127] Processor 210 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may serve as the central nervous system and command center of the first electronic device 11. The controller can generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0128] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0129] The processor 210 can run the sharing licensing method provided in the embodiments of this application. The processor 210 may include different devices. For example, when integrating a CPU and a GPU, the CPU and GPU can cooperate to execute the sharing licensing method provided in the embodiments of this application. For example, in the sharing licensing method, some algorithms are executed by the CPU and other algorithms are executed by the GPU to obtain faster processing efficiency.
[0130] Display screen 294 is used to display images, videos, etc. Display screen 294 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the first electronic device 11 may include one or N displays screens 294, where N is a positive integer greater than 1. Display screen 294 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, display screen 294 can display photos, videos, web pages, or documents, etc. As another example, display screen 294 can display a graphical user interface. The graphical user interface (GUI) includes a status bar, a hideable navigation bar, a time and weather widget, and application icons, such as browser icons. The status bar includes the carrier name (e.g., China Mobile), mobile network (e.g., 4G), time, and remaining battery power. The navigation bar includes a back button icon, a home button icon, and a forward button icon. Furthermore, it is understood that in some embodiments, the status bar may also include Bluetooth icons, Wi-Fi icons, and external device icons. It is also understood that in other embodiments, the GUI may include a Dock bar, which may include frequently used application icons. When the processor 210 detects a touch event from a user's finger (or stylus, etc.) on an application icon, in response to the touch event, it opens the user interface of the application corresponding to that application icon and displays the application's user interface on the display 294.
[0131] In this embodiment of the application, the display screen 294 can be an integral flexible display screen, or it can be a splicing display screen composed of two rigid screens and a flexible screen located between the two rigid screens.
[0132] When the processor 210 runs the sharing authorization method provided in the embodiments of this application, the first electronic device 11 can establish a connection with other devices through antenna 1, antenna 2 or USB interface, and transmit data and control the display screen 294 to display the corresponding user interface according to the sharing authorization method provided in the embodiments of this application.
[0133] Camera 293 (either a front-facing camera or a rear-facing camera, or a single camera that can function as both) is used to capture still images or videos. Typically, camera 293 may include a photosensitive element such as a lens assembly and an image sensor. The lens assembly includes multiple lenses (convex or concave lenses) for collecting light signals reflected from the object being photographed and transmitting these signals to the image sensor. The image sensor then generates a raw image of the object being photographed based on the light signals.
[0134] The internal memory 221 can be used to store computer executable program code, which includes instructions. The processor 210 executes various functional applications and data processing of the first electronic device 11 by running the instructions stored in the internal memory 221. The internal memory 221 may include a program storage area and a data storage area. The program storage area can store the operating system, application code (such as camera applications, WeChat applications, etc.), etc. The data storage area can store data created during the use of the first electronic device 11 (such as images and videos captured by the camera application, etc.).
[0135] The internal memory 221 may also store one or more computer programs 1310 corresponding to the sharing authorization method provided in the embodiments of this application. The one or more computer programs 1304 are stored in the memory 221 and configured to be executed by the one or more processors 210. The one or more computer programs 1310 include instructions that can be used to perform various steps executed by the first electronic device 11 in the embodiments of this application. The computer program 1310 may include a display module 31, a first sending module 32 and a second sending module 33. The display module 31 is used to display a contact list in a social application when a device sharing signal is received from a smart home application. The device sharing signal is a trigger signal acting on the device identifier of the smart home device to be shared. The contact list includes at least one shared object. The first sending module 32 is used to send a sharing request message to a smart home server when a selection signal acting on the shared object is received. The sharing request message is used to instruct the smart home server to generate a device sharing record and return a message tracking identifier. The device sharing record is used to indicate that the shared object has the permission to share smart home devices. The message tracking identifier is used to uniquely identify the device sharing record. The second sending module 33 is used to call the social application to send sharing authorization information to the second electronic device of the shared object. The sharing authorization information includes the message tracking identifier.
[0136] In addition, the internal memory 221 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0137] Of course, the code for the sharing authorization method provided in this embodiment can also be stored in external memory. In this case, the processor 210 can run the code for the sharing authorization method stored in external memory through the external memory interface 220.
[0138] The functions of sensor module 280 are described below.
[0139] The gyroscope sensor 280A can be used to determine the motion attitude of the first electronic device 11. In some embodiments, the gyroscope sensor 280A can determine the angular velocity of the first electronic device 11 about three axes (i.e., the x, y, and z axes). That is, the gyroscope sensor 280A can be used to detect the current motion state of the first electronic device 11, such as whether it is jittering or stationary.
[0140] When the display screen in this embodiment is a foldable screen, the gyroscope sensor 280A can be used to detect folding or unfolding operations performed on the display screen 294. The gyroscope sensor 280A can report the detected folding or unfolding operations as events to the processor 210 to determine the folding or unfolding state of the display screen 294.
[0141] Accelerometer 280B can detect the magnitude of acceleration of the first electronic device 11 in various directions (generally three axes). That is, gyroscope 280A can be used to detect the current motion state of the first electronic device 11, such as whether it is shaking or stationary. When the display screen in this embodiment is a foldable screen, accelerometer 280B can be used to detect folding or unfolding operations acting on the display screen 294. Accelerometer 280B can report the detected folding or unfolding operations as events to processor 210 to determine the folding or unfolding state of the display screen 294.
[0142] The proximity sensor 280G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The mobile phone emits infrared light outward through the LED. The mobile phone uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone. When insufficient reflected light is detected, the mobile phone can determine that there is no object near the mobile phone. When the display screen in this embodiment is a foldable screen, the proximity sensor 280G may be disposed on the first screen of the foldable display screen 294. The proximity sensor 280G may detect the size of the folding angle or unfolding angle between the first screen and the second screen based on the optical path difference of the infrared signal.
[0143] The gyroscope sensor 280A (or accelerometer 280B) can send the detected motion state information (such as angular velocity) to the processor 210. The processor 210 determines whether the current state is handheld or tripod based on the motion state information (for example, if the angular velocity is not 0, it means that the first electronic device 11 is in handheld state).
[0144] The fingerprint sensor 280H is used to collect fingerprints. The first electronic device 11 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.
[0145] Touch sensor 280K, also known as a "touch panel," can be located on display screen 294. The touch sensor 280K and display screen 294 together form a touchscreen, also known as a "touch screen." Touch sensor 280K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 294. In other embodiments, touch sensor 280K may also be located on the surface of the first electronic device 11, in a different position than display screen 294.
[0146] For example, the display screen 294 of the first electronic device 11 displays a main interface, which includes icons for multiple applications (such as a camera application, a WeChat application, etc.). The user taps the camera application icon on the main interface using the touch sensor 280K, triggering the processor 210 to launch the camera application and open the camera 293. The display screen 294 then displays the camera application's interface, such as a viewfinder.
[0147] The wireless communication function of the first electronic device 11 can be implemented through antenna 1, antenna 2, mobile communication module 251, wireless communication module 252, modem processor, and baseband processor.
[0148] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first electronic device 11 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.
[0149] The mobile communication module 251 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the first electronic device 11. The mobile communication module 251 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 251 can receive electromagnetic waves via the antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to the modem processor for demodulation. The mobile communication module 251 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 251 may be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 251 and at least some modules of the processor 210 may be housed in the same device. In this embodiment, the mobile communication module 251 can also be used for information interaction with other devices.
[0150] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 270A, receiver 270B, etc.) or displays images or videos through the display screen 294. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and may be housed in the same device as the mobile communication module 251 or other functional modules.
[0151] The wireless communication module 252 can provide solutions for wireless communication applications applied to the first electronic device 11, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 252 can be one or more devices integrating at least one communication processing module. The wireless communication module 252 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 210. The wireless communication module 252 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. In this embodiment, the wireless communication module 252 is used to transmit data with other devices under the control of processor 210.
[0152] In addition, the first electronic device 11 can implement audio functions such as music playback and recording through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, and an application processor. The first electronic device 11 can receive input from buttons 290, generating key signal inputs related to user settings and function control. The first electronic device 11 can use a motor 291 to generate vibration alerts (such as vibration alerts for incoming calls). The indicator 292 in the first electronic device 11 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. The SIM card interface 295 in the first electronic device 11 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 295 to achieve contact and separation with the first electronic device 11.
[0153] It should be understood that, in practical applications, the first electronic device 11 may include more than Figure 2 The number of more or fewer components shown is not limited in the embodiments of this application. The illustrated first electronic device 11 is merely an example, and the first electronic device 11 may have more or fewer components than shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in the figure may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0154] The structure of the second electronic device 12 is similar to that of the first electronic device 11, and can be referred to as follows. Figure 2 The relevant descriptions will not be repeated here.
[0155] The software system of the first electronic device 11 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of the first electronic device 11.
[0156] Figure 3 A software structure block diagram of a first electronic device 11 provided in an exemplary embodiment of this application is shown.
[0157] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
[0158] The application layer can include a series of application packages.
[0159] like Figure 3 As shown, the application package may include applications such as phone, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.
[0160] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0161] like Figure 3 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0162] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.
[0163] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.
[0164] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0165] The phone manager is used to provide communication functions for the first electronic device 11. For example, it manages call status (including connection, hang-up, etc.).
[0166] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0167] The notification manager allows applications to display notifications in the status bar. These notifications can be used to convey informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the system's top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating the first electronic device, or flashing indicator lights.
[0168] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.
[0169] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.
[0170] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.
[0171] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.
[0172] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.
[0173] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.
[0174] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0175] A 2D graphics engine is a graphics engine for 2D drawing.
[0176] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0177] The sharing and licensing method provided in this application will now be described using several exemplary embodiments.
[0178] Please refer to Figure 4 It illustrates a flowchart of a sharing authorization method provided in an exemplary embodiment of this application, which is used in this embodiment for... Figure 1 The following example illustrates a smart home device sharing system. The method includes the following steps.
[0179] Step 401: When the first electronic device receives a device sharing signal from the smart home application, it displays a contact list from the social application. The device sharing signal is a trigger signal that acts on the device identifier of the smart home device to be shared. The contact list includes at least one object to be shared with.
[0180] Optionally, the first electronic device runs a smart home application in the foreground. When it receives a trigger signal applied to the sharing device control, it displays the device identifiers corresponding to each of the multiple smart home devices. When it receives a trigger signal applied to the device identifier of the smart home device to be shared (i.e., a device sharing signal), it displays the contact list in the social application.
[0181] Optionally, the device identifier of the smart home device to be shared is used to uniquely identify the smart home device to be shared among multiple smart home devices. For example, the device identifier is a device icon.
[0182] Optionally, the device sharing signal is a user action signal used to trigger the display of a contact list in a social application. Illustratively, the first action signal includes any one or more combinations of a tap action signal, a swipe action signal, a press action signal, and a long press action signal.
[0183] In other possible implementations, device sharing signals can also be implemented in the form of voice. For example, the first electronic device receives a voice signal input by the user, parses the voice signal to obtain the voice content, and when there are keywords in the voice content that match the preset information corresponding to the device identifier of the smart home device to be shared, the terminal determines that the device identifier of the smart home device has been triggered, that is, the first electronic device receives a trigger signal acting on the device identifier of the smart home device.
[0184] Optionally, after the first electronic device receives a trigger signal (i.e., a device sharing signal) applied to the device identifier of the smart home device to be shared, it displays at least one sharing path control when it receives a trigger signal from a confirmation control. The at least one sharing path control includes a first social control, which is a control that triggers the invocation of a social application for sharing. When a trigger signal is received applied to the first social control, a list of contacts in the social application is displayed.
[0185] The contact list includes at least one recipient. Optionally, the first electronic device logs into the social application via a first social account, which is a personal account created by the recipient on the social server corresponding to the social application. Each social account on the social server has its own contact list. Taking the contact list of the first social account as an example, the contact list of the first social account includes at least one social account identifier that is bound to the first social account. That is, the contact list includes at least one recipient displayed in the form of a social account identifier.
[0186] Step 402: When the first electronic device receives a selection signal applied to the object to be shared, it sends a sharing request message to the smart home server.
[0187] The sharing request information is used to instruct the smart home server to generate a device sharing record and return a message tracking identifier. The device sharing record is used to indicate that the shared object has the permission to share smart home devices, and the message tracking identifier is used to uniquely identify the device sharing record.
[0188] Optionally, the selection signal acts on a shared object in the contact list, and is a user operation signal used to trigger the sending of a sharing request to the smart home server. Illustratively, the selection signal includes any one or more combinations of click, swipe, press, and long press operation signals. In other possible implementations, the device sharing signal can also be implemented via voice. Related descriptions can be found by analogy to the above description of device sharing signals, and will not be repeated here.
[0189] Optionally, when the first electronic device receives a selection signal applied to the object to be shared, it acquires the target public identifier of the object to be shared. The target public identifier is the account identifier of the object to be shared in the social application, generated for the smart home application. The first electronic device sends sharing request information to the smart home server. The sharing request information includes the first account identifier, the target public identifier, and the device identifier of the smart home device. The first account identifier is the account identifier of the object to be shared in the smart home application.
[0190] Optionally, when the first electronic device receives a selection signal applied to the object to be shared, it sends a pre-sharing request message to the social server, the pre-sharing request message being used to instruct the social server to generate and return a target public identifier of the object to be shared; and receives the target public identifier returned by the social server.
[0191] The sharing request information is also used to instruct the smart home server to query the second account identifier corresponding to the target public identifier based on the target public identifier and the preset binding relationship. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application. The device sharing record is generated based on the query results.
[0192] The sharing request information is also used to instruct the smart home server to generate a first device sharing record when it finds a second account identifier corresponding to the target public identifier. The first device sharing record includes a message tracking identifier, a device identifier of the smart home device, a first account identifier, and a second account identifier.
[0193] The sharing request information is also used to instruct the smart home server to generate a second device sharing record when no second account identifier corresponding to the target public identifier is found. The second device sharing record includes a message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0194] Step 403: When the smart home server receives the sharing request information sent by the first electronic device, it generates a device sharing record. The device sharing record is used to indicate that the object to be shared has the permission to share the smart home device to be shared.
[0195] The smart home server receives a sharing request from a first electronic device. This request includes a first account identifier, a target public identifier, and the smart home device's device identifier. Upon receiving the request, the server queries the second account identifier corresponding to the target public identifier based on the target public identifier and a pre-defined binding relationship. This binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application. Based on the query results, a device sharing record is generated and stored on the smart home server.
[0196] Optionally, the device sharing record includes a message tracking identifier, a device identifier for the smart home device, a first account identifier, and a second identifier, wherein the second identifier includes a second account identifier or a target public identifier.
[0197] Optionally, if there is a preset binding relationship between the target public identifier and the second account identifier, then the second identifier includes the second account identifier; if there is no preset binding relationship between the target public identifier and the second account identifier, then the second identifier includes the target public identifier.
[0198] Optionally, the device sharing record also includes a status identifier, which indicates whether a preset binding relationship exists between the target public identifier and the second account identifier. Illustratively, when the status identifier is the first parameter, it indicates that a preset binding relationship exists between the target public identifier and the second account identifier; when the status identifier is the second parameter, it indicates that a preset binding relationship does not exist between the target public identifier and the second account identifier. For example, the first parameter is "NEED_ACCEPT" and the second parameter is "NEED_BIND".
[0199] In one possible implementation, when the smart home server finds the second account identifier corresponding to the target public identifier, it indicates that there is a preset binding relationship between the target public identifier and the second account identifier. The smart home server then generates a first device sharing record, which includes a message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier.
[0200] In another possible implementation, when the smart home server does not find a second account identifier corresponding to the target public identifier, it means that there is no preset binding relationship between the target public identifier and the second account identifier. The smart home server generates a second device sharing record, which includes a message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0201] It should be noted that the aforementioned target public identifier, first account identifier, and second account identifier will be described in detail.
[0202] The first account identifier is the identifier of the smart home system account of the sharing object. Specifically, the first account identifier is the account identifier of the sharing object within the smart home application; that is, the first account identifier is the personal account created by the sharing object for the smart home application on the smart home server corresponding to the smart home application.
[0203] The second account identifier is the identifier of the smart home system account of the shared object. Specifically, the second account identifier is the account identifier of the shared object within the smart home application; that is, the second account identifier is the personal account created by the shared object for the smart home application on the smart home server corresponding to the smart home application.
[0204] The target public identifier is an account identifier generated by the social server specifically for the smart home application within the social application, representing the shared object's account within the social application. In other words, the target public identifier is neither the shared object's social account identifier within the social application, nor a secondary account identifier within the smart home application; rather, it is the personal account created by the shared object for the smart home application on the social server corresponding to the social application.
[0205] The smart home server stores the generated device sharing records.
[0206] Step 404: The smart home server returns a message tracking identifier to the first electronic device. The message tracking identifier is used to uniquely identify the device sharing record.
[0207] The smart home server returns a message tracking identifier corresponding to the device sharing record to the first electronic device.
[0208] Step 405: The first electronic device invokes a social application to send sharing authorization information to the second electronic device of the recipient. The sharing authorization information includes a message tracking identifier.
[0209] The first electronic device receives a message tracking identifier returned by the smart home server, generates sharing authorization information including the message tracking identifier, and invokes a social application to send the sharing authorization information to the second electronic device of the recipient. The sharing authorization information indicates that permission is granted to the recipient to share the smart home device.
[0210] In an illustrative example, such as Figure 5 As shown, taking user M's mobile phone as an example, the smart home application runs in the foreground on user M's mobile phone. When a click signal is received on the sharing device control 51, the device identifiers corresponding to multiple smart home devices are displayed. After receiving a selection signal on the device identifier of the smart plug, and receiving a click signal on the confirmation control 52, three sharing path controls are displayed, including the first social control 53 that triggers the sharing through the social application "AA Application". When a click signal is received on the first social control 53, the contact list 54 in the social application "AA Application" is displayed. When a click signal is received on the recipient "Xiao Wang", a sharing request is sent to the smart home server. After the mobile phone receives the message tracking identifier returned by the smart home server, it calls the social application "AA Application" to send the sharing authorization information, including the message tracking identifier, to the mobile phone of the recipient "Xiao Wang".
[0211] Optionally, the second electronic device receives and displays sharing authorization information in a social application, and sends authentication request information to the smart home server when it receives a trigger signal that acts on the sharing authorization information. The authentication request information includes a message tracking identifier.
[0212] The authentication request information is used to instruct the smart home server to authenticate the identity of the object being shared.
[0213] The social application supports multimedia messaging, and its account is mutually linked to the smart home application, allowing the second electronic device to directly control smart home devices via the sharing authorization information in the social application. Optionally, after receiving a success response from the smart home server, the second electronic device sends control commands to the smart home devices through the social application.
[0214] Optionally, the second electronic device receives and displays sharing authorization information in the social application. When it receives a trigger signal acting on the sharing authorization information, it jumps to display the sharing prompt interface of the smart home application. The sharing prompt interface includes sharing prompt information, which is used to instruct the recipient to obtain permission to share the smart home device.
[0215] In an illustrative example, based on Figure 5 Examples provided, such as Figure 6 As shown, the mobile phone of the recipient "Xiao Wang" receives and displays sharing authorization information 61 in the social application "AA Application". When a click signal is received that acts on the sharing authorization information 61, it jumps to the smart home application and displays sharing prompt information 62 in the sharing prompt interface of the smart home application. When a click signal is received that acts on the sharing prompt information 62, it sends authentication request information to the smart home server.
[0216] Optionally, after receiving the authentication request information sent by the second electronic device, the smart home server obtains the device sharing record corresponding to the message tracking identifier; when the device sharing record indicates that the shared object has the permission to share smart home devices, the smart home server sends a response success message to the second electronic device, and the response success message is used to indicate that the sharing of smart home devices is successful.
[0217] Optionally, when the device sharing record indicates that the second electronic device does not have permission to share smart home devices, the smart home server sends a response failure message to the second electronic device, which is used to indicate that the sharing of smart home devices has failed.
[0218] When the device sharing record indicates that the shared object has permission to share smart home devices, the smart home server sends a response success message to the second electronic device, including but not limited to the following two possible implementations:
[0219] In one possible implementation, the device sharing record includes a second account identifier; when the second account identifier in the device sharing record is the same as the account identifier of the second electronic device in the smart home application, the smart home server sends a response success message to the second electronic device.
[0220] Optionally, when the second account identifier in the device sharing record is different from the account identifier of the second electronic device in the smart home application, the smart home server sends a response failure message to the second electronic device.
[0221] In another possible implementation, the device sharing record includes a target public identifier; the public identifier of the object to be shared is obtained from the social server; a binding relationship is generated between the public identifier of the object to be shared and the second account identifier; when the target public identifier in the device sharing record is the same as the public identifier of the object to be shared, the smart home server sends a response success message to the second electronic device.
[0222] Optionally, when the target public identifier in the device sharing record is different from the public identifier of the shared object, the smart home server sends a response failure message to the second electronic device.
[0223] Optionally, after receiving a success response from the smart home server, the second electronic device sends a control command to the smart home device. For example, the second electronic device sends the control command to the smart home device via a smart home application or a social application.
[0224] Optionally, after the first electronic device sends sharing authorization information to the second electronic device of the recipient via a social application, when the sharing prompt interface of the smart home application on the second electronic device is in the foreground, the second electronic device displays a sharing prompt message on the sharing prompt interface. This message instructs the recipient to obtain permission to share the smart home device. Upon receiving the confirmation signal corresponding to the sharing prompt message, the second electronic device sends a control command to the smart home device.
[0225] In an illustrative example, based on Figure 5 Examples provided, such as Figure 7 As shown, after logging into the smart home application, the mobile phone of the recipient "Xiao Wang" displays the sharing prompt interface of the smart home application. The sharing prompt interface includes sharing prompt information 71. When a click signal is received that acts on the sharing prompt information 71, an authentication request information is sent to the smart home server.
[0226] In summary, this embodiment of the application displays a contact list in a social application when the first electronic device receives a device sharing signal from a smart home application. When it receives a selection signal applied to the target device, it sends a sharing request to the smart home server. The smart home server generates a device sharing record and returns a message tracking identifier, thereby enabling the first electronic device to send sharing authorization information to the target device's second electronic device via the social application. On one hand, the first electronic device sends sharing authorization information, including the message tracking identifier, to the second electronic device via the social application, eliminating the need for the second electronic device to install a smart home application and reducing the steps involved in sharing smart home devices. On the other hand, since the smart home server carries the information of the target device, namely the device sharing record, which indicates that the target device has the permission to share smart home devices, and the sharing authorization information does not use risky sharing codes but uses secure message tracking identifiers, only the second electronic device can obtain the permission to share smart home devices through authentication by the smart home server based on this sharing authorization information. Even if the sharing authorization information is leaked, there is no risk of sharing errors, ensuring the credibility and security of the device sharing authorization method.
[0227] It should be noted that in the sharing authorization method provided in this application embodiment, the target public identifier of the shared object and the second account identifier may or may not be bound together. The two possible implementation methods will be described below.
[0228] In one possible implementation, the target public identifier of the shared object is bound to the second account identifier, and the smart home server generates a device sharing record that includes the second account identifier.
[0229] Please refer to Figure 8 The first electronic device includes a first smart home application and a first social application, and the second electronic device includes a second smart home application and a second social application. The first smart home application and the second smart home application are the same type of smart home application, and the first social application and the second social application are the same type of social application. The terms "first" and "second" are used only to distinguish that they are running on different electronic devices. The sharing authorization method includes, but is not limited to, the following steps.
[0230] Step 801: The first smart home application receives the signal from the receiving device.
[0231] Step 802: The first smart home application sends a first request to the first social application.
[0232] Step 803: After receiving the first request, the first social application displays the contact list.
[0233] Step 804: The first social application receives a selection signal applied to the object to be shared with.
[0234] Step 805: The first social application obtains the target public identifier of the object to be shared with.
[0235] The first social application sends a pre-share request to the social server, which instructs the social server to generate and return the target public identifier of the object to be shared; and receives the target public identifier returned by the social server.
[0236] For example, the target public identifier of the object being shared is OpenId.
[0237] Step 806: The first social application sends the target public identifier of the shared object to the first smart home application.
[0238] Step 807: The first smart home application sends a sharing request to the smart home server. The sharing request includes the first account identifier, the target public identifier, and the device identifier of the smart home device.
[0239] Step 808: The smart home server queries the second account identifier corresponding to the target public identifier based on the target public identifier and the preset binding relationship.
[0240] Step 809: The smart home server generates a device sharing record, including a device sharing record message tracking identifier, a smart home device identifier, a first account identifier, and a second account identifier.
[0241] When the smart home server finds the second account identifier corresponding to the target public identifier, it generates a device sharing record. For example, the device sharing record includes: traceId = message tracking identifier, devId = smart home device identifier, ownerId = first account identifier, sharedUserId = second account identifier, and state = NEED_ACCEPT.
[0242] Step 810: The smart home server returns a message tracking identifier to the first smart home application.
[0243] Step 811: The first smart home application calls the first social application and sends the sharing authorization information to the second social application through the social server.
[0244] Step 812: When the second social application receives the trigger signal for sharing authorization information, it jumps to the second smart home application.
[0245] Step 813: The second smart home application sends authentication request information to the smart home server. The authentication request information includes a message tracking identifier.
[0246] Step 814: The smart home server obtains the device sharing record corresponding to the message tracking identifier and performs authentication based on the device sharing record.
[0247] Optionally, steps 809 to 810 above can be replaced by the following steps: The second smart home application displays a sharing prompt interface, which includes sharing prompt information indicating permission to share the smart home device. After receiving the confirmation signal corresponding to the sharing prompt information, the second smart home application sends a control command to the smart home device.
[0248] It should be noted that the relevant descriptions of each step in this embodiment can be found in the above embodiments, and will not be repeated here.
[0249] In another possible implementation, the target public identifier of the shared object is not bound to the second account identifier, and the smart home server generates a device sharing record that includes the target public identifier.
[0250] Please refer to Figure 9 The first electronic device includes a first smart home application and a first social application, and the second electronic device includes a second smart home application and a second social application. The first smart home application and the second smart home application are the same type of smart home application, and the first social application and the second social application are the same type of social application. The terms "first" and "second" are used only to distinguish that they are running on different electronic devices. The sharing authorization method includes, but is not limited to, the following steps.
[0251] Step 901: The first smart home application receives the signal from the receiving device.
[0252] Step 902: The first smart home application sends a first request to the first social application.
[0253] Step 903: After receiving the first request, the first social application displays the contact list.
[0254] Step 904: The first social application receives a selection signal applied to the object to be shared with.
[0255] Step 905: The first social application obtains the target public identifier of the object to be shared with.
[0256] The first social application sends a pre-share request to the social server, which instructs the social server to generate and return the target public identifier of the object to be shared; and receives the target public identifier returned by the social server.
[0257] Step 906: The first social application sends the target public identifier of the shared object to the first smart home application.
[0258] Step 907: The first smart home application sends a sharing request to the smart home server. The sharing request includes the first account identifier, the target public identifier, and the device identifier of the smart home device.
[0259] Step 908: The smart home server queries the second account identifier corresponding to the target public identifier based on the target public identifier and the preset binding relationship.
[0260] Step 909: The smart home server generates a device sharing record, including a device sharing record message tracking identifier, a smart home device identifier, a first account identifier, and a target public identifier.
[0261] When the smart home server cannot find a second account identifier corresponding to the target public identifier, it generates a device sharing record. For example, the device sharing record includes: traceId = message tracking identifier, devId = smart home device identifier, ownerId = first account identifier, sharedUserId = target public identifier, and state = NEED_BIND.
[0262] Step 910: The smart home server returns a message tracking identifier to the first smart home application.
[0263] Step 911: The first smart home application calls the first social application and sends the sharing authorization information to the second social application through the social server.
[0264] Step 912: When the second social application receives the trigger signal for sharing authorization information, it jumps to the second smart home application.
[0265] Step 913: The second smart home application sends an authentication request to the smart home server. The authentication request includes a message tracking identifier.
[0266] Step 914: The smart home server obtains the public identifier of the shared object from the social server.
[0267] Step 915: The smart home server generates a binding relationship between the public identifier of the shared object and the second account identifier.
[0268] After receiving the authentication request information, the smart home server guides the shared object to register and bind its own second account identifier and public identifier according to the binding conditions in the authentication request information.
[0269] Step 916: The smart home server obtains the device sharing records corresponding to the message tracking identifier.
[0270] After successful binding, the smart home server obtains the device sharing records corresponding to the message tracking identifier.
[0271] Step 917: When the target public identifier in the device sharing record is the same as the public identifier of the shared object, the smart home server sends a response success message to the second smart home application.
[0272] Optionally, after receiving a success response from the smart home server, the second smart home application sends control commands to the smart home devices.
[0273] It should be noted that the relevant descriptions of each step in this embodiment can be found in the above embodiments, and will not be repeated here.
[0274] In summary, this embodiment of the application obtains the target public identifier of the social media account of the object to be shared (i.e., the social media account for the smart home application) from the social media server through a pre-sharing request information using a first electronic device, and sends the sharing authorization information to the smart home server. When the target public identifier of the object to be shared is bound to a second account identifier, the smart home server directly associates the object to be shared with the smart home device to be shared, generating a first device sharing record. The first device sharing record includes a message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier. The second electronic device of the object to be shared can send control commands to the smart home device by triggering the sharing authorization information in the social media application or by directly opening the smart home application to view and confirm the acceptance of the sharing prompt information.
[0275] This application embodiment also generates a second device sharing record when the target public identifier of the shared object and the second account identifier are not bound together. The second device sharing record includes a message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier. The second electronic device of the shared object can trigger the sharing authorization information in the social application, jump to the smart home application to register or bind the second account identifier of the second electronic device (i.e., the existing smart home system account of the second electronic device), and reconfirm the consistency between the target public identifier at the time of binding and the public identifier of the shared object when binding the account, so as to avoid incorrect sharing.
[0276] This application embodiment also demonstrates that, during smart home server authentication, regardless of whether the target public identifier of the shared object is bound to the second account identifier, the smart home server can authenticate the identity of the shared object based on the stored device sharing records.
[0277] This application embodiment also employs a pre-sharing mechanism, where the smart home server pre-stores information about the object to be shared; and when the second electronic device needs to obtain device permissions, it strictly identifies whether the object on the second electronic device has the necessary permissions. Even if the sharing code is leaked, there is no risk of sharing errors, ensuring the credibility and security of the device sharing authorization method.
[0278] This application embodiment also uses a pre-sharing action to query whether there is a binding relationship between the target public identifier of the shared object and the second account identifier. If a binding relationship exists, the smart home server directly associates the shared object with the smart home device to be shared, generates and saves the first device sharing record. The first device sharing record includes a message tracking identifier, the device identifier of the smart home device, the first account identifier and the second account identifier. Even if the sharing information is lost, the second electronic device of the shared object can still obtain the permission to share the smart home device by logging into the smart home application.
[0279] Please refer to Figure 10 It illustrates a flowchart of a sharing authorization method provided in another exemplary embodiment of this application, which is used in this embodiment for... Figure 1 The method is illustrated using the first electronic device shown as an example. It includes the following steps.
[0280] Step 1001: When a device sharing signal is received from the smart home application, the contact list in the social application is displayed. The device sharing signal is a trigger signal that acts on the device identifier of the smart home device to be shared. The contact list includes at least one object to be shared with.
[0281] Step 1002: When a selection signal is received for the object to be shared, a sharing request message is sent to the smart home server. The sharing request message is used to instruct the smart home server to generate a device sharing record and return a message tracking identifier. The device sharing record is used to indicate that the object to be shared has the permission to share smart home devices, and the message tracking identifier is used to uniquely identify the device sharing record.
[0282] Step 1003: Invoke the social application to send the sharing authorization information to the second electronic device of the recipient. The sharing authorization information includes a message tracking identifier.
[0283] It should be noted that the relevant descriptions of each step in this embodiment can be found in the above embodiments, and will not be repeated here.
[0284] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0285] Please refer to Figure 11This diagram illustrates a block diagram of a sharing licensing apparatus provided in an exemplary embodiment of this application. The apparatus can be implemented as all or part of a first electronic device through software, hardware, or a combination of both. The apparatus may include a processing unit 1110 and a transmitting unit 1120.
[0286] The processing unit 1110 is configured to display a contact list in a social application when a device sharing signal is received from a smart home application. The device sharing signal is a trigger signal that acts on the device identifier of the smart home device to be shared. The contact list includes at least one object to be shared.
[0287] The sending unit 1120 is used to send a sharing request information to the smart home server when it receives a selection signal applied to the shared object. The sharing request information is used to instruct the smart home server to generate a device sharing record and return a message tracking identifier. The device sharing record is used to indicate that the shared object has the permission to share smart home devices. The message tracking identifier is used to uniquely identify the device sharing record.
[0288] The sending unit 1120 is also used to invoke a social application to send sharing authorization information to the second electronic device of the recipient, the sharing authorization information including a message tracking identifier.
[0289] In one possible implementation, the processing unit 1110 is further configured to, when receiving a selection signal applied to the shared object, obtain the target public identifier of the shared object, wherein the target public identifier is the account identifier of the shared object in the social application generated for the smart home application.
[0290] The sending unit 1120 is also used to send sharing request information to the smart home server. The sharing request information includes a first account identifier, a target public identifier, and a device identifier of the smart home device. The first account identifier is the account identifier of the sharing object in the smart home application.
[0291] In another possible implementation, the sending unit 1120 is also used to send pre-sharing request information to the social server when a selection signal acting on the object to be shared is received. The pre-sharing request information is used to instruct the social server to generate and return the target public identifier of the object to be shared.
[0292] The receiving unit is used to receive the target public identifier returned by the social server.
[0293] In another possible implementation, the sharing request information is also used to instruct the smart home server to query the second account identifier corresponding to the target public identifier based on the target public identifier and the preset binding relationship. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application. The device sharing record is generated based on the query results.
[0294] In another possible implementation, the sharing request information is also used to instruct the smart home server to generate a first device sharing record, a first device sharing record message tracking identifier, a smart home device device identifier, a first account identifier, and a second account identifier when it finds a second account identifier corresponding to the target public identifier.
[0295] In another possible implementation, the sharing request information is also used to instruct the smart home server to generate a second device sharing record when no second account identifier corresponding to the target public identifier is found. The second device sharing record includes a message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0296] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, 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. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0297] Please refer to Figure 12 This illustration shows a block diagram of a sharing and licensing apparatus provided in another exemplary embodiment of this application. The apparatus can be implemented as all or part of a smart home server through software, hardware, or a combination of both. The apparatus may include a processing unit 1210 and a sending unit 1220.
[0298] Processing unit 1210 is configured to generate a device sharing record when it receives a sharing request information sent by a first electronic device. The device sharing record is used to indicate that the object to be shared has the permission to share the smart home device to be shared.
[0299] The sending unit 1220 is used to return a message tracking identifier to the first electronic device. The message tracking identifier is used to uniquely identify the device sharing record.
[0300] In one possible implementation, the sharing request information includes a first account identifier, a target public identifier, and a device identifier for the smart home device. The first account identifier is the account identifier of the sharing object in the smart home application, and the target public identifier is the account identifier of the sharing object in the social application generated for the smart home application.
[0301] In another possible implementation, the processing unit 1210 is also used for:
[0302] Based on the target public identifier and the preset binding relationship, query the second account identifier corresponding to the target public identifier. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application.
[0303] Generate device sharing records based on the query results.
[0304] In another possible implementation, the processing unit 1210 is also used for:
[0305] When a second account identifier corresponding to the target public identifier is found, a first device sharing record is generated. The first device sharing record includes a message tracking identifier, a smart home device identifier, a first account identifier, and a second account identifier.
[0306] In another possible implementation, the processing unit 1210 is also used for:
[0307] When no second account identifier corresponding to the target public identifier is found, a second device sharing record is generated. The second device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
[0308] In another possible implementation, the device further includes a receiving unit;
[0309] The receiving unit is used to receive authentication request information sent by the second electronic device, the authentication request information including a message tracking identifier;
[0310] The processing unit 1210 is also used to acquire the device sharing record corresponding to the message tracking identifier;
[0311] The sending unit 1220 is also configured to send a response success message to the second electronic device when the device sharing record indicates that the shared object has the permission to share the smart home device. The response success message is used to indicate that the sharing of the smart home device was successful.
[0312] In another possible implementation, the device sharing record includes a second account identifier;
[0313] The sending unit 1220 is also configured to send a response success message to the second electronic device when the second account identifier in the device sharing record is the same as the account identifier of the shared object in the smart home application.
[0314] In another possible implementation, the device sharing record includes the target public identifier;
[0315] The processing unit 1210 is also used to obtain the public identifier of the shared object from the social server;
[0316] Processing unit 1210 is also used to generate a binding relationship between the public identifier of the shared object and the second account identifier;
[0317] The sending unit 1220 is also configured to send a response success message to the second electronic device when the target public identifier in the device sharing record is the same as the public identifier of the shared object.
[0318] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, 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. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0319] This application provides a sharing authorization device, which includes: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the method executed by the first electronic device or the method executed by the smart home server when executing the instructions.
[0320] This application provides a smart home device sharing system, which includes a first electronic device, a second electronic device, a smart home device to be shared, and a smart home server; wherein, the first electronic device is used to execute the method described above, and the smart home server is used to execute the method described above.
[0321] This application provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the method described above executed by the first electronic device, or the method described above executed by the smart home server.
[0322] This application provides a non-volatile computer-readable storage medium storing computer program instructions thereon. When the computer program instructions are executed by a processor, they implement the method described above performed by a first electronic device, or the method described above performed by a smart home server.
[0323] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example—but not limited to—electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), electrically programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital video disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination of the foregoing.
[0324] The computer-readable program instructions or code described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.
[0325] The computer program instructions used to perform the operations of this application may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as "C" or similar languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuits, such as programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), are personalized by utilizing state information from computer-readable program instructions. These electronic circuits can execute computer-readable program instructions to implement various aspects of this application.
[0326] Various aspects of this application are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0327] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.
[0328] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.
[0329] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved.
[0330] It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented using hardware (such as circuits or ASICs (Application Specific Integrated Circuits)) that performs the corresponding function or action, or using a combination of hardware and software, such as firmware.
[0331] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, disclosure, and appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple instances. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0332] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A sharing authorization method, characterized in that, Used in a first electronic device, the method includes: When a device sharing signal is received from the smart home application, a contact list in the social application is displayed. The device sharing signal is a trigger signal that acts on the device identifier of the smart home device to be shared. The contact list includes at least one object to be shared with. When a selection signal is received applied to the shared object, a sharing request is sent to the smart home server. The sharing request is used to instruct the smart home server to generate a device sharing record and return a message tracking identifier. The device sharing record is used to indicate that the shared object has the permission to share the smart home device. The message tracking identifier is used to uniquely identify the device sharing record. The sharing request includes a first account identifier, a target public identifier, and the device identifier of the smart home device. The first account identifier is the account identifier of the shared object in the smart home application. The target public identifier is the account identifier of the personal account of the shared object in the social server corresponding to the social application, which is generated for the smart home application. The social application is invoked to send sharing authorization information to the second electronic device of the shared object. The sharing authorization information includes the message tracking identifier. When the second electronic device receives a trigger signal acting on the sharing authorization information, it sends authentication request information to the smart home server. The authentication request information includes the message tracking identifier. The authentication request information is used by the smart home server to obtain the device sharing record corresponding to the message tracking identifier. When the device sharing record indicates that the shared object has the permission to share the smart home device, the smart home server sends a response success message to the second electronic device. The response success message is used to indicate that the sharing of the smart home device was successful.
2. The method according to claim 1, characterized in that, When a selection signal is received acting on the object to be shared, sending a sharing request to the smart home server includes: When a selection signal is received that is applied to the object to be shared, the target public identifier of the object to be shared is obtained; Send the sharing request information to the smart home server.
3. The method according to claim 2, characterized in that, The step of obtaining the target public identifier of the shared object when a selection signal is received applied to the shared object includes: When a selection signal is received that is applied to the object to be shared, a pre-share request information is sent to the social server. The pre-share request information is used to instruct the social server to generate and return the target public identifier of the object to be shared. Receive the target public identifier returned by the social server.
4. The method according to claim 2, characterized in that, The sharing request information is also used to instruct the smart home server to query the second account identifier corresponding to the target public identifier based on the target public identifier and the preset binding relationship. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application. The device sharing record is generated based on the query results.
5. The method according to claim 4, characterized in that, The sharing request information is also used to instruct the smart home server to generate a first device sharing record when it finds the second account identifier corresponding to the target public identifier. The first device sharing record contains the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier.
6. The method according to claim 4, characterized in that, The sharing request information is also used to instruct the smart home server to generate a second device sharing record when it does not find the second account identifier corresponding to the target public identifier. The second device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
7. A sharing authorization method, characterized in that, For use in smart home servers, the method includes: When a sharing request is received from a first electronic device, a device sharing record is generated. The device sharing record is used to indicate that the shared object has the permission to share the smart home device to be shared. The sharing request information includes a first account identifier, a target public identifier, and the device identifier of the smart home device. The first account identifier is the account identifier of the shared object in the smart home application. The target public identifier is the account identifier of the personal account of the shared object in the social server corresponding to the social application, which is generated for the smart home application. Return a message tracking identifier to the first electronic device, the message tracking identifier being used to uniquely identify the device sharing record; Receive authentication request information sent by a second electronic device, wherein the authentication request information includes the message tracking identifier; Retrieve the device sharing record corresponding to the message tracking identifier; When the device sharing record indicates that the shared object has permission to share the smart home device, a response success message is sent to the second electronic device, the response success message being used to indicate that the sharing of the smart home device was successful.
8. The method according to claim 7, characterized in that, The generated device sharing record includes: Based on the target public identifier and the preset binding relationship, query the second account identifier corresponding to the target public identifier. The binding relationship includes a one-to-one correspondence between multiple public identifiers and multiple account identifiers. The second account identifier is the account identifier of the shared object in the smart home application. The device sharing record is generated based on the query results.
9. The method according to claim 8, characterized in that, The step of generating the device sharing record based on the query results includes: When the second account identifier corresponding to the target public identifier is found, a first device sharing record is generated. The first device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the second account identifier.
10. The method according to claim 8, characterized in that, The step of generating the device sharing record based on the query results includes: When no second account identifier corresponding to the target public identifier is found, a second device sharing record is generated. The second device sharing record includes the message tracking identifier, the device identifier of the smart home device, the first account identifier, and the target public identifier.
11. The method according to claim 7, characterized in that, The device sharing record includes a second account identifier; when the device sharing record indicates that the shared object has permission to share the smart home device, a response success message is sent to the second electronic device, including: When the second account identifier in the device sharing record is the same as the account identifier of the shared object in the smart home application, the response success information is sent to the second electronic device.
12. The method according to claim 8, characterized in that, The device sharing record includes a target public identifier; the method further includes: Obtain the public identifier of the shared object from the social server; Generate a binding relationship between the public identifier of the shared object and the second account identifier; When the device sharing record indicates that the shared object has permission to share the smart home device, a response success message is sent to the second electronic device, including: When the target public identifier in the device sharing record is the same as the public identifier of the shared object, the response success information is sent to the second electronic device.
13. A sharing authorization device, characterized in that, The device includes: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method of any one of claims 1-6, or the method of any one of claims 7-12, when executing the instructions.
14. A non-volatile computer-readable storage medium storing computer program instructions thereon, characterized in that, When the computer program instructions are executed by the processor, they implement the method according to any one of claims 1-6, or the method according to any one of claims 7-12.