Kriging in space-time has obvious advantages in analyzing the continuous change of natural characteristic quantity. This method can use the time correlation to improve the analysis accuracy. In the analysis of stock market network construction, Kriging is still not applied. The purpose of this paper is to construct the national stock market network based on the machine learning algorithm of spatiotemporal Kriging model. Firstly, the basic theory of the basic properties of the network is introduced. Secondly, the principle of machine learning algorithm is further studied. After distinguishing the classical Kriging model and the spatiotemporal Kriging model, the data of stock market network is constructed. Some problems related to the interpolation with spatiotemporal Kriging method are further studied, such as the reasons for the improvement of precision, the selection of database capacity in the process of spatiotemporal interpolation, etc. The experimental results show that the spatiotemporal Kriging method is used to calculate the spatiotemporal variation function, Cst(0,0) is estimated to be 0.062, and the spatiotemporal variation function is constructed. The average path of stock network is 2.0476, which is close to 2.6095 of random network. At the same time, the clustering coefficient of stock market network is 7619, which is much larger than that of random network. For any real network, if it satisfies the following two conditions at the same time, it can be called a small world effect.