Specific structures that demand to maintain the shape of a local region under external loads, such as the injection surfaces of injection molded machine formwork structures, the outer surfaces of wings and engine blades, require homogeneous local deformation. Therefore, a topology optimization method that minimizes local relative displacement differences with stress constraints for such local area is proposed in this paper. The method presents a novel topology optimization model that employs the sum of squares of the discrepancies between local displacements and their mean values as the objective function. Additionally, it adopts a P-Normal aggregation function to handle global stress constraints effectively. Sensitive equations for the objective and stress constraint functions are derived via concomitant variables. Then, the algorithmic procedure of the proposed method is illustrated and validated with 2D and 3D examples by comparing the results with those of compliance minimization. The results demonstrate that the proposed method has obvious superiority and potential application value in the minimization of local relative displacement differences. Finally, the applicability and practicality of the proposed method in the field of engineering structures is verified by structural optimization of an engineering model in injection molding equipment.