Smart community Internet of Things communication method based on tree structure

By building a tree-based network topology in smart community Internet of Things communication, path optimization, energy balance transmission and data anomaly detection, the shortcomings of existing methods in path optimization, energy management and data exception processing are solved, communication efficiency and data reliability are improved, and intelligent management of smart communities are provided.

CN118118508BActive Publication Date: 2025-04-04HARBIN SIHE INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410227333.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2025-04-04
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

The existing smart community IoT communication method based on tree structures has shortcomings in path optimization, energy management and data exception handling, and it is difficult to quickly adapt to changes in the network environment, resulting in a decrease in communication efficiency, unbalanced energy consumption and the accuracy and reliability of data transmission.

Method used

By building a network topology based on a tree structure, the relay node regularly collects child node status information and its own status for path optimization, collects data in real time for layered data aggregation and implements energy balanced transmission, performs abnormal detection of the collected data and formulates countermeasures.

Benefits of technology

It realizes flexible optimization of network paths, improves data transmission efficiency, and ensures data accuracy and reliability by balancing node energy consumption and abnormal detection, providing strong support for the intelligent management of smart communities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118118508B_ABST
    Figure CN118118508B_ABST
Patent Text Reader

Abstract

The present invention discloses a smart community Internet of Things communication method based on a tree structure, which relates to the field of Internet of Things communication technology, including constructing a network topology based on a tree structure; relay nodes regularly collect sub-node status information and their own status to evaluate path quality for path optimization; real-time data collection for hierarchical data aggregation and energy-balanced transmission; anomaly detection of collected data and formulation of countermeasures. The present invention realizes flexible optimization of network paths by constructing a network topology based on a tree structure. Intermediate nodes not only regularly collect status information of sub-nodes, but also evaluate path quality in combination with their own status, make path adjustments in a timely manner, improve data transmission efficiency, and ensure data accuracy and reliability by balancing node energy consumption and performing anomaly detection on collected data to formulate corresponding countermeasures, providing strong support for the intelligent management of smart communities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of Internet of Things communication, and in particular to a tree-structured smart community Internet of Things communication method. Background Art

[0002] In the development of smart communities, the Internet of Things technology plays a key role. It connects various sensors and devices to achieve real-time monitoring and management of the environment, device status and user behavior. In recent years, with the rapid development of the Internet of Things technology, the construction of smart communities has also made significant progress. In this process, the communication method has become a core technical issue. The network topology based on the tree structure is widely used in the Internet of Things communication because of its clear hierarchy, easy management and expansion. This structure usually consists of a root node and multiple hierarchical child nodes. Data is transmitted from the child node to the root node along the tree path. However, the existing tree-structured communication method is still not widely used in the Internet of Things applications in smart communities. There are some shortcomings. Existing methods often lack flexibility and adaptability in path optimization. Due to the complexity and dynamics of the IoT environment, the fixed tree structure may not be able to effectively cope with changes in network topology, node failures, or fluctuations in communication links. For those sensor nodes that rely on battery power, existing methods often do not fully consider energy-balanced transmission, which may cause some nodes to run out of energy too quickly, affecting the stability and continuous operation time of the network. Existing methods have deficiencies in path selection, energy management, and data anomaly processing, and it is difficult to quickly adapt to changes in the network environment, resulting in reduced communication efficiency, uneven energy consumption, and affected accuracy and reliability of data transmission. Summary of the invention

[0003] In view of the problems existing in the above-mentioned existing tree-structured smart community Internet of Things communication method, the present invention is proposed.

[0004] Therefore, the problem to be solved by the present invention is that the existing methods have deficiencies in path selection, energy management and data anomaly processing, and it is difficult to quickly adapt to changes in the network environment, resulting in reduced communication efficiency, uneven energy consumption, and affected accuracy and reliability of data transmission.

[0005] To solve the above technical problems, the present invention provides the following technical solutions: a smart community Internet of Things communication method based on a tree structure, which includes: constructing a network topology based on a tree structure; relay nodes regularly collect child node status information and their own status to evaluate path quality for path optimization; real-time data collection for hierarchical data aggregation and energy-balanced transmission; anomaly detection of collected data and formulation of response measures.

