Evolution of cooperation in spatial public goods game based on heterogenous social preferences and dynamic punishment