Cyberspace is emerging as a critical living environment, significantly influencing sustainable human development. Internet public opinion is a crucial aspect of cyberspace governance, serving as the most important form of expressing popular will. However, perceiving public opinion can be challenging due to its complex and elusive nature. In this paper, we propose a novel framework for perceiving popular will, managing public opinion, and influencing people’s behavior, based on machine learning and game theory approaches. Our framework leverages deep learning techniques to analyze public opinion, active learning methods to reduce costs, and game theory to make optimal management decisions. We verify the effectiveness of our framework using empirical data collected from Chinese provinces Y and G, and provide theoretical support by analyzing the interrelationship between public opinion, online public opinion, and people’s behavior. Our framework can be applied inexpensively to studies in other regions, thereby offering valuable insights into cyberspace governance and public opinion management.