Merge pull request #657 from youyong205/master

fix many bug
revert batch handle code
fix possible bug
compute the hitrate
merge code