A method, device, equipment and medium for network configuration of Internet of Things equipment

By dynamically updating the Install Code information table and optimizing the distribution network process, the problem of low flexibility and misallocation network in the Zigbee network is solved, and a safe and efficient batch equipment distribution network is realized, which improves the applicability and distribution of the Zigbee gateway Network efficiency.

CN114584974BActive Publication Date: 2024-12-31HANGZHOU TUYA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210240292.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-10
Publication Date
2024-12-31
Estimated Expiration
2042-03-10

AI Technical Summary

Technical Problem

In Zigbee network, the existing Install Code technology has low flexibility in static preset write-in method, which leads to high mechanical and time-consuming deployment of large-scale equipment. It is easy to misconfigure networks in multiple gateway environments, which cannot meet the intelligence to transform new demands.

Method used

By dynamically updating the Install Code information table, using the preset protocol stack for information matching and key transmission, optimizing the equipment access process, ensuring safe access to batch equipment, and avoiding misconfiguration of networks in a multi-gateway environment, improving network allocation efficiency.

Benefits of technology

It realizes a safe and efficient batch equipment distribution network, reduces the redistribution rate and network load, improves the distribution network speed and stability, expands the applicable market of Zigbee gateways, and simplifies the operation process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114584974B_ABST
    Figure CN114584974B_ABST
Patent Text Reader

Abstract

The present application discloses a network configuration method, device, equipment and medium for IoT devices, which are applied to IoT gateways, including: obtaining target information of the device to be connected to the network, and matching the target information with each information in the target information table stored in the preset protocol stack; the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on preset dynamic update rules; if the match is successful, the network layer interaction key and the application layer link key are sent to the device to be connected to the network to complete the network configuration operation of the device to be connected to the network; when the device to be connected to the network has completed the network configuration operation, the device to be connected to the network is marked as a device that has been connected to the network, and the endpoint information and cluster information corresponding to the device that has been connected to the network are obtained. This solution optimizes the Zigbee technology, realizes the rapid and accurate network access of batch devices under security performance, and substantially improves the practicality and practicability of the Zigbee gateway.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things, and in particular to a method, device, equipment and medium for network configuration of Internet of Things equipment. Background Art

[0002] Install Code technology (hereinafter referred to as IC) in the Zigbee (Zifeng) ecosystem is an advanced security mode in the Zigbee3.0 specification proposed by the Zigbee Alliance in 2015. It adds the update of the link key of the trusted center when the node enters the network, and realizes the local acquisition of the IC of a single device and the sending of the LAN in the process of transmission key configuration. That is, through the "one machine, one key" method, the protection of the network key and link key of the single device in the process of network access is specifically ensured. However, the use of IC technology in the existing technology is generally a static preset hard-coded method, and its flexibility is extremely low.

[0003] The concept of "Trust Center" is introduced in the field of Zigbee network security. In a centralized network environment with a gateway coordinator as the Trust Center, nodes joining the network is a link with a large amount of interactive data. Large-scale batch equipment configuration is very likely to cause data "network storms", packet loss, retransmission, distortion, relay, broadcast, and insufficient hardware attributes. The problems lead to multiple steps of repetition of the configuration progress of a single device. As the number of devices increases, the network situation worsens. Moreover, in the case of multiple gateways, user needs are expected to specify some devices to join a specific gateway. When multiple gateways are turned on for configuration at the same time, there is no basis for matching the devices accordingly, resulting in confusion in the configuration of devices in the multi-gateway batch configuration environment. Based on the current system framework, users can only configure the devices in batches and time periods, which is less practical.

[0004] It can be seen from the above that in the process of large-scale equipment network configuration, the high mechanical, time-consuming and misconfigured operation characteristics cannot meet the new needs of large-scale product intelligence, which is a problem to be solved in this field. Summary of the invention

[0005] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for network configuration of IoT devices, which can ensure the safe network access of batch devices, solve the problem of misconfiguration under multiple gateways, and optimize the process sequence of device network access, which has substantial improvements in the practicality and practicability of Zigbee technology. The specific scheme is as follows:

[0006] In a first aspect, the present application discloses a method for configuring a network for an IoT device, which is applied to an IoT gateway and includes:

[0007] Obtain target information of the device to be connected to the network, and match the target information with various information in the target information table stored in the preset protocol stack; the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on a preset dynamic update rule;

[0008] If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be connected to the network to complete the network configuration operation for the device to be connected to the network;

[0009] When the network configuration operation is completed for the device to be networked, the device to be networked is marked as a networked device, and endpoint information and cluster information corresponding to the networked device are obtained.

[0010] Optionally, before acquiring target information of the device to be connected to the network and matching the target information with each item of target information in the target information table stored in the preset protocol stack, the method further includes:

[0011] Acquire single information for matching with target information through a preset information acquisition interface;

