The formation mechanism and generation conditions of urban residents' public safety behavior