A Stochastic Approach to Reconstruct Gamma-Ray-burst Light Curves