[0012] The single item of information is added to a target information table in a preset protocol stack based on a preset dynamic update rule, so as to dynamically update the information in the target information table.

[0013] Optionally, before acquiring target information of the device to be connected to the network and matching the target information with each item of target information in the target information table stored in the preset protocol stack, the method further includes:

[0014] Obtaining a beacon request instruction sent by the device to be connected to the network, and returning a beacon reply message containing network information to the device to be connected to the network; the network information contains network identifier information corresponding to the current gateway and associated permission information;

[0015] Acquire association information sent by the device to be connected to the network for requesting the media access control layer to allocate a network address, and return association reply information containing the network address corresponding to the device to be connected to the network to enable the device to communicate data using the network address.

[0016] Optionally, the sending a network layer interaction key and an application layer link key to the device to be connected to the network includes:

[0017] Sending a network layer interaction key uniquely corresponding to the device to be connected to the network to be connected;

[0018] A key request for an application layer link key sent by the device to be connected to the network is received, and the key request is responded to so as to send the application layer link key uniquely corresponding to the device to be connected to the network to the device to be connected to the network.

[0019] Optionally, after sending the network layer interaction key and the application layer link key to the device to be connected to the network, the method further includes:

[0020] Read the basic properties of the device to be connected to the network;

[0021] The basic properties of the device are sent to a preset software terminal that is pre-bound to the gateway through a preset software interaction interface, and information indicating that the network configuration of the device to be connected to the network is successful is returned to the preset software terminal.

[0022] Optionally, after sending the basic attributes of the device to a preset software terminal pre-bound to a gateway through a preset software interaction interface, and returning information indicating successful network configuration of the device to be networked and the basic attribute information of the device to be networked to the preset software terminal, the method further includes:

[0023] The target information corresponding to the device to be networked is deleted from the target information table in the preset protocol stack.

[0024] Optionally, after acquiring the endpoint information and cluster information corresponding to the networked device, the method further includes:

[0025] Periodically interact with the networked device via heartbeat data according to a preset period to ensure the normal operation of the networked device.

[0026] In a second aspect, the present application discloses an IoT device network configuration device, comprising:

[0027] An information matching module is used to obtain target information of the device to be connected to the network, and match the target information with various information in the target information table stored in the preset protocol stack; the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on a preset dynamic update rule;

[0028] A key sending module is used to send a network layer interaction key and an application layer link key to the device to be connected to the network if the match is successful, so as to complete the network configuration operation of the device to be connected to the network;

[0029] The network configuration completion module is used to mark the device to be connected to the network as a device that has been connected to the network when the network configuration operation has been completed for the device to be connected to the network, and to obtain the endpoint information and cluster information corresponding to the device that has been connected to the network.

[0030] In a third aspect, the present application discloses an electronic device, comprising:

[0031] Memory, used to store computer programs;

[0032] The processor is used to execute the computer program to implement the aforementioned method for configuring the Internet of Things devices.

[0033] In a fourth aspect, the present application discloses a computer storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned disclosed method for configuring a network for an IoT device are implemented.

[0034] The present application first obtains the target information of the device to be connected to the network, and matches the target information with the information in the target information table stored in the preset protocol stack, wherein the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network, and the target information table is an information table updated based on the preset dynamic update rules. If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be connected to the network to complete the network configuration operation of the device to be connected to the network. When the device to be connected to the network has completed the network configuration operation, the device to be connected to the network is marked as a networked device, and the endpoint information and cluster information corresponding to the networked device are obtained. On the premise of improving and combining the existing IC technology, this solution realizes the security network access guarantee for batch devices, and solves the misconfiguration phenomenon under multiple gateways in parallel. This solution also optimizes the timing of the cloud registration process when the device is fully connected to the network, avoids the repeated execution of non-critical interaction steps in the intermediate process of failed network configuration, reduces the reconfiguration rate of a single device in the network configuration, reduces the number of two-way packets sent by gateway devices, reduces network load, and reduces the number of manual network configuration operations. In large-scale equipment distribution, it has higher security, more stable network performance, and faster distribution speed. The processing of multiple optimization methods realizes the expected solution of fast and error-free network access of batch equipment under safety performance, greatly expands the applicable market of Zigbee gateways, reduces the number of possible erroneous operations, shortens the working hours of operators, and has substantial improvements in practicality and practicability. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the embodiments of the present invention 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 invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0036] Figure 1 A flow chart of a method for configuring a network for an Internet of Things device provided in this application;

[0037] Figure 2 An IC information flow diagram provided for this application;

[0038] Figure 3 A flow chart of a specific method for configuring a network for an IoT device provided in this application;

[0039] Figure 4 An overall flow chart of the steps for optimizing network distribution provided in this application;

