Batch construction method and system for automatic networking deployment and configuration of ZigBee smart home

By generating configuration templates in smart home projects and using signal strength, node depth and neighbor node number for automated identification and matching, the traditional ZigBee network deployment and configuration methods are solved, and construction efficiency and system stability are improved.

CN119946661APending Publication Date: 2025-05-06XIAMEN STAR SMART TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411944842.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

During the construction of large-scale smart home projects, the traditional ZigBee network deployment and configuration methods are cumbersome, time-consuming and error-prone, resulting in low construction efficiency, high cost and poor system stability.

Method used

By generating configuration templates, automatically identify and match according to the device type and installation location of the sub-device, and the configuration work can be completed without manual binding. This method uses signal strength, node depth and neighbor node number to calculate the relative position value, and automatically match and configure information issuance.

Benefits of technology

It improves the construction efficiency and quality of smart home projects, reduces construction costs, ensures the stability and reliability of the system, and reduces repetitive labor.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119946661A_ABST
    Figure CN119946661A_ABST
Patent Text Reader

Abstract

The invention discloses a batch construction method and system for automatic networking deployment configuration of ZigBee smart home, and relates to the technical field of smart home. The method comprises the following steps: generating a configuration template according to a configured construction project, wherein the configuration template comprises the equipment type of each sub-equipment, the relative position determined according to the signal strength, the node depth and the number of neighbor nodes, and configuration information; selecting and loading a configuration template according to the house type of the project to be constructed; when the smart home equipment is powered on, the sub-equipment searches a nearby ZigBee network for network access; and the equipment type, the signal strength, the node depth and the number of neighbor nodes of the sub-equipment accessed to the network are acquired, then the sub-equipment is automatically matched with the sub-equipment in the configuration template, and the configuration information of the corresponding sub-equipment in the template is issued to the sub-equipment after successful matching. According to the method provided by the invention, the configuration work can be completed without manually binding each sub-device, and the construction efficiency and quality of the smart home project are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart home technology, and in particular to a batch construction method and system for automatic networking deployment and configuration of ZigBee smart homes. Background Art

[0002] With the rapid development of smart home, ZigBee technology has been widely used in smart home systems due to its advantages of low power consumption and self-organizing network. However, in the construction process of large-scale smart home projects, traditional ZigBee networking deployment and configuration methods have exposed many problems.

[0003] Even if batch template configuration is adopted, it is still necessary to manually operate the sub-devices one by one to connect to the network. This process is extremely cumbersome and consumes a lot of time and manpower. In addition, each sub-device needs to be identified at each device point in the template by scanning the code or manually filling in the unique code, which is complicated and prone to errors. This method is not only inefficient, but may also cause incorrect code input due to human factors, thus affecting the normal operation of the entire system.

[0004] In addition, a large amount of manual intervention increases construction costs and prolongs the project implementation cycle. During manual operation, the stability and reliability of the system may be affected due to irregular operations or negligence. For example, incorrect device binding may lead to problems such as poor signal transmission and abnormal device function.

[0005] Therefore, there is an urgent need for an efficient batch construction method for automatic networking deployment and configuration to improve the construction efficiency and quality of smart home projects, reduce construction costs, and ensure the stability and reliability of the system. Summary of the invention

[0006] The technical problem to be solved by the present invention is to provide a batch construction method and system for automatic networking deployment and configuration of ZigBee smart homes, generate configuration templates according to the device type and installation position of sub-devices, automatically identify sub-devices by relative position, and complete the configuration work without manual binding of each sub-device, thereby improving the construction efficiency and quality of smart home projects, reducing construction costs, and ensuring the stability and reliability of the system.

[0007] In a first aspect, the present invention provides a batch construction method for automatic networking deployment and configuration of a ZigBee smart home, comprising:

[0008] Template generation process: Generate a configuration template according to the configured construction project, the configuration template includes the device type, the first relative position and configuration information of each sub-device, the first relative position is determined according to the signal strength, node depth and number of neighbor nodes of the sub-device;

[0009] Template calling process: select and load the configuration template according to the apartment type of the project to be constructed;

[0010] Networking process: When the smart home device is powered on, the sub-device searches for the nearby ZigBee network to join the network;

