Introduction

Among the ancient military heritage of China, the Ming Dynasty coastal defense system is a typical representative of the maritime defense heritage and an important part of the World maritime Cultural Heritage [1]. Past research on maritime military heritage has focused on the preservation of underwater warships and other remains as a means of preserving the historical memory of the war, and has been more oriented towards the field of archaeology [2, 3].

Ming’s naval defense system is an extremely rare ancient coastal defense system in China. China’s coastal defense dates back to the Spring and Autumn and Warring States periods. Before the Ming Dynasty, except for the Yuan, most defenses were against internal hostile forces, with no complete system, and the real system of coastal defenses formed during the Ming Dynasty. At the start of the Qing Dynasty, a powerful navy existed, continuing the Ming’s naval defense pattern. However, corruption in the later period weakened the army’s fighting power, leading to defeat in battles against foreign enemies [4].

The Ming Dynasty naval defence system was established mainly to defend against invaders from the sea, who were called: “Wokou”. Japanese historian Kiyoshi Inoue believes that Wokou began in the thirteenth century [5]. 1460–1470 as Japan entered the Warring States period, Japanese ronin and Wokou gradually began to plunder and invade China [6]. Since the beginning of the Ming Jiajing (1522), there was an unprecedented woko invasion along the coast, which was generally divided into three stages. The first stage (1540–1551), was a period of sporadic Wokou, which were composed of Portuguese pirates, Wokou, and Chinese pirates. The second stage (1552–1557), was the most serious period of the Ming Dynasty’s coastal Wokou, which consisted mostly of Wokou and Chinese pirates. In the third stage (after 1558), the Wokou gradually weakened and disappeared [7]. The defence capability of the Ming Dynasty’s sea defence system was also improved and upgraded along with the intensification of Wokou invasion.

In order to safeguard people’s lives and property, the construction of citadels became an important manifestation of sea defense in the Ming Dynasty. The main purpose of the Ming Dynasty coastal defense was to strengthen the defense along the coastline and to protect shipping and people’s safety [8]. The Ming coastal defense consisted of seven zones along China’s eastern coast (it is approximately equal to the seven coastal provinces of China, but in the Ming Dynasty, Northern Zhili corresponded to the present Beijing and Tianjin, Southern Zhili corresponded to Jiangsu, while the rest of the names were the same) [9]. Zhejiang, with its unique seaport position and economic conditions, experienced the heaviest Wokou attacks and boasted the most extensive and densely located defense citadels [10]. The coastal defense heritage currently depends primarily on Weisuo and related facilities. Nevertheless, many of the Zhai, Xunjiansi, post stations, and beacons that were once part of the system are no longer in existence.

Current research on ancient military heritage is beginning to combine quantitative analytical research with qualitative historical research to discover the intrinsic value of heritage. For example, Elizabeth Arkush and Charles Stanish critically assessed the archaeological record to infer the construction of military fortifications in the ancient Andean region [11]. Aldrighettoni Joel, in his doctoral thesis, used World War I as a subject of study and proposed the use of remotely sensed data in conjunction with GIS analysis to explore the relationship between landscape and heritage [12]. Pinagli A and other scholars have used an archaeological and multidisciplinary approach to investigate the cultural and geographical complexity of the military heritage of Val Canale, Italy, to discover important clues behind the historical development [13]. Quantitative studies on spatial and temporal evolution are scarce due to the need for historical clues and logical deductions from vast datasets. An example is the evolution of Italian military heritage from 1900–1950 studied by Camerin and Camatti [14], and for the study of the spatial layout of the defense system of the Great Wall of China during the Ming Dynasty [15].

China began researching the history of maritime defense during the Ming Dynasty quite early. In recent times, there have been specialized histories articles of naval defense that have been published [16]. Since then, the coastal areas of China have launched the census of the Ming and Qing Dynasty sea defense heritage and the compilation of the history of sea defense. Among them, the Ming Dynasty’s book Chou Hai Tu Bian recorded in detail the deployment of sea defense along the entire coastline of the Ming Dynasty [17]. Fan Zhongyi discussed in depth the training, use of weapons, and methods of warfare of the Ming Dynasty’s coastal defense forces [16]. In terms of research on foreign relations, scholars in recent years have paid special attention to the history of the development of coastal defense and its historical origins with China-Japan relations. For example, Liao Chunchao in 2012 analyzed in depth the Sino-Japanese relations in Eastern Fujian as well as the far-reaching impact of the anti-Japanese wars on the social development of the Ming Dynasty [18]. In 2016, Zhu Taiwen systematically analyzed the origin of the Wokou in the Ming and Qing dynasties and the strategies of the Wokou, as well as combed through the dynamic evolution of the Sino-Japanese situation from the end of the Yuan Dynasty to the First World War, which fully demonstrated the continuity and development of the history of China’s resistance to the Wokou [19].

In the study of Ming Dynasty coastal defense, there are more in-depth studies on specific regions and defense modes, such as Lifeng Tan et al., exploring the correlation between the construction of military forts and natural topography along the coast of Zhejiang during the Ming Dynasty [20]. There are also studies on the defense efficiency of specific cities in coastal defense, such as Shenshen Ge et al. who quantified the correlation between the height of the city wall and the moat of Pu Zhuang Suo, Zhejiang during the Ming Dynasty as the object of study [21]. There is also a quantitative study of defense efficiency based on the ratio of different types of soldiers combined with the defense space, For example, Yinggang Wang et al. quantified the spatial efficiency of the military force composition under the defense mode of the Four Canjiang and Six Bazong of the Zhejiang Coastal Defense and verified the relevant synergy between the military force and space [22]. Although the past studies are rich, there is still a lack of research on the spatial evolution of the long-time sequence of defense mode, and there is also a lack of correlation research on the most important fact of the Wokou invading war.

In this paper, we take Zhejiang as the study area of the Ming Dynasty, combine the coastal defense deployment modes with Wokou invasions, and utilize various GIS analysis tools to carry out spatial and temporal analysis of the evolution of the defense mode and the frequency of Wokou invasions, to validate the dynamic adaptive characteristics and evolutionary driving factors of the coastal defense system.

The main objectives of this study include:

  1. 1.

    Determine the type and characteristics of the initial defense mode by the source of the establishment of the basic citadels of the coastal defense system;

  2. 2.

    Quantify the evolution process of the defense mode and the spatial distribution characteristics of Wokou invasions with time as a clue;

  3. 3.

    Combine the Wokou invasions with the evolution of the defense modes to reveal the adaptive characteristics of the evolution of the coastal defense modes and explore its driving factors.

Study area

