If you have a little money, file 1-2 key patents on your core ideas.
If you're rolling in money, hire a patent firm to chart the landscape for you in a way that doesn't expose you to willful infringement.
Note: the entire system is a steaming morass; I try to be pragmatic about it, but don't disagree with those who want to flip the table and ignore the whole mess.