The invention relates to a method for inversion of non-uniform mechanical parameters of rock based on DSCM-FEMU. Based on the digital speckle correlation method, the deformation of the specimen during the rock loading experiment was observed, and the strain field was calculated; based on the finite element model correction method, the numerical calculation model of the experimental loading was established in ABAQUS, and the initial elastic parameters of each element were given, using Python The program assigns the elastic parameters of each element based on the Weibull distribution, performs finite element calculation, and automatically outputs the stress field of the numerical model through the Python program; based on the finite element theory, the inversion objective function of the non-uniform mechanical parameters of the rock is deduced, representing the strain field measured by the experiment. Using the optimization algorithm to minimize the objective function and output the most matching elastic parameters of each element, if the objective function does not meet the iterative convergence conditions, the elastic parameters of each element are automatically modified through the Python program, and the new elements are substituted. In one round of finite element calculation, until the objective function converges, the elastic parameters of each element are output.