Spectroscopic investigation on the impurity influxes of carbon and silicon in the ASDEX upgrade experiment