优化邻近地址的判断逻辑