Device sharing method, electronic device and storage medium

By configuring a unique Share APP Key and a reused Net Key during the device network configuration stage of Bluetooth Mesh devices, the security and stability issues in Bluetooth Mesh device sharing are solved, and device sharing that takes both security and stability into consideration is realized.

CN115515203BActive Publication Date: 2024-10-08ZHEJIANG MAOJING ARTIFICIAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210975993.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-15
Publication Date
2024-10-08
Estimated Expiration
2042-08-15

AI Technical Summary

Technical Problem

The existing technology is difficult to realize the sharing of Bluetooth Mesh devices while taking into account both security and stability. In particular, device sharing has low security and poor stability, resulting in poor device sharing security and poor user experience.

Method used

By configuring a unique Share APP Key for the device during the device network configuration stage of the Bluetooth Mesh device, and reusing the Net Key of the Bluetooth Mesh network, device sharing is achieved, ensuring that the shared device has a unique Share APP Key, improving security. At the same time, the cloud server is used to manage Net Key and Share APP Key to ensure the stability of device sharing.

Benefits of technology

While taking into account security and stability, it achieves effective sharing of Bluetooth Mesh devices, avoids device network security problems caused by the cracking of the Share APP Key, and improves the security and stability of device sharing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115515203B_ABST
    Figure CN115515203B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a device sharing method, an electronic device and a storage medium, wherein the method includes: obtaining a device sharing request sent by a first terminal device of a first user, wherein the device sharing request is used to request that a target Bluetooth Mesh device in the Bluetooth Mesh network of the first user be shared with a second user; configuring the Net Key and Share APP Key used by the target Bluetooth Mesh device for device sharing control to the second terminal device of the second user, so that the second terminal device uses the Net Key and Share APP Key to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device; wherein the Net Key reuses the Net Key of the Bluetooth Mesh network of the first user; the Share APP Key is configured during the device configuration phase of the target Bluetooth Mesh device, and the Share APP Key is unique to the target Bluetooth Mesh device. The embodiment of the present application can realize the sharing of Bluetooth Mesh devices while taking into account security and stability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and specifically to a device sharing method, an electronic device, and a storage medium. Background Art

[0002] Bluetooth Mesh (wireless mesh) network is a mesh network that establishes inter-device communication based on BLE (Bluetooth Low Energy), which is widely used in smart home, smart office and other device intelligent interconnection scenarios. At present, users have the need to share Bluetooth Mesh devices in Bluetooth Mesh network with other users. Therefore, how to provide a device sharing solution to share Bluetooth Mesh devices while taking into account security and stability has become a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a device sharing method, an electronic device, and a storage medium to share Bluetooth Mesh devices while taking into account security and stability.

[0004] To achieve the above objectives, the embodiments of the present application provide the following technical solutions.

[0005] In a first aspect, an embodiment of the present application provides a device sharing method, which is applied to a cloud server, comprising:

[0006] Acquire a device sharing request sent by a first terminal device of a first user, where the device sharing request is used to request to share a target Bluetooth Mesh device in the Bluetooth Mesh network of the first user with a second user;

[0007] The Net Key and Share APP Key used for device sharing control of the target Bluetooth Mesh device are configured to the second terminal device of the second user, so that the second terminal device can use the Net Key and Share APP Key to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device;

[0008] The Net Key reuses the Net Key of the Bluetooth Mesh network of the first user; the Share APP Key is configured during the device configuration phase of the target Bluetooth Mesh device, and the Share APP Key is unique to the target Bluetooth Mesh device.

[0009] In a second aspect, an embodiment of the present application provides a device sharing method, which is applied to a second terminal device, including:

[0010] When the first user shares the target Bluetooth Mesh device in the Bluetooth Mesh network with the second user, a device sharing notification sent by the cloud server is obtained.

[0011] If the second user accepts the device sharing of the first user, the second user obtains the Net Key and Share APP Key configured by the cloud server for the target Bluetooth Mesh device for device sharing control; uses the Net Key and Share APPKey to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device;

[0012] The Net Key reuses the Net Key of the Bluetooth Mesh network of the first user; the Share APP Key is configured during the device configuration phase of the target Bluetooth Mesh device, and the Share APP Key is unique to the target Bluetooth Mesh device.

[0013] In a third aspect, an embodiment of the present application provides a device sharing method, which is applied to a Bluetooth Mesh device, including:

[0014] During the device configuration phase of the Bluetooth Mesh device, after the Bluetooth Mesh device completes the configuration of the APP Key, it obtains the Share App Key configured by the Provisioner for device sharing control;

[0015] Configure the Share App Key. After the Share App Key configuration is completed, send the Share App Key configuration completion information to the Provisioner so that the Provisioner can request to bind the Bluetooth Mesh device to the user.

[0016] Among them, the Share App Key of the Bluetooth Mesh device reuses the unique APP Key configured by the Bluetooth Mesh device during the device configuration stage, and the Share APP Key is configured in the device dimension of the Bluetooth Mesh device; the Share App Key of the Bluetooth Mesh device is used to configure it to the terminal device of the shared user when the device is shared, so that the terminal device of the shared user can control the Bluetooth Mesh device after accessing the Bluetooth Mesh network of the sharing user.

[0017] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising at least one memory and at least one processor, wherein the memory stores one or more computer-executable instructions, and the processor calls the one or more computer-executable instructions to execute the device sharing method as described in the first aspect above, or the device sharing method as described in the second aspect above, or the device sharing method as described in the third aspect above.

[0018] In a fifth aspect, an embodiment of the present application provides a storage medium, which stores one or more computer-executable instructions. When the one or more computer-executable instructions are executed, the device sharing method as described in the first aspect above is implemented, or the device sharing method as described in the second aspect above, or the device sharing method as described in the third aspect above is implemented.

[0019] In a sixth aspect, an embodiment of the present application provides a computer program, which, when executed, implements the device sharing method as described in the first aspect above, or the device sharing method as described in the second aspect above, or the device sharing method as described in the third aspect above.

[0020] The device sharing method provided in the embodiment of the present application can configure a Share APP Key for device sharing control for the Bluetooth Mesh device during the device configuration phase of the Bluetooth Mesh device. The Share APP Key of the Bluetooth Mesh device is unique to the Bluetooth Mesh device; at the same time, the Net Key used by the Bluetooth Mesh device for device sharing control can reuse the Net Key of the Bluetooth Mesh network in which it is located. Based on this, when the first user needs to share the target Bluetooth Mesh device in the Bluetooth Mesh network with the second user, the first terminal device used by the first user can send a device sharing request to the cloud server, and then the cloud server configures the Net Key and Share APP Key used by the target Bluetooth Mesh device for device sharing control to the second terminal device, so that the second terminal device can access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device to complete the device sharing.

[0021] It can be seen that the embodiment of the present application can configure a user-dimensional Net Key for the Bluetooth Mesh device for device sharing control, thereby ensuring the stability of device sharing; and, in the device configuration stage of the Bluetooth Mesh device, a unique device-dimensional Share APP Key is configured for the Bluetooth Mesh device, so that different shared Bluetooth Mesh devices have different Share APP Keys, thereby ensuring the security of device sharing, avoiding the Share APP Key of a Bluetooth Mesh device from being cracked, which causes multiple Bluetooth Mesh devices in the Bluetooth Mesh network to be cracked, and improving the security of device sharing; therefore, the embodiment of the present application can realize the sharing of Bluetooth Mesh devices while taking into account both security and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0023] Figure 1 This is an example diagram of a Bluetooth Mesh network.

[0024] Figure 2 This is an example diagram of a terminal device accessing multiple Bluetooth Mesh networks through multiple GATT connections.

[0025] Figure 3 A flow chart of a method for configuring Share App Key according to an embodiment of the present application.

[0026] Figure 4A This is a flowchart for configuring APP Key.

[0027] Figure 4B Flowchart of the method to implement configuration for Share APP Key.

[0028] Figure 5 A flowchart of a device sharing method provided in an embodiment of the present application.

[0029] Figure 6 Another flow chart of the device sharing method provided in an embodiment of the present application.

[0030] Figure 7 Another flow chart of the device sharing method provided in the embodiment of the present application.

[0031] Figure 8 Another flow chart of the device sharing method provided in the embodiment of the present application.

[0032] Fig. 9A A block diagram of a device sharing apparatus provided in an embodiment of the present application.

[0033] Fig. 9B Another block diagram of the device sharing apparatus provided in an embodiment of the present application.

[0034] Fig. 9C Another block diagram of the device sharing apparatus provided in an embodiment of the present application.

[0035] Fig.10 A block diagram of an electronic device. DETAILED DESCRIPTION