In the early Ming Dynasty, the central government constructed a military leadership system that was both decentralized and highly centralized. The Great Wall military settlement on China’s northern border followed the previous military border defense system, while the establishment of the defense system on the southeast coast was the first in the Ming Dynasty, as evaluated in Nan’ao Zhi: “In ancient times, there were border defenses but no sea defenses, and there have been defenses on the sea since the Ming Dynasty.” [23]. Since its establishment, the Ming Dynasty sea defense has lasted for more than 600 years, until it was abolished in the late Qing Dynasty. However, with the passage of time, the ruins of sea defense coastal in the Zhejiang area of the Ming Dynasty suffered from the serious problem of natural and man-made destruction. Through in-depth and systematic theoretical research, we can provide theoretical support for the preservation of local sea defense coastal heritage and promote people's attention to this period of history.

As shown in Fig. 1, Zhejiang is located on the southeast coast of China, with a coastline of about 2200 km, and was an important port for foreign trade and exchange during the Ming Dynasty [24]. The favorable geographic environment promoted the economic and social development of Zhejiang but also aggravated the Wokou invasions of Zhejiang. Among the 7 major coastal defense zones of the Ming Dynasty, Zhejiang was located in the middle of China’s coastal defense space and gradually became a strategic place for coastal defense [25, 26].

Fig. 1
figure 1

Location of the study area. The map of China was provided by the Ministry of Natural Resources of China (approval number: GS(2019)1673)

Materials and methods

Data sources

The geospatial base data as historical data analysis comes from the computer network center of the Global Academy of Sciences (horizontal accuracy 16 m, vertical accuracy 6 m) [27]. The historical data are mainly divided into three categories: the first category is the spatial and temporal data of the coordinates and administrative scope of the state capitals and the basic citadels of Zhejiang in the Ming Dynasty; the second category is the spatial and temporal data of the occurrence of the Wokou invasions in the Ming Dynasty Zhejiang during the Hongwu-Wanli period (1368–1588); and the third category is the data of the temporal and spatial scope of the corresponding armoring pattern evolution within the period of the occurrence of the Wokou invasions. The specific data are described below:

Classification of state capitals and cities

The temporal and spatial data of the citadels used in this paper come from Chou Chou Hai Tu Bian [17] and various local chronicles, and the geographic coordinates are finalized through fieldwork. As shown in Fig. 2, the administrative division of Zhejiang has continued since the eighth year of the Hongwu era (1375) to the present day, including 11 state capitals during the Ming dynasty, of which six state capitals are distributed along the eastern coast from north to south, namely Jiaxing, Hangzhou, Shaoxing, Ningbo, Taizhou, and Wenzhou, with the specific range of data coming from the Historical Atlas of China [28]. Each of these state capitals had different hydrological and geographic characteristics, which were the basis for the location of cities for coastal defense [29].

Fig. 2
figure 2

Scope of Zhejiang state capitals in the Ming Dynasty

The Wei citadels and Suo citadels are the basic structure of the coastal defense system, and there is a big difference in scale between the two, the average perimeter of the Wei citadel is about 3000–5000 m, which is 2.5 times as long as the Suo citadel, and the capacity of the soldiers is about 4865, which is about 4.5 times as long as the Suo citadel [30, 31]. The Wei and Suo citadels are mainly distributed in the important coastal defense nodes, and there is no interference within the state capitals, as shown in Fig. 2.

Frequency of Wokou invasions

The spatial and temporal data of Zhejiang’s Wokou invasions come from the Ming Dynasty Wokou Examination Strategy, which contains a compilation of various types of historical data and record intrusion points and events in chronological order [32]. In this study, the original data were cleaned twice, firstly, the imperfect data were corrected, for example, “Zhapu” was added as “Zhapu Suo” in the original record, and “Pinghu” is added as “Pinghu County”, and so on. Secondly, we removed the invalid spatial data, we removed the records that did not clearly express the spatial location in the historical records, such as “all over the coast, the border of Zhejiang”, as well as some locations that cannot be found clearly today, such as “Changsha Bay, Sanyue Mountain, Shizhen”, and so on. The final data cleaning resulted in a data validity rate of 95.4 per cent, and the frequency statistics of invasions within different Zhoufu in different periods are shown in Fig. 3.

Fig. 3
figure 3

Histogram of frequency of Wokou invasions in Zhejiang during the Ming Dynasty

Wokou invasions in Zhejiang started in the Yuan Dynasty, and Zhejiang experienced more than 260 Wokou invasions during the two hundred years from the beginning of the Ming Dynasty to the Wanli Period (1368–1588). In the Jiajing period (1523–1561), there were more than 200 invasions in less than 40 years.

During the Hongwu period, there were 16 Wokou invasions in Zhejiang, which was a high frequency, and at the same time, the construction of basic citadels for coastal defense was started. In the following time, the frequency of Wokou invasions rose and fell but generally concentrated in Ningbo, Taizhou, and Wenzhou. Until the outbreak of Wokou invasions during the Jiajing period, Jiaxing and Ningbo became the most seriously affected areas, and the Jiajing Wokou invasions finally determined the perfect defense mode of coastal defense. Under this model, there were only 8 Wokou invasions in the nearly 60 years between Longqing and Wanli, achieving a relatively stable situation.

The period between Longqing and Wanli was a period of stability in Ming Dynasty’s naval defense. After experiencing the great disaster of Jiajing, the Ming Dynasty’s sea defense was comprehensively upgraded, and the overall structure, defense mode, organization and weapon assembly of the sea defense were all comprehensively upgraded, resulting in an increase in the strength of the sea defense. During the Wanli period, the sea ban was basically lifted along the southeast coast of China, and overseas trade developed unprecedentedly. This greatly reduced the number of Wokou invasions due to the inability to trade.

In the middle of the Wanli period, Japan's Toyotomi Hideyoshi started the Korean War and wanted to use Korea as a springboard to invade China. On the one hand, the Ming Dynasty strengthened its coastal military forces, such as increasing the number of troops along the coast of Zhejiang Province by 3000–4000 people and increasing more than 700 warships to more than 1000 ships [33]. On the other hand, it sent troops to respond to Korea. In the end, the Ming army, together with the Korean army, crushed Toyotomi Hideyoshi’s plan.

In the late Wanli period, the Ming Dynasty was politically corrupt and internal conflicts within the ruling class intensified. The Liaodong Jurchen tribes grew strong and established the Later Jin regime, and began to attack the Ming Dynasty. At the same time, the Tokugawa Shogunate of Japan gave up its policy of foreign aggression, and the Wokou invasion basically ceased. The military center of the Ming Dynasty gradually shifted to the interior, and the coastal military power gradually declined.

Classification of defense modes

