The vacuum discharge along the dielectric surface, also called surface flashover, brings significant damages to the vacuum-solid insulation system. Here the authors implement shape-flexible, complex surface groove microstructures on the dielectric to mitigate the initiation of vacuum flashover. A particle-in-cell simulation is employed to reveal the real-time discharge development considering the blockage of the multipactor propagation as well as the space field distortion in the presence of specific surface microstructures. Electron trajectories within barriers are theoretically analysed to present how the barrier shape affects the discharge process, showing consistent results with the simulation. By analysing three parameters, namely the anode current, the surface average charge density and the flashover threshold, it is found that the effect of suppressing surface flashover remarkably augments when the groove number and depth rise up, while such effect gradually saturates when the groove depth reaches a critical value. Theoretical analyses are also provided for the decay factor as well as the optimal shape and trapezoid grooves are proved as the optimal shape distribution of microstructures. Furthermore, different secondary emission yield (SEY) distributions are considered with two kinds of structures, including the material with low-SEY inside and on the top surface of grooves.