[0006] As a preferred solution of the tree-structured smart community Internet of Things communication method described in the present invention, the tree-structured network topology is constructed by deploying a gateway device as the root node of the entire Internet of Things network at the center of the smart community, which is responsible for managing the entire network, including node registration, data aggregation and communication with the external network. The community is divided into several areas according to the geographical layout and equipment distribution of the community, and each area is a branch. A building controller or a regional gateway is selected as a relay node in each area. Sensor nodes are deployed at various locations in the smart community as sub-nodes to collect environmental data including temperature, humidity and light. The sub-node is directly connected to the nearest relay node and communicates with the root node through the relay node. When the sub-node is started, a registration request is automatically sent to the gateway. After receiving the registration request, the root node records the sub-node information in the network management table and assigns a network address to the sub-node. The gateway determines the number of layers and the number of nodes in each layer of the tree network according to the actual situation of the community and the location information of the node.

[0007] As a preferred solution of the tree-structured smart community Internet of Things communication method described in the present invention, the relay node periodically collects sub-node status information and its own status, and each node periodically collects its own status information, including remaining energy and communication quality indicators. The communication quality indicators include signal strength, packet loss rate and transmission delay. The collected status information is packaged into a status report, and the status report is sent to the root node through the relay node. While forwarding the status report, the relay node attaches its own status information.

[0008] As a preferred solution of the tree-structured smart community IoT communication method of the present invention, wherein: the path quality evaluation and path optimization is that the root node uses the received status information to perform real-time evaluation of the network path quality:

[0009] Define the signal strength evaluation function:

[0010]

[0011] Among them, S i is the signal strength of the ith child node, indicating the wireless signal strength of the child node communicating with the relay node, S m is the signal strength of the relay node, indicating the wireless signal strength of the relay node communicating with the upper node or the central node, ω1 and ω2 are weight coefficients, and N is the total number of child nodes;

[0012] Define the data transfer efficiency function:

[0013]

[0014] Among them, R iis the data transmission rate from the ith child node to the relay node;

[0015] Define the energy efficiency function:

[0016]

[0017] Among them, E i is the remaining energy of the ith child node, expressed as the remaining battery power percentage or remaining usage time of the node battery, E m is the residual energy of the relay node, ω3 and ω4 are weight coefficients;

[0018] Define the path stability evaluation function:

[0019]

[0020] Among them, P i is the path stability from the ith child node to the relay node, P m is the path stability of the relay node, ω5 and ω6 are weight coefficients;

[0021] Comprehensive build path quality assessment algorithm:

[0022] Q=f(S i ,S m )+g(R i )+h(E i ,E m )+p(P i ,P m )

[0023] Among them, Q is the path quality evaluation result, f(S i ,S m ) is the signal strength, g(R i ) is the data transmission efficiency, h(E i ,E m ) is the energy efficiency, p(P i ,P m ) is the path stability.

[0024] As a preferred solution of the tree-structured smart community IoT communication method of the present invention, the path optimization is to compare the result of the path quality evaluation with the preset threshold Q1 to determine the path quality:

[0025] If Q ≥ F, it means that the path is available for transmission, so the path continues to be used for data transmission and the path quality is re-evaluated regularly;

[0026] If Q < F, it indicates that the path is not suitable for transmission. Then, fault diagnosis is carried out on the path. According to the diagnosis results, corresponding measures are taken to improve the path quality, including adjusting the positions of nodes, adding relay nodes or using higher-performance communication devices to enhance signal strength, adjusting communication frequency bands or protocol parameters. For nodes with insufficient energy, adjust the transmission power and adopt a more efficient communication protocol to extend the working time of the nodes. Through network topology optimization, select a more stable communication path.

[0027] As a preferred solution of the intelligent community Internet of Things communication method based on a tree structure according to the present invention, wherein: for the real-time data collection and hierarchical data aggregation, after the sub-nodes collect environmental data in real time, the data is sent to the relay nodes. When the relay nodes receive the data from the sub-nodes, the data is aggregated. The aggregation method includes calculating the average values of the temperature values, humidity values and light intensity values of all sub-nodes. The aggregated data is sent to the parent nodes of the nodes, and this step is repeated in each layer of the tree structure until the aggregated data reaches the root node.

[0028] As a preferred solution of the intelligent community Internet of Things communication method based on a tree structure according to the present invention, wherein: the implementation of energy-balanced transmission includes calculating the variance of the energy consumption of all nodes in the network:

