In the modern wireless sensor networks, greedy forwarding is widely used in geographic routings. However, the Ârouting void problemÂ is always around. In order to solve the Ârouting void problemÂ in the modern wireless sensor networks, a routing algorithmbased on greedy forwarding is proposed by introducingVirtual optimized hop nodes. In this algorithm, as long as the network topology allows, the greedy forwarding data packets (GF) for data packet transmission is used, which will make the routing path algorithm with very high robustness, as well as the final routing path has been generated as close as possible to the shortest path routing. If the greedy forwarding fails (when the routing void problem occurs), the virtual optimal hop method is used to find the next hop node, and to make the greedy forwarding recover work also. The algorithm is simulated in the Wireless network simulation platform based on Java. When routing void problem occurs, the performance of the algorithm is compared with ÂGEDIR2Â and ÂGPSRÂ, experiments showthat on the premise of the energy consumption, virtual optimal algorithm is superior to ÂGEDIR2Â and ÂGPSRÂ on lifetime, data transmission efficiency and stability; avoid using flat graph algorithm and the flooding technology in many traditional protocol, and solve routing void problemrouting inside the node topology.