[0011] Automated configuration process: obtain the device type, signal strength, node depth and number of neighbor nodes of the sub-device connected to the network, and then automatically match it with the sub-device in the configuration template: if the device type is unique, directly match it with the corresponding sub-device in the template, and send the configuration information of the corresponding sub-device in the template to the sub-device; if a device type is not unique, determine the second relative position based on the signal strength, node depth and number of neighbor nodes of each sub-device under the device type, and then match it with the first relative position of the sub-device in the configuration template. After a successful match, send the configuration information of the corresponding sub-device in the template to the sub-device.

[0012] Furthermore, in the template generation process and the automated configuration process, the first relative position and the second relative position are determined according to the signal strength, node depth, and number of neighbor nodes. Specifically, the relative position value S is calculated according to the signal strength, node depth, and number of neighbor nodes. The formula is as follows:

[0013] S = signal strength value I × signal strength weight + node depth D × node depth weight + number of neighbor nodes N × number of neighbor nodes weight.

[0014] Furthermore, the configuration template also includes a preset deviation P for the apartment type. When the difference between the second relative position and the first relative position is less than the preset deviation P for the apartment type, it indicates that the sub-device is matched successfully.

[0015] Furthermore, the configuration template also includes a manual marking value M. When the device types of two or more sub-devices are consistent and the first relative position values ​​are the same, the devices are marked by manually performing a setting operation to obtain the manual marking value M; in the automated configuration process, if the device types of two or more sub-devices are consistent and the difference between the second relative position and the first relative position is less than the preset deviation P of the apartment type, the sub-devices are marked by manually performing a setting operation, and then the configuration information of the sub-devices in the template is sent to the corresponding sub-devices according to the manual marking value M.

[0016] Furthermore, the networking process specifically includes:

[0017] Set the sub-device to the non-network access mode by default when it is powered on. When the set conditions are met, the sub-device will automatically switch to the network access mode, and then automatically search for nearby ZigBee networks at the specified time according to the random time seed and try to access the network.

[0018] In a second aspect, the present invention provides a batch construction system for automatic networking deployment and configuration of ZigBee smart homes, comprising:

[0019] A template generation module, used to generate a configuration template according to the configured construction project, wherein the configuration template includes the device type, the first relative position and the configuration information of each sub-device, wherein the first relative position is determined according to the signal strength, the node depth and the number of neighboring nodes of the sub-device;

[0020] The template calling module is used to select and load the configuration template according to the apartment type of the project to be constructed;

[0021] The networking module is used for the sub-devices to search for the nearby ZigBee network to join the network when the smart home device is powered on;

[0022] The automated configuration module is used to obtain the device type, signal strength, node depth and number of neighbor nodes of the sub-device connected to the network, and then automatically match it with the sub-device in the configuration template: if the device type is unique, it is directly matched with the corresponding sub-device in the template, and the configuration information of the corresponding sub-device in the template is sent to the sub-device; if a device type is not unique, the second relative position is determined according to the signal strength, node depth and number of neighbor nodes of each sub-device under the device type, and then matched with the first relative position of the sub-device in the configuration template. After a successful match, the configuration information of the corresponding sub-device in the template is sent to the sub-device.

[0023] Furthermore, in the template generation module and the automatic configuration module, the first relative position and the second relative position are determined according to the signal strength, the node depth, and the number of neighbor nodes. Specifically, the relative position value S is calculated according to the signal strength, the node depth, and the number of neighbor nodes. The formula is as follows:

[0024] S = signal strength value I × signal strength weight + node depth D × node depth weight + number of neighbor nodes N × number of neighbor nodes weight.

[0025] Furthermore, the configuration template also includes a preset deviation P for the apartment type. When the difference between the second relative position and the first relative position is less than the preset deviation P for the apartment type, it indicates that the sub-device is matched successfully.

[0026] Furthermore, the configuration template also includes a manual marking value M. When the device types of two or more sub-devices are consistent and the first relative position values ​​are the same, the devices are marked by manually performing a setting operation to obtain the manual marking value M; in the automatic configuration module, if the device types of two or more sub-devices are consistent and the difference between the second relative position and the first relative position is less than the preset deviation P of the apartment type, the sub-devices are marked by manually performing a setting operation, and then the configuration information of the sub-devices in the template is sent to the corresponding sub-devices according to the manual marking value M.

[0027] Furthermore, the networking module is specifically used for:

[0028] Set the sub-device to the non-network access mode by default when it is powered on. When the set conditions are met, the sub-device will automatically switch to the network access mode, and then automatically search for nearby ZigBee networks at the specified time according to the random time seed and try to access the network.

[0029] The technical solution provided in the embodiments of the present invention has at least the following technical effects:

