The document presents a framework called UPS for enhancing privacy protection in personalized web search (PWS) by allowing users to specify privacy requirements for their hierarchical profiles. Two algorithms, greedydp and greedyil, are developed to facilitate runtime generalization of user profiles while balancing personalization utility and privacy risks. Extensive experiments demonstrate that greedyil significantly outperforms greedydp, improving efficiency and effectiveness in the PWS context.