[0036] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0037] Figure 1 An example diagram of a Bluetooth Mesh network is shown as an example. Figure 1 As shown, the Bluetooth Mesh network may include: multiple Bluetooth Mesh devices 101 that have been configured; the configured Bluetooth Mesh devices may also be referred to as node devices. Figure 1 In the figure, the multiple Bluetooth Mesh devices 101 that have been networked belong to the first user 11. When the first user 11 needs to share one or more Bluetooth Mesh devices that have been networked with the second user 12, the device sharing solution needs to be used. For ease of explanation, the one or more Bluetooth Mesh devices that are shared can be referred to as target Bluetooth Mesh devices. It can be understood that the first user can be regarded as a sharing user who shares the Bluetooth Mesh device, and the second user can be regarded as a shared user.

[0038] It should be noted that when sharing Bluetooth Mesh devices, since some Bluetooth Mesh devices cannot be directly connected to the cloud, some Bluetooth Mesh devices cannot be controlled in the cloud through a sharing method similar to WiFi (wireless network communication technology) devices. Based on this, a current device sharing solution is: the second user controls the target Bluetooth Mesh device shared by the first user through the Bluetooth Mesh gateway to which the first user belongs; for example, the second user uses the second terminal device to interact with the Bluetooth Mesh gateway to which the first user belongs to control instructions, so that the second user can issue control instructions through the Bluetooth Mesh gateway to which the first user belongs, thereby achieving control of the shared target Bluetooth Mesh device. For ease of explanation, the terminal device used by the first user (sharing user) can be called the first terminal device, and the terminal device used by the second user (shared user) can be called the second terminal device; the terminal device (such as the first terminal device, the second terminal device) can be a user-side device such as a smartphone or a tablet computer.

[0039] The above solution requires the second terminal device of the second user to interact with the Bluetooth Mesh gateway of the first user to perform control instructions, which makes it more troublesome for the second user to control the shared target Bluetooth Mesh device. Therefore, it is urgent to provide a solution for the second user to use his own second terminal device to locally control the shared target Bluetooth Mesh device.

[0040] The terminal device accesses the Bluetooth Mesh network by establishing a GATT (Generic Attribute Profile) connection with the node device in the Bluetooth Mesh network. The Bluetooth Mesh networks of different users are isolated. Therefore, if it is necessary to enable the second user to use his own second terminal device to locally control the target Bluetooth Mesh device in the Bluetooth Mesh network to which the first user belongs, the second terminal device needs to be connected to the Bluetooth Mesh network to which the first user belongs, so as to locally control the target Bluetooth Mesh device in the connected Bluetooth Mesh network.

[0041] It should be noted that the second user may also have his own Bluetooth Mesh network. In order for the second user's second terminal device to be able to control not only the Bluetooth Mesh devices in the second user's Bluetooth Mesh network, but also the target Bluetooth Mesh devices shared in the first user's Bluetooth Mesh network, the second user's second terminal device should have the ability to access the second user's Bluetooth Mesh network and the first user's Bluetooth Mesh network. In other words, the terminal device (such as the first terminal device and the second terminal device) provided in the embodiment of the present application should have the ability to access multiple Bluetooth Mesh networks. For example, terminal devices such as smartphones should have the ability to connect to multiple GATT networks so that the terminal device can access multiple different Bluetooth Mesh networks; Figure 2 An example diagram showing a terminal device accessing multiple Bluetooth Mesh networks through multiple GATT connections is provided for reference; Figure 2 As shown, for Bluetooth Mesh networks 21 to 2N (N is the number of Bluetooth Mesh networks), the terminal device can access the Bluetooth Mesh network 21 by establishing a GATT connection 201 with a node device in the Bluetooth Mesh network 21. Similarly, the terminal device can access the Bluetooth Mesh network 2N by establishing a GATT connection 20N with a node device in the Bluetooth Mesh network 2N.

[0042] In order to enable the second terminal device of the second user to access the Bluetooth Mesh network of the first user and realize local control of the shared target Bluetooth Mesh device, the first user needs to share the NetKey (network key) and APP Key (application key) corresponding to the target Bluetooth Mesh device with the second user; thus, the second terminal device of the second user can use the Net Key and APP Key shared by the first user to access the Bluetooth Mesh network of the first user and realize local control of the target Bluetooth Mesh device.

[0043] Among them, Net Key is the network key of the Bluetooth Mesh network, which is the key key used to distinguish different Bluetooth Mesh networks; APP Key is the application key, which is the key key used to distinguish different applications in the same Bluetooth Mesh network. It should be noted that the Bluetooth mesh network has the concepts of Net Key and APP Key, and the Net Key and APP Key of different Bluetooth mesh networks are different; Net Key can be understood as the key used for basic encryption and decryption in the Bluetooth mesh network. The Net Key of Bluetooth Mesh devices in the same Bluetooth Mesh network can be the same, while the Net Key of different Bluetooth Mesh networks is different, which also makes the data communication between different Bluetooth Mesh networks isolated. App Key can be understood as the key used for data encryption and decryption at the application layer. For example, when setting the status of a Bluetooth Mesh device, the APP Key can be used for data encryption and decryption.

[0044] In one implementation, the method of sharing the Net Key and APP Key corresponding to the target Bluetooth Mesh device with the second user is: setting the NetKey and AppKey in the dimension of the user account, and the Bluetooth Mesh devices under one user account use the same NetKey and AppKey, so that the first user sends the NetKey and AppKey under the first user account (the account corresponding to the first user) to the second terminal device of the second user, so that the second terminal device uses the NetKey and AppKey of the first user account to access the Bluetooth Mesh network of the first user and realize local control of the shared target Bluetooth Mesh device.

[0045] This device sharing method has the following problems: the allocation of NetKey and AppKey follows the user dimension. The Bluetooth Mesh devices under a user account use the same NetKey and AppKey. Then, after the second user (the shared user) obtains the NetKey and AppKey of the first user account, he can control the Bluetooth Mesh device under the first user (sharing user) account through reverse analysis methods such as traffic capture, resulting in the second user being able to control the Bluetooth Mesh device that the first user does not want to share, resulting in low security of device sharing.

[0046] In another implementation, the method of sharing the Net Key and APP Key corresponding to the target Bluetooth Mesh device with the second user is: when the first user shares the target Bluetooth Mesh device, an independent new NetKey and AppKey are set for the shared target Bluetooth Mesh device, so that different Bluetooth Mesh devices shared by the first user have different NetKeys and AppKeys; thus, when the second user obtains the NetKey and AppKey corresponding to the target Bluetooth Mesh device shared by the first user, he can only control the shared target Bluetooth Mesh device in the Bluetooth Mesh network of the first user separately, thereby improving the security of device sharing. However, this device sharing method still has the following problems:

[0047] The first user's Bluetooth Mesh device needs to support the operations of adding, updating, and deleting NetKey and AppKey to configure independent new NetKey and AppKey; in order to support independent new NetKey and AppKey, the first user's multiple Bluetooth Mesh devices need to broadcast multiple Proxy Advertising in different time periods, which increases the complexity of the first user's Bluetooth Mesh device and causes abnormalities in the stability of device sharing; in order to store multiple NetKey and AppKey of multiple Bluetooth Mesh devices, the first user causes storage pressure on the storage space; in addition, if the configuration of multiple NetKey and AppKey of multiple Bluetooth Mesh devices is not in the same instruction, the atomicity of NetKey and AppKey cannot be guaranteed. The above problems will lead to low stability of device sharing. Therefore, different NetKey and AppKey are configured for different Bluetooth Mesh devices to be shared. Although it can improve the security of device sharing, the stability of device sharing is poor.

[0048] Based on the above description, the embodiments of the present application provide an improved device sharing solution to share the Net Key and APP Key corresponding to the target Bluetooth Mesh device that the first user needs to share with the second user while taking into account security and stability. In some embodiments, for the sake of stability of device sharing, the Net Key corresponding to the target Bluetooth Mesh device shared by the first user to the second user can reuse the Net Key of the Bluetooth Mesh network dimension under the first user's account (for example, the Net Key of the Bluetooth Mesh network where the target Bluetooth Mesh device is located is used as the NetKey corresponding to the target Bluetooth Mesh device). In some embodiments, for the sake of security of device sharing, the embodiments of the present application can configure additional different Share App Keys for different Bluetooth Mesh devices as the corresponding App Keys when sharing Bluetooth Mesh devices; that is, when the first user shares the target Bluetooth Mesh device, the shared target Bluetooth Mesh devices are all configured with independent and unique Share App Keys, thereby ensuring the security of device sharing.

[0049] As an optional implementation, the Share App Key of a Bluetooth Mesh device can have the following features:

[0050] The Share App Key is unique to a Bluetooth Mesh device. For example, the Share App Key is configured in the device dimension of the Bluetooth Mesh device. That is, different Bluetooth Mesh devices have different Share App Keys.

[0051] The Share App Key of the Bluetooth Mesh device remains unchanged during the sharing period of the Bluetooth Mesh device, regardless of whether the Bluetooth Mesh device is shared with one user or multiple users. It should be noted that the Share App Key of the Bluetooth Mesh device remains unchanged during the sharing period. Although it may lead to the possibility of cracking the Share App Key of the Bluetooth Mesh device, the Share App Keys of different Bluetooth Mesh devices are different. Therefore, even if the Share App Key of a Bluetooth Mesh device is cracked, it will not affect the security of other Bluetooth Mesh devices of the first user.

