Abstract
Based on the principle of cluster wireless sensor network, this article introduces typical routing protocols in wireless sensors, and wireless sensor network protocol in detail analyzes their advantages and disadvantages and addresses their shortcomings. First, in the clustering network, a uniform clustering protocol with multiple hops in the circular network is proposed. The circular network is divided into rings of equal width, and clusters of equal size are set on different rings. Secondly, the ordinary nodes on each layer of the ring send the collected data to the auxiliary intelligent nodes in the cluster in a single-hop manner, and the auxiliary intelligent nodes located on the outer ring transfer the data to the auxiliary intelligent nodes located on the adjacent inner ring. Finally, on the basis of studying the clustering network protocol, this paper proposes a new clustering routing algorithm, a multihop adaptive clustering routing algorithm. The simulation results show that the algorithm can effectively extend the life of the network, save network energy consumption, and achieve network load balance. At the same time, the initial energy of the auxiliary intelligent node is set according to the energy consumption of the ordinary node and the relative distance between the auxiliary intelligent node and the base station on each layer of the ring. The theoretical and simulation results prove that, compared with the clustered network and auxiliary intelligent nodes, the clustered network can extend the life of the network.
1. Introduction
Wireless sensor networks (WSNs) are composed of a large number of sensor nodes, which are deployed in the target area to be monitored. These nodes cooperatively perceive and process the information in the monitoring area; that is, they can be used to obtain the information of the objective physical world [1]. Therefore, it has been widely used in military, environmental, and habitat monitoring and forecasting, smart home, fire detection, machinery monitoring, industrial and agricultural control, remote control of dangerous areas, and urban transportation in many fields in recent years. Therefore, WSNs have become a current research hotspot in the computer field [2–5]. A routing protocol is one of the current research hotspots of WSNs. Because the routing protocols applicable to traditional wired and wireless networks cannot be applied to the topology of WSNs, it is necessary to design appropriate new routing protocols for WSNs. A wireless sensor network is composed of a large number of sensor nodes, a multihop self-organizing network system formed by wireless communication, and its purpose is to cooperatively perceive, collect, and process information in the network area and send it to observers [6]. A wireless sensor network has many advantages such as fast and flexible networking, has high research value and very broad application prospects, and has attracted great attention from academic and industrial circles [7–9].
Abujubbeh et al. [10] pointed out that the robustness of the system can be improved through the multipath routing algorithm. Data packets are forwarded in the multipath path through the routing algorithm and reconstructed at the receiving end through the forward error correction technology. Kou [11] presents a mesh multipath routing protocol, in which selective forward transmission of data packets and end-to-end forward error correction decoding technology are applied in the protocol, and the mesh multipath search mechanism suitable for sensor networks can be used. Compared to the data packet replication or limited flooding method, this method consumes less system resources (such as channel bandwidth and power). Singh and Saini [12] assume that the task of the sensor network is to provide security protection for senior politicians. In terms of specific technical implementation, Nkomo et al. [13] assume that sink always works normally and is always safe. To meet the necessary calculation speed and memory capacity, the sink power meets the requirements of encryption and routing; the communication mode is point-to-point, and the security of data transmission is guaranteed through end-to-end encryption; the radiofrequency layer always works normally. In order to reduce or eliminate the noise in the analog measurement value, the sensor data with higher accuracy can be obtained. Chéour et al. [14] deployed in the actual environment need to consider packaging issues. Different packaging forms are used according to different monitoring tasks. The sensor nodes used to collect light information need to be transparent and sealed, while the nodes that collect temperature and humidity information need to have gap for the temperature and humidity sensor to collect data. Sun et al. [15] proposed a DEEC protocol suitable for heterogeneous wireless sensor networks where nodes have initial energy differences based on clustered networks. This protocol takes the remaining energy of each node as much as the average energy of the current node when calculating the node threshold. Taking the ratio into account, as a factor that affects the election of auxiliary intelligent nodes, the greater the remaining, the higher the probability of being elected [16–19]. At the same time, nodes are divided into multiple levels. Each level of node has its own threshold calculation formula . The network life is longer. In the research, the researchers found that after multihop routing transmission, the nodes closer to the sink bear a greater data fusion load and consume more energy, so the nodes near the sink will die prematurely and produce the so-called around the sink [20–22]. Some scholars use the remaining energy, expected energy consumption, the distance from the auxiliary intelligent node to the base station, and the number of nearby nodes as weights and find the optimal dynamic network structure by balancing the weights of these factors and propose a self-organizing network based on genetic algorithm The clustering algorithm GASONeC, when the sink node is far from the sensor, it is preferable to form more clusters to save energy. Compared with other methods, GASONeC greatly prolongs the network survival time and shortens the average response time of the algorithm [23–25].
Aiming at the problem of WSN’s stable period and half of the node death period being too short, this paper uses the distance between the node and the sink and the distance between the node and the auxiliary intelligent node as parameters to modify the node threshold. When electing the remaining auxiliary intelligent nodes, the threshold correction factor is used to appropriately increase the election probability of nodes that are far away from the existing auxiliary intelligent nodes to balance the energy consumption of auxiliary intelligent nodes and extend the stable period of WSN and half of the node death period. By optimizing the auxiliary intelligent node election process, it is ensured that the optimal number of auxiliary intelligent nodes can be elected in each round of auxiliary intelligent node elections, and the zero cluster situation can be avoided in the later stage of network operation, and the stability of the election can be improved. Compared with the genetic algorithm, the CMACP algorithm nearly doubles the fitness value through local search, effectively extending 55.66% of 100% coverage time and 28.87% of network life. Whether it is a uniform and uniform distribution of sensor nodes and MTP or a random distribution, the CMACP algorithm can extend the WSN survival time, stabilize period of network operation, and ensure good coverage.
2. Design of Auxiliary Intelligent Art System Based on Clustered Wireless Sensor Network
2.1. Hierarchical Distribution of Wireless Sensors
Wireless sensors are powered by batteries with limited energy. The goal of extending the lifetime of the entire WSN as much as possible is an important topic that requires continuous exploration and research. The energy consumption of the sensor mainly occurs in the communication phase, especially the energy consumption of the auxiliary intelligent node (cluster head, CH for short) in the clustered network is very large. A good routing protocol can effectively schedule node communication and reduce communication failure rate and communication interference, thereby improving energy utilization and extending network life. Figure 1 shows the hierarchical distribution of wireless sensors.

