添加了序号不重复保证，并且优化了速度

Change-Id: I60b0fbc1c7e0618a470391911e67f4c4d3ed5533
Signed-off-by: tungxue <tungxue@gmail.com>