The operation of Wireless Sensor Networks (WSNs) is constrained by a number of factors, one of the most important of which is available energy. Electrochemical batteries are commonly used to power sensor nodes. The operating temperature and discharge current values have a significant impact on the stored energy in battery devices. As a result, estimating their voltage/charge behavior over time, which are important factors for the implementation of energy-conscious policies, becomes challenging. To this end, this paper proposes a RUL prediction model based wireless networks that integrates the three internal states of battery capacity, impedance and temperature, and introduces a two-way long and short-term memory network to learn the time correlation of the three state data. The goal of this research is to develop a software-based method for estimating the state of charge and voltage of batteries in WSN nodes using a temperature-dependent analytical battery model. The equivalence between dropout technology and Bayesian variational inference technology is used to quantify the uncertainty of RUL prediction results, and the 95% confidence interval and probability density distribution of the prediction results are obtained, and the influence of different dropout rates on the prediction uncertainty is analyzed. Impact. The experiment shows that the comparison experiment of four different deep learning model frameworks and two internal state input schemes verifies the effectiveness of the learning method based on the two-way long and short-term memory network.