Algorithm “这是怎么回事?”;考虑“包括”;Gmail的功能实现了吗?

Algorithm “这是怎么回事?”;考虑“包括”;Gmail的功能实现了吗?,algorithm,database-design,Algorithm,Database Design,我想做一些类似于gmail在我的博客上“考虑包括”的建议,但带有标签 我正在考虑这样存储标记集: 我想到了以下算法: //a blog post is published //it has the tags "A", "B" & "C" : if the tag set "A,B,C" doesn't exist create it else add 1 to "number of times used" 以及,建议使用标签: //a blog post is being

我想做一些类似于gmail在我的博客上“考虑包括”的建议,但带有标签

我正在考虑这样存储标记集:

我想到了以下算法:

//a blog post is published
//it has the tags "A", "B" & "C" :
if the tag set "A,B,C" doesn't exist
   create it
else
   add 1 to "number of times used"
以及,建议使用标签:

//a blog post is being written.
//the author includes the tags "A" and "C"
//which tags should I suggest ?
find all the tags sets that contain "A" and "C"
  among them, find the one with the highest "number of times used"
    suggest the tags of the set not already picked (A & C)

有没有更好/更聪明的方法来完成这项任务?数据库模型呢?我是否可以对其进行优化,以便像“包含A&C的集合”这样的搜索不会太慢?

我认为这是典型的数据关联挖掘和推荐问题。您可以尝试使用google Apriori算法进行数据挖掘,并提出TOP N建议


您的解决方案会起作用,但在我的选择中并不全面。例如集合“A,B”和集合“A,B,C”不是独立的集合

搜索模型问题:
对我来说,你的模型似乎有点过于简化了,因为非常频繁的标记很可能总是建议的标记,即使存在与a、C对更相关的标记

如果稀有词也连接到“查询”[在这里,查询是
a和B
],那么您可能应该简化模型,这会促进稀有词的发展,因为如果稀有词通常与
a和B
一起使用,则可能与它们有很大关系

想法很简单:如果一个标签经常与
a和B一起使用,那么给它一个提升。[tf]

另外,如果一个术语很少见[这个标签的总使用次数]-给它一个提升[idf]
每个标签的“分数”将是tf idf的综合分数

性能问题:
您还可以为该任务创建concider-以加快搜索速度。

如果您正在使用java,它是一个成熟的库,可以帮助您使用它。

“建议使用隐式社交图的朋友”