Write a function to efficiently parse and aggregate a massive stream of user interaction tokens for Character.AI.