How should I do if I want to add a power for a delegator?

I want to add a power for every delegator, and the power decrease in every block.If the power is zero, then the delegator no longer get new rewards until the power is full(such as 100 is full) by some ways.What should I do, it seems a little complex.I have some thoughts about this.
Firstly, validator save the minimum power in validator struct; Secondly, I judge every validator minimum and unbond this power corresponding to the delegator to some special account for each end block. When this delegator power is full, I delegate the special account orresponding to the delegator amount to this validator. But I think it maybe consume a lot of performance, is there any good idea for this ?