## 2 Materials and Methods  
### Data Collection  
This study focuses on the 31 provincial-level administrative regions of China (excluding Hong Kong, Macau, and Taiwan) and analyzes public sentiment towards AI applications in education, exploring regional differences in emotional attitudes towards AI and the influencing factors behind them. The study will first apply the SnowNLP algorithm to perform sentiment analysis on data from major Chinese social media platforms (such as TikTok) to assess the public's emotional attitudes (positive or negative) regarding AI in education. Spatial analysis will then be conducted using ArcGIS 10.2 software to visual ize the spatial distribution characteristics of emotional attitudes across different regions. Finally, the study will examine the socio-economic factors influencing these spatial characteristics, such as the level of digital economy, technological innovation capacity, regional development vitality, residents' digital literacy, and policy environment, and their impact on emotional attitudes. The sentiment data for this study is sourced from the SnowNLP algorithm, which processes social media discussions and online public opinion from major Chinese social platforms, identifying, extracting, quantifying, and performing thematic analysis to capture two main categories of emotional data: positive and negative sentiments. SnowNLP is a method specifically designed for processing Chinese text, giving it a significant advantage in Chinese sentiment analysis, and it has been widely applied in social media sentiment analysis. When using SnowNLP for sentiment analysis, the Chinese text to be analyzed is first passed into the module. SnowNLP scans the words in the text to check if they have matching entries in the sentiment dictionary. Once a match is found, the sentiment polarity (positive, neutral, or negative) of the word is determined, and the number of positive and negative sentiment words in the text is counted. Furthermore, to improve the accuracy of sentiment analysis, SnowNLP also considers the relationships between words and sentence structure, such as the influence of negation words on sentiment. Based on the number of sentiment words, their polarity, and contextual information, SnowNLP calculates a sentiment score to reflect the strength of the sentiment. Ultimately, based on the calculation results, SnowNLP outputs the sentiment analysis results [25]. During the data collection process for sentiment attitudes, this study applied precise filtering operations to the data. Before starting data scraping, the data content to be collected was manually selected based on the core topic of the study to ensure that the gathered data closely aligned with the thematic requirements. During the data scraping process, a batch-by-batch strategy with immediate verification was used to reduce error rates. Using a crawler tool based on a crawler program, approximately 40,325 comment data points were collected from platforms such as TikTok, Bilibili, and Weibo. This data collection was completed on 30 September 2024, and included information such as user ID, city, comment content, and comment time. Since the data collected in the initial stage was mostly unstructured and varied in format, a detailed preprocessing process was implemented to ensure the completeness and accuracy of the data. This process involved manually removing null values, duplicate records, advertising content, and irrelevant information. To further improve the accuracy and reliability of subsequent data analysis, more meticulous measures were taken. First, Excel's duplicate highlighting and string processing features were used to remove duplicate evaluation records and short texts containing fewer than five words. Second, programming techniques and the Jieba word segmentation tool were used to perform in-depth word segmentation of the document content, effectively removing redundant information such as English letters, numbers, and meaningless words.