Internet of Things Network Topology Discovery Algorithm Based on Wireless Sensors

,


Introduction
Remote sensor network incorporates current sensor innovation, microelectronic innovation, correspondence innovation, installed figuring innovation, and appropriated data handling innovation and different disciplines.It is an arising crossresearch field and is applied to military surveillance, natural observing, clinical wellbeing and space investigation, and so forth, overrun all degrees of life, particularly in the fields of public protection and serious debacle occasion checking, which will assume a vital part in the modernization of our country.Topological sort is to sort the nodes on a DAG (Directed Acyclic Graph).Simply put, it is to pull the DAG into a chain without destroying the order of nodes.
If you take the technology tree in the game as an example, topological sorting is to find a possible order of the technology tree.
Numerous colleges and research establishments abroad have led a ton of exploration on the examination on the geography revelation calculation of the Internet of Things network in view of remote sensors.For example, Shahzad et al. proposed a topology discovery algorithm based on a mesh network.The method is divided into two steps: one is the diffusion phase, which coordinates the nodes to broadcast the topology request message.After each node receives and rebroadcasts this message, it constructs local neighbor information.Update the corresponding data structure; the second is the collection phase, and all nodes forward the local neighbor information to the coordinating node [1].Nesa and Banerjee proposed a distributed topology discovery strategy based on mobile agents.This method cannot provide instantaneous Internet of Things network topology.It takes a long time to find a complete Internet of Things network topology and needs to distribute a lot of messages; so, it is not efficient and consumes bandwidth [2].Dhanvijay and Patil proposed the ad hoc network management protocol ANMP, which uses a distributed set of nodes to maintain the information of the node and its neighbors, attempts to integrate the characteristics of the SNMP protocol, and uses a layered mechanism to collect topology information.The cluster head node is dynamically selected due to geographic location or connection conditions, and topology information is collected through the MIB in the cluster head [3].
In our country, Wei and Zhou utilizes the hub development model in the sensor organization to foresee the potential neighbor hubs inside the correspondence scope of the hub and progressively changes the obligation pattern of the hub as per the quantity of potential neighbor hubs, so as to find neighbor nodes faster and more.Aiming at the problem of network coverage optimization of the sensor node model with fixed sensing angle and sensing radius used in the past, he proposed a new node model with variable sensing angle and sensing radius [4].Fu et al. proposed an adaptive RSSI discovery scheme, which improves the accuracy of discovery in the ZigBee network by studying the communication channel state between two nodes, and uses a Markov model to correct the RSSI scale caused by factors such as noise error [5].Khoufi et al. proposed a distributed discovery algorithm based on MDS-MAP.This algorithm distributes computing tasks to different nodes for distributed computing by defining node classes, reducing the amount of computing tasks and reducing the energy consumption of nodes [6].
The purpose of this paper is to comprehensively, accurately, and quickly perform network topology discovery for IoT network management, fault location, and congestion control.This paper is based on the neighbor discovery algorithm of dynamic duty cycle.Based on the full analysis of Disco, U-Connect, and other algorithms, a neighbor revelation calculation in light of dynamic obligation cycle DDC-Group is proposed for the proper obligation cycle issue of existing neighbor disclosure calculations, and the genuine hub development model is utilized to anticipate potential neighbor hubs, powerfully change the obligation pattern of hubs through the quantity of potential neighbor hubs, and suitably expand the enlivening season of hubs to screen and find neighbor hubs quicker and all the more rapidly, so as to improve the efficiency of neighbor node discovery and reduce discovery delay.Finally, it is compared with Disco, Group, and CNR-Group algorithms through simulation experiments.The neighbor discovery algorithm drives the node to actively discover neighbor nodes when it wakes up, avoiding the long waiting delay of the traditional passive neighbor discovery algorithm, thereby realizing the rapid discovery of neighbor nodes and reducing the delay of neighbor discovery.