[0052] The Share App Key of the Bluetooth Mesh device can be configured during the device configuration phase of the Bluetooth Mesh device. For example, when the Bluetooth Mesh device is configured for the first time or reconfigured, the Share App Key needs to be reconfigured.

[0053] The Share App Key of the Bluetooth Mesh device needs to be Added / Updated on the first user (sharing user) side to ensure that the device-related keys of the sharing user (such as Device Key) will not be distributed to other users; it should be noted that the Device Key can be the device key of the Bluetooth Mesh device, which is used to encrypt and decrypt the configuration operations of the Bluetooth Mesh device;

[0054] Bluetooth Mesh devices can automatically report the Share App Key used.

[0055] In order to configure the Share App Key for device sharing control for the Bluetooth Mesh device, as an optional implementation, the embodiment of the present application can configure the Share App Key for the Bluetooth Mesh device during the device configuration phase of the Bluetooth Mesh device; it should be noted that if the Share App Key is configured and bound during the device sharing phase of the Bluetooth Mesh device, the sharing operation may fail. Therefore, in order to ensure the user experience of device sharing, the embodiment of the present application can configure and bind the Share App Key of the Bluetooth Mesh device during the device configuration phase of the Bluetooth Mesh device. Figure 3 The flowchart of an optional method for configuring Share App Key according to an embodiment of the present application is exemplarily shown. The method can be implemented by a cloud server, a Provisioner (a startup configuration device), and a Bluetooth Mesh device.

[0056] Among them, Provisioner can add unprovisioned devices to the Bluetooth Mesh network through Provisioning (startup configuration, also known as the network configuration process); unprovisioned devices can be regarded as Bluetooth Mesh devices that have not joined the Bluetooth Mesh network; Provisioner may be a Bluetooth Mesh gateway or a terminal device. In one example, when the first user adds an unprovisioned Bluetooth Mesh device to the Bluetooth Mesh network, the interaction between Provisioner, cloud server and Bluetooth Mesh device can be used to complete the device configuration process, and the Share App Key for device sharing control is configured for the Bluetooth Mesh device during the device configuration process.

[0057] It should be noted that the Bluetooth mesh gateway can be, for example, a smart speaker or multi-mode gateway with Bluetooth communication capability and Internet connection capability. In addition to the configuration and control functions of the node device, the Bluetooth mesh gateway can also be used as a springboard for connecting the node device to the Internet to achieve remote control of the node device. The cloud server can be a cloud service platform that provides Bluetooth Mesh management services, such as a cloud computing platform that provides smart home, smart office and other equipment intelligent interconnection services, an IoT (Internet of Things) cloud platform, etc.; accordingly, the terminal device (such as the first terminal device and the second terminal device) can load an APP (application) to interact with the cloud server. The APP can be an application for Bluetooth Mesh management, such as an APP that provides smart home, smart office and other equipment intelligent interconnection services.

[0058] Reference Figure 3 As shown, the method flow may include the following steps.

[0059] In step S310, after the Bluetooth Mesh device is powered on, it broadcasts an unconfigured network broadcast packet.

[0060] After the Bluetooth Mesh device is powered on, if it is in an unprovisioned state, it can broadcast an unprovisioned advertising packet for the Provisioner to discover the Bluetooth Mesh device. Unprovisioned advertising packets include Unprovisioned Device Beacon (unprovisioned device broadcast beacon) advertising packets, PB (Provisioning Bearer, provisioning bearer mode)-GATT (Generic Attribute Profile, general attribute protocol) advertising packets, etc.

[0061] In step S311, the Provisioner discovers the Bluetooth Mesh device and uploads the device information of the Bluetooth Mesh device to the cloud server.

[0062] In step S312, the cloud server sends network configuration information to the Provisioner.

[0063] Provisioner can discover Bluetooth Mesh devices based on the unconfigured broadcast packets sent by Bluetooth Mesh devices, and upload the device information of Bluetooth Mesh devices to the cloud server to request network configuration information from the cloud server; then, the cloud server can feedback the network configuration information to Provisioner. In some embodiments, the network configuration information may include a Net Key for network configuration, an APP Key for APP configuration, etc. Optionally, the device information of the Bluetooth Mesh device uploaded by Provisioner to the cloud server may be, for example, the UUID (Universally Unique Identifier) ​​of the Bluetooth Mesh device and other information.

[0064] In step S313, the Provisioner configures the Net Key to the Bluetooth Mesh device.

[0065] In step S314, the Bluetooth Mesh device sends Net Key configuration completion information to the Provisioner.

[0066] After the Provisioner obtains the network configuration information from the cloud server, it can configure the NetKey in the network configuration information to the Bluetooth Mesh device, so that after the Bluetooth Mesh device completes the Net Key configuration, it can send the Net Key configuration completion information to the Provisioner.

[0067] In step S315, the Provisioner configures the APP Key to the Bluetooth Mesh device.

[0068] The APP Key of a Bluetooth Mesh device can be unique to the Bluetooth Mesh device.

[0069] In step S316, the Bluetooth Mesh device sends APP Key configuration completion information to the Provisioner.

[0070] After the Bluetooth Mesh device completes the configuration of Net Key, the Provisioner can configure the APP Key to the Bluetooth Mesh device; after the Bluetooth Mesh device completes the configuration of APP Key, the Provisioner can obtain the configuration completion information of APP Key sent by the Bluetooth Mesh device. After the Bluetooth Mesh device completes the configuration of Net Key and APP Key, it can be regarded that the Bluetooth Mesh device has completed the basic network configuration process, and the Bluetooth Mesh device can access the Bluetooth Mesh network; subsequently, the user binding of the Bluetooth Mesh device can be completed, so that the user can realize the security control of the Bluetooth Mesh device that has been configured.

[0071] In the optional implementation of configuring the APP Key for the Bluetooth Mesh device, Figure 4A The following is an exemplary flow chart showing the method of configuring APP Key. Figure 4A As shown, the method flow may include the following steps.

[0072] In step S410, the Provisioner adds an APP Key to the Bluetooth Mesh device.

[0073] Optionally, the APP Key of the Bluetooth Mesh device can be configured in the device dimension of the Bluetooth Mesh device, and different Bluetooth Mesh devices have different APP Keys.

[0074] In step S411, the Bluetooth Mesh device Add APP Key and feedback APP Key Status to the Provisioner.

[0075] In step S412, the Provisioner sends a Model APP Bind (APP mode binding) request to the Bluetooth Mesh device.

[0076] In step S413, the Bluetooth Mesh device binds to the APP mode and feeds back Model APPStatus (APP mode status) to the Provisioner.

[0077] Back to Figure 3 As shown, in step S317, the Provisioner configures the Share App Key of the Bluetooth Mesh device to the Bluetooth Mesh device.

[0078] In step S318, the Bluetooth Mesh device configures the Share App Key; after the Share App Key configuration is completed, the Share App Key configuration completion information is sent to the Provisioner.

[0079] After the Bluetooth Mesh device completes the configuration of the APP Key and before the user binding of the Bluetooth Mesh device is performed, the Provisioner can configure the Share App Key for the device sharing control for the Bluetooth Mesh device, thereby configuring the Share App Key for the Bluetooth Mesh device during the device configuration phase of the Bluetooth Mesh device. In an embodiment of the present application, when the Provisioner obtains the configuration completion information of the APP Key sent by the Bluetooth Mesh device (for example, when the Provisioner obtains the APP mode status sent by the Bluetooth Mesh device), the Share App Key of the Bluetooth Mesh device can be configured to the Bluetooth Mesh device, so that the Bluetooth Mesh device can configure the Share App Key; after the Bluetooth Mesh device completes the configuration of the Share App Key, it can send the Share App Key configuration completion information to the Provisioner so that the Provisioner can perform the subsequent user binding process of the Bluetooth Mesh device.

[0080] In the optional implementation of configuring Share APP Key for Bluetooth Mesh devices, Figure 4B The following is an exemplary flow chart showing the method of implementing configuration of ShareAPP Key. Figure 4B As shown, the method flow may include the following steps.

[0081] In step S420, the Provisioner adds a Share APP Key to the Bluetooth Mesh device.

[0082] In some embodiments, the Share APP Key of the Bluetooth Mesh device can reuse the APP Key of the Bluetooth Mesh device in the device dimension of the Bluetooth Mesh device. For example, after the Bluetooth Mesh device is configured with a unique APPKey during the device configuration process, the APP Key of the Bluetooth Mesh device can be reused as the Share APP Key for device sharing control.

[0083] In step S421, the Bluetooth Mesh device Adds Share APP Key and feeds back Share APPKey Status to the Provisioner.

[0084] To configure the Share APP Key to the Bluetooth Mesh device, the Provisioner can send an Add Share APP Key request to the Bluetooth Mesh device so that the Bluetooth Mesh device can add the Share APP Key. After the Bluetooth Mesh device adds the Share APP Key, the Share APP Key status can be fed back to the Provisioner so that the Provisioner can confirm that the Bluetooth Mesh device has added the Share APP Key.

