With the rapid development of 5G technology, the era of interconnection of all things has arrived. At the same time, a variety of hardware and software are getting more and more location information through sensors, and the accuracy of location information is increasingly important. Because traditional positioning relies on satellite signals, it achieves good results outdoors without obstruction, but indoors, due to the obstruction of various walls, such as Beidou satellite navigation system and U.S. Global Positioning System, it is difficult to meet the accuracy requirements for indoor positioning. Therefore, how to improve the positioning accuracy of indoor nodes has become a research hotspot in the field of wireless sensor. In order to improve the indoor positioning accuracy, this paper combines artificial neural network, intelligent optimization algorithm and node positioning to improve the accuracy of indoor positioning. One of the essences of the neural network is to solve the regression problem. Through the analysis of indoor node positioning, it can be concluded that the accuracy of distance-based positioning method lies in finding the relationship between signal strength and distance value. Therefore, the neural network can be used to regression analysis of signal strength and distance value and generate related models. In order to further improve the accuracy and stability of indoor node positioning, a method combining whale optimization algorithm with neural network is proposed. By using the whale optimization algorithm to find the optimal parameters of the neural network model, the training accuracy and speed of the neural network are improved. Then, using the excellent fitting ability of the neural network, the mapping relationship between RSSI value and distance value of indoor nodes is fitted, and the corresponding regression analysis model is generated, which can minimize the noise problem caused by abnormal signal attenuation and reduce the indoor positioning error. Finally, the data is processed by the neural network to get the parameters needed in the positioning algorithm. The experimental results show that the node positioning model based on the optimized neural network and the single optimization algorithm has significantly improved the positioning accuracy and stability.