  Wireless sensor networks (WSNs) contain numerous nodes that their main goals
are to monitor and control environments. Also, sensor nodes distribute based on
network usage. One of the most significant issues in this type of network is
the energy consumption of sensor nodes. In fixed-sink networks, nodes which are
near the sink act as an interface to transfer data of other nodes to sink. This
causes the energy consumption of sensors reduces rapidly. Therefore, the
lifetime of the network declines. Sensor nodes owing to their weaknesses are
susceptible to several threats, one of which is denial-of-sleep attack (DoSA)
threatening WSN. Hence, the DoSA refers to the energy loss in these nodes by
maintaining the nodes from entering energy-saving and sleep mode. In this
paper, a hybrid approach is proposed based on mobile sink, firefly algorithm
based on leach, and Hopfield neural network (WSN-FAHN). Thus, mobile sink is
applied to both improve energy consumption and increase network lifetime.
Firefly algorithm is proposed to cluster nodes and authenticate in two levels
to prevent from DoSA. In addition, Hopfield neural network detects the
direction route of the sink movement to send data of CH. Furthermore, here
WSN-FAHN technique is assessed through wide simulations performed in the NS-2
environment. The WSN-FAHN procedure superiority is demonstrated by simulation
outcomes in comparison with contemporary schemes based on performance metrics
like packet delivery ratio (PDR), average throughput, detection ratio, and
network lifetime while decreasing the average residual energy.