[0085] In step S422, the Provisioner sends an APP mode binding request to the Bluetooth Mesh device.

[0086] In step S423, the Bluetooth Mesh device binds the APP mode based on the added Share APP Key and feeds back the APP mode status to the Provisioner.

[0087] Share APP Key is an additional key configured for Bluetooth Mesh devices at the APP level and is used for device sharing control of Bluetooth Mesh devices. Therefore, after the Bluetooth Mesh device adds Share APP Key, the APP mode of the Bluetooth Mesh device will change. Based on this, after confirming that the Bluetooth Mesh device has added Share APP Key, Provisioner can send an APP mode binding (Model APP Bind) request to the Bluetooth Mesh device so that the Bluetooth Mesh device can re-bind the APP mode. Furthermore, the Bluetooth Mesh device can re-bind the APP mode based on the added Share APP Key and feedback the re-bound APP mode status to Provisioner.

[0088] In step S424, the Provisioner sends a request to add a model subscription (ModelSubscription Add) to the Bluetooth Mesh device.

[0089] In step S425, the Bluetooth Mesh device adds a model subscription and feeds back the model subscription status (Model Subscription Status) to the Provisioner.

[0090] After obtaining the APP mode status fed back by the Bluetooth Mesh device, the Provisioner can confirm that the Bluetooth Mesh device has bound the APP mode based on the added Share APP Key, and then the Provisioner can feed back a request to add a model subscription (Model Subscription Add) to the Bluetooth Mesh device to request the APP mode subscription corresponding to the Share APP Key; then, the Bluetooth Mesh device can add a model subscription and feed back the corresponding model subscription status (Model SubscriptionStatus) to the Provisioner. At this point, the embodiment of the present application can complete the configuration of the Share APPKey for the Bluetooth Mesh device.

[0091] Back to Figure 3 As shown, in step S319, the Provisioner sends a binding request for the Bluetooth Mesh device to the cloud server.

[0092] In step S320, the cloud server feeds back the binding result to the Provisioner.

[0093] After the Bluetooth Mesh device completes the network configuration (for example, completes the Net Key configuration and the APP Key configuration) and completes the additional configuration of the Share APP Key for device sharing control, the Provisioner can send a binding request for the Bluetooth Mesh device to the cloud server to request that the Bluetooth Mesh device be bound to the user; further, the cloud server can perform user binding on the Bluetooth Mesh device according to the binding request, so that the user can safely control the Bluetooth Mesh device that has been networked. The cloud server can feed back the binding result of the Bluetooth Mesh device to the Provisioner; further, when the Provisioner selects the Bluetooth Mesh gateway, the cloud server can also feed back the binding result of the Bluetooth Mesh device to the user's terminal device.

[0094] Figure 3 The method of configuring Share APP Key shown in the figure can configure an additional Share APP Key for device sharing control for the Bluetooth Mesh device during the device configuration phase of the Bluetooth Mesh device. By advancing the configuration process of Share APP Key to the device configuration phase of the Bluetooth Mesh device, the configuration of Share APP Key can be avoided during the device sharing phase of the Bluetooth Mesh device, which can ensure the device sharing success rate of the Bluetooth Mesh device and improve the user's device sharing experience.

[0095] As an optional implementation, Figure 5The optional flow chart of the device sharing method provided in the embodiment of the present application is shown as an example. Figure 5 The method flow may include the following steps.

[0096] In step S510, the first terminal device sends a device sharing request to the cloud server, where the device sharing request is used to request to share a target Bluetooth Mesh device in the Bluetooth Mesh network of the first user with a second user.

[0097] When the first user needs to share one or more target Bluetooth Mesh devices in the first user's Bluetooth Mesh network with the second user, the first user can use the first terminal device to specify the target Bluetooth Mesh device to be shared and the second user (shared user); based on the one or more target Bluetooth Mesh devices and the second user specified by the first user, the first terminal device can send a device sharing request to the cloud server to request to share the target Bluetooth Mesh device with the second user. Optionally, the device sharing request can carry the device identification information of the target Bluetooth Mesh device to be shared, as well as the user information of the second user (such as the second user account of the second user and other user information).

[0098] In one example, the first terminal device may display a device sharing page, which may display the configured Bluetooth Mesh devices in the Bluetooth Mesh network of the first user. The first user may select one or more target Bluetooth Mesh devices to be shared from the Bluetooth Mesh devices displayed on the device sharing page, and select the second user account of the second user (the shared user); thereby, the first user may perform a sharing operation on the device sharing page to trigger the first terminal device to send a device sharing request to the cloud server.

[0099] In step S511 , the cloud server verifies whether the device sharing request is legal.

[0100] After obtaining the device sharing request sent by the first terminal device, the cloud server can perform device sharing verification to verify whether the device sharing request of the first terminal device is legal. In some embodiments, the embodiment of the present application can verify whether the target Bluetooth Mesh device to be shared is a Bluetooth Mesh device allowed to be shared by the first user, and whether the second user is a user allowed to share by the first user; if the target Bluetooth Mesh device is a Bluetooth Mesh device allowed to be shared by the first user, and the second user is a user allowed to share by the first user, then the device sharing request can be verified to be legal; if the target Bluetooth Mesh device is not a Bluetooth Mesh device allowed to be shared by the first user, and / or the second user is not a user allowed to share by the first user, then the device sharing request can be verified to be illegal. As an optional implementation, the cloud server may record the device sharing blacklist set by the first user, and the device sharing blacklist may record the Bluetooth Mesh devices and users that are not allowed to be shared and pre-set by the first user; if the target Bluetooth Mesh device and / or the second user indicated by the device sharing request are recorded in the device sharing blacklist, the device sharing request may be verified to be illegal; if the target Bluetooth Mesh device and the second user indicated by the device sharing request are not recorded in the device sharing blacklist, the device sharing request may be verified to be legal.

[0101] In step S512, when verifying that the device sharing request is legitimate, the cloud server sends a device sharing notification to the second terminal device of the second user.

[0102] In response to the verification that the device sharing request is legal, the cloud server can send a device sharing notification to the second terminal device of the second user, so that the second user can decide whether to accept the device sharing of the first user. In other embodiments, in response to the verification that the device sharing request is illegal, the cloud server can end the device sharing process of the embodiment of the present application.

[0103] In some further embodiments, before sending the device sharing notification to the second terminal device, the cloud server may also store a device sharing record, which may be used to record that the first user shares the target Bluetooth Mesh device with the second user. As an optional implementation, the cloud server may be provided with a database for storing device sharing records, and the cloud server may insert the device sharing record of the first user sharing the target Bluetooth Mesh device with the second user into the database for storage.

[0104] In some further embodiments, after the Share APP Key used for device sharing control in the embodiment of the present application is configured in the device configuration stage, it may still need to be updated for security reasons of device sharing. Therefore, before the cloud server sends a device sharing notification to the second terminal device, it may further decide whether it is necessary to Update the Share APP Key; when the cloud server decides that it is necessary to Update the Share APP Key, the cloud server may interact with the Bluetooth Mesh gateway and the target Bluetooth Mesh device of the first user to update the Share APP Key, and then the cloud server may send a device sharing notification to the second terminal device after the Share APP Key is updated; when the cloud server decides that it is not necessary to Update the Share APP Key, the cloud server may directly send the device sharing notification to the second terminal device.

[0105] It should be noted that the process of inserting device sharing records and / or deciding whether the Share APP Key needs to be updated by the cloud server is only an optional implementation. After verifying the legality of the device sharing request, the embodiment of the present application can also directly send a device sharing notification to the second terminal device, without necessarily executing the process of inserting device sharing records and / or deciding whether the Share APP Key needs to be updated.

[0106] In step S513, the second terminal device prompts the second user whether to accept the device sharing of the first user based on the device sharing notification.

[0107] After the second terminal device obtains the device sharing notification sent by the cloud server, it can display the content of the Bluetooth Mesh device shared by the first user to the second user, and prompt the second user whether to accept the device sharing of the first user, for example, prompting the second user whether to accept the target Bluetooth Mesh device shared by the first user. As an optional implementation, after obtaining the device sharing notification, the second terminal device can display a device sharing prompt page, which can display the content of the Bluetooth Mesh device shared by the first user to the second user, and prompt the second user whether to accept the device sharing of the first user.

[0108] In step S514, when the second user accepts the device sharing of the first user, the second terminal device sends a notification of accepting the device sharing to the cloud server.

[0109] Based on the prompt of the second terminal device, if the second user accepts the device sharing of the first user (for example, the second user accepts the device sharing on the device sharing prompt page), the second terminal device can send a notification of the second user's acceptance of the device sharing to the cloud server.