In the actual environment, the sensor will die due to exhaustion of energy or other unpredictable external factors, or other members will join the WSN, which will cause the number of sensors and topology in the WSN to dynamically change. So, WSN should adapt to SN to enter and leave dynamically. In addition, the reliability of WSN also depends on dynamics.
A large number of sensor nodes are randomly deployed in or near the monitoring area (sensor field), which can form a network through self-organization. The data monitored by a sensor node is transmitted hop by hop along other sensor nodes. During the transmission, the detected data may be processed by multiple nodes, routed to the sink node after multiple hops, and finally reach the management node through the Internet or satellite. The user configures and manages the sensor network through the management node, releases monitoring tasks, and collects monitoring data.
The processing capacity, storage capacity, and communication capacity of the aggregation node are relatively strong. It connects the sensor network and external networks such as the Internet to realize the communication protocol conversion of the two protocols. At the same time, it releases the monitoring tasks of the management node and forwards the collected data to the outside. The sink node can either be a sensor node with enhanced functions, sufficient energy supply, and more memory and computing resources, or it can be a special gateway device with no monitoring function but a wireless communication interface.
The protocol stack also includes an energy management platform, a mobile management platform, and a task management platform. These management platforms enable sensor nodes to work together in an energy-efficient manner, forward data in the sensor network where the nodes move, and support multitasking and resource sharing.
2.2. Clustering Network Routing Algorithm
In the clustering network routing protocol, each node broadcasts the data it received from the previous neighbor route to all its neighbor nodes (except the node that sent the data) until the data reaches the final destination node or does not reach the final destination node. However, the maximum number of route hops restricted during datagram transmission has been reached.
In order to overcome the implosion, overlap, and blind use of resources of traditional routing protocols, the SPIN protocol introduces two key technologies: innovative negotiation and resource adaptation. Based on the SPIN protocol, the data distribution protocol SPMS is proposed for node and link failure. The implementation process is divided into three stages: interest diffusion, initial gradient establishment, and data transmission. There are many data-centric algorithms that are improved based on this algorithm. Table 1 shows the routing description of the clustered network.
The basic idea of the algorithm is the clustering process is carried out periodically, and the auxiliary intelligent node is randomly selected with equal probability, and the node bootstraps as the auxiliary intelligent node according to its own probability value. Because the auxiliary smart nodes are burdened heavily, after one round of execution, the protocol restarts the cluster establishment process, so that each sensor node can load average energy consumption in the network, thereby reducing network energy consumption and improving the overall network survival time.
The clustering network needs to periodically perform the cluster reconstruction process during its operation. Each round is divided into two phases: cluster establishment and data transmission phase. Because the cluster reconstruction process consumes a lot of energy, in order to reduce the extra cost of cluster reconstruction, in general, the duration of the data transmission phase should be much longer than the cluster establishment phase. Figure 2 shows the topology of the clustered network routing algorithm.

