We report the test results of several independent foreground cleaning pipelines used in the Ali CMB Polarization Telescope experiment (AliCPT-1), a high-altitude cosmic microwave background (CMB) imager in the Northern Hemisphere with thousands of detectors dedicated to the search for a primordial CMB polarization B-mode signature. Based on simulated data from four detector modules and a single season of observation, which we refer to as Data Challenge 1 (DC1), we employ different and independent pipelines to examine the robustness and effectiveness of estimates on foreground parameters and primordial B-mode detection. The foreground cleaning strategies used in the pipelines include the parametric method of template fitting (TF) and the nonparametric methods of constrained internal linear combination (cILC), analytical blind separation (ABS), and generalized least squares (GLS). We examine the impact of possible foreground residuals on the estimate of the CMB tensor-to-scalar ratio (r) for each pipeline by changing the contamination components in the simulated maps and varying the foreground models and sky patches for various tests. According to the DC1 data with the simulation input value r true = 0.023, the foreground residual contamination levels in the TF/ABS/cILC/GLS pipelines are well within the corresponding statistical errors at the 2σ level. Furthermore, by utilizing the tension estimator, which helps identify significant residual foreground contamination in the detection of the primordial B-mode signal by quantifying the discrepancy between various r measurements, we conclude that the presence of small foreground residuals does not lead to any significant inconsistency in the estimation of r.