CAPTCHA项目是Completely Automated Public Turing Test to Tell Computers and Humans Apart (全自动区分计算机和人类的图灵测试)的简称。CAPTCHA的目的是区分计算机和人类的一种程序算法,是一种区分用户是计算机和人的计算程序,这种程序必须能生成并评价人类能很容易通过但计算机却通不过的测试。

http://baike.baidu.com/view/538168.htm

简单来说,我们在各个网站看到的验证码的算法就是CAPTCHA。

卡内基梅隆大学(Carnegie Mellon University,CMU)设计了一个名叫 reCAPTCHA 的强大系统,让他们的电脑去向人类求助。具体做法是:将OCR软件无法识别的文字扫描图传给世界各大网站,用以替换原来的验证码图片;那些网站的用户在正确识别出这些文字之后,其答案便会被传回CMU。

reCAPTCHA验证码系统在2009年的时候被Google收购,整体界面有点类似于CAPTCHA,但是安全性能更高,通常都是由两个单词组成,一个是机器可以识别的(用来测试你是否是由人来访问的),还有一个是机器不能读取的(用来帮助将书本中的文字数字化)。

http://baike.baidu.com/view/1944705.htm

http://jandan.net/2013/02/17/recaptcha.html

在危地马拉人发明这个验证码程序的时候,是为了防止电脑识别密码盗用,所以用机器难以识别的图片让人识别,精彩的是,谷歌图书馆用它来让人识别机器扫描无法识别的文字,当我们输入验证码的时候,居然是在为谷歌做文字识别工作。

这个验证码的演示地址:http://www.google.com/recaptcha/mailhide/

一些截图:

 

 

它的原理如下:

现在OCR的阅读效率实在是不高,下面这张图就可以说明问题。

它的情景是这样的,有一天,某台机器扫描了一本书,想把它转成电子版:

处理出来是这样子的:

The Hreckinridge’ and Lane Democrats, having taken courage at the recent eastern advises, 

are [xxxxxxxxxx] energetically for the campaign: Several prominent Democrats who at first 

favoredDonoLea, are coming out. for the other aide, apparently under the [xxxxxxxx] of Federal 

[xxxxxxxxx]. An address to the National Democracy of ,1ifornia, urging the party to 

supportHaeeslipslDas, has recently been published, which manifestlybss strengthened that aide of 

the [xxxxxxxxx]: It is signed by 65 Democrats, many of whom occupy respectab e and prominent 

positions in the party, 22 of them are Federal office-holders,[xxxxx] more are recipients of 

Federal patronage, and the others represent a mass of politicians giving the document [xxxx][xxxxxx] 

mTheDcu8las Democrats are also active The Irish and German vote will mostly go with ths# branch of 

the party, but it is[xxxxxxxxx] to [xxxxxxxx] [xxxxx] [xxxx] [xx] the stronger. Thus far 17 IT 

newspapers have declared for DonGres, 13 for Base$- IaaIDGS and 9 remain non-committal, with even 

chances of going either way. Under these circumstances the Republicans entertain not unjustifiable

 hopes that the Democratic divisions may be so equal,- ly balanced as to give the State [xx] 

LIaCOLV.Same very [xxxxxxx] Bell and Everett meetings have been held in different parts of the State,

 bat thus far that party does not exhibit much rank sad ale air en.

这个是原书质量比较差的:

看到这个,电脑就傻眼了,吐出来一堆这种东西:

