香港三國志 · 版規 | 說明 搜尋 會員 聲望 日曆 統計 |
歡迎訪客 ( 登入 | 註冊 ) | 重寄認證電子郵件 |
分頁: (3) 1 [2] 3 ( 前往第一篇未讀文章 ) |
耒戈氏 |
發表於: Aug 20 2015, 22:52
|
反潮流才是王道!! 發表數: 6,255 所屬群組: 太守 註冊日期: 7-15-2007 活躍:23 聲望:1540 |
I just omitted any normalization
|
徐元直 | |||
攤抖首領 發表數: 7,909 所屬群組: 君主 註冊日期: 9-18-2003 活躍:62 聲望:4175 |
正在測試用最近留言數來決定活躍度。僅僅統計每人最近7天的發帖數(爲頁面中每一個發帖者只跑一次SELECT COUNT的query),Script Execution time就從0.03秒飆升一個數量級到0.3秒左右,增長了十倍。 本篇文章已被 徐元直 於 Aug 21 2015, 10:25 編輯過 -------------------- ......
|
||
耒戈氏 | |
反潮流才是王道!! 發表數: 6,255 所屬群組: 太守 註冊日期: 7-15-2007 活躍:23 聲望:1540 |
可否每天用cron job計算一次然後儲在一欄裡? |
neveryield |
發表於: Aug 21 2015, 15:44
|
一品官 發表數: 2,057 所屬群組: 一般 註冊日期: 9-30-2010 活躍:12 聲望:529 |
不是有 "今日發表前十" ,"最近七天發表前十" 一類統計嗎?
-------------------- 世間之事,惟鬥爭已。
既便你達成了那最高尚的目的,亦無法彌補因为你採用了最卑劣的手段所帶来的恶劣影響。 一碗醇酒拈手來,坐看洪流不復來 經年不見花已殘,舊日芳人何處尋 開醰陳酒香四溢,醉臥山河愁不還 倒酒為河,夾肉為林,有此佳肴,何以為憂? 眾人皆醒,唯我猶夢中,不知年日,問長城依舊? 一竹獨行,十木皆枯,百里無塵,千秋不還。 日月更年,星晨生息,西海東來,南松北往。 還看舊地,天移地去,綠葉無蹤,礫石為孤。 蒼蒼茫茫,滴水沉泥,青草既出,逝會歸回? 大雪連綿千幾里,孤房門角一窗櫺, 老湖中間一條狗,獨坐冰樹望烏雲。 杯中良酒回回香,甘甜酒辣酸辛苦, 佳陳何止千百變,喜愁哀樂豈無嚐? |
徐元直 |
發表於: Aug 21 2015, 17:19
|
||
攤抖首領 發表數: 7,909 所屬群組: 君主 註冊日期: 9-18-2003 活躍:62 聲望:4175 |
有,但該頁也是顯示才統計,執行時間在1.5秒左右。 -------------------- ......
|
||
Pearltea |
發表於: Aug 21 2015, 17:30
|
||
四品官 發表數: 1,289 所屬群組: 太守 註冊日期: 9-22-2003 活躍:5 聲望:614 |
元直, is it time consuming to run what 耒戈氏 proposed - daily update? I would assume that even with daily posts/votes, the activity level wouldn't change so much to the point that requires recalculations every time a post is loaded. 本篇文章已被 Pearltea 於 Aug 21 2015, 19:43 編輯過 |
||
徐元直 | |||||
攤抖首領 發表數: 7,909 所屬群組: 君主 註冊日期: 9-18-2003 活躍:62 聲望:4175 |
Cron job should be feasible, I'm testing the code now. Edit: Just tested the code, takes less than 10 seconds to count last-7-and-30-day post numbers for each of the ~4300 members. This should work. I'm going to add reputation vote counter as well. 本篇文章已被 徐元直 於 Aug 21 2015, 18:50 編輯過 -------------------- ......
|
||||
Pearltea | |||||||
四品官 發表數: 1,289 所屬群組: 太守 註冊日期: 9-22-2003 活躍:5 聲望:614 |
Hooray! Thanks for making the change. I couldn't care less if the bar moves in either direction, but I guess no one will pick on my miserably low number anymore |
||||||
Pearltea |
發表於: Aug 21 2015, 19:52
|
||||||
四品官 發表數: 1,289 所屬群組: 太守 註冊日期: 9-22-2003 活躍:5 聲望:614 |
Hold on...10 seconds for each of the 4300 members? Even with only 9 seconds you're looking at 38,700 secs for the calculation, which translates to 645 mins or 10 hrs 45 mins, no? 本篇文章已被 Pearltea 於 Aug 21 2015, 19:54 編輯過 |
||||||
Pearltea |
發表於: Aug 21 2015, 20:39
|
四品官 發表數: 1,289 所屬群組: 太守 註冊日期: 9-22-2003 活躍:5 聲望:614 |
活躍度: 120
發表數: 728 所屬群組: 一般 註冊日期: 9-22-2003 聲望:158 I just noticed the change...Shouldn't 活躍度 be capped at 100? |
徐元直 | |||||||||
攤抖首領 發表數: 7,909 所屬群組: 君主 註冊日期: 9-18-2003 活躍:62 聲望:4175 |
No, I mean less than 10 seconds total to "count last-7-and-30-day post numbers for each of the ~4300 members". Now I have optimized the code, it will only scan members who has ever made a post or made a vote, and was active within the last 30 days. This shortened the loop to process only ~50 members, and takes less than 3 seconds to complete. Now I have the data, I'm working on the formula, you may see the number change rapidly as I adjust the calculation. -------------------- ......
|
||||||||
徐元直 |
發表於: Aug 21 2015, 20:56
|
||
攤抖首領 發表數: 7,909 所屬群組: 君主 註冊日期: 9-18-2003 活躍:62 聲望:4175 |
I will cap it at 100 eventually, but now I want to see the actual number to adjust the formula. -------------------- ......
|
||
徐元直 | |
攤抖首領 發表數: 7,909 所屬群組: 君主 註冊日期: 9-18-2003 活躍:62 聲望:4175 |
調整出一個方案,大家給點意見?
活躍度計算方法如下: (A)有登入的總日數 / 註冊至今總日數 (B)最近訪問是在多少天之前 (如超過30則當作30) (C)最近7天發帖數 + 最近30天發帖數/3 + 最近7天評價他人次數/3 + 最近30天評價他人次數/9 (C項非即時更新,暫定每小時自動更新一次) 活躍度= A*30 +(30 - B)+ C*1.5 超過100只顯示100。 本篇文章已被 徐元直 於 Aug 21 2015, 23:53 編輯過 -------------------- ......
|
耒戈氏 |
發表於: Aug 22 2015, 01:41
|
||
反潮流才是王道!! 發表數: 6,255 所屬群組: 太守 註冊日期: 7-15-2007 活躍:23 聲望:1540 |
看上去還合理 剛新進的會員只須7天也登入而且發20帖(或60個評價)就100活躍度了,不過以今天HKSAN的情況其實還可以 |
||
徐元直 | |
攤抖首領 發表數: 7,909 所屬群組: 君主 註冊日期: 9-18-2003 活躍:62 聲望:4175 |
-------------------- ......
|
Pearltea |
發表於: Aug 22 2015, 05:55
|
||
四品官 發表數: 1,289 所屬群組: 太守 註冊日期: 9-22-2003 活躍:5 聲望:614 |
I like it. It weighs evenly with the 3 main activity attributes and applies a heavier weight or 'bonus' (1.5) to participations. Then the count of comments is a more decisive factor than the count of votes, so it seems pretty reasonable to me. |
||
Caesar |
發表於: Aug 22 2015, 08:01
|
Loop 發表數: 7,489 所屬群組: 軍團長 註冊日期: 12-18-2004 活躍:24 聲望:2218 |
Sooooooooo
Whats the tick next to 100? 本篇文章已被 Caesar 於 Aug 22 2015, 08:01 編輯過 -------------------- |
Caesar |
發表於: Aug 22 2015, 08:15
|
||
Loop 發表數: 7,489 所屬群組: 軍團長 註冊日期: 12-18-2004 活躍:24 聲望:2218 |
看見我那個93,這實在太傷心了 我在最近七天及三十天發表數、重訪次數也是名列前茅的。 既然我能上來看了,B部也該是滿分的。 可我的帳號是十年前註冊的,而且有經歷兩三次為時一年以上的深潛。 這部分追不回來呀。(除非重現昔日大小滿灌的神話) 可否私心提議,在C部加一項,總發表數/1000 這樣 (你喜歡 /500 or /250 也可以 ) 即使抽離自身利益關係,我認為這也是合理的。 哪天要是蛇魔外遊消失一個月,他的活躍度只剩二十多。 可要說咱家HKSAN,有誰比他更活躍的? 有個總發表數當補底,活躍度下降也慢一點,在計算上也不太構成負擔, 而且為論壇貢獻1000貼才補底一點,也不為過呀? 本篇文章已被 Caesar 於 Aug 22 2015, 08:29 編輯過 -------------------- |
||
耒戈氏 | |
反潮流才是王道!! 發表數: 6,255 所屬群組: 太守 註冊日期: 7-15-2007 活躍:23 聲望:1540 |
名列前茅即是多少啊?(要知道今天活躍於HKSAN的少於十個)
如果外遊沒上的話,其實在系統看來就真是不活躍了,當然要降低一下。如果太狠的話,不如把一星期內的帖改成兩星期內的帖,一個月的帖改成兩個月的帖? |
Caesar |
發表於: Aug 22 2015, 13:20
|
||
Loop 發表數: 7,489 所屬群組: 軍團長 註冊日期: 12-18-2004 活躍:24 聲望:2218 |
所以你忘了示意,你對這提議的態度是positive 還是negative呀 -------------------- |
||
分頁: (3) 1 [2] 3 |