In this paper, we consider some dividend problems in the perturbed compound Poisson model under a constant barrier dividend strategy. We approximate the expected present value of dividend payments before ruin and the expected discounted penalty function based on the COS method, and construct some nonparametric estimators by using a random sample on claim number and individual claim sizes. Under a large sample size setting, we perform an error analysis of the estimators. We also provide some simulation results to verify the effectiveness of this estimation method when the sample size is finite.