[0110] Furthermore, if the second user does not accept the device sharing of the first user, the second terminal device may send a notification of rejection of device sharing to the cloud server, so that the cloud server may feedback to the first terminal device a notification of the failure of device sharing due to the second user's rejection of device sharing, and end the device sharing process of the embodiment of the present application.

[0111] In step S515, the cloud server binds the target Bluetooth Mesh device to the second user.

[0112] After receiving the notification from the second terminal device that the second user has accepted device sharing, the cloud server can bind the target Bluetooth Mesh device to the second user (for example, bind the target Bluetooth Mesh device to the second user account of the second user) so that the second user can subsequently control the target Bluetooth Mesh device using the second user account.

[0113] In step S516, the cloud server configures the Net Key and Share APP Key of the target Bluetooth Mesh device for device sharing control to the second terminal device.

[0114] After the cloud server binds the target Bluetooth Mesh device to the second user, in order to enable the second terminal device to use the second user account, access the Bluetooth Mesh network where the target Bluetooth Mesh device is located and control the target Bluetooth Mesh device, the cloud server can configure the Net Key and Share APPKey used by the target Bluetooth Mesh device for device sharing control to the second terminal device. Among them, the Net Key used by the target Bluetooth Mesh device for device sharing control can reuse the Net Key of the Bluetooth Mesh network of the first user. The Share APPKey used by the target Bluetooth Mesh device for device sharing control is unique to the target Bluetooth Mesh device; for example, the Share APP Key can be configured in the device configuration stage of the target Bluetooth Mesh device, and the unique APP Key configured by the target Bluetooth Mesh device in the device configuration stage is reused. The Share APP Key of the target Bluetooth Mesh device is configured in the device dimension of the Bluetooth Mesh device.

[0115] Optionally, after the Bluetooth Mesh device completes the configuration of the Share APP Key during the device configuration phase, the cloud server can record the Net Key and Share APP Key of the Bluetooth Mesh device, so that when the target Bluetooth Mesh device of the first user needs to be shared with the second user, the cloud server can determine the Net Key and Share APP Key of the target Bluetooth Mesh device from the recorded Net Key and Share APP Key of the Bluetooth Mesh device, and configure them to the second terminal device of the second user.

[0116] In some further embodiments, before executing step S516, the cloud server may also send a device list of the target Bluetooth Mesh device being shared, a sharing status of the target Bluetooth Mesh device being shared, etc. to the second terminal device. The sharing status of the target Bluetooth Mesh device may indicate whether the target Bluetooth Mesh device is currently shared, and the number of people sharing the device when it is currently shared.

[0117] It can be seen that in the embodiment of the present application, when the first user shares the target Bluetooth Mesh device in the Bluetooth Mesh network with the second user, the second terminal device can obtain the device sharing notification sent by the cloud server; and if the second user accepts the device sharing of the first user, the second terminal device can obtain the Net Key and Share APP Key of the target Bluetooth Mesh device configured by the cloud server for device sharing control.

[0118] In other possible alternative implementations, the embodiment of the present application may also directly execute step S516 when the cloud server obtains the device sharing request of the first user, thereby directly configuring the Net Key and ShareAPP Key of the target Bluetooth Mesh device to the second terminal device.

[0119] In step S517, the second terminal device uses the Net Key and Share APPKey of the target Bluetooth Mesh device to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device.

[0120] After obtaining the Net Key and Share APP Key of the target Bluetooth Mesh device configured by the cloud server, the second terminal device can use the Net Key and Share APP Key of the target Bluetooth Mesh device to access the Bluetooth Mesh network of the first user, thereby controlling the target Bluetooth Mesh device shared by the first user.

[0121] In some embodiments, the second terminal device can maintain a network queue of the Bluetooth Mesh network to which it is connected (the second terminal device can be connected to multiple Bluetooth Mesh networks, and accordingly, the network queue can record multiple Bluetooth Mesh devices connected to the second terminal device), so that after the second terminal device connects to the Bluetooth Mesh network of the first user, the Bluetooth Mesh network of the first user can be added to the network queue.

[0122] The device sharing method provided in the embodiment of the present application can configure a Share APP Key for device sharing control for the Bluetooth Mesh device during the device configuration phase of the Bluetooth Mesh device. The Share APP Key of the Bluetooth Mesh device is unique to the Bluetooth Mesh device (for example, the Share APP Key of the Bluetooth Mesh device can be configured in the device dimension of the Bluetooth Mesh device, and reuse the unique APP Key configured by the Bluetooth Mesh device during the device configuration phase); at the same time, the Net Key used by the Bluetooth Mesh device for device sharing control can reuse the Net Key of the Bluetooth Mesh network in which it is located. Based on this, when the first user needs to share the target Bluetooth Mesh device in the Bluetooth Mesh network with the second user, the first terminal device used by the first user can send a device sharing request to the cloud server, and then the cloud server configures the Net Key and Share APP Key of the target Bluetooth Mesh device for device sharing control to the second terminal device, so that the second terminal device can access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device to complete device sharing.

[0123] It can be seen that the embodiment of the present application can configure a user-dimensional Net Key for the Bluetooth Mesh device for device sharing control, thereby ensuring the stability of device sharing; and, in the device configuration stage of the Bluetooth Mesh device, a unique device-dimensional Share APP Key is configured for the Bluetooth Mesh device, so that different shared Bluetooth Mesh devices have different Share APP Keys, thereby ensuring the security of device sharing, avoiding the Share APP Key of a Bluetooth Mesh device from being cracked, which causes multiple Bluetooth Mesh devices in the Bluetooth Mesh network to be cracked, and improving the security of device sharing; therefore, the embodiment of the present application can realize the sharing of Bluetooth Mesh devices while taking into account both security and stability.

[0124] In some embodiments, after verifying that the device sharing request sent by the first terminal device is legitimate, the cloud server can update the Share APP Key of the target Bluetooth Mesh device to be shared, and configure the updated Share APP Key to the second user. Figure 6 Another optional flow chart of the device sharing method provided in the embodiment of the present application is shown as an example. Figure 6 The method flow may include the following steps.

[0125] In step S610, the first terminal device sends a device sharing request to the cloud server.

[0126] In step S611 , the cloud server verifies whether the device sharing request is legal.

[0127] In step S612 , the cloud server inserts the device sharing record when verifying that the device sharing request is legitimate.

[0128] In step S613 , the cloud server determines whether the Share APPKey of the target Bluetooth Mesh device needs to be updated.

[0129] Optionally, if the target Bluetooth Mesh device is currently in a shared state, the embodiment of the present application may not need to update the Share APP Key of the target Bluetooth Mesh device. If the target Bluetooth Mesh device is not currently in a shared state, and the Share App Key of the target Bluetooth Mesh device has been used, the embodiment of the present application may update the Share APP Key of the target Bluetooth Mesh device. In addition, if the target Bluetooth Mesh device is not currently in a shared state, and the Share App Key of the target Bluetooth Mesh device has not been used, the embodiment of the present application may not need to update the Share APP Key of the target Bluetooth Mesh device.

[0130] In step S614, if the cloud server determines that the Share APP Key needs to be updated, it sends a command to update the Share APP Key to the Bluetooth Mesh gateway of the first user.

[0131] When the cloud server decides that the Share APP Key needs to be updated, it can send a Config (configuration command) to the Bluetooth Mesh gateway of the first user to update the Share APP Key of the target Bluetooth Mesh device.

[0132] In step S615, the Bluetooth Mesh gateway sends a command to update the Share APP Key to the target Bluetooth Mesh device.

[0133] In step S616, the target Bluetooth Mesh device sends the update status (Status) of the Share APP Key to the Bluetooth Mesh gateway.

[0134] After obtaining the command to update the Share APP Key sent by the cloud server, the Bluetooth Mesh gateway can send the command to update the Share APP Key to the target Bluetooth Mesh device. After receiving the command, the target Bluetooth Mesh device can update the Share APP Key and send the update status to the Bluetooth Mesh gateway. As an optional implementation, the embodiment of the present application can perform the Config AppKey Update process with the target Bluetooth Mesh device through a terminal device or a Bluetooth Mesh gateway, thereby updating the Share APP Key of the target Bluetooth Mesh device.

[0135] Since the target Bluetooth Mesh device may update the Share APP Key successfully or fail to update the Share APP Key, the update status of the Share APP Key fed back by the target Bluetooth Mesh device may include a successful update of the Share APP Key or a failed update. As an optional implementation, the target Bluetooth Mesh device can successfully update the Share APP Key when the following conditions are met: the target Bluetooth Mesh device is powered on; the target Bluetooth Mesh device is within the scanning range of the terminal device or the Bluetooth Mesh gateway (if the target Bluetooth Mesh device is far away from the terminal device or the Bluetooth Mesh gateway, the target Bluetooth Mesh device will be unable to communicate with the terminal device or the Bluetooth Mesh gateway, resulting in a failure to update the Share APP Key). Accordingly, when the target Bluetooth Mesh device is not powered on and / or is not within the scanning range of the terminal device or the Bluetooth Mesh gateway, the Share APP Key update of the target Bluetooth Mesh device fails.