[0030] Sub-devices are automatically identified and matched based on device type and relative position determined by signal strength, node depth, and number of neighboring nodes. This allows sub-devices of the same device type and installation position to be directly configured automatically without the need to manually bind each sub-device. This greatly improves the accuracy and efficiency of batch construction, reduces repetitive work, and provides strong support and guarantee for the automated batch construction of smart home devices.

[0031] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0033] Figure 1 is an overall flow chart of the method in Embodiment 1 of the present invention;

[0034] Figure 2 A schematic diagram of a prior art neutron device entering a wrong gateway;

[0035] Figure 3 A schematic diagram of a configuration template generation process in Embodiment 1 of the present invention;

[0036] Figure 4 A schematic diagram of a configuration template calling process in Embodiment 1 of the present invention;

[0037] Figure 5 This is a schematic diagram of the automated networking process in Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0038] The embodiment of the present invention provides a batch construction method and system for automatic networking deployment and configuration of ZigBee smart homes, generates a configuration template according to the device type and installation position of the sub-device, automatically identifies the sub-device by relative position, and completes the configuration work without manual binding of each sub-device, thereby improving the construction efficiency and quality of the smart home project, reducing the construction cost, and ensuring the stability and reliability of the system.

[0039] The technical solution in the embodiment of the present invention has the following general idea:

[0040] Since the installation positions of each sub-device of the same apartment are relatively consistent, the present invention innovatively defines the relative position and generates a configuration template based on signal strength, node depth, and number of neighboring nodes. In subsequent construction, the sub-devices can be automatically identified and matched based on the device type and relative position of the sub-devices in the configuration template, and configuration information can be automatically issued, so that the configuration work can be completed without manually binding each sub-device. This greatly improves the accuracy and efficiency of batch construction, while also reducing repetitive work, providing strong support and guarantee for the automated batch construction of smart home devices.

[0041] Embodiment 1

[0042] This embodiment provides a batch construction method for automatic networking deployment and configuration of ZigBee smart homes, such as Figure 1 As shown, including:

[0043] Template generation process: Generate a configuration template according to the configured construction project, the configuration template includes the device type, the first relative position and configuration information of each sub-device, the first relative position is determined according to the signal strength, node depth and number of neighbor nodes of the sub-device;

[0044] Template calling process: select and load the configuration template according to the apartment type of the project to be constructed;

[0045] Networking process: When the smart home device is powered on, the sub-device searches for the nearby ZigBee network to join the network;

[0046] Automated configuration process: obtain the device type, signal strength, node depth and number of neighbor nodes of the sub-device connected to the network, and then automatically match it with the sub-device in the configuration template: if the device type is unique, directly match it with the corresponding sub-device in the template, and send the configuration information of the corresponding sub-device in the template to the sub-device; if a device type is not unique, determine the second relative position based on the signal strength, node depth and number of neighbor nodes of each sub-device under the device type, and then match it with the first relative position of the sub-device in the configuration template. After a successful match, send the configuration information of the corresponding sub-device in the template to the sub-device.

[0047] The method can realize automatic distribution of sub-device configuration information that is unique to the device type, and automatic distribution of configuration information corresponding to multiple sub-devices of the same type according to the installation location, thereby completing the configuration work without manual binding of each sub-device.

[0048] There are many ways to determine the relative position and match based on signal strength, node depth, and number of neighbor nodes. In a simpler implementation, the value obtained by directly adding the three can be used as the relative position. When they are equal or close, it represents a match. However, the matching effect of this simple implementation is not ideal. Therefore, in a better implementation, the template generation process and the automatic configuration process determine the first relative position and the second relative position based on signal strength, node depth, and number of neighbor nodes. Specifically, the relative position value S is calculated based on signal strength, node depth, and number of neighbor nodes. The formula is as follows:

[0049] S = signal strength value I × signal strength weight + node depth D × node depth weight + number of neighbor nodes N × number of neighbor nodes weight.

[0050] The configuration template also includes a preset deviation P for the apartment type. When the difference between the second relative position and the first relative position is less than the preset deviation P for the apartment type, it indicates that the sub-device is successfully matched.

[0051] By setting weights to calculate relative position values ​​(the weights for calculating relative position values ​​when generating templates and automatically matching must be consistent), you can adjust parameter preferences according to actual needs. By setting the preset deviation P for apartment types, devices with similar apartment types and close installation locations can also be automatically configured using templates. In addition to obtaining relative position values ​​as relative positions through weighted calculations, other methods can also be used to determine relative positions based on signal strength, node depth, and number of neighboring nodes.