Internet of Things Network Topology
Discovery Algorithm Based on Wireless Sensors Its execution interaction is occasional, and each cycle is isolated into a bunch foundation stage and a steady information correspondence stage.The group head determination stage is answerable for choosing all bunch head hubs in this round.The primary determination guideline is as follows: every sensor hub produces an irregular number somewhere in the range of 0 and 1.Assuming the irregular number is not exactly the characterized limit T ðnÞ, it is chosen as the bunch head and distributes the transmission message that it turns into the group head; if not, it is a part hub.
Among them, p is the level of the quantity of bunch heads in all hubs in the organization, r is the quantity of current determination rounds, and G is the arrangement of hubs that are not group heads in the latest 1/p round [9,10].
2.1.2.GAF Cluster Routing Algorithm.Geological Adaptive Fidelity (GAF) is an energy-effective directing calculation in specially appointed organizations.GAF is a method for saving energy by keeping hubs as off as could really be expected.The node obtains its own "location" in the network through GPS positioning and is thus classified into the corresponding cell.If the "location" of two nodes is the same, they are considered to be equivalent in routing; each cell select a cluster head regularly, only the cluster head remains active, and other nodes go to sleep.The GAF algorithm is mainly divided into two stages: (1) Divide Cells.Divide the network into several adjacent virtual cells.The maximum distance R between any two points in every two adjacent cells (R is the wireless signal communication radius) and the cell side length r satisfy the following formula condition: Condition (2) guarantees that the distance between all hubs between two neighboring cells is not exactly their Because of the distinction in the sending power and getting responsiveness of the sensor hubs, the presence of a unidirectional connection is not thought of, and the correspondence between the hubs is single-bounce (3) Definition of energy model (4) The issue of energy misfortune is the way in to the plan of the bunch directing calculation in remote sensor organizations.The NDEA calculation utilizes a similar energy model as the LEACH calculation.
The energy utilization of a sensor hub can be communicated as where E i is the absolute energy consumed by the sensor hub, E Tx and E Rx are the energy consumed by sending and getting 1-digit information, E elec is the energy consumed by the working of the communicating circuit, ε amp ðJ/bits/m 2 Þ is the power amplifier energy consumed, l is the length of transmitted information bits, λ is the path loss, and d is the correspondence distance between the beneficiary and the transmitter.As indicated by the distance between the shipper and the beneficiary, the power enhancement misfortune takes on the free space model and the multipath blur-ring model to decide the worth of λ.While the sending distance is short, the free space model is applied, and λ is 2, while the sending distance is longer.When the multipath blurring model is utilized, λ is 4, and the energy model is displayed in Figure 1 [13,14].
2.2.2.The Basic Idea of NDEA.In the NDEA calculation, a weight work WðnÞ is characterized for every hub.The meaning of weight includes two factors, the neighbor hub degree and the excess energy of the hub.The weight work is communicated as w 1 and w 2 are weighting parameters, the weighting parameters can be adjusted according to different applications, f ðd n Þ is a function of node n's neighbor node degree, and gðe n Þ is an element of hub n in view of leftover energy, the hub with the littlest weight.It is considered as a competitor hub that can turn into the group head [5,15].
Principle of the Disco Algorithm.The process of neighbor discovery is as follows: a node in the network is within the communication range of another node, and at a certain moment, the two nodes are in the awake state at the same time.If one node is broadcasting information by radio, the other node can be awake.After receiving the broadcast information, the two nodes exchange data information, complete neighbor discovery, and become each other's neighbor nodes.The calculation begins from the hub with the biggest degree in the organization, joins neighbor hub search and neighbor hub casting a ballot, grows the hunt from the nearby piece of the organization to the entire, and lastly shapes numerous disjoint networks.The running season of the calculation is near O ðm + nÞ.