[0040] Figure 5 A schematic diagram of the structure of an IoT device network configuration device provided in this application;

[0041] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION

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

[0043] In the prior art, the Zigbee gateway communicates based on the Zigbee 3.0 secure encryption method. Although the network configuration method combined with IC technology can ensure the transmission security of NWK (Network key), the static preset hard-coded method has extremely low flexibility. The prior art also has the phenomenon of time-consuming due to the strict timing division of the successful steps of the network configuration behavior. In this application, on the premise of improving and combining the existing IC technology, the timing of the cloud registration process when the device is fully connected to the network is optimized, the safe network access of batch devices is guaranteed, the network load is reduced, and the number of manual network configuration operations is reduced. In large-scale equipment network configuration, it has higher security, faster network configuration speed, and more stable network performance.

[0044] The embodiment of the present invention discloses a method for configuring a network for an Internet of Things device, which is applied to an Internet of Things gateway. Figure 1 Said method comprises:

[0045] Step S11: Obtain target information of the device to be connected to the network, and match the target information with various information in the target information table stored in the preset protocol stack; the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on preset dynamic update rules.

[0046] In this embodiment, before obtaining the target information of the device to be connected to the network and matching the target information with the target information of each item in the target information table stored in the preset protocol stack, it can also include: obtaining the beacon request instruction sent by the device to be connected to the network, and returning the beacon reply information containing network information to the device to be connected to the network; the network information contains the network identifier information and associated permission information corresponding to the current gateway; obtaining the associated information sent by the device to be connected to request the media access control layer to allocate a network address, and returning the associated reply information containing the network address corresponding to the device to be connected to the device to be connected to enable the device to use the network address for data communication. It can be understood that the above is the process of exchanging beacon information and MAC association with the device to be connected after the gateway creates the network.

[0047] In this embodiment, before obtaining the target information of the device to be connected to the network and matching the target information with each target information in the target information table stored in the preset protocol stack, it can also include: obtaining a single item of information for matching with the target information through a preset information acquisition interface; adding the single item of information to the target information table in the preset protocol stack based on preset dynamic update rules to dynamically update the information in the target information table.

[0048] It should be pointed out that in the prior art, Zigbee gateways communicate based on Zigbee 3.0 secure encryption. In order to avoid the default link with a public default key in the encrypted transmission of ordinary centralized network configuration, IC information is preset in a single device before configuration, and dynamic methods such as gateway IC information preset hard-coded, QR code scanning, multi-protocol Bluetooth, and NFC (NearField Communication) are provided for the gateway to obtain single device IC information. During the configuration process, when the sub-device detects the existing key, it will give priority to using the key as the encryption key of NWK. Although this configuration method can ensure the transmission security of NWK, it has extremely low flexibility due to the static preset hard-coded method.

[0049] In this embodiment, an optimization method for using IC technology is proposed, which improves the flexibility of network distribution by dynamically updating target information by dynamic addition and dynamic deletion. It can be understood that the target information can be IC information.

[0050] In a specific implementation, the preset dynamic update rule of IC information is as follows:

[0051] Preset IC information inside each device to be connected to the network, and transmit the IC information to the preset APP (i.e., Application) end in the form of a QR code or NFC. The APP end can obtain IC information for batch devices at one time, and each device to be connected to the network has different IC information to ensure "one machine, one secret". After the APP end obtains the IC information, if there is no wide area network, the APP end stores it locally, and if there is a wide area network, it is uploaded to the cloud for data storage. Because the IC information is stored locally or in the cloud, batch IC information acquisition and gateway binding can be performed immediately, or at other times. When the gateway is bound to the LAN, the IC information stored locally or in the cloud is synchronized to the gateway by the APP or the cloud. After the gateway is turned on for network configuration, the batch of devices are turned on synchronously to enter the network configuration state, and when the network configuration is triggered on the APP end, the single IC information in the batch IC information stored in the gateway is cyclically added to the NCP (i.e., Network Control Protocol) protocol stack in sequence, and the NCP retains the batch IC information and completes the network configuration interaction with the sub-devices to be connected to the network. Furthermore, due to the limited memory space of the NCP hardware and the maximum number limit of the IC table, after a single device successfully joins the network, the single IC information of the device becomes invalid. If the single IC information of the device still exists, it will occupy a certain amount of memory space and also affect the IC information matching rate during the device joining the network. The single IC information needs to be deleted from the application. It is understandable that when the NCP is added periodically, the information table in the NCP will also be updated. Due to the limited memory space of the NCP, the added IC information will also have an aging time period. After the cycle time, the IC information will be automatically deleted. It should be pointed out that the gateway will periodically clear the old NCP and IC information table, and synchronously update the IC batch information operation to maintain the gateway end in the network-accessible state of the IC information table. The device to be connected to the network described in this embodiment can be a Zigebee sub-device.

