When sensor nodes in wireless sensor networks (WSNs) have limited energy, data minimization is crucial. Usually, data communications use up energy. A sensor node's lifespan can frequently be increased by sending and receiving the proper quantity of data. The PISAE (Partially Informed Sparse Autoencoder) is a state-of-the-art unmapped neural network architecture designed to reconstruct all sensor inputs from a limited number of sensors. It is presented in this publication. Use this architecture to create a system for selecting sensors. We now propose the cross-layer based opportunistic routing protocol (CORP) as an opportunistic routing mechanism for WSNs. In order to cut down on processing time and energy consumption and increase the dependability of data transfer, the best way is selected utilizing the CORP technique, which is suggested.For energy-efficient routing based combinatorial random sampling bat optimisation (ERFN-CSSBO), we also suggest using fuzzy neural networks. This enables you to conserve energy, increase the lifespan of your wireless sensor network, and keep your energy consumption in check. With CSSBO (Combined Random Sampling Prevosti Bat Optimisation), the best path is identified by integrating features (such as distance, energy, trust, and internode measurement connection stability) from all the bats.The key challenge in WSN is choosing cluster heads (CH). K-Medoid is used to enhance sensor node clustering. Important considerations include the effect on quality of service (QoS), sensor node position, proximity, and energy state needs. This study combines Hybrid BFO (Bacterial Foraging Optimization) and HSA (Harmony Search Algorithm), two well-known optimization techniques, to pick cluster heads in wireless sensor networks that are optimal in terms of distance and energy. On-task completion. The outcomes of the simulation indicate that the proposed technique improves QoS. Endpoints, throughput (1.0 Mbps), (98.5 % of packets are forwarded), and packet loss rate (1.5 %), and other QoS factors are all included in the performance statistics plotted. It performs better than conventional routing protocols in terms of network lifetime (6100 rounds), delay at both ends (1.5 s), and energy usage (30.35 mJ).