Each node may receive multiple data packets from different auxiliary intelligent node nodes. According to the signal strength of the received data packets, the auxiliary intelligent node with the strongest broadcast signal as its auxiliary intelligent node was selected and sent to join information. The reason is that the greater the strength of the signal received by the node, the shorter the distance between the node and the auxiliary intelligent node, and the least energy consumed during communication. When all nodes in the network have selected their own auxiliary intelligent node, they will join the corresponding cluster and become a member node of this cluster. Then, the member node will notify the auxiliary intelligent that it has become a member of this cluster.
The data of a certain time interval is related to the data of the adjacent time interval. During this process, the receiving end of the cluster head will remain active and used to receive join messages from member nodes. In wireless sensor networks, the energy of nodes is limited and there is generally no energy supplement. Therefore, routing protocols need to use energy efficiently. At the same time, the number of sensor network nodes is often very large, and the nodes can only obtain local topology information. Routing protocols in different applications may be very different, and there is no universal routing protocol.
2.3. Auxiliary Intelligent Cluster Analysis
When the auxiliary intelligent cluster structure in the network is formed, the auxiliary intelligent node has calculated the TDMA time slot table and has broadcast to the member nodes and then enters the stable stage of data transmission, and the node starts to send according to the allocated TDMA scheduling time slot data. That is, only send the collected data to its own auxiliary intelligent node in its own time slot.
It is also related to the historical data at the same time of the previous day or the previous week. After a round of data transmission is completed, the cluster head node will merge the redundant data sent by the received member nodes and then send it to the base station. In this process, the long-distance communication between the auxiliary intelligent node and the base station will consume a lot of energy. The nodes send metadata (that is, the data describing the attributes of the data collected by the sensor node, meta-data) instead of the collected data for negotiation. Since the size of metadata is smaller than the collected data, it consumes relatively little energy to transmit metadata. Before transmitting or receiving data, each node must check its own available energy status. If it is at a low energy level, some operations must be interrupted, such as acting as a data transfer station (router) and stopping data forwarding operations.
Data fusion technology can be combined with multiple protocol levels of sensor networks. Figure 3 is a pie chart of auxiliary intelligent clustering. In the application layer design, distributed database technology can be used to gradually filter the collected data to achieve the effect of fusion; in the network layer, many routing protocols incorporate data fusion mechanisms to reduce the amount of data transmission.