[0052] like Figure 2 The figure shows an IC information flow diagram proposed in this application. The figure shows that after the network configuration is triggered on the APP side, the received information list is transmitted from the gateway SDK (Software Development Kit) to the gateway application, and in this process the information list is converted into an IC list. Then, when the information list is an empty list or the preset network configuration time is reached, the IC information cycle is added to the preset NCP protocol stack through the timer by interruption.

[0053] It can be understood that this embodiment involves the interaction of the preset APP end, the gateway and the device to be connected to the network. In this step, the gateway obtains the target information uniquely corresponding to the device to be connected to the network, and then compares and matches the target information with the target information table stored in the preset protocol stack. In a specific implementation, the target information is the above-mentioned IC information, and the target information table is the above-mentioned IC information table.

[0054] Step S12: If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be networked, so as to complete the network configuration operation for the device to be networked.

[0055] In this embodiment, sending the network layer interaction key and the application layer link key to the device to be connected may include: sending the network layer interaction key that uniquely corresponds to the device to be connected to the device to be connected; receiving a key request for the application layer link key sent by the device to be connected, and responding to the key request to send the application layer link key that uniquely corresponds to the device to be connected to the device to be connected.

[0056] The MAC (medium access control) layer security mechanism under Zigbee technology still uses the eight security sets of IEEE802.15.4, which provide different types of security attributes and security guarantees. The Zigbee security architecture supplements and improves the MAC layer security standard. The network layer based on the link layer mainly uses link keys and network keys to encrypt and decrypt application layer data and network layer data respectively. In a centralized network, link keys and network keys are created, iterated and sent by the gateway in the role of coordinator. Some parameter setting interfaces are exposed from the protocol stack for the application layer to develop relevant parameter configurations, so as to ensure the security of data interaction from the perspective of device application development. Under the "Trust Center" centralized model, in the Zigbee sub-device network configuration process, the gateway acts as the coordinator of the entire network and has the functions of establishing a new network, sending network beacons, creating, distributing and iterating keys in the network, managing nodes in the network, and storing network information. In the process of routing nodes (Route Device) and terminal nodes (End Device) joining the coordinator in the network, a large amount of data interaction occurs, and retransmission response timing problems are prone to occur after packet loss. At present, the zigbee3.0 standard only confirms network access after all necessary data interactions are completed, and the application performs cloud registration. Large-scale batch devices are connected to the network, causing a lot of time delays, and device registration on the APP side is time-consuming.

[0057] In this embodiment, after the gateway matches the IC information, encrypts the network layer key NWK, and sends it to the device as the network layer interaction key, the Link key interaction process between the two parties will be carried out. It should be pointed out that in the Zigbee3.0 standard specification, the device will only perform Link key request / response key interaction after completing Match ep request / response, Active ep request / response, and SimpleDescriptor request / response after entering the network. If this step is lost, it is determined that the network configuration has failed. In this solution, this process is optimized. After completing the network layer key interaction, the gateway does not perform related endpoint operations, but only waits for the device's Link key request. After a certain time parameter, if the device requests the Link key and responds successfully, the standard endpoint (i.e., endpoint) and cluster (i.e., cluster) operation process will continue. If the device request or the gateway fails to respond to the Link key, the gateway kicks the device and makes the device re-enter the network configuration action of the association request. It can be understood that the network layer interaction key described in this embodiment includes but is not limited to the Network key, and the application layer link key includes but is not limited to the Link key.

[0058] In the prior art, the information interaction of Zigbee devices accessing the network involves channel information scanning, association request / response, NWK transmission, device Announce, information acquisition of related endpoints and clusters, LNK (i.e. Link key) transmission and acquisition of application attributes. In the standard logic, the above steps are completed to confirm the completion of the network configuration action of a single device, and the device record information is created in the gateway, and then the cloud information registration is performed, and the cycle is repeated in sequence in the case of multiple devices. This method has strict timing issues for the device access, interaction, and registration process, but in the information interaction at the Zigbee level, not all the information is necessary for cloud registration. The optimization of this step obtains and distributes the application layer key Link key information in Zigbee in advance while reducing the intermediate packet sending, and then determines the process direction according to the success or failure of the key key information (i.e. the application layer key Link key information), avoiding the situation where the interaction in the intermediate process has been completed, but the key key information is lost at the end, resulting in the gateway kicking out and re-networking.

[0059] Step S13: When the network configuration operation of the device to be connected to the network is completed, the device to be connected to the network is marked as a networked device, and the endpoint information and cluster information corresponding to the networked device are obtained.

[0060] This embodiment obtains endpoint information and clusters information only after application layer key interaction, thereby achieving early acquisition of key critical information in the method, avoiding repetition of non-critical interaction steps in the intermediate process of failed network configuration, avoiding the occurrence of misconfiguration, and improving network configuration efficiency.