Network Model Design
(1) Related Definitions.Accepting that there are n sensor hubs in a remote sensor organization, the neighbor disclosure issue includes the development of Ψ ðm, tÞ (where 1 ≤ m ≤ n).The development of Ψ ðm, tÞ should guarantee that any A couple of hubs I and j (where i ≠ j); at whatever point, they are inside the correspondence scope of one another, and the time they meet surpasses L unit time; they can see as one another.Among them, L represents the delay requirement of neighbor discovery [16,17].The neighbor discovery problem is expressed as the following relationship using discovery scheduling Ψ ðm, tÞ: The simultaneous symmetric neighbor disclosure issue with a postpone prerequisite of L is characterized as a similar revelation timetable and introduction time allocated to n 3 Wireless Communications and Mobile Computing sensor hubs in the organization, and the accompanying relationship is fulfilled: Moreover, the maximum discovery delay in the neighbor discovery process cannot exceed L. The offbeat symmetric neighbor disclosure issue with a defer necessity of L is characterized as a similar revelation timetable and relative stage offset given to n sensor hubs in the organization, and the accompanying relationship is fulfilled: Moreover, the maximum discovery delay during the neighbor discovery process cannot exceed L. In formula (7), ϕ i,j represents the relative displacement offset of node i and node j at the original time t [18,19].
(2) Metrics.In order to better evaluate the quality of a neighbor discovery algorithm and whether it has certain practical significance, we will use the energy consumption-delay product M as the evaluation criterion of the neighbor discovery algorithm [20,21].To get done with different responsibilities, sensor hubs need to finish the assortment and change of checking information, information the board and handling, reaction to the errand solicitation of the sink hub, and hub control and different assignments.Moving hubs can prompt incoherent work content.For the neighbor discovery scheduling Ψ ðm, tÞ with a period of T, the following relationship is satisfied:     Then, the average energy consumption P in a scheduling period is expressed as In this neighbor disclosure booking Ψ ðm, tÞ with a time of T, expecting that the most obviously awful revelation delay among all sets of (hubs give all conceivable relative stage balances) is L, then we will energy-delay.The product M is defined as Due to the slot nature of the actual neighbor discovery algorithm, the discovery scheduling is discrete; so, here, we use M to represent the discovery scheduling in the discrete state and the node m with a period of T that meets the delay requirement, L is in the time slot t, the discovery schedule can be expressed as ξ ðm, tÞ, and the average energy consumption P in a period is Then, the energy consumption-delay product M is 2.4.Neighbor Discovery Algorithm Based on Dynamic Duty Cycle.On account of a decent obligation cycle, the wakeup time and rest season of the hub are fixed.At the point when the obligation pattern of a hub is in an evolving state, the wake-up time and rest time will change appropriately.
The neighbor revelation calculation in light of dynamic obligation cycle is an exhaustive neighbor hub disclosure calculation, which depends on the low-dormancy neighbor disclosure calculation.During the revelation interaction of neighbor hubs, the obligation pattern of the sensor hub is not generally fixed.The hubs in the remote sensor network are occasionally in the wake-up state, and the hubs in this functioning mode can exist together with the hubs in other working modes and help the hubs in other working modes to work.
Whenever a sensor node moves from old position to new position, the duty cycle needs to be adjusted in real time to monitor and discover potential neighbor nodes.Assuming that the communication radius of the sensor node is R, the node's moving speed is v, and the node S reaches S ′ after time t, the distance the node moves:   The area where the communication circles intersect is ΔS , and the area of the newly added area is ΔS′: From the above formula, the area of the new area can be obtained: Expecting that the dispersion P of sensor hubs in a versatile sensor network complies with the Poisson circulation of λ, or at least, P ~P (λ), when the sensor hub moves to another position, the quantity of neighbor hubs found by the CNR-Group calculation in the recently added region is N.
The normal worth of the quantity of neighbor hubs in the recently added correspondence region S ′ is E S ′ = λΔS ′ : ð16Þ     Then, at that point, the quantity of neighbor hubs not found in the recently added correspondence region is In recipe (17), λ is the boundary of Poisson dissemination, λΔS ′ addresses the quantity of neighbor hubs in the recently added correspondence region, and N addresses the low-inactivity neighbor revelation calculation CNR-Group has found during hub development the quantity of neighbor hubs.
Assume it is tracked down that the wake-up season of hub DN is T active and the wake-up period is T. Simultaneously, the wake-up time T active is viewed as a container, and the likely E ðS ′ Þ neighbor hubs in the recently added correspondence region are viewed as balls.As indicated by the ball and box model, it should be visible that the likelihood that the expected EðS no ′ Þ neighbor hubs not found in the S ′ area will not awaken inside the wake-up season of the DN hub that is In formula (18), T active /T represents the probability of a single node awakening within the DN node wake-up time.The probability P active that there are nodes in the EðS no ′ Þ nodes in the area S ′ that wake up within the DN node wake-up time is It can be seen from equation ( 19) that the probability of a node in the area S′ awakening within T active time is P active , which means that there are still some nodes that will not wake up within T active time.At this time, it is necessary to adjust the discovery node DN the duty cycle to monitor undiscovered neighbor nodes.
At this time, the wake-up time T active of the discovery node DN is extended to T active ′ : Then, it is found that the duty cycle DC of the node DN is adjusted to DC ′ : Among them, the wake-up period T is the sum of the wake-up time and the sleep time, namely, From the above investigation process, it very well may be seen that the obligation pattern of the hub DN has expanded, that is to say, the time that the hub is in the conscious state increments, and the hub is found to utilize the expanded waking chance to screen and find potential neighbor hubs in the recently added region.The disclosure of the hub the deferral is diminished; however, as the obligation pattern of the hub expands, the energy utilization of the hub should increment.the time delay factor required for the serialization of unit byte data is 2:3 × 14 − 9: the creation of mobile agent.The delay T c and the processing delay T p are ignored.The mobile agent sending delay is T s +T p = sizef × actor = 6:25 ms, and the receiving delay is T wait =T s =5.34 ms and T wait =40 ms.