[0029]

[0030] where, σ 2 (C) is the variance of the energy consumption, M is the total number of nodes participating in data transmission in the network, L j is the remaining energy of node j, L l refers to the remaining energy of the l-th node in the network at a specific time point, j is the main node index, representing any node in the network, l is the auxiliary index, which is the child node of node j, D total is the total amount of data that all nodes in the network need to transmit, E j is the energy consumption rate per unit data transmission of node j, is the average value of the energy consumption of all nodes;

[0031] Set a judgment threshold κ and compare it with the obtained variance result to implement an energy-balanced transmission strategy:

[0032] If σ 2 (C) ≤ κ, it indicates that the energy consumption in the network is balanced and the network energy efficiency is high. Then, continue to monitor the network status and maintain the current data transmission and energy management strategies;

[0033] If σ 2(C) > κ indicates that the energy consumption in the network is unbalanced and the network energy efficiency is low. Then, reallocate the data transmission volume of nodes, reduce the burden on high-energy consumption nodes, increase the data transmission tasks of low-energy consumption nodes, adjust the transmission power of nodes according to the communication requirements between nodes, and implement a sleep scheduling strategy for nodes with less energy consumption to reduce energy consumption during idle time.

[0034] As a preferred solution of the intelligent community Internet of Things communication method based on a tree structure according to the present invention, wherein: the abnormal detection of the collected data and formulating countermeasures include integrating the received environmental data into a data set D, and performing abnormal detection on the data set D:

[0035]

[0036]

[0037]

[0038] where E(D) is an anomaly detection function that outputs an anomaly metric e, d a is the a-th data point in the data set D, n is the total number of data points in the data set D, μ is the average value of the data set D, δ is the standard deviation of the data set D, and a is an index variable;

[0039] The countermeasures formulated are to compare the anomaly metric e with preset thresholds T1 and T2 to determine the data anomaly situation, where T1 < T2:

[0040] If e < T1, it indicates that the data has a mild anomaly. Then, conduct re-verification or request the node to resend the data to enhance the monitoring frequency of the source node of the abnormal data;

[0041] If T1 ≤ e < T2, it indicates that the data has a moderate anomaly. Then, conduct in-depth analysis of the data, adjust the parameters or strategies of data collection according to the nature of the abnormal data and the analysis results, activate the warning system, and send a warning message to the management personnel or the system;

[0042] If e ≥ T2, it indicates that the data has a severe anomaly. Then, immediately start an emergency response program to automatically adjust the security or environmental control system within the community, send emergency notifications to management personnel, security personnel, and emergency services, conduct a thorough analysis of the abnormal data and events after controlling the initial emergency situation, and generate and record an analysis report of the abnormal events.

[0043] A computer device, comprising: a memory and a processor; the memory stores a computer program, and is characterized in that: when the processor executes the computer program, the steps of the intelligent community Internet of Things communication method based on a tree structure are implemented.

[0044] A computer-readable storage medium having a computer program stored thereon, characterized in that when the computer program is executed by a processor, the steps of a smart community Internet of Things communication method based on a tree structure are implemented.

[0045] The beneficial effects of the present invention are as follows: the present invention realizes flexible optimization of network paths by constructing a network topology based on a tree structure. The intermediate nodes not only regularly collect status information of child nodes, but also evaluate the path quality based on their own status, and make timely path adjustments, thereby improving data transmission efficiency. By balancing node energy consumption and performing anomaly detection on collected data and formulating corresponding response measures, the accuracy and reliability of data are ensured, thereby providing strong support for the intelligent management of smart communities. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0047] Figure 1 The figure is a flowchart of a tree-structured smart community IoT communication method.

[0048] Figure 2 The diagram of the network topology based on a tree structure is a tree structure-based smart community Internet of Things communication method. DETAILED DESCRIPTION

[0049] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0050] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0051] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0052] Example 1

[0053] Reference Figure 1 and Figure 2, which is the first embodiment of the present invention, and this embodiment provides a smart community Internet of Things communication method based on a tree structure. The smart community Internet of Things communication method based on a tree structure includes the following steps:

[0054] S1, build a network topology based on a tree structure;