[0061] In this embodiment, after acquiring the endpoint information and cluster information corresponding to the networked device, the method may further include: performing periodic heartbeat data interaction with the networked device according to a preset period to ensure the normal operation of the networked device.

[0062] The purpose of the present invention is to achieve more significant results in the centralized secure networking of large-scale equipment in the secure use scenarios of large-scale Zigbee terminal device nodes such as shopping mall lighting, smart buildings, government offices, and high-density institutions, while not affecting the user experience of families, individuals, and small batches of equipment users.

[0063] This embodiment first obtains the target information of the device to be connected to the network, and matches the target information with the information in the target information table stored in the preset protocol stack, wherein the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network, and the target information table is an information table updated based on the preset dynamic update rules. If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be connected to the network to complete the network configuration operation of the device to be connected to the network. When the device to be connected to the network has completed the network configuration operation, the device to be connected to the network is marked as a networked device, and the endpoint information and cluster information corresponding to the networked device are obtained. In this way, this embodiment optimizes the related processes with strict timing division based on the preset IC information table in the Zigbee network configuration process in the prior art, dynamically updates the IC information table in the protocol stack, and obtains and distributes the key key information of the application layer key Link key information in Zigbee in advance, and finally obtains the endpoint information and cluster information, subdividing the key key information of the Zigbee layer network configuration, avoiding the repeated execution of non-critical interaction steps in the intermediate process of failed network configuration, and avoiding the "misconfiguration" phenomenon under multiple gateways. It reduces the reconfiguration rate of a single device in the network configuration, reduces the number of two-way packets sent by gateway devices, reduces the network load, and can greatly improve the registration rate of the network configuration APP end and the success rate of a single manual operation in large-scale device network configuration, with higher security, more stable network performance, and faster network configuration speed.

[0064] Figure 3 A flow chart of a specific method for configuring a network for an IoT device provided in an embodiment of the present application. Figure 3 As shown, the method includes:

[0065] Step S21: Obtain target information of the device to be connected to the network, and match the target information with various information in the target information table stored in the preset protocol stack; the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on preset dynamic update rules.

[0066] Step S22: If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be networked, so as to complete the network configuration operation for the device to be networked.

[0067] It should be pointed out that in this embodiment, after completing the network layer interactive key interaction, the gateway does not perform related endpoint operations, but only waits for the device's Link key request. After a certain time parameter, if the device requests the Link key and responds successfully, the standard endpoint and cluster operation process will continue. If the device request or the gateway responds to the Link key fails, the gateway kicks out the device and makes the device re-enter the network configuration step of the association request. In this embodiment, the application layer key Link key information in Zigbee is obtained and distributed in advance while reducing the intermediate packet sending, and then the process direction is determined according to the success or failure of the key key information (i.e., the application layer link key Link key information), avoiding the situation where the intermediate process interaction has been completed, but the key key information is lost at the end, resulting in the gateway kicking out and re-network configuration at the end.

[0068] Step S23: Read the basic attributes of the device to be connected to the network.

[0069] In the prior art, in the Zigbee 3.0 standard specification, the gateway reads the attributes of the device through ReadBasic. The process starts with the first reading after all Zigbee information interactions in the network configuration are completed, and the gateway reports to the cloud, registers the device, and displays the device interface on the APP. From the user's perspective, the display on the APP is the completion of the network configuration. However, when there are a large number of devices, due to the logical timing of the standard steps, the key information of the attributes Attribute required by the APP is read at the end of the entire process, and its display rate is extremely slow. In this method, this process is optimized, and the device attributes are read after the application layer key Link key is distributed.

[0070] Step S24: sending the basic attributes of the device to a preset software terminal pre-bound to the gateway through a preset software interactive interface, and returning information indicating that the network configuration of the device to be connected to the network is successful to the preset software terminal.

[0071] It is understandable that after the gateway receives the response of all the attributes of the device, it has met all the key attribute information requirements of the device registration and display on the APP side, and the device registration is performed. After reading the attributes, the APP side will display that the device has been networked, and then the standard endpoint and cluster operation process will be carried out. The basic attributes of the device in this embodiment are the key attribute information, including but not limited to on / off, brightness, color, power and other attributes.

[0072] In this embodiment, after sending the basic properties of the device to a preset software end that is pre-bound to the gateway through a preset software interaction interface, and returning information indicating successful network configuration of the device to be connected and the basic property information of the device to be connected to the preset software end, it can also include: deleting the target information corresponding to the device to be connected in the target information table in the preset protocol stack.

[0073] Step S25: When the network configuration operation of the device to be connected to the network is completed, the device to be connected to the network is marked as a networked device, and the endpoint information and cluster information corresponding to the networked device are obtained.

