Local constraint is closely related to the gauge field, so constrained models are usually effective low energy descriptions and important in condensed matter physics. On the other hand, local restriction hinders the application of numerical algorithms. In addition to the computational difficulties of the constraints, the various topological sectors which cannot be connected through local operators are also one of the key computational difficulties. Taking quantum dimer model as an example in this paper, we construct a global scheme based on sweeping cluster Monte Carlo method, which can sample among different topological sectors. In principle, this method can be generalized to other models.