Under the requirements of refined urban governance strategy, not only the construction of physical space security defense system, but also fully creating residents' sense for daily life security should be emphasized in urban security research, so as to improve the quality of the city and enhance its attractiveness. Firstly, this research fully considers the interaction among residents' activities, natural disasters, social risks and the built environment, and then constructs the urban security sense mechanism model. Secondly, the indicator system of urban security sense is established from three dimensions of personal sense, built environment and behavioral activities. Furthermore, it uses multi-source big data to synthetically measure residents' security sense, taking the main urban area of Nanjing as an example. Finally, this research evaluates the security sense in Nanjing City, explores its spatial distribution pattern, and puts forward the corresponding spatial optimization path. The results show that: the spatial pattern of residents' security sense in Nanjing City is wholly 'higher in the center and lower in the north & south, with obvious group distribution', although there are some differences in the three dimensions. The security sense is higher in the important business districts and their surrounding residential areas developed early, and it is lower in the developing new towns and the industrial supporting residential areas. Many optimization strategies can promote the security level of the low-security sense areas, including function implantation, transportation system design, public service facility layout, environmental feature restoration, community space design, planning policy guidance, organization system design and smart management platform construction.