A new technology that is gaining popularity today is the Wireless Sensor Network. Smart sensors are being used in a variety of wireless network applications, including intruder detection, transportation, the Internet of Things, smart cities, the military, industrial, agricultural, and health monitoring, as a result of their rapid expansion. Sensor network technologies improve social advancement and life quality while having little to no negative impact on the environment or natural resources of the planet are examined in sensor networks for sustainable development. Real-world applications face challenges ensuring Quality of Service (QoS) due to dynamic network topology changes, resource constraints, and heterogeneous traffic flow. By enhancing its properties, such as maintainability, packet error ratio, reliability, scalability, availability, latency, jitter, throughput, priority, periodicity, deadline, security, and packet loss ratio, the optimized QoS may be attained. Real-world high performance is difficult to attain since sensors are spread out in a hostile environment. The performance parameters are divided into four categories: network-specific, deployment phase, layered WSN architecture, and measurability. Integrity, secrecy, safety, and security are among the privacy and security levels. This article leads emphasis on the trustworthiness of the routes as well as the nodes involved in those routes from where the data has to pass from source to destination. First of all, the nodes are deployed and cluster head selection is done by considering the total number of nodes and the distance from the base station. The proposed work uses AODV architecture for computing QoS parameters that are throughput, PDR and delay. K-means clustering algorithm is used to divide the aggregated data into three possible segments viz. good, moderate and bad as this process does not involve the labelling of aggregated data due to its supervised behavior. The proposed trust model works in two phases. In first phase, data is divided into 3 segments and labelling is done. In second phase, uses generated class objects are to be applied viz. the route records to publicize the rank of the routes followed by the rank of nodes. The proposed technique employed the statistical machine learning and swarm intelligence strategy with dragon fly algorithm in order to address the issues related effective rank generation of nodes and improving the network lifetime. Deep learning concepts can be combined with fuzzy logics approach for resolving issues like secure data transmission, trustworthiness of ranking nodes and efficient route discovery.