don98 / spider_project Goto Github PK
View Code? Open in Web Editor NEWMy study code in Python
My study code in Python
将一条URL进行hash算法投射到一个128位的Bitset上面,然后对此方法进行一定优化之后,使用三个hash算法分别算出三个不重叠的值,投影到三个不同的位置,如此可以降低碰撞然后被误判的概率。。
我的问题就是,加入出现了某种状况,比如
URLa投影到1、2、3三个位置,URLb投影到4、5、6三个位置,URLc投影到7、8、9三个位置,问题来了,如果此时第四个URLd进来了,进行hash算法进行转化之后,发现正好URLd算出的三个值分别投影到了1、4、7上面,而在Bitset上面是使用1、0来表示是否存在的状态的,那么在这种情况出现的时候,URLd会被当作已经获取过的URL而被抛弃,可实际上URLd和之前的都不一样,有没有办法可以减少这种误判呢?
当然,上面的值可能比较凑巧,但不可否认有这种情况的出现,在这种情况之下比预想的万分之一的误判率要高上非常的多,这个是算法本身设计的缺陷还是我有什么地方没有考虑周全引起的呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.