Debian Codegraph @

texmf-dist/doc/latex/bjfuthesis/example/thesis.lyx

raw
1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
2 \lyxformat 606
3 \begin_document
4 \begin_header
5 \save_transient_properties true
6 \origin unavailable
7 \textclass bjfuthesis
8 \begin_preamble
9
10 \end_preamble
11 \use_default_options false
12 \maintain_unincluded_children no
13 \language chinese-simplified
14 \language_package none
15 \inputencoding utf8
16 \fontencoding default
17 \font_roman "default" "default"
18 \font_sans "default" "default"
19 \font_typewriter "default" "default"
20 \font_math "auto" "auto"
21 \font_default_family default
22 \use_non_tex_fonts true
23 \font_sc false
24 \font_roman_osf false
25 \font_sans_osf false
26 \font_typewriter_osf false
27 \font_sf_scale 100 100
28 \font_tt_scale 100 100
29 \use_microtype false
30 \use_dash_ligatures true
31 \graphics default
32 \default_output_format default
33 \output_sync 0
34 \bibtex_command default
35 \index_command default
36 \float_placement class
37 \float_alignment class
38 \paperfontsize default
39 \spacing single
40 \use_hyperref false
41 \papersize default
42 \use_geometry false
43 \use_package amsmath 1
44 \use_package amssymb 0
45 \use_package cancel 0
46 \use_package esint 1
47 \use_package mathdots 0
48 \use_package mathtools 0
49 \use_package mhchem 0
50 \use_package stackrel 0
51 \use_package stmaryrd 0
52 \use_package undertilde 0
53 \cite_engine biblatex
54 \cite_engine_type authoryear
55 \biblio_style plain
56 \biblatex_bibstyle gb7714-2015
57 \biblatex_citestyle gb7714-2015
58 \use_bibtopic false
59 \use_indices false
60 \paperorientation portrait
61 \suppress_date false
62 \justification true
63 \use_refstyle 0
64 \use_minted 0
65 \use_lineno 0
66 \index Index
67 \shortcut idx
68 \color #008000
69 \end_index
70 \secnumdepth 3
71 \tocdepth 3
72 \paragraph_separation indent
73 \paragraph_indentation default
74 \is_math_indent 0
75 \math_numbering_side default
76 \quotes_style english
77 \dynamic_quotes 0
78 \papercolumns 1
79 \papersides 1
80 \paperpagestyle default
81 \tablestyle default
82 \tracking_changes false
83 \output_changes false
84 \change_bars false
85 \postpone_fragile_content false
86 \html_math_output 0
87 \html_css_as_file 0
88 \html_be_strict false
89 \docbook_table_output 0
90 \end_header
91
92 \begin_body
93
94 \begin_layout Standard
95 \begin_inset External
96 template PDFPages
97 filename contents/cover.pdf
98 extra LaTeX "pages=1"
99
100 \end_inset
101
102
103 \begin_inset Note Note
104 status open
105
106 \begin_layout Plain Layout
107
108 \backslash
109 newpage
110 \backslash
111 null
112 \backslash
113 thispagestyle{empty}
114 \backslash
115 newpage
116 \end_layout
117
118 \end_inset
119
120
121 \begin_inset External
122 template PDFPages
123 filename contents/statement-of-originality.pdf
124
125 \end_inset
126
127
128 \begin_inset External
129 template PDFPages
130 filename contents/mission-statement.pdf
131
132 \end_inset
133
134
135 \begin_inset ERT
136 status collapsed
137
138 \begin_layout Plain Layout
139
140
141 \backslash
142 frontmatter
143 \end_layout
144
145 \end_inset
146
147
148 \end_layout
149
150 \begin_layout Chapter*
151 摘要
152 \end_layout
153
154 \begin_layout Standard
155 \begin_inset ERT
156 status collapsed
157
158 \begin_layout Plain Layout
159
160
161 \backslash
162 begin{abstract}
163 \end_layout
164
165 \end_inset
166
167 随着在线电影数量不断增加,用户选择电影的时间成本不断上升,准确的推荐算法成为了必然要求。为解决协同过滤推荐算法中的稀缺性问题与冷启动问题,研究人员用商品属性或
168 社交网络等信息来辅助推荐算法。现有的将知识图谱作为辅助信息的推荐算法包括基于嵌入的方法和基于路径的方法,但这两种方法均存在一些缺陷,没有充分有效地利用知识图谱中
169 的相关信息,推荐的准确度较低。
170 \end_layout
171
172 \begin_layout Standard
173 本文实现了基于知识图谱的“涟漪网络”推荐算法。“涟漪网络”算法的核心是利用现实生活中雨滴产生的涟漪在水面上不断扩散的思路,来模拟用户偏好的扩散。对于每一个用户,
174 涟漪网络将其过往偏好作为知识图谱中的一个种子集,然后沿知识图谱中的关系路径不断地拓展用户偏好,进而发现该用户对某个候选物品以等级划分的潜在兴趣,其中多个“涟漪”
175 重叠形成知识图谱中的用户偏好分布。该算法的实验结果和以往的CKE、DKN、PER等模型结果相比,表现出更优的性能。利用该算法,本文设计并实现了一个基于知识图谱的
176 电影推荐系统,该系统包括管理员用户和普通用户,管理员能新增、编辑和删除电影与用户,普通用户能浏览、收藏与购买电影。该系统可以高效准确地为用户推荐电影,方便用户选
177 择满足自己偏好的电影。
178 \begin_inset ERT
179 status collapsed
180
181 \begin_layout Plain Layout
182
183
184 \backslash
185 end{abstract}
186 \end_layout
187
188 \end_inset
189
190
191 \begin_inset ERT
192 status collapsed
193
194 \begin_layout Plain Layout
195
196
197 \backslash
198 keywordscn
199 \end_layout
200
201 \end_inset
202
203
204 \begin_inset ERT
205 status collapsed
206
207 \begin_layout Plain Layout
208
209 {
210 \end_layout
211
212 \end_inset
213
214 知识图谱,推荐系统,涟漪网络,用户偏好,电影商店
215 \begin_inset ERT
216 status collapsed
217
218 \begin_layout Plain Layout
219
220 }
221 \end_layout
222
223 \end_inset
224
225
226 \end_layout
227
228 \begin_layout Chapter*
229 Abstract
230 \end_layout
231
232 \begin_layout Standard
233 \begin_inset ERT
234 status collapsed
235
236 \begin_layout Plain Layout
237
238
239 \backslash
240 begin{abstract}
241 \end_layout
242
243 \end_inset
244
245 As the number of online movies continues to increase and the time cost
246 for users to choose movies continues to rise, accurate recommendation algorithm
247 s have become an necessary requirement.
248 In order to address the scarcity and cold start problem of collaborative
249 filtering, researchers usually make use of side information, such as product
250 attributes or social networks as side information to assist the recommendation.
251 The existing recommendation algorithms that use knowledge graph as side
252 information include embedding-based methods and path-based methods, but
253 both methods have some shortcomings.
254 They do not make full and effective use of the relevant information in
255 the knowledge graph, and the accuracy of recommendation is relatively low.
256 \end_layout
257
258 \begin_layout Standard
259 This paper implements a recommendation algorithm,
260 \begin_inset Quotes eld
261 \end_inset
262
263 Ripple Network
264 \begin_inset ERT
265 status collapsed
266
267 \begin_layout Plain Layout
268
269 "
270 \end_layout
271
272 \end_inset
273
274 , based on knowledge graph.
275 The core of the Ripple Network algorithm is to use the idea that the ripples
276 produced by raindrops in real life continue to spread on the water surface
277 to stimulate the spread of user preferences.
278 For each user, Ripple Network uses its past preference as a seed set in
279 the knowledge graph, and then continuously expands the user's preferences
280 along the relationship path in the knowledge graph, and then discovers
281 his hierarchical potential interests concerning a certain candidate item.
282 Multiple
283 \begin_inset Quotes eld
284 \end_inset
285
286 ripples
287 \begin_inset Quotes erd
288 \end_inset
289
290 overlap to form the user preference distribution in the knowledge graph.
291 Compared with previous model results of CKE, DKN, PER, etc., the experimental
292 results of this algorithm show better performance.
293 Using this algorithm, this paper designs and implements a recommendation
294 system based on the movie knowledge graph.
295 The system includes administrator users and general users.
296 The administrator can add, edit and delete movies and users, and general
297 users can browse, collect and purchase films.
298 The system can provide users with an efficient movie recommendation function,
299 which is convenient for users to choose movies that match their preferences.
300
301 \begin_inset ERT
302 status collapsed
303
304 \begin_layout Plain Layout
305
306
307 \backslash
308 end{abstract}
309 \end_layout
310
311 \end_inset
312
313
314 \begin_inset ERT
315 status collapsed
316
317 \begin_layout Plain Layout
318
319
320 \backslash
321 keywordsen
322 \end_layout
323
324 \end_inset
325
326
327 \begin_inset ERT
328 status collapsed
329
330 \begin_layout Plain Layout
331
332 {
333 \end_layout
334
335 \end_inset
336
337 knowledge graph, recommender system, ripple network, user preferences, movie
338 store
339 \begin_inset ERT
340 status collapsed
341
342 \begin_layout Plain Layout
343
344 }
345 \end_layout
346
347 \end_inset
348
349
350 \begin_inset CommandInset toc
351 LatexCommand tableofcontents
352
353 \end_inset
354
355
356 \begin_inset ERT
357 status collapsed
358
359 \begin_layout Plain Layout
360
361
362 \backslash
363 mainmatter
364 \end_layout
365
366 \end_inset
367
368
369 \end_layout
370
371 \begin_layout Chapter
372 绪论
373 \end_layout
374
375 \begin_layout Section
376 研究背景与意义
377 \end_layout
378
379 \begin_layout Standard
380 一直以来,电影推荐都是在线流媒体播放平台发展中的一个重要问题,做好电影推荐可以使用户能在海量电影中选择满足其偏好的电影,提高用户满意度,从而提高在线流媒体播放平
381 台的流量转化率及购买率,并最终提高在线流媒体播放平台的经济收益。近年来,随着电影行业及互联网行业的不断发展,在线电影数量不断增加,用户在海量电影中选择满足其偏好
382 的电影的难度不断上升,性能优异的推荐算法成为了必然要求。自从在线流媒体播放平台出现以来,人们便开始尝试利用推荐算法来提高平台流量转化率,出现了诸如协同过滤的推荐
383 算法
384 \begin_inset CommandInset citation
385 LatexCommand cite
386 key "he2017neural"
387 literal "false"
388
389 \end_inset
390
391 。但这些算法未能解决数据稀缺性及冷启动问题,并不能为在线流媒体播放平台提供良好的推荐性能。为此,人们尝试将辅助信息融入推荐算法中以解决数据稀缺性及冷启动问题
392 \begin_inset CommandInset citation
393 LatexCommand cite
394 key "sun2017collaborative"
395 literal "false"
396
397 \end_inset
398
399 ,并提高推荐性能。
400 \end_layout
401
402 \begin_layout Standard
403 知识图谱是一种结构化的语义知识库,被用于迅速提供对物理世界中的概念和相互关系的描述,为解决推荐问题提供了新的方法
404 \begin_inset CommandInset citation
405 LatexCommand cite
406 key "zou2020survey"
407 literal "false"
408
409 \end_inset
410
411 ,近年来受到国内外研究人员的广泛关注,成为了当前的研究热点。知识图谱通过对复杂的原始数据进行加工、处理及整合,转化成简单可靠、清晰明了的“实体,关系,实体”三元
412 组,汇聚了大量的知识信息,从而能实现基于知识信息的响应和推理。
413 \end_layout
414
415 \begin_layout Standard
416 知识图谱常被用于作为辅助信息添加至推荐算法中以提高推荐的准确性,这已是当前的研究焦点。
417 \end_layout
418
419 \begin_layout Standard
420 近年来,随着在线流媒体播放平台的发展,电影推荐系统应运而生,它作为现代信息技术与传统电影产业相结合的产物,对流媒体播放平台的用户体验起着至关重要的作用,其可大幅
421 度减少用户寻找满足其偏好电影的时间,并提高用户点击率与购买率,从而提高流媒体播放平台的经济收益。电影推荐系统能为用户推荐其感兴趣的电影,而减少对用户不感兴趣内容
422 的显示,从而满足用户需求。但是,目前网络上绝大多数的电影推荐系统都使用传统的基于协同过滤的推荐算法,未能有效利用知识图谱等辅助信息,返回给用户的推荐结果中包含大
423 量用户不感兴趣的电影,此外,还将一些本应推荐给用户的、用户感兴趣的电影丢弃了。造成这一问题的主要原因是推荐算法缺少有关新加入的无用户评分的电影以及新注册的用户的
424 信息。
425 \end_layout
426
427 \begin_layout Standard
428 对于海量的电影数据,为了实现准确地推荐给用户其感兴趣的电影,基于协同过滤的传统推荐算法是满足了不用户需求的,特别是对新注册用户,推荐的准确度无法得到保证。所以,
429 本文旨在以知识图谱作为辅助信息,构建一个合适的电影推荐系统,并利用知识图谱中包含的丰富的辅助信息,最终实现一个电影推荐系统,为用户提供有效的、准确的电影推荐,从
430 而提高用户满意度,提高平台收益。
431 \end_layout
432
433 \begin_layout Section
434 国内外研究现状
435 \end_layout
436
437 \begin_layout Subsection
438 推荐系统研究现状
439 \end_layout
440
441 \begin_layout Standard
442 推荐系统由Jussi Karlgren于哥伦比亚大学在一份技术报告中以“数字书架”的名称被首次提及,而后自1994年起被在SICS的Jussi
443 Karlgren、由Pattie Maes于MIT领导的研究团队、位于Bellcore的Will Hill以及同样位于MIT的Paul Resnick大规模实
444 现并在技术性报告及出版物大量出现,以上人员与GroupLens的工作被授予了2010年ACM软件系统奖。
445 \end_layout
446
447 \begin_layout Standard
448 自从在90年代中期首批有关协同过滤的论文出现后推荐系统便成为了重要的研究领域。工业界与学术界出现了众多有关建设新的推荐系统的工作。由于该领域包含众多的研究问题及
449 其能帮助用户解决在过多信息中提供个性化推荐的实际应用,因此研究人员对该领域的兴趣依旧很高。
450 \end_layout
451
452 \begin_layout Standard
453 当前,推荐列表在推荐系统将其产生的过程中的方式主要有两种:基于内容推荐与协同过滤推荐
454 \begin_inset CommandInset citation
455 LatexCommand cite
456 key "jafarkarimi2012naive"
457 literal "false"
458
459 \end_inset
460
461 。基于内容推荐的算法使用一些有关物品的离散特征来推荐出拥有相似性的物品。协同过滤方法根据用户的历史行为(诸如其评价过的、点击过的、购买过的商品等)并与其他用户的
462 相似决策结合来建立模形,这种算法可以被用于预测用户对物品的偏好程度。这两种方法常常被同时使用。
463 \end_layout
464
465 \begin_layout Standard
466 此外,近来有越来越多的推荐算法被提出:多准则推荐系统。多准则推荐系统可以被定义为包含多标准偏好信息的推荐系统,而不是构建基于单一凭据的推荐系统。风险感知推荐系统
467 ,现存推荐系统的主要方法聚焦于基于上下文信息推荐最相关内容给用户,而没有将不相关内容打扰用户的推荐风险考虑在内。考虑推送推荐内容给用户而造成打扰用户的风险在某些
468 情况下是需要考虑的,比如,在一个工作会议上或是在凌晨或是在晚上。而此类推荐算法为该问题提供了解决方案。
469 \end_layout
470
471 \begin_layout Standard
472 现实中,大量使用的往往是混合推荐系统。其同时结合了协同过滤、基于内容过滤以及其他方法,这种混合式的推荐方法现在被大量使用。混合推荐可以在多种方式下被实现:将基于
473 内容的和基于协同滤的预测模型被分开实现再将他们结合起来,亦或是将两种方法统一到同一模型中并一同实现。
474 \end_layout
475
476 \begin_layout Subsection
477 知识图谱的研究现状
478 \end_layout
479
480 \begin_layout Standard
481 在知识表示与知识推理中,知识图谱是一个使用图结构的数据模型或拓扑结构的知识库。知识图谱常被用来存储基于内连接的对实体的描述——对象、事件、情形或抽象概念,并包括
482 自由形式的语义。
483 \end_layout
484
485 \begin_layout Standard
486 该词汇最早在1972年于一个有关构建模块化指令系统的课程中被提出。在80年代末,命名为知识图谱的项目主要聚焦于语义网络的设计。在2007年,DBpedia和Fr
487 eebase作为基于图的常识性知识库被创立。DBpedia致力于从Wikipedia中抽取数据,而Freebase也包含一系列公开的数据集。它们两者都未将自己称
488 为“知识图谱”,但实则构建并描述了有关知识图谱的相关概念。
489 \end_layout
490
491 \begin_layout Standard
492 在2012年,谷歌正式提出了知识图谱的概念
493 \begin_inset CommandInset citation
494 LatexCommand cite
495 key "singhal2012introducing"
496 literal "false"
497
498 \end_inset
499
500 ,并构建了基于DBpedia和Freebase以及其他数据源的谷歌知识图谱。他们后来将包括CIA World Factbook, Wikidata和Wikipe
501 dia的网站的RDFa, Microdata, JSON-LD内容从它们的索引网站上抽取并纳入知识图谱。与知识图谱相关联的实体与关系类型使用来自scheme.or
502 g的术语被更广泛地组织了起来。
503 \end_layout
504
505 \begin_layout Standard
506 谷歌知识图谱中非常重要的一项是“自由库”,它是一个大型的协同工作知识库。“自由库”使用图结构作为其数据结构,可以将其视作一个有向图。谷歌知识图谱模型便是谷歌团队
507 利用其在“自由库”之上的技术积累开发出来的
508 \begin_inset CommandInset citation
509 LatexCommand cite
510 key "漆桂林2017知识图谱研究进展"
511 literal "false"
512
513 \end_inset
514
515 。
516 \end_layout
517
518 \begin_layout Standard
519 自此,数个大型跨国公司开始利用它们的知识图谱,很快知识图谱流行起来,有免费的知识图谱,如DBpedia和NELL,以及商业性质的知识图谱,如谷歌知识图谱和Mic
520 rosoft Satori。这些知识图谱被成功应用于问答系统、词向量嵌入与文字分类等。在2019年,IEEE将其关于“大数据”和“数据挖掘与智能计算”的年度国际
521 会议融入有关知识图谱的国际会议。
522 \end_layout
523
524 \begin_layout Standard
525 以上是知识图谱发展的主要进程。
526 \end_layout
527
528 \begin_layout Standard
529 知识图谱一般表示为三元组的形式,即
530 \begin_inset Formula $G=(h,r,t)$
531 \end_inset
532
533 ,其中
534 \begin_inset Formula $G$
535 \end_inset
536
537 为知识图谱,
538 \begin_inset Formula $h$
539 \end_inset
540
541 和
542 \begin_inset Formula $t$
543 \end_inset
544
545 是知识库中的实体集合,分别为三元组的头结点与尾节点
546 \begin_inset CommandInset citation
547 LatexCommand cite
548 key "徐增林2016知识图谱技术综述"
549 literal "false"
550
551 \end_inset
552
553 。知识图谱也可以看作是一种结点对应实体、边对应关系的有向异构图。
554 \end_layout
555
556 \begin_layout Standard
557 目前知识图谱的构建过程中主要使用了定义层次学习及事实学习。
558 \end_layout
559
560 \begin_layout Standard
561 定义层次学习是通过使用机器学习等技术,从文字、图片等信息中提取知识表达中的定义,并确定其上下文信息。而知识图谱本质上是属于一种精炼的异构信息网络。利用定义层次学
562 习可以在一定程度上完成对于知识图谱的构建。
563 \end_layout
564
565 \begin_layout Standard
566 事实学习分为有监督的事实学习、半监督的事实学习以及无监督的事实学习。有监督的事实学习通过人为标注的语料信息输入以及深度学习方法来完成知识图谱的构建,而半监督的事
567 实学习方法使用启发式地自动标注文本,但缺陷是训练数据集中可能含有大量的噪声数据。而无监督的学习方法主要使用基于深度学习模型的自然语言处理(NLP)的方法,无须人
568 为干预,由训练模型自动完成信息抽取、信息整合。随着深度学习算法的发展,目前基于无监督的事实学习逐渐成为主流
569 \begin_inset CommandInset citation
570 LatexCommand cite
571 key "李涓子2017知识图谱研究综述"
572 literal "false"
573
574 \end_inset
575
576 。
577 \end_layout
578
579 \begin_layout Standard
580 目前出现了诸多使用以上理论方法设计的知识图谱嵌入算法:基于翻译的TransE
581 \begin_inset CommandInset citation
582 LatexCommand cite
583 key "bordes2013translating"
584 literal "false"
585
586 \end_inset
587
588 、TransH
589 \begin_inset CommandInset citation
590 LatexCommand cite
591 key "wang2014knowledge"
592 literal "false"
593
594 \end_inset
595
596 、TransR
597 \begin_inset CommandInset citation
598 LatexCommand cite
599 key "lin2017learning"
600 literal "false"
601
602 \end_inset
603
604 和基于语义分析的DistMult
605 \begin_inset CommandInset citation
606 LatexCommand cite
607 key "yang2014embedding"
608 literal "false"
609
610 \end_inset
611
612 等。
613 \end_layout
614
615 \begin_layout Standard
616 目前,知识图谱在业界的应用已经取得了巨大成功
617 \begin_inset CommandInset citation
618 LatexCommand cite
619 key "曹倩2015知识图谱的技术实现流程及相关应用"
620 literal "false"
621
622 \end_inset
623
624 :
625 \end_layout
626
627 \begin_layout Standard
628 (1)搜索引擎技术。如前所述,知识图谱最早便是由谷歌提出以改善其搜索引擎的。在将知识图谱应用于搜索引擎之后,搜索引擎能对一些常见的搜索内容基于其使用的知识图谱信
629 息快速给出搜索结果。同时,对于一些名词性的搜索内容,搜索引擎能使用知识图谱以知识卡片的形式给出其相关信息。研究表明,在谷歌将知识图谱技术融入其搜索引擎之后,用户
630 点击进入维基百科的次数明显减少,说明利用知识图谱技术的搜索引擎可以更好的直接给出用户需要的信息而不需要用户再浏览其他网站。
631 \end_layout
632
633 \begin_layout Standard
634 (2)智能问答。信息检索系统中非常常见的一种便是问答系统。问答系统在用户输入问题后能迅速给出用户需要的答案。而在将知识图谱技术应用于问答系统后,其回答的准确率有
635 非常大的提升。目前苹果的智能助理Siri以及谷歌的智能助理谷歌助理(Google Assistant)都使用了知识图谱技术。
636 \end_layout
637
638 \begin_layout Standard
639 此外,知识图谱还广泛应用于金融、医疗等多个领域。
640 \end_layout
641
642 \begin_layout Subsection
643 基于知识图谱的推荐系统研究现状
644 \end_layout
645
646 \begin_layout Standard
647 由于传统的推荐系统无法解决稀缺性问题和冷启动问题,因此研究人员企图将辅助信息加入到推荐算法中以改善推荐性能。而这类辅助信息有社交网络、用户/物品属性、图像与上下
648 文等。
649 \end_layout
650
651 \begin_layout Standard
652 在数种类型的辅助信息中,知识图谱通常包含有更丰富的信息以及物品间的联系。图
653 \begin_inset CommandInset ref
654 LatexCommand ref
655 reference "fig:enhanced-recommendation"
656 plural "false"
657 caps "false"
658 noprefix "false"
659
660 \end_inset
661
662 中说明了知识图谱提供丰富的信息与物品间的连接,有利于提高推荐结果的准确性、多样性和可解释性。知识图谱可以从以下三个方面提高推荐性能:
663 \begin_inset Float figure
664 placement document
665 alignment document
666 wide false
667 sideways false
668 status open
669
670 \begin_layout Plain Layout
671 \begin_inset Graphics
672 filename figures/enhanced-recommendation.png
673 width 100text%
674
675 \end_inset
676
677
678 \begin_inset ERT
679 status collapsed
680
681 \begin_layout Plain Layout
682
683
684 \backslash
685 bicaption
686 \end_layout
687
688 \end_inset
689
690
691 \begin_inset ERT
692 status collapsed
693
694 \begin_layout Plain Layout
695
696 {
697 \end_layout
698
699 \end_inset
700
701 基于知识图谱的电影推荐系统
702 \begin_inset ERT
703 status collapsed
704
705 \begin_layout Plain Layout
706
707 }
708 \end_layout
709
710 \end_inset
711
712
713 \begin_inset ERT
714 status collapsed
715
716 \begin_layout Plain Layout
717
718 {
719 \end_layout
720
721 \end_inset
722
723 Knowledge graph enhanced movie recommendation system
724 \begin_inset ERT
725 status collapsed
726
727 \begin_layout Plain Layout
728
729 }
730 \end_layout
731
732 \end_inset
733
734
735 \begin_inset CommandInset label
736 LatexCommand label
737 name "fig:enhanced-recommendation"
738
739 \end_inset
740
741
742 \end_layout
743
744 \end_inset
745
746
747 \end_layout
748
749 \begin_layout Standard
750 (1)知识图谱引入了实体语义相关性,这可以帮助找到实体间潜在的联系并提高推荐物品的准确性。
751 \end_layout
752
753 \begin_layout Standard
754 (2)知识图谱由各种类型的关系构成,这对合理地扩展用户兴趣并增加推荐商品的多样性是有益的。
755 \end_layout
756
757 \begin_layout Standard
758 (3)知识图谱连接用户的历史记录及推荐的商品,因此提高了推荐系统的可解释性。
759 \end_layout
760
761 \begin_layout Standard
762 将知识图谱作为辅助信息加入至推荐系统中是当前的热点问题,目前基于知识图谱构建推荐系统的方法主要有以下几类:
763 \end_layout
764
765 \begin_layout Standard
766 (1)基于嵌入的方法。基于嵌入的方法通过知识图谱嵌入计算算法将知识图谱中的实体信息与关系信息映射为低维向量空间中的向量表示(嵌入表示)。而后推荐算法利用该嵌入表
767 示来完成相应的计算,并给出推荐结果。目前将知识图谱中嵌入表示信息作为辅助信息的推荐模型有CKE
768 \begin_inset CommandInset citation
769 LatexCommand cite
770 key "zhang2016collaborative"
771 literal "false"
772
773 \end_inset
774
775 、DKN
776 \begin_inset CommandInset citation
777 LatexCommand cite
778 key "wang2018dkn"
779 literal "false"
780
781 \end_inset
782
783 以及SHINE
784 \begin_inset CommandInset citation
785 LatexCommand cite
786 key "wang2018shine"
787 literal "false"
788
789 \end_inset
790
791 等。CKE是微软在 KDD2016 年发表的,其模型结构在原有系统过滤得到
792 \begin_inset Formula $U$
793 \end_inset
794
795 ,
796 \begin_inset Formula $V$
797 \end_inset
798
799 向量的基础上,将物品的嵌入与其他描述信息相结合,这些信息主要有: 采用 TransR 算法嵌入得到的知识图谱,图谱内每个实体嵌入表示被提取为物品的结构化向量信息
800 。 采用SDAE模型得到物品描述性文本的文本嵌入表示。 采用SCAE模型得到物品相关图像的视觉嵌入表示。DKN是之前同样由微软团队在WWW2018会议上发表的。
801 它是一个主要针对新闻推荐任务提出的框架,知识图谱用于辅助计算新闻标题的嵌入表示。DKN提出对新闻标题内每一个关键实体,在知识图谱内找到其实体嵌入和上下文嵌入。
802 SHINE设计深度自编码器来嵌入语义网络,社交网络并进行推荐。其为用户-物品的交互使用自动编码器并计算用户感兴趣的概率。此外,嵌入表示可以包含实体的独热编码
803 \begin_inset CommandInset citation
804 LatexCommand cite
805 key "koren2008factorization"
806 literal "false"
807
808 \end_inset
809
810 、词汇集
811 \begin_inset CommandInset citation
812 LatexCommand cite
813 key "wang2018dkn"
814 literal "false"
815
816 \end_inset
817
818 、上下文信息
819 \begin_inset CommandInset citation
820 LatexCommand cite
821 key "sun2017collaborative"
822 literal "false"
823
824 \end_inset
825
826 或属性
827 \begin_inset CommandInset citation
828 LatexCommand cite
829 key "wang2018shine"
830 literal "false"
831
832 \end_inset
833
834 ,而选择哪一种嵌入向量的计算方式取决于其应用场合。
835 \end_layout
836
837 \begin_layout Standard
838 (2)基于路径的方法。基于路径的方法将知识图谱作为异构信息网络,主要是通过知识图谱中的路径关系信息来辅助推荐算法完成推荐相关的计算工作。目前基于知识图谱中路径信
839 息的推荐模型有HIN
840 \begin_inset CommandInset citation
841 LatexCommand cite
842 key "zhao2017meta"
843 literal "false"
844
845 \end_inset
846
847 、RKGE
848 \begin_inset CommandInset citation
849 LatexCommand cite
850 key "sun2018recurrent"
851 literal "false"
852
853 \end_inset
854
855 等。HIN是2017年在KDD上提出的,与PER
856 \begin_inset CommandInset citation
857 LatexCommand cite
858 key "yu2014personalized"
859 literal "false"
860
861 \end_inset
862
863 类似,都将知识图谱作为异构信息网络。它针对Yelp和Amazon数据集分别设计了元路径,并得到了L个评估函数。并在建模时使用FM模型,使用FM损失函数组进行梯度
864 下降,并最终得到推荐结果。RKGE模型使用了基于循环神经网络的方法。在人为定义元路径并抽取出所有路径之后,对每种元路径都使用循环神经网络模型来抽取并推理其路径中
865 所包含的信息。
866 \end_layout
867
868 \begin_layout Standard
869 (3)混合式方法。基于嵌入的方法未能充分利用实体间的关系模式信息,而基于路径的方法仅考虑了实体间的语义连通信息,未能有效使用用户/物品本身的语义信息。因此,目前
870 出现了混合式方法,即同时结合了基于嵌入的方法与基于路径的方法的优点。混合式方法是当前的研究热点与焦点,使用该方法的典型模型有AKUPM
871 \begin_inset CommandInset citation
872 LatexCommand cite
873 key "tang2019akupm"
874 literal "false"
875
876 \end_inset
877
878 和RCoLM
879 \begin_inset CommandInset citation
880 LatexCommand cite
881 key "cao2019unifying"
882 literal "false"
883
884 \end_inset
885
886 等。AKUPM是通过注意力机制增强的推荐模型,RCoLM则是基于联合学习并以任务为导向的推荐算法。本文实现的电影推荐系统基于文献
887 \begin_inset ERT
888 status collapsed
889
890 \begin_layout Plain Layout
891
892
893 \backslash
894 parencite
895 \end_layout
896
897 \end_inset
898
899
900 \begin_inset ERT
901 status collapsed
902
903 \begin_layout Plain Layout
904
905 {
906 \end_layout
907
908 \end_inset
909
910 wang2018ripplenet
911 \begin_inset ERT
912 status collapsed
913
914 \begin_layout Plain Layout
915
916 }
917 \end_layout
918
919 \end_inset
920
921 ,其所使用的算法模型是也属于混合式方法。
922 \end_layout
923
924 \begin_layout Section
925 本文的主要研究内容
926 \end_layout
927
928 \begin_layout Standard
929 本文在推荐算法、知识图谱和基于知识图谱的推荐算法的相关研究基础上,做了以下三方面的研究:
930 \end_layout
931
932 \begin_layout Standard
933 (1)对推荐系统所需的数据进行采集和处理,使用“MovieLens 1M Dataset”作为数据集,此外还从IMDb及豆瓣网爬取了相关电影数据并进行处理,作为
934 本文的研究对象。
935 \end_layout
936
937 \begin_layout Standard
938 (2)根据文献
939 \begin_inset ERT
940 status collapsed
941
942 \begin_layout Plain Layout
943
944
945 \backslash
946 parencite
947 \end_layout
948
949 \end_inset
950
951
952 \begin_inset ERT
953 status collapsed
954
955 \begin_layout Plain Layout
956
957 {
958 \end_layout
959
960 \end_inset
961
962 wang2018ripplenet
963 \begin_inset ERT
964 status collapsed
965
966 \begin_layout Plain Layout
967
968 }
969 \end_layout
970
971 \end_inset
972
973 提出的算法,实现了基于知识图谱的涟漪网络推荐算法,此算法能根据用户的历史行为为用户进行电影推荐。不同于文献
974 \begin_inset ERT
975 status collapsed
976
977 \begin_layout Plain Layout
978
979
980 \backslash
981 parencite
982 \end_layout
983
984 \end_inset
985
986
987 \begin_inset ERT
988 status collapsed
989
990 \begin_layout Plain Layout
991
992 {
993 \end_layout
994
995 \end_inset
996
997 wang2018ripplenet
998 \begin_inset ERT
999 status collapsed
1000
1001 \begin_layout Plain Layout
1002
1003 }
1004 \end_layout
1005
1006 \end_inset
1007
1008 中仅使用用户评分计算用户偏好,本文在用户偏好的计算过程中还结合了用户收藏,这在一定程度上缓解了冷启动问题并改进了推荐性能。此外,将涟漪网络算法与其他基于知识图谱
1009 的推荐算法(DKN
1010 \begin_inset CommandInset citation
1011 LatexCommand cite
1012 key "wang2018dkn"
1013 literal "false"
1014
1015 \end_inset
1016
1017 、CKE
1018 \begin_inset CommandInset citation
1019 LatexCommand cite
1020 key "zhang2016collaborative"
1021 literal "false"
1022
1023 \end_inset
1024
1025 、PER
1026 \begin_inset CommandInset citation
1027 LatexCommand cite
1028 key "yu2014personalized"
1029 literal "false"
1030
1031 \end_inset
1032
1033 、SHINE
1034 \begin_inset CommandInset citation
1035 LatexCommand cite
1036 key "wang2018shine"
1037 literal "false"
1038
1039 \end_inset
1040
1041 、LibFM
1042 \begin_inset CommandInset citation
1043 LatexCommand cite
1044 key "rendle2012factorization"
1045 literal "false"
1046
1047 \end_inset
1048
1049 和Wide&Deep
1050 \begin_inset CommandInset citation
1051 LatexCommand cite
1052 key "cheng2016wide"
1053 literal "false"
1054
1055 \end_inset
1056
1057 等)进行了性能比较。
1058 \end_layout
1059
1060 \begin_layout Standard
1061 (3)实现了一个基于知识图谱的电影推荐系统,该系统能够根据用户的历史行为(评分、收藏等)来为用户进行电影推荐。该系统分为管理员、未登录用户、普通登录用户。管理员
1062 能增加、修改和删除电影和普通用户;未登录用户能根据电影分类查看电影列表以及查看电影详情;普通登录用户除了能进行未登录用户的所有操作外,还能购买、收藏及为电影评分
1063 。
1064 \end_layout
1065
1066 \begin_layout Section
1067 论文结构
1068 \end_layout
1069
1070 \begin_layout Standard
1071 本论文一共分为五个章节。
1072 \end_layout
1073
1074 \begin_layout Standard
1075 第1章是绪论。简明介绍知识图谱作为辅助信息在推荐算法中的作用以及推荐算法对在线流媒体播放平台的作用,同时介绍了推荐系统、知识图谱和基于知识图谱的推荐系统的发展和
1076 应用,并说明了本文的主要工作。
1077 \end_layout
1078
1079 \begin_layout Standard
1080 第2章是相关理论和技术。介绍了目前知识图谱和推荐系统的研究现状,并对传统的推荐算法与加入辅助信息的推荐算法作了较为细致的分类与阐述。同时还介绍了本文实现的电影推
1081 荐系统所使用的技术栈,诸如数据库、前端架构、后端架构等。
1082 \end_layout
1083
1084 \begin_layout Standard
1085 第3章是涟漪网络。介绍了涟漪网络算法,以及计算相关实体嵌入的过程中使用的深度学习算法,并对以上算法进行了讨论。最后,还对涟漪网络推荐算法的准确度进行了测试。
1086 \end_layout
1087
1088 \begin_layout Standard
1089 第4章是电影推荐系统。介绍了以涟漪网络算法为基础构建的电影推荐系统:介绍了系统架构、系统功能、电影推荐流程以及如何保证该系统的安全性。
1090 \end_layout
1091
1092 \begin_layout Standard
1093 第5章是研究结论和展望。总结了涟漪网络算法的设计与实现、电影推荐系统的功能,并指出了其中可以改进的地方。
1094 \end_layout
1095
1096 \begin_layout Chapter
1097 相关理论和技术
1098 \end_layout
1099
1100 \begin_layout Section
1101 知识图谱
1102 \end_layout
1103
1104 \begin_layout Subsection
1105 知识图谱的概念及发展进程
1106 \end_layout
1107
1108 \begin_layout Standard
1109 知识图谱,是一种知识可视化或知识领域映射地图,是显示知识发展进程与结构关系的一系列三元组(实体,关系,实体),用可视化技术描述知识信息及其载体,挖掘、分析、建立
1110 、绘制和可视化知识以及实体之间的相互关系。
1111 \end_layout
1112
1113 \begin_layout Standard
1114 知识图谱是谷歌于2012年提出的,目的是为了增强其搜索引擎。而后微软于2013年7月发布了Microsoft Satori知识图谱。除传统搜索服务提供商之外,包
1115 括Apple,Facebook,IBM等互联网企业也在探索该领域。此外,业界也出现了社区构建的开源知识图谱,如DBpedia,NELL和Wikidata等。以F
1116 reebase、WordNet和GeneOntology等为例的知识图谱已成为支持人工智能相关应用的非常重要的资源。
1117 \end_layout
1118
1119 \begin_layout Subsection
1120 知识图谱的构建方法
1121 \end_layout
1122
1123 \begin_layout Standard
1124 知识图谱是由多实体结点和不同关系边构成的多关系图,一个边是一个事实三元组(头结点,关系,尾结点),记为
1125 \begin_inset Formula $(h,r,t)$
1126 \end_inset
1127
1128 。而知识图谱的构建便是寻找这样的三元组。
1129 \end_layout
1130
1131 \begin_layout Standard
1132 在过去十年间,出现了诸多构建大型知识图谱的方法,然而,还没有清晰准确的构建知识图谱的范式。主要有两个困难:(1)知识图谱是符号化的逻辑系统而知识图谱的应用常常包
1133 含在连续空间中的计算;(2)在一张知识图谱上进行知识聚合是困难的。
1134 \end_layout
1135
1136 \begin_layout Standard
1137 目前,知识图谱主要通过以下3个步骤来完成构建:
1138 \end_layout
1139
1140 \begin_layout Standard
1141 (1)信息抽取。即从各类型的源数据中抽取出实体(概念)、实体间的关系,并在此基础之上形成确切的知识表达。
1142 \end_layout
1143
1144 \begin_layout Standard
1145 (2)知识融合。对新获得的知识进行整合,以完成消歧义。
1146 \end_layout
1147
1148 \begin_layout Standard
1149 (3)知识加工。经过质量核查后将融合后的新知识的正确的部分加入至知识图谱中。
1150 \end_layout
1151
1152 \begin_layout Subsection
1153 知识图谱的应用
1154 \end_layout
1155
1156 \begin_layout Standard
1157 知识图谱以更接近人类认知的方式为互联网的信息表达提供了一种新的方式,而且提供了一种更益于组织与利用海量数据的方式。当前知识图谱主要用于推荐系统、搜索引擎、个人助
1158 理以及问答系统。
1159 \end_layout
1160
1161 \begin_layout Section
1162 推荐系统
1163 \end_layout
1164
1165 \begin_layout Standard
1166 推荐系统是内容过滤系统的一个子集,被广泛使用于多个领域,它向用户推荐满足其偏好的物品,并通常具有为视频或音乐服务生成推荐清单的表现形式。
1167 \end_layout
1168
1169 \begin_layout Subsection
1170 传统的推荐系统
1171 \end_layout
1172
1173 \begin_layout Standard
1174 传统的推荐系统主要分为基于内容的推荐系统、基于协同过滤的推荐系统和混合推荐系统
1175 \begin_inset CommandInset citation
1176 LatexCommand cite
1177 key "黄立威2018基于深度学习的推荐系统研究综述"
1178 literal "false"
1179
1180 \end_inset
1181
1182 。基于内容的推荐系统主要用于文本相关的项目,因为内容常常是使用关键字来描述的。该算法通过计算相关物品的离散特征,然后推荐具有与用户历史偏好物品类似特征的有关物品
1183 。基于协同过滤的推荐系统主要通过将具有与目标用户相似特征的用户所交互过的物品推荐给目标用户。
1184 \end_layout
1185
1186 \begin_layout Standard
1187 基于内容的推荐与基于协同过滤的推荐的有关区别可以通过比较两个流行音乐推荐系统的实现方式看出。(1)潘多拉音乐使用一个基于内容推荐的推荐算法。它根据艺人或歌曲的属
1188 性来生成一个包含相似风格歌曲的电台,并且该电台的内容会根据收听用户的反馈进行调整。当用户对一首歌曲“不感兴趣”时该算法将弱化该歌曲的一些属性;而当用户喜欢一首歌
1189 曲时,将强化一些属性。并且该算法会根据该属性调整歌曲的顺序,若属性的值越过一个阀值时推荐算法便将某一歌曲从列表中删除。(2)“终级fm”使用协同过滤的推荐算法。
1190 它记录用户经常收听的乐队和歌手,然后与其它用户的有关行为进行比较,建立一个电台,并以此推荐歌曲。“终级fm”会给用户推荐其他具有相似特征用户的播放列表(并保证目
1191 标用户未收听过)。
1192 \end_layout
1193
1194 \begin_layout Standard
1195 基于内容的推荐与基于协同过滤的推荐各有优缺点。潘多拉音乐所使用的基于内容推荐的推荐算法是根据物品本身的性质来进行推荐的,因此不需要用户信息就可以有较好的准确度。
1196 但该算法严重依赖物品本身的特性,因此局限性较大,推荐的内容都是与种子集相关的,推荐结果的多样性较低。而“终级fm”使用的协同过滤算法需要根据用户与物品的交互来生
1197 成推荐结果,因此需要大量的用户数据,存在数据稀缺性问题与冷启动问题。
1198 \end_layout
1199
1200 \begin_layout Subsection
1201 基于知识图谱的推荐系统
1202 \end_layout
1203
1204 \begin_layout Standard
1205 基于内容推荐与协同过滤推荐两者均存在一些局限性,为了提高推荐的准确性,解决传统推荐算法的数据稀缺性与冷启动问题,研究者将一些辅助信息加入至推荐算法中,通常这些辅
1206 助信息包括上下文信息、用户或物品的属性、图片和社交网络
1207 \begin_inset CommandInset citation
1208 LatexCommand cite
1209 key "常亮2019知识图谱的推荐系统综述,秦川2020基于知识图谱的推荐系统研究综述"
1210 literal "false"
1211
1212 \end_inset
1213
1214 。
1215 \end_layout
1216
1217 \begin_layout Standard
1218 而随着知识图谱的发展,将知识图谱作为辅助信息来提高推荐系统的性能已经成为了热门的研究方向。将知识图谱作为辅助信息加入推荐算法的优点有:
1219 \end_layout
1220
1221 \begin_layout Standard
1222 (1)提高推荐系统的准确性。知识图谱可以表示不同实体间的关系,可以将物品及其相关属性对应于知识图谱之中,从而推荐算法可以理解物品之间的关系。此外,用户与用户间的
1223 关系信息也可以映射至知识图谱之中,从而推荐算法可以更准确地分析物品与物品间的关系、用户与物品之间的关系。
1224 \end_layout
1225
1226 \begin_layout Standard
1227 (2)提高推荐系统的可解释性。由于推荐结果依照知识图谱中的关系信息,因此可以由知识图谱中的关系路径得到推荐系统给出推荐结果的原因。
1228 \end_layout
1229
1230 \begin_layout Standard
1231 目前主要的基于知识图谱的推荐算法有基于嵌入的方法、基于路径的方法以及混合式方法:
1232 \end_layout
1233
1234 \begin_layout Standard
1235 (1)基于嵌入的方法。基于嵌入的方法使用知识图谱的信息来完善实体的嵌入表示。为了将知识图谱中的信息添加至推荐算法中来辅助推荐,需要使用知识图谱嵌入表示算法(Kn
1236 owledge Graph Embedding, KGE)表计算实体嵌入(实体嵌入指由知识图谱中的信息得到的在低维向量空间中的向量表示)。KGE算法有Trans
1237 E
1238 \begin_inset CommandInset citation
1239 LatexCommand cite
1240 key "bordes2013translating"
1241 literal "false"
1242
1243 \end_inset
1244
1245 、TransH
1246 \begin_inset CommandInset citation
1247 LatexCommand cite
1248 key "wang2014knowledge"
1249 literal "false"
1250
1251 \end_inset
1252
1253 、TransR
1254 \begin_inset CommandInset citation
1255 LatexCommand cite
1256 key "lin2017learning"
1257 literal "false"
1258
1259 \end_inset
1260
1261 和DistMult
1262 \begin_inset CommandInset citation
1263 LatexCommand cite
1264 key "yang2014embedding"
1265 literal "false"
1266
1267 \end_inset
1268
1269 等。而推荐算法利用该嵌入表示来进行相关计算,从而对用户进行物品推荐。
1270 \end_layout
1271
1272 \begin_layout Standard
1273 (2)基于路径的方法
1274 \begin_inset CommandInset citation
1275 LatexCommand cite
1276 key "lin2015modeling,guu2015traversing,toutanova2016compositional"
1277 literal "false"
1278
1279 \end_inset
1280
1281 。基于路径的方法将知识图谱视为异构信息网络。而推荐系统利用该异构信息网络寻找实体间的关系,从而完成推荐。
1282 \end_layout
1283
1284 \begin_layout Standard
1285 (3)混合式方法。基于嵌入的方法未能充分利用实体间的关系模式信息,而基于路径的方法仅考虑了实体间的语义连通信息,未能有效利用用户/物品本身的语义信息。混合式方法
1286 结合了基于嵌入的方法与基于路径的方法的优点,该方法是当前的研究热点与焦点,使用该方法的典型模型有AKUPM
1287 \begin_inset CommandInset citation
1288 LatexCommand cite
1289 key "tang2019akupm"
1290 literal "false"
1291
1292 \end_inset
1293
1294 和RCoLM
1295 \begin_inset CommandInset citation
1296 LatexCommand cite
1297 key "cao2019unifying"
1298 literal "false"
1299
1300 \end_inset
1301
1302 等。本文实现的算法属于混合方法。
1303 \end_layout
1304
1305 \begin_layout Section
1306 系统开发技术
1307 \end_layout
1308
1309 \begin_layout Standard
1310 \begin_inset CommandInset label
1311 LatexCommand label
1312 name "sec:tech-stack"
1313
1314 \end_inset
1315
1316
1317 \end_layout
1318
1319 \begin_layout Subsection
1320 数据采集技术
1321 \end_layout
1322
1323 \begin_layout Standard
1324 电影推荐系统使用的数据来自“MovieLens 1M Dataset”
1325 \begin_inset Foot
1326 status collapsed
1327
1328 \begin_layout Plain Layout
1329 https://grouplens.org/datasets/movielens/1m/
1330 \end_layout
1331
1332 \end_inset
1333
1334 数据集,此外还从IMDb
1335 \begin_inset Foot
1336 status collapsed
1337
1338 \begin_layout Plain Layout
1339 https://www.imdb.com/
1340 \end_layout
1341
1342 \end_inset
1343
1344 及豆瓣网
1345 \begin_inset Foot
1346 status collapsed
1347
1348 \begin_layout Plain Layout
1349 https://www.douban.com/
1350 \end_layout
1351
1352 \end_inset
1353
1354 爬取了相关电影数据并进行处理作为本文的研究对象。
1355 \end_layout
1356
1357 \begin_layout Standard
1358 在数据采集的过程中,使用Scrapy框架进行了数据爬取,爬取的数据包括电影名称、电影封面、预告片图片、电景情节介绍、导演、演员以及剧作家。
1359 \end_layout
1360
1361 \begin_layout Standard
1362 最终,总计爬取了3684部电影的数据。其中,从IMDb爬取了3494条电影数据,从豆瓣爬取了190条电影数据(由于豆瓣网限制了每IP访问量故爬取的数据较少)。
1363
1364 \end_layout
1365
1366 \begin_layout Subsection
1367 数据存储技术
1368 \end_layout
1369
1370 \begin_layout Standard
1371 本系统使用MongoDB与Neo4j存储数据。
1372 \end_layout
1373
1374 \begin_layout Standard
1375 \noindent
1376 (1)MongoDB
1377 \end_layout
1378
1379 \begin_layout Standard
1380 MongoDB是一个新兴的非关系型存储的分布式存储数据的数据库,属于NoSQL,与MySQL等传统的关系型数据库相比,它提供更好的高并发支持,具有高可靠性的优点
1381 。与此同时,得益于其基于文档储存的特点,相比较传统的关系型数据库,它的存储结构更灵活。
1382 \end_layout
1383
1384 \begin_layout Standard
1385 在本系统中,MongoDB存储普通用户数据、管理员数据、电影数据等。
1386 \end_layout
1387
1388 \begin_layout Standard
1389 \noindent
1390 (2)Neo4j
1391 \end_layout
1392
1393 \begin_layout Standard
1394 Neo4j是一个具有高性能的图数据库,它将结构化的数据信息储存在网络上而不是存储在表中。它具有健壮和成熟的数据库的所有特点。虽然Neo4j是一个新兴的数据库,但
1395 它已在具有超过1亿节点、关系和属性的产品中得到了应用,充分体现了其高性能、高可靠性的特点。
1396 \end_layout
1397
1398 \begin_layout Standard
1399 在本系统中,最终需存储的图结点有182011个,需存储的边有1241995条。如果将它们存储在传统的关系型数据库中,会因大量的连接查询导致极大的性能开销,表现为
1400 查询耗时久。Neo4j对图数据处理做了优化,因此查询等操作可以在较短的时间内完成,故本系统将知识图谱数据存储在Neo4j中而不是关系型数据库中。
1401 \end_layout
1402
1403 \begin_layout Subsection
1404 后端技术
1405 \end_layout
1406
1407 \begin_layout Standard
1408 本系统使用Flask框架作为网站后端框架。Flask是一个Python编写的轻量级微框架。它具有轻量、便捷、可扩展等特点。系统使用Flask框架充分利用了其便捷
1409 、可扩展以及开发便捷的特点,与本系统要求相符。
1410 \end_layout
1411
1412 \begin_layout Standard
1413 系统使用表现层状态转换(REST)风格的应用程序接口(API)作为前后端的交互接口。表现层状态转换(Representational State
1414 Transfer,REST)是一种基于HTTP协议的软件交互体系结构样式,该协议是由Roy Thomas Fielding博士在2000年的博士论文中引用的
1415 \begin_inset CommandInset citation
1416 LatexCommand cite
1417 key "fielding2000architectural"
1418 literal "false"
1419
1420 \end_inset
1421
1422 ,目的是促进不同的软件/程序的开发。在网络上互相传输数据。表示层状态转换基于超文本传输​​协议(HTTP)的一组约束,该协议是一种旨在提供万维网服务的软件构造样
1423 式。符合或兼容此体系结构样式(简称为REST或RESTful)的网络服务允许客户端发出使用统一资源标识符访问和操作网络资源的请求,这些资源与一组预定义的操作一致
1424 。因此,表示层状态转换提供了Internet上计算机系统之间相互使用资源的互操作性。与其他类型的网络服务(例如SOAP服务)相比,它们使用自己定义的一组操作来访
1425 问网络资源。
1426 \end_layout
1427
1428 \begin_layout Standard
1429 得益于本系统使用了REST风格的API,本系统能更有效地使用缓存来提升响应速度,同时前后端间的通讯的无状态性可以让不同的服务器处理一连串请求中不同的请求,提高了
1430 本系统的可扩展性。与此同时,得益于REST风格语义化的接口,使前后端交互接口更清晰明了,使接口的使用者能更高效便捷地进行相关的开发工作。
1431 \end_layout
1432
1433 \begin_layout Subsection
1434 前端技术
1435 \end_layout
1436
1437 \begin_layout Standard
1438 本系统前端使用Angular框架。Angular(通常指“Angular 2+”或“Angular v2及以上”)是一个基于TypeScript的开源网络应用框
1439 架,它的开发由Google的Angular团队领导同时也有个人及其他公司维护。Angular完全从相同团队开发的AngularJS重新编写而来。Angular常
1440 常作为MEAN技术栈的一部分。MEAN技术栈指MongoDB数据库、Express.js网络服务器框架、Angular/AngularJS以及Node.js服务器运
1441 行时。不同于MEAN技术栈,本系统将其中的“E”(指Express.js网络服务器框架)替换为了Flask网络服务器框架。
1442 \end_layout
1443
1444 \begin_layout Standard
1445 通过使用Angular框架,本系统具有一个现代化、模块化、响应式的网页架构。同时借助于Angular Material Components官方组件库,本系统前
1446 端UI符合材料设计(Material Design)。
1447 \end_layout
1448
1449 \begin_layout Chapter
1450 基于涟漪网络知识图谱的推荐算法
1451 \end_layout
1452
1453 \begin_layout Standard
1454 \begin_inset CommandInset label
1455 LatexCommand label
1456 name "ch:offline-recommendation"
1457
1458 \end_inset
1459
1460
1461 \end_layout
1462
1463 \begin_layout Section
1464 涟漪网络
1465 \end_layout
1466
1467 \begin_layout Standard
1468 本算法基于文献
1469 \begin_inset ERT
1470 status collapsed
1471
1472 \begin_layout Plain Layout
1473
1474
1475 \backslash
1476 parencite
1477 \end_layout
1478
1479 \end_inset
1480
1481
1482 \begin_inset ERT
1483 status collapsed
1484
1485 \begin_layout Plain Layout
1486
1487 {
1488 \end_layout
1489
1490 \end_inset
1491
1492 wang2018ripplenet
1493 \begin_inset ERT
1494 status collapsed
1495
1496 \begin_layout Plain Layout
1497
1498 }
1499 \end_layout
1500
1501 \end_inset
1502
1503 实现,并在其基础上进行了一定的改进:文献
1504 \begin_inset ERT
1505 status collapsed
1506
1507 \begin_layout Plain Layout
1508
1509
1510 \backslash
1511 parencite
1512 \end_layout
1513
1514 \end_inset
1515
1516
1517 \begin_inset ERT
1518 status collapsed
1519
1520 \begin_layout Plain Layout
1521
1522 {
1523 \end_layout
1524
1525 \end_inset
1526
1527 wang2018ripplenet
1528 \begin_inset ERT
1529 status collapsed
1530
1531 \begin_layout Plain Layout
1532
1533 }
1534 \end_layout
1535
1536 \end_inset
1537
1538 中计算用户偏好时并未考虑用户收藏,本文在计算用户偏好时,将用户收藏考虑在内,这在一定程度上缓解了数据稀缺性问题和冷启动问题并改进了推荐性能。
1539 \end_layout
1540
1541 \begin_layout Subsection
1542 架构
1543 \end_layout
1544
1545 \begin_layout Standard
1546 涟漪网络的总体架构如图
1547 \begin_inset CommandInset ref
1548 LatexCommand ref
1549 reference "fig:ripplenet-framework"
1550 plural "false"
1551 caps "false"
1552 noprefix "false"
1553
1554 \end_inset
1555
1556 所示,图上方的知识图谱中展示了由用户交互产生的涟漪。涟漪网络以一个用户
1557 \begin_inset Formula $u$
1558 \end_inset
1559
1560 和一个电影
1561 \begin_inset Formula $v$
1562 \end_inset
1563
1564 作为输入,并输出用户
1565 \begin_inset Formula $u$
1566 \end_inset
1567
1568 与电影
1569 \begin_inset Formula $v$
1570 \end_inset
1571
1572 之间产生交互的概率。对输入用户
1573 \begin_inset Formula $u$
1574 \end_inset
1575
1576 而言,其历史交互记录
1577 \begin_inset Formula $V_{u}$
1578 \end_inset
1579
1580 是知识图谱中的种子集,而后沿着知识图谱中的关系边形成多个涟漪集
1581 \begin_inset Formula $S_{u}^{k}\ (k=1,2,\dots,H)$
1582 \end_inset
1583
1584 。第
1585 \begin_inset Formula $k$
1586 \end_inset
1587
1588 个涟漪集是种子集
1589 \begin_inset Formula $V_{u}$
1590 \end_inset
1591
1592 经过
1593 \begin_inset Formula $k$
1594 \end_inset
1595
1596 跳得到的知识三元组。然后迭代地利用这些涟漪集与电影
1597 \begin_inset Formula $v$
1598 \end_inset
1599
1600 的嵌入表示(黄色的块)计算出用户
1601 \begin_inset Formula $u$
1602 \end_inset
1603
1604 对电影
1605 \begin_inset Formula $v$
1606 \end_inset
1607
1608 的的响应(绿色的块),最后结合得到用户的最终嵌入表示(灰色的块)。最终,利用用户
1609 \begin_inset Formula $u$
1610 \end_inset
1611
1612 与电影
1613 \begin_inset Formula $v$
1614 \end_inset
1615
1616 的嵌入表示计算出用户
1617 \begin_inset Formula $u$
1618 \end_inset
1619
1620 对电影
1621 \begin_inset Formula $v$
1622 \end_inset
1623
1624 感兴趣的预测概率
1625 \begin_inset Formula $y_{uv}$
1626 \end_inset
1627
1628 。
1629 \begin_inset Float figure
1630 placement document
1631 alignment document
1632 wide false
1633 sideways false
1634 status open
1635
1636 \begin_layout Plain Layout
1637 \begin_inset Graphics
1638 filename figures/ripplenet-framework.png
1639 width 100text%
1640
1641 \end_inset
1642
1643
1644 \begin_inset ERT
1645 status collapsed
1646
1647 \begin_layout Plain Layout
1648
1649
1650 \backslash
1651 bicaption
1652 \end_layout
1653
1654 \end_inset
1655
1656
1657 \begin_inset ERT
1658 status collapsed
1659
1660 \begin_layout Plain Layout
1661
1662 {
1663 \end_layout
1664
1665 \end_inset
1666
1667 涟漪网络的总体架构
1668 \begin_inset ERT
1669 status collapsed
1670
1671 \begin_layout Plain Layout
1672
1673 }
1674 \end_layout
1675
1676 \end_inset
1677
1678
1679 \begin_inset ERT
1680 status collapsed
1681
1682 \begin_layout Plain Layout
1683
1684 {
1685 \end_layout
1686
1687 \end_inset
1688
1689 The overall framework of the Ripple Network
1690 \begin_inset ERT
1691 status collapsed
1692
1693 \begin_layout Plain Layout
1694
1695 }
1696 \end_layout
1697
1698 \end_inset
1699
1700
1701 \begin_inset CommandInset label
1702 LatexCommand label
1703 name "fig:ripplenet-framework"
1704
1705 \end_inset
1706
1707
1708 \end_layout
1709
1710 \end_inset
1711
1712
1713 \end_layout
1714
1715 \begin_layout Subsection
1716 涟漪集
1717 \end_layout
1718
1719 \begin_layout Standard
1720 \begin_inset Float figure
1721 placement document
1722 alignment document
1723 wide false
1724 sideways false
1725 status open
1726
1727 \begin_layout Plain Layout
1728 \begin_inset Graphics
1729 filename figures/illustration-of-ripple-sets.png
1730 width 100text%
1731
1732 \end_inset
1733
1734
1735 \begin_inset ERT
1736 status collapsed
1737
1738 \begin_layout Plain Layout
1739
1740
1741 \backslash
1742 bicaption
1743 \end_layout
1744
1745 \end_inset
1746
1747
1748 \begin_inset ERT
1749 status collapsed
1750
1751 \begin_layout Plain Layout
1752
1753 {
1754 \end_layout
1755
1756 \end_inset
1757
1758 电影知识图谱中由“阿甘正传”激发的涟漪集
1759 \begin_inset ERT
1760 status collapsed
1761
1762 \begin_layout Plain Layout
1763
1764 }
1765 \end_layout
1766
1767 \end_inset
1768
1769
1770 \begin_inset ERT
1771 status collapsed
1772
1773 \begin_layout Plain Layout
1774
1775 {
1776 \end_layout
1777
1778 \end_inset
1779
1780 Sets of ripples of “Forest Gump” in Knowledge Graph of movies
1781 \begin_inset ERT
1782 status collapsed
1783
1784 \begin_layout Plain Layout
1785
1786 }
1787 \end_layout
1788
1789 \end_inset
1790
1791
1792 \begin_inset CommandInset label
1793 LatexCommand label
1794 name "fig:illustration-of-ripple-sets"
1795
1796 \end_inset
1797
1798
1799 \end_layout
1800
1801 \end_inset
1802
1803
1804 \end_layout
1805
1806 \begin_layout Standard
1807 知识图谱常常含有丰富的事实信息与实体间的联系。比如,图
1808 \begin_inset CommandInset ref
1809 LatexCommand ref
1810 reference "fig:illustration-of-ripple-sets"
1811 plural "false"
1812 caps "false"
1813 noprefix "false"
1814
1815 \end_inset
1816
1817 (图中不同颜色的圆圈表示不同跳数的涟漪集,越浅的蓝色代表种子集与该区域内实体的关联程度越低)中电影“阿甘正传”与“罗伯特·泽米吉斯”相连,它们之间的联系为“罗伯
1818 特·泽米吉斯”是电影“阿甘正传”的导演。而“回到未来”也与“罗伯特·泽米吉斯”相连。因此,如果一个用户与电影“阿甘正传”交互过,则他很有可能也对“回到未来”感兴
1819 趣。为了描述用户在知识图谱中分层次的潜在偏好集,递归定义用户
1820 \begin_inset Formula $u$
1821 \end_inset
1822
1823 的
1824 \begin_inset Formula $k$
1825 \end_inset
1826
1827 跳相关实体如下:
1828 \end_layout
1829
1830 \begin_layout Standard
1831
1832 \series bold
1833 定义1(相关实体集)
1834 \series default
1835 给定交互矩阵
1836 \begin_inset Formula $\Upsilon$
1837 \end_inset
1838
1839 与知识图谱
1840 \begin_inset Formula $G$
1841 \end_inset
1842
1843 ,则用户
1844 \begin_inset Formula $u$
1845 \end_inset
1846
1847 的
1848 \begin_inset Formula $k$
1849 \end_inset
1850
1851 跳相关实体集的定义为式
1852 \begin_inset CommandInset ref
1853 LatexCommand eqref
1854 reference "eq:relevant-entities"
1855 plural "false"
1856 caps "false"
1857 noprefix "false"
1858
1859 \end_inset
1860
1861 。
1862 \end_layout
1863
1864 \begin_layout Standard
1865 \begin_inset Formula
1866 \begin{equation}
1867 E_{u}^{k}=\{t|(h,r,t)\in G\text{且}h\in E_{u}^{k-1}\},k=1,2,\dots,H\label{eq:relevant-entities}
1868 \end{equation}
1869
1870 \end_inset
1871
1872
1873 \end_layout
1874
1875 \begin_layout Standard
1876 式
1877 \begin_inset CommandInset ref
1878 LatexCommand eqref
1879 reference "eq:relevant-entities"
1880 plural "false"
1881 caps "false"
1882 noprefix "false"
1883
1884 \end_inset
1885
1886 中,
1887 \begin_inset Formula $E_{u}^{0}=V_{u}=\{v|y_{uv}=1\}$
1888 \end_inset
1889
1890 是用户的历史偏好集(历史偏好集是指用户在最高为5的评分中给出的评分
1891 \begin_inset Formula $\geqslant$
1892 \end_inset
1893
1894 4的物品以及用户已加入收藏的物品),可以看作是用户
1895 \begin_inset Formula $u$
1896 \end_inset
1897
1898 在知识图谱中的种子集。
1899 \end_layout
1900
1901 \begin_layout Standard
1902 相关实体集可以看作是用户的历史偏好集在知识图谱中的自然扩展。给定相关实体集的定义,以下定义用户
1903 \begin_inset Formula $u$
1904 \end_inset
1905
1906 的
1907 \begin_inset Formula $k$
1908 \end_inset
1909
1910 跳涟漪集:
1911 \end_layout
1912
1913 \begin_layout Standard
1914
1915 \series bold
1916 定义2(涟漪集)
1917 \series default
1918 用户
1919 \begin_inset Formula $u$
1920 \end_inset
1921
1922 的
1923 \begin_inset Formula $k$
1924 \end_inset
1925
1926 跳涟漪集可以看作是知识图谱中以
1927 \begin_inset Formula $E_{u}^{k-1}$
1928 \end_inset
1929
1930 为起点的知识三元组,定义如式
1931 \begin_inset CommandInset ref
1932 LatexCommand eqref
1933 reference "eq:ripple-set"
1934 plural "false"
1935 caps "false"
1936 noprefix "false"
1937
1938 \end_inset
1939
1940 所示。
1941 \end_layout
1942
1943 \begin_layout Standard
1944 \begin_inset Formula
1945 \begin{equation}
1946 S_{u}^{k}=\{(h,r,t)|(h,r,t)\in G\text{且}h\in E_{u}^{k-1}\},k=1,2,\dots,H\label{eq:ripple-set}
1947 \end{equation}
1948
1949 \end_inset
1950
1951
1952 \end_layout
1953
1954 \begin_layout Standard
1955 “涟漪”这个词有两重意思:(1)对由多个雨点产生的真实涟漪的模拟,用户对电影的潜在兴趣集在知识图谱中由近及远地传递。这一过程如图
1956 \begin_inset CommandInset ref
1957 LatexCommand ref
1958 reference "fig:illustration-of-ripple-sets"
1959 plural "false"
1960 caps "false"
1961 noprefix "false"
1962
1963 \end_inset
1964
1965 所示。(2)用户的潜在兴趣随着知识图谱中传递的跳数
1966 \begin_inset Formula $k$
1967 \end_inset
1968
1969 的增大逐渐递减。图
1970 \begin_inset CommandInset ref
1971 LatexCommand ref
1972 reference "fig:illustration-of-ripple-sets"
1973 plural "false"
1974 caps "false"
1975 noprefix "false"
1976
1977 \end_inset
1978
1979 中蓝色的变浅显示了潜在兴趣递减的过程。
1980 \end_layout
1981
1982 \begin_layout Standard
1983 一个可能出现的问题是在跳数
1984 \begin_inset Formula $k$
1985 \end_inset
1986
1987 增加的过程中涟漪集的大小可能过大。为了解决这个问题,注意到:
1988 \end_layout
1989
1990 \begin_layout Standard
1991 (1)在真实使用的知识图谱中大量的实体是沉没实体,意思是它们只有传入链路而没有传出链路。
1992 \end_layout
1993
1994 \begin_layout Standard
1995 (2)在电影推荐的具体情境下,关系可以限制在情境相关的分类中以减少涟漪集的数量并提高实体间的相关度。
1996 \end_layout
1997
1998 \begin_layout Standard
1999 (3)最大跳数
2000 \begin_inset Formula $H$
2001 \end_inset
2002
2003 通常在实际应用中不会过大,因为离用户历史偏好集较远的实体会带来更多的错误推荐而不是更丰富的推荐结果。
2004 \end_layout
2005
2006 \begin_layout Standard
2007 (4)在涟漪网络中,我们可以对一个固定大小的邻集而不是对完整的涟漪集采样从而更进一步地减小计算工作量。设计这样的采样器是一个重要的工作,尤其是非统一的采样器能更
2008 好地捕获用户的分等级的潜在兴趣。
2009 \end_layout
2010
2011 \begin_layout Subsection
2012 偏好扩散
2013 \end_layout
2014
2015 \begin_layout Standard
2016 \begin_inset CommandInset label
2017 LatexCommand label
2018 name "sec:osum"
2019
2020 \end_inset
2021
2022 传统的协同过滤算法是通过学习用户与物品间的潜在联系来完成推荐,而在涟漪网络算法中,这一过程是通过偏好扩散完成的:对每个用户,涟漪网络将他的过往兴趣视为知识图谱
2023 中的种子集,然后沿知识图谱中的路径不断地拓展用户的潜在兴趣集,进而得到按等级划分的关于候选物品的潜在兴趣集。我们利用现实生活中的由雨滴产生的涟漪在水面上扩散来模
2024 拟偏好扩散的过程,其中多个“涟漪”重叠形成基于知识图谱的用户偏好分布。
2025 \end_layout
2026
2027 \begin_layout Standard
2028 如图
2029 \begin_inset CommandInset ref
2030 LatexCommand ref
2031 reference "fig:ripplenet-framework"
2032 plural "false"
2033 caps "false"
2034 noprefix "false"
2035
2036 \end_inset
2037
2038 ,每部电影都有一个嵌入表示
2039 \begin_inset Formula $v$
2040 \end_inset
2041
2042 ,
2043 \begin_inset Formula $v\in\mathbb{R}^{d}$
2044 \end_inset
2045
2046 ,其中
2047 \begin_inset Formula $\mathbb{R}$
2048 \end_inset
2049
2050 是实数集,
2051 \begin_inset Formula $d$
2052 \end_inset
2053
2054 是嵌入表示向量的维数。给定电影的嵌入表示
2055 \begin_inset Formula $v$
2056 \end_inset
2057
2058 以及用户
2059 \begin_inset Formula $1$
2060 \end_inset
2061
2062 跳涟漪集
2063 \begin_inset Formula $S_{u}^{1}$
2064 \end_inset
2065
2066 ,可以利用电影
2067 \begin_inset Formula $v$
2068 \end_inset
2069
2070 、
2071 \begin_inset Formula $S_{u}^{1}$
2072 \end_inset
2073
2074 中的三元组中头节点
2075 \begin_inset Formula $head_{i}$
2076 \end_inset
2077
2078 以及该三元组中的关系
2079 \begin_inset Formula $r_{i}$
2080 \end_inset
2081
2082 来计算出电影
2083 \begin_inset Formula $v$
2084 \end_inset
2085
2086 和实体
2087 \begin_inset Formula $head_{i}$
2088 \end_inset
2089
2090 之间的相关度,如式
2091 \begin_inset CommandInset ref
2092 LatexCommand eqref
2093 reference "eq:item-entity-relevance"
2094 plural "false"
2095 caps "false"
2096 noprefix "false"
2097
2098 \end_inset
2099
2100 所示。
2101 \end_layout
2102
2103 \begin_layout Standard
2104 \begin_inset Formula
2105 \begin{equation}
2106 p_{i}=softmax(v^{T}R_{i}h_{i})=\frac{exp(v^{T}R_{i}h_{i})}{\sum_{(h,r,t)\in S_{u}^{1}}exp(v^{T}Rh)}\label{eq:item-entity-relevance}
2107 \end{equation}
2108
2109 \end_inset
2110
2111
2112 \end_layout
2113
2114 \begin_layout Standard
2115 式
2116 \begin_inset CommandInset ref
2117 LatexCommand eqref
2118 reference "eq:item-entity-relevance"
2119 plural "false"
2120 caps "false"
2121 noprefix "false"
2122
2123 \end_inset
2124
2125 中,
2126 \begin_inset Formula $R_{i}\in\mathbb{R}^{d\times d}$
2127 \end_inset
2128
2129 与
2130 \begin_inset Formula $h_{i}\in\mathbb{R}^{d}$
2131 \end_inset
2132
2133 分别是关系
2134 \begin_inset Formula $r_{i}$
2135 \end_inset
2136
2137 和头节点
2138 \begin_inset Formula $h_{i}$
2139 \end_inset
2140
2141 的嵌入表示。相关度
2142 \begin_inset Formula $p_{i}$
2143 \end_inset
2144
2145 为向量空间
2146 \begin_inset Formula $R_{i}$
2147 \end_inset
2148
2149 中的电影
2150 \begin_inset Formula $v$
2151 \end_inset
2152
2153 与实体
2154 \begin_inset Formula $h_{i}$
2155 \end_inset
2156
2157 之间的相似度。同时还考虑了关系信息的嵌入表示矩阵在计算电影
2158 \begin_inset Formula $v$
2159 \end_inset
2160
2161 与实体
2162 \begin_inset Formula $h_{i}$
2163 \end_inset
2164
2165 之间的相似度,因为不同电影-实体对之间的相似度在不同关系的场景下可能有所不同。比如,“阿甘正传”与“回到未来”在导演方面有很高的相似度,但它们在体裁或剧作家方面
2166 可能没有联系。
2167 \end_layout
2168
2169 \begin_layout Standard
2170 在完成相似度计算之后,将
2171 \begin_inset Formula $S_{u}^{1}$
2172 \end_inset
2173
2174 中三元组的尾节点根据计算得到的相似度进行加权求和,得到向量
2175 \begin_inset Formula $o_{u}^{1}$
2176 \end_inset
2177
2178 ,如式
2179 \begin_inset CommandInset ref
2180 LatexCommand eqref
2181 reference "eq:o1"
2182 plural "false"
2183 caps "false"
2184 noprefix "false"
2185
2186 \end_inset
2187
2188 所示。
2189 \end_layout
2190
2191 \begin_layout Standard
2192 \begin_inset Formula
2193 \begin{equation}
2194 o_{u}^{1}=\sum_{(h_{i},r_{i},t_{i})\in S_{u}^{1}}p_{i}t_{i}\label{eq:o1}
2195 \end{equation}
2196
2197 \end_inset
2198
2199
2200 \end_layout
2201
2202 \begin_layout Standard
2203 式
2204 \begin_inset CommandInset ref
2205 LatexCommand eqref
2206 reference "eq:o1"
2207 plural "false"
2208 caps "false"
2209 noprefix "false"
2210
2211 \end_inset
2212
2213 中,
2214 \begin_inset Formula $t_{i}\in\mathbb{R}^{d}$
2215 \end_inset
2216
2217 ,
2218 \begin_inset Formula $t_{i}$
2219 \end_inset
2220
2221 是事实三元组中的尾节点。向量
2222 \begin_inset Formula $o_{u}^{1}$
2223 \end_inset
2224
2225 可以视为用户偏好集
2226 \begin_inset Formula $V_{u}$
2227 \end_inset
2228
2229 关于电影
2230 \begin_inset Formula $v$
2231 \end_inset
2232
2233 的
2234 \begin_inset Formula $1$
2235 \end_inset
2236
2237 次响应。与协同过滤算法类似的是,它根据用户交互过的物品来表示用户嵌入而不是使用单独的参数来表示用户,从而减少了参数数量。通过式
2238 \begin_inset CommandInset ref
2239 LatexCommand eqref
2240 reference "eq:item-entity-relevance"
2241 plural "false"
2242 caps "false"
2243 noprefix "false"
2244
2245 \end_inset
2246
2247 与式
2248 \begin_inset CommandInset ref
2249 LatexCommand eqref
2250 reference "eq:o1"
2251 plural "false"
2252 caps "false"
2253 noprefix "false"
2254
2255 \end_inset
2256
2257 ,用户的偏好从其交互过的电影(即种子集)成功在知识图谱中进行了一次扩散,这称为涟漪网络中的偏好扩散。
2258 \end_layout
2259
2260 \begin_layout Standard
2261 可以将式
2262 \begin_inset CommandInset ref
2263 LatexCommand eqref
2264 reference "eq:item-entity-relevance"
2265 plural "false"
2266 caps "false"
2267 noprefix "false"
2268
2269 \end_inset
2270
2271 中的
2272 \begin_inset Formula $v$
2273 \end_inset
2274
2275 替换为
2276 \begin_inset Formula $o_{u}^{1}$
2277 \end_inset
2278
2279 ,我们可以再次进行偏好扩散以得到用户的2次响应
2280 \begin_inset Formula $o_{u}^{2}$
2281 \end_inset
2282
2283 。以此类推,最终我们可以将该用户的偏好集扩散至
2284 \begin_inset Formula $H$
2285 \end_inset
2286
2287 跳,得到用户的涟漪集
2288 \begin_inset Formula $S_{u}^{i},i=1,\dots,H$
2289 \end_inset
2290
2291 。从中可以得到用户的多次响应
2292 \begin_inset Formula $o_{u}^{1},o_{u}^{2},o_{u}^{H}$
2293 \end_inset
2294
2295 。用户
2296 \begin_inset Formula $u$
2297 \end_inset
2298
2299 关于电影
2300 \begin_inset Formula $v$
2301 \end_inset
2302
2303 的嵌入表示是通过结合所有的不同响应并计算得到的,如式
2304 \begin_inset CommandInset ref
2305 LatexCommand eqref
2306 reference "eq:osum"
2307 plural "false"
2308 caps "false"
2309 noprefix "false"
2310
2311 \end_inset
2312
2313 所示。
2314 \begin_inset Formula
2315 \begin{equation}
2316 u=o_{u}^{1}+o_{u}^{2}+\dots+o_{u}^{H}\label{eq:osum}
2317 \end{equation}
2318
2319 \end_inset
2320
2321
2322 \end_layout
2323
2324 \begin_layout Standard
2325 尽管最后一跳的用户响应中理论上包含了所有之前得到的信息,但是对
2326 \begin_inset Formula $o_{u}^{k}$
2327 \end_inset
2328
2329 进行求和仍然是有必要的,因为之前得到的用户响应可能在偏好传递的过程中稀释了,因此仅使用最后一跳的响应不能很好地表示用户嵌入。最终,利用用户嵌入与电影嵌入,计算出
2330 用户对电影感兴趣的概率,如式
2331 \begin_inset CommandInset ref
2332 LatexCommand eqref
2333 reference "eq:predicted-possibility"
2334 plural "false"
2335 caps "false"
2336 noprefix "false"
2337
2338 \end_inset
2339
2340 所示。
2341 \begin_inset Formula
2342 \begin{equation}
2343 y_{uv}=\zeta(u^{T}v)\label{eq:predicted-possibility}
2344 \end{equation}
2345
2346 \end_inset
2347
2348
2349 \end_layout
2350
2351 \begin_layout Standard
2352 其中,
2353 \begin_inset Formula $\zeta(x)=\frac{1}{1+exp(-x)}$
2354 \end_inset
2355
2356 是sigmoid函数。
2357 \end_layout
2358
2359 \begin_layout Section
2360 学习算法
2361 \end_layout
2362
2363 \begin_layout Standard
2364 在涟漪网络算法中,我们的目标是通过式
2365 \begin_inset CommandInset ref
2366 LatexCommand eqref
2367 reference "eq:predicted-possibility"
2368 plural "false"
2369 caps "false"
2370 noprefix "false"
2371
2372 \end_inset
2373
2374 求出用户对电影感兴趣的概率。但是,为了将其计算出来我们需要先求出所有物品、用户以及关系的嵌入表示,如第
2375 \begin_inset CommandInset ref
2376 LatexCommand ref
2377 reference "sec:osum"
2378 plural "false"
2379 caps "false"
2380 noprefix "false"
2381
2382 \end_inset
2383
2384 节中所述,用户的嵌入表示可以通过其涟漪集来代替,以此消元。但物品及关系的嵌入表示却是需要求出来的。
2385 \end_layout
2386
2387 \begin_layout Standard
2388 为了求出物品及关系的嵌入表示,这里使用最大后验概率估计的方法。
2389 \end_layout
2390
2391 \begin_layout Standard
2392 我们的目标是在已经得到知识图谱
2393 \begin_inset Formula $G$
2394 \end_inset
2395
2396 以及用户与电影的交互矩阵
2397 \begin_inset Formula $\Upsilon$
2398 \end_inset
2399
2400 的情况下最大化模型参数
2401 \begin_inset Formula $\Gamma$
2402 \end_inset
2403
2404 ,如式
2405 \begin_inset CommandInset ref
2406 LatexCommand eqref
2407 reference "eq:max"
2408 plural "false"
2409 caps "false"
2410 noprefix "false"
2411
2412 \end_inset
2413
2414 所示。
2415 \begin_inset Formula
2416 \begin{equation}
2417 max\ p(\Gamma|G,\Upsilon)\label{eq:max}
2418 \end{equation}
2419
2420 \end_inset
2421
2422
2423 \end_layout
2424
2425 \begin_layout Standard
2426 式
2427 \begin_inset CommandInset ref
2428 LatexCommand eqref
2429 reference "eq:max"
2430 plural "false"
2431 caps "false"
2432 noprefix "false"
2433
2434 \end_inset
2435
2436 中,参数
2437 \begin_inset Formula $\Gamma$
2438 \end_inset
2439
2440 包含了全部的实体、关系和电影的嵌入表示。可以将式
2441 \begin_inset CommandInset ref
2442 LatexCommand eqref
2443 reference "eq:max"
2444 plural "false"
2445 caps "false"
2446 noprefix "false"
2447
2448 \end_inset
2449
2450 等价于最大化式
2451 \begin_inset CommandInset ref
2452 LatexCommand eqref
2453 reference "eq:equal-max"
2454 plural "false"
2455 caps "false"
2456 noprefix "false"
2457
2458 \end_inset
2459
2460 。
2461 \end_layout
2462
2463 \begin_layout Standard
2464 \begin_inset Formula
2465 \begin{equation}
2466 p(\Gamma|G,\Upsilon)=\frac{p(\Gamma,G,\Upsilon)}{p(G,\Upsilon)}\varpropto p(\Gamma)\centerdot p(G|\Gamma)\centerdot p(\Upsilon|\Gamma,G)\label{eq:equal-max}
2467 \end{equation}
2468
2469 \end_inset
2470
2471
2472 \end_layout
2473
2474 \begin_layout Standard
2475 根据贝叶斯公式,在式
2476 \begin_inset CommandInset ref
2477 LatexCommand eqref
2478 reference "eq:equal-max"
2479 plural "false"
2480 caps "false"
2481 noprefix "false"
2482
2483 \end_inset
2484
2485 中,第一项
2486 \begin_inset Formula $p(\Gamma)$
2487 \end_inset
2488
2489 代表模型参数的先验概率。设
2490 \begin_inset Formula $p(\Gamma)$
2491 \end_inset
2492
2493 为均值为0,方差为对角协方差矩阵的正态分布,如式
2494 \begin_inset CommandInset ref
2495 LatexCommand eqref
2496 reference "eq:normal-distribution"
2497 plural "false"
2498 caps "false"
2499 noprefix "false"
2500
2501 \end_inset
2502
2503 所示。
2504 \end_layout
2505
2506 \begin_layout Standard
2507 \begin_inset Formula
2508 \begin{equation}
2509 p(\Gamma)=N(0,\lambda_{1}^{-1}I)\label{eq:normal-distribution}
2510 \end{equation}
2511
2512 \end_inset
2513
2514
2515 \end_layout
2516
2517 \begin_layout Standard
2518 式
2519 \begin_inset CommandInset ref
2520 LatexCommand eqref
2521 reference "eq:equal-max"
2522 plural "false"
2523 caps "false"
2524 noprefix "false"
2525
2526 \end_inset
2527
2528 中,
2529 \begin_inset Formula $p(G|\Gamma)$
2530 \end_inset
2531
2532 是给定
2533 \begin_inset Formula $\Gamma$
2534 \end_inset
2535
2536 的知识图谱的最大似然函数。最近,有研究者提出了多种计算知识图谱嵌入的方法,包括基于距离的方法和基于语义匹配的方法。在本算法中,使用三路张量分解的方法来建立知识图
2537 谱嵌入的最大似然函数,如式
2538 \begin_inset CommandInset ref
2539 LatexCommand eqref
2540 reference "eq:term2"
2541 plural "false"
2542 caps "false"
2543 noprefix "false"
2544
2545 \end_inset
2546
2547 。
2548 \end_layout
2549
2550 \begin_layout Standard
2551 \begin_inset Formula
2552 \begin{equation}
2553 p(G|\Gamma)=\prod_{(h,r,t)\in E\times R\times E}p((h,r,t)|\Gamma)=\prod_{(h,r,t)\in E\times R\times E}N(I_{h,r,t}-h^{T}Rt,\lambda_{2}^{-1})\label{eq:term2}
2554 \end{equation}
2555
2556 \end_inset
2557
2558
2559 \end_layout
2560
2561 \begin_layout Standard
2562 式
2563 \begin_inset CommandInset ref
2564 LatexCommand eqref
2565 reference "eq:term2"
2566 plural "false"
2567 caps "false"
2568 noprefix "false"
2569
2570 \end_inset
2571
2572 中,若
2573 \begin_inset Formula $I_{h,r,t}\in G$
2574 \end_inset
2575
2576 则标志
2577 \begin_inset Formula $I_{h,r,t}$
2578 \end_inset
2579
2580 等于1,否则为0。式
2581 \begin_inset CommandInset ref
2582 LatexCommand eqref
2583 reference "eq:equal-max"
2584 plural "false"
2585 caps "false"
2586 noprefix "false"
2587
2588 \end_inset
2589
2590 中的第三项是给定
2591 \begin_inset Formula $\Gamma$
2592 \end_inset
2593
2594 与知识图谱的似然函数,可以看作伯努利分布的累乘,如式
2595 \begin_inset CommandInset ref
2596 LatexCommand eqref
2597 reference "eq:bernoulli"
2598 plural "false"
2599 caps "false"
2600 noprefix "false"
2601
2602 \end_inset
2603
2604 。
2605 \end_layout
2606
2607 \begin_layout Standard
2608 \begin_inset Formula
2609 \begin{equation}
2610 p(\Upsilon|\Gamma,G)=\prod_{(u,v)\in\Upsilon}\zeta(u^{T}v)^{y_{uv}}\centerdot(1-\zeta(u^{T}v))^{1-y_{uv}}\label{eq:bernoulli}
2611 \end{equation}
2612
2613 \end_inset
2614
2615
2616 \end_layout
2617
2618 \begin_layout Standard
2619 对式
2620 \begin_inset CommandInset ref
2621 LatexCommand eqref
2622 reference "eq:equal-max"
2623 plural "false"
2624 caps "false"
2625 noprefix "false"
2626
2627 \end_inset
2628
2629 取负对数,有如式
2630 \begin_inset CommandInset ref
2631 LatexCommand eqref
2632 reference "eq:term3"
2633 plural "false"
2634 caps "false"
2635 noprefix "false"
2636
2637 \end_inset
2638
2639 所示的损失函数:
2640 \begin_inset Formula
2641 \begin{multline}
2642 min\ L=-log(p(\Upsilon|\Gamma,G)\centerdot p(G|\Gamma)\centerdot p(\Gamma))\\
2643 =\sum_{(u,v)\in\Upsilon}-(y_{uv}log\ \zeta(u^{T}v)+(1-y_{uv}log(1-\zeta(u^{T}v))))\\
2644 +\frac{\lambda_{2}}{2}\sum_{r\in R}\|I_{r}-E^{T}RE\|_{2}^{2}+\frac{\lambda_{1}}{2}(\|V\|_{2}^{2}+\|E\|_{2}^{2}+\sum_{r\in R}\|R\|_{2}^{2})\label{eq:term3}
2645 \end{multline}
2646
2647 \end_inset
2648
2649
2650 \end_layout
2651
2652 \begin_layout Standard
2653 式
2654 \begin_inset CommandInset ref
2655 LatexCommand eqref
2656 reference "eq:term3"
2657 plural "false"
2658 caps "false"
2659 noprefix "false"
2660
2661 \end_inset
2662
2663 中,
2664 \begin_inset Formula $V$
2665 \end_inset
2666
2667 和
2668 \begin_inset Formula $E$
2669 \end_inset
2670
2671 是所有电影与实体的嵌入表示,
2672 \begin_inset Formula $I_{r}$
2673 \end_inset
2674
2675 是在知识图谱中对关系
2676 \begin_inset Formula $r$
2677 \end_inset
2678
2679 的标志向量
2680 \begin_inset Formula $I$
2681 \end_inset
2682
2683 的分向量。在式
2684 \begin_inset CommandInset ref
2685 LatexCommand eqref
2686 reference "eq:term3"
2687 plural "false"
2688 caps "false"
2689 noprefix "false"
2690
2691 \end_inset
2692
2693 中,第一项是交互矩阵
2694 \begin_inset Formula $\Upsilon$
2695 \end_inset
2696
2697 与涟漪网络的估测值之间的交叉熵,第二项是真实的知识图谱分向量
2698 \begin_inset Formula $I_{r}$
2699 \end_inset
2700
2701 以及人为构建的指示矩阵
2702 \begin_inset Formula $E^{T}RE$
2703 \end_inset
2704
2705 之间的均方误差,最后一项是为防止过拟合加入的正则项。
2706 \end_layout
2707
2708 \begin_layout Standard
2709 直接求解上式来得到参数
2710 \begin_inset Formula $\Gamma$
2711 \end_inset
2712
2713 是不可能的,因此可以使用随机梯度下降算法递归地优化损失函数来求解模型参数,而后再计算参数
2714 \begin_inset Formula $\Gamma$
2715 \end_inset
2716
2717 的损失函数的梯度,并根据采样得到的一小批数据反向传递,然后更新参数并最终得到参数
2718 \begin_inset Formula $\Gamma$
2719 \end_inset
2720
2721 。
2722 \end_layout
2723
2724 \begin_layout Section
2725 分析
2726 \end_layout
2727
2728 \begin_layout Subsection
2729 可解释性
2730 \end_layout
2731
2732 \begin_layout Standard
2733 可解释的推荐系统旨在阐释为什么用户会对一件物品感兴趣,这帮助提升用户对推荐结果的满意度以及对推荐系统的信任。对推荐结果的解释通常基于标签、语义分析等。因为涟漪网
2734 络探索用户基于知识图谱的兴趣,因此它提供了一种基于知识图谱中的关系路径来阐述推荐结果的全新方式。比如,在图
2735 \begin_inset CommandInset ref
2736 LatexCommand ref
2737 reference "fig:illustration-of-ripple-sets"
2738 plural "false"
2739 caps "false"
2740 noprefix "false"
2741
2742 \end_inset
2743
2744 中,当用户对“幸福终点站”感兴趣,则该用户也可能对“荒岛余生”感兴趣。因为在知识图谱中,“汤姆·汉克斯”与“幸福终点站”相连,关系是演员,而“汤姆·汉克斯”与“
2745 荒岛余生”也相连,关系也是演员,换句话说,“荒岛余生”与“幸福终点站”有相同的演员。这便解释了用户对“幸福终点站”和“荒岛余生”同时感兴趣的原因。涟漪网络算法通
2746 过在知识图谱中寻找与用户交互过的电影(种子集)相连的物品,并不断扩散,最终确保推荐结果具有较高的准确性。
2747 \end_layout
2748
2749 \begin_layout Subsection
2750 涟漪重叠
2751 \end_layout
2752
2753 \begin_layout Standard
2754 在涟漪网络中,一个可能的问题是涟漪集中的电影非常多,从而在偏好传递的过程中不可避免地导致用户的真实潜在偏好信息被稀释。然而,用户点击记录中不同的电影常常高度重叠
2755 (从种子集出发到达一部电影常常有不止一条路径),这在很大程度上避免了真实潜在偏好信息被稀释的问题。比如,在图
2756 \begin_inset CommandInset ref
2757 LatexCommand ref
2758 reference "fig:illustration-of-ripple-sets"
2759 plural "false"
2760 caps "false"
2761 noprefix "false"
2762
2763 \end_inset
2764
2765 中,如果一个用户喜欢“阿甘正传”,则他也可能喜欢“荒岛余生”。在该知识图谱中,从“阿甘正传”到“荒岛余生”有两条路径:“阿甘正传-U.S.-荒岛余生”与“阿甘正传-
2766 汤姆·汉克斯-荒岛余生”,这正是涟漪重叠的表现。
2767 \end_layout
2768
2769 \begin_layout Section
2770 测试
2771 \end_layout
2772
2773 \begin_layout Subsection
2774 数据集
2775 \end_layout
2776
2777 \begin_layout Standard
2778 本测试使用“MovieLens 1M Dataset”数据集。该数据集由电影信息、用户信息以及用户对电影的评价三部分组成。其中,含有电影数据3883条、用户数据
2779 6040条以及1000209条用户对电影的评价数据。因该数据集数据量适中,数据准确可靠,因此在推荐系统的性能测试中被广泛使用。
2780 \end_layout
2781
2782 \begin_layout Standard
2783 本测试使用的知识图谱来自Microsoft Satori,是依据“MovieLens 1M Dataset”中的电影名称从Microsoft Satori中提取
2784 相关的节点的与关系数据得到的。
2785 \end_layout
2786
2787 \begin_layout Subsection
2788 基线
2789 \end_layout
2790
2791 \begin_layout Standard
2792 本测试中,会将本算法的测试结果与以下算法的相比较:
2793 \end_layout
2794
2795 \begin_layout Standard
2796 DKN
2797 \begin_inset CommandInset citation
2798 LatexCommand cite
2799 key "wang2018dkn"
2800 literal "false"
2801
2802 \end_inset
2803
2804 是由微软团队在WWW2018会议上发表的。它是一个主要针对新闻任务提出的框架,知识图谱用于辅助计算新闻标题的嵌入表示。DKN提出对新闻标题内每一个关键实体,在知
2805 识图谱内找到其实体嵌入和上下文嵌入。
2806 \end_layout
2807
2808 \begin_layout Standard
2809 CKE
2810 \begin_inset CommandInset citation
2811 LatexCommand cite
2812 key "zhang2016collaborative"
2813 literal "false"
2814
2815 \end_inset
2816
2817 是微软在KDD2016年发表的,其模型结构在原有系统过滤得到
2818 \begin_inset Formula $U$
2819 \end_inset
2820
2821 ,
2822 \begin_inset Formula $V$
2823 \end_inset
2824
2825 向量的基础上,将物品的嵌入与其他描述信息相结合,这些信息主要有: 采用TransR算法计算知识图谱嵌入表示,知识图谱内每个实体嵌入表示被提取为物品的结构化向量信
2826 息。 采用SDAE模型得到物品描述性文本的文本性嵌入表示。 采用SCAE模型得到物品相关图像的视觉嵌入表示。
2827 \end_layout
2828
2829 \begin_layout Standard
2830 SHINE
2831 \begin_inset CommandInset citation
2832 LatexCommand cite
2833 key "wang2018shine"
2834 literal "false"
2835
2836 \end_inset
2837
2838 设计深度自编码器并嵌入语义网络以及社交网络来进行推荐。其为用户-物品的交互使用自动编码器并刻画用户感兴趣的概率。
2839 \end_layout
2840
2841 \begin_layout Standard
2842 PER
2843 \begin_inset CommandInset citation
2844 LatexCommand cite
2845 key "yu2014personalized"
2846 literal "false"
2847
2848 \end_inset
2849
2850 是以基于路径的方法来将知识图谱作为辅助信息中的比较经典的算法。其提出的元路径可以为推荐系统提供可靠的方向,但是需要使用者了解领域内知识,进行人为路径设计。
2851 \end_layout
2852
2853 \begin_layout Standard
2854 LibFM
2855 \begin_inset CommandInset citation
2856 LatexCommand cite
2857 key "rendle2012factorization"
2858 literal "false"
2859
2860 \end_inset
2861
2862 是一个广泛使用的在CTR场景中的分解推荐模型。
2863 \end_layout
2864
2865 \begin_layout Standard
2866 Wide&Deep
2867 \begin_inset CommandInset citation
2868 LatexCommand cite
2869 key "cheng2016wide"
2870 literal "false"
2871
2872 \end_inset
2873
2874 是一个结合线性路径的推荐模型。类似于LibFM,我们将用户、物品及实体的嵌入表示作为其输入。
2875 \end_layout
2876
2877 \begin_layout Subsection
2878 测试步骤
2879 \end_layout
2880
2881 \begin_layout Standard
2882 在涟漪网络中,设置跳数
2883 \begin_inset Formula $H=2$
2884 \end_inset
2885
2886 。根据实验结果,较大的跳数几乎无法提高性能却会造成较大的计算开销。我们将数据划分为训练集、评估集与测试集,按照6:2:2的比例进行分配。实验进行5次,计算准确度
2887 以及AUC然后取平均值。
2888 \end_layout
2889
2890 \begin_layout Subsection
2891 结果
2892 \end_layout
2893
2894 \begin_layout Standard
2895 测试结果如表
2896 \begin_inset CommandInset ref
2897 LatexCommand ref
2898 reference "tab:acc-auc"
2899 plural "false"
2900 caps "false"
2901 noprefix "false"
2902
2903 \end_inset
2904
2905 中所示,总体上涟漪网络算法的性能最佳,其次是Wide&Deep算法,说明他们可以充分利用知识图谱中的有效信息来辅助推荐算法。而表现最差的是PER算法,这可能是因
2906 为手工定义的元路径在电影推荐方面效果较差。
2907 \begin_inset Float table
2908 placement document
2909 alignment document
2910 wide false
2911 sideways false
2912 status open
2913
2914 \begin_layout Plain Layout
2915 \begin_inset ERT
2916 status collapsed
2917
2918 \begin_layout Plain Layout
2919
2920
2921 \backslash
2922 bicaption
2923 \end_layout
2924
2925 \end_inset
2926
2927
2928 \begin_inset ERT
2929 status collapsed
2930
2931 \begin_layout Plain Layout
2932
2933 {
2934 \end_layout
2935
2936 \end_inset
2937
2938 在兴趣预测计算中的AUC和准确度
2939 \begin_inset ERT
2940 status collapsed
2941
2942 \begin_layout Plain Layout
2943
2944 }
2945 \end_layout
2946
2947 \end_inset
2948
2949
2950 \begin_inset ERT
2951 status collapsed
2952
2953 \begin_layout Plain Layout
2954
2955 {
2956 \end_layout
2957
2958 \end_inset
2959
2960 AUC and ACC in interest prediction
2961 \begin_inset ERT
2962 status collapsed
2963
2964 \begin_layout Plain Layout
2965
2966 }
2967 \end_layout
2968
2969 \end_inset
2970
2971
2972 \begin_inset CommandInset label
2973 LatexCommand label
2974 name "tab:acc-auc"
2975
2976 \end_inset
2977
2978
2979 \begin_inset Tabular
2980 <lyxtabular version="3" rows="7" columns="3">
2981 <features booktabs="true" tabularvalignment="middle">
2982 <column alignment="center" valignment="top">
2983 <column alignment="center" valignment="top">
2984 <column alignment="center" valignment="top">
2985 <row>
2986 <cell alignment="center" valignment="top" topline="true" usebox="none">
2987 \begin_inset Text
2988
2989 \begin_layout Plain Layout
2990 算法
2991 \end_layout
2992
2993 \end_inset
2994 </cell>
2995 <cell alignment="center" valignment="top" topline="true" usebox="none">
2996 \begin_inset Text
2997
2998 \begin_layout Plain Layout
2999 AUC
3000 \end_layout
3001
3002 \end_inset
3003 </cell>
3004 <cell alignment="center" valignment="top" topline="true" usebox="none">
3005 \begin_inset Text
3006
3007 \begin_layout Plain Layout
3008 准确度
3009 \end_layout
3010
3011 \end_inset
3012 </cell>
3013 </row>
3014 <row>
3015 <cell alignment="center" valignment="top" topline="true" usebox="none">
3016 \begin_inset Text
3017
3018 \begin_layout Plain Layout
3019 涟漪网络
3020 \end_layout
3021
3022 \end_inset
3023 </cell>
3024 <cell alignment="center" valignment="top" topline="true" usebox="none">
3025 \begin_inset Text
3026
3027 \begin_layout Plain Layout
3028 0.899
3029 \end_layout
3030
3031 \end_inset
3032 </cell>
3033 <cell alignment="center" valignment="top" topline="true" usebox="none">
3034 \begin_inset Text
3035
3036 \begin_layout Plain Layout
3037 0.835
3038 \end_layout
3039
3040 \end_inset
3041 </cell>
3042 </row>
3043 <row>
3044 <cell alignment="center" valignment="top" usebox="none">
3045 \begin_inset Text
3046
3047 \begin_layout Plain Layout
3048 DKN
3049 \end_layout
3050
3051 \end_inset
3052 </cell>
3053 <cell alignment="center" valignment="top" usebox="none">
3054 \begin_inset Text
3055
3056 \begin_layout Plain Layout
3057 0.655
3058 \end_layout
3059
3060 \end_inset
3061 </cell>
3062 <cell alignment="center" valignment="top" usebox="none">
3063 \begin_inset Text
3064
3065 \begin_layout Plain Layout
3066 0.589
3067 \end_layout
3068
3069 \end_inset
3070 </cell>
3071 </row>
3072 <row>
3073 <cell alignment="center" valignment="top" usebox="none">
3074 \begin_inset Text
3075
3076 \begin_layout Plain Layout
3077 CKE
3078 \end_layout
3079
3080 \end_inset
3081 </cell>
3082 <cell alignment="center" valignment="top" usebox="none">
3083 \begin_inset Text
3084
3085 \begin_layout Plain Layout
3086 0.796
3087 \end_layout
3088
3089 \end_inset
3090 </cell>
3091 <cell alignment="center" valignment="top" usebox="none">
3092 \begin_inset Text
3093
3094 \begin_layout Plain Layout
3095 0.739
3096 \end_layout
3097
3098 \end_inset
3099 </cell>
3100 </row>
3101 <row>
3102 <cell alignment="center" valignment="top" usebox="none">
3103 \begin_inset Text
3104
3105 \begin_layout Plain Layout
3106 SHINE
3107 \end_layout
3108
3109 \end_inset
3110 </cell>
3111 <cell alignment="center" valignment="top" usebox="none">
3112 \begin_inset Text
3113
3114 \begin_layout Plain Layout
3115 0.778
3116 \end_layout
3117
3118 \end_inset
3119 </cell>
3120 <cell alignment="center" valignment="top" usebox="none">
3121 \begin_inset Text
3122
3123 \begin_layout Plain Layout
3124 0.732
3125 \end_layout
3126
3127 \end_inset
3128 </cell>
3129 </row>
3130 <row>
3131 <cell alignment="center" valignment="top" usebox="none">
3132 \begin_inset Text
3133
3134 \begin_layout Plain Layout
3135 LibFM
3136 \end_layout
3137
3138 \end_inset
3139 </cell>
3140 <cell alignment="center" valignment="top" usebox="none">
3141 \begin_inset Text
3142
3143 \begin_layout Plain Layout
3144 0.892
3145 \end_layout
3146
3147 \end_inset
3148 </cell>
3149 <cell alignment="center" valignment="top" usebox="none">
3150 \begin_inset Text
3151
3152 \begin_layout Plain Layout
3153 0.812
3154 \end_layout
3155
3156 \end_inset
3157 </cell>
3158 </row>
3159 <row>
3160 <cell alignment="center" valignment="top" bottomline="true" usebox="none">
3161 \begin_inset Text
3162
3163 \begin_layout Plain Layout
3164 Wide&Deep
3165 \end_layout
3166
3167 \end_inset
3168 </cell>
3169 <cell alignment="center" valignment="top" bottomline="true" usebox="none">
3170 \begin_inset Text
3171
3172 \begin_layout Plain Layout
3173 0.903
3174 \end_layout
3175
3176 \end_inset
3177 </cell>
3178 <cell alignment="center" valignment="top" bottomline="true" usebox="none">
3179 \begin_inset Text
3180
3181 \begin_layout Plain Layout
3182 0.822
3183 \end_layout
3184
3185 \end_inset
3186 </cell>
3187 </row>
3188 </lyxtabular>
3189
3190 \end_inset
3191
3192
3193 \end_layout
3194
3195 \end_inset
3196
3197
3198 \end_layout
3199
3200 \begin_layout Chapter
3201 基于知识图谱的电影推荐系统
3202 \end_layout
3203
3204 \begin_layout Section
3205 系统整体设计
3206 \end_layout
3207
3208 \begin_layout Standard
3209 如第
3210 \begin_inset CommandInset ref
3211 LatexCommand ref
3212 reference "sec:tech-stack"
3213 plural "false"
3214 caps "false"
3215 noprefix "false"
3216
3217 \end_inset
3218
3219 节中所述,本系统使用的数据来自“MovieLens 1M Dataset”、IMDb和豆瓣网。其中IMDb和豆瓣网的数据是使用爬虫爬取得到的。最后再使用Pyth
3220 on脚本对这些数据进行处理加工,并导入MongoDB数据库和Neo4j数据库。
3221 \end_layout
3222
3223 \begin_layout Standard
3224 本系统使用MongoDB和Neo4j存储数据。其中,MongoDB作为非关系型的新兴NoSQL数据库,以灵活的非结构化的方式存储普通用户数据、管理员数据、电影数
3225 据等,并提供高并发的性能支持与可分布式存储的扩展性。而在以高性能著称的图数据库Neo4j中,存储用于推荐算法使用的电影知识图谱。
3226 \end_layout
3227
3228 \begin_layout Standard
3229 本系统后端使用Python编写的Flask框架,Flask框架是轻量级的微框架,以高可扩展性著称,为本系统的后端网页应用服务器提供支持。在Flask中,基于RE
3230 ST风格构建API以供前端使用,REST风格的语义化API使后端API的构建与前端API的使用简单方便。
3231 \end_layout
3232
3233 \begin_layout Standard
3234 本系统前端使用Angular作为前端网页框架。Angular是基于TypeScript的网页框架,以模块化及可重用的组件设计著称。Angular为本系统提供了模
3235 块化的网页设计,使本系统前端逻辑清晰,易于维护。此外,本系统使用了Angular材料组件库(Angular Material Components),得益于此,
3236 本系统遵循材料设计(Material Design)语言,使视觉传达风格简洁美观,具有响应式动化与过渡效过、光线与阴影等。
3237 \end_layout
3238
3239 \begin_layout Section
3240 数据库设计
3241 \end_layout
3242
3243 \begin_layout Standard
3244 如前所述,本系统的MongoDB数据库用于存储普通用户数据、管理员数据、电影数据等,而Neo4j作为高性能的图数据库,用于存储知识图谱。以下逐一说明MongoD
3245 B数据库与Neo4j数据库的存储结构。
3246 \end_layout
3247
3248 \begin_layout Standard
3249 不同于MySQL等关系型数据库,MongoDB数据库作为非结构化存储的NoSQL数据库,没有表、列与行的概念,而只有集合与文档的概念,即在数据库中存储集合(一定
3250 程度上对应于关系型数据库的表),在集合中存储文档(一定程度上对应于关系型数据库的行),而关系型数据库中的列则对应于MongoDB数据库中文档的属性。
3251 \end_layout
3252
3253 \begin_layout Standard
3254 本系统在MongoDB数据库中建立4个集合,分别用于存储用户、管理员、体裁与电影数据。因其中的数据为非结构化数据,因此无法用表格的形式给出,目前习惯上以JSON
3255 形式给出数据的逻辑结构,以下以JSON形式来表示存储结构:
3256 \end_layout
3257
3258 \begin_layout Standard
3259 以下为普通用户集合的数据结构,用户集合中的文档存储用户ID、哈希处理后的密码、其进行过评分的电影(包括电影ID、评分及时间)以及由推荐算法服务器写入的推荐列表、
3260 已购买电影及心愿单:
3261 \end_layout
3262
3263 \begin_layout Verbatim
3264 {
3265 \end_layout
3266
3267 \begin_layout Verbatim
3268 _id: Integer,
3269 \end_layout
3270
3271 \begin_layout Verbatim
3272 password: String,
3273 \end_layout
3274
3275 \begin_layout Verbatim
3276 rating: Array([
3277 \end_layout
3278
3279 \begin_layout Verbatim
3280 {
3281 \end_layout
3282
3283 \begin_layout Verbatim
3284 movieId: Integer,
3285 \end_layout
3286
3287 \begin_layout Verbatim
3288 rating: Integer,
3289 \end_layout
3290
3291 \begin_layout Verbatim
3292 timestamp: Integer
3293 \end_layout
3294
3295 \begin_layout Verbatim
3296 },
3297 \end_layout
3298
3299 \begin_layout Verbatim
3300 ...
3301 \end_layout
3302
3303 \begin_layout Verbatim
3304 ]),
3305 \end_layout
3306
3307 \begin_layout Verbatim
3308 recommendation: Array([Interger, ...]),
3309 \end_layout
3310
3311 \begin_layout Verbatim
3312 bought: Array([Interger, ...]),
3313 \end_layout
3314
3315 \begin_layout Verbatim
3316 wishlist: Array([Interger, ...])
3317 \end_layout
3318
3319 \begin_layout Verbatim
3320 }
3321 \end_layout
3322
3323 \begin_layout Standard
3324 以下为管理员集合的数据结构,其存储结构较简单,管理员集合中的文档存储管理员ID、哈希处理后的密码:
3325 \end_layout
3326
3327 \begin_layout Verbatim
3328 {
3329 \end_layout
3330
3331 \begin_layout Verbatim
3332 _id: String,
3333 \end_layout
3334
3335 \begin_layout Verbatim
3336 password: String
3337 \end_layout
3338
3339 \begin_layout Verbatim
3340 }
3341 \end_layout
3342
3343 \begin_layout Standard
3344 以下为体裁集合的数据结构,其存储结构较简单,体裁集合中的文档存储体裁名称:
3345 \end_layout
3346
3347 \begin_layout Verbatim
3348 {
3349 \end_layout
3350
3351 \begin_layout Verbatim
3352 _id: String
3353 \end_layout
3354
3355 \begin_layout Verbatim
3356 }
3357 \end_layout
3358
3359 \begin_layout Standard
3360 以下为电影集合的数据结构,电影集合中的文档存储电影ID、电影封面、体裁、价格、评分累加和、评分总数量、预告片图片、剧情介绍、导演、剧本作家及演员。需要说明的是评
3361 分累加和以及评分总数量对应于用户集合中的评分,但只起缓存作用,定期计算。(经测试表明,每次用户访问时计算的开销较大,用户得到响应的时间过长):
3362
3363 \end_layout
3364
3365 \begin_layout Verbatim
3366 {
3367 \end_layout
3368
3369 \begin_layout Verbatim
3370 _id: Integer,
3371 \end_layout
3372
3373 \begin_layout Verbatim
3374 title: String,
3375 \end_layout
3376
3377 \begin_layout Verbatim
3378 cover: String,
3379 \end_layout
3380
3381 \begin_layout Verbatim
3382 genres: Array([String, ...]),
3383 \end_layout
3384
3385 \begin_layout Verbatim
3386 price: Float,
3387 \end_layout
3388
3389 \begin_layout Verbatim
3390 ratingSum: Integer,
3391 \end_layout
3392
3393 \begin_layout Verbatim
3394 ratingCount: Integer,
3395 \end_layout
3396
3397 \begin_layout Verbatim
3398 trailer_image_url: String,
3399 \end_layout
3400
3401 \begin_layout Verbatim
3402 storyline: Array([String, ...]),
3403 \end_layout
3404
3405 \begin_layout Verbatim
3406 directors: Array([String, ...]),
3407 \end_layout
3408
3409 \begin_layout Verbatim
3410 writers: Array([String, ...]),
3411 \end_layout
3412
3413 \begin_layout Verbatim
3414 actors: Array([String, ...]),
3415 \end_layout
3416
3417 \begin_layout Verbatim
3418 }
3419 \end_layout
3420
3421 \begin_layout Standard
3422 Neo4j数据库用于存储推荐算法使用的知识图谱,含有182011个结点、1241995条边,其数据结构可表示为:
3423 \end_layout
3424
3425 \begin_layout Verbatim
3426 node: actor | country | director | film | genre | language
3427 \end_layout
3428
3429 \begin_layout Verbatim
3430 | person_or_entity_appearing_in_film | rating | star
3431 \end_layout
3432
3433 \begin_layout Verbatim
3434 | writer
3435 \end_layout
3436
3437 \begin_layout Verbatim
3438 relationship: actor.film | director.film | film.country
3439 \end_layout
3440
3441 \begin_layout Verbatim
3442 | film.director | film.genre | film.language | film.rating
3443 \end_layout
3444
3445 \begin_layout Verbatim
3446 | film.star | film.writer | genre.film
3447 \end_layout
3448
3449 \begin_layout Verbatim
3450 | person_or_entity_appearing_in_film.film | writer.film
3451 \end_layout
3452
3453 \begin_layout Verbatim
3454 edge = (node) - [relationship] -> (node)
3455 \end_layout
3456
3457 \begin_layout Section
3458 系统功能说明
3459 \end_layout
3460
3461 \begin_layout Standard
3462 \begin_inset Float figure
3463 placement document
3464 alignment document
3465 wide false
3466 sideways false
3467 status open
3468
3469 \begin_layout Plain Layout
3470 \begin_inset Graphics
3471 filename figures/use-case.pdf
3472
3473 \end_inset
3474
3475
3476 \begin_inset ERT
3477 status collapsed
3478
3479 \begin_layout Plain Layout
3480
3481
3482 \backslash
3483 bicaption
3484 \end_layout
3485
3486 \end_inset
3487
3488
3489 \begin_inset ERT
3490 status collapsed
3491
3492 \begin_layout Plain Layout
3493
3494 {
3495 \end_layout
3496
3497 \end_inset
3498
3499 系统功能用例图
3500 \begin_inset ERT
3501 status collapsed
3502
3503 \begin_layout Plain Layout
3504
3505 }
3506 \end_layout
3507
3508 \end_inset
3509
3510
3511 \begin_inset ERT
3512 status collapsed
3513
3514 \begin_layout Plain Layout
3515
3516 {
3517 \end_layout
3518
3519 \end_inset
3520
3521 Use case diagram for the system
3522 \begin_inset ERT
3523 status collapsed
3524
3525 \begin_layout Plain Layout
3526
3527 }
3528 \end_layout
3529
3530 \end_inset
3531
3532
3533 \begin_inset CommandInset label
3534 LatexCommand label
3535 name "fig:use-case"
3536
3537 \end_inset
3538
3539
3540 \end_layout
3541
3542 \end_inset
3543
3544
3545 \end_layout
3546
3547 \begin_layout Standard
3548 本系统用户角色分为未登录用户、普通用户与管理员用户,其用例说明如图
3549 \begin_inset CommandInset ref
3550 LatexCommand ref
3551 reference "fig:use-case"
3552 plural "false"
3553 caps "false"
3554 noprefix "false"
3555
3556 \end_inset
3557
3558 。
3559 \end_layout
3560
3561 \begin_layout Subsection
3562 系统导航
3563 \end_layout
3564
3565 \begin_layout Standard
3566 本系统使用浮动侧边栏作为导航方式,如图
3567 \begin_inset CommandInset ref
3568 LatexCommand ref
3569 reference "fig:admin-navigation"
3570 plural "false"
3571 caps "false"
3572 noprefix "false"
3573
3574 \end_inset
3575
3576 。点击侧导航栏右下角的固定的按钮可以将浮动侧边栏设为固定,再次点击后将取消固定。
3577 \begin_inset Float figure
3578 placement document
3579 alignment document
3580 wide false
3581 sideways false
3582 status open
3583
3584 \begin_layout Plain Layout
3585 \begin_inset Box Boxed
3586 position "c"
3587 hor_pos "l"
3588 has_inner_box 0
3589 inner_pos "c"
3590 use_parbox 0
3591 use_makebox 0
3592 width ""
3593 special "none"
3594 height "1in"
3595 height_special "totalheight"
3596 thickness "0.4pt"
3597 separation "3pt"
3598 shadowsize "4pt"
3599 framecolor "black"
3600 backgroundcolor "none"
3601 status open
3602
3603 \begin_layout Plain Layout
3604 \begin_inset Graphics
3605 filename figures/admin-navigation.png
3606 width 94text%
3607
3608 \end_inset
3609
3610
3611 \end_layout
3612
3613 \end_inset
3614
3615
3616 \begin_inset ERT
3617 status collapsed
3618
3619 \begin_layout Plain Layout
3620
3621
3622 \backslash
3623 bicaption
3624 \end_layout
3625
3626 \end_inset
3627
3628
3629 \begin_inset ERT
3630 status collapsed
3631
3632 \begin_layout Plain Layout
3633
3634 {
3635 \end_layout
3636
3637 \end_inset
3638
3639 系统侧导航栏(管理员)
3640 \begin_inset ERT
3641 status collapsed
3642
3643 \begin_layout Plain Layout
3644
3645 }
3646 \end_layout
3647
3648 \end_inset
3649
3650
3651 \begin_inset ERT
3652 status collapsed
3653
3654 \begin_layout Plain Layout
3655
3656 {
3657 \end_layout
3658
3659 \end_inset
3660
3661 Side navigation panel of the system (for administrators)
3662 \begin_inset ERT
3663 status collapsed
3664
3665 \begin_layout Plain Layout
3666
3667 }
3668 \end_layout
3669
3670 \end_inset
3671
3672
3673 \begin_inset CommandInset label
3674 LatexCommand label
3675 name "fig:admin-navigation"
3676
3677 \end_inset
3678
3679
3680 \end_layout
3681
3682 \end_inset
3683
3684
3685 \end_layout
3686
3687 \begin_layout Subsection
3688 未登录用户
3689 \end_layout
3690
3691 \begin_layout Standard
3692 未登录用户能进行以下操作:
3693 \end_layout
3694
3695 \begin_layout Standard
3696 \noindent
3697 (1)接收随机的电影推荐
3698 \end_layout
3699
3700 \begin_layout Standard
3701 未登录用户首页随机显示50部电影,如图
3702 \begin_inset CommandInset ref
3703 LatexCommand ref
3704 reference "fig:anonymous-index"
3705 plural "false"
3706 caps "false"
3707 noprefix "false"
3708
3709 \end_inset
3710
3711 。
3712 \begin_inset Float figure
3713 placement document
3714 alignment document
3715 wide false
3716 sideways false
3717 status open
3718
3719 \begin_layout Plain Layout
3720 \begin_inset Box Boxed
3721 position "c"
3722 hor_pos "l"
3723 has_inner_box 0
3724 inner_pos "c"
3725 use_parbox 0
3726 use_makebox 0
3727 width ""
3728 special "none"
3729 height "1in"
3730 height_special "totalheight"
3731 thickness "0.4pt"
3732 separation "3pt"
3733 shadowsize "4pt"
3734 framecolor "black"
3735 backgroundcolor "none"
3736 status open
3737
3738 \begin_layout Plain Layout
3739 \begin_inset Graphics
3740 filename figures/anonymous-index.png
3741 width 94text%
3742
3743 \end_inset
3744
3745
3746 \end_layout
3747
3748 \end_inset
3749
3750
3751 \begin_inset ERT
3752 status collapsed
3753
3754 \begin_layout Plain Layout
3755
3756
3757 \backslash
3758 bicaption
3759 \end_layout
3760
3761 \end_inset
3762
3763
3764 \begin_inset ERT
3765 status collapsed
3766
3767 \begin_layout Plain Layout
3768
3769 {
3770 \end_layout
3771
3772 \end_inset
3773
3774 未登录用户首页
3775 \begin_inset ERT
3776 status collapsed
3777
3778 \begin_layout Plain Layout
3779
3780 }
3781 \end_layout
3782
3783 \end_inset
3784
3785
3786 \begin_inset ERT
3787 status collapsed
3788
3789 \begin_layout Plain Layout
3790
3791 {
3792 \end_layout
3793
3794 \end_inset
3795
3796 Index page for anonymous users
3797 \begin_inset ERT
3798 status collapsed
3799
3800 \begin_layout Plain Layout
3801
3802 }
3803 \end_layout
3804
3805 \end_inset
3806
3807
3808 \begin_inset CommandInset label
3809 LatexCommand label
3810 name "fig:anonymous-index"
3811
3812 \end_inset
3813
3814
3815 \end_layout
3816
3817 \end_inset
3818
3819
3820 \end_layout
3821
3822 \begin_layout Standard
3823 \noindent
3824 (2)按分类查看电影
3825 \end_layout
3826
3827 \begin_layout Standard
3828 未登录用户可以根据电影的分类来查看电影,如图
3829 \begin_inset CommandInset ref
3830 LatexCommand ref
3831 reference "fig:anonymous-category"
3832 plural "false"
3833 caps "false"
3834 noprefix "false"
3835
3836 \end_inset
3837
3838 。
3839 \begin_inset Float figure
3840 placement document
3841 alignment document
3842 wide false
3843 sideways false
3844 status open
3845
3846 \begin_layout Plain Layout
3847 \begin_inset Box Boxed
3848 position "c"
3849 hor_pos "l"
3850 has_inner_box 0
3851 inner_pos "c"
3852 use_parbox 0
3853 use_makebox 0
3854 width ""
3855 special "none"
3856 height "1in"
3857 height_special "totalheight"
3858 thickness "0.4pt"
3859 separation "3pt"
3860 shadowsize "4pt"
3861 framecolor "black"
3862 backgroundcolor "none"
3863 status open
3864
3865 \begin_layout Plain Layout
3866 \begin_inset Graphics
3867 filename figures/anonymous-category.png
3868 width 94text%
3869
3870 \end_inset
3871
3872
3873 \end_layout
3874
3875 \end_inset
3876
3877
3878 \begin_inset ERT
3879 status collapsed
3880
3881 \begin_layout Plain Layout
3882
3883
3884 \backslash
3885 bicaption
3886 \end_layout
3887
3888 \end_inset
3889
3890
3891 \begin_inset ERT
3892 status collapsed
3893
3894 \begin_layout Plain Layout
3895
3896 {
3897 \end_layout
3898
3899 \end_inset
3900
3901 未登录用户分类页面
3902 \begin_inset ERT
3903 status collapsed
3904
3905 \begin_layout Plain Layout
3906
3907 }
3908 \end_layout
3909
3910 \end_inset
3911
3912
3913 \begin_inset ERT
3914 status collapsed
3915
3916 \begin_layout Plain Layout
3917
3918 {
3919 \end_layout
3920
3921 \end_inset
3922
3923 Category page for anonymous users
3924 \begin_inset ERT
3925 status collapsed
3926
3927 \begin_layout Plain Layout
3928
3929 }
3930 \end_layout
3931
3932 \end_inset
3933
3934
3935 \begin_inset CommandInset label
3936 LatexCommand label
3937 name "fig:anonymous-category"
3938
3939 \end_inset
3940
3941
3942 \end_layout
3943
3944 \end_inset
3945
3946
3947 \end_layout
3948
3949 \begin_layout Standard
3950 \noindent
3951 (3)查看电影详情
3952 \end_layout
3953
3954 \begin_layout Standard
3955 未登录用户可以查看电影详情,如图
3956 \begin_inset CommandInset ref
3957 LatexCommand ref
3958 reference "fig:anonymous-details"
3959 plural "false"
3960 caps "false"
3961 noprefix "false"
3962
3963 \end_inset
3964
3965 。点击页面上的“添加至心愿单”和“购买”会跳转至登录界面。
3966 \begin_inset Float figure
3967 placement document
3968 alignment document
3969 wide false
3970 sideways false
3971 status open
3972
3973 \begin_layout Plain Layout
3974 \begin_inset Box Boxed
3975 position "c"
3976 hor_pos "l"
3977 has_inner_box 0
3978 inner_pos "c"
3979 use_parbox 0
3980 use_makebox 0
3981 width ""
3982 special "none"
3983 height "1in"
3984 height_special "totalheight"
3985 thickness "0.4pt"
3986 separation "3pt"
3987 shadowsize "4pt"
3988 framecolor "black"
3989 backgroundcolor "none"
3990 status open
3991
3992 \begin_layout Plain Layout
3993 \begin_inset Graphics
3994 filename figures/anonymous-details.png
3995 special height=0.7\textheight
3996
3997 \end_inset
3998
3999
4000 \end_layout
4001
4002 \end_inset
4003
4004
4005 \begin_inset ERT
4006 status collapsed
4007
4008 \begin_layout Plain Layout
4009
4010
4011 \backslash
4012 bicaption
4013 \end_layout
4014
4015 \end_inset
4016
4017
4018 \begin_inset ERT
4019 status collapsed
4020
4021 \begin_layout Plain Layout
4022
4023 {
4024 \end_layout
4025
4026 \end_inset
4027
4028 未登录用户电影详情页面
4029 \begin_inset ERT
4030 status collapsed
4031
4032 \begin_layout Plain Layout
4033
4034 }
4035 \end_layout
4036
4037 \end_inset
4038
4039
4040 \begin_inset ERT
4041 status collapsed
4042
4043 \begin_layout Plain Layout
4044
4045 {
4046 \end_layout
4047
4048 \end_inset
4049
4050 Movie details page for anonymous users
4051 \begin_inset ERT
4052 status collapsed
4053
4054 \begin_layout Plain Layout
4055
4056 }
4057 \end_layout
4058
4059 \end_inset
4060
4061
4062 \begin_inset CommandInset label
4063 LatexCommand label
4064 name "fig:anonymous-details"
4065
4066 \end_inset
4067
4068
4069 \end_layout
4070
4071 \end_inset
4072
4073
4074 \end_layout
4075
4076 \begin_layout Standard
4077 \noindent
4078 (4)搜索电影
4079 \end_layout
4080
4081 \begin_layout Standard
4082 未登录用户可以使用应用栏右侧的搜索框搜索电影,如图
4083 \begin_inset CommandInset ref
4084 LatexCommand ref
4085 reference "fig:anonymous-search"
4086 plural "false"
4087 caps "false"
4088 noprefix "false"
4089
4090 \end_inset
4091
4092 。本系统支持模糊搜索,与此同时,随着用户搜索内容的不断输入,系统会在搜索框下方显示候选的匹配词条,方便用户直接点击查看,此外,用户也能通过回车跳转至完整的搜索结
4093 果页面。
4094 \begin_inset Float figure
4095 placement document
4096 alignment document
4097 wide false
4098 sideways false
4099 status open
4100
4101 \begin_layout Plain Layout
4102 \begin_inset Box Boxed
4103 position "c"
4104 hor_pos "l"
4105 has_inner_box 0
4106 inner_pos "c"
4107 use_parbox 0
4108 use_makebox 0
4109 width ""
4110 special "none"
4111 height "1in"
4112 height_special "totalheight"
4113 thickness "0.4pt"
4114 separation "3pt"
4115 shadowsize "4pt"
4116 framecolor "black"
4117 backgroundcolor "none"
4118 status open
4119
4120 \begin_layout Plain Layout
4121 \begin_inset Graphics
4122 filename figures/anonymous-search.png
4123 width 94text%
4124
4125 \end_inset
4126
4127
4128 \end_layout
4129
4130 \end_inset
4131
4132
4133 \begin_inset ERT
4134 status collapsed
4135
4136 \begin_layout Plain Layout
4137
4138
4139 \backslash
4140 bicaption
4141 \end_layout
4142
4143 \end_inset
4144
4145
4146 \begin_inset ERT
4147 status collapsed
4148
4149 \begin_layout Plain Layout
4150
4151 {
4152 \end_layout
4153
4154 \end_inset
4155
4156 未登录用户电影搜索界面(侧导航栏已固定)
4157 \begin_inset ERT
4158 status collapsed
4159
4160 \begin_layout Plain Layout
4161
4162 }
4163 \end_layout
4164
4165 \end_inset
4166
4167
4168 \begin_inset ERT
4169 status collapsed
4170
4171 \begin_layout Plain Layout
4172
4173 {
4174 \end_layout
4175
4176 \end_inset
4177
4178 Movie search page for anonymous users (side navigation panel pinned)
4179 \begin_inset ERT
4180 status collapsed
4181
4182 \begin_layout Plain Layout
4183
4184 }
4185 \end_layout
4186
4187 \end_inset
4188
4189
4190 \begin_inset CommandInset label
4191 LatexCommand label
4192 name "fig:anonymous-search"
4193
4194 \end_inset
4195
4196
4197 \end_layout
4198
4199 \end_inset
4200
4201
4202 \end_layout
4203
4204 \begin_layout Subsection
4205 注册与登录
4206 \end_layout
4207
4208 \begin_layout Standard
4209 \noindent
4210 (1)注册
4211 \end_layout
4212
4213 \begin_layout Standard
4214 本系统对普通用户开放注册功能,并能提供用户名是否含不合法字符、是否与已注册用户名冲突、密码是否符合复杂度要求等的检测。
4215 \end_layout
4216
4217 \begin_layout Standard
4218 \noindent
4219 (2)登录
4220 \end_layout
4221
4222 \begin_layout Standard
4223 本系统提供登录功能,并能根据不同的登录错误类型相应地作出响应。
4224 \end_layout
4225
4226 \begin_layout Subsection
4227 普通用户
4228 \end_layout
4229
4230 \begin_layout Standard
4231 普通用户具备未登录用户的所有功能。此外,还具备以下功能:
4232 \end_layout
4233
4234 \begin_layout Standard
4235 \noindent
4236 (1)添加心愿单
4237 \end_layout
4238
4239 \begin_layout Standard
4240 已登录用户能在电影详情页面添加电影至心愿单。
4241 \end_layout
4242
4243 \begin_layout Standard
4244 \noindent
4245 (2)购买
4246 \end_layout
4247
4248 \begin_layout Standard
4249 已登录用户能在电影详情页面购买电影。
4250 \end_layout
4251
4252 \begin_layout Standard
4253 \noindent
4254 (3)评分
4255 \end_layout
4256
4257 \begin_layout Standard
4258 已登录用户能在电影详情页面给电影评分。电影评分功能位于电影详情页面,如图
4259 \begin_inset CommandInset ref
4260 LatexCommand ref
4261 reference "fig:general-details"
4262 plural "false"
4263 caps "false"
4264 noprefix "false"
4265
4266 \end_inset
4267
4268 所示。
4269 \end_layout
4270
4271 \begin_layout Standard
4272 \begin_inset Float figure
4273 placement document
4274 alignment document
4275 wide false
4276 sideways false
4277 status open
4278
4279 \begin_layout Plain Layout
4280 \begin_inset Box Boxed
4281 position "c"
4282 hor_pos "l"
4283 has_inner_box 0
4284 inner_pos "c"
4285 use_parbox 0
4286 use_makebox 0
4287 width ""
4288 special "none"
4289 height "1in"
4290 height_special "totalheight"
4291 thickness "0.4pt"
4292 separation "3pt"
4293 shadowsize "4pt"
4294 framecolor "black"
4295 backgroundcolor "none"
4296 status open
4297
4298 \begin_layout Plain Layout
4299 \begin_inset Graphics
4300 filename figures/general-details.png
4301 width 94text%
4302
4303 \end_inset
4304
4305
4306 \end_layout
4307
4308 \end_inset
4309
4310
4311 \begin_inset ERT
4312 status collapsed
4313
4314 \begin_layout Plain Layout
4315
4316
4317 \backslash
4318 bicaption
4319 \end_layout
4320
4321 \end_inset
4322
4323
4324 \begin_inset ERT
4325 status collapsed
4326
4327 \begin_layout Plain Layout
4328
4329 {
4330 \end_layout
4331
4332 \end_inset
4333
4334 电影评分页面
4335 \begin_inset ERT
4336 status collapsed
4337
4338 \begin_layout Plain Layout
4339
4340 }
4341 \end_layout
4342
4343 \end_inset
4344
4345
4346 \begin_inset ERT
4347 status collapsed
4348
4349 \begin_layout Plain Layout
4350
4351 {
4352 \end_layout
4353
4354 \end_inset
4355
4356 Rating page for movies
4357 \begin_inset ERT
4358 status collapsed
4359
4360 \begin_layout Plain Layout
4361
4362 }
4363 \end_layout
4364
4365 \end_inset
4366
4367
4368 \begin_inset CommandInset label
4369 LatexCommand label
4370 name "fig:general-details"
4371
4372 \end_inset
4373
4374
4375 \end_layout
4376
4377 \end_inset
4378
4379
4380 \end_layout
4381
4382 \begin_layout Standard
4383 \noindent
4384 (4)查看已购买的电影
4385 \end_layout
4386
4387 \begin_layout Standard
4388 已登录用户能通过侧导航栏跳转至查看已购买的电影的页面。
4389 \end_layout
4390
4391 \begin_layout Standard
4392 \noindent
4393 (5)查看已添加心愿单的电影
4394 \end_layout
4395
4396 \begin_layout Standard
4397 已登录用户能通过侧导航栏跳转至查看已添加心愿单的电影的页面。
4398 \end_layout
4399
4400 \begin_layout Subsection
4401 管理员用户
4402 \end_layout
4403
4404 \begin_layout Standard
4405 \noindent
4406 (1)管理电影信息
4407 \end_layout
4408
4409 \begin_layout Standard
4410 管理员能增加电影、删除电影与修改电影信息,如图
4411 \begin_inset CommandInset ref
4412 LatexCommand ref
4413 reference "fig:admin-movie"
4414 plural "false"
4415 caps "false"
4416 noprefix "false"
4417
4418 \end_inset
4419
4420 所示。
4421 \begin_inset Float figure
4422 placement document
4423 alignment document
4424 wide false
4425 sideways false
4426 status open
4427
4428 \begin_layout Plain Layout
4429 \begin_inset Box Boxed
4430 position "c"
4431 hor_pos "l"
4432 has_inner_box 0
4433 inner_pos "c"
4434 use_parbox 0
4435 use_makebox 0
4436 width ""
4437 special "none"
4438 height "1in"
4439 height_special "totalheight"
4440 thickness "0.4pt"
4441 separation "3pt"
4442 shadowsize "4pt"
4443 framecolor "black"
4444 backgroundcolor "none"
4445 status open
4446
4447 \begin_layout Plain Layout
4448 \begin_inset Graphics
4449 filename figures/admin-movie.png
4450 width 94text%
4451
4452 \end_inset
4453
4454
4455 \end_layout
4456
4457 \end_inset
4458
4459
4460 \begin_inset ERT
4461 status collapsed
4462
4463 \begin_layout Plain Layout
4464
4465
4466 \backslash
4467 bicaption
4468 \end_layout
4469
4470 \end_inset
4471
4472
4473 \begin_inset ERT
4474 status collapsed
4475
4476 \begin_layout Plain Layout
4477
4478 {
4479 \end_layout
4480
4481 \end_inset
4482
4483 管理电影页面
4484 \begin_inset ERT
4485 status collapsed
4486
4487 \begin_layout Plain Layout
4488
4489 }
4490 \end_layout
4491
4492 \end_inset
4493
4494
4495 \begin_inset ERT
4496 status collapsed
4497
4498 \begin_layout Plain Layout
4499
4500 {
4501 \end_layout
4502
4503 \end_inset
4504
4505 Movie administration page
4506 \begin_inset ERT
4507 status collapsed
4508
4509 \begin_layout Plain Layout
4510
4511 }
4512 \end_layout
4513
4514 \end_inset
4515
4516
4517 \begin_inset CommandInset label
4518 LatexCommand label
4519 name "fig:admin-movie"
4520
4521 \end_inset
4522
4523
4524 \end_layout
4525
4526 \end_inset
4527
4528
4529 \end_layout
4530
4531 \begin_layout Standard
4532 \noindent
4533 (2)管理用户信息
4534 \end_layout
4535
4536 \begin_layout Standard
4537 管理员能增加用户、删除用户与修改用户密码。
4538 \end_layout
4539
4540 \begin_layout Standard
4541 \noindent
4542 (3)管理知识图谱
4543 \end_layout
4544
4545 \begin_layout Standard
4546 管理员能增加、删除、修改以及查找知识图谱中的结点与关系,如图
4547 \begin_inset CommandInset ref
4548 LatexCommand ref
4549 reference "fig:admin-knowledge-graph"
4550 plural "false"
4551 caps "false"
4552 noprefix "false"
4553
4554 \end_inset
4555
4556 所示。该界面中的结点及关系可以以动态的方式呈现,同时支持以填写选项的方式以及使用Cypher语句的方式来增加、删除、修改以及查找知识图谱中的结点与关系。当鼠标悬
4557 浮于某一节点或关系之上时,将显示有关这一节点或关系的有关信息。
4558 \begin_inset Float figure
4559 placement document
4560 alignment document
4561 wide false
4562 sideways false
4563 status open
4564
4565 \begin_layout Plain Layout
4566 \begin_inset Box Boxed
4567 position "c"
4568 hor_pos "l"
4569 has_inner_box 0
4570 inner_pos "c"
4571 use_parbox 0
4572 use_makebox 0
4573 width ""
4574 special "none"
4575 height "1in"
4576 height_special "totalheight"
4577 thickness "0.4pt"
4578 separation "3pt"
4579 shadowsize "4pt"
4580 framecolor "black"
4581 backgroundcolor "none"
4582 status open
4583
4584 \begin_layout Plain Layout
4585 \begin_inset Graphics
4586 filename figures/admin-knowledge-graph.png
4587 width 94text%
4588
4589 \end_inset
4590
4591
4592 \end_layout
4593
4594 \end_inset
4595
4596
4597 \begin_inset ERT
4598 status collapsed
4599
4600 \begin_layout Plain Layout
4601
4602
4603 \backslash
4604 bicaption
4605 \end_layout
4606
4607 \end_inset
4608
4609
4610 \begin_inset ERT
4611 status collapsed
4612
4613 \begin_layout Plain Layout
4614
4615 {
4616 \end_layout
4617
4618 \end_inset
4619
4620 管理知识图谱页面
4621 \begin_inset ERT
4622 status collapsed
4623
4624 \begin_layout Plain Layout
4625
4626 }
4627 \end_layout
4628
4629 \end_inset
4630
4631
4632 \begin_inset ERT
4633 status collapsed
4634
4635 \begin_layout Plain Layout
4636
4637 {
4638 \end_layout
4639
4640 \end_inset
4641
4642 Knowledge graph administration page
4643 \begin_inset ERT
4644 status collapsed
4645
4646 \begin_layout Plain Layout
4647
4648 }
4649 \end_layout
4650
4651 \end_inset
4652
4653
4654 \begin_inset CommandInset label
4655 LatexCommand label
4656 name "fig:admin-knowledge-graph"
4657
4658 \end_inset
4659
4660
4661 \end_layout
4662
4663 \end_inset
4664
4665
4666 \end_layout
4667
4668 \begin_layout Section
4669 电影推荐流程
4670 \end_layout
4671
4672 \begin_layout Standard
4673 本系统的推荐流程分为离线推荐与实时推荐,如图
4674 \begin_inset CommandInset ref
4675 LatexCommand ref
4676 reference "fig:recommendation-procedure"
4677 plural "false"
4678 caps "false"
4679 noprefix "false"
4680
4681 \end_inset
4682
4683 所示。
4684 \end_layout
4685
4686 \begin_layout Standard
4687 \begin_inset Float figure
4688 placement document
4689 alignment document
4690 wide false
4691 sideways false
4692 status open
4693
4694 \begin_layout Plain Layout
4695 \begin_inset Graphics
4696 filename figures/recommendation-procedure.pdf
4697
4698 \end_inset
4699
4700
4701 \begin_inset ERT
4702 status collapsed
4703
4704 \begin_layout Plain Layout
4705
4706
4707 \backslash
4708 bicaption
4709 \end_layout
4710
4711 \end_inset
4712
4713
4714 \begin_inset ERT
4715 status collapsed
4716
4717 \begin_layout Plain Layout
4718
4719 {
4720 \end_layout
4721
4722 \end_inset
4723
4724 电影推荐流程
4725 \begin_inset ERT
4726 status collapsed
4727
4728 \begin_layout Plain Layout
4729
4730 }
4731 \end_layout
4732
4733 \end_inset
4734
4735
4736 \begin_inset ERT
4737 status collapsed
4738
4739 \begin_layout Plain Layout
4740
4741 {
4742 \end_layout
4743
4744 \end_inset
4745
4746 Movie recommendation procedure
4747 \begin_inset ERT
4748 status collapsed
4749
4750 \begin_layout Plain Layout
4751
4752 }
4753 \end_layout
4754
4755 \end_inset
4756
4757
4758 \begin_inset CommandInset label
4759 LatexCommand label
4760 name "fig:recommendation-procedure"
4761
4762 \end_inset
4763
4764
4765 \end_layout
4766
4767 \end_inset
4768
4769
4770 \end_layout
4771
4772 \begin_layout Standard
4773 其中,离线推荐使用第
4774 \begin_inset CommandInset ref
4775 LatexCommand ref
4776 reference "ch:offline-recommendation"
4777 plural "false"
4778 caps "false"
4779 noprefix "false"
4780
4781 \end_inset
4782
4783 章所述的涟漪网络算法,此算法是基于文献
4784 \begin_inset ERT
4785 status collapsed
4786
4787 \begin_layout Plain Layout
4788
4789
4790 \backslash
4791 parencite
4792 \end_layout
4793
4794 \end_inset
4795
4796
4797 \begin_inset ERT
4798 status collapsed
4799
4800 \begin_layout Plain Layout
4801
4802 {
4803 \end_layout
4804
4805 \end_inset
4806
4807 wang2018ripplenet
4808 \begin_inset ERT
4809 status collapsed
4810
4811 \begin_layout Plain Layout
4812
4813 }
4814 \end_layout
4815
4816 \end_inset
4817
4818 实现的。不同于文献
4819 \begin_inset ERT
4820 status collapsed
4821
4822 \begin_layout Plain Layout
4823
4824
4825 \backslash
4826 parencite
4827 \end_layout
4828
4829 \end_inset
4830
4831
4832 \begin_inset ERT
4833 status collapsed
4834
4835 \begin_layout Plain Layout
4836
4837 {
4838 \end_layout
4839
4840 \end_inset
4841
4842 wang2018ripplenet
4843 \begin_inset ERT
4844 status collapsed
4845
4846 \begin_layout Plain Layout
4847
4848 }
4849 \end_layout
4850
4851 \end_inset
4852
4853 中仅使用用户评分计算用户偏好,本推荐系统在用户偏好的计算过程中还结合了用户收藏,这在一定程度上缓解了冷启动问题并改进了推荐性能。 此外,本推荐系统还结合了实时推
4854 荐机制作为补充,描述如下:
4855 \end_layout
4856
4857 \begin_layout Standard
4858 (1)离线推荐服务器定期运行涟漪网络算法。离线推荐服务器从MongoDB数据库服务器获取用户信息与电影评分、电影是否加入心愿单等数据以及从Neo4j数据库服务器
4859 获取知识图谱数据信息。然后执行涟漪网络算法。最后离线推荐服务器将计算得到的各用户推荐列表存入MongoDB数据库中,等待用户访问时将该结果推荐给用户。
4860 \end_layout
4861
4862 \begin_layout Standard
4863 (2)当用户访问时,网页后端服务器查询推荐列表中的电影数据是否达到阀值,如果推荐列表中的数量过少,则根据用户交互随机将同体裁电影加入推荐列表的末端作为补充并最终
4864 显示给用户。
4865 \end_layout
4866
4867 \begin_layout Standard
4868 上述步骤中,(1)中的离线推荐准确度高,但算法运算时间长,无法做到即时响应用户请求。(2)中的实时推荐方法准确度低,但算法运算快,可以做到实时响应请求并即时发出
4869 响应。两者相互补充组成了本系统的电影推荐算法。
4870 \end_layout
4871
4872 \begin_layout Section
4873 系统安全性
4874 \end_layout
4875
4876 \begin_layout Standard
4877 本系统对已登录普通用户与管理员在前后端交互过程中使用JSON网络令牌(JSON Web Token, JWT)实现授权与认证(Authorization
4878 and Authentication),以此保证系统的安全性,本系统的总体安全性设计如图
4879 \begin_inset CommandInset ref
4880 LatexCommand ref
4881 reference "fig:jwt"
4882 plural "false"
4883 caps "false"
4884 noprefix "false"
4885
4886 \end_inset
4887
4888 所示。
4889 \end_layout
4890
4891 \begin_layout Standard
4892 \begin_inset Float figure
4893 placement document
4894 alignment document
4895 wide false
4896 sideways false
4897 status open
4898
4899 \begin_layout Plain Layout
4900 \begin_inset Graphics
4901 filename figures/jwt.pdf
4902
4903 \end_inset
4904
4905
4906 \begin_inset ERT
4907 status collapsed
4908
4909 \begin_layout Plain Layout
4910
4911
4912 \backslash
4913 bicaption
4914 \end_layout
4915
4916 \end_inset
4917
4918
4919 \begin_inset ERT
4920 status collapsed
4921
4922 \begin_layout Plain Layout
4923
4924 {
4925 \end_layout
4926
4927 \end_inset
4928
4929 系统总体安全性设计
4930 \begin_inset ERT
4931 status collapsed
4932
4933 \begin_layout Plain Layout
4934
4935 }
4936 \end_layout
4937
4938 \end_inset
4939
4940
4941 \begin_inset ERT
4942 status collapsed
4943
4944 \begin_layout Plain Layout
4945
4946 {
4947 \end_layout
4948
4949 \end_inset
4950
4951 Overall security design for the system
4952 \begin_inset ERT
4953 status collapsed
4954
4955 \begin_layout Plain Layout
4956
4957 }
4958 \end_layout
4959
4960 \end_inset
4961
4962
4963 \begin_inset CommandInset label
4964 LatexCommand label
4965 name "fig:jwt"
4966
4967 \end_inset
4968
4969
4970 \end_layout
4971
4972 \end_inset
4973
4974
4975 \end_layout
4976
4977 \begin_layout Standard
4978 在用户登录时,Flask后端网页服务器会生成一个长期JSON网络令牌和一个临时JSON网络令牌,令牌中存储有用户id以及过期时间,并且该令牌使用非对称加密算法加
4979 密,其中含有由Flask后端网页服务器颁发的签名信息,这确保了JSON网络令牌不会被伪造。
4980 \end_layout
4981
4982 \begin_layout Standard
4983 前端网页服务器在接收到令牌后会将令牌存储在浏览器的localStorage中,并在每一个接下来的请求头中附上该令牌,而后端服务器只有在该令牌有效(指确实为后端网
4984 页服务器颁发且该另令牌尚未过期)的情况下才会继续执行有关请求。与此同时,若该请求是用户内容相关的,则后端服务器还会检测令牌中的id是否与请求中使用的id相同。若
4985 不满足以上任意一项,则后端网页服务器返回未授权错误。
4986 \end_layout
4987
4988 \begin_layout Standard
4989 其中,若后端网页服务器发现令牌过期,则会将该信息发送给前端网页服务器,前端网页服务器将会将长期令牌发送给后端服务器以刷新(renew)临时令牌。
4990 \end_layout
4991
4992 \begin_layout Standard
4993 此外,本系统还使用了哈希算法对密码进行哈希处理,数据库中的密码全部为哈希处理后的密码。同时,用户登录过程是后端网页服务器使用原密码与哈希处理后的密码进行比较,而
4994 没有开放哈希处理后的密码与哈希处理后的密码进行比较的接口,这保障了本系统的安全性。这在同时令网站仅允许HTTPS(HTTPS-only)网络连接的情况下可以充分
4995 保证本系统的安全性。
4996 \end_layout
4997
4998 \begin_layout Standard
4999 需要指出的是,虽然本系统在用户登录与注册时密码在前端没有进行哈希处理,但是本系统在部署时使用HTTPS-only的连接,在这种情况下,所有的数据传输都处于加密状
5000 态,避免了中间人攻击的可能,因此明文传输密码而不使用哈希处理是安全的,在实际使用的过程中可行。而本系统的后端网页服务器对前端网页服务器传入的明文密码进行哈希处理
5001 的目的是避免数据库中存入明文的密码。如果数据库中存入明文的密码,则当数据库中用户密码泄露时攻击者可以轻易使用泄露的密码登录本系统。而如上所述,本系统后端只开放了
5002 接收明文密码的接口,即只将数据库中哈希处理后的密码与用户请求中的明文密码进行对比,即使攻击者获取了用户哈希后的密码,要计算其对应的明文密码也是困难的,甚至在明文
5003 密码足够复杂的情况下是不可能的。因此,以上措施保证了本系统的安全性。
5004 \end_layout
5005
5006 \begin_layout Chapter
5007 研究结论和展望
5008 \end_layout
5009
5010 \begin_layout Section
5011 工作总结
5012 \end_layout
5013
5014 \begin_layout Standard
5015 随着互联网的发展,用户可选择的电影数量不断增加,为了让用户快速找到感兴趣的电影,各种推荐算法应运而生。这些算法存在推荐准确性较低、数据稀缺性以及冷启动问题。本文
5016 针对此现状,以电影推荐为研究对象,使用知识图谱作为辅助信息,利用涟漪网络算法实现了电影推荐系统。具体地说,主要的研究工作如下:
5017 \end_layout
5018
5019 \begin_layout Standard
5020 (1)使用基于Scrapy框架的爬虫从IMDb和豆瓣网上爬取了3684条电影数据。其中,从IMDb爬取了3494条电影数据,从豆瓣网爬取了190条电影数据(由于
5021 豆瓣网限制了每IP访问量故爬取的数据较少)。这些电影数据包括电影封面图片、电影情节介绍、电影预告片图片、电影演员列表、导演以及剧本作家等信息。
5022 \end_layout
5023
5024 \begin_layout Standard
5025 (2)根据文献
5026 \begin_inset ERT
5027 status collapsed
5028
5029 \begin_layout Plain Layout
5030
5031
5032 \backslash
5033 parencite
5034 \end_layout
5035
5036 \end_inset
5037
5038
5039 \begin_inset ERT
5040 status collapsed
5041
5042 \begin_layout Plain Layout
5043
5044 {
5045 \end_layout
5046
5047 \end_inset
5048
5049 wang2018ripplenet
5050 \begin_inset ERT
5051 status collapsed
5052
5053 \begin_layout Plain Layout
5054
5055 }
5056 \end_layout
5057
5058 \end_inset
5059
5060 实现了基于知识图谱的涟漪网络推荐算法,通过使用“MovieLens 1M Dataset”数据集以及从IMDb和豆瓣网上爬取的电影数据,实现了基于用户心愿单和用
5061 户评分并以知识图谱为辅助信息的推荐算法。不同于文献
5062 \begin_inset ERT
5063 status collapsed
5064
5065 \begin_layout Plain Layout
5066
5067
5068 \backslash
5069 parencite
5070 \end_layout
5071
5072 \end_inset
5073
5074
5075 \begin_inset ERT
5076 status collapsed
5077
5078 \begin_layout Plain Layout
5079
5080 {
5081 \end_layout
5082
5083 \end_inset
5084
5085 wang2018ripplenet
5086 \begin_inset ERT
5087 status collapsed
5088
5089 \begin_layout Plain Layout
5090
5091 }
5092 \end_layout
5093
5094 \end_inset
5095
5096 中仅使用用户评分计算用户偏好,本文在用户偏好的计算过程中还结合了用户收藏,这在一定程度上缓解了冷启动问题并改进了推荐性能。并对实现的推荐算法进行了实验,计算了其
5097 AUC和准确度两个关键的性能指标,将该指标与DKN
5098 \begin_inset CommandInset citation
5099 LatexCommand cite
5100 key "wang2018dkn"
5101 literal "false"
5102
5103 \end_inset
5104
5105 、CKE
5106 \begin_inset CommandInset citation
5107 LatexCommand cite
5108 key "zhang2016collaborative"
5109 literal "false"
5110
5111 \end_inset
5112
5113 、PER
5114 \begin_inset CommandInset citation
5115 LatexCommand cite
5116 key "yu2014personalized"
5117 literal "false"
5118
5119 \end_inset
5120
5121 、SHINE
5122 \begin_inset CommandInset citation
5123 LatexCommand cite
5124 key "wang2018shine"
5125 literal "false"
5126
5127 \end_inset
5128
5129 、LibFM
5130 \begin_inset CommandInset citation
5131 LatexCommand cite
5132 key "rendle2012factorization"
5133 literal "false"
5134
5135 \end_inset
5136
5137 以及Wide&Deep
5138 \begin_inset CommandInset citation
5139 LatexCommand cite
5140 key "cheng2016wide"
5141 literal "false"
5142
5143 \end_inset
5144
5145 算法的进行了对比。并以此发现,涟漪网络算法的性能最优。
5146 \end_layout
5147
5148 \begin_layout Standard
5149 (3)基于涟漪网络算法实现了基于知识图谱的电影推荐系统。该系统为未登录用户提供按分类查看电影、查看电影详情的功能;为普通用户提供电影推荐、按分类查看电影、查看电
5150 影详情、电影评分、将电影加入心愿单以及购买电影功能;为管理员提供增加、删除、修改、查找电影及用户的功能。同时使用JSON网络令牌、HTTPS以及哈希化密码等手段
5151 保障系统的安全性。
5152 \end_layout
5153
5154 \begin_layout Section
5155 工作展望
5156 \end_layout
5157
5158 \begin_layout Standard
5159 为了给用户提供准确的推荐电影,需要不断优化并改进推荐过程。推荐系统的基础是用户历史偏好集、知识图谱信息以及推荐算法本身。因此有效地记录用户历史偏好集,完善知识图
5160 谱信息并改进推荐算法本身是提高推荐结果的重要因素。本文虽然对基于知识图谱的推荐算法有了一定的研究,并且将其应用于电影推荐系统中,但是由于时间和能力所限,该系统仍
5161 存在着不足的地方,主要体现在以下两个方面:
5162 \end_layout
5163
5164 \begin_layout Standard
5165 \noindent
5166 (1)需要完善知识图谱的信息
5167 \end_layout
5168
5169 \begin_layout Standard
5170 知识图谱是本文使用的涟漪网络算法的基础,但本文所使用的知识图谱的信息还不够完善,因此在一定程度上影响了涟漪网络算法的性能。
5171 \end_layout
5172
5173 \begin_layout Standard
5174 \noindent
5175 (2)涟漪网络算法有待进一步改进
5176 \end_layout
5177
5178 \begin_layout Standard
5179 尽管涟漪网络算法相比于传统的推荐算法在准确度上有所提升,但涟漪网络算法目前仅适用于离线推荐,而无法用于实时推荐,这使它的适用场景受到了限制。未来可考虑改造该算法
5180 ,使其能满足实时推荐的需求。
5181 \end_layout
5182
5183 \begin_layout Standard
5184 对于以上提及的问题,未来还需要更深入地学习有关知识图谱、推荐算法、深度学习的有关知识,对系统进行改进,从而使其更完善。
5185 \begin_inset ERT
5186 status collapsed
5187
5188 \begin_layout Plain Layout
5189
5190
5191 \backslash
5192 backmatter
5193 \end_layout
5194
5195 \end_inset
5196
5197
5198 \begin_inset CommandInset bibtex
5199 LatexCommand bibtex
5200 bibfiles "bibliography"
5201
5202 \end_inset
5203
5204
5205 \end_layout
5206
5207 \begin_layout Chapter
5208 致谢
5209 \end_layout
5210
5211 \begin_layout Standard
5212 论文的撰写工作已经接近尾声,在本文的撰写过程中我要特别感谢李冬梅老师的指导。在毕业论文完成期间,李冬梅老师多次对我的毕业论文提出意见与建议。同时,她多次询问论文
5213 的撰写进度,更是体现了她对学生无微不至的关怀。每每当我在论文编写中遇到艰深晦涩之处时,她都能不失时机而恰到好处地给予我最有用的提示与建议,使我的毕业论文得以顺利
5214 完成。
5215 \end_layout
5216
5217 \begin_layout Standard
5218 其次,我要感谢我本科期间曾经为我上课的所有老师。比如,由我的概率论老师为我打下的数学基础才使我得以用最大后验概率估计法完成嵌入表示的学习算法,蓝海洋老师任教的网
5219 站设计课程是我完成电影推荐系统的基石。总之,我要感谢大学四年来所有老师孜孜不倦的谆谆教诲与夜以继日的无私奉献。
5220 \end_layout
5221
5222 \begin_layout Standard
5223 接着,我还要感谢我的同学,是他们思维的火花激起了论文写作中的灵感。与他们的交流使我受益匪浅。
5224 \end_layout
5225
5226 \begin_layout Standard
5227 最后,我还要感谢我的父母,他们一直以来对我生活上与学习上的鼓励与引导是我得益完成论文的关键要素。
5228 \end_layout
5229
5230 \begin_layout Standard
5231 感谢所有在论文撰写工作中为我提供过帮助的人。
5232 \end_layout
5233
5234 \end_body
5235 \end_document