原理:http://www.javashuo.com/article/p-casrqczo-hu.htmlhtml
简单实现:https://www.cnblogs.com/victorwu/p/7061168.html.net