Improved and optimized the tag-trend algorithm.