It saves energy by reducing the transmission conflict and header overhead of the MAC layer without losing time performance and information integrity. Data fusion technology has been widely used in the fields of target tracking and automatic target recognition. The first is the cost of delay. In the process of data transmission, finding routes that facilitate data fusion, performing data fusion operations, and waiting for the arrival of other data for fusion may increase the average delay of the network. The second is the cost of robustness. Compared with traditional networks, sensor networks have higher node failure rates and data loss rates. Data fusion can greatly reduce data redundancy. But, losing the same amount of data may lose more information, so relatively speaking, it also reduces the robustness of the network.
2.4. Art System Compilation Design
During the compilation process of the art system, due to the energy limitation of sensor nodes and the large network coverage area, the network is suitable for adopting the routing mechanism of art compilation and transmission. The wireless communication bandwidth of the sensor node is limited, usually only a communication rate of several hundred at most. Due to changes in node energy, high mountains, buildings, obstacles, and other topography and natural environments such as wind, rain, and thunder, wireless communication performance may change frequently and communication interruptions frequently occur. In such a communication environment and the limited compilation capability of nodes, special consideration should be given to meeting the communication requirements of wireless sensor networks when designing a network compilation mechanism. It can be seen that the energy consumption of the wireless compiling module in the sending state is the largest, and the energy consumption in the idle state and the receiving state is close, slightly less than the energy consumption in the sending state. Figure 4 shows the distribution of compilation nodes in the art system.

In each art system compilation subgroup, the auxiliary intelligent node is responsible for managing the common member nodes of the cluster and shares part of the management tasks of the WSN bottom layer. This layered structure is conducive to the large-scale deployment of sensor nodes and has a good network dynamic adaptability and scalability. Most of the energy of the sensor node is consumed on the wireless communication module. Sensor nodes consume more energy when transmitting information than when performing calculations.
The wireless compiler module always monitors the existence of the wireless channel in the idle state, checks whether there is any data sent to itself, and shuts down the communication module in the sleep state. The member nodes in the cluster use TDMA technology to cut nonoverlapping time slots and can be shut down or hibernated to save energy during idle periods (such as assisting the intelligent node in the data processing and sending phase). The AD analog-to-digital conversion module realizes the conversion of analog to digital, which is convenient for the postprocessing unit to perform operations; the processing unit is mainly composed of a micro, low-power embedded microprocessor and memory and is responsible for the data storage and operation of the entire node and forwarding. The data from other nodes is the function control center and data computing center of the node. In addition, because the environmental data collected between adjacent nodes has greater repetition and redundancy, the use of data fusion technology in the processing unit is conducive to reducing network traffic; the radiofrequency module is responsible for conversations and data transmission with other nodes or base stations, according to electromagnetic waves. The disposable microbattery provides energy for the stable operation of the node.
3. Results and Analysis
3.1. Data Screening of Clustered Wireless Sensor Network
The test scenario is as follows: 200 nodes are evenly distributed in a circular area with a radius of 50 m. The circular area is divided into rings of equal width, and a certain number of higher energy is deployed in an appropriate position in each divided ring. When the number of auxiliary intelligent nodes on the second layer ring is gradually increased, the life cycle of the network also gradually increases, and the slope of the curve of 4 ~ 6, 6 ~ 8, and 8 ~ 10 is greater than that of the later stages.
It is difficult to accurately predict the flow of traffic in an area. Because as the number of auxiliary intelligent nodes on the second-level ring increases, will decrease accordingly, that is, the farthest distance between ordinary nodes and auxiliary intelligent nodes will decrease, thus reducing the number of ordinary nodes sending to the cluster head. The clustering network algorithm simulation environment uses MATLAB 8.1 platform, and sensor nodes are randomly deployed in a site of m2. Through simulation comparison, it is found that the value of mouth is 2, and the value of is 4; the result is the most ideal. Figure 5 shows the energy consumption distribution of clustered wireless sensor networks.

