什么是Hot什么是Trending

in #cn7 years ago (edited)

一直好奇Hot和Trending的帖子是怎么选出的。今天看了@oflyhigh的帖子发现还是看源码最靠谱。学习高飞好榜样,查代码:

   inline double calculate_hot( const share_type& score, const time_point_sec& created )const
   {
      return calculate_score< 10000000, 10000 >( score, created );
   }

   inline double calculate_trending( const share_type& score, const time_point_sec& created )const
   {
      return calculate_score< 10000000, 480000 >( score, created );
}

这个calculate_score里的公式简化一下就是log(score/S)+timestamp/T,意思就是score除以一千万(S)再取对数再加上文章生成的时间数除以T。就是说分高的新帖子排名高。时间是线性,分数取对数。Hot和Trending唯一不同是T不一样。Hot的T是一万秒,也就是2.78小时。Trending的T是48万秒,也就是五天半。公式的意思就是三个小时前Hot帖子的分数需要是新帖子的十倍才能排名一样;五个半小时前的帖子的分数需要是新帖子的一百倍。Trending的帖子五天半前的贴子需要是新帖子的十倍;十一天前的帖子需要是新帖子的一百倍。

一觉醒来发现Steem跌到$1.3多。再跌是不是就应该买一些了?

I was curious about the calculation of Hot and Treading. Inspired by @oflyhigh and decided to search the source code and found the above snippet. A simplified understanding of calculate_score is log(score/S)+timestamp/T, which means it returns log of the score plus the time of the creation of the post. S is 10 millions for both Hot and Trending. For Hot, T is 10,000 seconds, or 2.78 hours. It means that the post of 3 hours old must have 10 times score to rank the same as the new post. For 5.5 hours old post, it needs to have a score of 100x. For Treading, T is 480,000s, or 5.5 days. It means 5.5 days old post needs to have 10x score to be as trending as the new post; An 11 days old post needs to be 100x.

Sort:  

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63330.55
ETH 2645.93
USDT 1.00
SBD 2.82