Method, device and system for self-recovery of device relationships based on Matter protocol
By maintaining the uniqueness and immutability of the gateway device distribution parameters in the Matter protocol, the cumbersome operation problems when the gateway device and sub-device are redistributed, the connection relationship is self-recovered, and the user experience is improved.
Patent Information
- Application Number
- CN202211066549.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2042-09-01
AI Technical Summary
In the Matter protocol, when the gateway device and the sub-device are disconnected and the network is redistributed, the distribution parameters need to be written to the sub-device one by one through ACL control permission, resulting in cumbersome operation and poor user experience.
By maintaining the uniqueness and unchangeability of the distribution parameters of the gateway equipment during the first distribution and redistribution of the network, the gateway equipment does not need to write the distribution parameters to the sub-device through ACL control permissions again when redistribution of the network, and directly restore the connection using the parameters written during the first distribution of the network.
Simplifies the operation process of redistribution network and improves user experience.
Smart Images

Figure CN115604085B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Matter protocol, and in particular to a method, apparatus, and system for self-recovery of device relationships based on the Matter protocol. Background Art
[0002] Matter is an open-source smart home standard project, jointly initiated by Amazon, Apple, Google, and the ZigBee Alliance. Its goal is to develop and promote a new, royalty-free connectivity protocol. Due to the Matter protocol's security features, including ACL (Access Control List) permissions, when controlling thread devices through a gateway device, the gateway's network configuration parameters (e.g., the node's address information, nodeID) must be written to the thread device using the ACL.
[0003] In the existing technology, when the gateway device is initially configured for network configuration, the client needs to use ACL control permissions to write the network configuration parameters into the gateway device and thread sub-devices. After disconnecting the current gateway device from the sub-device and deleting the topology of the current gateway device, the gateway device needs to be re-configured for network configuration. When restoring the connection with the original sub-device, the client needs to use ACL control permissions again to write the network configuration parameters into the gateway device and thread sub-devices.
[0004] In this way, if a gateway device has a large number of sub-devices, when re-provisioning the network after deleting the gateway device, the client needs to use ACL control permissions to write the network configuration parameters to the sub-devices one by one. This makes the single network configuration restoration work repetitive and tedious, and brings a poor user experience. Summary of the Invention
[0005] In order to simplify the operational process of re-configuring the network after deleting the gateway device, this application provides a solution for self-recovery of device relationships based on the Matter protocol. According to this solution, when re-configuring the network for the same gateway, the client does not need to write the network configuration parameters one by one into the sub-device through ACL control permissions.
[0006] According to a first aspect of the present application, a device relationship self-recovery method based on the Matter protocol is provided, which is applied to a client and is characterized by comprising:
[0007] In response to a re-network configuration request from a gateway device, obtaining network configuration parameters of the gateway device, wherein the network configuration parameters are uniquely corresponding to the gateway device and are the same as the network configuration parameters used when the gateway device was initially configured;
[0008] The network configuration parameters are written into the gateway device for Matter network configuration, so that the gateway device restores the network connection with the sub-device through the network configuration parameters, wherein the sub-device stores the network configuration parameters used by the gateway device during the initial network configuration.
[0009] According to a second aspect of the present application, a device relationship self-recovery device based on the Matter protocol is provided, characterized by comprising:
[0010] an acquisition module, configured to acquire, in response to a network reconfiguration request from a gateway device, network configuration parameters of the gateway device, wherein the network configuration parameters are uniquely corresponding to the gateway device and are the same as the network configuration parameters used when the gateway device was initially configured;
[0011] The first writing module is used to write the network configuration parameters into the gateway device for Matter network configuration, so that the gateway device restores the network connection with the sub-device through the network configuration parameters, wherein the sub-device stores the network configuration parameters used by the gateway device during the initial network configuration.
[0012] According to a third aspect of the present application, a device relationship self-recovery system based on the Matter protocol is provided, which includes a gateway device, a sub-device, and a client, and is characterized in that:
[0013] The gateway device sends a first broadcast packet, where the first broadcast packet includes network configuration related information, where the network configuration related information is used to obtain network configuration parameters of the gateway device;
[0014] The sub-device sends a second broadcast packet, where the second broadcast packet includes identifier information of the sub-device, where the identifier information is used to obtain node information of the sub-device in the network and save network configuration parameters used by the gateway device during initial network configuration, where the network configuration parameters are used to establish a network connection between the sub-device and the gateway device; and
[0015] The client executes the method as described in the first aspect.
[0016] According to a fourth aspect of the present application, an electronic device is provided, including:
[0017] A processor and a memory. The memory stores computer instructions, and when the computer instructions are executed by the processor, the processor executes the method according to the first aspect.
[0018] According to a fifth aspect of the present application, a non-transitory computer storage medium is provided, storing a computer program, which, when executed by multiple processors, enables the processors to execute the method described in the first aspect.
[0019] According to this application's Matter protocol-based device relationship self-recovery solution, by maintaining the uniqueness and immutability of the network configuration parameters during the gateway device's initial and reconfiguration processes, there's no need to rewrite the network configuration parameters to sub-devices one by one through ACL control permissions during reconfiguration. The gateway device can restore control of the sub-devices by simply writing the network configuration parameters to the sub-devices during initial configuration, thereby achieving self-recovery of the connection relationship between the gateway device and the sub-device. This greatly simplifies the reconfiguration process and improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without exceeding the scope of protection required by this application.
[0021] Figure 1 This is a schematic diagram of a system for self-recovery of device relationships based on the Matter protocol according to an embodiment of the present application.
[0022] Figure 2 This is a flowchart of a method for self-recovery of device relationships based on the Matter protocol according to an embodiment of the present application.
[0023] Figure 3 This is a schematic diagram of an apparatus for self-recovery of device relationships based on the Matter protocol according to an embodiment of the present application.
[0024] Figure 4 This is a structural diagram of an electronic device provided by this application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts are within the scope of protection of this application.
[0026] Figure 1 Schematic diagram of a system for self-recovery of device relationships based on the Matter protocol according to an embodiment of the present application. Figure 1 As shown, the system includes a gateway device, a sub-device and a client, wherein the gateway device includes a router and other devices, and the sub-device is a device connected to the gateway device, which can be a device that complies with the thread protocol, referred to as a thread sub-device. Figure 1Three sub-devices are displayed in the figure. In fact, the number of sub-devices can be arbitrary; the client can be a terminal device such as a mobile phone or tablet computer.
[0027] When configuring the network for the gateway device for the first time, the client needs to configure the network for the gateway device and sub-devices.
[0028] First, for a gateway device, the client obtains the identifier of the gateway device that requires network configuration, scans and obtains the broadcast data packet of the gateway device corresponding to the identifier, obtains the network configuration parameters based on the network configuration related information contained in the broadcast data packet, and then configures the gateway device based on the network configuration parameters. The client can obtain the identifier of the gateway device that requires network configuration by scanning the QR code information on the gateway device, and then determine which broadcast information is sent by the gateway device by obtaining the identifier of the gateway device.
[0029] Secondly, for sub-devices, the client needs to obtain the identifier of the sub-device that needs to be networked, scan the corresponding sub-device's broadcast data packet, which indicates that the sub-device wishes to connect to the network, and then configure the sub-device using the gateway device's network configuration parameters. The client can obtain the identifier of the sub-device that needs to be networked by scanning the QR code on the sub-device, and then determine which broadcast information is sent by the sub-device.
[0030] During the initial network configuration of the gateway device, the client obtains the network configuration parameters through the broadcast data packet sent by the gateway device as follows.
[0031] 1. The client directly obtains the network configuration parameters from the network configuration related information contained in the broadcast data packet.
[0032] In one embodiment, the client obtains network configuration parameters from the network configuration-related information using a predetermined extraction method. In one specific embodiment, the network configuration-related information is the serial number of the gateway device. After receiving the serial number, the client can obtain the network configuration parameters by extracting a segment of data from the serial number, such as the 10th to 19th digits or characters in the serial number. In another specific embodiment, the network configuration-related information is any other information that the gateway device can permanently access, such as a fixed data string. After receiving the data string, the client obtains the network configuration parameters from the data string using a predetermined extraction method.
[0033] In one embodiment, the predetermined extraction method may be a method of intercepting a section of information from the network configuration related information, or extracting information from multiple locations (continuously or discontinuously) from the network configuration related information. The predetermined extraction method is any suitable method, and this application does not impose any restrictions on this, as long as the network configuration parameters obtained from the network configuration related information are the same during the initial network configuration and the re-network configuration process.
[0034] 2. The client obtains the network configuration parameters from the network configuration related information contained in the broadcast data packet through a third-party device.
[0035] Specifically, the client sends the network configuration related information to the third-party device; the third-party device determines the network configuration parameters corresponding to the network configuration related information, for example, directly or by calculation, or searches for the network configuration parameters corresponding to the network configuration related information, and then sends it to the client, and the client obtains the network configuration parameters corresponding to the network configuration related information.
[0036] In one specific embodiment, the third-party device may be a cloud server or any device that can determine or search for network configuration parameters using network configuration related information, and this application does not impose any restrictions on this. In another specific embodiment, the network configuration related information may be the UUID (Universally Unique Identifier) of the gateway device or the MAC (Media Access Control Address) address information of the gateway device. The network configuration related information may also be any information that distinguishes the gateway device from other gateway devices, and this application does not impose any restrictions on this.
[0037] The following uses the example of a cloud server as the third-party device and the UUID of a gateway device as the network configuration information to explain how the client obtains network configuration parameters from a broadcast packet through the third-party device.
[0038] (1-1) Enable the client's Bluetooth permission (only for non-wired devices) and WIFI permission, select the gateway device that needs to be configured, and enter the configuration process.
[0039] (1-2) If the gateway device is a Bluetooth device, it scans for Bluetooth advertising packets. The client receives the Bluetooth advertising packets sent by the gateway device and obtains network configuration information through the Bluetooth advertising packets. If the gateway device is a wired device, it scans for service advertising packets (for example, DNS-SD service advertising packets) on the local area network. The client receives the service advertising packets sent by the gateway device and obtains network configuration information through the service advertising packets. The network configuration information includes the UUID.
[0040] (1-3) The client requests the network configuration parameters, such as nodeID, from the cloud server through the UUID of the gateway device.
[0041] (1-4) After receiving the UUID of the gateway device, the cloud server determines or searches for the network configuration parameters through the UUID and sends the network configuration parameters to the client.
[0042] The client obtains the network configuration parameters and writes them to the gateway device through ACL control permissions.
[0043] During the initial network configuration of the gateway device, the process for the client to configure the sub-device corresponding to the gateway device is as follows.
[0044] (2-1) The client obtains the identification of the sub-device that needs to be networked. In a specific embodiment, the client can obtain the identification of the sub-device that needs to be networked by scanning the QR code information on the sub-device, and then know which broadcast information is sent by the sub-device by obtaining the identification of the sub-device.
[0045] (2-2) Enable the client's Bluetooth permission (only for non-wired devices) and WIFI permission, select the gateway device that needs to be configured, and enter the configuration process.
[0046] (2-3) When the sub-device is equipped with a Bluetooth module, it scans for Bluetooth broadcast packets. The client receives the Bluetooth broadcast packets sent by the sub-device and learns from the Bluetooth broadcast packets that the sub-device needs to connect to the network through the gateway device. The Bluetooth broadcast packets of the sub-device include the sub-device's identifier information, for example, the identifier information can be the sub-device's UUID.
[0047] (2-4) The client sends the identifier information of the sub-device to a third-party device (e.g., a cloud server) to obtain the node information of the sub-device in the network. In a specific embodiment, the node information can be the node address information nodeID of the sub-device.
[0048] (2-5) The client uses the UUID of the gateway device obtained during network provisioning to request network configuration parameters, such as the gateway device's nodeID, from the cloud server. During the process of establishing a connection between the client and the gateway device, the client obtains network information from the gateway device. This network information is required for network provisioning for the sub-device. For example, if the sub-device is a thread sub-device, this network information is thread network information.
[0049] (2-6) The client writes the node information and network information of the sub-device into the sub-device.
[0050] (2-7) After receiving the UUID of the gateway device, the cloud server determines or searches for the network configuration parameters through the UUID and sends the network configuration parameters to the client.
[0051] (2-8) The client obtains the network configuration parameters and writes them to the sub-device through ACL control permissions.
[0052] In the above steps (2-5) and (2-7), the client may also configure the network for the sub-device directly using the network configuration parameters of the gateway device stored in the client without obtaining the network configuration parameters through the cloud server.
[0053] After disconnecting the current gateway device from a sub-device and deleting the current gateway device's topology, if network configuration needs to be re-established, the client must use ACL control permissions to write the network configuration parameters to the gateway device. The network configuration parameters used during re-configuration are the same as those used during initial configuration. Sub-devices retain the network configuration parameters used during initial configuration. This allows the gateway device and sub-devices to restore connectivity after deleting the current gateway device and re-establishing network configuration without the client having to use ACL control permissions to write the network configuration parameters to each sub-device individually.
[0054] The Matter protocol-based device relationship self-recovery system of this application maintains the uniqueness and immutability of the network configuration parameters during the initial and reconfiguration processes of the gateway device. During reconfiguration, there is no need to rewrite the network configuration parameters to the sub-devices one by one through ACL control permissions. The gateway device can restore control of the sub-devices by simply writing the network configuration parameters to the sub-devices during the initial configuration, thereby achieving self-recovery of the connection relationship between the gateway device and the sub-device. This greatly simplifies the reconfiguration process and improves the user experience.
[0055] Based on the above-mentioned system for self-recovery of device relationships based on the Matter protocol, according to one aspect of the present application, a method for self-recovery of device relationships based on the Matter protocol is provided, which is applied to the client, such as Figure 2 As shown, the method includes the following steps.
[0056] First, when configuring the gateway device for the first time, the client needs to configure the gateway device for the first time.
[0057] Step S201: Obtain first identification information of a gateway device.
[0058] For a gateway device, the client obtains the identifier of the gateway device requiring network configuration, scans and obtains the broadcast data packet of the gateway device corresponding to the identifier, obtains the network configuration parameters based on the network configuration related information contained in the broadcast data packet, and then configures the gateway device based on the network configuration parameters. In one specific embodiment, the client can obtain the identifier of the gateway device requiring network configuration by scanning the QR code information on the gateway device, and then obtain the gateway device identifier to determine which broadcast information is sent by the gateway device. The identifier can include the device number or device name of the gateway device.
[0059] Step S202: In response to the network reconfiguration request of the gateway device, obtain the network configuration parameters of the gateway device.
[0060] During initial and reconfiguration of a gateway device, the gateway enters configuration mode. For example, a user can press a button on the gateway device to enter configuration mode. The gateway device then sends a broadcast packet. Receiving the broadcast packet indicates that the gateway device has requested network configuration (initial and reconfiguration). The client obtains the network configuration parameters from the broadcast packet sent by the gateway device as follows.
[0061] 1. The client directly obtains the network configuration parameters from the network configuration related information contained in the broadcast data packet.
[0062] In one embodiment, the client obtains network configuration parameters from the network configuration-related information using a predetermined extraction method. In one specific embodiment, the network configuration-related information is the serial number of the gateway device. After receiving the serial number, the client can obtain the network configuration parameters by extracting a segment of data from the serial number, such as the 10th to 19th digits or characters in the serial number. In another specific embodiment, the network configuration-related information is any other information that the gateway device can permanently access, such as a fixed data string. After receiving the data string, the client obtains the network configuration parameters from the data string using a predetermined extraction method.
[0063] In one embodiment, the predetermined extraction method may be a method of intercepting a section of information from the network configuration related information, or extracting information from multiple locations (continuously or discontinuously) from the network configuration related information. The predetermined extraction method is any suitable method, and this application does not impose any restrictions on this, as long as the network configuration parameters obtained from the network configuration related information are the same during the initial network configuration and the re-network configuration process.
[0064] 2. The client obtains the network configuration parameters from the network configuration related information contained in the broadcast data packet through a third-party device.
[0065] Specifically, the client sends the network configuration related information to the third-party device; the third-party device determines the network configuration parameters corresponding to the network configuration related information, for example, directly or by calculation, or searches for the network configuration parameters corresponding to the network configuration related information, and then sends it to the client, and the client obtains the network configuration parameters corresponding to the network configuration related information.
[0066] In one specific embodiment, the third-party device may be a cloud server or any device that can determine or search for network configuration parameters using network configuration related information, and this application does not impose any restrictions on this. In another specific embodiment, the network configuration related information may be the UUID (Universally Unique Identifier) of the gateway device or the MAC (Media Access Control Address) address information of the gateway device. The network configuration related information may also be any information that distinguishes the gateway device from other gateway devices, and this application does not impose any restrictions on this.
[0067] Thus, step S202 includes step S2021 and step S2022:
[0068] Step S2021: Acquire a first broadcast packet sent by a gateway device, where the broadcast packet includes network configuration related information.
[0069] Step S2022: Obtain network configuration parameters through network configuration related information.
[0070] According to one embodiment, step S2022 may further include:
[0071] Step S20221: Acquire network configuration parameters from network configuration related information using a predetermined extraction method.
[0072] According to another embodiment, step S2022 may further include:
[0073] Step S20222: Send network configuration related information to a third-party device;
[0074] Step S20223: Obtain network configuration parameters corresponding to network configuration related information from a third-party device.
[0075] After the client obtains the network configuration parameters of the gateway device, it can write the network configuration parameters to the gateway device through ACL control permissions. Figure 2 The illustrated method further includes:
[0076] Step S203: write the network configuration parameters into the gateway device for Matter network configuration.
[0077] Secondly, when configuring the network for the gateway device for the first time, the client also needs to configure the sub-device for the network.
[0078] For sub-devices, the client also needs to obtain the identifier of the sub-device that requires network configuration, scan and obtain the sub-device's corresponding advertising data packet, which indicates that the sub-device wishes to connect to the network. The sub-device is then configured using the gateway device's network configuration parameters. The client can obtain the identifier of the sub-device that requires network configuration by scanning the QR code on the sub-device. By obtaining the sub-device's identifier, the client can determine which broadcast message originated from the sub-device. This identifier can include the sub-device's device number or name.
[0079] so, Figure 2 The illustrated method may further include:
[0080] Step S204: when the gateway device is initially configured for the network, the second identification information corresponding to the sub-device is obtained.
[0081] In a specific embodiment, when the sub-device is equipped with a Bluetooth module, it scans the Bluetooth broadcast packet, and the client receives the Bluetooth broadcast packet sent by the sub-device, and learns through the Bluetooth broadcast packet that the sub-device needs to connect to the network through the gateway device. The client requests the network configuration parameters used for network configuration, such as nodeID, from the cloud server through the UUID of the gateway device obtained when configuring the network for the gateway device. After receiving the UUID of the gateway device, the cloud server determines or searches for the network configuration parameters through the UUID and sends the network configuration parameters to the client. The client can also configure the sub-device directly using the network configuration parameters of the gateway device stored in its own storage instead of obtaining the network configuration parameters through the cloud server. The client writes the network configuration parameters to the sub-device through the ACL control authority using the obtained network configuration parameters.
[0082] thereby, Figure 2 The illustrated method further includes:
[0083] Step S205: receiving a second broadcast packet sent by the sub-device through the second identification information, where the second broadcast packet indicates that the sub-device needs to establish a network connection through the gateway device;
[0084] Step S206: Write the network configuration parameters corresponding to the gateway device into the sub-device.
[0085] After disconnecting the current gateway device from a sub-device and deleting the current gateway device's topology, if network reconfiguration is required, the client needs to follow steps S201 to S203 to write the network configuration parameters to the gateway device using ACL control permissions. The network configuration parameters used during reconfiguration are the same as those used during initial network configuration. Sub-devices store the network configuration parameters used during initial network configuration. This way, when deleting the current gateway device and reconfiguring the network, the client does not need to write the network configuration parameters to each sub-device using ACL control permissions, and the gateway device and sub-device can still restore the connection.
[0086] When configuring the gateway device for the first time, the client also needs to perform the following process to configure the sub-device.
[0087] The Bluetooth broadcast packet of the sub-device includes the identifier information of the sub-device, for example, the identifier information may be the UUID of the sub-device. The client obtains the identifier information through the broadcast packet of the sub-device. The client then sends the identifier information of the sub-device to a third-party device (such as a cloud server) to obtain the node information of the sub-device in the network. In a specific embodiment, the node information may be the node address information nodeID of the sub-device. In the process of establishing contact between the client and the gateway device, network information is obtained from the gateway device, and the network information is required in the process of configuring the network for the sub-device. For example, in the case where the sub-device is a thread sub-device, the network information is thread network information. Finally, the client writes the node information and network information of the sub-device to the sub-device.
[0088] so, Figure 2 The illustrated method further includes:
[0089] Step S207: Acquire identifier information of the sub-device through the second broadcast packet;
[0090] Step S208: Send the identifier information to a third-party device to obtain node information of the sub-device in the network;
[0091] Step S209, obtaining network information from the gateway device; and
[0092] Step S210: writing the node information and the network information into the sub-device.
[0093] According to the Matter protocol-based device relationship self-recovery method of this application, by maintaining the uniqueness and immutability of the network configuration parameters of the gateway device during initial and re-network configuration, there is no need to re-write the network configuration parameters to the sub-devices through ACL control permissions during re-network configuration. The gateway device can restore control of the sub-devices by using the network configuration parameters written to the sub-devices during initial network configuration, thereby achieving self-recovery of the connection relationship between the gateway device and the sub-device. This greatly simplifies the re-network configuration operation process and improves the user experience.
[0094] On the basis of the above-mentioned system for self-recovery of device relationships based on the Matter protocol, according to another aspect of the present application, a device for self-recovery of device relationships based on the Matter protocol is provided, such as Figure 3 As shown, the device includes the following modules.
[0095] First, when configuring the gateway device for the first time, the client needs to configure the gateway device for the first time.
[0096] The gateway device identification information acquisition module 301 is configured to obtain first identification information of a gateway device.
[0097] For a gateway device, the client obtains the identifier of the gateway device requiring network configuration, scans and obtains the broadcast data packet of the gateway device corresponding to the identifier, obtains the network configuration parameters based on the network configuration related information contained in the broadcast data packet, and then configures the gateway device based on the network configuration parameters. In one specific embodiment, the client can obtain the identifier of the gateway device requiring network configuration by scanning the QR code information on the gateway device, and then obtain the gateway device identifier to determine which broadcast information is sent by the gateway device. The identifier can include the device number or device name of the gateway device.
[0098] The acquisition module 302 is configured to acquire network configuration parameters of the gateway device in response to a network reconfiguration request from the gateway device.
[0099] During initial and reconfiguration of a gateway device, the gateway enters configuration mode. For example, a user can press a button on the gateway device to enter configuration mode. The gateway device then sends a broadcast packet. Receiving the broadcast packet indicates that the gateway device has requested network configuration (initial and reconfiguration). The client obtains the network configuration parameters from the broadcast packet sent by the gateway device as follows.
[0100] 1. The client directly obtains the network configuration parameters from the network configuration related information contained in the broadcast data packet.
[0101] In one embodiment, the client obtains network configuration parameters from the network configuration-related information using a predetermined extraction method. In one specific embodiment, the network configuration-related information is the serial number of the gateway device. After receiving the serial number, the client can obtain the network configuration parameters by extracting a segment of data from the serial number, such as the 10th to 19th digits or characters in the serial number. In another specific embodiment, the network configuration-related information is any other information that the gateway device can permanently access, such as a fixed data string. After receiving the data string, the client obtains the network configuration parameters from the data string using a predetermined extraction method.
[0102] In one embodiment, the predetermined extraction method may be a method of intercepting a section of information from the network configuration related information, or extracting information from multiple locations (continuously or discontinuously) from the network configuration related information. The predetermined extraction method is any suitable method, and this application does not impose any restrictions on this, as long as the network configuration parameters obtained from the network configuration related information are the same during the initial network configuration and the re-network configuration process.
[0103] 2. The client obtains the network configuration parameters from the network configuration related information contained in the broadcast data packet through a third-party device.
[0104] Specifically, the client sends the network configuration related information to the third-party device; the third-party device determines the network configuration parameters corresponding to the network configuration related information, for example, directly or by calculation, or searches for the network configuration parameters corresponding to the network configuration related information, and then sends it to the client, and the client obtains the network configuration parameters corresponding to the network configuration related information.
[0105] In one specific embodiment, the third-party device may be a cloud server or any device that can determine or search for network configuration parameters using network configuration related information, and this application does not impose any restrictions on this. In another specific embodiment, the network configuration related information may be the UUID (Universally Unique Identifier) of the gateway device or the MAC (Media Access Control Address) address information of the gateway device. The network configuration related information may also be any information that distinguishes the gateway device from other gateway devices, and this application does not impose any restrictions on this.
[0106] Thus, the acquisition module 302 includes a first acquisition unit 3021 and a second acquisition unit 3022:
[0107] The first acquiring unit 3021 is configured to acquire a first broadcast packet sent by a gateway device, where the broadcast packet includes network configuration related information.
[0108] The second acquiring unit 3022 is configured to acquire network configuration parameters through network configuration related information.
[0109] According to one embodiment, the second acquiring unit 3022 may further include:
[0110] The first acquiring subunit 30221 is configured to acquire network configuration parameters from network configuration related information using a predetermined extraction method.
[0111] According to another embodiment, the second acquiring unit 3022 may further include:
[0112] The sending subunit 30222 is used to send the network configuration related information to a third-party device;
[0113] The second acquiring subunit 30223 is configured to acquire network configuration parameters corresponding to network configuration related information from a third-party device.
[0114] After the client obtains the network configuration parameters of the gateway device, it can write the network configuration parameters to the gateway device through ACL control permissions. Figure 3 The apparatus shown also includes:
[0115] The first writing module 303 is used to write the network configuration parameters into the gateway device for Matter network configuration.
[0116] Secondly, when configuring the network for the gateway device for the first time, the client also needs to configure the sub-device for the network.
[0117] For sub-devices, the client also needs to obtain the identifier of the sub-device that requires network configuration, scan and obtain the sub-device's corresponding advertising data packet, which indicates that the sub-device wishes to connect to the network. The sub-device is then configured using the gateway device's network configuration parameters. The client can obtain the identifier of the sub-device that requires network configuration by scanning the QR code on the sub-device. By obtaining the sub-device's identifier, the client can determine which broadcast message originated from the sub-device. This identifier can include the sub-device's device number or name.
[0118] so, Figure 3 The apparatus shown may also include:
[0119] The sub-device identification information acquisition module 304 is used to obtain the second identification information corresponding to the sub-device when the gateway device is initially configured for the network.
[0120] In a specific embodiment, when the sub-device is equipped with a Bluetooth module, it scans the Bluetooth broadcast packet, and the client receives the Bluetooth broadcast packet sent by the sub-device, and learns through the Bluetooth broadcast packet that the sub-device needs to connect to the network through the gateway device. The client requests the network configuration parameters used for network configuration, such as nodeID, from the cloud server through the UUID of the gateway device obtained when configuring the network for the gateway device. After receiving the UUID of the gateway device, the cloud server determines or searches for the network configuration parameters through the UUID and sends the network configuration parameters to the client. The client can also configure the sub-device directly using the network configuration parameters of the gateway device stored in its own storage instead of obtaining the network configuration parameters through the cloud server. The client writes the network configuration parameters to the sub-device through the ACL control authority using the obtained network configuration parameters.
[0121] thereby, Figure 3 The apparatus shown also includes:
[0122] A receiving module 305 is configured to receive a second broadcast packet sent by a sub-device when the gateway device is initially configured with the second identification information, wherein the second broadcast packet indicates that the sub-device needs to establish a network connection through the gateway device;
[0123] The second writing module 306 is configured to write the network configuration parameters corresponding to the gateway device into the sub-device.
[0124] After disconnecting the current gateway device from a sub-device and deleting the current gateway device's topology, if network configuration needs to be re-established, the client must use ACL control permissions to write the network configuration parameters to the gateway device. The network configuration parameters used during re-configuration are the same as those used during initial configuration. Sub-devices retain the network configuration parameters used during initial configuration. This allows the gateway device and sub-devices to restore connectivity after deleting the current gateway device and re-establishing network configuration without the client having to use ACL control permissions to write the network configuration parameters to each sub-device individually.
[0125] When configuring the gateway device for the first time, the client also needs to perform the following process to configure the sub-device.
[0126] The Bluetooth broadcast packet of the sub-device includes the identifier information of the sub-device, for example, the identifier information may be the UUID of the sub-device. The client obtains the identifier information through the broadcast packet of the sub-device. The client then sends the identifier information of the sub-device to a third-party device (such as a cloud server) to obtain the node information of the sub-device in the network. In a specific embodiment, the node information may be the node address information nodeID of the sub-device. In the process of establishing contact between the client and the gateway device, network information is obtained from the gateway device, and the network information is required in the process of configuring the network for the sub-device. For example, in the case where the sub-device is a thread sub-device, the network information is thread network information. Finally, the client writes the node information and network information of the sub-device to the sub-device.
[0127] so, Figure 3 The apparatus shown also includes:
[0128] an identifier information obtaining module 307, configured to obtain the identifier information of the sub-device through the second broadcast packet;
[0129] The node information acquisition module 308 is used to send the identifier information to a third-party device to obtain the node information of the sub-device in the network;
[0130] A network information acquisition module 309 is configured to acquire network information from the gateway device; and
[0131] The third writing module 310 is configured to write the node information and the network information into the sub-device.
[0132] According to the Matter protocol-based device relationship self-recovery device of this application, by maintaining the uniqueness and immutability of the network configuration parameters of the gateway device during initial and re-network configuration, there is no need to re-write the network configuration parameters to the sub-devices through ACL control permissions during re-network configuration. The gateway device can restore control of the sub-devices by writing the network configuration parameters to the sub-devices during the initial network configuration, thereby achieving self-recovery of the connection relationship between the gateway device and the sub-device. This greatly simplifies the re-network configuration operation process and improves the user experience.
[0133] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0134] See Figure 4 , Figure 4 An electronic device is provided, comprising a processor and a memory. The memory stores computer instructions, and when the computer instructions are executed by the processor, the processor executes the computer instructions to achieve the following Figure 2 The method and refinement scheme shown.
[0135] It should be understood that the above-described device embodiments are merely illustrative, and the devices disclosed herein may also be implemented in other ways. For example, the division of units / modules described in the above-described embodiments is merely a logical functional division, and actual implementations may employ alternative divisions. For example, multiple units, modules, or components may be combined or integrated into another system, or some features may be omitted or not implemented.
[0136] In addition, unless otherwise specified, the functional units / modules in the various embodiments of the present invention may be integrated into a single unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The aforementioned integrated units / modules may be implemented in the form of hardware or software program modules.
[0137] If the integrated unit / module is implemented in hardware, the hardware may be a digital circuit, an analog circuit, or the like. The physical implementation of the hardware structure includes, but is not limited to, transistors, memristors, and the like. Unless otherwise specified, the processor or chip may be any appropriate hardware processor, such as a CPU, GPU, FPGA, DSP, and ASIC. Unless otherwise specified, the on-chip cache, off-chip memory, and storage may be any appropriate magnetic storage medium or magneto-optical storage medium, such as resistive random access memory (RRAM), dynamic random access memory (DRAM), static random access memory (SRAM), enhanced dynamic random access memory (EDRAM), high-bandwidth memory (HBM), hybrid memory cube (HMC), and the like.
[0138] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned memory includes: various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0139] The present application also provides a non-transitory computer storage medium storing a computer program, which, when executed by multiple processors, causes the processors to execute the following Figure 2 The method and refinement scheme shown.
[0140] According to this application's Matter protocol-based device relationship self-recovery solution, by maintaining the uniqueness and immutability of the network configuration parameters during the gateway device's initial and reconfiguration processes, there's no need to rewrite the network configuration parameters to sub-devices one by one through ACL control permissions during reconfiguration. The gateway device can restore control of the sub-devices by simply writing the network configuration parameters to the sub-devices during initial configuration, thereby achieving self-recovery of the connection relationship between the gateway device and the sub-device. This greatly simplifies the reconfiguration process and improves the user experience.
[0141] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. At the same time, changes or modifications made by those skilled in the art based on the ideas of the present application, the specific implementation methods, and the scope of application of the present application, all fall within the scope of protection of the present application. In summary, the contents of this specification should not be construed as limiting the present application.
Claims
1. A device relationship self-recovery method based on the Matter protocol, applied to the client, characterized in that: include: In response to a re-network configuration request from a gateway device, obtaining network configuration parameters of the gateway device, wherein the network configuration parameters are uniquely corresponding to the gateway device and are the same as the network configuration parameters used when the gateway device was initially configured; Writing the network configuration parameters into the gateway device for Matter network configuration, so that the gateway device restores the network connection with the sub-device through the network configuration parameters, wherein the sub-device is a thread sub-device and the sub-device stores the network configuration parameters used by the gateway device during the initial network configuration; The method further comprises: When the gateway device is initially configured for the network, obtaining second identification information corresponding to the sub-device; receiving a second broadcast packet sent by the sub-device through the second identification information, where the second broadcast packet indicates that the sub-device needs to establish a network connection through the gateway device; Writing the network configuration parameters corresponding to the gateway device into the sub-device; Acquire identifier information of the sub-device through the second broadcast packet; Sending the identifier information to a third-party device to obtain node information of the sub-device in the network; Acquiring network information from the gateway device; and The node information and the network information are written into the sub-device, wherein the network information is thread network information.
2. The method according to claim 1, wherein The obtaining of the network configuration parameters of the gateway device includes: Obtaining a first broadcast packet sent by the gateway device, where the broadcast packet includes network configuration related information; The network configuration parameters are obtained through the network configuration related information.
3. The method according to claim 2, wherein The obtaining of the network configuration parameters through the network configuration related information includes: The network configuration parameters are obtained from the network configuration related information in a predetermined extraction manner.
4. The method according to claim 2, wherein The obtaining of the network configuration parameters through the network configuration related information includes: Sending the network configuration related information to a third-party device; The network configuration parameters corresponding to the network configuration related information are obtained from the third-party device.
5. The method according to claim 4, wherein The third-party device includes a cloud server, and the network configuration related information includes UUID or MAC address information of the gateway device.
6. A device relationship self-recovery device based on the Matter protocol, characterized in that: include: an acquisition module, configured to acquire, in response to a network reconfiguration request from a gateway device, network configuration parameters of the gateway device, wherein the network configuration parameters are uniquely corresponding to the gateway device and are the same as the network configuration parameters used when the gateway device was initially configured; A first writing module is configured to write the network configuration parameters into the gateway device for Matter network configuration, so that the gateway device restores the network connection with the sub-device through the network configuration parameters, wherein the sub-device is a thread sub-device and the sub-device stores the network configuration parameters used by the gateway device during the initial network configuration; The device further comprises: A sub-device identification information acquisition module, configured to obtain the second identification information corresponding to the sub-device when the gateway device is initially configured for the network; a receiving module, configured to receive a second broadcast packet sent by the sub-device through the second identification information, where the second broadcast packet indicates that the sub-device needs to establish a network connection through a gateway device; A second writing module is used to write the network configuration parameters corresponding to the gateway device into the sub-device; an identifier information acquiring module, configured to acquire the identifier information of the sub-device through the second broadcast packet; A node information acquisition module, configured to send the identifier information to a third-party device to obtain node information of the sub-device in the network; A network information acquisition module, configured to acquire network information from the gateway device; and A third-party writing module is used to write the node information and the network information into the sub-device, wherein the network information is thread network information.
7. A device relationship self-recovery system based on the Matter protocol, comprising a gateway device, a sub-device, and a client, characterized in that: The gateway device sends a first broadcast packet, where the first broadcast packet includes network configuration related information, where the network configuration related information is used to obtain network configuration parameters of the gateway device; The sub-device sends a second broadcast packet, where the second broadcast packet includes identifier information of the sub-device, where the identifier information is used to obtain node information of the sub-device in the network and save network configuration parameters used by the gateway device during initial network configuration, where the network configuration parameters are used to establish a network connection between the sub-device and the gateway device; and The client executes the method according to any one of claims 1 to 5.
8. An electronic device comprising: processor; as well as A memory storing computer instructions, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 5.
9. A non-transitory computer storage medium storing a computer program, which, when executed by a plurality of processors, causes the processors to perform the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent gateway engineering installation data recovery method and device
CN111130869A