Equipment management method, electronic equipment and computer readable storage medium
By obtaining device information of IoT devices and initiating sharing requests to the cloud, the difficulty of the authorization process in IoT device management is solved, flexible addition and remote authorization from devices are realized, and user experience is improved.
Patent Information
- Application Number
- CN202310802103.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2024-12-31
AI Technical Summary
In IoT device management, the authorization process between the master and slave devices needs to meet specific conditions, such as the device is in the same location or known account information, resulting in difficulty in connection and inconvenient user operation.
By obtaining the device information of the second device, and initiating a sharing request to the cloud to obtain the authorization of the third device, the addition of slave devices can be realized, and authorization can be realized even when the device is remotely separated, enriching the scenarios added by slave devices and improving user experience .
It effectively avoids authorization restrictions, simplifies the process of adding slave devices, improves user experience, and allows the acquisition of management permissions when the distance between devices is long or cannot be directly connected.
Smart Images

Figure CN119232778A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of terminal technology, and in particular to a device management method, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, various IoT devices have appeared widely, such as smart wearable devices, smart refrigerators, smart curtains, smart door locks, and smart air purifiers. After the application in the electronic device (such as a mobile phone, tablet, etc.) is bound to the IoT device, the user can control the IoT device through the application, which brings great convenience to the user. However, in order to ensure that the IoT device can be effectively managed, the electronic device that is bound to the IoT device for the first time is generally the master device, and the electronic device that is bound to the IoT device thereafter is the slave device. The master device has higher control authority over the IoT device than the slave device. In addition, during the slave device binding process, the master device is required to interact with the slave device to be added to complete the authorization process, so that the slave device to be added is bound to the IoT device and becomes a slave device.
[0003] However, in the process of adding a slave device to an IoT device, one of the following conditions must be met: the master device and the slave device to be added are in the same location, the master device has pre-acquired the account information of the electronic device, and the electronic device has pre-acquired the account information of the master device. Therefore, it is difficult to establish a connection between the electronic device and the IoT device, and it also brings great inconvenience to the user's operation. Summary of the invention
[0004] In view of this, the present application provides a device management method, an electronic device and a computer-readable storage medium. The method can directly initiate a sharing request to the cloud corresponding to the second device by obtaining the device information of the second device to obtain the sharing authorization of the third device, thereby enriching the scenarios added from the device and improving the user experience.
[0005] In a first aspect, the present application provides a device management method, which is applied to a first device. The first device first receives first information from a second device, and the first information is used to share the second device. Then the first device sends a first sharing request to the cloud based on the first information, and the first sharing request is used to request to share the second device. Finally, the first device receives a first sharing response from the cloud, and the first sharing response is used to indicate that the first device has obtained the management authority of the second device. The first sharing response is the response obtained by the cloud after requesting management authorization from a third device in response to the first sharing request, and the third device is used to manage the management authority of the second device.
[0006] Based on this, the first device can directly send a first sharing request to the cloud based on the first information from the second device, so that the third device grants the management authority of the second device to the first device. Therefore, even if the distance between the first device and the third device is far, or the first device and the third device cannot be directly connected, the first device can directly obtain the authorization of the third device through the cloud based on the first information of the second device and become a slave device of the second device. Through the above process, the authorization restrictions between the first device and the third device are effectively avoided, the scenarios added by the slave device can be enriched, and the user experience can be improved.
[0007] In a possible implementation of the first aspect, when the first device sends a first sharing request to the cloud based on the first information, the first request may be first sent to the cloud based on the first information, so that the cloud determines the second information in response to the first request, and the second information includes a sharing code and device information of the second device. Afterwards, the first device obtains the second information sent by the cloud, and may send a first sharing request to the cloud based on the second information, and the first sharing request carries the second information. The sharing code in the second information is the credential for the first device to obtain the first sharing response from the cloud, so that the cloud responds to the second information carried in the first sharing request including the sharing code, and may send the first sharing response to the first device.
[0008] In some examples, the space for storing data in the second device is limited, and the first device needs to receive information from the second device. Then the first information that occupies less space can be stored in the second device, and the second information corresponding to the first information is stored in the cloud corresponding to the second device, and the storage of the second information occupies less space. In this way, the amount of data stored in the second device can be reduced. Based on this, after the first device obtains the first information from the second device, it can send the first information to the cloud, so that the cloud sends the second information corresponding to the first information to the first device. The second information includes a sharing code and device information of the second device, whereby the first device can send a first sharing request to the cloud based on the second information.
[0009] Among them, the sharing code is the credential for the first device to obtain the first sharing response from the cloud. In some examples, after the first device sends the first information to the cloud, the cloud sends the second information corresponding to the first request to the first device. The second information includes the sharing code and the device information of the second device. Afterwards, the first device can send a first sharing request including the sharing code and the device information of the second device to the cloud, so that the cloud can determine that the first device can obtain the first sharing response based on the sharing code. If the sharing request sent by the first device to the cloud does not include the sharing code, but only includes the information of the IoT device, the cloud will not send the first sharing response to the first device. In this way, the sharing code can be used to verify whether the first device can obtain the first sharing response from the cloud, thereby ensuring the security of device sharing.
[0010] In a possible implementation of the first aspect, the second information also includes cloud environment information, and the cloud environment information is used to indicate a first cloud environment that supports the operation of the first application in the second device. Before sending the first sharing request to the cloud, the first device can obtain a second cloud environment that supports the operation of the second application in the first device. The first application and the second application are used to implement the management authority of the first device over the second device. Afterwards, the first device determines that the first cloud environment and the second cloud environment are the same based on the cloud environment information.
[0011] If the first cloud environment and the second cloud environment are the same, it means that the first device can send a management instruction to the first application of the second device through the second application after obtaining the management authority of the second device, so as to realize the control of the second device by the first device. In this way, the first device can send a first sharing request to the cloud in response to the first cloud environment and the second cloud environment being the same, so as to ensure that the first device can manage and control the second device.
[0012] In a possible implementation manner of the first aspect, the first device may send a management instruction to the second device through the second application, where the management instruction is used to instruct the second device to perform the first operation through the first application.
[0013] In some examples, when the first device has obtained management authority for the second device from the third device, such as when the first device needs to control the second device to perform a first operation. The first device may first send a management instruction corresponding to the first operation to the second device through the second application. After the second device receives the management instruction through the first application, the second device may perform the first operation through the second application.
[0014] In another possible implementation of the first aspect, the first information includes a sharing code and device information of the second device, and the first sharing request carries the first information. The sharing code in the first information is a credential for the first device to obtain a first sharing response from the cloud, so that after the first device receives the first information including the sharing code and device information of the second device, the first device can send a first sharing request carrying the first information to the cloud to request sharing of the second device.
[0015] In a possible implementation of the first aspect, when the first device receives the first information from the second device, the first device may receive the first information in the following manner: The first device may first display the first interface, and then, in response to a second operation of the user on the first interface, obtain the first information, wherein the second operation is a code scanning operation or an input operation.
[0016] In some examples, the first interface displayed by the first device is a code scanning interface, and accordingly, the user can perform a code scanning operation on the first interface to scan the graphic code on the second device to obtain the first information of the second device. In some examples, the first interface displayed by the first device is an input interface, and accordingly, the user can perform an input operation on the first interface to input the first information of the second device, such as a serial number, into a text box in the first interface, so that the first device obtains the first information of the second device.
[0017] In a second aspect, the present application provides a device management method, which is applied to a second device. The second device can send a second request to the cloud to obtain first information sent by the cloud, and the first information is information determined by the cloud in response to the second request. Afterwards, the second device transmits the first information to the first device in response to the user operation, and the first information is used by the first device to obtain the permission of the third device to authorize the management of the second device through the cloud, and the third device is used to manage the management permission of the second device.
[0018] In a possible implementation of the second aspect, when the second device transmits the first information to the first device in response to the user operation, the second interface may be displayed, where the second interface is used to display a QR code, where the QR code information includes the first information. Alternatively, the second interface displayed by the second device is used to display the first information.
[0019] In a third aspect, the present application provides a device management method, which is applied to the cloud, and the method includes: receiving a first sharing request from a first device; in response to the first sharing request, determining a second device that the first device requests to share, and a third device for managing the management authority of the second device; sending an authorization request to the third device, the authorization request being used to request the third device to authorize the first device to obtain the management authority of the second device; receiving an authorization response from the third device; and sending a first sharing response to the first device based on the authorization response.
[0020] In a possible implementation of the third aspect, before receiving a first sharing request from a first device, the method further includes: receiving a second request from a second device; generating first information based on the second request, the first information being used to share the second device; and sending the first information to the second device.
[0021] In a possible implementation of the third aspect, before receiving a first sharing request from a first device, the method also includes: receiving a first request from the first device, the first request carrying first information, the first information being obtained by the first device from a second device; generating second information based on the first information, the second information including a sharing code and device information of the second device; sending second information to the first device, the first sharing request carrying the second information; the sharing code in the second information being a credential for the cloud to send a first sharing response to the first device.
[0022] In a possible implementation of the third aspect, a first sharing response is sent to the first device based on the authorization response, including: based on the authorization response, determining that the first device obtains the authority of the third device to authorize management of the second device, and establishing an association relationship between the first device and the second device; and sending the first sharing response to the first device.
[0023] In a fourth aspect, the present application provides a device management method, in which a first device receives first information from a second device, and the first information is used to share the second device. Afterwards, a first sharing request is sent to the cloud based on the first information, and the first sharing request is used to request to share the second device. In response to the first sharing request, the cloud sends a management authorization request to a third device. Then, the third device displays an authorization interface in response to the management authorization request. In response to the user's authorization operation on the authorization interface, the third device sends an authorization response to the cloud. In response to the authorized response, the cloud determines that the first device has obtained authorization to manage the second device and establishes an association relationship between the first device and the second device. Afterwards, the cloud sends a first sharing response to the first device to inform the first device that it has successfully obtained management authority for the second device.
[0024] In a possible implementation of the fourth aspect, in a process in which the first device sends the first sharing request to the cloud according to the first information, the first device first sends the first request to the cloud according to the first information, so that the cloud responds to the first request and sends the second information to the first device, where the second information includes a sharing code and device information of the second device. Afterwards, the first device obtains the second information and sends the first sharing request carrying the second information to the cloud.
[0025] In a fifth aspect, the present application provides an electronic device, the electronic device comprising a display screen, a memory and one or more processors; the display screen, the memory and the processor are coupled; the display screen is used to display an image generated by the processor, the memory is used to store a computer program code, and the computer program code includes a computer instruction; when the processor executes the computer instruction, the electronic device executes the method as described in the first aspect and any possible design thereof. When the processor executes the computer instruction, the electronic device executes: receiving first information from a second device, the first information is used to share the second device; according to the first information, sending a first sharing request to the cloud, the first sharing request is used to request sharing of the second device; receiving a first sharing response from the cloud, the first sharing response is used to indicate that the first device obtains the management authority of the second device, the first sharing response is the response obtained by the cloud after requesting management authorization from the third device in response to the first sharing request, and the third device is used to manage the management authority of the second device.
[0026] In another possible implementation of the fifth aspect, when the processor executes the computer instructions, it also causes the electronic device to execute: sending a first request to the cloud based on the first information; obtaining second information sent by the cloud, the second information including a sharing code and device information of the second device, the second information being information determined by the cloud in response to the first request; sending a first sharing request to the cloud, the first sharing request carrying the second information.
[0027] In another possible implementation of the fifth aspect, the second information also includes cloud environment information, and the cloud environment information is used to indicate a first cloud environment that supports the running of the first application in the second device; when the processor executes the computer instructions, it also causes the electronic device to execute: obtaining a second cloud environment that supports the running of the second application in the first device, the second application being used to send management instructions to the first application after the first device receives the first sharing response, and the first application being used to receive and execute the management instructions; and determining, based on the cloud environment information, that the first cloud environment and the second cloud environment are the same.
[0028] In another possible implementation manner of the fifth aspect, the first information includes a sharing code and device information of the second device, and the first sharing request carries the first information.
[0029] In another possible implementation manner of the fifth aspect, when the processor executes the computer instruction, it further causes the electronic device to execute: displaying a first interface;
[0030] In response to a second operation performed by the user on the first interface, first information is obtained, wherein the second operation is a code scanning operation or an input operation.
[0031] In a sixth aspect, the present application provides a server, comprising a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code comprises computer instructions; when the processor executes the computer instructions, the server executes the method described in the fourth aspect above and any possible design method thereof.
[0032] In a seventh aspect, the present application provides a computer-readable storage medium, comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the first aspect above and any possible design thereof.
[0033] In an eighth aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the second aspect above and any possible design thereof.
[0034] In a ninth aspect, the present application provides a computer-readable storage medium comprising computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the method described in the third aspect above and any possible design thereof.
[0035] In a tenth aspect, the present application provides a computer-readable storage medium, comprising computer instructions. When the computer instructions are executed on a server, the server executes the method described in the third aspect above and any possible design thereof.
[0036] In an eleventh aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible design thereof.
[0037] In a twelfth aspect, the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method described in the second aspect above and any possible design method thereof.
[0038] In a thirteenth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described in the third aspect above and any possible design thereof.
[0039] In a fourteenth aspect, the present application provides a computer program product, which, when executed on a server, enables the server to execute the method described in the fourth aspect and any possible design thereof.
[0040] In a fifteenth aspect, the present application provides a device, which is included in an electronic device, and the device has the function of implementing the behavior of the electronic device in any of the above aspects and possible implementation methods. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes at least one module or unit corresponding to the above function. For example, a transceiver module or unit, a scanning module or unit, a storage module or unit, etc.
[0041] It can be understood that the electronic device described in the fourth aspect and any possible design thereof, the electronic device described in the fifth aspect and any possible design thereof, the electronic device described in the sixth aspect and any possible design thereof, the computer-readable storage medium described in the seventh aspect, the computer-readable storage medium described in the eighth aspect, the computer-readable storage medium described in the ninth aspect, and the computer program product described in the eighth aspect are all used to execute the corresponding methods provided above, the computer program products described in the ninth aspect are all used to execute the corresponding methods provided above, and the computer program products described in the tenth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a display interface of a management application provided in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of a device sharing scenario provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of a communication system provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of a hardware structure of a first electronic device provided in an embodiment of the present application;
[0046] Figure 5 A software structure block diagram of a first electronic device provided in an embodiment of the present application;
[0047] Figure 6 A schematic diagram of a device management method flow provided in an embodiment of the present application;
[0048] Figure 7 A schematic diagram of a device sharing scenario provided in an embodiment of the present application;
[0049] Figure 8 A schematic diagram of a display interface of an IoT device provided in an embodiment of the present application;
[0050] Fig. 9 A schematic diagram of another communication system provided in an embodiment of the present application;
[0051] Fig.10 A schematic diagram of a device sharing authorization interface provided in an embodiment of the present application;
[0052] Fig.11 A schematic diagram of a sharing permission setting interface provided in an embodiment of the present application;
[0053] Fig.12 A flowchart of another device management method provided in an embodiment of the present application;
[0054] Fig.13 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0055] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this embodiment, unless otherwise specified, "plurality" means two or more.
[0056] With the rapid development of IoT technology, various IoT devices have emerged, such as smart TVs, smart switches, smart lamps, and smart wearable devices. Electronic devices such as mobile phones and tablets can be connected to IoT devices, so that users can manage IoT devices through electronic devices. In some examples, users can manage IoT devices through applications installed in electronic devices.
[0057] For example, Figure 1 As shown in (a), the electronic device can add one or more IoT devices through a preset application and manage these IoT devices. For example, after the electronic device detects that the user clicks the operation card control 11 corresponding to an IoT device in the display interface, the electronic device can display the management interface of the IoT device corresponding to the user's click operation, such as Figure 1 The interface is shown in (b). Users can Figure 1 In the display interface shown in (b), corresponding management operations are performed on the IoT device.
[0058] In some scenarios, after the IoT device is bound to electronic device A, the user can manage the IoT device through electronic device A. Afterwards, if the user needs to manage the IoT device through electronic device B, electronic device B can send a device sharing request to electronic device A. If electronic device A sends a device sharing authorization message to the cloud based on the device sharing request, the device sharing authorization message is used to indicate that electronic device A agrees to establish a connection between electronic device B and the IoT device. In response to receiving the device sharing authorization message, the cloud establishes a connection between electronic device B and the IoT device, so that electronic device B can manage the IoT device.
[0059] Among them, the electronic device A that establishes a connection with the IoT device for the first time is the master device, and the electronic device B that establishes a connection with the IoT device later is the slave device. There can be multiple slave devices, and the master device can manage the slave devices. For example, the master device can delete the slave device, and the connection between the deleted slave device and the IoT device will be disconnected.
[0060] Some examples include Figure 2 As shown, the electronic device A used by user A establishes a connection with the IoT device, and the electronic device B used by user B does not establish a connection with the IoT device. Among them, the electronic device A is the main device of the IoT device. The IoT device can be a portable device, such as a children's watch carried and used by user C; the IoT device can also be a non-portable device, such as a smart printer, a smart refrigerator, etc. At this time, if user B wants to manage and control the IoT device through the electronic device B, the electronic device B responds to the user operation and displays a sharing QR code, and the sharing QR code includes the information of the electronic device B. After user A uses the electronic device A to scan the sharing QR code, the electronic device A can obtain the information of the electronic device B. Since there is a connection between the electronic device A and the IoT device, the electronic device A can obtain the information of the IoT device. Based on the information of the electronic device B obtained by scanning the code and the information of the IoT device, the electronic device A can send management sharing information to the cloud, and the management sharing information is used to inform the cloud that a connection needs to be established between the electronic device B and the IoT device. After receiving the management sharing information, the cloud confirms that the IoT device bound to the electronic device A is shared with the electronic device B, and sends a message that the IoT device bound to the electronic device A is successfully shared with the electronic device B to the electronic device B, so that the electronic device B can communicate with the IoT device through the cloud. In this way, through the interaction between the above multiple devices and the cloud, the IoT device completes the addition of slave devices.
[0061] In some examples, electronic device B may also obtain the account or related information of electronic device A in advance, for example, user A informs user B of the account or related information of electronic device A. Afterwards, user B inputs the account or related information of electronic device A into electronic device B, so that electronic device B can send a device sharing management request to electronic device A based on the account or related information of electronic device A. After electronic device A receives the device sharing management request, the user can select at least one IoT device from all IoT devices bound to electronic device A to authorize electronic device B. Afterwards, electronic device A sends management sharing information to the cloud, which is used to inform the cloud that a connection needs to be established between electronic device B and at least one selected IoT device. In response to receiving the management sharing information, the cloud confirms that at least one selected IoT device is shared with electronic device B, and sends a message to electronic device B that the IoT device bound to electronic device A is successfully shared with electronic device B. At this point, at least one selected IoT device is shared with electronic device B, and electronic device B can manage at least one selected IoT device through the cloud.
[0062] In some examples, electronic device A can obtain the account number or related information of electronic device B in advance. For example, user B informs user A of the account number or related information of electronic device B. Afterwards, user A enters the account number or related information of electronic device B into electronic device A, and obtains the IoT device to be shared selected by the user. So that electronic device A can send management sharing information to the cloud based on the account number or related information of electronic device B, and the management sharing information is used to inform the cloud that a connection needs to be established between electronic device B and the IoT device to be shared. After receiving the management sharing information, the cloud confirms that the IoT device to be shared will be shared with electronic device B, and sends a message to electronic device B that the IoT device to be shared has been successfully shared with electronic device B. At this point, the IoT device to be shared is shared with electronic device B, and electronic device B can manage the IoT device to be shared through the cloud.
[0063] In the above-mentioned implementation methods of device sharing, electronic device A and electronic device B need to communicate with each other, so that user A can share the IoT device connected to electronic device A with electronic device B, so that electronic device B can establish a connection with the IoT device. Then, for electronic device A and electronic device B to communicate with each other, electronic device A and electronic device B need to meet certain conditions. For example, the distance between electronic device A and electronic device B needs to be less than a preset distance, so that face-to-face short-distance communication such as code scanning can be performed. For another example, electronic device A needs to know the account of electronic device B before it can share the device with the sharer, or electronic device B needs to know the account of electronic device A before it can send a sharing request to electronic device A.
[0064] In some scenarios, electronic device A and electronic device B are not together. Figure 2 As shown, the IoT device is a children's watch, which is worn by user C, and user A is the mother of user C. For example, user A is in place A, and user C is in place B. The distance between places A and B is far. For example, place A is the company where user A works, and place B is a nursery. In the case where the temporary guardian (user B) who is in place B with user C needs to use his electronic device B to manage the children's watch of user C. If electronic device A cannot know the account of electronic device B, and electronic device B cannot know the account of electronic device A, in this case, electronic device B cannot manage the children's watch through the above methods.
[0065] Optionally, in other scenarios, the IoT device may also be a non-portable device or a non-intelligent wearable device, for example, a smart home device, a smart office device, etc.
[0066] To this end, the present application provides a device management method that allows electronic devices that need to establish a connection with an IoT device to directly interact with the IoT device to obtain authorization from electronic devices that have already established a connection with the IoT device, thereby improving the flexibility of device management sharing.
[0067] Figure 3 A schematic diagram of a communication system for applying a device sharing management method provided in an embodiment of the present application. Figure 3 As shown, the communication system at least includes a first electronic device 100, a cloud 200, an IoT device 300, and a second electronic device 400. The first electronic device 100 and the second electronic device 400 refer to electronic devices installed with applications for controlling IoT devices. The second electronic device 400 is a master device for managing the IoT device 300. The first electronic device 400 is a slave device for managing the IoT device, or is to become a slave device for managing the IoT device.
[0068] A communication connection can be established between the first electronic device 100 and the cloud 200, and between the second electronic device 400 and the cloud 200 through one or more networks. The one or more networks include at least one wireless network and may also include at least one wired network. The wireless network can be implemented using any known wireless network communication protocol, such as wireless fidelity (Wi-Fi), any cellular network communication protocol (such as 2G / 3G / 4G / 5G), etc. The wired network can be implemented using any known wired network communication protocol, such as Ethernet, universal serial bus (USB), FIREWIRE, etc.
[0069] In some examples, the IoT device 300 can store some data in the cloud 200 through the connection with the cloud 200. The IoT device 300 can also receive control instructions sent by the first electronic device 100 or the second electronic device 400 through the cloud 200 through the connection with the cloud 200, so as to realize the control of the IoT device 300 by the first electronic device 100 or the second electronic device 400.
[0070] Optionally, the first electronic device 100 and the second electronic device 400 may be, for example, a mobile phone, a computer, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), a wearable device, an artificial intelligence (AI) device, or other terminal devices. The operating systems installed in the first electronic device 100 and the second electronic device 400 include but are not limited to: Or other operating systems. The embodiment of the present application does not limit the specific types of the first electronic device 100 and the second electronic device 400, or the installed operating systems.
[0071] Optionally, the IoT device 300 may be, for example, a smart wearable device, a smart home device, a smart office device, etc. Smart wearable devices include, for example, children's watches, smart watches, sports bracelets, smart headphones, etc. Smart home devices include, for example, table lamps, switches, televisions, sweeping robots, fans, air conditioners, etc. Smart office devices include, for example, projectors, printers, shredders, etc. The embodiments of the present application do not limit the specific type of the IoT device 300 or the installed operating system.
[0072] Optionally, the cloud 200 may be a device or server with computing and management functions such as a cloud server or a network server. The cloud may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.
[0073] In some examples, the cloud 200 can manage the communication between the first electronic device 100 and the IoT device 300, and the communication between the second electronic device 400 and the IoT device 300, so as to enable communication between the first electronic device 100 and the IoT device 300, and between the second electronic device 400 and the IoT device 300, so that the first electronic device 100 or the second electronic device 400 can send control instructions to the IoT device 300.
[0074] Optionally, the first electronic device 100, the IoT device 300, and the second electronic device 400 in the embodiment of the present application may be implemented by different devices, and the different devices may have the same, similar, or somewhat different hardware structures, such as Figure 4 The hardware structure shown.
[0075] For example, the first electronic device 100 has Figure 4 Take the hardware structure shown in the figure as an example. Figure 4 The hardware structure shown is described.
[0076] Figure 4 The structure diagram of the first electronic device 100 is shown. The first electronic device 100 may include a processor 410, an external memory interface 420, an internal memory 421, a universal serial bus (USB) interface 430, a charging management module 440, a power management module 441, a battery 442, an antenna 1, an antenna 2, a mobile communication module 450, a wireless communication module 460, an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, an earphone interface 470D, a sensor module 480, a button 490, a camera 493, a display screen 494, and a subscriber identification module (SIM) card interface 495.
[0077] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0078] The processor 410 may include one or more processing units, for example, the processor 410 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0079] The controller may be the nerve center and command center of the first electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.
[0080] The processor 410 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 410 is a cache memory. The memory may store instructions or data that the processor 410 has just used or cyclically used. If the processor 410 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 410, and thus improves the efficiency of the system.
[0081] In some embodiments, the processor 410 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. In other embodiments of the present application, the first electronic device 100 may also adopt the above-mentioned different interface connection methods, or a combination of multiple interface connection methods.
[0082] The charging management module 440 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 440 may receive charging input from the wired charger through the USB interface 430.
[0083] The power management module 441 is used to connect the battery 442, the charging management module 440 and the processor 410. The power management module 441 receives input from the battery 442 and / or the charging management module 440, and supplies power to the processor 410, the internal memory 421, the external memory, the display screen 494, the camera 493, and the wireless communication module 460. The power management module 441 can also be used to monitor parameters such as battery capacity, battery cycle number, battery health status (leakage, impedance), etc. The wireless communication function of the first electronic device 100 can be implemented through antenna 1, antenna 2, mobile communication module 450, wireless communication module 460, modem processor, and baseband processor.
[0084] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the first electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0085] The mobile communication module 450 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the first electronic device 100. The mobile communication module 450 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 450 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 450 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1.
[0086] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 470A, a receiver 470B, etc.), or displays an image or video through a display screen 494.
[0087] The wireless communication module 460 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., applied to the first electronic device 100. The wireless communication module 460 can be one or more devices integrating at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor 410. The wireless communication module 460 can also receive the signal to be sent from the processor 410, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0088] In some embodiments, the antenna 1 of the first electronic device 100 is coupled to the mobile communication module 450, and the antenna 2 is coupled to the wireless communication module 460, so that the first electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0089] The first electronic device 100 implements a display function through a GPU, a display screen 494, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 494 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 410 may include one or more GPUs that execute program instructions to generate or change display information.
[0090] The display screen 494 is used to display images, videos, etc. The display screen 494 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 or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. In some embodiments, the first electronic device 100 may include 1 or N display screens 494, where N is a positive integer greater than 1.
[0091] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the first electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0092] The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the first electronic device 100. The external memory card communicates with the processor 410 through the external memory interface 420 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0093] The internal memory 421 can be used to store computer executable program codes, which include instructions. The processor 410 executes various functional applications and data processing of the first electronic device 100 by running the instructions stored in the internal memory 421. The internal memory 421 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the first electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 421 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0094] The sensor module 480 may include a pressure sensor 480A, a fingerprint sensor 480H, a touch sensor 480K, and the like.
[0095] The pressure sensor 480A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 480A can be set on the display screen 494. When a touch operation is applied to the display screen 494, the first electronic device 100 detects the touch operation intensity according to the pressure sensor 480A. The first electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 480A.
[0096] The fingerprint sensor 480H is used to collect fingerprints. The first electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0097] The touch sensor 480K is also called a "touch panel". The touch sensor 480K can be arranged on the display screen 494, and the touch sensor 480K and the display screen 494 form a touch screen, also called a "touch screen". The touch sensor 480K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 494. In other embodiments, the touch sensor 480K can also be arranged on the surface of the first electronic device 100, which is different from the position of the display screen 494.
[0098] The key 490 includes a power key, a volume key, etc. The key 490 may be a mechanical key or a touch key. The first electronic device 100 may receive key input and generate key signal input related to user settings and function control of the first electronic device 100.
[0099] The SIM card interface 495 is used to connect a SIM card. The first electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The software system of the first electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the first electronic device 100 is exemplified.
[0100] Figure 5 1 is a software structure diagram of the first electronic device 100 of an embodiment of the present invention. The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, The system is divided into four layers, from top to bottom: application layer, application framework layer, Android runtime ( runtime) and system libraries, as well as the kernel layer.
[0101] The application layer can include a series of application packages.
[0102] like Figure 5 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, IOT device management, etc.
[0103] In some examples, the IOT device management application provides electronic devices with the function of managing IoT devices. Figure 1 (a) and Figure 1 (b) is a schematic diagram of a display interface of an IOT device management application.
[0104] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0105] like Figure 5 As shown, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, an IOT device manager, and the like.
[0106] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0107] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0108] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0109] The phone manager is used to provide communication functions of the first electronic device 100, such as management of call status (including connecting, hanging up, etc.).
[0110] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0111] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0112] The IoT device manager is used to provide an interface for the IoT device management application to connect to the server so that the IoT device management application can manage the device.
[0113] Runtime includes core libraries and virtual machines. The runtime is responsible for scheduling and management of the Android system.
[0114] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0115] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0116] The system library may include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.
[0117] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0118] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0119] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0120] A 2D graphics engine is a drawing engine for 2D drawings.
[0121] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0122] In the following, the device management method provided in the embodiment of the present application is introduced in detail by taking the second electronic device 400 as electronic device A, which is a main device that has established a communication connection with the IoT device 300, and the first electronic device 100 as electronic device B, which is a device to establish a communication connection with the IoT device 300 as an example.
[0123] In some embodiments, electronic device B can obtain relevant information of the IoT device, and then electronic device B obtains authorization from electronic device A through the cloud based on the relevant information of the IoT device to become a slave device of the IoT device. After electronic device A has established communication with the IoT device, the cloud can save the association between the IoT device and electronic device A. Therefore, electronic device B can directly send a sharing request to electronic device A through the cloud based on the relevant information of the IoT device. In this way, in the above process, even if the distance between electronic device A and electronic device B is very far, electronic device B can remotely obtain authorization from electronic device A through the cloud and become a slave device of the IoT device, enriching the slave device addition scenarios and improving the user experience.
[0124] The following is a detailed description of the process of adding electronic device B as a slave device by the IoT device.
[0125] For example, Figure 6 A schematic diagram of a device management method provided in an embodiment of the present application. Figure 6 As shown, the method includes the following steps.
[0126] S601. The IoT device sends a request to the cloud for obtaining device sharing information.
[0127] In some embodiments, the device sharing information acquisition request includes an identifier of the IoT device, which is a unique identifier of the IoT device and is used to indicate the IoT device.
[0128] In some embodiments, electronic device A or electronic device B is equipped with Figure 5 The device management application shown in FIG. 1 can be used to add managed IoT devices by electronic device A or electronic device B. In addition, the IoT device is also installed with the following Figure 5 The device management application shown, through which the IoT device can communicate with electronic device A or electronic device B.
[0129] In some examples, the device management application is configured with a corresponding cloud server (or cloud) to support the operation of the device management application. Then, when the cloud environments of the cloud servers corresponding to the device management applications in different devices are the same or similar, different devices can communicate with the peer devices through the device management applications installed by themselves. Therefore, the device sharing information acquisition request also includes the cloud environment information corresponding to the device management application in the IoT device, so as to ensure that the cloud environments of the device management applications in the IoT device and the electronic device are consistent in the subsequent process of adding electronic devices for managing the IoT device, so as to ensure normal communication.
[0130] Optionally, the cloud environment information is used to indicate the version information of the cloud server corresponding to the device management application in the IoT device. For example, the stage of the cloud server may include the development stage, the testing stage, the pre-production stage, and the production stage. If the device management application in the IoT device is connected to the cloud in the development stage, then the cloud environment information in the device sharing information acquisition request is the development stage, which means that the device management application installed in the IoT device is a development version application for developers.
[0131] For example, Figure 7 In the scenario shown, user B carries electronic device B (such as a mobile phone), user C carries an IoT device (such as a children's watch), and user B currently needs to add an IoT device to electronic device B in order to manage the IoT device through electronic device B. Then, user C can trigger the sharing of the IoT device. Figure 8 As shown in (a), the IoT device detects that user C clicks on the sharing control 81, and the IoT device sends a request to the cloud to obtain device sharing information.
[0132] Optionally, after establishing a connection with electronic device A, the IoT device can also directly send a request to the cloud for device sharing information, and save the device sharing information sent from the cloud in the local storage of the IoT device, so that even if it cannot connect to the cloud, it can provide device sharing information to electronic device B.
[0133] S602: The cloud sends device sharing information to the IoT device.
[0134] In some embodiments, in response to a received device sharing information acquisition request, the cloud may generate device sharing information of the IoT device based on the device sharing information acquisition request.
[0135] In some examples, the cloud generates a sharing code and device sharing information M in response to the received device sharing information acquisition request. In some examples, the cloud includes a device cloud, and the device cloud is used to generate the sharing code and device sharing information M.
[0136] Optionally, the cloud also includes a short link server. In order to reduce the pressure of information transmission, the short link server is used to receive the sharing code and device sharing information M generated by the device cloud, and the short link server converts the device sharing information M into device sharing information N, and the data length of the device sharing information M is less than the data length of the device sharing information N.
[0137] Exemplarily, the device sharing information M includes the identifier of the IoT device and the cloud environment information of the IoT device. The total data volume of the identifier of the IoT device and the cloud environment information of the IoT device is generally large, so the data length of the device sharing information M is relatively long. After the device cloud sends the device sharing information M to the short link server, the short link server can convert the device sharing information M into device sharing information N with a shorter data length, thereby ensuring that the data volume is reduced and easier to transmit.
[0138] For example, in response to a request for obtaining sharing information received by the cloud including information of an IoT device, the cloud can generate a sharing code and device sharing information M based on the information on the cloud and the information of the IoT device. Among them, the data volume of the device sharing information M is greater than a preset threshold. For example, taking the example of an IoT device sharing device by displaying a QR code, since the maximum amount of information that a QR code can carry is limited, when the information carried is too much, the density of the corresponding generated QR code pattern is high, resulting in the electronic device B not being able to recognize it when scanning. Therefore, the device sharing information M can be converted into device sharing information N through a short link server to improve the recognition accuracy of the QR code. In addition, when the data volume of the device sharing information M is greater than the preset threshold, the decryption speed of the corresponding generated QR code is slow. Using the device sharing information N to generate a QR code can also improve the speed of the electronic device recognizing the QR code, and can obtain the device sharing information more quickly and accurately.
[0139] Optionally, the device sharing information includes the device sharing information N. Alternatively, the device sharing information includes the device sharing information M.
[0140] Optionally, the device sharing information also includes the above-mentioned sharing code. Alternatively, the device sharing information does not include the above-mentioned sharing code, and the electronic device B may subsequently request the cloud to obtain the sharing code during the process of adding the IoT device.
[0141] In some embodiments, the device sharing information acquisition request sent by the IoT device to the cloud includes the device identification of the IoT device, and the cloud can generate a sharing code corresponding to the IoT device based on the device identification of the IoT device. The sharing code is used to indicate that there is a management relationship between the cloud and the IoT device. Afterwards, the cloud can determine whether the request needs to be processed based on whether the request sent by the electronic device of unknown identity includes the sharing code. For example, after electronic device B obtains the sharing code, it can send the sharing code to the cloud as an authentication credential between the IoT device and electronic device B. For example, after electronic device B obtains the sharing code, it sends a sharing request including the sharing code to the cloud. At this time, the cloud can continue to process other information in the sharing request based on the sharing code. If electronic device B sends a sharing request that does not include a sharing code to the cloud, the cloud will not process the sharing request.
[0142] In some embodiments, the sharing code included in the device sharing information of the IoT device generated by the cloud is valid for a certain period of time. Then, after the cloud generates the device sharing information of the IoT device, it can save the device sharing information. Subsequently, when the cloud receives a device sharing information acquisition request sent by the same IoT device again within a preset time period, the same sharing code can be directly fed back. Optionally, when the cloud receives a request sent by the same IoT device after exceeding the preset time period, a new sharing code needs to be regenerated to ensure the security of device sharing through the sharing code.
[0143] In response to receiving a request to obtain device sharing information, the cloud can encrypt the generated device sharing information or the stored device sharing information, and send the encrypted device sharing information to the IoT device to ensure the security of the device sharing information transmission process.
[0144] For example, Figure 7 As shown, the IoT device responds to the operation of user C and sends a device sharing information acquisition request to the cloud. Correspondingly, the cloud generates device sharing information in response to the device sharing information acquisition request. Afterwards, the cloud feeds back the device sharing information to the IoT device. Subsequently, the IoT device can complete the sharing of its own management authority based on the device sharing information.
[0145] S603, the IoT device displays device sharing information.
[0146] In some examples, the device sharing information of the IoT device can be displayed on the IoT device in the form of a graphic code, so that the electronic device B can scan and obtain the code. The graphic code includes, for example, a QR code, a bar code, etc., and the specific type of the graphic code is not limited here.
[0147] In some examples, the device sharing information of the IoT device can also be directly displayed on the IoT device. For example, if the device sharing information of the IoT device is a serial number, the serial number can be directly displayed on the display screen of the IoT device. User B can input the serial number into electronic device B, and electronic device B can also take a picture including the serial number and then input the serial number into electronic device B through image recognition.
[0148] In other examples, the IoT device may not have display capability. Then, in response to the user operation, the IoT device sends the acquired device sharing information to the electronic device B.
[0149] S604: Electronic device B obtains device sharing information.
[0150] In some embodiments, the device sharing information acquired by the electronic device B includes the device sharing information N. Afterwards, the electronic device B sends the device sharing information N to the short link server, so that the short link server sends the device sharing information M and the sharing code corresponding to the device sharing information N to the electronic device B. Afterwards, the electronic device B can generate a device sharing request A based on the sharing code and the device sharing information M.
[0151] For example, Figure 7 In step 4, electronic device B obtains the device sharing information of the IoT device. Figure 8 As shown in (b), the IoT device can display a QR code including device sharing information, and the electronic device B can obtain the device sharing information N by scanning the QR code.
[0152] In some other embodiments, the device sharing information obtained by the electronic device B includes the device sharing information M and the sharing code. That is, the electronic device B does not need to interact with the cloud to obtain the device sharing information M and the sharing code.
[0153] In some embodiments, the device sharing information also includes cloud environment information. The electronic device manages the IoT device through the device management application installed by itself, and only when the cloud operating environment corresponding to the device management application is the same as the cloud operating environment of the IoT device, the device management application can send management instructions to the IoT device through the same cloud operating environment. Therefore, after obtaining the device sharing information, the electronic device B can obtain the cloud environment information carried therein to determine whether the cloud operating environment corresponding to the device management application installed by itself is the same as the cloud operating environment indicated by the cloud environment information. If they are the same, the electronic device B can send a device sharing request to the cloud to request to become a slave device of the IoT device (i.e., execute the following step S605).
[0154] For example, Fig. 9As shown in (a), the cloud supporting the operation of the device management application in the IoT device is a cloud in the development stage, indicating that the version of the device management application installed in the IoT device is a version in the development stage, and the cloud environment information 1 included in the device sharing information obtained by electronic device B is a development stage environment. In addition, the cloud where the device management application in electronic device B runs is also a cloud in the development stage, and the version of the device management application installed in electronic device B is a version in the development stage, and the corresponding cloud environment information 2 is a development stage environment. Then, electronic device B can determine that cloud environment information 1 and cloud environment information 1 are the same, and thus, electronic device B can send a device sharing request to the cloud to request to become a slave device of the IoT device.
[0155] For example, Fig. 9 As shown in (b), the cloud supporting the operation of the device management application in the IoT device is a cloud in the testing stage, indicating that the version of the device management application installed in the IoT device is a version in the testing stage, and the cloud environment information 1 included in the device sharing information obtained by the electronic device B is a testing stage environment. In addition, the cloud where the device management application in the electronic device B runs is a cloud in the development stage, and the version of the device management application installed in the electronic device B is a version in the development stage, and the corresponding cloud environment information 2 is a development stage environment. Then, the electronic device B can determine that the cloud environment information 1 and the cloud environment information 2 are different. Since there is no communication connection between clouds in different stages, the electronic device B cannot send a device sharing request to the cloud to request to become a slave device of the IoT device. At this time, the electronic device B does not need to perform the following steps, or the electronic device B can display a prompt interface, which includes a message for prompting the user to upgrade the application B.
[0156] Optionally, electronic device B determines that the connection between electronic device B and the IoT device cannot be established based on the cloud environment information in the device sharing information, and then electronic device B can display an application version upgrade or version update interface to facilitate the user to upgrade or update the application in electronic device B, so that the connection between electronic device B and the IoT device can be established.
[0157] S605. Electronic device B sends a device sharing request A to the cloud.
[0158] In some embodiments, electronic device B obtains the cloud address (uniform resource locator, URL) corresponding to the IoT device based on the cloud environment information of the IoT device. Then, after generating a device sharing request A based on the device sharing information, electronic device B can send the device sharing request A to the cloud, and the device sharing request A includes the URL corresponding to the IoT device, the identifier of the IoT device, the identifier of the electronic device B, and the sharing code.
[0159] The URL corresponding to the IoT device is used to indicate the transmission destination address of the device sharing request A. Optionally, the electronic device B and the cloud are transmitted through network servers. After receiving the device sharing request A, these network servers can forward the device sharing request A to the cloud corresponding to the IoT device based on the URL of the cloud in the device sharing request A.
[0160] Optionally, after the cloud sends the device sharing information to the IoT device (i.e., executing step S602), the cloud does not receive the sharing request A sent by the electronic device B within the preset time period (i.e., not executing S605). The cloud can send the generated device sharing information to the IoT device according to the preset period to avoid the IoT device failing to successfully receive the device sharing information sent by the cloud. If the cloud receives the sharing request A sent by the electronic device B within the preset time period (i.e., executing S605), the cloud can stop sending the generated device sharing information to the IoT device. Among them, the preset period can be greater than the preset time period.
[0161] S606: The cloud sends a device sharing request B to electronic device A.
[0162] In some embodiments, after receiving the device sharing request A, the cloud confirms that the device sharing request A includes a sharing code, and can continue to process the device sharing request A. Afterwards, based on the identifier of the electronic device B and the identifier of the IoT device included in the sharing request A, the cloud can determine that the device sharing request A is for the electronic device B to request to become a slave device of the IoT device. Then, based on the identifier of the IoT device in the device sharing request A, the cloud can find out from the cloud storage that the master device corresponding to the IoT device is the electronic device A. Afterwards, the cloud can send a device sharing request B to the electronic device A, and the device sharing request B can include the identifier of the electronic device B and the identifier of the IoT device. This is to inform the electronic device A of the identity of the electronic device B requesting to control the IoT device and the identity of the IoT device requested to be controlled by the electronic device B.
[0163] For example, Figure 7As shown, after receiving the device sharing request A sent by the electronic device B, the cloud determines the IoT device that the electronic device B requests to share, and the master device of the IoT device (such as the electronic device A). Afterwards, the cloud can send the device sharing request B to the electronic device A to obtain the authorization of the electronic device A and add the electronic device B as a slave device of the IoT device.
[0164] Optionally, after the cloud sends a device sharing request B to electronic device A, it can send a sharing request waiting notification message to electronic device B. Electronic device B displays a sharing waiting interface based on the sharing request waiting notification message to inform the user of electronic device B that a sharing request has been sent to the user of electronic device A and that waiting is required during this period.
[0165] Optionally, the cloud can send a sharing request waiting notification message to the IoT device, and the IoT device displays a sharing waiting interface based on the sharing request waiting notification message to inform the user of the IoT device that electronic device B has sent a sharing request to the user of electronic device A, and that waiting is required during this period.
[0166] S607: Electronic device A displays a device sharing authorization interface based on device sharing request B.
[0167] In some embodiments, after receiving the device sharing request B, the electronic device A can determine the IoT device requested to be shared, and the electronic device B that requests to become a slave device of the IoT device. Then, the electronic device A can display a sharing authorization interface to obtain user authorization and determine whether the user allows the IoT device to be shared with the electronic device B for control. Optionally, the sharing authorization interface includes an authorization approval control and a authorization rejection control.
[0168] For example, Fig.10 As shown, electronic device A displays a device sharing authorization interface, which includes an approval control 101 and a rejection control 102 .
[0169] In response to the user clicking the consent control 101, the electronic device A determines that the user authorization has been obtained, and then the following steps (S608-S610) can be executed to complete the sharing of the IoT device.
[0170] In response to the user's click operation on the rejection control 102, the electronic device A determines that the user authorization has not been obtained, and then a device sharing rejection message can be sent to the cloud. Correspondingly, after the cloud receives the device sharing rejection message, it can be determined that the owner user A of the electronic device A does not allow the electronic device B to become a slave device of the IoT device, and then the cloud can determine that the IoT device sharing has failed. Optionally, the cloud can send a sharing failure response to at least one of the IoT device or the electronic device B to inform at least one of the owner user C of the IoT device or the owner user B of the electronic device B that the slave device addition of the IoT device has failed. Optionally, when the IoT device receives a message to reject sharing, the display stops displaying the QR code. This allows the IoT device to stop displaying the QR code in time and reduce the display power consumption of the IoT device. For another example, when the electronic device B receives a message to reject sharing, the display displays a prompt message to prompt the user B of the electronic device B to try to initiate a sharing request again or to contact user A and initiate a sharing request again.
[0171] In some embodiments, Fig.10 As shown, the device sharing authorization interface displayed by electronic device A may also include relevant information of electronic device B and relevant information of this device sharing authorization. For example, the remarks information entered by the user of electronic device B, the validity period of this authorization request, etc. In this way, the user of electronic device A can accurately identify the owner of electronic device B who requests to control the IoT device, so that the user of electronic device A can control the authority of electronic device B.
[0172] Optionally, the device sharing authorization interface displayed by the electronic device A may further include a sharing permission setting control 103. In response to the user's operation on the sharing permission setting control 103, the electronic device A may display the following Fig.11 The sharing permission setting interface shown includes the control permission setting items of electronic device B over the IoT device. Fig.11 This means that electronic device B can view the real-time location and address book of the IoT device, but cannot view the device power level and call records of the IoT device. In addition, electronic device B does not have the authority to manage applications or add management members.
[0173] S608. Electronic device A sends a device sharing authorization message to the cloud.
[0174] In some embodiments, in response to the user's authorization operation, electronic device A sends a device sharing authorization message to the cloud, and the device sharing authorization message is used to indicate that the owner user A of electronic device A authorizes electronic device B to become a slave device of the IoT device. Optionally, the device sharing authorization message includes the identifier of electronic device A, the identifier of electronic device B, and the IoT device identifier.
[0175] S609: The cloud adds electronic device B as a slave device of the IoT device.
[0176] In some embodiments, after the cloud receives the device sharing authorization message, the electronic device B can be added as a slave device of the IoT device so that the electronic device B can manage the IoT device.
[0177] Optionally, in response to the received device sharing authorization message, the cloud establishes an association relationship between the account information of the electronic device B and the device information of the IoT device, etc.
[0178] For example, the cloud can bind the IoT device to the electronic device B. Exemplarily, the cloud binds the IoT device ID to the ID of the electronic device B, so that the control instructions for controlling the IoT device sent by the electronic device B to the cloud can be forwarded to the IoT device by the cloud, thereby enabling the electronic device B to manage the IoT device.
[0179] S610: The cloud sends device sharing success information to electronic device B.
[0180] In some embodiments, the cloud sends device sharing success information to electronic device B to indicate that electronic device B has become a slave device of the IoT device and can be used to manage the IoT device. Then, electronic device B can send instructions to control the IoT device to the IoT device through the cloud (i.e., execute the following steps S611 and S612).
[0181] Optionally, the cloud may also send device successful sharing information to electronic device A to notify electronic device A that the sharing of the IoT device has been completed and electronic device B has become a slave device of the IoT device.
[0182] Optionally, the cloud may include a device cloud and a business cloud. After the cloud establishes a connection between the IoT device and electronic device B through the device cloud, the device cloud sends information about the establishment of a connection between electronic device B and the IoT device to the business cloud, thereby ensuring that electronic device B can obtain business information corresponding to the IoT device from the business cloud. The device cloud is used to receive information sent by electronic device A and electronic device B. The business cloud is used to store relevant information of IoT devices. For example, if the IoT device is a children's watch, the business cloud may store information such as the children's watch's address book, call records, mode settings, and device logs. For another example, if the IoT device is a smart sweeping robot, the business cloud may store information such as the smart sweeping robot's scan map, smart setting information, and device logs.
[0183] For example, Figure 7As shown, after receiving the device sharing request B sent by the cloud, electronic device A can display the device sharing authorization interface. For example, user A allows electronic device B to obtain management authority for the IoT device, then user A can perform authorization operations in the device sharing authorization interface. Then, electronic device A can feedback a device sharing authorization message to the cloud in response to the authorization operation. Afterwards, the cloud responds to the device sharing authorization message and determines to share the IoT device, such as adding electronic device B as a slave device of the IoT device. In addition, the cloud sends a device management sharing success notification to electronic device B to inform user B, the owner of electronic device B, that he can use electronic device B to manage the IoT device. In this way, the binding of electronic device B and IoT device is completed through remote authorization of electronic device A, without requiring electronic device A to be within the preset distance range of the IoT device.
[0184] In this way, electronic device B can send a device sharing authorization request to electronic device A by directly interacting with the IoT device. At this time, electronic device A only needs to determine whether the IoT device can be shared with electronic device B based on the request, and the binding process between electronic device B and the IoT device can be realized. This process does not require electronic device A to meet electronic device B face to face, so it can bring a more convenient operation experience to users.
[0185] In some embodiments, after the cloud adds electronic device B as a slave device of the IoT device, electronic device B can control the IoT device through the following process (S611-S612).
[0186] S611. Electronic device B sends device control request information to the cloud.
[0187] S612: The cloud sends device control feedback information to electronic device B.
[0188] In some embodiments, electronic device B can manage multiple IoT devices. For example, before the above process (S601-S610), electronic device B has been bound to multiple IoT devices. For example, the IoT devices bound to electronic device B include IoT device A, IoT device B, and IoT device C. Then the cloud can store the binding relationship between electronic device B and IoT device A, IoT device B, and IoT device C in the form of a device list. After executing S601-S610, where electronic device B becomes a slave device of IoT device D, the device list in the cloud is updated to the binding relationship between electronic device B and IoT device A, IoT device B, IoT device C, and IoT device D.
[0189] Afterwards, electronic device B may send device control request information to the cloud, and the device control request information may be used to request a device list from the cloud. In response to receiving the device control request information, the cloud sends device control feedback information to electronic device B, and the device control feedback information includes a device list. The device list may include all IoT devices that electronic device B can control and information about each IoT device, wherein all IoT devices include the IoT devices bound to electronic device B in the above process (S601-S610). After electronic device B receives the device control feedback information, the user can grasp the IoT devices that electronic device B can manage based on the device list and manage the IoT devices therein.
[0190] In this way, after electronic device B obtains the device sharing information of the IoT device, electronic device B sends a sharing request to the cloud based on the device sharing information. So that the cloud can send the sharing request sent by electronic device B to electronic device A based on the sharing request. If electronic device A agrees, electronic device A will send consent feedback to the cloud. The cloud can bind electronic device B with the IoT device based on the consent feedback, so that electronic device B can control the IoT device.
[0191] In some scenarios, after the IoT device executes the above steps S601 and S602 for the first time and obtains the device sharing information, it is not necessary to repeat steps S601 and S602 in subsequent device sharing processes.
[0192] For example, the IoT device detects the user's device sharing operation (such as detecting that the user clicks Figure 8 The operation of the sharing control shown in (a) in the figure) determines that this is the first time that the device sharing operation is detected, and the above steps S601-S610 can be executed to add a slave device and save the device sharing information sent by the cloud. Subsequently, the IoT device detects the user's device sharing operation again, and the IoT device can directly complete the addition of a new slave device based on the locally saved device sharing information, that is, by executing steps S603-S610 to add the slave device.
[0193] In this way, even when the IoT device network condition is poor, slave devices can be added, and the efficiency of adding slave devices is improved.
[0194] In other scenarios, the above steps S601 and S602 may also be optional steps. For example, IoT devices may directly carry device sharing information when they leave the factory.
[0195] In some examples, when the IoT device leaves the factory, the device sharing information is stored in the IoT device. If the IoT device has a display screen, the device sharing information can be directly read and displayed on the display screen. For another example, if the IoT device does not have a display function, it can be directly set on the IoT device by printing, engraving, pasting, etc., so that the electronic device B in the same place as the IoT device can obtain the device sharing information of the IoT device.
[0196] Through the above method, electronic device B can directly initiate a request to become a slave device of the IoT device based on the device sharing information of the IoT device obtained, without the need for electronic device A and electronic device B to be in the same location. Figure 7 As shown, electronic device A first establishes a connection with the IoT device. User A can take electronic device A away from user C, the user of the IoT device. At this time, if user B of electronic device B needs to manage the IoT device, then electronic device B can directly send a sharing management request to electronic device A through the cloud based on the device sharing information displayed on the IoT device.
[0197] In other scenarios, the IoT device is a smart home device, and electronic device A of user A in the home is the main device that controls the IoT device. When a guest (i.e. user B) appears in the home, the guest (i.e. user B) can use electronic device B to scan the QR code displayed or printed on the IoT device and initiate a device sharing request to electronic device A. In this scenario, whether user A and user B are in the same place, electronic device B can easily initiate a request to control the IoT device to electronic device A.
[0198] The following uses electronic device A as the third device, IoT device as the second device, and electronic device B as the first device as an example to introduce the device management method provided in the embodiment of the present application in detail.
[0199] The third device is a master device that has established a communication connection with the second device, and the first device is a device to establish a communication connection with the second device.
[0200] like Fig.12 As shown, the embodiment of the present application provides a device management method, which includes the following steps:
[0201] S1201. A first device receives first information from a second device.
[0202] The first information is used to share the second device. For example, the first information is the device sharing information of the IoT device described in step S604.
[0203] In some embodiments, when the first device receives the first information from the second device, the first device may receive the first information in the following manner: The first device may first display the first interface, and then, in response to the second operation of the user on the first interface, obtain the first information, wherein the second operation is a code scanning operation or an input operation.
[0204] In some examples, the first interface displayed by the first device is a code scanning interface, such as Figure 7 As shown, accordingly, the user can perform a scanning operation on the first interface to scan the graphic code on the second device to obtain the first information of the second device.
[0205] For example, Figure 7 In step 4, electronic device B displays a code scanning interface. Figure 8 As shown in (b), the second device can display a QR code including the first information, and then electronic device B can obtain the first information by scanning the QR code.
[0206] In some examples, the first interface displayed by the first device is an input interface. Accordingly, the user can perform input operations on the first interface and input the first information of the second device, such as the serial number, into a text box in the first interface so that the first device obtains the first information of the second device.
[0207] S1202: The first device sends a first sharing request to the cloud according to the first information.
[0208] The first sharing request is used to request sharing of the second device. The first sharing request is the device sharing request A in the above step S605. The device sharing request A includes a URL corresponding to the IoT device, an identifier of the IoT device, an identifier of the electronic device B, and a sharing code.
[0209] In some embodiments, when the first device sends a first sharing request to the cloud based on the first information, it can first send a first request to the cloud based on the first information, so that the cloud determines the second information in response to the first request, and the second information includes a sharing code and device information of the second device. Afterwards, the first device obtains the second information sent by the cloud, and can send a first sharing request to the cloud based on the second information, and the first sharing request carries the second information. The sharing code in the second information is the credential for the first device to obtain the first sharing response from the cloud.
[0210] In this way, the cloud can send a first sharing response to the first device in response to the second information carried in the first sharing request including the sharing code.
[0211] S1203: In response to the first sharing request, the cloud determines a second device that the first device requests to share with, and a third device for managing management permissions of the second device.
[0212] S1204: The cloud sends an authorization request to the third device.
[0213] The authorization request is used to request the third device to authorize the first device to obtain the management authority of the second device. The authorization information is the device sharing request B in the above step S606.
[0214] S1205. The cloud receives an authorization response from the third device.
[0215] The authorization response is the device sharing authorization message in the above step S608.
[0216] In some examples, when the cloud sends the first sharing response to the first device based on the authorization response, it can first determine that the first device has obtained the permission of the third device to authorize the management of the second device based on the authorization response, and establish an association relationship between the first device and the second device. After that, the cloud sends the first sharing response to the first device.
[0217] In some embodiments, before receiving the first sharing request from the first device, the cloud may also receive a second request from the second device. Afterwards, the cloud generates first information based on the second request, and the first information is used to share the second device; and sends the first information to the second device. The second request is the device sharing information acquisition request in the above step S601, and the first information is the device sharing information in the above step S602.
[0218] In some examples, before receiving the first sharing request from the first device, the cloud may receive a first request from the first device, the first request carrying first information, and the first information is obtained by the first device from the second device; based on the first information, second information is generated, and the second information includes a sharing code and device information of the second device; the second information is sent to the first device, and the first sharing request carries the second information; the sharing code in the second information is the credential for the cloud to send a first sharing response to the first device.
[0219] Accordingly, an embodiment of the present application also provides a device management method applied to a second device. The method includes the following process: the second device can send a second request to the cloud to obtain first information sent by the cloud, and the first information is information determined by the cloud in response to the second request. Afterwards, the second device transmits the first information to the first device in response to the user operation, and the first information is used by the first device to obtain the permission of the third device to authorize the management of the second device through the cloud, and the third device is used to manage the management permission of the second device.
[0220] In some implementations, when the second device transmits the first information to the first device in response to a user operation, the second device may display the device sharing information. Figure 8As shown in (a), after the second device detects that user C clicks the sharing control 81, the second device can display a second interface, where the second interface is used to display a QR code, and the QR code information includes the first information. Figure 8 As shown in (b). Alternatively, the second interface displayed by the second device is used to display the first information. For example, if the device sharing information of the second device is a string of serial numbers, the second device can directly display the serial numbers on the display screen.
[0221] In some examples, the space for storing data in the second device is limited, and the first device needs to receive information from the second device. Then the first information that occupies less space can be stored in the second device, and the second information corresponding to the first information is stored in the cloud corresponding to the second device, and the storage space of the second information is smaller. In this way, the amount of data stored in the second device can be reduced.
[0222] In some embodiments, the first information acquired by the first device includes device sharing information N. Afterwards, the first device sends the device sharing information N to the short link server, so that the short link server sends the device sharing information M and the sharing code corresponding to the device sharing information N to the first device. Afterwards, the first device can send a first sharing request to the cloud based on the sharing code and the device sharing information M.
[0223] like Figure 7 In step 4, electronic device B obtains the device sharing information of IoT device, including the following process: Figure 8 As shown in (b), the IoT device can display a QR code including device sharing information, and the electronic device B can obtain the device sharing information N by scanning the QR code.
[0224] In other embodiments, the first information includes a sharing code and device information of the second device, and the first sharing request carries the first information. The sharing code in the first information is a credential for the first device to obtain a first sharing response from the cloud. Thus, after the first device receives the first information including the sharing code and device information of the second device, it can send a first sharing request carrying the first information to the cloud to request sharing of the second device. For example, the device sharing information obtained by electronic device B through scanning includes device sharing information M and a sharing code. That is, electronic device B does not need to interact with the cloud to obtain device sharing information M and a sharing code.
[0225] In some embodiments, the second information also includes cloud environment information, and the cloud environment information is used to indicate the first cloud environment that supports the operation of the first application in the second device. Before sending the first sharing request to the cloud, the first device can obtain the second cloud environment that supports the operation of the second application in the first device. The first application and the second application are used to implement the management authority of the first device over the second device. Afterwards, the first device determines that the first cloud environment and the second cloud environment are the same based on the cloud environment information.
[0226] If the first cloud environment and the second cloud environment are the same, it means that the first device can send a management instruction to the first application of the second device through the second application after obtaining the management authority of the second device, so as to realize the control of the second device by the first device. In this way, the first device can send a first sharing request to the cloud in response to the first cloud environment and the second cloud environment being the same, so as to ensure that the first device can manage and control the second device.
[0227] In some embodiments, the first device may send a management instruction to the second device through the second application, where the management instruction is used to instruct the second device to perform the first operation through the first application.
[0228] In some examples, when the first device has obtained management authority for the second device from the third device, such as when the first device needs to control the second device to perform a first operation. The first device may first send a management instruction corresponding to the first operation to the second device through the second application. After the second device receives the management instruction through the first application, the second device may perform the first operation through the second application.
[0229] S1206. The first device receives a first sharing response from the cloud.
[0230] Among them, the first sharing response is used to indicate that the first device obtains the management authority of the second device. The first sharing response is the response obtained after the cloud requests management authorization from the third device in response to the first sharing request. The third device is used to manage the management authority of the second device.
[0231] The first sharing response may be the successful sharing information of the device in the above step S610.
[0232] In some embodiments, after receiving the first sharing request, the cloud confirms that the first sharing request includes a sharing code and can continue to process the first sharing request. Afterwards, based on the identifier of the first device and the identifier of the second device included in the first sharing request, the cloud can determine that the first sharing request is for the first device to request to become a slave device of the second device. Then, based on the identifier of the second device in the first sharing request, the cloud can find out from the cloud storage that the master device corresponding to the second device is the third device. Afterwards, the cloud can send a management authorization request to the third device.
[0233] For example, Figure 7 As shown, after receiving the first sharing request sent by electronic device B, the cloud determines the IoT device that electronic device B requests to share, and the master device of the IoT device (such as electronic device A). Afterwards, the cloud can send a management authorization request to electronic device A to obtain authorization from electronic device A and add electronic device B as a slave device of the IoT device.
[0234] Optionally, after the cloud sends a management authorization request to the third device, it can send a sharing request waiting notification message to the first device. The first device displays a sharing waiting interface based on the sharing request waiting notification message to inform user B of the first device that a sharing request has been successfully sent to user A of the third device, and user B needs to wait during this period.
[0235] Optionally, the first device may include information of user A, such as contact information of user A, in the sharing waiting interface displayed based on the sharing request waiting notification information. In some scenarios, after user B sees the contact information of user A included in the display interface of the third device, user B may contact user A through the contact information, for example, user B may call or send a message to user A to inform user A of the reason why user B initiated the request, etc., or may remind user A to authorize the first device in a timely manner.
[0236] In this way, the binding of the first device and the second device can be completed through remote authorization of the third device, without requiring the third device to be within a preset distance range from the first device or the second device. In addition, it is not necessary for the user of the first device to know the contact information of the user of the third device. As long as the first device can obtain the information of the second device, it can send an authorization request to the third device to complete the binding of the first device and the second device.
[0237] Combination of the above Figure 4-Figure 12 The device management method provided by the embodiment of the present application is described in detail. Fig.13 The electronic device provided by the embodiments of the present application is described in detail.
[0238] In one possible design, Fig.13 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig.13 As shown, the electronic device 1300 may include: a display unit 1301, a processing unit 1302, and a transceiver unit 1303. The electronic device 1300 may be used to implement the functions of the electronic device involved in the above method embodiment.
[0239] Optionally, the display unit 1301 is used to support the electronic device 1300 to execute Figure 6S601-S610 in; also used to support the electronic device 1300 to execute Fig.12 S1201-S1206 in.
[0240] Optionally, the processing unit 1302 is used to support the electronic device 1300 to execute Figure 6 S601-S610 in; also used to support the electronic device 1300 to execute Fig.12 S1201-S1206 in.
[0241] Optionally, the transceiver unit 1303 is used to support the electronic device 1300 to execute Figure 6 S601-S610 in; also used to support the electronic device 1300 to execute Fig.12 S1201-S1206 in.
[0242] Among them, the transceiver unit may include a receiving unit and a sending unit, and may be implemented by a transceiver or a transceiver-related circuit component, and may be a transceiver or a transceiver module. The operations and / or functions of each unit in the electronic device 1300 are respectively to implement the corresponding process of the device management method described in the above method embodiment. All relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional unit, and for the sake of brevity, they will not be repeated here.
[0243] Optionally, Fig.13 The electronic device 1300 shown may also include a storage unit ( Fig.13 (not shown), the storage unit stores a program or instruction. When the processing unit 1302 and the transceiver unit 1303 execute the program or instruction, Fig.13 The electronic device 1300 shown can execute the device management method described in the above method embodiment.
[0244] Fig.13 The technical effects of the electronic device 1300 shown can refer to the technical effects of the device management method described in the above method embodiment, and will not be repeated here.
[0245] In addition to being in the form of electronic device 1300, the technical solution provided in the embodiment of the present application may also be a functional unit or chip in the electronic device, or a device used in conjunction with the electronic device.
[0246] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step in the above-mentioned method embodiment.
[0247] The embodiment of the present application also provides a computer program product, including a computer program. When the computer program runs on an electronic device, the electronic device executes each function or step in the above method embodiment.
[0248] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0249] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0250] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0251] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0252] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0253] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A device management method, characterized in that: The method is applied to a first device, and the method includes: receiving first information from a second device, where the first information is used to share the second device; Sending a first sharing request to the cloud according to the first information, where the first sharing request is used to request sharing of the second device; A first sharing response is received from the cloud, where the first sharing response is used to indicate that the first device obtains management authority of the second device. The first sharing response is a response obtained by the cloud after requesting management authorization from a third device in response to the first sharing request. The third device is used to manage the management authority of the second device.
2. The method according to claim 1, characterized in that The sending a first sharing request to the cloud according to the first information includes: Sending a first request to the cloud according to the first information; Acquire second information sent by the cloud, where the second information includes a sharing code and device information of the second device, and the second information is information determined by the cloud in response to the first request; The first sharing request is sent to the cloud, wherein the first sharing request carries the second information, and the sharing code in the second information is a credential for the first device to obtain the first sharing response from the cloud.
3. The method according to claim 2, characterized in that The second information also includes cloud environment information, where the cloud environment information is used to indicate a first cloud environment that supports the running of the first application in the second device; Before sending the first sharing request to the cloud, the method further includes: Acquire a second cloud environment that supports running a second application in the first device, where the first application and the second application are used to implement management authority of the first device over the second device; According to the cloud environment information, it is determined that the first cloud environment and the second cloud environment are the same.
4. The method according to claim 3, characterized in that The method further comprises: A management instruction is sent to the second device through the second application, where the management instruction is used to instruct the second device to perform a first operation through the first application.
5. The method according to claim 1, characterized in that: The first information includes a sharing code and device information of the second device. The first sharing request carries the first information. The sharing code in the first information is a credential for the first device to obtain the first sharing response from the cloud.
6. The method according to any one of claims 1 to 5, characterized in that Receiving first information from a second device, including: Display the first interface; In response to a second operation performed by the user on the first interface, the first information is acquired, wherein the second operation is a code scanning operation or an input operation.
7. A device management method, characterized in that: The method is applied to a second device, and the method includes: Send a second request to the cloud; Acquire first information sent by the cloud, where the first information is information determined by the cloud in response to the second request; In response to a user operation, the first information is transmitted to the first device, and the first information is used by the first device to obtain, through the cloud, authorization from a third device to manage the second device, and the third device is used to manage the management authority of the second device.
8. The method according to claim 7, characterized in that The transmitting the first information to the first device in response to the user operation includes: Displaying a second interface, where the second interface is used to display a QR code, and the QR code information includes the first information; Alternatively, the second interface is used to display the first information.
9. A device management method, characterized in that: The method is applied to the cloud, and the method includes: receiving a first sharing request from a first device; In response to the first sharing request, determining a second device with which the first device requests sharing, and a third device for managing management rights of the second device; Sending an authorization request to the third device, where the authorization request is used to request the third device to authorize the first device to obtain management authority of the second device; receiving an authorization response from the third device; According to the authorization response, a first sharing response is sent to the first device.
10. The method according to claim 9, characterized in that Before receiving the first sharing request from the first device, the method further includes: receiving a second request from a second device; generating first information according to the second request, where the first information is used to share the second device; The first information is sent to the second device.
11. The method according to claim 10, characterized in that Before receiving the first sharing request from the first device, the method further includes: receiving a first request from a first device, where the first request carries the first information, and the first information is obtained by the first device from the second device; generating second information according to the first information, wherein the second information includes a sharing code and device information of the second device; The second information is sent to the first device, wherein the first sharing request carries the second information; the sharing code in the second information is the credential for the cloud to send the first sharing response to the first device.
12. The method according to any one of claims 9 to 11, characterized in that: The sending a first sharing response to the first device according to the authorization response includes: According to the authorization response, determining that the first device has obtained the authority authorized by the third device to manage the second device, and establishing an association relationship between the first device and the second device; A first sharing response is sent to the first device.
13. A device management method, characterized in that: The method comprises: A first device receives first information from a second device, where the first information is used to share the second device; The first device sends a first sharing request to the cloud according to the first information, where the first sharing request is used to request sharing of the second device; The cloud determines, in response to the first sharing request, a second device with which the first device requests to share, and a third device for managing management rights of the second device; The cloud sends an authorization request to the third device; The third device displays an authorization interface in response to the authorization request; In response to the user's authorization operation on the authorization interface, the third device sends an authorization response to the cloud; The cloud sends a first sharing response to the first device according to the authorization response.
14. The method according to claim 13, characterized in that The first device sends a first sharing request to the cloud according to the first information, including: The first device sends a first request to the cloud, where the first request carries the first information; The cloud generates second information according to the first information, where the second information includes a sharing code and device information of the second device; The cloud sends the second information to the first device; In response to receiving the second information, the first device sends a first sharing request to the cloud, and the first sharing request carries the second information; the sharing code in the second information is the credential for the cloud to send the first sharing response to the first device.
15. An electronic device, characterized in that: The electronic device includes a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1-5; or, the electronic device executes the method as described in any one of claims 7-8.
16. A server, characterized in that: The server includes a memory and one or more processors; the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the server executes the method described in any one of claims 9-12.
17. A computer-readable storage medium, characterized in that: It comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as described in any one of claims 1-5; or, cause the electronic device to execute the method as described in any one of claims 7-8; and, when executed on a server, cause the server to execute the method as described in any one of claims 9-12.
