CMS 内部搜索引擎中的 PageRank
我被要求完成我的最终学位项目,以构建一个定制的 SEO 内容管理系统;重点是,该请求是为该 CMS 的内部搜索引擎实现 PageRank 算法,以按 PR 对查询结果进行排序。 是否可以?我该如何开始呢? CMS 基于 PHP 和 MySql(或 PostgreSql)构建。 预先非常感谢您。
I was asked for my final degree project to build a custom SEO Content Management System; the point is that the request is to implement PageRank alghoritm for the inner search engine of this CMS, to order the results of the query by the PR.
Is it possible? How may I start with this?
The CMS is build on PHP and MySql (or PostgreSql).
Thank you so much in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
维基百科上有一些有关Page Rank 算法的信息。这应该会让你忙上几天。
然后,您可以将其与搜索算法合并以生成一组相关结果。
祝你的任务顺利。
-马修
There is some information about the Page Rank algorithm on wikipedia. That should keep you busy for a few days.
You can then merge this with your search algorithm to produce a set of relevant results.
Good luck on your assignment.
-Mathew
您可以创建某种数组,然后进行排序,这里我使用了
$pageRank
算法的结果(您已经创建了它,不是吗?)作为链接到搜索结果对象。不过,如果您愿意的话,您大概可以(取决于系统的性能)将整个结果集保存在数组中。You could possibly create an array of some kind and then sort, here I've used the results of your
$pageRank
algorithm (you have created that, haven't you?) as the associative key to a link to a search-result object. Though you could, presumably (depending on the performance of your system) hold the entire result-set in the array if you wanted to.如果您已经完成了 PageRank 算法,您可能不想在每次搜索时都计算它。我会安排定期计算(每天?每周?最合适的),然后将 PR 存储在您的数据库中。
然后,当您运行 SQL 查询时,只需 ORDER BY page_rank
If you have the PageRank algorithm done, you probably don't want to be calculating it on each search. I'd schedule regular calculations (daily? weekly? whatever is most appropriate) and then store the PR in your database.
Then, when you run your SQL query, just ORDER BY page_rank
您需要想出一种可以确定页面“重要性”的算法。谷歌倾向于使用反向链接来确定这一点,但关键字的使用也是一个重要因素。在您的 CMS 中,是什么让页面变得重要?选取一个特定的页面或搜索查询并从中创建一个用例。当您进行此搜索时,应该出现哪个页面以及为什么应该出现该页面?使用此信息来确定您的算法在对这些页面进行排名时应查找的内容。
You need to come up with an algorithm that can determine "importance" of a page. Google tends to use backlinks to determine this but keyword usage is also an important factor. On your CMS, what makes a page important? Take a specific page or search query and make a use-case out of it. What page should come up when you do this search and why should it come up? Use this information to determine what your algorithm should look for when ranking these pages.