In order to solve the problem that the traditional electronic angle sensor cannot be directly installed on the high voltage isolation switch for Angle measurement, a system for high voltage isolating le measurement is proposed. The switch rotation angle is converted to a straight line for measurement, and the rotation angle of the switch is calculated by photoelectric conversion technology. The light source fluctuation of the laser receiver causes the nonlinear output result of the laser receiver, which compensates for the light intensity received by the receiver in both hardware and software respectively. In the hardware aspect, a two-optical path receiving compensation method is proposed for compensation. In terms of software, the compensation method for sparrow search algorithm (SSA) (SSA-BP) is proposed to improve the detection accuracy. The experimental results show that the average absolute error decreased to 0.18 and 0.3 after the dual-path receiving compensation method and SSA-BP compensation.