In order to meet the requirements of smart grid for advanced sensing technology and high-precision current measurement in complex electromagnetic environment, we propose a current measurement method based on TMR sensor array and Newton Cotes numerical quadrature algorithm. By building the simulation model of complex interference magnetic field environment, the accuracy of the integration method under different conditions is verified. The system structure and hardware circuit of the current sensor are designed. The measurement device prototype is made, and the experimental platform is built for performance test. The results show that the proposed scheme has high measurement accuracy and anti-interference ability of external magnetic field, the maximum relative errors are DC 0.31% and power frequency AC 1.00% respectively in the range of 0~16A current measurement without magnetic focusing ring, and the high accuracy can be maintained when the current wire position and sensor posture change.