[0136] In step S617, the Bluetooth Mesh gateway sends the update status of the Share APP Key to the cloud server.

[0137] In step S618, the cloud server sends a device sharing notification to the second terminal device.

[0138] After obtaining the update status of the target Bluetooth Mesh device after updating the Share APP Key, the cloud server can send a device sharing notification to the second terminal device of the second user.

[0139] It should be noted that the cloud server forwards the command to update Share APP Key through the Bluetooth Mesh gateway of the first user to achieve the target Bluetooth Mesh device to update Share APP Key. This is an optional implementation method. When the first terminal device of the first user can directly interact with the target Bluetooth Mesh device, the cloud server can also forward the command to update Share APP Key through the first terminal device. As a possible alternative implementation, when the cloud server determines that the target Bluetooth Mesh device needs to update Share APP Key, it can send a command to update Share APP Key to the first terminal device; the first terminal device can send the command to update Share APP Key to the target Bluetooth Mesh device; after updating Share APP Key, the target Bluetooth Mesh device can send the update status of Share APP Key to the first terminal device (the update status can include Share APP Key update success or update failure); thus, the first terminal device can send the update status of Share APP Key to the cloud server, and then the cloud server can send a device sharing notification to the second terminal device.

[0140] As an optional implementation, if the update status of the Share APP Key received by the cloud server is Share APP Key update successful, the cloud server can obtain the updated Share APP Key of the target Bluetooth Mesh device, and subsequently use the updated Share APP Key to configure the Share APP Key of the target Bluetooth Mesh device for the second terminal device; if the update status of the Share APP Key received by the cloud server is Share APP Key update failure, the cloud server can use the recorded Share APP Key of the target Bluetooth Mesh device (for example, the Share APP Key configured by the target Bluetooth Mesh device during the device configuration phase) to configure the Share APP Key of the target Bluetooth Mesh device for the second terminal device.

[0141] In some further embodiments, if the cloud server determines that the target Bluetooth Mesh device does not need to update the Share APP Key, it can directly send a device sharing notification to the second terminal device, and subsequently use the recorded Share APP Key of the target Bluetooth Mesh device to configure the Share APP Key of the target Bluetooth Mesh device for the second terminal device.

[0142] In step S619, the second terminal device prompts the second user whether to accept the device sharing of the first user based on the device sharing notification.

[0143] In step S620, when the second user accepts the device sharing of the first user, the second terminal device sends a notification of accepting the device sharing to the cloud server.

[0144] In step S621 , the cloud server verifies whether the second user's acceptance of device sharing is legal.

[0145] After receiving the notification that the second user accepts device sharing, the cloud server can verify whether the second user's acceptance of device sharing is legal. For example, the cloud server can verify whether the first user is a user allowed by the second user to accept sharing, and / or verify whether the target Bluetooth Mesh device is a Bluetooth Mesh device allowed by the second user to accept sharing; when the first user is verified to be a user allowed by the second user to accept sharing, and the target Bluetooth Mesh device is a Bluetooth Mesh device allowed by the second user to accept sharing, it can be verified that the second user's acceptance of device sharing is legal; otherwise, it is verified that the second user's acceptance of device sharing is illegal.

[0146] In step S622, when the cloud server verifies that the second user's acceptance of the device sharing is legal, the device sharing record is updated.

[0147] After verifying that the second user's acceptance of the device sharing is legal, the cloud server may update the stored device sharing record to add the record content of the second user's acceptance of the device sharing.

[0148] It should be noted that step S621 and step S622 may be optional steps.

[0149] In step S623, the cloud server binds the target Bluetooth Mesh device to the second user.

[0150] In step S624, the cloud server configures the Net Key and Share APP Key of the target Bluetooth Mesh device for device sharing control to the second terminal device.

[0151] Based on the result of whether the target Bluetooth Mesh device needs to update the Share APP Key, and whether the target Bluetooth Mesh device successfully updates the Share APP Key, the cloud server can configure the Share APP Key of the corresponding target Bluetooth Mesh device to the second terminal device; the specific situation can be referred to the description of the corresponding part of the previous text, which will not be expanded here.

[0152] In step S625, the second terminal device uses the Net Key and Share APPKey of the target Bluetooth Mesh device to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device.

[0153] The embodiment of the present application can decide whether the target Bluetooth Mesh device needs to update the Share APP Key after verifying that the device sharing request of the first user is legal, so that when the target Bluetooth Mesh device needs to update the Share APP Key, the Share APP Key is updated in time, thereby improving the accuracy of the Share APP Key of the target Bluetooth Mesh device and ensuring that device sharing can be smoothly implemented.

[0154] In some further embodiments, the present application embodiment may also support the first user or the second user to cancel the device sharing after the first user's target Bluetooth Mesh device is shared with the second user. As an optional implementation, Figure 7 Another optional flow chart of the device sharing method provided in the embodiment of the present application is shown as an example. The method flow can be used by the first user who is the sharing user to cancel the device sharing. Figure 7 The method flow may include the following steps.

[0155] In step S710, the first terminal device sends a request to cancel device sharing to the cloud server, where the request is used to request to cancel sharing of the target Bluetooth Mesh device with the second user.

[0156] When the first user wants to cancel device sharing, the first user can specify one or more target Bluetooth Mesh devices for which sharing needs to be canceled and the second user for whom sharing needs to be canceled; based on the target Bluetooth Mesh devices for which sharing needs to be canceled and the second user specified by the first user, the first terminal device can send a request to cancel device sharing to the cloud server to request cancellation of sharing the target Bluetooth Mesh device with the second user.

[0157] In one example, the first terminal device may display a shared device page, which may display the Bluetooth Mesh devices shared by the first user and the users who have shared them. The first user may select one or more target Bluetooth Mesh devices that need to be canceled from the shared device page, as well as the second user to whom the selected target Bluetooth Mesh devices are shared; thereby, the first user may cancel the sharing operation on the shared device page to trigger the first terminal device to send a request to cancel device sharing to the cloud server.

[0158] In step S711 , the cloud server cancels the sharing relationship between the target Bluetooth Mesh device and the second user.

[0159] After obtaining the first user's request to cancel device sharing, the cloud server can cancel the sharing relationship between the target Bluetooth Mesh device and the second user, so that the second user can no longer control the target Bluetooth Mesh device through the second user account.

[0160] In some further embodiments, the cloud server may also verify whether the request to cancel device sharing is legal after obtaining the first user's request to cancel device sharing (for example, verifying whether the first user has the authority to cancel device sharing, etc.); thus, when the cloud server verifies that the request to cancel device sharing is legal, it may terminate the sharing relationship between the target Bluetooth Mesh device and the second user.

[0161] In step S712, the cloud server sends a notification of canceling device sharing to the second terminal device.

[0162] After the cloud server cancels the sharing relationship between the target Bluetooth Mesh device and the second user, it can send a notification to cancel device sharing to the second terminal device, thereby sending a notification that the sharing relationship between the second user and the target Bluetooth Mesh device has been canceled to the second terminal device, so that the second terminal device exits the Bluetooth Mesh network of the first user.

[0163] In step S713, the second terminal device resends the Provision4 Master request to the cloud server.

[0164] It should be noted that the Provision4 Master request is used to request the basic information of the Bluetooth Mesh network under the user's name, for example, the basic information of the Bluetooth Mesh network owned by the user or the shared Bluetooth Mesh network. The basic information of the Bluetooth Mesh network may include the Net Key of the Bluetooth Mesh network, the device list, and other information. The basic information of the Bluetooth Mesh network may be stored in the cloud server.

[0165] In step S714, the second terminal device exits the Bluetooth Mesh network of the first user.

[0166] After receiving the cancellation device sharing notification sent by the cloud server, the second terminal device can exit the Bluetooth Mesh network of the first user, thereby canceling the control of the target Bluetooth Mesh device and completing the cancellation of device sharing. In some further embodiments, the second terminal device can further check whether to exit the Bluetooth Mesh network of the first user, so as to exit the Bluetooth Mesh network of the first user again when the second terminal device has not exited the Bluetooth Mesh network of the first user, until the second terminal device detects that it has exited the Bluetooth Mesh network of the first user, thereby ensuring that the second terminal device successfully exits the Bluetooth Mesh network of the first user.

