Profiles of Cosmic Filaments Since z = 4.0 in Cosmological Hydrodynamical Simulation