Simulation of Mobile Agent
Platform.The simulation of the mobile agent platform mainly includes two parts: the mobile agent entity and the execution environment context of the mobile agent.A mobile agent is a software entity that contains code, data, and status.

Simulation of Mobile
Agent.The simulation of the mobile agent must have the following modules: the state of the mobile agent, the running module, the event response processing module, and the environment interaction module.The life cycle of a mobile agent entity begins with crea-tion or cloning and then begins execution and enters the active state.During the execution, the mobile agent entity may be dispatched to other nodes, converted to inactive state, or converted from inactive state to active state.

The Execution Environment of the Mobile Agent
Context.Context is similar to the data source generator in NS2 (such as FTP and CBR) and is implemented in the application layer of NS2 network simulation.Context includes the following modules: management module, transmission communication module, response processing module, interface module, and execution module.The interface module mainly coordinates and controls other modules and provides basic services such as creation, migration, and message transfer required by the mobile agent; the execution module is responsible for activating the execution of the mobile agent.The node movement model is described as the node first randomly selects a position in the entire moving area as the initial position and randomly selects the size and direction of the movement speed and the moving distance.

Algorithm Design and Data Collection.
During the discovery process of neighbor nodes, the duty cycle of sensor nodes is no longer fixed.During the movement of nodes, sensor nodes dynamically adjust their duty cycle in real time according to the status of surrounding nodes.In a mobile sensor network, the position of a sensor node changes in real time.When a node is found to move from its original position to a new position, at this time, during the time when the node is found to be awake, some of the nodes are still in a dormant state, and the node cannot be found.In a sensor network with n sensor hubs, take hubs a, b, and c as specific illustrations, where hub an is the hub that needs to find other neighbor hubs, that is, the discovery node, and the three nodes are each scheduled according to their own work arrangements.In the process of node neighbor discovery and movement, the duty ratio of the node is    1.
Figure 2 shows the comparison between the improved NDEA algorithm, the original LEACH algorithm, and the sink receiving data volume of the Disco algorithm.In the simulation process, the data sent by the node to other nodes is actually its own ID number; so, the information got before the group head sends information to the sink is the rundown of IDs of the hubs that send information to itself, and the bunch head ships off the sink.This is the ID list; lastly, sink counts the quantity of information sent by every hub in light of the got information.

NDEA Algorithm and LEACH Algorithm Life Cycle
Experiment Analysis.In the simulation process, the simulation data is collected regularly.The reenactment information chiefly incorporates the quantity of hubs right now making due in the organization, the aggregate sum of energy presently consumed by the organization, and how much information as of now gotten by the sink hub.This paper contrasts and breaks down the NDEA calculation and the LEACH calculation and the Disco calculation, and behaviors test research from the organization life cycle.The outcomes are displayed in Table 2.
Figure 3 shows the comparison of the number of surviving nodes in the improved NDEA algorithm and the original LEACH algorithm over time.Since NDEA needs to collect network information during network initialization, which consumes more energy than LEACH, the death of the first node occurs in NDEA at 45 s, before LEACH.Then, the overall network life cycle is about 1.6 times that of LEACH, which is better than LEACH.The curve comparison in the figure shows that NDEA can save energy consumption and make energy loss more evenly distributed to all nodes, extending the life cycle of the network.3 shows the comparison of the sink receiving data volume between the improved NDEA algorithm and the original LEACH algorithm.

Data Transmission Volume. Table
As displayed in Figure 4, in the reenactment interaction, the information sent by a hub to different hubs is really its own ID number; so, the information got before the bunch head sends information to the sink is the ID of the hub that sent information to itself list, and the group head sends this ID rundown to the sink; lastly, the sink counts the quantity of information sent by every hub in view of the got information.This article shows the examination of the factual data of the information sent by the hubs under the two calculations.Since the organization lifetime of the NDEA calculation is fundamentally longer than that of the LEACH calculation, the information transmission volume should likewise be higher than that of LEACH.