[0167] In some further embodiments, in the initialization logic of the second terminal device when it goes online next time, the second terminal device may send a Provision4 Master request to the cloud server. It should be noted that in the initialization logic of the second terminal device when it goes online next time, resending the Provision4 Master request can refresh the basic information of the Bluetooth Mesh network under the second user's name. For example, the first user shares the target Bluetooth Mesh device with the second user, and then the first user cancels the device sharing. In this case, the second user needs to refresh the basic information of the Bluetooth Mesh network under the second user's name (after the refresh, the basic information of the Bluetooth Mesh network corresponding to the target Bluetooth Mesh device will not exist under the second user's name), so that the second user can exit the Bluetooth Mesh network where the target Bluetooth Mesh device is located in a timely manner.

[0168] The embodiment of the present application can support the first user (sharing user) to cancel device sharing, and the cloud server can terminate the sharing relationship and notify the second terminal device to exit the Bluetooth Mesh network of the first user, so that when the first user does not want to share the target Bluetooth Mesh device, the device sharing can be canceled in time, realizing the technical implementation of the Bluetooth Mesh device from being shared to canceling sharing.

[0169] In some other embodiments, the present application embodiment may also support the second user to cancel device sharing. As an optional implementation, Figure 8 Another optional flow chart of the device sharing method provided in the embodiment of the present application is shown as an example. The method flow can be used by the second user who is the shared user to cancel the device sharing. Figure 8 The method flow may include the following steps.

[0170] In step S810, the second terminal device sends a request to cancel device sharing to the cloud server, where the request is used to request to cancel sharing of the target Bluetooth Mesh device to the second user.

[0171] When the second user wants to cancel device sharing, the second user can specify one or more target Bluetooth Mesh devices for cancellation of sharing from the Bluetooth Mesh devices that have been shared with the second user; based on the target Bluetooth Mesh devices for cancellation of sharing specified by the second user, the second terminal device can send a request to cancel device sharing to the cloud server to request cancellation of sharing of the target Bluetooth Mesh devices to the second user.

[0172] In step S811, the cloud server cancels the sharing relationship between the target Bluetooth Mesh device and the second user.

[0173] In some further embodiments, after obtaining the request to cancel device sharing from the second user, the cloud server may verify whether the request to cancel device sharing is legal (for example, verify whether the second user has the authority to cancel device sharing, etc.); thus, when the cloud server verifies that the request to cancel device sharing is legal, it may terminate the sharing relationship between the target Bluetooth Mesh device and the second user.

[0174] In step S812, the cloud server sends a notification of canceling device sharing to the second terminal device.

[0175] In step S813, the second terminal device resends the Provision4 Master request to the cloud server.

[0176] In step S814, the second terminal device exits the Bluetooth Mesh network of the first user.

[0177] The embodiment of the present application can support the second user (the shared user) to cancel device sharing, and the cloud server can terminate the sharing relationship and notify the second terminal device to exit the Bluetooth Mesh network of the first user, so that when the second user does not need to control the shared target Bluetooth Mesh device, the device sharing can be canceled in time, realizing the technical implementation of the Bluetooth Mesh device from being shared to canceling sharing.

[0178] In the embodiment of the present application, while reusing the APP Key of the Bluetooth Mesh device, during the device configuration phase of the Bluetooth Mesh device, a Share APP Key for device sharing control can be configured for the Bluetooth Mesh device, thereby ensuring the security of device sharing; at the same time, a user-dimensional Net Key can be configured for the Bluetooth Mesh device for device sharing control, thereby ensuring the stability of device sharing; and sharing of Bluetooth Mesh devices can be achieved while taking into account both security and stability.

[0179] The following is an introduction to the device sharing device provided in the embodiment of the present application from the perspective of the cloud server. The device content described below can be considered as the functional module that the cloud server needs to set up to implement the device sharing method provided in the embodiment of the present application. The device content described below can be referenced to the method content described above.

[0180] As an optional implementation, Fig. 9A An optional block diagram of a device sharing device provided in an embodiment of the present application is shown exemplarily. The device can be applied to a cloud server. Fig. 9A , the device may include:

[0181] A sharing request acquisition module 910 is used to acquire a device sharing request sent by a first terminal device of a first user, wherein the device sharing request is used to request to share a target Bluetooth Mesh device in the Bluetooth Mesh network of the first user with a second user;

[0182] The key configuration module 911 is used to configure the Net Key and Share APP Key used by the target Bluetooth Mesh device for device sharing control to the second terminal device of the second user, so that the second terminal device uses the NetKey and Share APP Key to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device;

[0183] The Net Key reuses the Net Key of the Bluetooth Mesh network of the first user; the Share APP Key is configured during the device configuration phase of the target Bluetooth Mesh device, and the Share APP Key is unique to the target Bluetooth Mesh device.

[0184] In some embodiments, the Share APP Key reuses the unique APP Key configured by the target Bluetooth Mesh device during the device configuration phase, and the Share APP Key is configured in the device dimension of the Bluetooth Mesh device.

[0185] In some further embodiments, the device can also be used for:

[0186] In the device configuration phase of the Bluetooth Mesh device, a binding request of the Bluetooth Mesh device sent by the Provisioner is obtained; wherein, after configuring the APP Key for the Bluetooth Mesh device and before sending the binding request, the Provisioner configures the Share APP Key for the Bluetooth Mesh device for device sharing control;

[0187] According to the binding request, user binding is performed on the Bluetooth Mesh device.

[0188] In some further embodiments, the device can also be used for:

[0189] Before the Net Key and Share APP Key of the target Bluetooth Mesh device used for device sharing control are configured to the second terminal device of the second user, determining whether the Share APP Key of the target Bluetooth Mesh device needs to be updated;

[0190] If it is determined that the Share APP Key of the target Bluetooth Mesh device needs to be updated, a command to update the Share APP Key is sent to the target Bluetooth Mesh through the Bluetooth Mesh gateway or the first terminal device of the first user;

[0191] After the target Bluetooth Mesh device updates the Share APP Key, the update status of the Share APP Key sent by the target Bluetooth Mesh device through the Bluetooth Mesh gateway or the first terminal device is obtained.

[0192] In some further embodiments, the device can also be used for:

[0193] Receiving a device sharing cancellation request sent by the first terminal device or a device sharing cancellation request sent by the second terminal device, wherein the device sharing cancellation request is used to request to cancel sharing of the target Bluetooth Mesh device with the second user;

[0194] canceling the sharing relationship between the target Bluetooth Mesh device and the second user; and

[0195] Send a notification to cancel device sharing to the second terminal device so that the second terminal device exits the Bluetooth Mesh network of the first user.

[0196] In some further embodiments, the device can also be used for:

[0197] Before the Net Key and Share APP Key used for device sharing control of the target Bluetooth Mesh device are configured to the second terminal device of the second user, a device sharing notification is sent to the second terminal device to prompt the second user whether to accept the device sharing of the first user;

[0198] If a notification of receiving device sharing sent by the second terminal device is obtained, the target Bluetooth Mesh device is bound to the second user.

[0199] The following is an introduction to the device sharing device provided in the embodiment of the present application from the perspective of the second terminal device of the shared user (second user). The device content described below can be considered as the functional module that the second terminal device needs to set in order to implement the device sharing method provided in the embodiment of the present application. The device content described below can be referenced to the method content described above.

[0200] As an optional implementation, Fig. 9B Another optional block diagram of the device sharing device provided in the embodiment of the present application is exemplarily shown, and the device can be applied to the second terminal device, referring to Fig. 9B , the device may include:

[0201] The sharing notification acquisition module 920 is used to obtain a device sharing notification sent by the cloud server when the first user shares the target Bluetooth Mesh device in the Bluetooth Mesh network with the second user.

[0202] The key acquisition module 921 is used to acquire the Net Key and Share APP Key of the target Bluetooth Mesh device configured by the cloud server for device sharing control if the second user accepts the device sharing of the first user;

[0203] The network access and control module 922 is used to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device using the Net Key and the Share APP Key;

[0204] Among them, the Net Key reuses the Net Key of the Bluetooth Mesh network of the first user; the Share APP Key is configured in the device configuration stage of the target Bluetooth Mesh device, and the Share APP Key is unique for the target Bluetooth Mesh device (for example, the Share APP Key reuses the unique APP Key configured by the target Bluetooth Mesh device in the device configuration stage, and the Share APP Key is configured in the device dimension of the Bluetooth Mesh device).

[0205] The following is an introduction to the device sharing device provided in the embodiment of the present application from the perspective of the Bluetooth Mesh device. The device content described below can be considered as the functional module that the Bluetooth Mesh device needs to set up to implement the device sharing method provided in the embodiment of the present application. The device content described below can be referenced to the method content described above.

[0206] As an optional implementation, Fig. 9C Another optional block diagram of the device sharing device provided in the embodiment of the present application is exemplarily shown, and the device can be applied to a Bluetooth Mesh device, referring to Fig. 9C , the device may include:

[0207] The Share App Key configuration acquisition module 930 is used to obtain the Share App Key configured by the Provisioner for device sharing control after the Bluetooth Mesh device completes the configuration of the APP Key during the device configuration phase of the Bluetooth Mesh device;

[0208] Share App Key configuration module 931, used to configure Share App Key;

[0209] The configuration completion information sending module 932 is used to send the configuration completion information of the Share App Key to the Provisioner after the Share App Key configuration is completed, so that the Provisioner requests to bind the Bluetooth Mesh device to the user;

[0210] Among them, the Share App Key of the Bluetooth Mesh device reuses the unique APP Key configured by the Bluetooth Mesh device during the device configuration stage, and the Share APP Key is configured in the device dimension of the Bluetooth Mesh device; the Share App Key of the Bluetooth Mesh device is used to configure it to the terminal device of the shared user when the device is shared, so that the terminal device of the shared user can control the Bluetooth Mesh device after accessing the Bluetooth Mesh network of the sharing user.

[0211] In some embodiments, the Share App Key configuration module 931 is used to configure the Share App Key including:

[0212] Add Share APP Key based on the Share APP Key configured by Provisioner;

[0213] Feedback Share APP Key status to Provisioner;

[0214] Get the APP mode binding request sent by Provisioner;

[0215] Bind APP mode based on the added Share APP Key and feedback APP mode status to Provisioner;

[0216] Get the request sent by Provisioner to add mode subscription;

[0217] Add a pattern subscription and report the pattern subscription status to the Provisioner.

[0218] The embodiment of the present application also provides an electronic device, which can be, for example, a cloud server, a Bluetooth Mesh device, or a terminal device (for example, a second terminal device) used by a shared user. As an optional implementation, Fig.10 An optional block diagram of an electronic device is shown exemplarily, referring to Fig.10 The electronic device may include: at least one processor 1, at least one communication interface 2, at least one memory 3 and at least one communication bus 4.

[0219] In the embodiment of the present application, the number of the processor 1 , the communication interface 2 , the memory 3 , and the communication bus 4 is at least one, and the processor 1 , the communication interface 2 , and the memory 3 communicate with each other through the communication bus 4 .

[0220] Optionally, the communication interface 2 may be an interface of a communication module for performing network communication.

[0221] Optionally, processor 1 may be a CPU, a GPU (Graphics Processing Unit), an NPU (embedded neural network processor), an FPGA (Field Programmable Gate Array), a TPU (tensor processing unit), an AI chip, an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement an embodiment of the present application.

[0222] The memory 3 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0223] The memory 3 stores one or more computer executable instructions, and the processor 1 calls the one or more computer executable instructions to execute the device sharing method provided in the embodiment of the present application.