[0052] Since two sub-devices of the same device type may be installed in the same position (such as two switch panels side by side), in order to distinguish and configure accordingly, the configuration template also includes a manual marking value M. When two or more sub-devices have the same device type and the same first relative position value, the device is marked by manually performing a setting operation to obtain the manual marking value M; in the automatic configuration process, if two or more sub-devices have the same device type and the difference between the second relative position and the first relative position is less than the preset deviation P of the apartment type, the sub-device is marked by manually performing a setting operation, and then the configuration information of the sub-device in the template is sent to the corresponding sub-device according to the manual marking value M.

[0053] When the smart home device is powered on, the sub-device is usually in network access mode by default when it is powered on at the factory. However, a series of problems may be encountered in actual construction, such as Figure 2As shown. On the one hand, many sub-devices may simultaneously initiate network access requests, which will bring a great burden to the gateway. Under such a high load, the gateway may not be able to process all requests in time, which may easily lead to the failure of sub-devices to access the network. On the other hand, in a batch construction environment, there are often multiple gateways powered on at the same time. In such a complex network environment, it is easy for sub-devices to access the wrong gateway, which will cause great inconvenience to subsequent batch construction. Therefore, in a preferred embodiment, the networking process specifically includes:

[0054] Set the sub-device to the non-network access mode by default when it is powered on. When the set conditions are met, the sub-device will automatically switch to the network access mode, and then automatically search for nearby ZigBee networks at the specified time according to the random time seed, and try to access the network. This can reduce the burden on the gateway, increase the success rate of sub-device network access, and effectively avoid the situation where sub-devices enter the wrong gateway, providing a strong guarantee for the stable operation and batch construction of the smart home system.

[0055] In a specific embodiment, the implementation process is as follows:

[0056] 1. Template creation and calling:

[0057] like Figure 3 As shown, construction personnel can first create a project (such as a community), and then carry out the construction of the first apartment. When the construction of the first apartment is completed, the system will automatically create a configuration template for the apartment, including the location information and configuration information of each sub-device. Among them, the location information is used to mark the installation location of each sub-device in the apartment, and can include the following information.

[0058] (1) Equipment type;

[0059] (2) Signal strength parameters: including signal strength value I and signal strength weight;

[0060] (3) Node depth parameters: including node depth value D and node depth weight;

[0061] (4) Neighbor node parameters: including the number of neighbor nodes N and the weight of neighbor nodes;

[0062] (5) Preset deviation of apartment type P

[0063] (6) Manual marking value M

[0064] The first relative position can also be determined and saved directly according to the above items (2), (3), and (4).

[0065] These created templates can be stored on the cloud platform, and other construction workers can easily call these templates for automated construction when performing subsequent batch construction work, such as Figure 4 shown.

[0066] 2. Automated networking:

[0067] like Figure 5 As shown in the figure, the sub-device is set to the non-network access mode by default when powered on. In this mode, if the number of power-off and power-on reaches N times within a short period of time (for example, 3 seconds) (the construction personnel can control the main power switch to make all sub-devices in the house meet this condition at the same time), the sub-device will automatically switch to the network access mode. Then, the sub-device will randomly and automatically search for nearby ZigBee networks in the next few seconds according to the random time seed and try to access the network. This networking solution not only reduces the burden on the gateway and improves the success rate of sub-device network access, but also effectively avoids the situation where sub-devices enter the wrong gateway, providing a strong guarantee for the stable operation and batch construction of the smart home system.

[0068] 3.Automated configuration:

[0069] For sub-devices that are connected to the network, the system will determine the second relative position based on the sub-device type, signal strength, node depth, number of neighbor nodes and other parameters, and then automatically match it with the sub-device in the template. If the device type is unique, it will directly match the corresponding sub-device in the template and send the configuration information in the template to the sub-device.

[0070] In a preferred implementation, if there are more than one device of the same type, such as two one-button switch panels, the system will use an algorithm to calculate the relative position value S of each sub-device in the template for matching. The relative position value algorithm considers parameters such as signal strength I, node depth D, number of neighbor nodes N, and sets weights for each parameter. The calculation formula is:

[0071] Relative position value S = signal strength value I×signal strength weight+node depth D×node depth weight+neighbor node number N×neighbor node number weight.

