Wireless ad-hoc IoT (WAIoT) is promising in providing connections for a considerable amount of devices in the next generation (5G and beyond 5G) networks. A challenge in WAIoT networks is that most network nodes are not stable due to the limited power supply (such as a battery). In this paper, we focus on balancing node residual energy and node degree to prolong the network lifetime. We first present a statistic-based algorithm (named ED-index) for evaluating the network topology and further develop an energy-efficient topology control algorithm (named EDTC). The EDTC algorithm leverages the maximum spanning tree algorithm to build a robust backbone topology and utilizes the proposed ED-index algorithm to re-introduce some edges to the topology. We also present a graph convolutional network (GCN) based algorithm to imitate the initial EDTC algorithm through learning. In the random communication experiment, the proposed EDTC algorithm achieves two times the network lifetime than the state-of-the-art. Moreover, the GCN-based EDTC algorithm saves around 99% optimization time than the initial EDTC algorithm when the number of network nodes is 100.