The temporal and spatial data on the evolution of the arming pattern come from the compilation and cross-checking of several sources, such as the Continuation of the Examination of the Coastal Defense Classes of the Two Zhejiang Provinces [34, 35]. From its establishment to its stabilization, the coastal defense system of Zhejiang has gone through six different stages. They were: 12-area defense system (Wei-Suo system), 2-area defense system (1 Zongdu and 2 Jianshi), 4-area defense system (4 Bazong), 6-area defense system (6 Bazong), and finally 4–6-area defense system (4 Canjiang and 6 Bazong) [36].

Analysis tools

Spatial orientation is performed in ArcGIS 10.8, and analytical techniques are used to further validate the spatial and temporal evolution characteristics of the defense modes and the Wokou invasions. The process consists of the following three steps: (1) using kernel density estimation and average nearest neighbor to determine the spatial distribution pattern and pattern during the period of infrastructure construction of coastal defense citadels; (2) using kernel density estimation and standard deviation ellipse to explore the spatio-temporal pattern of Wokou invasions interacting with the evolution of the fortification pattern and to identify the hotspot areas of Wokou invasions by using the Getis-Ord Gi; (3) using the center of the mean to identify and assess the core drivers of defense mode evolution.

Kernel density estimation

Kernel density analysis is mainly used in this paper to analyze the co-temporal characteristics of the spatial distribution of coastal defense cities and Wokou infestation and to compare them over time. The co-temporal analysis can express the focus of the spatial defense in the same period of time, while the comparison over time can express the overall change of the spatial defense in different periods of time. According to the first law of geography, the closer the distance, the more closely related the affairs are, and the closer the location to the core element acquires a higher value of density expansion [37].

Kernel density analysis can better express the density distribution of military forces at different levels than other methods by assigning values to the importance of different cities (the Population field is assigned to the number of defenders in the city).

Average nearest neighbors

This analysis is mainly used in this paper to cluster the subtypes of coastal defense cities, so that the spatial-based layout strategy of different types of cities can be obtained more intuitively, and provide the basis for the spatial analysis of the subsequent guardhouse groups. The nearest neighbor index, R, is the ratio of the average observed distance to the expected average distance. z scores and p-value results are measures of statistical significance [38].

Compared with other clustering methods, the average nearest neighbor is most suitable for comparing different elements in a fixed study area, and the area parameter in the tool will use the outer rectangle of the elements as the study area by default, so that different types of city pools can be clustered according to the space in which they are located, which is the ideal way to judge the clustering of city pools.

Standard deviation ellipse

The tool is mainly used in this study to quantify the spatial characteristics of different defense clusters, as well as to provide quantitative illustrations of changes in the spatial characteristics of the clusters during the evolution of subsequent defense patterns. The distribution trend of defense forces at different stages is judged by the azimuth of the ellipse, with the long axis indicating the direction and degree of maximum diffusion and the short axis indicating the direction of minimum diffusion [37, 39,40,41]. This research uses the above methodology to measure the spatial focus of different defense models from a spatial distribution perspective.

The standard deviation ellipse tool is extremely important for the group characterization of military citadels because: firstly, it can show the directional characteristics of group distribution, which can be used to compare and analyze with the morphology of the coastline; secondly, the size and direction of the ellipse can quantify the spatial characteristics of the group in the evolution of the defense pattern in different periods, and from which we can decipher the spatial law of defense.

Mean centers

This analysis is used to validate the spatial geometric centers of different defense groupings due to changing defense patterns under different historical phases. As in Equation x, by calculating the average x and y coordinates of defense clusters under six different defense modes, it can be used as a key point for the extraction of elements of the evolution of defense modes, to further calculate their influencing factors with geographic probes [39].

The center of average fits the hierarchical military city grouping of one guard and many posts better than other spatial analyses, and is able to recalculate the spatial center after changing the defense pattern, as well as analyze it with reference to the weights of different cities.

Getis-Ord Gi*

This analysis is mainly used in the cold hotspot analysis of the Wokou invasion space in Zhejiang during the period from Hongwu to Wanli, realizing the spatial simulation prediction in a certain regional scope. As shown in the computational equation, a positive GiZScore and p indicate statistical significance, which means that element i and its surroundings are hotspots of infestation, while a negative score indicates a coldspot area [42, 43]. The tool can present the results of the distribution of Wokou invasions in the overall space as a way to compare the effectiveness and significance of changes in defense modes. Since this tool has been used less in this area of research, the formulas are specifically listed as follows:

$$ Gi^{*} = \frac{{\mathop \sum \nolimits_{{j = 1}}^{n} \omega i,jxj - \frac{{\mathop \sum \nolimits_{{j = 1}}^{n} xj}}{n}\mathop \sum \nolimits_{{j = 1}}^{n} \omega i,j}}{{\sqrt {\frac{{\mathop \sum \nolimits_{{j = 1}}^{n} xj^{2} }}{n} - \left( {\frac{{\mathop \sum \nolimits_{{j = 1}}^{n} xj}}{n}} \right)^{2} } \cdot \sqrt {\frac{{\left[ {n\mathop \sum \nolimits_{{j = 1}}^{n} \omega i,j^{2} \cdot \left( {\mathop \sum \nolimits_{{j = 1}}^{n} wi \cdot j} \right)^{2} } \right]}}{{n = 1}}} }} $$

Compared with other spatial analysis tools, Getis-Ord Gi* focuses more on local spatial autocorrelation and is more accurate. Its current application can predict the spatial distribution of crime to a certain extent, which matches very well with the intrusion space of this study [44].

Voronoi diagram

This analytical tool was used to validate the central control point for the 2-defense zone model, demonstrating the scientific rationale for the Changguo Wei site selection. The Voronoi diagram is a spatial partitioning algorithm introduced by the Russian mathematician Georgi Voronoi. It is a continuous polygon consisting of a set of perpendicular bisectors of lines connecting two adjacent points, where the distance from any point in the graph to the control points of the polygon is less than the distance to the control points of other polygons. The generation of Voronoi diagram includes: determining the set of points, constructing the region centered on each point, and generating the boundary, three main steps.

Results

Construction process and distribution pattern of basic citadels

Zhejiang coastal defense base citadels construction is divided into three stages, the first year of Hongwu to nineteen years (1368–1385) built 5, accounting for 12% of the total number of Wei citadels and Suo citadels; Hongwu 19 years to 20 years (1386–1387) built 30, accounting for 73%; Hongwu 21 years to 31 years (1388–1398) build 6, accounting for 14%. So far all the coastal defense of Zhejiang of Wei citadels and Suo citadels basic pattern construction is completed, at this time to implement the defense mode based on the Wei citadels and Suo citadels is known as the “Wei-Suo system”. Under the system, the Wei citadels with the Suo citadels under their jurisdiction formed a complete defense unit, and the defense units were independent of each other, with little interference, and the coast as a whole was divided into 12 defense zones [45].

