The process of locating nodes is really a key problem in the field of wireless sensor networks (WSN), and WSN localization is commonly followed by the distance vector hop (DV-Hop) algorithm. DV-Hop-based algorithms are currently in use by all beacon nodes to locate the dumb node. On the other hand, the approximate distance from the dumb node to certain beacon nodes is a large error, resulting in a large finished dumb node localization problem. To keep improving localization, we designed an efficient DV-Hop method on the dynamic beacon node set (DBNS). DBNS IDV-Hop uses part of the beacon nodes to engage in localization, unlike current DV-Hop-based techniques, which use all beacon nodes. To begin with, the selection of beacon nodes is reduced to an optimization problem. Subsequently, to create the DBNS, the binary fractional order class topper optimization (BFCTO) algorithm is applied and the localization is carried out on the DBNS. Lastly, to further optimise the dumb node coordinates, the fractional order class topper optimization (FCTO) algorithm is used. According to the outcomes, our proposed algorithms require about (0.3%), (0.99%), and (11.14%) less localization error than the algorithms Improved DV-HOP, Enhancement DV-HOP, and DV-Hop (Basic), respectively.