The invention relates to a robot welding line deviation compensation method based on arc oscillation welding line tracking, comprising the steps of: 1, detecting a welding current, sampling, filtering collected welding current data; 2, extracting deviation of the filtered current data, fitting a deviation direction, extracting according to an integral differential method, obtaining a compensation dosage and a transverse deviation value of a height deviation direction; 3, storing the transverse deviation value, adjusting the sensitivity; 4, computing a compensation dosage of the deviation by combining with the transverse deviation value and the sensitivity; 5, updating and accumulating deviation compensation dosages along the height direction and the transverse direction; 6, converting a three-dimensional compensation dosage into interpolation points of x axis, y axis and z axis; and 7, sending the compensated interpolation points to a control part of the robot. The invention can not generate jump change aiming at the compensation dosages, can ensure the stability of the system at a certain degree, and has better molding of a welding line subjected to the deviation compensation and tracking error of generally within +/-mm.