| With the rapid development of short distance wireless communication and micro electromechanical technology,wireless sensor networks(WSNs)have been extensive used in environmental monitoring,national defense,military,farming production and other fields.However,because WSNs work in harsh environments,energy conservation and safety become one of the important challenges facing research.Clustering and secure routing are the main means to solve this problem,but the existing methods have some problems,such as the undetermined number of clusters,the deviation of optimal cluster head and optimal routing path selection,resulting in low network energy efficiency,and the loss of data due to internal attacks on nodes.Therefore,this paper uses affinity propagation,intelligent optimization algorithm,angle model and trust mechanism to effectively improve network energy efficiency and security performance.The specific research contents are as follows:(1)A clustering routing protocol for wireless sensor networks based on affinity propagation and chaotic lion swarm optimization(APCLO)is presented to solve the problem that WSNs clustering routing protocol cannot determine the optimal number of clusters and cannot form optimal clusters.The protocol first improves the affinity propagation algorithm(AP)based on the energy and distance factors of the nodes to obtain the optimal number of clusters needed by the network cluster adaptively,as well as the initial cluster heads(CHs)of the reference nodes.Afterwards,APCLO constructs a fitness function based on the energy consumption in the cluster,the remaining energy of the nodes and the distance to the base station(BS),searches for the optimal cluster head by the lion swarm optimization algorithm,and introduces chaotic mapping in the search process to improve the convergence rate.In addition,APCLO uses a single-hop routing method,where the cluster head receives data from the members of the cluster and passes it directly to the BS after fusion.The performance of the proposed method is verified by simulation tests on network life cycle and network energy consumption.(2)To solve the problem of WSNs Cluster Routing Protocol relay nodes with wide search range and poor energy balance,an optimal relay angle clustering routing protocol for wireless sensor networks(RACR)is presented.First,RACR selects CHs by forming a fitness function based on the residual energy,density of nodes and the average distance to neighbor nodes.In addition,RACR continuously adjusts the influence of various factors on cluster head selection through energy.RACR adopts a multi hop routing transmission method and selects relay nodes during the routing process by constructing an optimal relay angle model.The model aims to reduce energy consumption and calculates the optimal relay angle based on the distance from the selected cluster head to the BS.Then,within the relay angle constraint range,each cluster head selects the cluster head that is closer to it,has higher residual energy,and has smaller load as the next hop relay node.The validity of the proposed method is verified by simulation tests on network life cycle,energy consumption balance and network throughput.(3)A secure routing protocol for wireless sensor networks based on trust mechanism(SRPTM)is presented to overcome the vulnerability of WSNs cluster routing protocol to internal node attacks and to weaken its security.The protocol establishes a trust model to determine the credibility of nodes and introduces trust values into the proposed clustering routing protocol.This model first obtains direct trust and indirect trust through the success rate of interacting with neighboring nodes’ information.Then,by adjusting the weight factor,two trust values and historical trust are considered together to obtain the comprehensive trust value.SRPTM is designed to minimize network transmission distance and select the optimal CHs based on the trust value and energy of the nodes.When choosing a routing path,SRPTM selects the optimal relay node based on the optimal relay angle model,taking into account the trust value,energy and transmission distance of the CHs within the constraints.The simulation tests on network packet loss rate,network life cycle and energy efficiency show that SRPTM can provide network security performance.In order to solve the problems of clustering and secure routing in WSNs,three protocols,APCLO,RACR and SRPTM,are proposed to solve the problems of uneven clustering,low energy efficiency and network data loss in WSNs clustering routing.The simulation results show that the protocol achieves good performance in prolonging network life,balancing network energy consumption,improving energy efficiency and network security.It can be widely used in WSNs environment monitoring,logistics and distribution,as well as health care,and has certain theoretical value and practical application significance. |