‘ letz-1- rrk fit: 1′ . on its to Vc ,rt, cann into tlm yc H_ tcr,la, .n. ‘l l; , arc ti:( h of thc 1″,

ats that to ltc rc: ,;. , I; ., l: rel!;n. tani., , ./olio, IJuteilu, . 1!’i./_ ;lr”n. Iiam! Jr.r. 

F’l,nr_.Z.._%i;;, ,, : rt-Irn: am/ tf.rri.:, t?m steamer as a tr nW r. Uu ,tin;t, c ac?1 1″,at firm/ 

a t;nn, accor.liu; to .t rn. ‘Cl.w r. wu ru lm:nui MistinW /y in u;th, -. ink ;:,k as to “what w ax 

1111, :111(I vle:iR a of ;: (,am( into, mnr r-, tm if tlm wo r( uu.i n:’ of t?u : la?:Iv. \ ‘c : ol

 in thc , ucr:atic , , Tlau :; will h:aw tu-li.r \. ’1′Im yap?tts Il ,,n an,/ I, ,rr:l. r, (,t tf,

is r:ity, start witli it, with lu:rtic: ol \ 1- e:l.k.

看得懂吗?反正我是看不懂。reCAPTCHA验证码的出现,就是为了改变这种情况的。下面这张图可以很好的解释它的工作原理:

上面的步骤就是:

1、我们首先扫描了一本有一大堆单词的书

2、我们找出不能被电脑识别的单词,这些单词有可能是不同的字体。当然了,损坏程度也与书籍年代以及扫描质量有关。

3、为了让这些验证码更安全,我们会让它更扭曲并且在上面加入横线。

4、一个验证码是有两个这样的单词组成的。

有了reCAPTCHA验证码的帮助,第二张图片上面的文字就会变得清楚多了(不过还是有一点小错误):

The New-York State yacht Squadron, on its annual cruise to Newport came into the harbor 

yesterday afternoon. The following are the names of the boats that came to anchor here: 

Jessie, gera loliv erelun Annie, Mannering, Julia, Bonita, Magic wut, Rambler, floumblie, 

Henrietta, Sea-Drift and Maria, with the steamer America as a tender. On anchoring each 

boat fired a gun, according to custom. The reports were heard distinctly in the city, 

causing considerable inquiry as to “what was up,” and quite a number of sanguine individuals came 

into our office to inquire if the guns were not annunciatory signals of the successful laying of the

 Atlantic Cable. We invariably replied in the negative. The squadron will leave to-day for Newport. 

The yachts Washington and buub r of this city, start with it, with parties of New Haven people.

有的人可能要问了,既然机器都看不明白那他怎么判断你输对了还是错了呢?

Google是这样解释的:

两个验证码里面有一个是正确的,被人审核过的,而另一个是不正确的,机器读不出来的。当你把那个正确的输对以后我们就会默认另外一个也是对的,这样,你每输入一次验证码,就为人类的知识宝库里增加了一个单词。

下图就是对这个原理过程的一个描述:

了解和申请 reCAPTCHA :www.google.com/recaptcha

 

 

一些开源的验证码相关内容:

http://www.oschina.net/project/tag/248/captcha

reCAPTCHA 简单分析的更多相关文章

  1. 简单分析JavaScript中的面向对象

    初学JavaScript的时候有人会认为JavaScript不是一门面向对象的语言,因为JS是没有类的概念的,但是这并不代表JavaScript没有对象的存在,而且JavaScript也提供了其它的方 ...

  2. CSipSimple 简单分析

    简介 CSipSimple是一款可以在android手机上使用的支持sip的网络电话软件,可以在上面设置使用callda网络电话.连接使用方式最好是使用wifi,或者3g这样上网速度快,打起电话来效果 ...

  3. C#中异常:“The type initializer to throw an exception(类型初始值设定项引发异常)”的简单分析与解决方法

    对于C#中异常:“The type initializer to throw an exception(类型初始值设定项引发异常)”的简单分析,目前本人分析两种情况,如下: 情况一: 借鉴麒麟.NET ...

  4. 透过byte数组简单分析Java序列化、Kryo、ProtoBuf序列化

    序列化在高性能网络编程.分布式系统开发中是举足轻重的之前有用过Java序列化.ProtocolBuffer等,在这篇文章这里中简单分析序列化后的byte数组观察各种序列化的差异与性能,这里主要分析Ja ...

  5. 简单分析Java的HashMap.entrySet()的实现

    关于Java的HashMap.entrySet(),文档是这样描述的:这个方法返回一个Set,这个Set是HashMap的视图,对Map的操作会在Set上反映出来,反过来也是.原文是 Returns ...

  6. Ffmpeg解析media容器过程/ ffmpeg 源代码简单分析 : av_read_frame()

    ffmpeg 源代码简单分析 : av_read_frame() http://blog.csdn.net/leixiaohua1020/article/details/12678577 ffmpeg ...

  7. FFmpeg的HEVC解码器源码简单分析:解析器(Parser)部分

    ===================================================== HEVC源码分析文章列表: [解码 -libavcodec HEVC 解码器] FFmpeg ...

  8. FFmpeg资料来源简单分析:libswscale的sws_getContext()

    ===================================================== FFmpeg库函数的源代码的分析文章: [骨架] FFmpeg源码结构图 - 解码 FFmp ...

  9. wp7之换肤原理简单分析

    wp7之换肤原理简单分析 纠结很久...感觉勉强过得去啦.还望各位大牛指点江山 百度找到这篇参考文章http://www.cnblogs.com/sonyye/archive/2012/03/12/2 ...

随机推荐

  1. React组件-mixin

    一.组件 二.代码 <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset=&q ...

  2. MYSQL 当有两条重复数据时 保留一条

    delete from test  where id in (select id from (select  max(id) as id,count(text) as count from test ...

  3. Spring笔记——使用Spring进行面向切面(AOP)编程

    要进行AOP编程,首先我们要在spring的配置文件中引入aop命名空间: =================== Spring提供了两种切面声明方式,实际工作中我们可以选用其中一种: 1. 基于XM ...

  4. CentOS增加硬盘

    1.查看新硬盘     #fdisk –l      新添加的硬盘的编号为/dev/sdb 2.硬盘分区     1)进入fdisk模式     #/sbin/fdisk /dev/sdb     2 ...

  5. Linux命令-dd

    dd命令用于指定大小的拷贝的文件或指定转换文件. 以下命令作用:将光驱设备拷贝成镜像文件 参数 if 输入的文件名称 参数 of 输出的文件名称 [root@localhost testA]# dd ...

  6. Android AlarmManager类的应用(实现闹钟功能)

    1.AlarmManager,顾名思义,就是“提醒”,是Android中常用的一种系统级别的提示服务,可以实现从指定时间开始,以一个固定的间隔时间执行某项操作,所以常常与广播(Broadcast)连用 ...

  7. 下载的时候如果文件名是中文就变成zip.zip

    struts2 /WEB-INF/web.xml <?xml version="1.0" encoding="UTF-8"?> <web-ap ...

  8. ADODB.Connection 错误 '800a0e7a'。。

    今天帮同学调程序的时候发现的:错误提示如下: ADODB.Connection 错误 '800a0e7a' 未找到提供程序.该程序可能未正确安装. /hua1/manage/inc/conn.asp, ...

  9. php post和get

    作为一个计算机系统,输入输出设备作为非核心设备却是不可或缺的,硬件如此,软件亦是如此.试想一台功能强劲的计算机,如果没有输入输出设备,它与一块只能耗电并且发出嗡嗡噪音的废铁有何不同.应用程序的道理也是 ...

  10. 树形结构部门的 sqlserver 排序

    树形结构部门的 sqlserver 排序 因为要实现部门排序功能,而且要考虑部门的层级,直接用 sql 排序是不行的,所以写个 sql function 来支持. 首先部门表:company CREA ...