[0074] Figure 4 This is an overall flow chart of the steps for optimizing network configuration proposed in this application. The figure shows the information interaction process between the gateway as a coordinator and the device to be connected to the network, that is, after the gateway and the device to be connected perform channel scanning, MAC association request / response, device Announce and other interaction processes, the gateway matches the IC information and distributes the network layer key to the device to be connected based on the "one machine and one secret" mechanism. After obtaining the request for the application layer interaction key sent by the device to be connected within a certain period of time, the application layer interaction key corresponding to the above-mentioned device to be connected is sent to the device to be connected, and then the attribute information of the device to be connected is read. The read device attribute information is used to report to the cloud and register on the cloud, and finally the above-mentioned attribute information is displayed on the APP side, and the registration callback is used to delete the IC single item information corresponding to the current device to be connected to the network. Furthermore, after receiving the response to all attribute information, the gateway will obtain the endpoint (i.e., ep in the figure) information and clusters information, and finally use periodic heartbeat data interaction to maintain the normal operation of the device to be connected to the network. When the key information interaction based on link key interaction fails or the attribute key information interaction based on device attribute reading fails, it means that the key information interaction has failed, and the device will be kicked out of the gateway and re-provisioning.

[0075] This embodiment first obtains the target information of the device to be connected to the network, and matches the target information with the information in the target information table stored in the preset protocol stack, wherein the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network, and the target information table is an information table updated based on preset dynamic update rules. If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be connected to the network to complete the network configuration operation of the device to be connected to the network. Then, the basic attributes of the device to be connected to the network are read, and the basic attributes of the device to be connected to the network are sent to the preset software end that is pre-bound to the gateway through the preset software interaction interface, and information indicating that the network configuration of the device to be connected to the network is successful is returned to the preset software end. Finally, the device to be connected to the network is marked as a networked device, and the endpoint information and cluster information corresponding to the networked device are obtained. In this way, by optimizing the related processes of the preset IC information table and the strict timing division in the Zigbee network configuration process in the prior art, the IC information table in the protocol stack is dynamically updated, and the key key information of the application layer key Link key information in Zigbee is obtained and distributed in advance, and then the attribute key information of the device to be connected to the network is read, and finally the endpoint information and cluster information are obtained, and the key key information of the Zigbee layer network configuration and the attribute key information that the APP end must display are subdivided, thereby optimizing the network configuration steps, and ensuring that the device is displayed on the APP end in real time under the premise of stable network access. This method proposes a batch IC information cycle addition process designed based on the APP end and the Zigbee edge gateway, and proposes a two-step key information subdivision and advance acquisition based on the optimization of the Zigbee3.0 standard network configuration specification, avoiding the repeated execution of non-critical interactive steps in the intermediate process of failed network configuration, and avoiding the "wrong network configuration" phenomenon under multiple gateways, reducing the reconfiguration rate of a single device in the network configuration, reducing the number of two-way packets sent by gateway devices, reducing network load, and reducing the number of manual network configuration operations. In large-scale equipment distribution networks, it has higher security, more stable network performance, and faster distribution speed.

[0076] See also Figure 5 As shown, the embodiment of the present application discloses a network configuration device for an Internet of Things device, which may specifically include:

[0077] The information matching module 11 is used to obtain the target information of the device to be connected to the network, and match the target information with the information in the target information table stored in the preset protocol stack; the target information is the information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on the preset dynamic update rules;

[0078] The key sending module 12 is used to send the network layer interaction key and the application layer link key to the device to be connected to the network if the match is successful, so as to complete the network configuration operation of the device to be connected to the network;

[0079] The network configuration completion module 13 is used to mark the device to be networked as a networked device when the network configuration operation is completed for the device to be networked, and to obtain the endpoint information and cluster information corresponding to the networked device.

[0080] The present application first obtains the target information of the device to be connected to the network, and matches the target information with the various information in the target information table stored in the preset protocol stack, wherein the target information is information generated based on the Install Code technology that uniquely corresponds to the device to be connected to the network, and the target information table is an information table updated based on preset dynamic update rules. If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be connected to the network to complete the network configuration operation of the device to be connected to the network. When the device to be connected to the network has completed the network configuration operation, the device to be connected to the network is marked as a networked device, and the endpoint information and cluster information corresponding to the networked device are obtained. In this way, this embodiment optimizes the related processes with strict timing division based on the preset IC information table in the Zigbee network configuration process in the prior art, dynamically updates the IC information table in the protocol stack, and obtains and distributes the key key information of the application layer key Link key information in Zigbee in advance, and finally obtains the endpoint information and cluster information, subdividing the key key information of the Zigbee layer network configuration, avoiding the repeated execution of non-critical interaction steps in the intermediate process of failed network configuration, and avoiding the "misconfiguration" phenomenon under multiple gateways. It reduces the reconfiguration rate of a single device in the network configuration, reduces the number of two-way packets sent by gateway devices, reduces the network load, and can greatly improve the registration rate of the network configuration APP end and the success rate of a single manual operation in large-scale device network configuration, with higher security, more stable network performance, and faster network configuration speed.