[0072] If there are multiple scores that are close within the preset deviation P of the apartment type, and the device types are the same, such as two switch panels side by side, the devices need to be marked manually. For example, to put the panel into the marking state, press 1 to mark the relative position of this switch panel as 1, press 2 to mark the relative position of this switch panel as 2, and so on. After marking, the configuration information of the corresponding sub-device in the template is sent to the marked sub-device.

[0073] Based on the same inventive concept, the present application also provides a device corresponding to the method in Example 1, see Example 2 for details.

[0074] Embodiment 2

[0075] In this embodiment, a batch construction system for automatic networking deployment and configuration of a ZigBee smart home is provided, including:

[0076] A template generation module, used to generate a configuration template according to the configured construction project, wherein the configuration template includes the device type, the first relative position and the configuration information of each sub-device, wherein the first relative position is determined according to the signal strength, the node depth and the number of neighboring nodes of the sub-device;

[0077] The template calling module is used to select and load the configuration template according to the apartment type of the project to be constructed;

[0078] The networking module is used for the sub-devices to search for the nearby ZigBee network to join the network when the smart home device is powered on;

[0079] The automated configuration module is used to obtain the device type, signal strength, node depth and number of neighbor nodes of the sub-device connected to the network, and then automatically match it with the sub-device in the configuration template: if the device type is unique, it is directly matched with the corresponding sub-device in the template, and the configuration information of the corresponding sub-device in the template is sent to the sub-device; if a device type is not unique, the second relative position is determined according to the signal strength, node depth and number of neighbor nodes of each sub-device under the device type, and then matched with the first relative position of the sub-device in the configuration template. After a successful match, the configuration information of the corresponding sub-device in the template is sent to the sub-device.

[0080] Preferably, in the template generation module and the automatic configuration module, the first relative position and the second relative position are determined according to the signal strength, the node depth, and the number of neighbor nodes. Specifically, the relative position value S is calculated according to the signal strength, the node depth, and the number of neighbor nodes. The formula is as follows:

[0081] S = signal strength value I × signal strength weight + node depth D × node depth weight + number of neighbor nodes N × number of neighbor nodes weight.

[0082] Preferably, the configuration template further includes a preset deviation P for the apartment type, and when the difference between the second relative position and the first relative position is less than the preset deviation P for the apartment type, it indicates that the sub-device is matched successfully.

[0083] Preferably, the configuration template also includes a manual marking value M. When two or more sub-devices have the same device type and the same first relative position value, the device is marked by manually performing a setting operation to obtain the manual marking value M; in the automatic configuration module, if two or more sub-devices have the same device type and the difference between the second relative position and the first relative position is less than the preset deviation P of the apartment type, the sub-device is marked by manually performing a setting operation, and then the configuration information of the sub-device in the template is sent to the corresponding sub-device according to the manual marking value M.

[0084] Preferably, the networking module is specifically used for:

[0085] Set the sub-device to the non-network access mode by default when it is powered on. When the set conditions are met, the sub-device will automatically switch to the network access mode, and then automatically search for nearby ZigBee networks at the specified time according to the random time seed and try to access the network.

[0086] Since the system introduced in the second embodiment of the present invention is a system used to implement the method of the first embodiment of the present invention, those skilled in the art can understand the specific structure and deformation of the system based on the method introduced in the first embodiment of the present invention, so it is not described here in detail. All systems used in the method of the first embodiment of the present invention belong to the scope of protection of the present invention.

[0087] The present invention automatically identifies and matches sub-devices through device types and relative position values ​​calculated according to signal strength, node depth, and number of neighboring nodes, so that sub-devices with the same device type and the same installation position can be directly automatically configured, and the configuration work can be completed without manual binding of each sub-device, which greatly improves the accuracy and efficiency of batch construction, reduces repetitive work, and provides strong support and guarantee for the automated batch construction of smart home devices.

[0088] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0089] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0090] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0091] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0092] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. A batch construction method for automatic networking deployment and configuration of ZigBee smart home, characterized in that: include: Template generation process: Generate a configuration template according to the configured construction project, the configuration template includes the device type, the first relative position and configuration information of each sub-device, the first relative position is determined according to the signal strength, node depth and number of neighbor nodes of the sub-device; Template calling process: select and load the configuration template according to the apartment type of the project to be constructed; Networking process: When the smart home device is powered on, the sub-device searches for the nearby ZigBee network to join the network; Automated configuration process: obtain the device type, signal strength, node depth and number of neighbor nodes of the sub-device connected to the network, and then automatically match it with the sub-device in the configuration template: if the device type is unique, directly match it with the corresponding sub-device in the template, and send the configuration information of the corresponding sub-device in the template to the sub-device; if a device type is not unique, determine the second relative position based on the signal strength, node depth and number of neighbor nodes of each sub-device under the device type, and then match it with the first relative position of the sub-device in the configuration template. After a successful match, send the configuration information of the corresponding sub-device in the template to the sub-device.

