This invention provides a non-contact residual current detection method and related equipment, comprising: deploying a magnetic
sensor array on a target wall to acquire measured values of magnetic induction intensity components and inputting them into a
particle swarm optimization algorithm; establishing a
mathematical model between the magnetic induction intensity components and live wire current, neutral wire current, concealed installation depth, and horizontal offset, and constructing a dataset based on the upper and lower limits of conductor positions and currents in actual working conditions, all of which are input into the
particle swarm optimization algorithm; calculating the calculated value of the magnetic induction intensity component at each
particle position based on the
mathematical model, and the sum of squares of the differences between each calculated value of the magnetic induction intensity component and the measured value of the magnetic induction intensity component; using a constructed penalty function to superimpose the out-of-bounds amount as a penalty term onto the sum of squares of the differences, obtaining the optimal position of the particle swarm after iteration termination as the optimal solution; obtaining the residual current detection result based on the optimal solution; this invention achieves non-contact detection of residual current in concealed wiring without damaging the wall or inserting conductors.