[0081] In some specific embodiments, the Internet of Things device network configuration method further includes:

[0082] An information acquisition unit, used to acquire single information for matching with target information through a preset information acquisition interface;

[0083] The information updating unit is used to add the single item of information to the target information table in the preset protocol stack based on the preset dynamic updating rule, so as to dynamically update the information in the target information table.

[0084] In some specific embodiments, the Internet of Things device network configuration method further includes:

[0085] A beacon interaction unit, configured to obtain a beacon request instruction sent by a device to be connected to the network, and return a beacon reply message containing network information to the device to be connected to the network; the network information contains network identifier information corresponding to the current gateway and associated permission information;

[0086] The association interaction unit is used to obtain the association information sent by the device to be connected to the network for requesting the media access control layer to allocate a network address, and return the association reply information containing the network address corresponding to the device to be connected to the network to the device to be connected to the network, so that the device to be connected to the network can use the network address for data communication.

[0087] In some specific embodiments, the key sending module 12 includes:

[0088] A network layer key interaction unit, used for sending a network layer interaction key uniquely corresponding to the device to be connected to the network to be connected;

[0089] The application layer key interaction unit is used to receive a key request for an application layer link key sent by the device to be connected to the network, and respond to the key request to send the application layer link key uniquely corresponding to the device to be connected to the network.

[0090] In some specific embodiments, the Internet of Things device network configuration method further includes:

[0091] An attribute reading unit, used to read the basic attributes of the device to be connected to the network;

[0092] The attribute sending unit is used to send the basic attributes of the device to a preset software terminal that is pre-bound to the gateway through a preset software interaction interface, and return information indicating that the network configuration of the device to be connected to the network is successful to the preset software terminal.

[0093] In some specific embodiments, the Internet of Things device network configuration method further includes:

[0094] The information deleting unit is used to delete the target information corresponding to the device to be connected to the network in the target information table in the preset protocol stack.

[0095] In some specific embodiments, the Internet of Things device network configuration method further includes:

[0096] The heartbeat interaction unit is used to perform periodic heartbeat data interaction with the networked device according to a preset period to ensure the normal operation of the networked device.

[0097] Furthermore, the present application also discloses an electronic device. Figure 6This is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the diagram cannot be considered as any limitation on the scope of use of the present application.

[0098] Figure 6 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a display screen 24, an input / output interface 25, a communication interface 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the method for configuring the Internet of Things device network disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0099] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 26 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0100] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0101] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the Internet of Things device network configuration method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.

[0102] Furthermore, the present application also discloses a computer-readable storage medium, wherein the computer-readable storage medium mentioned here includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a magnetic disk or an optical disk, or any other form of storage medium known in the technical field. Wherein, when the computer program is executed by the processor, the aforementioned disclosed method for configuring the Internet of Things device is implemented. For the specific steps of the method, reference can be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0103] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts refer to the method part description. Professionals can also further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but this implementation should not be considered to exceed the scope of this application.

[0104] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0105] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0106] The Internet of Things device network configuration method, device, equipment, and storage medium provided by the present invention are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for configuring a network for an Internet of Things device, characterized in that: Applied to IoT gateways, including: Obtain target information of the device to be connected to the network, and match the target information with various information in the target information table stored in the preset protocol stack; the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on a preset dynamic update rule; If the match is successful, the network layer interaction key and the application layer link key are sent to the device to be networked to complete the network configuration operation of the device to be networked; wherein, after completing the interaction of the network layer interaction key between the IoT gateway and the device to be networked, if the device to be networked requests the application layer link key or the IoT gateway fails to respond to the application layer link key, the IoT gateway kicks out the device to be networked so that the device to be networked can be reconfigured; When the network configuration operation of the device to be connected to the network is completed, the device to be connected to the network is marked as a networked device, and the endpoint information and cluster information corresponding to the networked device are obtained; Wherein, the Internet of Things device network configuration method further includes: If the current aging time of the added information in the target information table reaches the preset aging time, the added information is deleted from the target information table; the added information is any information in the target information table; Among them, the process of obtaining the target information table includes: when the Internet of Things gateway is bound to the local area network, the Internet of Things gateway obtains the batch target information of the batch of devices to be connected to the network from the preset APP end locally or in the cloud, and after turning on the network configuration of the Internet of Things gateway, the batch of devices to be connected to the network are synchronously turned on to enter the network configuration state, and when the preset APP end triggers the network configuration, the Internet of Things gateway adds the single item target information in the batch target information to the target information table in the preset protocol stack in a cyclic manner; wherein the preset APP end obtains the batch target information from the batch of devices to be connected to the network, and stores the batch target information locally or uploads it to the cloud.

