How to Detect Unauthorized Data Usages in Text-to-image Diffusion Models