When the clustering network protocol is running, most of the nodes in the network die quickly. The reason is that the clustering network protocol does not consider the heterogeneity of nodes. The node will still have a lot of energy remaining and can no longer be fully utilized, thus causing a waste of energy. The centralized algorithm clustering network can obtain a more balanced distribution of auxiliary intelligent nodes than ordinary networks, and the energy consumption of nodes in the network can be balanced to a certain extent, but the clustering network also does not consider the heterogeneity of node energy. The clustering network sets the auxiliary intelligent node to a higher energy, which can make full use of the high energy of the auxiliary intelligent node. When the transmission distance is farther, the energy consumed by wireless communication is greater, and it shows an exponential growth trend as the distance increases.
At this time, the node closer to the sink node should be selected as the auxiliary intelligent node as much as possible, so that the energy consumption of wireless transmission can be saved by shortening the distance, and the communication distance is controlled at . The clustering network algorithm modifies the threshold of the node according to the distance between the sensor node and the sink node and the distance between the node and the auxiliary intelligent node, so that the node closer to the sink node has a greater probability of becoming the auxiliary intelligent node to shorten the communication distance. The node that is closer to the auxiliary intelligent node has a smaller probability of being elected as the auxiliary intelligent node, avoiding too small clustering intervals and causing too many multihop transmissions of data, thereby saving the energy consumption of radio transmission.
3.2. Auxiliary Intelligent Art System Simulation
This experimental platform is built on Acer laptops with Core i5-3230M Core CPU, 4 GB DDR3 memory, and Windows 8 operating system. MATLAB is used as the simulation platform. In terms of simulation parameter setting, 200 wireless sensor nodes are distributed in 200200 second. The auxiliary system is an object-oriented network simulation simulator that uses C++ to write specific protocols, but in order to increase flexibility, its front end uses an OTcl interpreter.
Because the data is affected by many factors, such as spatial correlation, time dependence, and external environmental factors, the kernel of the auxiliary system simulator defines a variety of classes, which are hierarchical, which is called the compiled class structure, and the corresponding similar class structure in the OTcl interpreter is called the interpreted class structure. Before network simulation, we must first analyze the levels involved in the simulation. At the first level, the existing network elements of the auxiliary system can be used to realize simulation without modifying the auxiliary system itself. However, if there are no network elements required for simulation in the auxiliary system, you need to add the required network elements to expand the NS.
Figure 6 shows the distribution of clustered wireless sensor network elements. It can be seen that the number of rounds appearing in the clustering network are 415, 645, 796, and 917, respectively. It can be seen that the number of rounds appearing in the clustering network are 695, 783, 832, and 1026, respectively. In addition, the period from the beginning of the simulation to the appearance of the clustered network is called the network stability period. The stable period is an important indicator to measure the stability coefficient of the network. The number of surviving nodes of the improved algorithm in the same round is more than that of the other three algorithms. This is because the algorithm in this paper adopts a mixed working mode of multiple auxiliary intelligent nodes, and the selected auxiliary intelligent nodes are optimized for high energy and perform their own duties, effectively alleviating the information transmission load between clusters and reducing the communication energy consumption and burden of auxiliary intelligent nodes. The energy consumption of the nodes in the network is balanced, so that the working time of the nodes becomes longer. The other three algorithms have different degrees of defects in the election of auxiliary intelligent nodes, the distribution of auxiliary intelligent nodes, and the balance of energy consumption. As a result, the survival time of nodes cannot be effectively extended.

3.3. Analysis of Experimental Results
In the clustering network and wireless sensor network algorithm, the resource consumption is imbalanced due to the random definition of the cluster head. When the number of failed nodes gradually increases, the failure rate of the nodes is higher. The clustering network and the wireless sensor network algorithm proposed in this paper both apply -means to the formation process of the WSN logical structure and obtain clustering with relatively balanced load between clusters, and the wireless sensor network algorithm solves the problem of the number of clusters. It can be seen that the failure time of the first node in the wireless sensor network algorithm is the latest.
It can be seen that in the first round, the distribution of nodes on the clustered network and the wireless sensor network is roughly the same, because the network has just started to operate, and the factors affecting the election of auxiliary intelligent nodes are not very different at this time. At the same time, due to the randomness of the clustering network’s auxiliary intelligent node election, the first round of clustering network is roughly equivalent to the effect of the wireless sensor network, but the performance of the clustering network will not be as stable as the network runs. Figure 7 shows the random distribution of wireless sensor network nodes.

