基于Python+Bootstrap+Django的移动套餐SQL智能检测系统

摘 要
为了满足不同的用户群体的需求,中国移动的套餐业务更新频繁,每个月都会推出很多个性化的套餐服务,当前,中国移动创建套餐的方式是手动编辑上百行SQL语句之后插入到数据库中,一旦SQL语句中出现错误,将会导致重大损失,而人工检测SQL语句十分依赖经验丰富的员工,且很难发现SQL语句中的所有错误,本文针对该问题提出了一种基于数据挖掘的自动化检测SQL语句的解决方案。
本文通过协同过滤算法和关联规则挖掘算法分析历史套餐的SQL语句,对创建新套餐的SQL语句是否存在错误进行预测。其中利用协同过滤算法分析套餐与创建该套餐的SQL语句中涉及到的数据库表之间的关系,对可能遗漏或者多余的数据库表进行预警。为了能够检测数据库表内具体数值是否出错,本文利用关联规则挖掘算法对SQL语句进行关联分析,得到相应的频繁项集和置信度关系,并根据获得的频繁项集和置信度关系对新创建套餐的SQL语句中该数据库表的关键属性是否有错进行检测。
本文介绍了SQL测试系统的开发过程。本系统使用Python开发,通过web应用的形式实现,前端使用Bootstrap,后端使用Django进行开发。
关键词:关联规则挖掘算法;协同过滤算法;SQL检测;系统实现
ABSTRACT
In order to meet the needs of different user groups, China Mobile’s package business is updated frequently, and a lot of personalized package services are launched every month. At present, China Mobile creates a package by editing hundreds of lines of SQL statements and inserting them into the database manually. Once an error occurs in the SQL statement, it will lead to great losses. However, manual detection of SQL statements is dependent on experienced employees heavily, and it is difficult for them to find all the errors in SQL statements. in order to solve this problem, this paper proposes an automatic solution of SQL statement detection based on data mining.
This paper mainly analyzes the SQL statements of historical packages, through Collaborative Filtering Algorithm and Association Rules Mining Algorithm to predict whether there are errors in the SQL statements of creating new packages. The Collaborative Filtering Algorithm is used to analyze the relationship between the package and the database tables involved in the SQL statement while creating the package, and to warn the database tables that may be omitted or redundant. In order to detect whether the specific values in the database tables are wrong or not, the Association Rules Mining Algorithm is used for further detection in this paper, and the frequent itemset and confidence rules of the database table can be obtained, with which you can further detect the values of the key properties of the database table in the SQL statement for the newly created package.
This paper introduces the development process of SQL automatic test system. The system is developed by Python and realized in the form of web application. The front end is developed by Bootstrap, and the back end is developed by Django.
Key Words: Association Rule Mining Algorithms; Collaborative Filtering Algorithm; SQL detection;system implementation
目 录
1 概述 1
1.1 论文选题研究的背景及意义 1
1.2 国内外现状分析 2
1.3 本章小节及论文结构 3
2 相关技术简介及可行性分析 4
2.1相关技术简介 4
2.1.1 Django 4
2.1.2 MVC架构 4
2.1.3 Nginx 5
2.1.4 uWSGI 6
2.1.5 MySQL 6
2.1.6 协同过滤算法 6
2.1.7 关联规则挖掘算法 8
2.1.7.1相关概念介绍 8
2.1.7.2算法基本步骤 9
2.2 可行性分析 10
2.2.1技术可行性分析 10
2.2.2 经济可行性分析 10
2.2.3 操作可行性分析 11
2.2.4 其他分析 11
2.3 本章小结 11
3 系统分析 12
3.1 系统需求分析 12
3.1.1 系统功能需求分析 12
3.1.2 系统非功能需求分析 12
3.2系统用例分析 13
3.2.1 系统总体用例分析 13
3.2.2 功能模块用例分析 13
3.2.2.1 用户管理模块 13
3.2.2.2 文件管理模块 14
3.2.2.3 任务管理模块 18
3.2.2.4 测试报告管理模块 21
3.3 系统活动图 22
3.3.1 用户管理模块活动图 22
3.3.1.1 登录功能活动图 22
3.3.1.2 注册功能活动图 22
3.3.1.3 激活用户功能活动图 22
3.3.2 文件管理功能模块活动图 22
3.3.2.1 上传文件功能活动图 22
3.3.3 任务管理功能模块活动图 25
3.3.3.1 启动任务功能活动图 25
3.3.4 测试报告管理功能模块活动图 25
3.3.4.1 查看测试报告功能活动图 25
3.4 本章小结 26
4 系统设计 27
4.1 系统体系结构设计 27
4.2 系统功能模块设计 28
4.2.1 用户管理模块 28
4.2.2 文件管理模块 28
4.2.3 任务管理模块 29
4.2.4 测试报告管理模块 29
4.3 数据库设计 30
4.4 本章小结 31
5 系统实现 32
5.1 搭建系统框架 32
5.1.1 Django项目创建 32
5.1.2 uWSGI环境配置 34
5.1.3 Nginx环境配置 34
5.2 用户信息认证功能实现 34
5.3 文件处理功能实现 35
5.4 SQL文件检测功能实现 38
5.4.1 利用协同过滤算法检测数据库表错误 38
5.4.2 利用关联规则挖掘算法检测关键属性错误 42
5.5 本章小结 46
6 系统测试 47
6.1 测试用例 47
6.1.1 用户登录功能测试用例设计 47
6.1.2 用户登出功能测试用例设计 47
6.1.3 用户注册功能测试用例设计 48
6.1.4 管理员冻结普通用户功能测试用例设计 48
6.1.5 管理员激活普通用户功能测试用例设计 48
6.1.6 上传文件功能测试用例设计 48
6.1.7 读取文件功能测试用例设计 48
6.1.8 启动任务功能测试用例设计 48
6.1.9 查看测试报告功能测试用例设计 50
6.2本章小结 50
7 总结与展望 51
参考文献 52
致谢 54
(协同过滤和关联规则挖掘算法实现) 文档+初稿+知网查重报告+项目源码及数据库文件
本文转载自:http://www.biyezuopin.vip/onews.asp?id=16139
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/newlw/article/details/125119128
今日推荐