With the accelerating process of urbanization development, it is urgent to optimize the national land spatial planning to promote the coordinated development of urbanization. Based on the image recognition technology, this study uses the kernel density gradient algorithm to segment the image samples of the national spatial layout and the GWO-SVM classiϐication model to classify the land use types of the national spatial layout, and ϐinally combines the Markov-FLUS model to predict the future planning of the existing national spatial layout. The research analysis found that the segmentation and classiϐication accuracy of the kernel density gradient algorithm and the GWO-SVM classiϐication model for the homeland spatial layout samples both reached more than 90%. The classiϐication accuracy using the GWO-SVM classiϐication model is improved to a greater extent than that of SVM, GA-SVM, etc. The Markov-FLUS model also maintains an accuracy of more than 80% for the prediction of future territorial spatial planning. In terms of land use types, the Markov-FLUS model shows that the proportion of residential land and industrial land will decrease after 10 years compared with 5 years, while the proportion of public facilities land will increase by about 8% after 10 years compared with 5 years. The optimization of national spatial layout is of great signiϐicance to the development of urbanization in China, and the research in this paper will promote the development of national spatial layout planning in a more reasonable direction.