In recent years, the high-frequency abnormal price fluctuations of small-scale agricultural products have been detrimental to market stability. The traditional method based on statistical data of production factors can no longer accurately predict abnormal price fluctuations. Taking scallions as a case, the paper identifies price influencing factors from massive network information, and analyzes the causes and changing characteristics of price fluctuations from four perspectives: market supply, economic environment and market sentiment, and attention. Initially, the study employs an LDA topic model to extract factors from online sentiment data over the past four years, including market supply and demand, economic conditions, related agricultural prices, and market attention. Subsequently, using the SO-PMI algorithm to expand domain-specific lexicons and employing semantic and sentiment analysis with syntactic parsing, the study aims to improve the accuracy of sentiment quantification in text analysis. Furthermore, cointegration and Granger causality tests validate the significant impact of these factors on scallion price fluctuations, mitigating spurious regression issues. Finally, by employing a TVP-VAR model, the study compares the impulse responses and shock magnitudes of various factors in different time and spatial dimensions. It also delves into the mechanisms of heterogeneous impacts and trends in scallion prices, considering the corresponding socio-economic context and public sentiment events within specific time windows, thereby providing valuable decision-making insights for the healthy development of agricultural markets.