As shown in Fig. 4, in the first stage of the construction of the basic defenses, three geographic spaces in Hangzhou Bay, Ningbo Peninsula, and Wenzhou were chosen to establish the first defensive citadels. At this time, the Zhejiang coast only use key space defense, that is, the most vulnerable to Wokou infestation of space to focus on defense. The northern Hangzhou Bay Shaoxing Wei is located in Cao’e River estuary, is the Wokou into the throat of Shaoxing inland; the central Changguo Wei and Zhoushan is located in the Zhoushan Peninsula protruding from the coast with a long coastline logging; southern Wenzhou Wei and Pingyang is located in the Feiyun River estuary, but also to prevent the Wokou from this deep inland by boat. In the second stage, the citadels of Wei and Suo were rapidly established on the coast of Zhejiang as a whole, and after merging with the first stage, it covered all the space on the coast of Zhejiang. The third stage was to supplement the weak space, focusing on Ningbo to build five new citadels but also emphasizing the importance of coastal defense of Ningbo Province.

Fig. 4
figure 4

Spatial distribution of the construction of basic citadels for coastal defense during the Hongwu period

To further explore the distribution pattern of the basic citadels of coastal defense, the categorical and holistic nearest-neighbor analysis was conducted on the Wei citadels and the Suo citadels in the 12 defense units. As shown in Table 1, the spatial distribution pattern of the Wei citadels is significantly different from that of the Suo citadels through the determination of the R-value; the Wei citadels present a more discrete state, uniformly distributed within the coastline of Zhejiang, while the spatial distribution of the Suo citadels is more clustered, which is the external spatial embodiment of the Suo citadel's role as an auxiliary function of the Wei citadel. In the nearest neighbor analysis of the citadels as a whole, the clustering characteristics are extremely significant, and the result also proves that the layout of the basic citadels in the system of Wei citadels presents the group clustering characteristics with the Wei citadels as the control centers.

Table 1 Global Moran’s results for the categorization and overall state of the coastal defense citadels in Zhejiang Province

Defense modes and spatial–temporal evolutionary characteristics of Wokou invasions

Directional evolution of defense modes

In the history of coastal defense for more than 200 years, the coastal defense system has continuously evolved its defense mode after the establishment of the basic Wei citadels and Suo citadels and has gone through six stages of changes, finally forming a stable mode of Four Canjiang and Six Bazong. Through the directional analysis of the defense mode from the 12 Wei-Suo system to the Four Canjiang and Six Bazong system, the characteristics of the evolution of the defense space can be clarified.

As shown in Fig. 5, the first stage of the 12 Wei-Suo system is to arrange 12 defense units from north to south by Wei-Suo clusters, and the defense units are laid out according to the characteristics of the coast in the spatial range where they are located, and the directionality of the defense units fits the coast to a very high degree. Among the 12 groups, Haining Suo is a special one, which is located on the north bank of Hangzhou Bay, close to the Qiantang River. Haining Suo independent defense, not with other guards to form a group mode, mainly external by the Haining Wei group to form a barrier, internal rely on the Haining Suo is located in the estuary of the fortress to block the Wokou. However, the 12 defense districts were independent of each other, and there were large defense loopholes between the clusters, leaving hidden dangers. The second stage of the 2-area defense system will be originally divided into 12 relatively independent defense clusters for integration, the overall Ningbo Chang Guo Wei for the boundaries of the two, the northern defense area contains 21 Wei-Suo citadels, the southern defense area contains 20 citadels, the two parts of the force is equivalent to the direction of the distribution of the geographic pattern of Zhejiang in line with the large.

Fig. 5
figure 5

Spatial directional characteristics of different defense modes

The third stage is to split the defense space again in the 2-area defense system and change the direction distribution of the clusters by controlling the number of citadels in the defense clusters. From north to south, it was divided into the Hai-Ning Cluster in the north of Hangzhou Bay; the Ding-Lin-Guan Cluster in the Ningshao area; the Song-Hai-Chang Cluster in Taizhou Province, and the Jin-Pan Cluster in Wenzhou Province. At this time, it can be seen that the defense range of the Ding-Lin-Guan Cluster in the middle of the country and the Song-Hai-Chang Cluster was much larger than that of the Hai-Ning and Jin-Pan Cluster, and the ratio of the defense space was imbalanced. The fourth stage is in the Jiajing period again to adjust the defense area, for the central two defense areas to split, which will be divided into Ding-Ling-Guan Cluster Ding-Hai Cluster, and Lin-Guan Cluster will be divided into Song-Hai-Chang Cluster Song-Hai Cluster and Chang-Guo Cluster. So far the pattern of 6 defense clusters is basically established, in the direction of distribution can be seen in 6 clusters mode and the shoreline fits well, in the relatively independent space of the peninsula using small clusters of defense and in the long straight shoreline is used in large clusters of defense.

The 6-area defense system was the prototype of the Four Canjiang and Six Bazong system, and the Four Canjiang and Six Bazong defense modes were gradually established after the Jiajing adjustment. As shown in Table 2, the standard deviation ellipse under the control of Four Canjiang is larger in circumference and area than its subordinate Bazong defense cluster, except for the defense area of Ning-Shao Canjiang, the remaining three Canjiang defense space and its subordinate Bazong defense space are not much difference in the angle of direction, which is to a certain extent complementary. The northernmost Hangjiahu war zone and the southern end of the Taijinyan and Wenchu war zone were covered by a general guarding the coast, while the Ningshao war zone is under the jurisdiction of three Bazong generals guarding the complex coastline, the formation of four war zones under the overall defense layout of the six coastal defense zones. Ningbo and Shaoxing provinces within the integration of the three defense clusters, so that it can link up with each other but also able to be relatively independent of the special environment for the deployment of the defense. The special environment here refers to the geospatial division of Shaoxing and Ningbo, which are the south coast of Hangzhou Bay, Zhoushan Peninsula and Xiangshan Peninsula from north to south. At the macro-geographic level, the Shaoxing and Ningbo regions show a clear geographic division, and the directional distribution of the three clusters under the six defense zones model is coordinated with the geographic features. The advantage of this layout is to be able to six Bazong on the coastline of Zhejiang to form a high degree of fit blockade and, at the same time 4 big defense zones and increase the depth of the defense.

Table 2 Standard deviation ellipse parameters for the Four Canjiang and Six Bazong defense clusters

Spatial–temporal evolutionary characteristics of Wokou invasions

