The spatial distribution of Qingyan Ancient Town and its military wisdom are studied using Thiessen polygons, fractal theory and complex networks methods with Qingyan Ancient Town as the object of study, in order to clarify the characteristics of the architectural layout of the military-type ancient towns in southwest China since the Ming Dynasty. The results show that the architectural spaces of the six districts of Qingyan Ancient Town have good self-similarity and complexity, the architectural space forms of the six districts are mainly influenced by the natural geomorphology, all of them are agglomerated and distributed, and their architectural space layout form structure and function are consistent. Besides, the functional variability of the building space will have an impact on the connectivity characteristics of the building network, the greater the density of the building space network, the greater the network degree centrality potential, the more uneven the distribution of nodes, the more obvious the centripetal tendency, the better the network connectivity. The architectural network of Qingyan Ancient Town is characterised by low vulnerability, good stability and strong connectivity, reflecting the wisdom of the architectural layout within Qingyan Ancient Town, which is based on the military connectivity function of efficient and close cooperation of the inhabitants, taking into account the economic trade and cultural life, thus forming a complete military Tunpu small society. Second, the functional difference of subjectivity leads to the connectivity of architectural spatial network with hierarchical and graded characteristics, and the natural factors, human factors and social system factors of traditional villages, ancient towns and ancient settlement sites in southwest China affect the connectivity of architectural spatial network, the connectivity of the architectural spatial network of traditional settlements signifies the intrinsic laws of nature and society, and connectivity can characterise the laws of the natural and social environment in which traditional settlements were created. Finally, this study can provide a scientific reference for the conservation planning, design and construction management of military Tunpu ancient towns.