2. The method according to claim 1, characterized in that: In the template generation process and the automatic configuration process, the first relative position and the second relative position are determined according to the signal strength, node depth, and number of neighbor nodes. Specifically, the relative position value S is calculated according to the signal strength, node depth, and number of neighbor nodes. The formula is as follows: S=signal strength value I×signal strength weight+node depth D×node depth weight+number of neighbor nodes N×number of neighbor nodes weight.

3. The method according to claim 1 or 2, characterized in that: The configuration template also includes a preset deviation P for the apartment type. When the difference between the second relative position and the first relative position is less than the preset deviation P for the apartment type, it indicates that the sub-device is successfully matched.

4. The method according to claim 3, characterized in that: The configuration template also includes a manual marking value M. When the device types of two or more sub-devices are consistent and the first relative position values ​​are the same, the devices are marked by manually performing a setting operation to obtain the manual marking value M. In the automatic configuration process, if the device types of two or more sub-devices are consistent and the difference between the second relative position and the first relative position is less than the preset deviation P of the house type, the sub-devices are marked by manually performing a setting operation, and then the configuration information of the sub-devices in the template is sent to the corresponding sub-devices according to the manual marking value M.

5. The method according to claim 1, characterized in that The networking process specifically includes: Set the sub-device to the non-network access mode by default when it is powered on. When the set conditions are met, the sub-device will automatically switch to the network access mode, and then automatically search for nearby ZigBee networks at the specified time according to the random time seed and try to access the network.

6. A batch construction system for automatic networking deployment and configuration of ZigBee smart homes, characterized in that: include: A template generation module, used to generate a configuration template according to the configured construction project, wherein the configuration template includes the device type, the first relative position and the configuration information of each sub-device, wherein the first relative position is determined according to the signal strength, the node depth and the number of neighboring nodes of the sub-device; The template calling module is used to select and load the configuration template according to the apartment type of the project to be constructed; The networking module is used for the sub-devices to search for the nearby ZigBee network to join the network when the smart home device is powered on; The automated configuration module is used to obtain the device type, signal strength, node depth and number of neighbor nodes of the sub-device connected to the network, and then automatically match it with the sub-device in the configuration template: if the device type is unique, it is directly matched with the corresponding sub-device in the template, and the configuration information of the corresponding sub-device in the template is sent to the sub-device; if a device type is not unique, the second relative position is determined according to the signal strength, node depth and number of neighbor nodes of each sub-device under the device type, and then matched with the first relative position of the sub-device in the configuration template. After a successful match, the configuration information of the corresponding sub-device in the template is sent to the sub-device.

7. The system according to claim 6, characterized in that: In the template generation module and the automatic configuration module, the first relative position and the second relative position are determined according to the signal strength, the node depth, and the number of neighbor nodes. Specifically, the relative position value S is calculated according to the signal strength, the node depth, and the number of neighbor nodes. The formula is as follows: S=signal strength value I×signal strength weight+node depth D×node depth weight+number of neighbor nodes N×number of neighbor nodes weight.

8. The system according to claim 6 or 7, characterized in that: The configuration template also includes a preset deviation P for the apartment type. When the difference between the second relative position and the first relative position is less than the preset deviation P for the apartment type, it indicates that the sub-device is successfully matched.

9. The system according to claim 8, characterized in that: The configuration template also includes a manual marking value M. When the device types of two or more sub-devices are consistent and the first relative position values ​​are the same, the devices are marked by manually performing a setting operation to obtain the manual marking value M; in the automatic configuration module, if the device types of two or more sub-devices are consistent and the difference between the second relative position and the first relative position is less than the preset deviation P of the house type, the sub-devices are marked by manually performing a setting operation, and then the configuration information of the sub-devices in the template is sent to the corresponding sub-devices according to the manual marking value M.

10. The system according to claim 6, characterized in that The networking module is specifically used for: Set the sub-device to the non-network access mode by default when it is powered on. When the set conditions are met, the sub-device will automatically switch to the network access mode, and then automatically search for nearby ZigBee networks at the specified time according to the random time seed and try to access the network.