[0055] Specifically, the network topology based on the tree structure is constructed by deploying a gateway device as the root node of the entire Internet of Things network at the center of the smart community, which is responsible for managing the entire network, including node registration, data aggregation and communication with the external network. According to the geographical layout and equipment distribution of the community, the community is divided into several areas, each area is a branch, and a building controller or a regional gateway is selected in each area as a relay node. Sensor nodes are deployed as sub-nodes at various locations in the smart community to collect environmental data including temperature, humidity and light. The sub-node is directly connected to the nearest relay node and communicates with the root node through the relay node. When the sub-node is started, it automatically sends a registration request to the gateway. The registration request includes the unique identifier, location information and initialization energy state of the sub-node. After receiving the registration request, the root node records the sub-node information in the network management table and assigns a network address to the sub-node. The gateway uses the distance stratification method to allocate nodes to different levels according to the actual situation of the community and the location information of the nodes, and determines the number of layers and the number of nodes in each layer of the tree network.

[0056] A tree-structured network topology is constructed based on the geographical layout of the community and the distribution of equipment. This realizes hierarchical management of the network, facilitates the organization of nodes and the aggregation of data. At the same time, automatic registration and network address allocation simplify the node access process and improve the scalability of the network. In addition, the number of network layers and the number of nodes per layer are determined based on the actual situation of the community and the node location information, making the network structure more reasonable and conducive to improving communication efficiency and network coverage.

[0057] S2, the relay node regularly collects sub-node status information and its own status to evaluate the path quality for path optimization;

[0058] Specifically, the relay node regularly collects the status information of the child nodes and its own status. For each node, it regularly collects its own status information, including the remaining energy and communication quality indicators. The communication quality indicators include signal strength, packet loss rate and transmission delay. The collected status information is packaged into a status report, and the status report is sent to the root node through the relay node. While forwarding the status report, the relay node attaches its own status information.

[0059] Each node regularly collects its own status information, including remaining energy and communication quality indicators, and sends status reports to the root node through relay nodes, realizing real-time monitoring of the network status and providing an important basis for path optimization. By collecting and summarizing node status information, problems in the network, such as insufficient energy or decreased communication quality, can be discovered in a timely manner, so that corresponding measures can be taken to make adjustments and ensure the stable operation of the network.

[0060] Furthermore, the path quality is evaluated for path optimization, and the root node uses the received status information to evaluate the network path quality in real time:

[0061] Define the signal strength evaluation function:

[0062]

[0063] Among them, S i is the signal strength of the ith child node, indicating the wireless signal strength of the child node communicating with the relay node, S m is the signal strength of the relay node, indicating the wireless signal strength of the relay node communicating with the upper node or the central node, which is measured by the signal strength indication (RSSI) of the wireless communication module. ω1 and ω2 are weight coefficients used to adjust the relative importance of the sub-node signal strength and the relay node signal strength in the path quality assessment. N is the total number of sub-nodes, which is used to average the contribution of the sub-nodes.

[0064] Define the data transfer efficiency function:

[0065]

[0066] Among them, R i is the data transmission rate from the ith child node to the relay node, which can be measured by the network test tool;

[0067] Define the energy efficiency function:

[0068]

[0069] Among them, E i is the remaining energy of the ith child node, expressed as the remaining battery power percentage or remaining usage time of the node battery, E m is the residual energy of the relay node, which are directly read by the node's energy monitoring system. ω3 and ω4 are weight coefficients used to adjust the importance of the residual energy of the child node and relay node in the evaluation;

[0070] Define the path stability evaluation function:

[0071]

[0072] Among them, Pi is the path stability from the i-th child node to the relay node, P m is the path stability of the relay node, both of which are evaluated by monitoring the number of connection disconnections over a period of time. ω5 and ω6 are weight coefficients used to adjust the importance of the path stabilities of the child node and the relay node in the evaluation;

[0073] Comprehensively construct a path quality evaluation algorithm:

[0074] Q = f(S i , S m ) + g(R i ) + h(E i , E m ) + p(P i , P m )

[0075] where Q is the path quality evaluation result, f(S i , S m ) is the signal strength, g(R i ) is the data transmission efficiency, h(E i , E m ) is the energy efficiency, and p(P i , P m ) is the path stability.

