基于深度学习的网页文本验证码识别

 2022-05-11 08:05

论文总字数:35580字

摘 要

本文介绍了验证码的研究现状和深度学习的知识概要,分析了验证码识别的整个流程和技术方案。然后对现在网站普遍使用的验证码方案进行了归类和分析。尝试使用两种方法对验证码进行破解,首先使用谷歌的TensorFlow库构建了简单的卷积神经网络,使用预处理过的验证码图片对模型进行动态训练与保存,在结果测试中达到了约62%的验证码整体识别成功率。然后又使用多任务深度学习的方法,以AlexNet神经网络结构为原型,在此网络的基础上进行改进。训练中使用TFRecord文件保存数据以提高训练效率,利用模型参数的硬共享机制减小模型的训练量并降低过拟合风险。以验证码四个字符的整体损失函数的最小化为目标进行训练,在6000次迭代后保存模型。实验结果对验证码图片整体识别的成功率达到了76%。在两种方案中都对验证码达到了较高的破解成功率,这也意味着现有的验证码方案并不像人们所想象的一般安全。

我们比较了两种方案成功率的差异,分析了差异出现的可能原因以及神经网络中加深层次的作用。之后我们对模型识别错误的验证码图片进行了汇总和分类,分析了识别失败的原因,并依据此对未来的验证码方案设计提出合理的方案和思路,为提高验证码方案的可靠性做出努力。

关键词:验证码识别 深度学习 卷积神经网络 AlexNet

Abstract

This thesis introduces the researches of CAPTCHAs and the knowledge summary of deep learning, and analyzes the whole process and technical solution of CAPTCHA identification. Then we have classified and analyzed the different kinds of CAPTCHAs commonly used on the current website. We attempt to use two methods to crack the CAPTCHAs. First, we use Google's TensorFlow to build a simple convolutional neural network. Use the pre-processed CAPTCHA image to dynamically train and save the model. In the result test, it reached about 62% CAPTCHA overall recognition success rate. Then we use the multi-task deep learning method, the original AlexNet neural network structure is taken as our prototype, and based on this network we make some improvement so as to accomplish the multi-task purpose. In the training, wo use the TFRecord file to save the data and improve the training efficiency. The hard sharing mechanism of the model parameters is used to reduce the training cost of the model and reduce the over-fitting risk. To minimize the four-character overall loss function, the model training takes 6000 iterations and the parameters are saved after them.

The experimental results have a success rate of 76% for recognition of CAPTCHA image. In both scenarios, the crack success rates achieve a pretty high level, which means that the existing CAPTCHA scheme is not as safe as one might think. We compared the differences in the success rates of the two programs, analyzed the possible causes of the differences and the role of deepening layers in neural network. After that, we summarize and classify the CAPTCHA images which make the model mistake, analyze the reasons for the identification failure. Propose reasonable solutions and ideas for the future CAPTCHA scheme design, make efforts to improve the reliability of CAPTCHAs.

KEY WORDS: CAPTCHA recognition, deep, learning, CNN, AlexNet

目 录

摘要 III

Abstract IV

第一章 绪论 1

1.1 研究背景与意义 1

1.2 研究目的 1

1.3 技术路线 2

1.4 论文结构 3

第二章 验证码应用现状 4

2.1 验证码的作用 4

2.2 验证码的主要类型 4

2.2.1 标准文字验证码 4

2.2.2 短信语音验证码 6

2.2.3 知识型验证码 6

2.2.4 点选拼合式验证码 8

2.3 验证码识别相关工作 9

第三章 深度学习与神经网络 12

3.1 深度学习简介 12

3.2 神经网络 12

3.2.1 神经元与神经网络的结构 13

3.2.2 损失函数与神经网络优化策略 15

3.2.3 误差反向传播法 17

3.3 卷积神经网络 17

3.3.1 卷积层 17

3.3.2 池化层 18

3.4 本章小结 18

第四章 动态训练CNN识别字符验证码 19

4.1 数据获取与预处理 19

4.1.1 生成验证码 19

4.1.2 图像灰度处理 19

4.1.3 验证码的标签表示 20

4.2 CNN模型建立与训练 20

4.2.1 建立卷积神经网络模型 20

4.2.2 模型训练与保存 21

4.3 测试结果 22

第五章 多任务深度学习识别文本验证码 24

5.1 多任务深度学习 24

5.2 TFRecord文件 25

5.3 深度学习网络AlexNet改进与训练 26

5.3.1 改进的Alexnet 26

5.3.2 模型训练与保存 28

5.4 测试结果与分析 29

5.4.1 识别结果对比 29

5.4.2 识别错误分析 31

5.4.3 验证码改进意见 33

第六章 总结与展望 35

参考文献 36

致 谢 38

绪论

研究背景与意义

验证码(CAPTCHA)是一种用于区分目标用户是计算机还是真实人类的全自动测试程序。它可以用于防止网站被恶意注册账号、刷帖、违规发言等危害网络空间安全的行为,有效防止程序暴力破解进行不断的登陆尝试而侵入某个账号。它的基本思想是:根据预先制定的规则,由计算机系统自动生成一个用户可以容易解决但是计算机系统却很难或者无法解决的问题。如果此问题被成功解决,则系统认为目标用户为人类用户,允许下一步操作,反之,则禁止后续操作。

剩余内容已隐藏,请支付后下载全文,论文总字数:35580字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;