The glass-to-metal seals are widely used in the solar thermal power. When a glass-to-metal seal is cooled in the process of diffusion welding, the residual stresses are generated due to different thermal contraction between the two materials. The residual stresses built up along the interface near the end of the seal can induce welded joints to crack and decrease the fatigue intensity of the welded joints and thus are of technical importance. In order to obtain the residual stresses existed in the diffusion welded joints, the glass-to-metal vacuum diffusion sealing process were simulated by using finite element software ABAQUS. Furthermore, the influences of temperature, time, vacuum, and seal pressure on the strength of the glass-to-metal diffusion welding were analyzed. The optimization of the diffusion welding process parameter based on the simulation of the residual stress and analysis of the micro-structure and the macro-mechanical performance of the diffusion welded seals was carried out. The distribution of residual stress on the surface of the glass-to-metal joint caused by welding is measured by X-ray diffraction method, and compared with the result of the numerical simulation to prove the validation of the finite element model.