だから私がやろうとしているのは、流行のアルゴリズムを作ることです.SQLコードを手に入れることができないので、助けが必要です.
アルゴリズムには 3 つの側面があります: (私はより良いトレンド アルゴリズムに関するアイデアを完全に受け入れています)
1.Plays during 24h / Total plays of the song
2.Plays during 7d / Total plays of the song
3.Plays during 24h / The value of plays of the most played item over 24h (whatever item leads the play count over 24h)
各側面は 0.33 の価値があり、最大値 1.0 が可能です。
新しくアップロードされたアイテムは、ドロップダウンする方法でない限り、自動的に一番上に表示されるため、3 番目の側面が必要です。
テーブルは aud_plays と呼ばれ、列は次のとおりです。
PlayID: Just an auto-incrementing ID for the table
AID: The id of the song
IP: ip address of the user listening
time: UNIX time code
私はいくつかのSQLコードを試しましたが、これを機能させることができずにかなり立ち往生しています。