“…Therefore, we take the vulnerability of a country as a comprehensive reflection of a country's situation. This paper uses 12 indicators of security equipment (talents in all fields, people's satisfaction, economic recession, unbalanced economic development, unreasonable development, national legitimacy, public services, human rights and the rule of law, population pressure, the refugee scale, and external intervention) to measure the four areas of national vulnerability [6] . Through K-means cluster analysis of the total national vulnerability value and ranking of 180 countries in 2021, according to the data we have processed, we will use 12 indicators in four fields as the dependent variables, and use the Regress function to establish a multivariate linear fitting to determine the vulnerability of a country and analyze the impact on the residential environment [8] .…”