The temporal evolution corresponds to the evolution of the defense mode, which is divided into five time periods according to the time points of the six different defense modes. As shown in Table 3, the statistics of Wokou invasions in Zhejiang during each period show that the frequency of Wokou invasions fluctuated dramatically. The Hongwu period (the period of the 12 Wei-Suo system), was mainly the stage of the establishment of the basic defense of the coastal defense, and the frequency of the invasions was higher. Subsequently, the system of two defense districts existed for a shorter period, but the frequency of intrusion increased significantly. Then during the Four Bazong period of defense mode, the whole of nearly a century, the number of invasions during this century dropped significantly. In the Six Bazong period, the most serious Wokou invasions came in the Jiajing period, and the frequency of invasions reached a maximum of 16.70 times/year, after which the defense mode and military system were adjusted, and the frequency of invasions was finally reduced to 0.62 times/year, which indirectly explains the significance of the last adjustment of the defense mode.

Table 3 Comparison table of defense modes and Wokou invasions

GIS kernel density analysis was used to further analyze the spatial distribution location and frequency of Wokou invasions under different fortification modes. As shown in Fig. 6, during the period of the 12 Wei-Suo system, the Wokou invasions were located in the central and southern parts of the country, with Ningbo and Wenzhou becoming the focuses of the invasions, and Taizhou being slightly less invasive than the two, and the Hangjiahu area was hardly invaded during this period. This also explains why only Ningbo and Wenzhou’s Wei-Suo citadels were added in the third stage of intensive construction of basic citadels. During the period of the two defense zones, the center of gravity of Wokou invasions changed, with the Hangjiahu area becoming the focus of invasions, the Wenzhou area also occasionally invaded, and the middle coastal area relatively stable.

Fig. 6
figure 6

Kernel density analysis of Wokou invasions in different defense modes

In the period of Four Bazong after the 2-area defense system, the Wokou invasions began to show the trend of multi-point distribution and the depth of the invasions was also gradually extended inward from the coast, of which Hangjiahu and Ningshao were the key invaded spaces in this period. Then during the Jiajing years of the Six Bazong period, Zhejiang ushered in the most serious Wokou invasions, the original defense mode was far from being able to block the whole coast of the high-intensity invasion, so the invasions of the space in depth, the coastal prefectures within the territory of the completely suffered from the invasion of the invasion, the invasion of the space at this time shows the density of the whole coast of the invasion of the density of the comparable. With the adjustment of the defense modes, the final defense mode of Four Canjiang and Six Bazong ended the situation of the big Wokou invasion, and then the final stage of the Wokou invasion contracted, and the gathering space was concentrated in the area of Ningshao and Wenzhou similar to the first stage.

In order to more accurately compare the coastal intrusion space, this paper utilizes Getis-Ord Gi* for hotspot analysis. The analysis first needs to determine the spatial extent, and the study uses the range of defense effectiveness of coastal guard towns, that is, the extent to which Wokou infestations were effectively interdicted. We determined that 97% of the infestation points were within a straight-line distance of 37 km from the coastline by counting all the infestation locations from Hongwu to Wanli (1368–1588), and used the buffer zone tool to define the range of the shoreline infestation space. Finally, the spatial hotspots of Wokou infestation were analyzed using this range as a criterion, and the frequency of infestation was used as a weighting value to obtain the hotspot distribution of Wokou infestation space. It can be seen that the hotspots of Wokou infestation were concentrated in the southern part of Jiaxing Prefecture, Zhoushan Peninsula and Xiangshan Peninsula of Ningbo Prefecture, followed by the southern peninsula of Taizhou Prefecture. While the infestation in Taizhou and Shaoxing Province was mostly distributed along the river network, the infestation in Wenzhou Province was concentrated on the coast.

As shown in Fig. 7, analyzing the spatial density of the frequency of Wokou invasions, it can be seen that the Wokou invasions were distributed along the whole coast, and it can be said that every place along the coast of Zhejiang could become the area of Wokou invasions. However, from the density distribution, it can be seen that the areas with higher frequency were located in the center of the state capitals, although the internal state capitals were also occasionally invaded, they were far less seriously affected than the coastal state capitals. This also verifies the accuracy of the defense space of the Wei citadels and Suo citadels of the coastal defense system.

Fig. 7
figure 7

Holistic Wokou invasion kernel density analysis with cold hotspot analysis

Spatial–temporal comparison of defense mode and Wokou infestation

The density of Wokou invasions under each defense mode is superimposed with the center of the defense clusters. As shown in Fig. 8, there is a clear convergence between the different defense modes and the space of the Wokou invasions in different periods. However, in the 12 Wei-Suo system defense mode, there is almost no Wokou invasion on the north side of the citadel layout, while in the 2-area defense system period after that, it can be seen that the center of the defense becomes north and south, which corresponds to the worst-infested area in this period. The 4-area defense system is also a special adjustment of the invasion space, and the centers of the four defense clusters are closer to the main disaster areas of Wokou invasions so that they can be effectively controlled. In the period of the 6-area defense system, although the Wokou invasion broke out, the adjustment of the defense zone pattern still happened to be chosen in the important space, and the 6 defense centers overlapped with the main disaster areas.

Fig. 8
figure 8

Comparison of defense modes and spatial and temporal evolution of Wokou invasions distribution

The 6-area defense system although at the coast coupled with the center of the disaster, the depth of the disaster line is stronger. Four Canjiang and Six Bazong defense mode just solved this problem, Jiaxing, Taizhou, and Wenzhou within the control center of the Canjiang than Six Bazong defense center moved back slightly, and Ning Shao district by the Canjiang and the coast of the Three Bazong to form a long shoreline and the pattern of large depth of the defense. Finally, by superimposing the density of all Wokou invasions from Hongwu to Wanli in Ming Dynasty with the Four Canjiang and Six Bazong, it can be seen that the center of defense and the center of invasion density overlap very much.

Discussion

Analysis of spatial layout factors of basic citadels

The process of establishing the basic citadels of Zhejiang coastal defense in the Ming Dynasty was clear and regular. From the type of the main body is divided into two major types: Wei and Suo, these two types of citadels in the construction of the initial level of the model have been determined. As the superior military unit of Suo citadel, Wei citadel has the right of administrative control, and the perimeter of Wei citadel is 2.5 times that of Suo citadel, and the strength of Wei citadel is about 4.5 times that of Suo citadel. The initial rules to determine a good, is the overall coastline of Zhejiang, the basic citadels fortification. Its defense period focused on the Hongwu years, mainly divided into three time periods, and the spatial distribution of the three stages shows obvious differences, the first stage is a small-scale focus on defense; the second stage is the whole line of the overall defense; the third stage is a supplement to the original defense system.

