Digital oilfields generally adopt the multi-hop technology to expand the network scale, and the data generated depends on the large-scale wireless sensor network (WSN) for transmission. However, multi-hop communication will lead to uneven distribution of network energy consumption and premature death of nodes. To prolong the network lifetime of digital oilfields, we extended the narrowband internet of things (NB-IoT) module on some WSN nodes deployed on site to form heterogeneous nodes. Through the heterogeneity of NB-IoT and WSN, the nodes could transmit as little data as possible from other nodes, fundamentally reducing the node energy consumption. Furthermore, an optimization method was proposed that could simultaneously optimize the network lifetime and node expansion cost. The experimental results revealed that the proposed algorithm could greatly prolong the network lifetime while only introducing a small number of nodes.