[0076] The root node uses the received status information to perform real-time evaluation of the network path quality. By comprehensively considering factors such as signal strength, data transmission efficiency, energy efficiency, and path stability, a comprehensive evaluation of the network transmission path is achieved. It not only considers the reliability of communication but also takes into account energy consumption and transmission efficiency, ensuring that the network can minimize energy consumption and maintain stable operation while meeting the data transmission requirements. Through the comprehensive evaluation of the path quality, the operating condition of the network can be judged more accurately, providing a scientific basis for path optimization.

[0077] Furthermore, for path optimization, the result of the path quality evaluation is compared with a preset threshold Q1 to judge the path quality:

[0078] If Q ≥ F, it indicates that the path is suitable for data transmission, and the path continues to be used for data transmission while regularly re-evaluating the path quality;

[0079] If Q < F, it indicates that the path is not suitable for data transmission, and then a fault diagnosis is carried out on the path. According to the diagnosis result, corresponding measures are taken to improve the path quality, including adjusting the positions of the nodes, adding relay nodes, or using higher-performance communication devices to enhance the signal strength, adjusting the communication frequency band or protocol parameters. For nodes with insufficient energy, adjust the transmission power or adopt a more efficient communication protocol to extend the working time of the nodes, and select a more stable communication path through network topology optimization.

[0080] Based on the results of path quality assessment, it is determined whether the path meets the transmission requirements, and fault diagnosis and path improvement are performed as needed. This dynamic optimization mechanism significantly improves the adaptability of the network, enabling the network to self-adjust according to real-time performance evaluation results to cope with environmental changes or changes in network status, thereby achieving dynamic optimization of network transmission paths and improving the reliability and efficiency of data transmission. By adjusting node positions, adding relay nodes, or using higher-performance communication equipment, signal strength and transmission quality can be effectively improved. For nodes with insufficient energy, measures such as adjusting transmission power or adopting more efficient communication protocols can be taken to extend node working time, thereby extending the service life of the entire network and ensuring the continuous operation of the network.

[0081] S3, collect data in real time, perform hierarchical data aggregation and implement energy balanced transmission;

[0082] Specifically, data is collected in real time and hierarchical data aggregation is performed for child nodes. After collecting environmental data in real time, the data is sent to the relay node. When the relay node receives the data from the child node, it aggregates the data. The aggregation method includes calculating the average value of temperature, humidity and light intensity values ​​of all child nodes. The aggregated data is sent to the parent node of the node. This step is repeated in each layer of the tree structure until the aggregated data reaches the root node.

[0083] By collecting data in real time and performing hierarchical data aggregation, we can achieve effective collection and processing of environmental data, reduce the network burden by reducing the amount of data transmitted, and at the same time improve the efficiency and accuracy of data processing, reduce the complexity of data processing, and make data more streamlined and easier to manage. Finally, through hierarchical data aggregation, we can reduce the data loss rate during transmission, ensure data quality, realize real-time monitoring and management of the smart community environment, and provide reliable data support for intelligent decision-making in smart communities.

[0084] Furthermore, implementing energy-balanced transmission involves calculating the variance of energy consumption of all nodes in the network:

[0085]

[0086] Among them, σ 2 (C) is the variance of energy consumption, M is the total number of nodes involved in data transmission in the network, and L j is the residual energy of node j, which is directly measured by the node’s energy monitoring system. l It refers to the residual energy of the lth node in the network at a specific time point, j is the main node index, representing any node in the network, l is the auxiliary index, which is the child node of the j node, D totalis the total amount of data that all nodes in the network need to transmit, which is calculated by aggregating the data requirements of all nodes in the network. j is the energy consumption rate per unit data transmission of node j, which is obtained through experiments. It is the average value of energy consumption of all nodes, which is the sum of energy consumption of all nodes in the network divided by the total number of nodes M;

[0087] Set the judgment threshold κ to compare with the obtained variance result and implement the energy balance transmission strategy:

[0088] If σ 2 (C)≤κ, indicating that the energy consumption in the network is balanced and the network energy efficiency is high, then the network status will continue to be monitored and the current data transmission and energy management strategies will be maintained;

[0089] If σ 2 (C)>κ, indicating that the energy consumption in the network is unbalanced and the network energy efficiency is low. In this case, the data transmission volume of the nodes should be reallocated to reduce the burden of high-energy consumption nodes and increase the data transmission tasks of low-energy consumption nodes. According to the communication needs between nodes, the transmission power of the nodes should be adjusted, and a sleep scheduling strategy should be implemented for nodes with less energy consumption to reduce energy consumption during idle time.