Combined with the study of the spatial distribution of Wei citadels and Suo citadels, a close correlation between its defense space and system can be obtained. As the center of defense control, Wei citadels would control the subordinate Suo citadels, forming the Wei citadel defense clusters. In the study of the spatial distribution of the citadels, Wei citadel shows a clear discrete distribution pattern, which is just the opposite of the distribution pattern of Suo citadel, which precisely proves the difference between the two in the spatial layout. This is because the layout of the Wei citadel needs to consider the average defense of the coastline of Zhejiang, so it will show an average cut in space, while the Suo citadels as the subordinate defense units of the Wei citadels and present multiple Suo citadels with a Wei citadel mode, so there will be a clear aggregation of the distribution pattern. The analysis of the overall spatial distribution of the citadel presents a more obvious clustering, which is also confirmed again, in the spatial analysis of the non-typical, Wei and Suo citadels according to the 12 clusters evenly distributed in the long shoreline. Of course, this average distribution pattern is the ideal defense without experiencing real Wokou invasions, and the weakness of this defense is shown in the later stage.

In addition to the hierarchical system, natural factors also influenced military deployment and the spatial pattern of Weisuo citadels. This is reflected first of all in the cluster model, where the division of space between the two defence zones is closely related to the natural environment.

Changguo Wei was chosen as the Zongdu’s control center under the two-defense zone model, and the north and south defense zones have actual geospatial significance. In order to explore the basis for the spatial selection of Changguo Wei, we spatially divide the 10 acropolis control points after removing Changguo Wei by using the Tyson polygon tool, and Haining Suo is not calculated due to the fact that its range is too small. In this case, Changgukwei has five acropolises in the north and south directions, divided with reference to the defenses identified above: 97% of the infestation points were within a straight-line distance of 37 km from the coastline.

As shown in Fig. 9, Changguo Wei is located just at the center of the north–south defense area boundary, which proves that Changguo Wei is located at the center of spatial control in the coastal defense space. We further counted the defense area and shoreline length in the space of north and south defense zones under the 2-defense zone model (Table 4), and obtained that the defense area of the north defense zone accounted for 57% of the defense area and 47% of the shoreline length, while the defense area of the south defense zone accounted for 43% of the defense area and 53% of the shoreline length. The fact that the two occupy almost equal proportions of the defense space justifies the spatial rationalization of Changguo Wei as a control center.

Fig. 9
figure 9

Coastal Acropolis Tyson Polygon Spatial Delineation (Removal of Changguo Wei)

Table 4 2 Statistical table of land area and shoreline length controlled by the defense district model

Secondly, the natural environment influences the location and layout of the citadels of guards. In our macro study, for coastal citadels, the vertical distance between the citadel and the water surface becomes the key influencing factor. As Zhejiang is mainly a flat area and occupies good high ground, increasing the vertical distance between the citadel and the water surface can gain a larger career space while facilitating quick strikes against water surface enemies from a high position. Inland citadels were usually built along major rivers, with the emphasis on defending against wokou invasions by boat [29]. In the Ming Dynasty’s naval defence battles, once the enemy had breached the defensive network at the mouth of the river, they would swim upstream with the help of the wind, so interception at the beginning of the key nodes of the pipe network became the key to defence.

At the micro level, the location and layout of the citadels can only choose local advantageous positions under the group layout mode, and then adjust its own form to adapt to the environment, so as to maximise the defensive capability. Among them, the Wei citadels, due to its higher rank, larger scale, and as the control centre of the group pattern under the acropolis system, had more stringent requirements on the environment. Coastal Wei citadels patterns vary, and this study further classifies them into coastal Wei and estuarine Wei based on environmental characteristics.

(1) Coastal Wei

As shown in Fig. 10, Jinxiangwei, Guanhaiwei and Hainingwei are located near the coast and in a plain landscape. The three are almost quadrangular in shape, with Jinxiangwei and Guanhaiwei being newly built acropolises that were sited in a military defensive posture that echoed the mountainous terrain. Haining Wei, however, was a homogeneous Wei (the same citadels as Haiyan County) set up to protect Haiyan County, and its location on a vast offshore plain made its military defence capability slightly inadequate.

Fig. 10
figure 10

Coastal Wei Site Environment and Morphology: 1. Jinxiang Wei; 2. Guanhai Wei; 3. Hainingwei; 4. Lingshan Wei; 5. Changguo Wei; 6. Songmen Wei

In the form of irregular Wei, Linsan, Changguo, Songmen three Wei in their respective defence range, focusing on the formation of synergistic defence by virtue of the mountain passes. Such as Changguowei is located in the depression between the two mountains, the north and south side of the mountains as a natural barrier, the east side is open to the harbour, its geographical defence is difficult to attack, while the shape of the citadels also fits the environment. Songmenwei has a parallel mountain range as a barrier on its southwest side, two independent mountain packs on the northeast side are located in front of Songmenwei, and the southeast is a natural harbour to provide advantages for the naval garrison. The citadel of Linshanwei was also located at the pass of mountains and rivers, and the citadel also contained independent mountain packs as barriers and guards.

(2) Estuarine Wei

As shown in Fig. 11, Located in Ningbo Yinjiang River estuary Dinghai Wei, Taizhou Lingjiang River estuary Haimen Wei, as well as Wenzhou Oujiang River entrance to the Panshi Wei, are located in the estuary of the projecting side. This kind of environment not only reduces the threat of the river to the citadels during the flood season, but also facilitates the blocking of Wokou invaders along the river. In addition, both Panshi Wei and Haimen Wei chose to strengthen their defence guards with their backs to the mountains. However, Dinghai Wei's location is obviously closer to the sea and the topographical advantage is not obvious, which is due to the fact that it is in the same citadels with Dinghai County, and cannot be located entirely for military defence.

Fig. 11
figure 11

Estuarine Wei Site Environment and Morphology: 1. Dinghai Wei; 2. Panshi Wei; 3. Haimen Wei

Correlation analysis between the evolution of defense model and Wokou infestation

This paper combines the temporal and spatial change characteristics of the arming modes and the Wokou invasions to explore the interaction between them. Taking the time of the defense modes transformation as a clue, the space of the defense modes and the Wokou invasions under this time are analyzed. First, during the period of the 12 Wei-Suo system (1369–1443), the frequency of Wokou invasions was 0.59 times/year, which was at a historically low frequency. This is because there were fewer Wokou invasions in the early years of the Hongwu period, but the number of Wokou invasions increased significantly in the late Hongwu period, which can be seen from the increase in the number of Wei-Suo citadels after the twentieth year of the Hongwu period. At this time, the 12 Wei-Suo system was suitable for defending against small groups of Wokou invasions, but with the increase of Wokou invasions, each defense district under the 12 Wei-Suo system defended itself independently, with poor linkage with each other, and was unable to defend itself effectively against multiple groups of Wokou invasions. Although the 12-defense zone model has a high degree of cut-off for the coastline, it does create more defensive gaps, resulting in less efficient linkage between groups, which has led to subsequent changes in the defense model.