2. The method for configuring a network for an Internet of Things device according to claim 1, wherein: Before obtaining the target information of the device to be connected to the network and matching the target information with each item of target information in the target information table stored in the preset protocol stack, the method further includes: Acquire single information for matching with target information through a preset information acquisition interface; The single item of information is added to a target information table in a preset protocol stack based on a preset dynamic update rule, so as to dynamically update the information in the target information table.

3. The method for configuring a network for an Internet of Things device according to claim 1, wherein: Before obtaining the target information of the device to be connected to the network and matching the target information with each item of target information in the target information table stored in the preset protocol stack, the method further includes: Obtaining a beacon request instruction sent by the device to be connected to the network, and returning a beacon reply message containing network information to the device to be connected to the network; the network information contains network identifier information corresponding to the current gateway and associated permission information; Acquire association information sent by the device to be connected to the network for requesting the media access control layer to allocate a network address, and return association reply information containing the network address corresponding to the device to be connected to the network to enable the device to communicate data using the network address.

4. The method for configuring a network for an Internet of Things device according to claim 1, wherein: The sending of a network layer interaction key and an application layer link key to the device to be connected to the network includes: Sending a network layer interaction key uniquely corresponding to the device to be connected to the network to be connected; A key request for an application layer link key sent by the device to be connected to the network is received, and the key request is responded to so as to send the application layer link key uniquely corresponding to the device to be connected to the network to the device to be connected to the network.

5. The method for network configuration of Internet of Things devices according to claim 1, characterized in that: After sending the network layer interaction key and the application layer link key to the device to be connected to the network, the method further includes: Read the basic properties of the device to be connected to the network; The basic properties of the device are sent to a preset software terminal that is pre-bound to the gateway through a preset software interaction interface, and information indicating that the network configuration of the device to be connected to the network is successful is returned to the preset software terminal.

6. The method for network configuration of Internet of Things devices according to claim 5, characterized in that: After sending the basic attributes of the device to a preset software end pre-bound to a gateway through a preset software interaction interface, and returning information indicating successful network configuration of the device to be networked and the basic attribute information of the device to be networked to the preset software end, the method further includes: The target information corresponding to the device to be networked is deleted from the target information table in the preset protocol stack.

7. The method for network configuration of Internet of Things devices according to any one of claims 1 to 6, characterized in that: After acquiring the endpoint information and cluster information corresponding to the networked device, the method further includes: Periodically interact with the networked device via heartbeat data according to a preset period to ensure the normal operation of the networked device.

8. A network distribution device for Internet of Things equipment, characterized in that: include: An information matching module is used to obtain target information of the device to be connected to the network, and match the target information with various information in the target information table stored in the preset protocol stack; the target information is information generated based on the Install Code technology and uniquely corresponds to the device to be connected to the network; the target information table is an information table updated based on a preset dynamic update rule; A key sending module is used to send a network layer interaction key and an application layer link key to the device to be connected to the network if the match is successful, so as to complete the network configuration operation of the device to be connected to the network; wherein, after completing the interaction of the network layer interaction key between the Internet of Things gateway and the device to be connected to the network, if the device to be connected to the network requests the application layer link key or the Internet of Things gateway fails to respond to the application layer link key, the Internet of Things gateway kicks out the device to be connected to the network so that the device to be connected to the network can be re-connected to the network; The network configuration completion module is used to mark the device to be connected to the network as a device that has been connected to the network when the network configuration operation has been completed for the device to be connected to the network, and obtain the endpoint information and cluster information corresponding to the device that has been connected to the network; Wherein, the Internet of Things equipment network configuration device is further used for: if the current aging time of the added information in the target information table reaches the preset aging time, deleting the added information from the target information table; the added information is any information in the target information table; Among them, the process of obtaining the target information table in the Internet of Things device network configuration device includes: when the Internet of Things gateway is bound to the local area network, the Internet of Things gateway obtains the batch target information of the batch of devices to be connected to the network from the preset APP end locally or in the cloud, and after starting the network configuration of the Internet of Things gateway, the batch of devices to be connected to the network are synchronously turned on to enter the network configuration state, and when the preset APP end triggers the network configuration, the Internet of Things gateway adds the single item target information in the batch target information to the target information table in the preset protocol stack in a cyclic manner; wherein, the preset APP end obtains the batch target information from the batch of devices to be connected to the network, and stores the batch target information locally or uploads it to the cloud.

9. An electronic device, characterized in that: It comprises a processor and a memory; wherein, when the processor executes the computer program stored in the memory, the method for configuring a network for an Internet of Things device as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the method for configuring a network for an Internet of Things device as described in any one of claims 1 to 7 is implemented.