Search

CN-122028138-A - ZigBee star network master node election method and electronic equipment

CN122028138ACN 122028138 ACN122028138 ACN 122028138ACN-122028138-A

Abstract

The embodiment of the invention provides a ZigBee star network master node election method and electronic equipment, and relates to the technical field of distributed communication. According to the method, a plurality of performance evaluation indexes of the candidate nodes are obtained through calculation according to flow data of the candidate nodes, the performance evaluation indexes are sent to the candidate nodes, the candidate nodes normalize the performance evaluation indexes based on all the received performance evaluation indexes, the performance comprehensive score of the candidate nodes is obtained through calculation, the candidate nodes send the performance comprehensive score of the candidate nodes to a temporary coordination node, the temporary coordination node is any one of the candidate nodes, and the temporary coordination node selects a main node from the candidate nodes based on all the received performance comprehensive scores. Therefore, the limitation of traditional single index election can be broken through.

Inventors

  • WANG ZHICHENG
  • LU CHAOJUN
  • WANG HUAI

Assignees

  • 安徽容知日新科技股份有限公司

Dates

Publication Date
20260512
Application Date
20260225

Claims (10)

  1. 1. The ZigBee star-type network master node election method is characterized by comprising the following steps: Each candidate node calculates a plurality of performance evaluation indexes according to the flow data of the candidate node, and sends each performance evaluation index to each candidate node; each candidate node performs normalization processing on the performance evaluation indexes of the candidate nodes based on all the received performance evaluation indexes, and then calculates to obtain the performance comprehensive score of the candidate nodes; each candidate node transmits the performance comprehensive score of the candidate node to a temporary coordination node, wherein the temporary coordination node is any one of the candidate nodes; the temporary coordination node elects a master node from the candidate nodes based on the received overall performance composite score.
  2. 2. The method of claim 1, wherein the performance evaluation metrics include traffic handling capacity, energy sufficiency, signal stability, hardware suitability, and data forwarding delay, wherein each candidate node calculates a plurality of performance evaluation metrics of itself according to its traffic data, and sends each performance evaluation metric to each candidate node, comprising: Calculating to obtain the flow processing capacity according to the real-time flow load rate, the historical flow peak value and the data priority processing capacity of the candidate node in a preset statistical period; Calculating the energy sufficiency rate according to the current battery power percentage of the candidate node; calculating to obtain the signal stability according to a plurality of signal strength sampling values acquired by the candidate nodes in a preset period; calculating to obtain the hardware suitability according to the ratio between the data cache capacity of the candidate node and the total data generated in unit time; And calculating the data forwarding delay according to the average delay time of forwarding data of the candidate node in the preset test times.
  3. 3. The method according to claim 2, wherein the calculating the traffic handling capability according to the real-time traffic load rate, the historical traffic peak, and the data priority handling capability of the candidate node in the preset statistical period includes: Calculating to obtain a real-time flow load rate according to the ratio of the flow actually processed by the candidate node in the preset statistical period to the maximum supported flow calibrated by the hardware of the candidate node; calculating to obtain the peak adaptation degree of the historical flow according to the ratio of the maximum flow value of the candidate node in the preset number of historical acquisition periods to the maximum supported flow; Calculating to obtain the data priority processing capacity according to the proportion of the high priority data volume successfully processed by the candidate node in the preset statistical period to the total received high priority data volume; weighting and summing according to the real-time traffic load rate, the historical traffic peak adaptation degree and the data priority processing capacity to obtain a traffic processing capacity basic score; Calculating a flow fluctuation coefficient according to the flow time sequence data which is collected by the candidate node in the preset statistical period and is distinguished according to the priority; and adjusting the basic score of the flow processing capacity based on the flow fluctuation coefficient to obtain the final flow processing capacity.
  4. 4. A method according to claim 3, wherein said calculating a flow fluctuation coefficient from prioritized flow timing data collected by said candidate node during said predetermined statistical period comprises: dividing the preset statistical period into N slices according to time uniformity, and acquiring high-priority flow data and conventional-priority flow data in each slice to obtain N high-priority flow data sequences and N conventional-priority flow data sequences; calculating to obtain high-priority average flow according to the N high-priority flow data sequences; Calculating to obtain conventional priority average flow according to the N conventional priority flow data sequences; Distributing preset weights for the high-priority average flow and the conventional-priority average flow, and carrying out weighted summation to obtain an overall flow average value; And calculating to obtain a flow fluctuation coefficient representing flow stability according to the total flow data of the N slices and the overall flow average value, wherein the total flow data of each slice is the sum of high-priority flow data and conventional-priority flow data in the slice.
  5. 5. The method of claim 1, wherein the calculating the performance composite score of each candidate node after normalizing the performance evaluation index of each candidate node based on all the received performance evaluation indexes comprises: For each performance evaluation index, each candidate node determines the maximum value and the minimum value of the performance evaluation index from all the received performance evaluation indexes; based on the maximum value and the minimum value, carrying out normalization processing on the performance evaluation index of the self-body to obtain a normalization index; And carrying out weighted summation on each normalized index and the corresponding preset weight, and calculating to obtain the performance comprehensive score of the candidate node, wherein the weight distributed by the flow processing capacity is not lower than 50% of the total weight.
  6. 6. The method of claim 1, wherein the temporary coordinator node elects a master node from among the candidate nodes based on the received overall performance composite score, comprising: the temporary coordination node selects a candidate node corresponding to the highest score from all the received performance comprehensive scores as a candidate master node; performing verification test on connectivity and load capacity of the candidate master node; if the candidate master node meets a preset verification condition in the verification test, determining the candidate master node as a final master node; And if the candidate master node fails the verification test, eliminating the candidate master node from the candidate list, and re-selecting the candidate master node based on the performance comprehensive score of the remaining candidate nodes until the master node meeting the verification condition is selected.
  7. 7. The method according to claim 1, wherein the method further comprises: Recalculating the performance comprehensive score of each candidate node according to the updated node information in a preset evaluation period; If the current main node meets the preset trigger adjustment condition, starting a new round of main node election and switching based on the recalculated performance comprehensive score; the newly elected master node realizes the rapid switching of the network by inheriting the communication configuration of the original master node.
  8. 8. The main node election method of the ZigBee star type network is characterized by being applied to any candidate node of the ZigBee star type network, and the method comprises the following steps: Receiving node information sent by other candidate nodes, wherein the node information at least comprises flow data of each candidate node; Based on the received flow data corresponding to each candidate node, respectively calculating a plurality of performance evaluation indexes of each candidate node; After normalization processing is carried out on each performance evaluation index, calculating to obtain the performance comprehensive score of each candidate node; and selecting a master node from all candidate nodes based on each performance composite score.
  9. 9. The ZigBee star-type network master node election method is characterized by being applied to a server, and comprises the following steps: receiving node information reported by each candidate node, wherein the node information at least comprises flow data of each candidate node; Based on the received flow data corresponding to each candidate node, respectively calculating a plurality of performance evaluation indexes of each candidate node; After normalization processing is carried out on each performance evaluation index, calculating to obtain the performance comprehensive score of each candidate node; and based on the performance comprehensive scores, selecting a master node from all candidate nodes, and transmitting the selection result to the ZigBee star network.
  10. 10. An electronic device comprising a memory, a processor and a computer program stored on the memory and running on the processor, characterized in that the processor implements the method of claim 8 or 9 when executing the computer program.