[0090] The energy-balanced transmission strategy is implemented by calculating the variance of energy consumption of all nodes in the network and setting a judgment threshold to evaluate the balance of network energy consumption. It effectively achieves balanced distribution of network energy, prolongs the service life of the network, improves the energy efficiency of the network, ensures the stable operation of the smart community IoT communication network, achieves energy conservation and emission reduction, and improves system reliability.

[0091] S4. Detect anomalies in the collected data and formulate countermeasures;

[0092] Specifically, performing anomaly detection on the collected data and formulating countermeasures includes integrating the received environmental data into a data set D and performing anomaly detection on the data set D:

[0093]

[0094]

[0095]

[0096] Among them, E(D) is the anomaly detection function, which outputs the anomaly index e, d a is the ath data point in dataset D, n is the total number of data points in dataset D, μ is the mean of dataset D, δ is the standard deviation of dataset D, and a is an index variable used to traverse all data points in the dataset;

[0097] Formulate countermeasures. To determine the data abnormality by comparing the abnormal index e with the preset thresholds T1 and T2, where T1 < T2:

[0098] If e < T1, it indicates that the data has a mild abnormality. Then, conduct re-verification or request the node to resend the data to increase the monitoring frequency of the abnormal data source node;

[0099] If T1 ≤ e < T2, it indicates that the data has a moderate abnormality. Then, conduct in-depth analysis of the data. According to the nature of the abnormal data and the analysis results, adjust the parameters or strategies of data collection, activate the early warning system, and send early warning information to the management personnel or the system;

[0100] If e ≥ T2, it indicates that the data has a severe abnormality. Then, immediately start the emergency response procedure to automatically adjust the safety or environmental control system within the community, send emergency notifications to the management personnel, security personnel, and emergency services, conduct a thorough analysis of the abnormal data and events after controlling the initial emergency situation, and generate and record the analysis report of the abnormal events.

[0101] By integrating the received environmental data into the data set D and performing anomaly detection on it, the calculation of the abnormal index e can timely detect the abnormal situation in the data. According to the comparison result between the abnormal index and the preset threshold, the system can judge the severity of the abnormality and take corresponding countermeasures, realizing the effective monitoring and abnormal management of the collected data, ensuring the accuracy and reliability of the data, timely discovering and handling abnormal situations, not only enhancing the system's response ability to abnormal situations, but also being able to timely notify the management personnel through the early warning system, effectively preventing possible security risks or environmental problems, thus guaranteeing the living safety of the residents in the smart community and the stability of the community environment, improving the system response speed and ensuring the community security.

[0102] Embodiment 2

[0103] This is the second embodiment of the present invention. The difference between this embodiment and the previous one is:

[0104] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.

[0105] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0106] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0107] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

Claims

