We have studied the near-field measurement of periodic non-flat surfaces and compared the error between the near-field and far-field measurements. Using known boundary conditions and recorded scattering data, we derived a group of matrix functions that can be converted into an external problem, and then used the self-adaptive dynamic differential evolution (SADDE) method to recover the shape, periodic length, and dielectric constant of surfaces. We compared the search speed and stability of the surface reconstruction. The SADDE converges to the global extreme regardless of the initial guess. In a numerical simulation, even if the initial estimate was much larger than the true value, we could still find an accurate numerical solution and successfully reconstruct the surface shape function, period length, and relative dielectric constant. The simulation results show that the error in the near-field measurement is smaller than that in the far-field measurement.