[0224] Optionally, if the electronic device is a cloud server, the processor may call the one or more computer executable instructions to execute the device sharing method provided by the cloud server in the embodiment of the present application. If the electronic device is a second terminal device of the shared user (second user), the processor may call the one or more computer executable instructions to execute the device sharing method provided by the second terminal device in the embodiment of the present application. If the electronic device is a Bluetooth Mesh device, the processor may call the one or more computer executable instructions to execute the device sharing method provided by the Bluetooth Mesh device in the embodiment of the present application.

[0225] An embodiment of the present application also provides a storage medium, which can store one or more computer-executable instructions. When the one or more computer-executable instructions are executed, a device sharing method performed by a cloud server as provided in an embodiment of the present application, or a device sharing method performed by a second terminal device as provided in an embodiment of the present application, or a device sharing method performed by a Bluetooth Mesh device as provided in an embodiment of the present application is implemented.

[0226] An embodiment of the present application also provides a computer program, which, when executed, implements a device sharing method performed by a cloud server as provided in an embodiment of the present application, or a device sharing method performed by a second terminal device as provided in an embodiment of the present application, or a device sharing method performed by a Bluetooth Mesh device as provided in an embodiment of the present application.

[0227] The above describes multiple implementation schemes provided by the embodiments of the present application. The various optional methods introduced in each implementation scheme can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible implementation schemes, which can all be considered as implementation schemes disclosed and open in the embodiments of the present application.

[0228] Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Any person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be subject to the scope defined by the claims.

Claims

1. A device sharing method, wherein: Applied to cloud servers, including: Acquire a device sharing request sent by a first terminal device of a first user, where the device sharing request is used to request to share a target Bluetooth Mesh device in the Bluetooth Mesh network of the first user with a second user; The network key Net Key and the shared application key ShareAPP Key used by the target Bluetooth Mesh device for device sharing control are configured to the second terminal device of the second user, so that the second terminal device can use the Net Key and Share APP Key to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device; The Net Key reuses the Net Key of the Bluetooth Mesh network of the first user; the Share APP Key is configured during the device configuration phase of the target Bluetooth Mesh device, and the Share APP Key is unique to the target Bluetooth Mesh device.

2. The method according to claim 1, wherein: The Share APP Key reuses the unique APP Key configured by the target Bluetooth Mesh device during the device configuration phase, and the Share APP Key is configured in the device dimension of the Bluetooth Mesh device.

3. The method according to claim 2, wherein: Also includes: In the device configuration phase of the Bluetooth Mesh device, a binding request of the Bluetooth Mesh device sent by the startup configuration device Provisioner is obtained; wherein, after configuring the APP Key for the Bluetooth Mesh device and before sending the binding request, the Provisioner configures the Share APP Key for the Bluetooth Mesh device for device sharing control; According to the binding request, user binding is performed on the Bluetooth Mesh device.

4. The method according to any one of claims 1 to 3, wherein: Also includes: Before the Net Key and Share APP Key of the target Bluetooth Mesh device used for device sharing control are configured to the second terminal device of the second user, determining whether the Share APP Key of the target Bluetooth Mesh device needs to be updated; If it is determined that the Share APP Key of the target Bluetooth Mesh device needs to be updated, a command to update the Share APP Key is sent to the target Bluetooth Mesh through the Bluetooth Mesh gateway or the first terminal device of the first user; After the target Bluetooth Mesh device updates the Share APP Key, the update status of the Share APP Key sent by the target Bluetooth Mesh device through the Bluetooth Mesh gateway or the first terminal device is obtained.

5. The method according to any one of claims 1 to 3, wherein: Also includes: Receiving a device sharing cancellation request sent by the first terminal device or a device sharing cancellation request sent by the second terminal device, wherein the device sharing cancellation request is used to request to cancel sharing of the target Bluetooth Mesh device with the second user; Release the sharing relationship between the target Bluetooth Mesh device and the second user; as well as, Send a notification to cancel device sharing to the second terminal device so that the second terminal device exits the Bluetooth Mesh network of the first user.

6. The method according to any one of claims 1 to 3, wherein: Also includes: Before the Net Key and Share APP Key used for device sharing control of the target Bluetooth Mesh device are configured to the second terminal device of the second user, a device sharing notification is sent to the second terminal device to prompt the second user whether to accept the device sharing of the first user; If a notification of receiving device sharing sent by the second terminal device is obtained, the target Bluetooth Mesh device is bound to the second user.

7. A device sharing method, wherein: Applied to the second terminal device, including: When the first user shares the target Bluetooth Mesh device in the Bluetooth Mesh network with the second user, a device sharing notification sent by the cloud server is obtained. If the second user accepts the device sharing of the first user, the second user obtains the network key Net Key and the shared application key Share APP Key configured by the cloud server for the target Bluetooth Mesh device for device sharing control; uses the Net Key and Share APP Key to access the Bluetooth Mesh network of the first user and control the target Bluetooth Mesh device; The Net Key reuses the Net Key of the Bluetooth Mesh network of the first user; the Share APP Key is configured during the device configuration phase of the target Bluetooth Mesh device, and the Share APP Key is unique to the target Bluetooth Mesh device.

8. A device sharing method, wherein: Applicable to Bluetooth Mesh devices, including: During the device configuration phase of the Bluetooth Mesh device, after the Bluetooth Mesh device completes the configuration of the APP Key, it obtains the Share App Key for device sharing control configured by the Provisioner of the startup configuration device; Configure the Share App Key. After the Share App Key configuration is completed, send the ShareApp Key configuration completion information to the Provisioner so that the Provisioner can request to bind the Bluetooth Mesh device to the user. Among them, the Share App Key of the Bluetooth Mesh device reuses the unique APP Key configured by the Bluetooth Mesh device during the device configuration stage, and the Share APP Key is configured in the device dimension of the Bluetooth Mesh device; the Share App Key of the Bluetooth Mesh device is used to configure it to the terminal device of the shared user when the device is shared, so that the terminal device of the shared user can control the Bluetooth Mesh device after accessing the Bluetooth Mesh network of the sharing user.

9. The method according to claim 8, wherein: The configuration of Share App Key includes: Add Share APP Key based on the Share APP Key configured by Provisioner; Feedback Share APP Key status to Provisioner; Get the APP mode binding request sent by Provisioner; Bind APP mode based on the added Share APP Key and feedback APP mode status to Provisioner; Get the request sent by Provisioner to add mode subscription; Add a pattern subscription and report the pattern subscription status to the Provisioner.

10. An electronic device, wherein: It includes at least one memory and at least one processor, the memory stores one or more computer-executable instructions, and the processor calls the one or more computer-executable instructions to execute the device sharing method as described in any one of claims 1 to 6, or the device sharing method as described in claim 7, or the device sharing method as described in any one of claims 8 to 9.

11. A storage medium, wherein: The storage medium stores one or more computer-executable instructions, and when the one or more computer-executable instructions are executed, the device sharing method as described in any one of claims 1 to 6 is implemented, or the device sharing method as described in claim 7, or the device sharing method as described in any one of claims 8 to 9.