Extract code.

Signed-off-by: servant <fengshang@126.com>