YouTube网址算法? [英] YouTube URL algorithm?

查看:137
本文介绍了YouTube网址算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你会如何去产生独特的视频URL的YouTube使用?

How would you go about generating the unique video URL's that YouTube uses?

例如:

  • <一个href="http://www.youtube.com/watch?v=CvUN8qg9lsk">http://www.youtube.com/watch?v=CvUN8qg9lsk

推荐答案

使用一些不平凡的哈希函数。冲突的概率非常低,根据功能,所述参数和所述输入域。请记住,密码散列是专门设计成具有非常低的碰撞率,非随机输入(即完全不同的哈希两个亲密的,但是,不平等输入)。

Using some non-trivial hashing function. The probability of collision is very low, depending on the function, the parameters and the input domain. Keep in mind that cryptographic hashes were specifically designed to have very low collision rates for non-random input (i.e. completely different hashes for two close-but-unequal inputs).

本帖由杰夫·阿特伍德是一个很好的概述的话题。

This post by Jeff Attwood is a nice overview of the topic.

在这里和一个在线散列运算,你可以玩。

And here is an online hash calculator you can play with.

这篇关于YouTube网址算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