Very simple don't talk to anybody when you are out walking your dog. It's may seem rude, it's just the right thing to do.
Occasionally I see women walking a fifty pound plus dog and say to myself that woman is safe and nobody is going to mess with her. I remember occasionally seeing this middle aged women with her two over-sized dobermans. They probably weighed twice as much as her. Now that's security.