The magnetic adsorption module, using a Halbach array, enhances the concentration effect of the magnetic field, ensuring excellent performance in high-load tasks such as building maintenance, bridge inspection, and ship cleaning. This design effectively reduces the weight of the robot, and sensors on the magnetic adsorption module enable real-time monitoring of magnetic force. The magnetic adsorption module. In order to improve the magnetic adsorption efficiency and uniform magnetic field distribution in the limited installation space of wall-climbing robots,a Halbach-based rectangular closed-loop magnetic array adsorption module and parameter optimization method are proposed.