Based on the inability of joint defense, the evenly dispersed deployment of the 12 Wei-Suo system gradually shifted to joint deployment. This pattern began with the 2-area defense system (1433–1445), which divided the whole of Zhejiang Coastal Guards into two major defense zones in the north and south with Chang Guo Wei as the boundary. The 2-area defense system existed for a relatively short period, and due to its large defense area, resulting in poor mobility in wartime, the frequency of Wokou invasions rose to 1.5 times/year during the 2-area defense system. The pattern of fortification continued to escalate after the shift from decentralized to integral fortification.

The next 4-area defense system (1445–1549) was an upgrade of the 2-area defense system, by further dividing the northern and southern zones to enhance the mobility of the zones and to ensure the effectiveness of joint defense in a certain space. This upgrade divided the northern zone into the Haining Defense Zone on the north bank of the Qiantang River estuary and the Ningshao Defense Zone on the south bank, with the Ningshao Defense Zone as a spatial whole on the outlying peninsulas of Zhejiang. The south defense zone is based on the state capital space and is divided into the Taizhou defense zone and the Wenzhou defense zone. After the change of the defense districts, the effect was obvious, and the frequency of Wokou invasions dropped to 0.16 times/year under the 4-area defense system, which was the lowest in history.

However, during the Jiajing period, due to the outbreak of Wokou invasions, a large number of Wokou invaded the coast of Zhejiang, and the 4-area defense system was unable to cope with the frequent invasions in different places at the same time, and this time, the Wokou invasions put forward a higher requirement for the coastal defense, and it was necessary to have a strong defense of the center of each space based on the deployment of the whole. The 6-area defense system (1549–1559) split the original four defense zones, splitting the Ningshao’s Ding Ling Guan defense zone into Ling Guan and Ding Hai two defense zones, and then splitting the Taizhou's Song Hai Chang defense zone into Song Hai and Chang defense zones. Refining the original defense districts, increased the effective control of the relatively independent space.

In the war adjustment of the Jiajing Great Wokou invasion, the system of 6-area defense possessed its advantages and was the optimal granularity division of the coastal space of Zhejiang based on spatial characteristics. However, it was still insufficient in the holistic aspect, so in the last adjustment, the Six Bazong were placed in the front line, while Four Canjiang were set up in the rear to lead the Six Bazong and the Ning-Shao Canjiang were set up as the largest defense area, including the three major Bazong: Lingguan, Dinghai, and Changguo. The 4–6 defense zones mode was formed to satisfy the overall joint defense (Ningshao area), and at the same time, it was rationally divided into appropriate defense zones according to the geographic space.

Drivers of the evolution of the defense model

In the exploration of the driving factors for the evolution of the coastal defense deployment modes, the whole Wokou invasions in Zhejiang were first analyzed by Getis-Ord Gi*. The hotspot-coldspot distribution of Wokou invasions in the coast of Zhejiang is obtained, and the hotspot is mainly distributed in Ningshao area along the coast of Zhejiang, which is naturally an advantageous space for Wokou to land due to its convexity into the sea, numerous islands, and extensive estuaries [46]. And this coincides with the last Four Canjiang and Six Bazong’s defense mode. Under the 4–6 defense zone mode, the only one who led the three frontline defense zones was Ning-Shao Canjiang, and the Lin Guan, Ding Hai, and Chang Guo defense zones happened to be the most easily attacked spaces in the whole process of the Wokou invasions.

Analyzing the spatial density of Wokou invasions and the center of defense area under different defense modes, it can be seen that except for the mode of 12 Wei-Suo, the center of defense is evenly distributed and the invasion is concentrated in Shaoxing, Taizhou, and Wenzhou. The rest of the defense modes are compatible with the invasion space, and the Wokou invasions are also concentrated in the north and south under the pattern of the 4-area defense system. The distribution of Wokou invasions under the 4-area defense system was concentrated in the four spaces of Jiaxing, Ningbo, Shaoxing, Taizhou, and Wenzhou. Under the subsequent 6-area defense system, the distribution of Wokou invasions was also decentralized, focusing on the space of Ningbo-Shaoxing. The distribution of Wokou invasions under the 4–6 defense zones system was just located in the center of defense, and finally, when the overall density of Wokou invasions was placed under the 4–6 defense zones system, it could be seen that the center of defense also matched with the center of invasions. This better proves that the adjustment of the naval defense pattern was an adaptive adjustment closely related to the Wokou invasion, and the Wokou invasion became its core driving factor.

We attempted to find key military events during the evolution of the defense model to demonstrate the validity of the evolution. Wokou incursions in the early Ming period were small and less mobile and could usually be resolved within a single guardhouse space, but as the infestation intensified the 12-defence zone model could not meet the demand. For example, in May of the fourth year of Zhengtong (1439), the Wokou landed on the coast of Zhejiang and invaded Taozhu Suo, and in the same month, the Wokou broke through Dasong Suo and moved to invade Changguo Wei. The overall path was to invade the south, then in the north, and finally to turn back and invade the south, across two state capitals and three groups of Weisuo. After this, Jiao Hong, the right minister of the Ministry of Revenue, went to Zhejiang to enhance the defense strength. In order to deal with the roving Wokou, Jiao Hong adjusted the command relationship and increased the number of military officers specialized in defense against the Wokou to improve mobility and consolidate the military power, which was a change from the 12-zone model to the 2-zone model from the spatial level.

The evolution of the 2-zone to 4-zone system was relatively short, and ancient sources only mention that the 2-zone model was too centralized, rather than flexible for organizing defense. As the Wokou invasion continued to intensify, the 4 defense areas continued to be split into 6 defense areas in the 28th year of the Jiajing period, at which time the spatial splits gained better mobility but synergy was again challenged.

In the face of the constant threat of Wokou invasion, the 4–6 defense zone model was finalized in the 36th year of the Jiajing reign. One of the most famous battles was the Taizhou Victory led by Qi Jiguang。In the 40th year of Jiajing, the Wokou invaded Ninghai, Rui'an and Leqing counties along the coast of Zhejiang, and attacked Dasong Suo, Xinhe Suo, Chumeng Suo, Jiantiao Suo Aiwan Suo. The Wokou had more than 50 ships and more than 2000 people, and they tried to attract the strength of the Ming army in Taizhou Wei, Songmen and Haimen Suo, and then invaded Taizhou. Qi Jiguang used multiple citadels to organize a joint defense, divided into four armies. The first army defended Taizhou Wei as the base camp; the second army defended Haimen Wei to center the defense; the third army defended Xinhe Suo; and the fourth army ambushed at sea. The Wokou, on the other hand, presented three routes of attack, one violating the Taozhu Suo; one violating the Xinhe Suo; and one violating the Jiantiao Suo.

