北京科技大学本科生毕业设计(论文)
- 1 -
摘 要
推荐系统是目前互联网中最常见的一种智能产品形式。由于网络中信息量的快速增
长以及图书出版行业出版量的攀升,人们需要一种办法,来解决信息过载的问题。此
外,用户访问网络是为了获取信息,但并不是所有的访问都有很强的目的性,所以对于
这些没有明确的目的的访问,就需要智能系统把一些用户可能感兴趣的信息推送给用
户。基于这些需求,图书网站的推荐功能就变得非常重要。
本文首先对图书推荐系统的发展历史做了介绍,然后对开发图书推荐系统所需的项
目管理工具(Maven、Git)、数据持久化工具(MyBatis,Spring MVC 框架)和
Bootstrap 前端开发框架进行了简单分析,在此基础上,设计并开发了一套基于 Web 的
图书推荐系统展示平台,主要工作可概括为四个方面。
1) 对图书推荐系统的结构进行了重新设计。主要是在 Spring MVC 框架的基础
上,将系统分为了三层:Web 层、服务与模块层、数据层,并对每层的结构与需要完成
的功能做了定义。
2) 基于 MySQL 数据库管理系统,设计并建立了图书推荐系统所需的数据库,
该数据库的数据共分为三个部分:原始数据、清洗后数据和用户数据。
3) 从便于操作和使用的角度出发,设计了图书推荐系统的页面,主要包括首
页、搜索、展示、登录、注册等页面。
4) 对整个开发过程以及系统组成的三个主要类:控制器类、模块类与视图类进
行了分析。
经过后期的数据库优化与功能测试,系统与同类网站相比,性能良好。
关键词:基于 Web 的图书推荐系统;展示平台;MVC 框架;Web 系统设计
北京科技大学本科生毕业设计(论文)
- 2 -
Display Platform of Web-based Book Recommender System
Abstract
Recommender system is one of the most common intelligent product form in the internet
recently. Since the growth of the information in the network as well as the growth of the amount
of books, people need to solve the problem of information overload. Meanwhile, the users
access to the network to obtain information, but not all have a strong purpose. So the system
must push some information that user might be interested in to who accesses the website
without strong purpose. That is why it is important for website to provide recommendation
information.
First of all, we described the history of book recommender system. Then, made an
introductory of the tool and frameworks used in development: Maven, the project management
tool, Git, the version control system, MyBatis, the SQL Mapping Framework for Java, Spring
MVC framework and Bootstrap, the front-end framework. Finally, designed and developed a
display platform of web-based book recommender system on that. The main work is as follows.
1) Made redesign of the structure of the book recommendation system. Divided the
system into three levels: the web level, the service and model level and the data level based on
the Spring MVC framework. Made the definition of the structure and functions to be done on
each layer.
2) Designed and built the database of the book recommender system based on the
MySQL database management system. Database is divided into three parts: Original data,
washed data and user data.
3) From the perspective of the ease of operation and use, designed the pages of the
book recommender system. Pages have been divided into index, search, display and login and
register parts.
4) Made analyses of the whole process of development and the three main classes:
controller, model and view.
After database optimization and functional testing, system performs good compared with
similar sites.
北京科技大学本科生毕业设计(论文)
- 3 -
Key Words :Web-based Book Recommender System;Display Platform ;MVC
Framework;Web System Design
北京科技大学本科生毕业设计(论文)
- 1 -
目 录
摘 要....................................................................................................................................1
Abstract ......................................................................................................................................2
引 言....................................................................................................................................1
1 文献综述................................................................................................................................2
1.1 课题背景.....................................................................................................................2
1.1.1 图书推荐系统发展背景.................................................................................2
1.1.2 主要技术发展背景 .........................................................................................3
1.2 开展研究的意义 ........................................................................................................4
1.3 论文研究内容 ............................................................................................................4
1.4 论文的组织结构 ........................................................................................................5
2 框架与工具介绍...................................................................................................................6
2.1 Maven 介绍..................................................................................................................6
2.1.1 Maven 概述.......................................................................................................6
2.1.2 Maven 概念.......................................................................................................6
2.2 Git 介绍........................................................................................................................8
2.2.1 Git 概述 .............................................................................................................8
2.2.2 Git 特性 .............................................................................................................9
2.3 MVC 模式与 Spring Framework 框架 ...................................................................11
2.3.1 MVC 模式.......................................................................................................11
2.3.2 Spring MVC 框架...........................................................................................12
2.4 MyBatis 介绍.............................................................................................................15
2.5 Bootstrap 介绍...........................................................................................................16
北京科技大学本科生毕业设计(论文)
- 2 -
2.5.1 Bootstrap 概述 ................................................................................................16
2.5.2 结构和功能....................................................................................................16
2.6 jQuery 介绍................................................................................................................17
2.7 小结...........................................................................................................................18
3 基于 Web 的图书推荐系统展示平台设计 .....................................................................20
3.1 系统总体设计 ..........................................................................................................20
3.1.1 总体功能描述................................................................................................20
3.1.2 系统模块组成................................................................................................20
3.2 模块详细设计 ..........................................................................................................23
3.2.1 数据库设计....................................................................................................23
3.2.2 页面原型设计................................................................................................27
3.3 小结...........................................................................................................................29
4 基于 Web 的图书推荐系统展示平台实现 .....................................................................30
4.1 环境的搭建...............................................................................................................30
4.1.1 数据库的建立与数据的导入.......................................................................30
4.1.2 工程建立........................................................................................................30
4.1.3 版本控制........................................................................................................32
4.1.4 MyBatis 配置..................................................................................................32
4.2 数据的清洗...............................................................................................................34
4.3 系统开发...................................................................................................................36
4.3.1 控制器类........................................................................................................36
4.3.2 模块类............................................................................................................38
4.3.3 视图类............................................................................................................39
4.4 分析及调优...............................................................................................................40
4.5 性能测试...................................................................................................................42