multiple thing you can learn, how did they know where you were? because you discovered the roid and it went to the discovered tab. Dont take an expensive ship if you cant afford to lose it. You can use a programming board and connect a radar to it so you can see when someone is approaching.
When you want to mine solo in pvp you need to be sneaky and fast, only go to already discovered ones, the rarer the grater the danger. I would advice to look for what you could do better next time instead of complaining on the forum. Or maybe ask others how they do it. I know of a lot of people who mine pvp roids solo and never got found