1. A tree-structured smart community IoT communication method, characterized in that: include, Construct a network topology based on a tree structure; Relay nodes regularly collect sub-node status information and their own status to evaluate path quality for path optimization; Collect data in real time to perform hierarchical data aggregation and implement energy-balanced transmission; Detect anomalies in the collected data and develop countermeasures; The tree-structured network topology is constructed by deploying a gateway device as the root node of the entire IoT network at the center of the smart community, which is responsible for managing the entire network, including node registration, data aggregation and communication with the external network. The community is divided into several areas according to the geographical layout and device distribution of the community, and each area is a branch. In each area, a building controller or a regional gateway is selected as a relay node. Sensor nodes are deployed as sub-nodes at various locations in the smart community to collect environmental data including temperature, humidity and light. The sub-node is directly connected to the nearest relay node and communicates with the root node through the relay node. When the sub-node is started, a registration request is automatically sent to the gateway. After receiving the registration request, the root node records the sub-node information in the network management table and assigns a network address to the sub-node. The gateway determines the number of layers and the number of nodes in each layer of the tree network according to the actual situation of the community and the location information of the node. The path quality evaluation and path optimization is that the root node uses the received status information to evaluate the network path quality in real time: Define the signal strength evaluation function: in, is the signal strength of the ith child node, indicating the wireless signal strength of the child node communicating with the relay node. It is the signal strength of the relay node, indicating the wireless signal strength of the relay node communicating with the upper node or the central node. and is the weight coefficient, N is the total number of child nodes; Define the data transfer efficiency function: in, is the data transmission rate from the ith child node to the relay node; Define the energy efficiency function: in, is the remaining energy of the ith child node, expressed as the remaining battery power percentage or remaining usage time of the node battery, is the residual energy of the relay node, and is the weight coefficient; Define the path stability evaluation function: in, is the path stability from the ith child node to the relay node, is the path stability of the relay node, and is the weight coefficient; Comprehensive build path quality assessment algorithm: Among them, Q is the path quality evaluation result, is the signal strength, is the data transmission efficiency, is the energy efficiency, is path stability; The implementation of energy balanced transmission includes calculating the energy consumption variance of all nodes in the network : Setting judgment threshold Compare with the obtained variance results and implement the energy balance transmission strategy: like , indicating that the energy consumption in the network is balanced and the network energy efficiency is high, then continue to monitor the network status and maintain the current data transmission and energy management strategy; like , indicating that the energy consumption in the network is unbalanced and the network energy efficiency is low, then the data transmission volume of the nodes is redistributed to reduce the burden of high-energy consumption nodes and increase the data transmission tasks of low-energy consumption nodes. According to the communication requirements between nodes, the transmission power of the nodes is adjusted, and the sleep scheduling strategy is implemented for nodes with less energy consumption to reduce energy consumption during idle time; The method of performing anomaly detection on the collected data and formulating countermeasures includes integrating the received environmental data into a data set D and performing anomaly detection on the data set D: in, is an anomaly detection function, outputting anomaly index e, is the ath data point in the dataset D, is the total number of data points in the dataset D, is the mean value of the data set D, is the standard deviation of the data set D, and a is the index variable; Develop countermeasures to compare abnormal indicators e with preset thresholds and Compare and judge the abnormal data, among which, : like , indicating that the data is slightly abnormal, then re-verification is performed or the node is requested to resend the data to increase the monitoring frequency of the node where the abnormal data comes from; like , indicating that the data is moderately abnormal, the data is analyzed in depth, and according to the nature of the abnormal data and the analysis results, the parameters or strategies of data collection are adjusted, the early warning system is activated, and early warning information is sent to the management personnel or the system; like , indicating that the data is severely abnormal, the emergency response program will be immediately activated to automatically adjust the security or environmental control system within the community, send emergency notifications to managers, security personnel and emergency services, and thoroughly analyze the abnormal data and events after controlling the initial emergency, and produce and record analysis reports on abnormal events.

2. The tree-structured smart community IoT communication method according to claim 1, characterized in that: The relay node periodically collects sub-node status information and its own status for each node, including remaining energy and communication quality indicators. The communication quality indicators include signal strength, packet loss rate and transmission delay, and packages the collected status information into a status report, which is sent to the root node through the relay node. The relay node forwards the status report while attaching its own status information.

3. The tree-structured smart community IoT communication method according to claim 2, characterized in that: The path optimization is to compare the result of path quality evaluation with the preset threshold Perform a comparison to determine the path quality: like , indicating that the path is available for transmission, then continue to use the path for data transmission and re-evaluate the path quality regularly; like , indicating that the path is not suitable for transmission, the path is diagnosed for fault, and corresponding measures are taken according to the diagnosis results to improve the path quality, including adjusting the location of the node, adding relay nodes or using higher-performance communication equipment to enhance signal strength, adjusting the communication frequency band or protocol parameters, and adjusting the transmission power for nodes with insufficient energy, using more efficient communication protocols to extend the working time of the nodes, and selecting a more stable communication path through network topology optimization.

4. The tree-structured smart community IoT communication method according to claim 3, characterized in that: The real-time data collection and hierarchical data aggregation are performed for the child nodes to collect environmental data in real time and then send the data to the relay node. When the relay node receives the data from the child node, it aggregates the data. The aggregation method includes calculating the average value of the temperature value, humidity value and light intensity value of all child nodes. The aggregated data is sent to the parent node of the node. This step is repeated in each layer of the tree structure until the aggregated data reaches the root node.

5. A computer device comprising: Memory and processor; The memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Method for selecting optimal multi-hop path for wireless sensor

    WO2021164791A1