Influence of Node Density on System
Performance.This gathering of examinations concentrates on the effect of the thickness of sensor hubs in remote sensor networks on framework execution.The presentation boundaries of the framework incorporate the disclosure postponement and energy loss of the sensor organization.The trial results are displayed in Table 4.
The outcomes in Figure 5 show that when the thickness of hubs expands, the energy utilization of the four calculations keeps on expanding.According to the pattern perspective, the energy utilization of the DDC-Group calculation expands the most.The outcomes in Figure 6 show that when the obligation pattern of the hub builds, any of the four calculations, the framework's disclosure defer diminishes; yet, the level of effect is unique.It very well may be seen from the figure that the revelation postponement of the Disco calculation is altogether more noteworthy than the group, CNR-Group, and DDC-Group calculations under various obligation cycles, and the DDC-Group calculation is superior to the group and CNR-Group calculations.
The following examination is the connection between energy utilization and hub broadcast abnormality.The exploratory outcomes are displayed in Table 6.
Figure 7 shows that as the obligation pattern of the hub builds, the energy utilization of the hubs under the four calculations increments, which is close to a linear relationship.However, the energy consumption of the Group, CNR-Group, and DDC-Group algorithms changes more than the Disco algorithm increases more; compared with the group algorithm, the energy consumption of the DDC-Group algorithm is slightly increased, and the increase is not more than 2%, but it increases more than the CNR-Group.

Impact of Node Broadcast Irregularity on System
Performance.This experiment studies the impact of node broadcast irregularity on system performance.In this group of experiments, the irregularity of node broadcasting varies from 0 to 85%.The experimental results are shown in Table 7.
It very well may be seen from Figure 8 that as the abnormality of hubs builds, the disclosure postponement of the four calculations increments to changing degrees.The Group, CNR-Group, and DDC-Group calculations are altogether better compared to the Disco calculation, and the DDC-Group calculation is the most excellent; the postponement is viewed as the least; as far as energy utilization, the DDC-Group calculation consumes the most energy.

Conclusions
This paper adopts the demand-wakeup mechanism of active awakening.According to the information of potential neighbor nodes obtained by existing neighbor nodes, potential neighbor nodes are discovered through active awakening, and on this basis, the recommendation mechanism of neighbor node information is studied.High-rate neighbor recommendation mechanism.Through this recommendation mechanism, the CNR-Group algorithm reduces latency and energy consumption, improves network performance, and extends network life cycle.This paper proposes a geography disclosure calculation in light of versatile specialist.This calculation joins the attributes of versatile specialist innovation and grouping geography.The CNR-Group calculation actually beats the issues of the geography calculation, like enormous link length and establishment responsibility, significant weight on the focal hub, and low appropriated handling limit of each site.In each group, the bunch head is liable for gathering important data of the hubs in the group, including the present status and remaining energy.The mobile agent between clusters is responsible for discovering the cluster heads.Link information improves the migration strategy of mobile agents.Compared with other topology discovery algorithms based on mobile agents, this algorithm has improved globality and convergence speed, effectively reducing redundant data transmission, reducing communication consumption.
In this paper, the genuine hub development model is utilized to anticipate potential neighbor hubs, and the obligation pattern of the hub is powerfully changed through the quantity of potential neighbor hubs, to work on the productivity of neighbor hub revelation and diminish the disclosure delay.Actively waking up according to the exchanged node scheduling information can realize the discovery of neighbor nodes.

Figure 2 :
Figure 2: Changes in network energy consumption over time in the two algorithms.

Figure 3 :
Figure 3: The number of surviving nodes in the three algorithms changes over time.

Figure 4 :
Figure 4: How much information got by the sink in the three calculations.

Figure 5 :
Figure 5: The connection between energy utilization and hub thickness.

Figure 6 :
Figure 6: Discover the relationship between latency and node duty cycle.

Figure 7 :
Figure 7: The connection between energy utilization and hub obligation cycle.

Figure 8 :
Figure 8: The connection between energy utilization and hub broadcast abnormality.

Table 1 :
Changes in network energy consumption over time in the two algorithms.

Table 2 :
Changes in the number of surviving nodes in the three algorithms over time.

Table 3 :
The amount of data received by the sink in the three algorithms.

Table 4 :
The connection between energy utilization and hub thickness.

Table 5 :
Discover the relationship between latency and node duty cycle.

Table 6 :
The connection between energy utilization and hub obligation cycle.

Table 7 :
The connection between energy utilization and hub broadcast inconsistency.
4.5.Effect of Node DutyCycle on System Performance.The following investigation in this paper is to concentrate on the impact of the hub's obligation cycle on framework execution, including the revelation of postponement and energy utilization.The test results are displayed in Table5.