Formal war, Qi Jiguang first ordered the Haimen Wei and Taizhou Wei to send troops to support the Xinhe Suo and then personally led the troops to eliminate the Wokou in Ninghai County, and finally wiped out the enemy troops in Taozhu Suo and JianTiao Suo.

Past historical studies have often focused on specific battle processes, emphasizing the bravery of Qi Jiguang's army in combat, but neglecting the positive effects of the adjustment of the military system and the joint defense of citadels. The Taizhou victory also strongly validated the overall improvement of the mobility and synergy capabilities of military defense under the Four Canjiang and Six Bazong model.

Links between the hierarchical structure and organization of the coastal defence system and the defence model

Ming sea defense system from coastal areas to inland areas, the transition is divided into four levels: Wei—Suo—Zhai—Fenghou (beacons). The highest level of Wei were responsible for controlling the most central military points in the region and organizing the overall military defense; The second level is Suo, which generally serves as the support of Wei, and becomes an important part of the guard defense space; Zhai is the third level, more numerous and smaller in scale, as the front line of the coastal defense space, it is the grassroots force; Fenghou (Beacons), as the fourth level, were large in number and were responsible for the function of reconnaissance lookout [47]. The evolution of the defense mode is not completely separated from the hierarchical structure, the hierarchical structure is conducive to the formation of the defense belt from the outside to the inside, in the 4–6 defense zone mode is more optimized for the horizontal structure, the combination of the two is more able to show a strong defense in different spatial scopes.

The organization as a whole was a shift from the Weisuo system to the Zhenshu system. Under the Weisuo system, the superior organization of the coastal cities was Dusi. During the Zhengtong period, additional Tidu were established to prepare for the Wokou, and in 1442 the Tidu were changed to Zongdu. The establishment of Zongdu made it possible for the coastal provinces to have special military officials in charge of preparing for the Wokou, which led to a clearer division of labor and clearer responsibilities, thus strengthening coastal defense. In the 8th year of the Zhengtong era (1449), Jiao Hong proposed a model of two defense districts: each with its own general in charge and a Zongdu in the middle. Afterwards, the Wokou invasion intensified, and with the adjustment of the defense mode, the 4–6 defense zone mode was gradually formed, corresponding to the formation of the organization system of the Zhenshu system.

Throughout the Ming Dynasty sea defense, the hierarchical structure was organized in a vertical space from the sea to the coast, while the mode of defense was a horizontal spatial organization that was constantly changing according to the Wokou invasion. In the evolution of the defence model, the organizational approach developed in parallel. The change from the guardhouse system to the garrison system was also a change from the 12-zone defense pattern to the 4–6-zone defense pattern.

Overall, there were two main factors in the evolution of the defense pattern: the first is the change in the form of Wokou invasion. Before and in the middle of the Ming Dynasty, the scale of Wokou invasion was small, the time was short, and the space required for defense was small, so the 12-area mode of defense could play a certain role even in the absence of synergy. However, in the late Ming Dynasty, the Wokou invasion invaders were entrenched in the near-shore islands, and the number of invasions was large, the time was long, and the territory was wide, and at the same time the spatial scope of defense became larger, so it was necessary to carry out the adjustment of the organization mode and the space of defense. The second is the evolution of the organizational. Under the Weisuo system, each Weisuo group was responsible for its own defense space, lacking joint defense and centralized attack. When the Zhenshu system replaced the Weisuo system, the Zongdu-Zongbing-Canjiang-Bazong could directly lead the troops, each of them leading their own troops to guard different spaces, and at the same time, they would adjust their mobility according to the form of war.

Limitation

In this study, only Wei citadels and Suo citadels were used as data for defense positions, and smaller military positions under the coastal defense system were not used: fortresses, inspectorates, and so on. The reason for this is the lack of spatial information on small military units, as well as the fact that their volume scale is too small to have an impact on the overall military deployment. They can be taken into account in future more in-depth studies to increase the richness and credibility of the study.

Second, in addition to the diligent quantification of the data on fortified citadels and the data on Wokou invasions, many other non-quantifiable social factors have not been included in the study, such as political influences, economic influences, and relations with Japan, among others. These factors need to be studied and evaluated in greater depth before they can be used in conjunction with the direct military elements, and more relevant factors should be used in subsequent studies to make a complete whole.

Conclusion

The Ming Dynasty coastal defense represents the achievements of China’s maritime military heritage and is an important part of the world’s maritime military heritage. However, its research is still insufficient, and the wisdom of history has not been fully explored. Currently, the research on China’s Ming Dynasty coastal defense mainly focuses on the protection, utilization, and development of the citadel heritage, and lacks the value of mining its military defense attributes. To further better protect this systematic heritage, this study takes Zhejiang, China, as an example, to establish a database of basic citadels and Wokou invasions, and conducts digital spatial analysis through GIS planes to explore its spatio-temporal evolution characteristics and driving factors. Despite errors such as limited samples and unquantifiable political and economic environments, this study reveals the evolution of the entire military defense space with the following findings:

  1. 1.

    The construction of coastal defense citadels in the Hongwu period was based on the 12 Wei-Suo system, and its construction was evenly laid out along the coast of Zhejiang with the Wei citadels as the control point. The Suo citadels were built based on the Wei citadel, the citadels as a whole showed very significant clustering characteristics and became the basic layout of the future coastal defense.

  2. 2.

    In the two hundred years from Hongwu to Wanli (1368–1588), the layout of coastal defense was constantly adjusted and improved, and underwent five important changes, from decentralized defense to centralized defense to the final mode of coexistence of decentralized and centralized, and finally formed the layout mode of Four Canjiang and Six Bazong defense.

  3. 3.

    The most important external force for the continuous evolution of the defense modes was the Wokou invasion. The continuous adaptive adjustment in the invasion made the coastal defense gradually mature and formed a solid defense along the coast with the most reasonable defense.

These research results are of great value. On the one hand, they provide a reference for the future identification of the historical value of the Minghai coastal defense allow people to reacquaint themselves with the process of change in this period of history, and provide a more effective reference for heritage preservation. On the other hand, these findings go beyond general knowledge and have valuable military value, demonstrating to the world the wisdom of China’s ancient military heritage.

However, this study is preliminary; the Ming coastal defense spanned the eastern seaboard of China and was an adaptive military mega-system. In the face of continued disruption and neglect of historical value, it is imperative not only to protect the existing sites as much as possible in their current state but also to excavate the historical value on a larger scale and over a longer period. Finally, we hope that this study will provide new ideas for the conservation and excavation of the world's military heritage.