In the design of structure of oil perforating gun, for on the depth of perforating gun blind hole diameter, and the gun body wall thickness design is the key technology, through the introduction of optimization design technology, under the condition of satisfy the use requirement, language APDL of ANSYS software parametric optimal design of several data, the minimum wall thickness can get a gun. And on this basis, the blind hole diameter and depth was studied the influence of the strength of perforating gun. Conclusion shows that with the increase of blind hole depth, blind hole gun gun with blind hole part of the equivalent stress increased significantly, the strength of the blind hole depth of perforating gun has a great influence, and the intensity of blind hole diameter has little effect.