What you might look at would be something that analyzed the traffic coming in, if you get 20 hits in a matter of seconds - perhaps temporarily block that particular IP address for a minute. I have no idea where you'd start with something like that. A bot will (likely) be doing something systematic and (reasonably) predicatble. It might help to try to limit (but not ban) that activity so you don't penalize legitimate usage.