Disclosed are an aryl glycoside compound as represented by formula I or formular I', a pharmaceutically acceptable salt thereof, optical isomer thereof or a prodrug thereof. The present invention relates to a method of preparing said aryl glycoside compound and the use thereof. The aryl glycoside compound of the present invention has an excellent ability on inhibit SGLT activity, especially SGLT2 activity, and is diabetes-fighting medicine with great potential.