Retargeting Problem, need some help!

Hello everyone,
I want to solve a problem about a hand and fingers mocap retargeting.
Right now, I have a mocap data which has fingers mocap data.
I want to use this data to drive a custom rig.
Could anyone tells me about the MATH theory behind the retargeting work?
Thank you very much.
Looking forward to your replies.