In the stable period, half of the surviving node period, and the entire network life cycle, the improved clustering network algorithm in this paper is significantly higher than other algorithms in the stability of assisting intelligent node election. Especially when there is no node death during the stable period, the clustered network can elect 5 optimal numbers of auxiliary intelligent nodes in each round of network operation, and its average value is 5 and the variance is zero during the stable period.
Spatial correlation means that the inflow of each area varies with the outflow data of neighboring areas. The performance is the same as the ideal situation. It can be seen that the stability of the clustered network is significantly higher than that of the other three. Before the algorithm runs iteratively, the initial fitness values of the two are almost the same. After 40 population iterations, regardless of the average fitness or the maximum fitness, the algorithm with a local search algorithm has a better fitness value than the genetic algorithm.
Figure 8 shows the distribution of node coverage in the wireless sensor network. It can be seen that the clustering network node starts to die in 58 rounds, and the slope of the curve in rounds 60-120 is higher than the curve slope of the clustering network-NS, indicating that its nodes die faster than the clustering network-NS. Until the end of the simulation 200 rounds, there are still a small number of nodes in the clustered network. The clustered network extends the network survival time by more than 40%. It can be seen that in the first 60 rounds of network operation, the number of data packets received by the two algorithms assisted by the intelligent node is roughly the same.

The outflow of this area also affects the inflow of adjacent areas. This is because the data packets received by the assisted intelligent node are mainly from cluster members. Afterwards, it is obvious that the amount of data packets received by the clustered network is higher than that of the clustered network, and the gap is gradually widened. It can be seen that the number of data packets received during the entire operation time of the network using the clustering network is nearly 13% higher than that of the clustering network. It can be seen from the above that the clustering network increases the data transmission volume of the network, and it also reflects from one aspect that the clustering network reduces the energy consumption of the network.
4. Conclusion
In this paper, an energy-efficient clustering protocol is proposed in the wireless sensor network. The selection of the auxiliary intelligent node and the sending node is based on the average remaining energy of the nodes in the network and the average energy and relative distance of the member nodes in each cluster. Since the energy load of the auxiliary intelligent node is greatly reduced, there is no need to perform a global cluster reconstruction, which avoids a large amount of additional energy overhead. Therefore, the algorithm can not only balance the energy consumption of auxiliary intelligent nodes and ordinary nodes, but also avoid the huge extra cost caused by global cluster reconstruction. Aiming at the problem of WSN lifetime and coverage optimization, this paper proposes a composite cultural gene clustering protocol based on cultural gene algorithm and node wake-up strategy. The algorithm first runs the cultural genetic algorithm to initialize the nodes that need to be activated and plan adjacent redundant nodes. The genetic algorithm and the local search algorithm obtain the optimal initial node distribution through multiple iterations. With the operation of the network, when a node loses its coverage target due to exhaustion of energy, the wake-up scheduling strategy compensates for the coverage loophole by calculating and activating the optimal adjacent redundant node. The analysis results show that the improved algorithm effectively reduces the energy consumption of the network and prolongs the survival of the network cycle. Simulation experiments show that, compared with genetic algorithm, CMACP has higher adaptability. It can better extend the 100% coverage period and network lifetime and improve the WSN’s ability to control the coverage of the sensing area.
Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.
Conflicts of Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Acknowledgments
The study was supported by “Shandong Province Social Science Planning Research Project, China; project: Moral Education of Female Visual Symbols in Chinese Folk Art, (Grant No. 18CWYJ20)”.