Galaxies are living in complex cosmic ecosystem which is composed of dark matter and baryonic matter. The baryon cycle through hot gaseous halo, circumgalactic medium and inter-stellar medium is important for galaxy formation and evolution while the detail of the cycle is not very clear. In this talk, I will present our empirical model to constrain the baryon cycle process in galaxy formation and compare the constraints with simulation results. I will also present our preliminary model on black hole accretion and QSO evolution in the galaxy.