Significant adjustments to the algorithms structure.add lib delete many
repeated codes.

Signed-off-by: zhuyouze <563541918@qq.com>