目 录
1 绪论 7
1.1 选题背景及意义 7
1.1.1 选题背景 7
1.1.2 选题意义 7
1.2 国内外研究现状 8
1.2.1 国内研究现状 8
1.2.2 国外研究现状 9
1.2.3 研究现状评述 10
1.3 研究主要内容 11
2 基本理论与关键技术 12
2.1 知识图谱概述 12
2.1.1 知识图谱的基本概念与构建 12
2.1.2 知识图谱的构建方法 12
2.1.3 知识图谱的应用与优势 12
2.2. 个性化推荐技术 12
2.2.1 个性化推荐的基本原理 12
2.2.2 推荐的算法与技术 13
2.2.3 创新点与技术难点 13
2.3. 开发工具及数据库技术 13
2.3.1 开发语言与框架 13
2.3.2 数据库技术 13
2.3.3 深度学习与自然语言处理技术 13
3 知识图谱构建及个性化推荐研究 15
3.1 Java面向对象课程知识图谱的构建 错误!未定义书签。
3.1.1 设计目标 错误!未定义书签。
3.1.2 设计原则 错误!未定义书签。
3.1.3 设计方法 错误!未定义书签。
3.1.4 设计实例 错误!未定义书签。
3.2 基于课程知识图谱的个性化资源推荐的方法与实现 18
3.2.1 引言 18
3.2.2 系统架构与设计 18
3.2.3 知识图谱构建与表示 18
3.2.4 用户行为分析与画像构建 19
3.2.5 推荐算法实现与优化 19
3.2.6 实验评估与结果分析 19
4 基于知识图谱的个性化推荐系统的分析与设计 20
4.1 总体需求分析 20
4.2 功能需求分析 20
4.2.1学生数据采集模块功能需求分析 20
4.2.2课程资源管理模块功能需求分析 21
4.2.3个性化课程资源推荐模块功能需求分析 22
4.3 基于课程知识图谱的非功能需求分析 22
4.4 基于课程知识图谱的系统可行性分析 23
4.5 系统功能设计 24
4.5.1 用户模块设计 24
4.5.2 用户行为采集模块设计 25
4.5.3 个性化推荐模块设计 26
4.5.4 后台管理模块设计 28
4.6 数据库设计 29
4.6.1 数据库概念设计 29
4.6.2 数据表设计 30
5 基于知识图谱的个性化推荐系统的实现与测试 34
5.1 系统开发环境 34
5.2 用户模块实现 34
5.2.1 注册 34
5.2.2 登录 36
5.2.3 查看/修改个人信息 38
5.2.4 修改密码 40
5.3 用户学习路径采集模块实现 41
5.3.1 数据预处理 41
5.3.2 相似度计算 44
5.4 个性化学习路径推荐模块实现 45
5.5 后台管理模块实现 46
5.5.1 登录 46
5.5.2 管理个人/用户信息 48
5.5.3 学习课程管理 49
5.5.4 用户学习类型管理 49
5.5.5 学习课程推荐管理 49
5.6系统测试 50
5.6.1 系统测试环境 50
5.6.2 用户模块测试 50
5.6.3 用户行为采集模块测试 51
5.6.4 个性化推荐模块测试 52
5.6.5 后台管理模块测试 54
6 总结与展望 56
6.1 总结 56
6.2 展望 56
参考文献 58
致 谢 59
本项目在充分借鉴国内外研究成果的基础上,结合实际需求和技术发展趋势,提出了融合多源异构数据、基于深度学习的知识图谱嵌入与推理、实时动态更新与个性化推荐算法以及隐私保护与用户数据安全性等创新点。这些创新点将有助于进一步提升基于知识图谱的个性化推荐系统的性能和应用效果,为用户提供更加智能化、个性化的服务体验。
1.3 研究主要内容
在教育信息化的大背景下,本研究致力于开发一个基于课程知识图谱的个性化资源推荐系统,旨在满足不同用户的多样化学习需求,并为他们提供一个能够自我评估、发现并弥补知识缺口的平台,从而提升其学习效率和能力。本系统主要涵盖以下四个核心模块:
首先,用户模块:针对个体用户,首次登录时需完成注册流程,确保用户身份的唯一性。注册成功后,用户可在一定时间内完善和修改个人信息,以便系统更精准地理解其需求。这一模块为用户提供了个性化的空间,便于他们管理自己的学习旅程。
其次,用户行为采集模块:此模块允许用户对已浏览的学习资源进行评分、评价以及收藏或取消收藏等操作。这些行为数据将被系统收集并分析,用于构建用户画像,进而优化个性化推荐算法。通过这一模块,用户不仅能够积极参与资源管理,还能为其他用户提供有价值的参考信息。
再者,个性化推荐模块:在用户登录并进入主页后,系统将根据用户的兴趣、历史行为及学习需求,智能推送个性化的学习资源。这一模块的核心在于利用课程知识图谱实现精准匹配,确保每位用户都能获得最适合自己的学习资料,从而提升学习效率和体验。
最后,后台管理模块:该模块赋予平台管理员全面管理用户信息和学习资源的权限。管理员可以监控用户行为、审核资源内容、调整推荐策略等,确保平台的稳定运行和资源的优质供给。这一模块是系统维护和管理的重要保障。
本篇论文将围绕基于课程知识图谱的个性化资源推荐系统展开深入研究,以全网公开的学习资源为基础数据库,从系统构建的关键技术、可行性分析、功能性能与非功能性能设计、系统实现与测试等多个方面进行全面探讨。
<template>
<div>
<div class="container" :style='{"minHeight":"100vh","width":"100%","alignItems":"flex-start","background":"url(http://codegen.caihongy.cn/20230207/860aeea5c04f45119e98c796e63dee11.jpg) no-repeat right bottom / 100% auto,#fff","justifyContent":"flex-end","display":"flex"}'>
<el-form ref="loginForm" :model="loginForm" :style='{"border":"8px outset #bcdbdf","padding":"20px","boxShadow":"0 0px 0px rgba(64, 158, 255, .8)","margin":"5% 7% 0 0","borderRadius":"0","flexWrap":"wrap","background":"rgba(255,255,255,.9)","display":"flex","width":"800px","position":"relative","justifyContent":"center","height":"auto"}' :rules="rules">
<div v-if="false" :style='{"margin":"0 0 10px 0","color":"rgba(64, 158, 255, 1)","textAlign":"center","width":"100%","lineHeight":"44px","fontSize":"20px","textShadow":"4px 4px 2px rgba(64, 158, 255, .5)"}'>USER / LOGIN</div>
<div v-if="true" :style='{"margin":"4px 0 40px","color":"#333","textAlign":"center","background":"url(http://codegen.caihongy.cn/20230204/13e68e581e9e42b7a53fd23ab9faef74.png) no-repeat left top /100% 100%,#d7eef2","width":"100%","lineHeight":"44px","fontSize":"16px","textShadow":"0px 0px 0px rgba(64, 158, 255, .5)"}'>基于课程知识图谱的个性化资源推荐系统 登录</div>
<el-form-item v-if="loginType==1" class="list-item" :style='{"width":"80%","margin":"0 0 20px","flexWrap":"wrap","display":"flex"}' prop="username">
<div v-if="false" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>账号:</div>
<input :style='{"border":"1px solid #eee","padding":"0 10px","boxShadow":"0 0 0px rgba(64, 158, 255, .5)","outline":"0px solid #efefef","color":"#333","width":"100%","fontSize":"14px","height":"40px"}' v-model="loginForm.username" placeholder="请输入账户">
</el-form-item>
<el-form-item v-if="loginType==1" class="list-item" :style='{"width":"80%","margin":"0 0 20px","flexWrap":"wrap","display":"flex"}' prop="password">
<div v-if="false" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>密码:</div>
<input :style='{"border":"1px solid #eee","padding":"0 10px","boxShadow":"0 0 0px rgba(64, 158, 255, .5)","outline":"0px solid #efefef","color":"#333","width":"100%","fontSize":"14px","height":"40px"}' v-model="loginForm.password" placeholder="请输入密码" type="password">
</el-form-item>
<el-form-item v-if="roles.length>1" class="list-type" :style='{"width":"80%","margin":"20px auto"}' prop="role">
<el-radio v-model="loginForm.tableName" :label="item.tableName" v-for="(item, index) in roles" :key="index" @change.native="getCurrentRow(item)">{{item.roleName}}</el-radio>
</el-form-item>
<el-form-item :style='{"width":"40%","margin":"120px auto 20px","position":"relative"}'>
<el-button v-if="loginType==1" :style='{"border":"0","cursor":"pointer","padding":"0 20px","margin":"0 auto","color":"#333","textAlign":"center","letterSpacing":"4px","outline":"none","borderRadius":"0","background":"url(http://codegen.caihongy.cn/20230204/dee7aa1825b6499695c40e2e5a76dd9c.png) repeat-x center bottom,linear-gradient(0deg, rgba(182,215,222,1) 0%, rgba(233,248,251,1) 80%, rgba(207,237,244,1) 100%),#b6d7de","width":"auto","fontSize":"24px","lineHeight":"40px","height":"120px"}' @click="submitForm('loginForm')">登录</el-button>
<el-button v-if="loginType==1" :style='{"border":"0","cursor":"pointer","padding":"0 30px","margin":"0","outline":"none","color":"#333","borderRadius":"4px","background":"none","width":"20px","fontSize":"18px","lineHeight":"1.5","height":"auto"}' @click="resetForm('loginForm')">重置</el-button>
</el-form-item>
<div :style='{"width":"80%","margin":"20px auto","position":"absolute","bottom":"200px","justifyContent":"center","display":"flex"}'>
<router-link :style='{"cursor":"pointer","margin":"0 10px 10px 0","color":"#333","textAlign":"center","background":"none","fontSize":"16px","textDecoration":"none","minWidth":"100px"}' :to="{path: '/register', query: {role: item.tableName,pageFlag:'register'}}" v-if="item.hasFrontRegister=='是'" v-for="(item, index) in roles" :key="index">注册{{item.roleName.replace('注册','')}}</router-link>
</div>
</el-form>
</div>
</div>
</template>
<script>
export default {
//数据集合
data() {
return {
baseUrl: this.$config.baseUrl,
loginType: 1,
roleMenus: [{"backMenu":[{"child":[{"appFrontIcon":"cuIcon-phone","buttons":["新增","查看","修改","删除","性别占比","年龄占比","首页总数","首页统计"],"menu":"用户","menuJump":"列表","tableName":"yonghu"}],"menu":"用户管理"},{"child":[{"appFrontIcon":"cuIcon-shop","buttons":["新增","查看","修改","删除","报表","首页总数","首页统计"],"menu":"学习视频","menuJump":"列表","tableName":"xuexishipin"}],"menu":"学习视频管理"},{"child":[{"appFrontIcon":"cuIcon-circle","buttons":["新增","查看","修改","删除"],"menu":"学习类型","menuJump":"列表","tableName":"xuexileixing"}],"menu":"学习类型管理"},{"child":[{"appFrontIcon":"cuIcon-vipcard","buttons":["查看","修改","删除"],"menu":"轮播图管理","tableName":"config"},{"appFrontIcon":"cuIcon-news","buttons":["新增","查看","修改","删除"],"menu":"新闻资讯","tableName":"news"}],"menu":"系统管理"}],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-paint","buttons":["查看"],"menu":"学习视频列表","menuJump":"列表","tableName":"xuexishipin"}],"menu":"学习视频模块"}],"hasBackLogin":"是","hasBackRegister":"否","hasFrontLogin":"否","hasFrontRegister":"否","roleName":"管理员","tableName":"users"},{"backMenu":[],"frontMenu":[{"child":[{"appFrontIcon":"cuIcon-paint","buttons":["查看"],"menu":"学习视频列表","menuJump":"列表","tableName":"xuexishipin"}],"menu":"学习视频模块"}],"hasBackLogin":"否","hasBackRegister":"否","hasFrontLogin":"是","hasFrontRegister":"是","roleName":"用户","tableName":"yonghu"}],
loginForm: {
username: '',
password: '',
tableName: '',
code: '',
},
role: '',
roles: [],
rules: {
username: [
{ required: true, message: '请输入账户', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' }
]
},
codes: [{
num: 1,
color: '#000',
rotate: '10deg',
size: '16px'
}, {
num: 2,
color: '#000',
rotate: '10deg',
size: '16px'
}, {
num: 3,
color: '#000',
rotate: '10deg',
size: '16px'
}, {
num: 4,
color: '#000',
rotate: '10deg',
size: '16px'
}]
}
},
components: {
},
created() {
for(let item in this.roleMenus) {
if(this.roleMenus[item].hasFrontLogin=='是') {
this.roles.push(this.roleMenus[item]);
}
}
},
mounted() {
},
//方法集合
methods: {
randomString() {
var len = 4;
var chars = [
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k',
'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '0', '1', '2',
'3', '4', '5', '6', '7', '8', '9'
]
var colors = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f']
var sizes = ['14', '15', '16', '17', '18']
var output = []
for (var i = 0; i < len; i++) {
// 随机验证码
var key = Math.floor(Math.random() * chars.length)
this.codes[i].num = chars[key]
// 随机验证码颜色
var code = '#'
for (var j = 0; j < 6; j++) {
var key = Math.floor(Math.random() * colors.length)
code += colors[key]
}
this.codes[i].color = code
// 随机验证码方向
var rotate = Math.floor(Math.random() * 45)
var plus = Math.floor(Math.random() * 2)
if (plus == 1) rotate = '-' + rotate
this.codes[i].rotate = 'rotate(' + rotate + 'deg)'
// 随机验证码字体大小
var size = Math.floor(Math.random() * sizes.length)
this.codes[i].size = sizes[size] + 'px'
}
},
getCurrentRow(row) {
this.role = row.roleName;
},
submitForm(formName) {
if (this.roles.length!=1) {
if (!this.role) {
this.$message.error("请选择登录用户类型");
return false;
}
} else {
this.role = this.roles[0].roleName;
this.loginForm.tableName = this.roles[0].tableName;
}
this.$refs[formName].validate((valid) => {
if (valid) {
this.$http.get(`${this.loginForm.tableName}/login`, {params: this.loginForm}).then(res => {
if (res.data.code === 0) {
localStorage.setItem('Token', res.data.token);
localStorage.setItem('UserTableName', this.loginForm.tableName);
localStorage.setItem('username', this.loginForm.username);
localStorage.setItem('adminName', this.loginForm.username);
localStorage.setItem('sessionTable', this.loginForm.tableName);
localStorage.setItem('role', this.role);
localStorage.setItem('keyPath', this.$config.indexNav.length+2);
this.$router.push('/index/center');
this.$message({
message: '登录成功',
type: 'success',
duration: 1500,
});
} else {
this.$message.error(res.data.msg);
}
});
} else {
return false;
}
});
},
resetForm(formName) {
this.$refs[formName].resetFields();
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.container {
position: relative;
background: url(http://codegen.caihongy.cn/20230207/860aeea5c04f45119e98c796e63dee11.jpg) no-repeat right bottom / 100% auto,#fff;
.el-form-item {
& /deep/ .el-form-item__content {
width: 100%;
}
}
.list-item /deep/ .el-input .el-input__inner {
border: 1px solid #eee;
padding: 0 10px;
box-shadow: 0 0 0px rgba(64, 158, 255, .5);
outline: 0px solid #efefef;
color: #333;
width: 100%;
font-size: 14px;
height: 40px;
}
.list-code /deep/ .el-input .el-input__inner {
border: 1px solid #eee;
padding: 0 10px;
outline: none;
color: #333;
display: inline-block;
vertical-align: middle;
width: calc(100% - 110px);
font-size: 14px;
height: 40px;
}
.list-type /deep/ .el-radio__input .el-radio__inner {
background: rgba(53, 53, 53, 0);
border-color: #999;
}
.list-type /deep/ .el-radio__input.is-checked .el-radio__inner {
background: #333;
border-color: #333;
}
.list-type /deep/ .el-radio__label {
color: #999;
font-size: 14px;
}
.list-type /deep/ .el-radio__input.is-checked+.el-radio__label {
color: #333;
font-size: 14px;
}
}
</style>