A method and system for self-adding networking of Zigbee gateway devices with self-generated paths
By collecting and analyzing the IP address and communication network speed data in the Zigbee communication system, using width-first search and swarm optimization algorithms to build the optimal communication path, the problem of not being able to scientifically determine the communication path in the existing technology is solved, and Zigbee communication is improved System flexibility and reliability.
Patent Information
- Application Number
- CN202411290554.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-09-14
AI Technical Summary
The newly added Zigbee smart devices in the existing Zigbee communication system cannot achieve scientific determination and optimal communication path based on the communication path added by users and the added communication paths, reducing the reliability and flexibility of the Zigbee communication system.
By collecting the IP address data of the newly added communication path connection device of the user, analyzing and searching the communication network speed data of the added communication path, using the width-first search algorithm and the swarm optimization algorithm, the optimal communication path connection device of the Zigbee smart device is constructed. IP address and network speed data realize intelligent communication path management.
It improves the flexibility and reliability of the Zigbee communication system, realizes the optimal communication path networking based on user selection, and improves communication quality and management efficiency.
Smart Images

Figure CN118804194B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless communication, and in particular to a method and system for self-adding networking of a Zigbee gateway device with self-generated paths. Background Art
[0002] ZigBee, also known as ZigBee, is a low-speed, short-distance transmission wireless network protocol. The underlying layer is the media access layer and physical layer of the IEEE802.15.4 standard. The main features are low speed, low power consumption, low cost, support for a large number of online nodes, support for multiple online topologies, low complexity, fast, reliable and secure. Zigbee gateway is an IoT gateway that can realize protocol conversion and data transmission between Zigbee network and other networks. Zigbee gateway is the core device of Zigbee smart home, smart industry, smart medical and other application scenarios. It can manage and control various devices in Zigbee network. Zigbee communication system consists of Zigbee smart devices, Zigbee gateway, cloud server and mobile smart terminal; the newly added Zigbee smart devices in the existing Zigbee communication system cannot scientifically determine the optimal communication path based on the communication path added by the user and the communication quality of the added communication path, which reduces the reliability and flexibility of the Zigbee communication system.
[0003] The Chinese invention patent application with publication number WO2016 / 161564A1 discloses a method and device for automatic networking of gateway devices. After the first gateway device is connected to the second gateway device, the first gateway device determines whether the second gateway device and the first gateway device are in the same home network; when the first gateway device and the second gateway device are in the same home network, the first gateway device switches to the bridge device of the second gateway device; the first gateway device receives the network parameters sent by the second gateway device; the network parameters include the SSID of the second gateway device and the IP address assigned by the second gateway device to the first gateway device, and the IP address is the address in the network segment corresponding to the SSID; the first gateway device performs network configuration on the first gateway device according to the network parameters. It is achieved that all user devices are connected to the same local area network, so multiple user devices can communicate with each other, which is convenient for users to use. However, the above technical scheme cannot select the optimal communication gateway device object based on the user's selection of the communication gateway device and the communication quality of the communication gateway device, which reduces the flexibility of the communication gateway device networking. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In order to solve the problem that the newly added Zigbee smart devices in the above-mentioned existing Zigbee communication system cannot scientifically determine the optimal communication path based on the communication path added by the user and the communication quality of the added communication path, thereby reducing the reliability and flexibility of the Zigbee communication system, the above purposes are achieved, such as accurately collecting the IP addresses of the devices connected to the newly added communication paths by users, autonomously searching for the communication network speeds of the devices connected to the already added communication paths, accurately collecting the communication network speeds of the devices connected to the newly added communication paths by users, comprehensively and scientifically screening the IP addresses of the devices connected to the optimal communication paths, intelligently screening the optimal communication networking paths for Zigbee smart devices, realizing the intelligent management of the communication networking paths of Zigbee gateway devices, and improving the intelligence and applicability of the Zigbee communication system.
[0006] (II) Technical solution
[0007] The present invention is implemented by the following technical scheme: a method for self-adding networking of Zigbee gateway devices with self-generated paths, the method comprising the following steps:
[0008] S1. Collect the IP address data of the device connected to the newly added communication path by the user;
[0009] S2, performing analysis and processing on the parameters of the newly added communication path of the Zigbee smart device according to the IP address data of the device connected to the newly added communication path of the user, generating judgment data on the existence of the newly added communication path of the Zigbee smart device, and directly executing step S4 when there is no newly added communication path;
[0010] S3. When there is a newly added communication path, collect the communication network speed data of the device connected to the newly added communication path of the user;
[0011] S4, performing a communication network speed parameter search process on the communication path connection device according to the IP address data of the added communication path connection device, and generating the communication network speed data of the added communication path connection device;
[0012] S5, performing numerical analysis and processing on the communication network speed of the added communication path connection device based on the communication network speed data of the added communication path connection device, and generating maximum value data of the communication network speed of the added communication path connection device;
[0013] S6, performing maximum value analysis and processing of the communication network speed of the communication path connection device of the Zigbee smart device according to the communication network speed data of the newly added communication path connection device by the user and the maximum value data of the communication network speed of the added communication path connection device, generating the network speed data of the optimal communication path connection device of the Zigbee smart device and performing IP address parameter search processing of the optimal communication path connection device of the Zigbee smart device, and constructing the IP address data of the optimal communication path connection device of the Zigbee smart device;
[0014] S7, obtaining the IP address data of the Zigbee smart device optimal communication path connection device and executing the Zigbee smart device communication path connection operation.
[0015] Preferably, the operation steps of collecting the IP address data of the communication path connection device newly added by the user are as follows:
[0016] S11, the user inputs the newly added communication path connection device IP address parameters for the newly installed Zigbee smart device in the Zigbee communication system online through the mobile smart terminal and generates the user's newly added communication path connection device IP address data The mobile intelligent terminal includes any one of a smart phone, a smart watch, and a tablet computer. The user's newly added communication path connection device IP address data represents the communication IP address data of the communication path connection device newly set by the user for the newly installed Zigbee smart device.
[0017] Preferably, the newly added communication path parameter of the Zigbee smart device is analyzed and processed based on the IP address data of the device connected to the newly added communication path by the user, and the judgment data of the newly added communication path of the Zigbee smart device is generated. When there is no newly added communication path, the operation steps of directly executing step S4 are as follows:
[0018] S21, adding a new communication path connection device IP address data to the user Perform character analysis on the IP address of the newly added communication path connected to the Zigbee smart device, and generate the judgment data on the existence of the newly added communication path connected to the Zigbee smart device based on the character analysis result of the IP address of the newly added communication path connected to the Zigbee smart device ;
[0019] When the If there is an IP address character in the Zigbee smart device, it means that the user has added a new communication path to connect the device IP address data, and the output is the judgment data of the newly added communication path of the Zigbee smart device. Adding new communication paths for existence;
[0020] When the If there is no IP address character in the Zigbee smart device, it means that the user has not added a new communication path to connect the device IP address data, then the Zigbee smart device will output the judgment data of the newly added communication path. Since there is no newly added communication path, steps S41 and S42 are directly executed.
[0021] Preferably, when there is a newly added communication path, the operation steps of collecting the communication network speed data of the device connected to the newly added communication path of the user are as follows:
[0022] S31, when the Zigbee smart device newly adds a communication path and there is judgment data When there is a newly added communication path, the Zigbee gateway device connects the device IP address data according to the newly added communication path of the user Collect the communication network speed parameters of the newly added communication path connection device online and generate the communication network speed data of the newly added communication path connection device ,in The unit is Kbps.
[0023] Preferably, the operation steps of performing communication network speed parameter search processing of the communication path connection device based on the IP address data of the added communication path connection device and generating the communication network speed data of the added communication path connection device are as follows:
[0024] S41, establish the IP address data set B of the added communication path connection device = ( ,..., ,... ), ;in Indicates The IP address data of the added communication path connection device corresponding to the added communication path connection device, Indicates the maximum number of added communication path connection devices. Added communication path connection devices indicate communication path connection devices that have been connected to the Zigbee communication system. Added communication path connection devices include Zigbee gateways and Zigbee smart devices.
[0025] S42, the Zigbee gateway device connects the device IP address data set according to the added communication path Communication path connection device IP address data has been added to Orderly collect the communication network speed parameters of the devices connected to the added communication paths online and generate the communication network speed data set C=(c1,...,c m ,..., c ε ),in Indicates The communication network speed data of the added communication path connection device corresponding to the added communication path connection device, where The unit is Kbps.
[0026] Preferably, the operation steps of performing numerical analysis and processing on the communication network speed of the added communication path connection device based on the communication network speed data of the added communication path connection device and generating the maximum value data of the communication network speed of the added communication path connection device are as follows:
[0027] S51, using a breadth-first search algorithm to connect the communication path to the communication network speed data set of the added communication path The communication path connection device communication network speed data has been added as described in Perform communication network speed value analysis to search for the communication network speed data of the added communication path connection device with the largest communication network speed value. And generate the maximum value data of the communication network speed of the added communication path connection device through data identification ,in The unit is Kbps.
[0028] Preferably, according to the communication network speed data of the newly added communication path connection device by the user and the maximum communication network speed data of the added communication path connection device, the maximum communication network speed analysis of the communication path connection device of the Zigbee smart device is performed, the network speed data of the optimal communication path connection device of the Zigbee smart device is generated, and the IP address parameter search processing of the optimal communication path connection device of the Zigbee smart device is performed, and the operation steps of constructing the IP address data of the optimal communication path connection device of the Zigbee smart device are as follows:
[0029] S61: When the Zigbee smart device newly adds a communication path and there is judgment data When a new communication path is added, the communication network speed data of the device connected to the newly added communication path is recorded. The maximum value data of the communication network speed of the device connected to the added communication path Compare the communication speed values of Zigbee smart devices’ communication paths and devices, and generate the optimal communication speed data of Zigbee smart devices’ communication paths and devices based on the comparison results. ,in The unit is Kbps;
[0030] when > , indicating that the communication network speed of the device connected by the newly added communication path for the Zigbee smart device is greater than the communication network speed of the device connected by the communication path added in the Zigbee communication system, then the communication network speed data of the device connected by the newly added communication path by the user will be Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0031] when < , indicating that the communication speed of the newly added communication path connecting the device to the Zigbee smart device is lower than the communication speed of the already added communication path connecting the device in the Zigbee communication system, then the maximum value data of the communication speed of the already added communication path connecting the device Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0032] when = , indicating that the communication network speed of the device connected by the newly added communication path for the Zigbee smart device is equal to the communication network speed of the device connected by the added communication path in the Zigbee communication system, then the communication network speed data of the device connected by the newly added communication path by the user is Or the maximum value data of the communication network speed of the added communication path connection device Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0033] When the Zigbee smart device newly adds a communication path, judgment data If there is no newly added communication path, the maximum value data of the communication network speed of the device connected to the added communication path is Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0034] S62: Connect the optimal communication path of the Zigbee smart device to the device network speed data According to the communication path connection device number and the added communication path connection device IP address data set Communication path connection device IP address data has been added And the user newly added communication path connection device IP address data Search the IP address parameters of the device connected to the optimal communication path of the Zigbee smart device, and search for the network speed data of the device connected to the optimal communication path of the Zigbee smart device Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data And generate Zigbee smart device optimal communication path connection device IP address data through data identification , execute to generate Zigbee smart device optimal communication path connection device IP address data The specific steps are as follows:
[0035] S621, initializing each honey source , which will add the communication path connection device IP address data collection Communication path connection device IP address data has been added And the user newly added communication path connection device IP address data Set as nectar source; Set the number of nectar sources , the current number of iterations n and the maximum number of iterations N; honey source Initial position , the formula for generating the nectar source location is as follows: The IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data The search space composed of is randomly generated, where express The random number inside and Respectively represent the IP address data set of the added communication path connection device Add new communication path to connect device IP address data The upper and lower bounds that make up the search space;
[0036] S622, nectar source location Assign hired bees. At the beginning of the search, hired bees connect to the IP address data set of the device in the added communication path. Add new communication path to connect device IP address data The search space consists of all the IP address data of the devices connected by the added communication paths. Add new communication path to connect device IP address data The location of the nectar source Around, according to the formula Search for new nectar sources , that is, the IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data Traverse the search space to search for all the IP address data of the added communication path connection devices Add new communication path to connect device IP address data ;in Indicated in Randomly select a nectar source that is not equal to i from the nectar sources. Represents a randomly selected nectar source The IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data The positions in the search space are composed of Represents a random number in the range [-1,1];
[0037] S623, based on the location of the new nectar source The fitness of the device is determined by the greedy selection method to retain the honey source, that is, the IP address data set of the device connected to the added communication path is retained. Add new communication path to connect device IP address data The search space is composed of searching for the optimal communication path of the Zigbee smart device to connect the device network speed data Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data ;
[0038] S624, employed bees share nectar source information, and follower bees connect to the device IP address data set in the added communication path according to the probability value. Add new communication path to connect device IP address data The search space is composed of searching for the optimal communication path of the Zigbee smart device to connect the device network speed data Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data The bee search for the nectar source, and the follower bee connects the device network speed data based on the optimal communication path shared by the employed bee with the Zigbee smart device Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data The nectar source information is used to calculate the probability that the nectar source found by the employed bees will be followed according to the probability formula. ,in Indicates the location of a new nectar source The probability of being found and followed by hired bees, Indicates the location of the new nectar source shared by the hired bees according to the follower bees Adaptability;
[0039] S625: Follower bees search in the same way as employed bees and determine the nectar source to be retained based on the greedy selection method. , that is, the IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data The search space is composed of searching for the optimal communication path of the Zigbee smart device to connect the device network speed data Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data ;
[0040] S626: The scout bee connects to the added communication path device IP address data set Add new communication path to connect device IP address data In the random search process in the composition search space, if the location of the honey source After n iterations of searching, the iteration threshold is reached No better nectar source was found. The location of the nectar source The employed bees will be abandoned, and the corresponding employed bees will become scout bees. The calculation formula for the random generation of new nectar source locations in the search space by scout bees is as follows: ,in Indicated in New nectar sources are generated after iterations The IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data The positions in the composition search space, Indicated in New nectar sources are generated after iterations The IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data Composition of positions in the search space;
[0041] S627: When the maximum number of search iterations N is met, the network speed data of the device connected to the optimal communication path of the Zigbee smart device is output. Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data And generate Zigbee smart device optimal communication path connection device IP address data through data identification .
[0042] Preferably, the operation steps of obtaining the Zigbee smart device optimal communication path connection device IP address data and performing the Zigbee smart device communication path connection operation are as follows:
[0043] S71. Obtain the IP address data of the Zigbee smart device's optimal communication path connection device ;
[0044] S72, connecting device IP address data through the Zigbee gateway according to the optimal communication path of the Zigbee smart device The corresponding communication path connection device IP address performs the communication path connection operation to connect the Zigbee smart device to the Zigbee communication system.
[0045] A Zigbee gateway device self-adding networking system with self-generated paths, used to implement the Zigbee gateway device self-adding networking method with self-generated paths, the system comprising a Zigbee gateway communication parameter acquisition module, a Zigbee gateway communication path generation module, and a Zigbee gateway communication connection execution module;
[0046] The Zigbee gateway communication parameter acquisition module includes a user newly added communication path connection device IP address acquisition unit, a user newly added communication path judgment unit, a user newly added communication path connection device communication network speed search unit, an added communication path connection device IP address storage unit, and an added communication path connection device communication network speed search unit;
[0047] The user's newly added communication path connection device IP address collection unit collects the user's newly added communication path connection device IP address data through a mobile intelligent terminal; the user's newly added communication path judgment unit performs Zigbee smart device newly added communication path parameter existence analysis processing based on the user's newly added communication path connection device IP address data, and generates Zigbee smart device newly added communication path existence judgment data; the user's newly added communication path connection device communication network speed search unit collects the user's newly added communication path connection device communication network speed data through a Zigbee gateway; the added communication path connection device IP address storage unit is used to store the added communication path connection device IP address data; the added communication path connection device communication network speed search unit performs communication path connection device communication network speed parameter search processing based on the added communication path connection device IP address data, and generates the added communication path connection device communication network speed data;
[0048] The Zigbee gateway communication path generation module includes a maximum value identification unit for the communication network speed of the added communication path connection device, an optimal communication path connection device communication network speed analysis unit, and an optimal communication path connection device IP address analysis unit;
[0049] The added communication path connection device communication network speed maximum value identification unit performs communication network speed numerical analysis processing of the added communication path connection device based on the communication network speed data of the added communication path connection device, and generates the communication network speed maximum value data of the added communication path connection device; the optimal communication path connection device communication network speed analysis unit performs communication network speed maximum value analysis processing of the communication path connection device of the Zigbee smart device according to the communication network speed data of the newly added communication path connection device by the user and the communication network speed maximum value data of the added communication path connection device, and generates the network speed data of the optimal communication path connection device of the Zigbee smart device; the optimal communication path connection device IP address analysis unit performs IP address parameter search processing of the optimal communication path connection device of the Zigbee smart device according to the network speed data of the optimal communication path connection device of the Zigbee smart device, and constructs the IP address data of the optimal communication path connection device of the Zigbee smart device;
[0050] The Zigbee gateway communication connection execution module includes an optimal communication path connection device IP address acquisition unit and a Zigbee smart device communication connection execution unit;
[0051] The optimal communication path connection device IP address acquisition unit acquires the optimal communication path connection device IP address data of the Zigbee smart device; the Zigbee smart device communication connection execution unit executes the Zigbee smart device communication path connection operation according to the Zigbee smart device optimal communication path connection device IP address data.
[0052] (III) Beneficial effects
[0053] The present invention provides a method and system for self-adding networking of Zigbee gateway devices with self-generated paths. It has the following beneficial effects:
[0054] 1. By using a mobile smart terminal to accurately input the IP address parameters of the device connected to the user's newly added communication path, data support is provided for accurately determining whether the user's newly added communication path exists; the IP address characters of the device connected to the user's newly added communication path are accurately analyzed to scientifically determine whether the newly added communication path parameters of the Zigbee smart device exist; the Zigbee gateway is used to accurately collect the communication network speed parameters of the device connected to the user's newly added communication path, and a customized communication networking path is built for the Zigbee smart device based on the user's choice; based on the scientific preset IP address parameters of the device connected to the added communication path, the Zigbee gateway is used to efficiently and accurately collect the communication network speed parameters of the device connected to the added communication path in the Zigbee communication system, and the optimal communication networking path is built for the Zigbee smart device based on the added communication path in the Zigbee communication system.
[0055] 2. By realizing the added communication path connection device communication speed parameters based on the added communication path connection device, the optimal communication quality has been added for Zigbee smart devices to be screened out; based on the user's newly added communication path parameters and the added communication path parameters in the Zigbee communication system, the optimal communication networking path parameters of Zigbee smart devices are comprehensively and scientifically screened out, and the intelligent management of the communication networking path of Zigbee gateway devices is realized, thereby improving the flexibility and reliability of the Zigbee communication system.
[0056] 3. By accurately collecting the IP address parameters of the Zigbee smart device's optimal communication path connection device, efficient and dynamic adjustment of the Zigbee smart device's optimal communication networking path can be achieved; based on the Zigbee smart device's optimal communication path connection device IP address parameters, the Zigbee smart device communication networking path connection operation is autonomously and accurately executed, thereby improving the efficiency and accuracy of Zigbee gateway device communication management and improving the communication quality of the Zigbee communication system. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 A schematic diagram of a module of a Zigbee gateway device self-adding networking system with self-generated paths provided by the present invention;
[0058] Figure 2 A flow chart of a Zigbee gateway device self-adding networking method with self-generated paths provided by the present invention. DETAILED DESCRIPTION
[0059] 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.
[0060] The embodiments of the Zigbee gateway device self-adding networking method and system for self-generated paths are as follows:
[0061] Embodiment 1:
[0062] See also Figure 1 - Figure 2 , a method for self-adding a Zigbee gateway device to form a network with self-generated paths, the method comprising the following steps:
[0063] S1. Collect the IP address data of the device connected to the newly added communication path by the user;
[0064] S2, analyzing and processing the existence of the newly added communication path parameters of the Zigbee smart device according to the IP address data of the device connected to the newly added communication path by the user, generating the judgment data of the existence of the newly added communication path of the Zigbee smart device, and directly executing step S4 when there is no newly added communication path;
[0065] S3. When there is a newly added communication path, collect the communication network speed data of the device connected to the newly added communication path of the user;
[0066] S4, performing a communication network speed parameter search process on the communication path connection device according to the IP address data of the added communication path connection device, and generating the communication network speed data of the added communication path connection device;
[0067] S5, performing numerical analysis and processing on the communication network speed of the added communication path connection device based on the communication network speed data of the added communication path connection device, and generating maximum value data of the communication network speed of the added communication path connection device;
[0068] S6. Analyze and process the maximum value of the communication network speed of the communication path connection device of the Zigbee smart device according to the communication network speed data of the newly added communication path connection device by the user and the maximum value data of the communication network speed of the already added communication path connection device, generate the network speed data of the optimal communication path connection device of the Zigbee smart device, and perform the IP address parameter search process of the optimal communication path connection device of the Zigbee smart device, and construct the IP address data of the optimal communication path connection device of the Zigbee smart device;
[0069] S7, obtaining the Zigbee smart device optimal communication path connection device IP address data and executing the Zigbee smart device communication path connection operation.
[0070] For further information, see Figure 1 - Figure 2 The steps to collect the IP address data of the device connected to the newly added communication path are as follows:
[0071] S11, the user inputs the newly added communication path connection device IP address parameters for the newly installed Zigbee smart device in the Zigbee communication system online through the mobile smart terminal and generates the user's newly added communication path connection device IP address data The mobile intelligent terminal includes any one of a smart phone, a smart watch, and a tablet computer. The user's newly added communication path connection device IP address data represents the communication IP address data of the communication path connection device newly set by the user for the newly installed Zigbee smart device.
[0072] According to the IP address data of the device connected to the newly added communication path of the user, the parameters of the newly added communication path of the Zigbee smart device are analyzed and processed to generate the judgment data of the newly added communication path of the Zigbee smart device. When there is no newly added communication path, the operation steps of directly executing step S4 are as follows:
[0073] S21, add the communication path connection device IP address data to the user Perform character analysis on the IP address of the newly added communication path connected to the Zigbee smart device, and generate the judgment data on the existence of the newly added communication path connected to the Zigbee smart device based on the character analysis result of the IP address of the newly added communication path connected to the Zigbee smart device ;
[0074] when If there is an IP address character in the Zigbee smart device, it means that the user has added a new communication path to connect the device IP address data, and the output is the judgment data of the newly added communication path of the Zigbee smart device. Adding new communication paths for existence;
[0075] when If there is no IP address character in the Zigbee smart device, it means that the user has not added a new communication path to connect the device IP address data, then the Zigbee smart device will output the judgment data of the newly added communication path. Since there is no newly added communication path, steps S41 and S42 are directly executed.
[0076] When there is a newly added communication path, the steps for collecting the communication network speed data of the device connected to the newly added communication path are as follows:
[0077] S31, when the Zigbee smart device adds a new communication path and there is judgment data When a new communication path is added, the Zigbee gateway device connects to the device IP address data based on the newly added communication path. Collect the communication network speed parameters of the newly added communication path connection device online and generate the communication network speed data of the newly added communication path connection device ,in The unit is Kbps.
[0078] The operation steps for searching and processing the communication network speed parameters of the communication path connection device based on the IP address data of the added communication path connection device and generating the communication network speed data of the added communication path connection device are as follows:
[0079] S41, establish the IP address data set B of the added communication path connection device = ( ,..., ,... ), ;in Indicates The IP address data of the added communication path connection device corresponding to the added communication path connection device, Indicates the maximum number of added communication path connection devices. Added communication path connection devices indicate communication path connection devices that have been connected to the Zigbee communication system. Added communication path connection devices include Zigbee gateways and Zigbee smart devices.
[0080] S42, Zigbee gateway device connects to device IP address data set based on the added communication path Communication path connection device IP address data has been added to Orderly collect the communication network speed parameters of the devices connected to the added communication paths online and generate the communication network speed data set C=(c1,...,c m ,..., c ε ),in Indicates The communication network speed data of the added communication path connection device corresponding to the added communication path connection device, where The unit is Kbps.
[0081] Through the IP address collection unit for the device connected to the newly added communication path by the user, the mobile intelligent terminal is used to accurately input the IP address parameters of the device connected to the newly added communication path by the user, so as to provide data support for accurately judging whether the newly added communication path by the user exists; the judgment unit for the newly added communication path by the user performs accurate IP address character analysis on the IP address parameters of the device connected to the newly added communication path by the user, so as to scientifically judge whether the newly added communication path parameters of the Zigbee intelligent device exist; the communication network speed search unit for the device connected to the newly added communication path by the user uses the Zigbee gateway to accurately collect the communication network speed parameters of the device connected to the newly added communication path by the user, so as to realize customized construction of communication networking paths for Zigbee intelligent devices based on user selection; the IP address storage unit for the device connected to the added communication path and the communication network speed search unit for the device connected to the added communication path cooperate with each other, and based on the scientifically preset IP address parameters of the device connected to the added communication path, cooperate with the Zigbee gateway to efficiently and accurately collect the communication network speed parameters of the device connected to the added communication path in the Zigbee communication system, so as to realize the construction of the optimal communication networking path for the Zigbee intelligent device based on the added communication path in the Zigbee communication system.
[0082] For further information, see Figure 1 - Figure 2, based on the communication network speed data of the added communication path connection device, the communication network speed value analysis and processing of the added communication path connection device is performed, and the operation steps for generating the maximum value data of the communication network speed of the added communication path connection device are as follows:
[0083] S51, using a breadth-first search algorithm to add a communication path to connect the communication speed data set of the device Communication path connection device communication network speed data has been added Perform communication speed value analysis and search for the communication speed data of the added communication path connection device with the largest communication speed value. And generate the maximum value data of the communication network speed of the added communication path connection device through data identification ,in The unit is Kbps.
[0084] According to the communication network speed data of the newly added communication path connection device by the user and the maximum communication network speed data of the added communication path connection device, the maximum communication network speed of the communication path connection device of the Zigbee smart device is analyzed and processed, the network speed data of the optimal communication path connection device of the Zigbee smart device is generated, and the IP address parameter search processing of the optimal communication path connection device of the Zigbee smart device is performed. The operation steps for constructing the IP address data of the optimal communication path connection device of the Zigbee smart device are as follows:
[0085] S61, when the Zigbee smart device adds a new communication path and there is judgment data When a new communication path is added, the communication speed data of the device connected to the newly added communication path will be Maximum data of the communication speed of the device connected to the added communication path Compare the communication speed values of Zigbee smart devices’ communication paths and devices, and generate the optimal communication speed data of Zigbee smart devices’ communication paths and devices based on the comparison results. ,in The unit is Kbps;
[0086] when > , indicating that the communication speed of the device connected to the newly added communication path for the Zigbee smart device is greater than the communication speed of the device connected to the communication path added in the Zigbee communication system, then the communication speed data of the device connected to the newly added communication path by the user will be Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0087] when < , indicating that the communication speed of the newly added communication path connecting the Zigbee smart device is lower than the communication speed of the already added communication path connecting the device in the Zigbee communication system, then the maximum value data of the communication speed of the already added communication path connecting the device Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0088] when = , indicating that the communication speed of the device connected by the newly added communication path for the Zigbee smart device is equal to the communication speed of the device connected by the added communication path in the Zigbee communication system, then the communication speed data of the device connected by the newly added communication path will be Or the communication path connection device communication speed maximum value data has been added Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0089] When a new communication path is added to the Zigbee smart device, judgment data exists If there is no new communication path, the maximum value data of the communication network speed of the device connected to the added communication path will be Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ;
[0090] S62, connect the Zigbee smart device to the device network speed data through the optimal communication path Data collection of device numbers connected by communication paths and IP addresses of devices connected by added communication paths Communication path connection device IP address data has been added And the IP address data of the device connected to the newly added communication path by the user Search for IP address parameters of devices connected to the optimal communication path of Zigbee smart devices, and search for network speed data of devices connected to the optimal communication path of Zigbee smart devices Matching added communication path connection device IP address data Or the user adds a new communication path to connect the device IP address data And generate Zigbee smart device optimal communication path connection device IP address data through data identification , execute to generate Zigbee smart device optimal communication path connection device IP address data The specific steps are as follows:
[0091] S621, initializing each honey source , which will add the communication path connection device IP address data collection Communication path connection device IP address data has been added And the IP address data of the device connected to the newly added communication path by the user Set as nectar source; Set the number of nectar sources , the current number of iterations n and the maximum number of iterations N; honey source Initial position , the formula for generating the nectar source location is as follows: IP address data collection of connected devices in the added communication path Add new communication path to connect device IP address data The search space composed of is randomly generated, where express The random number inside and Respectively represent the IP address data set of the added communication path connection device Add new communication path to connect device IP address data The upper and lower bounds that make up the search space;
[0092] S622, nectar source location Assign hired bees. At the beginning of the search, hired bees connect to the IP address data set of the device in the added communication path. Add new communication path to connect device IP address data The search space consists of all the IP address data of the devices connected by the added communication paths. Add new communication path to connect device IP address data The location of the nectar source Around, according to the formula Search for new nectar sources , that is, the IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data Traverse the search space to search for all the IP address data of the added communication path connection devices Add new communication path to connect device IP address data ;in Indicated in Randomly select a nectar source that is not equal to i from the nectar sources. Represents a randomly selected nectar source IP address data collection of connected devices in the added communication path Add new communication path to connect device IP address data The positions in the search space are composed of Represents a random number in the range [-1,1];
[0093] S623, based on the location of the new nectar source The fitness of the device is determined by the greedy selection method to retain the honey source, that is, the IP address data set of the device connected to the added communication path is retained. Add new communication path to connect device IP address data Search for the optimal communication path of Zigbee smart devices in the search space to connect the device network speed data Matching added communication path connection device IP address data Or the user adds a new communication path to connect the device IP address data ;
[0094] S624, employed bees share nectar source information, and follower bees connect to the device IP address data set in the added communication path according to the probability value. Add new communication path to connect device IP address data Search for the optimal communication path of Zigbee smart devices in the search space to connect the device network speed data Matching added communication path connection device IP address data Or the user adds a new communication path to connect the device IP address data Search for honey sources, follow the bees and connect to the device network speed data based on the optimal communication path with Zigbee smart devices shared by the employed bees Matching added communication path connection device IP address data Or the user adds a new communication path to connect the device IP address data The nectar source information is used to calculate the probability that the nectar source found by the employed bees will be followed according to the probability formula. ,in Indicates the location of a new nectar source The probability of being found and followed by hired bees, Indicates the location of the new nectar source shared by the hired bees according to the follower bees Adaptability;
[0095] S625: Follower bees search in the same way as employed bees and determine the nectar source to be retained based on the greedy selection method. , that is, the IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data Search for the optimal communication path of Zigbee smart devices in the search space to connect the device network speed data Matching added communication path connection device IP address data Or the user adds a new communication path to connect the device IP address data ;
[0096] S626, the scout bee collects IP address data of the device connected to the added communication path Add new communication path to connect device IP address data In the random search process in the composition search space, if the location of the honey source After n iterations of searching, the iteration threshold is reached No better nectar source was found. The location of the nectar source The employed bees will be abandoned, and the corresponding employed bees will become scout bees. The calculation formula for the random generation of new nectar source locations in the search space by scout bees is as follows: ,in Indicated in New nectar sources are generated after iterations IP address data collection of connected devices in the added communication path Add new communication path to connect device IP address data The positions in the composition search space, Indicated in New nectar sources are generated after iterations IP address data collection of connected devices in the added communication path Add new communication path to connect device IP address data Composition of positions in the search space;
[0097] S627: When the maximum number of search iterations N is met, the network speed data of the device connected to the optimal communication path of the Zigbee smart device is output. Matching added communication path connection device IP address data Or the user adds a new communication path to connect the device IP address data And generate Zigbee smart device optimal communication path connection device IP address data through data identification .
[0098] Through the added communication path connection device communication network speed maximum value identification unit, it is possible to screen out the added communication networking path connection device with the best communication quality for the Zigbee smart device based on the communication network speed parameters of the added communication path connection device; the optimal communication path connection device communication network speed analysis unit and the optimal communication path connection device IP address analysis unit cooperate with each other to achieve comprehensive and scientific screening of the optimal communication networking path parameters of the Zigbee smart device based on the user's newly added communication path parameters and the added communication path parameters in the Zigbee communication system, realize the intelligent management of the communication networking path of the Zigbee gateway device, and improve the flexibility and reliability of the Zigbee communication system.
[0099] For further information, see Figure 1 - Figure 2 The steps to obtain the Zigbee smart device optimal communication path connection device IP address data and perform the Zigbee smart device communication path connection operation are as follows:
[0100] S71. Obtain the IP address data of the Zigbee smart device's optimal communication path connection device ;
[0101] S72, connect device IP address data through Zigbee gateway according to the optimal communication path of Zigbee smart device The corresponding communication path connection device IP address performs the communication path connection operation to connect the Zigbee smart device to the Zigbee communication system.
[0102] Through the optimal communication path connection device IP address acquisition unit, the optimal communication path connection device IP address parameters of the Zigbee smart device are accurately collected, so as to realize efficient and dynamic adjustment of the optimal communication networking path of the Zigbee smart device; the Zigbee smart device communication connection execution unit independently and accurately executes the Zigbee smart device communication networking path connection operation according to the optimal communication path connection device IP address parameters of the Zigbee smart device, thereby improving the efficiency and accuracy of Zigbee gateway device communication management and improving the communication quality of the Zigbee communication system.
[0103] Embodiment 2:
[0104] See also Figure 1 - Figure 2 , a Zigbee gateway device self-adding networking system with self-generated paths, a Zigbee gateway device self-adding networking method with self-generated paths for implementation, the system includes a Zigbee gateway communication parameter acquisition module, a Zigbee gateway communication path generation module, and a Zigbee gateway communication connection execution module;
[0105] The Zigbee gateway communication parameter acquisition module includes a user newly added communication path connection device IP address acquisition unit, a user newly added communication path judgment unit, a user newly added communication path connection device communication network speed search unit, an added communication path connection device IP address storage unit, and an added communication path connection device communication network speed search unit;
[0106] The user's newly added communication path connection device IP address collection unit collects the user's newly added communication path connection device IP address data through the mobile intelligent terminal; the user's newly added communication path judgment unit performs Zigbee intelligent device newly added communication path parameter existence analysis processing based on the user's newly added communication path connection device IP address data, and generates Zigbee intelligent device newly added communication path existence judgment data; the user's newly added communication path connection device communication network speed search unit collects the user's newly added communication path connection device communication network speed data through the Zigbee gateway; the added communication path connection device IP address storage unit is used to store the added communication path connection device IP address data; the added communication path connection device communication network speed search unit performs communication path connection device communication network speed parameter search processing based on the added communication path connection device IP address data, and generates the added communication path connection device communication network speed data;
[0107] The Zigbee gateway communication path generation module includes a maximum value identification unit for the communication network speed of the added communication path connection device, an optimal communication path connection device communication network speed analysis unit, and an optimal communication path connection device IP address analysis unit;
[0108] The maximum value identification unit of the communication network speed of the added communication path connection device performs numerical analysis and processing of the communication network speed of the added communication path connection device based on the communication network speed data of the added communication path connection device, and generates the maximum value data of the communication network speed of the added communication path connection device; the communication network speed analysis unit of the optimal communication path connection device performs maximum value analysis and processing of the communication network speed of the communication path connection device of the Zigbee smart device according to the communication network speed data of the newly added communication path connection device by the user and the maximum value data of the communication network speed of the added communication path connection device, and generates the network speed data of the optimal communication path connection device of the Zigbee smart device; the IP address analysis unit of the optimal communication path connection device performs IP address parameter search and processing of the optimal communication path connection device of the Zigbee smart device according to the network speed data of the optimal communication path connection device of the Zigbee smart device, and constructs the IP address data of the optimal communication path connection device of the Zigbee smart device;
[0109] The Zigbee gateway communication connection execution module includes an optimal communication path connection device IP address acquisition unit and a Zigbee smart device communication connection execution unit;
[0110] The optimal communication path connection device IP address acquisition unit acquires the Zigbee smart device optimal communication path connection device IP address data; the Zigbee smart device communication connection execution unit executes the Zigbee smart device communication path connection operation according to the Zigbee smart device optimal communication path connection device IP address data.
[0111] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for self-adding a Zigbee gateway device with self-generated paths, characterized in that: The method comprises the following steps: S1. Collecting IP address data of a newly added communication path connection device by a user, wherein S1 includes the following steps: S11, the user inputs the newly added communication path connection device IP address parameters for the newly installed Zigbee smart device in the Zigbee communication system online through the mobile smart terminal and generates the user's newly added communication path connection device IP address data ; S2, performing analysis and processing on the parameters of the newly added communication path of the Zigbee smart device according to the IP address data of the device connected to the newly added communication path of the user, generating judgment data on the existence of the newly added communication path of the Zigbee smart device, and directly executing step S4 when there is no newly added communication path, wherein S2 includes the following steps: S21, adding a new communication path connection device IP address data to the user Perform character analysis on the IP address of the newly added communication path connected to the Zigbee smart device, and generate the judgment data on the existence of the newly added communication path connected to the Zigbee smart device based on the character analysis result of the IP address of the newly added communication path connected to the Zigbee smart device ; When the If there is an IP address character in the output, the new communication path of the Zigbee smart device is added. Adding new communication paths for existence; When the If there is no IP address character in the output, the judgment data of the newly added communication path of the Zigbee smart device is output. If there is no newly added communication path, then directly execute the step S4; S3. When there is a newly added communication path, collect the communication network speed data of the device connected to the newly added communication path of the user, and S3 includes the following steps: S31, when the Zigbee smart device newly adds a communication path and there is judgment data When there is a newly added communication path, the Zigbee gateway device connects the device IP address data according to the newly added communication path of the user Collect the communication network speed parameters of the newly added communication path connection device online and generate the communication network speed data of the newly added communication path connection device ,in The unit is Kbps; S4, performing communication network speed parameter search processing on the communication path connection device according to the IP address data of the added communication path connection device, and generating communication network speed data of the added communication path connection device, wherein S4 includes the following steps: S41, establish the IP address data set B of the added communication path connection device = ( ,..., ,... ), ;in Indicates The IP address data of the added communication path connection device corresponding to the added communication path connection device, Indicates the maximum number of devices connected to the added communication path; S42, the Zigbee gateway device connects to the device IP address data set according to the added communication path Communication path connection device IP address data has been added to Orderly collect the communication network speed parameters of the devices connected to the added communication paths online and generate the communication network speed data set C=(c1,...,c m ,..., c ε ),in Indicates The communication network speed data of the added communication path connection device corresponding to the added communication path connection device, where The unit is Kbps; S5, based on the communication network speed data of the added communication path connection device, perform numerical analysis and processing on the communication network speed of the added communication path connection device to generate maximum value data of the communication network speed of the added communication path connection device, wherein S5 comprises the following steps: S51, using a breadth-first search algorithm to connect the communication path to the communication network speed data set of the added communication path The communication path connection device communication network speed data has been added as described in Perform communication network speed value analysis to search for the communication network speed data of the added communication path connection device with the largest communication network speed value. And generate the maximum value data of the communication network speed of the added communication path connection device through data identification ,in The unit is Kbps; S6, according to the communication network speed data of the newly added communication path connection device by the user and the maximum communication network speed data of the added communication path connection device, the maximum communication network speed of the communication path connection device of the Zigbee smart device is analyzed and processed, the network speed data of the optimal communication path connection device of the Zigbee smart device is generated, and the IP address parameter search processing of the optimal communication path connection device of the Zigbee smart device is performed, and the IP address data of the optimal communication path connection device of the Zigbee smart device is constructed, and the S6 includes the following steps: S61: When the Zigbee smart device newly adds a communication path and there is judgment data When a new communication path is added, the communication network speed data of the device connected to the newly added communication path is recorded. The maximum value data of the communication network speed of the device connected to the added communication path Compare the communication speed values of Zigbee smart devices’ communication paths and devices, and generate the optimal communication speed data of Zigbee smart devices’ communication paths and devices based on the comparison results. , The unit is Kbps; when > , then the communication speed data of the newly added communication path connection device of the user Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ; when < , then the added communication path connection device communication network speed maximum value data Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ; when = , then the communication speed data of the newly added communication path connection device of the user Or the maximum value data of the communication network speed of the added communication path connection device Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ; When the Zigbee smart device newly adds a communication path, judgment data If there is no newly added communication path, the maximum value data of the communication network speed of the device connected to the added communication path is Generate the optimal communication path of Zigbee smart devices through data identification to connect the device network speed data ; S62: Connect the optimal communication path of the Zigbee smart device to the device network speed data According to the communication path connection device number and the added communication path connection device IP address data set Communication path connection device IP address data has been added And the user newly added communication path connection device IP address data Search the IP address parameters of the device connected to the optimal communication path of the Zigbee smart device, and search for the network speed data of the device connected to the optimal communication path of the Zigbee smart device Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data And generate Zigbee smart device optimal communication path connection device IP address data through data identification , execute to generate Zigbee smart device optimal communication path connection device IP address data The specific steps are as follows: S621, initializing each honey source , which will add the communication path connection device IP address data collection Communication path connection device IP address data has been added And the user newly added communication path connection device IP address data Set as nectar source; Set the number of nectar sources , the current number of iterations n and the maximum number of iterations N; honey source Initial position ; S622, nectar source location Assign hired bees. At the beginning of the search, hired bees connect to the IP address data set of the device in the added communication path. Add new communication paths to connect devices with IP address data The search space consists of all the IP address data of the devices connected by the added communication paths. Add new communication paths to connect devices with IP address data The location of the nectar source Around, search for new nectar source locations based on the formula , that is, the IP address data set of the device connected to the added communication path Add new communication paths to connect devices with IP address data Traverse the search space to search for all the IP address data of the added communication path connection devices Add new communication paths to connect devices with IP address data ; S623, based on the location of the new nectar source The fitness of the device is determined by the greedy selection method to retain the honey source, that is, the IP address data set of the device connected to the added communication path is retained. Add new communication path to connect device IP address data The search space is composed of searching for the optimal communication path of the Zigbee smart device to connect the device network speed data Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data ; S624, employed bees share nectar source information, and follower bees connect to the device IP address data set in the added communication path according to the probability value. Add new communication path to connect device IP address data The search space is composed of searching for the optimal communication path of the Zigbee smart device to connect the device network speed data Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data The bee search for the nectar source, and the follower bee connects the device network speed data based on the optimal communication path shared by the employed bee with the Zigbee smart device Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data The nectar source information is used to calculate the probability of the nectar source found by the employed bees being followed according to the probability formula; S625: Follower bees search in the same way as employed bees and determine the nectar source to be retained based on the greedy selection method. , that is, the IP address data set of the device connected to the added communication path Add new communication path to connect device IP address data The search space is composed of searching for the optimal communication path of the Zigbee smart device to connect the device network speed data Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data ; S626: The scout bee connects to the added communication path device IP address data set Add new communication path to connect device IP address data In the random search process in the composition search space, if the location of the honey source After n iterations of searching, the iteration threshold is reached No better nectar source was found. The location of the nectar source The bees will be abandoned, and the corresponding employed bees will become scout bees. The scout bees will randomly generate new nectar source locations in the search space. S627: When the maximum number of search iterations N is met, the network speed data of the device connected to the optimal communication path of the Zigbee smart device is output. Match the IP address data of the device connected to the added communication path Or the user newly adds the communication path connection device IP address data And generate Zigbee smart device optimal communication path connection device IP address data through data identification ; S7, obtaining the IP address data of the Zigbee smart device optimal communication path connection device and executing the Zigbee smart device communication path connection operation.
2. The method for self-adding a Zigbee gateway device with self-generated paths according to claim 1, characterized in that: The S7 comprises the following steps: S71. Obtain the IP address data of the Zigbee smart device's optimal communication path connection device ; S72, connecting device IP address data through the Zigbee gateway according to the optimal communication path of the Zigbee smart device The corresponding communication path connection device IP address performs the communication path connection operation to connect the Zigbee smart device to the Zigbee communication system.
3. A Zigbee gateway device self-adding networking system with self-generated paths, used to implement a Zigbee gateway device self-adding networking method with self-generated paths according to any one of claims 1-2, characterized in that: The system comprises a Zigbee gateway communication parameter acquisition module, a Zigbee gateway communication path generation module, and a Zigbee gateway communication connection execution module.
