The flip-chip bonding technique utilized in ultra-large array infrared detectors has a substantial impact on connectivity rates. The electrical connectivity of the flip-chip bonding process exhibits randomness due to the difficulties in the surface control of large-scale devices. This restriction hinders the development of ultra-large array devices. In this work, the surface shape matching calculation is performed based on the surface shape distributions measured from infrared detector chips and readout circuits. The multi combinations and multi rotation angles are employed to calculate the distribution of combined surface distances, and the combined PV (peak-to-valley) value is applied to describe the severity of surface mismatch. Test devices with combined PV values ranging from 7.460 µm to 4.265 µm are prepared and tested, and the connectivity rate achieves an improvement from 74.57% to 99.75% between mismatched devices and matching devices. The electrical test results of test devices indicate that disconnections tend to cluster in areas where surface distance is over 5 µm, which is determined by extracting and analyzing the surface distance correlated to electrical test results. A standard based on the combined PV value is established to select matching combinations and ensure a high connectivity rate of 99% or 97% for infrared detectors, while the connectivity rates of randomly selected devices are no higher than 91%. This work presents a systematic method to predict and improve the connectivity rate of flip-chip bonding process for ultra-large array infrared detector.