Description

ZigBee star network master node election method and electronic equipment Technical Field The invention relates to the technical field of distributed communication, in particular to a ZigBee star-type network master node election method and electronic equipment. Background The ZigBee technology is used as a wireless communication technology with low power consumption, low cost and short distance, is widely applied to equipment state monitoring scenes (such as industrial production equipment and intelligent monitoring terminals) of single equipment and multiple sensors, and is often integrated with temperature, vibration and other multiple types of sensors to realize omnibearing data acquisition. The ZigBee star networking topology is a preferred scheme of the scene due to simple structure and high data aggregation efficiency, the network architecture is that all sensor nodes are directly communicated with a main node, and a non-main node sensor transmits acquired data to the main node and then the acquired data is uniformly uploaded to an upper computer or a cloud platform by the main node. The traditional main node election method mainly takes a single index of signal strength as an election basis, determines a main node by judging the signal strength of a node, and completes the core node deployment of a star network. However, depending on signal strength elections alone, the elected node may have good radio channel conditions but lack sufficient local data processing and buffering capabilities. Under the multi-sensor concurrent access scene, hardware resources of the multi-sensor concurrent access scene are easy to become bottlenecks, so that data backlog and forwarding delay are increased, and even buffer overflow and data discarding occur. Disclosure of Invention Accordingly, an objective of the embodiments of the present invention is to provide a ZigBee star network master node election method and an electronic device to at least partially improve the above-mentioned problems. In order to achieve the above object, the technical scheme adopted by the embodiment of the invention is as follows: In a first aspect, an embodiment of the present invention provides a ZigBee star network master node election method, including: Each candidate node calculates a plurality of performance evaluation indexes according to the flow data of the candidate node, and sends each performance evaluation index to each candidate node; each candidate node performs normalization processing on the performance evaluation indexes of the candidate nodes based on all the received performance evaluation indexes, and then calculates to obtain the performance comprehensive score of the candidate nodes; each candidate node transmits the performance comprehensive score of the candidate node to a temporary coordination node, wherein the temporary coordination node is any one of the candidate nodes; the temporary coordination node elects a master node from the candidate nodes based on the received overall performance composite score. Optionally, the performance evaluation indexes include flow processing capability, energy sufficiency, signal stability, hardware suitability and data forwarding delay, each candidate node calculates, according to own flow data, a plurality of performance evaluation indexes of the candidate node, and sends each performance evaluation index to each candidate node, including: Calculating to obtain the flow processing capacity according to the real-time flow load rate, the historical flow peak value and the data priority processing capacity of the candidate node in a preset statistical period; Calculating the energy sufficiency rate according to the current battery power percentage of the candidate node; calculating to obtain the signal stability according to a plurality of signal strength sampling values acquired by the candidate nodes in a preset period; calculating to obtain the hardware suitability according to the ratio between the data cache capacity of the candidate node and the total data generated in unit time; And calculating the data forwarding delay according to the average delay time of forwarding data of the candidate node in the preset test times. Optionally, the calculating, according to the real-time traffic load rate, the historical traffic peak value and the data priority processing capability of the candidate node in the preset statistical period, the traffic processing capability includes: Calculating to obtain a real-time flow load rate according to the ratio of the flow actually processed by the candidate node in the preset statistical period to the maximum supported flow calibrated by the hardware of the candidate node; calculating to obtain the peak adaptation degree of the historical flow according to the ratio of the maximum flow value of the candidate node in the preset number of historical acquisition periods to the maximum supported flow; Calculating to obtain the data priority process