This work focuses on the extraction and analysis of large-scale data from the Internet, specifically using panel data consisting of 273 prefecture-level cities spanning the period from 2011 to 2021. The data are processed using both the panel fixed-effect model and the panel smooth transformation model (PSTR). This study examines the relationship between public environmental concern and urban air pollution, as well as the impact of various city area divisions on public environmental concern and urban ambient air pollution. The regression analysis reveals several key findings: (1) It is observed that the impact of public participation in environmental pollution control on suppressing air pollution exhibits a lag of approximately three periods. This implies that it takes some time for the power of public participation to manifest its effect in reducing air pollution. (2) The study finds that urban public environmental concern, as measured by the Baidu Index, has a suppressive effect on air pollution once it surpasses a threshold value of 20,455.36. (3) This effect is found to be strengthened as the level of public concern increases. Lastly, it is noted that public environmental concern exhibits regional heterogeneity, which can be attributed to factors such as economic development and scientific and technological advancements. These factors influence the level of public environmental concern in different regions. The findings may be succinctly summarized as follows: geographical variations in public environmental concern can be attributed to the impact of economic growth and advancements in science and technology. Regional variability may arise from several sources, including economic growth, scientific and technical advancements, and other influences, all of which impact public environmental concerns.