Abstract
Artificial intelligence is reshaping approaches to architectural heritage conservation by enabling a deeper understanding of how people perceive and experience historic built environments. This study employs deep learning and large language models (LLMs) to explore public perceptions of the Qinghefang Historical and Cultural District in Hangzhou, illustrating how AI-driven analytics can inform intelligent heritage management and architectural revitalization. Large-scale public online reviews were processed through BERTopic-based clustering to extract thematic structures of experience, while interpretive synthesis was refined using an LLM to identify core perceptual dimensions including Hangzhou Housing & Residential Choice, Hangzhou Urban Tourism & Culture, Hangzhou Food & Dining, and Qinghefang Culture & Creative. Sentiment polarity and emotional intensity were quantified using a fine-tuned BERT model, revealing distinct affective and perceptual patterns across the district’s architectural and cultural spaces. The results demonstrate that AI-based textual analytics can effectively decode human–heritage interactions, offering actionable insights for data-informed conservation, visitors’ experience optimization, and sustainable management of historic districts. This research contributes to the emerging field of AI-driven innovation in architectural heritage by bridging computational intelligence and heritage conservation practice.
1. Introduction
The conservation of architectural heritage is undergoing a paradigm shift, moving from a discipline focused primarily on material preservation to a holistic practice that integrates social values, urban sustainability, and the intangible dimensions of human experience. Historic districts are not merely static artifacts; they are living heritage. The “brand image” of the historic district, is made up of heritage, and historical and cultural interest on the one hand, and on the other, the atmosphere and soul of the place, conveyed by the inhabitants, with the street becoming the “cultural backdrop” [1]. Therefore, understanding how the tourists and the inhabitants perceive and explore historic districts, and how they subsequently develop emotional bonds with them, is crucial for effective heritage management.
Understanding these human–heritage interactions require a robust theoretical framework linking environmental stimuli to behavioral outcomes. Classic environmental psychology, specifically the P–A–D (Pleasure–Arousal–Dominance) paradigm by Mehrabian and Russell [2], suggests that physical attributes like spatial density and lighting evoke primary emotional responses that drive approach or avoidance behaviors. In the context of historic districts, these responses are further deepened by place attachment, a concept describing the enduring bond between individuals and specific settings [3]. This attachment often manifests as nostalgia or a sense of belonging, which are threatened when commercialization undermines existential authenticity—the subjective feeling of genuine experience described by Wang [4]. Furthermore, servicescape theory posits that the physical environment acts as a complex service setting, where architectural forms and sensory cues directly influence publics’ satisfaction [5]. These theoretical pillars highlight the necessity of decoding the subtle tensions between heritage integrity and commercial vitality.
However, traditional methods of assessing these complex experiences—such as surveys, interviews, and on-site observations—are often limited by small sample sizes, high costs, and static temporal scopes. They struggle to capture the granular, real-time public sentiment required for adaptive management. In response, recent research has increasingly turned to data-driven approaches. Studies evaluating coastal industrial heritage have successfully combined objective visual indicators (e.g., green visibility) with subjective assessments to guide “living preservation” [6]. Similarly, research utilizing deep learning on social media data from cities like Suzhou and Kyoto has revealed that while visual perception often dominates, a multisensory analysis provides a more accurate understanding of place identity [7]. Additionally, Aspect-Based Sentiment Analysis (ABSA) has been shown to detect emerging maintenance issues in real-time, outperforming periodic expert inspections in responsiveness [8].
Despite these advancements, a significant gap remains. While current AI-driven studies effectively classify general sentiment [9,10], they often fail to deeply interpret the specific architectural or spatial triggers behind these emotional responses. There is a need for methodologies that not only quantify “joy” or “frustration” but also explain why these emotions occur in relation to specific heritage elements—balancing the trade-off between preservation and modernization [11].
This study proposes a workflow-based approach that integrates the latest capabilities of deep learning (DL) and large language models (LLMs) to enhance the efficiency of AI-driven analysis of online review data in historic districts. The specific framework involves using BERTopic-based clustering to extract the structural themes of user experiences, fine-tuning a BERT model to quantify sentiment polarity and intensity, and applying LLMs to automatically assign topic labels to the clustering results, thereby reducing the need for manual annotation. Qinghefang Historical and Cultural District was selected as the case study. As a historic area shared by both tourists and residents, it provides a suitable context for discussing the challenge of balancing conservation with modernization. Under the AI-driven analytical framework composed of these three emerging technologies, four core dimensions of public self-reported perceptions were identified: urban tourism culture, Qinghefang’s cultural and creative ecosystem, food and beverage experiences, and residential preferences. This approach aligns with the UNESCO Historic Urban Landscape (HUL) framework [12], demonstrating how computational intelligence can support evidence-based, human-centric heritage management.
2. Materials and Methods
2.1. Study Area: Qinghefang Historical and Cultural District
The Qinghefang Historical and Cultural District, located at the foot of Wu Hill in the main urban area of Hangzhou, was selected as the primary case study. Hangzhou, designated as one of China’s first batch of national historical and cultural cities in 1982, has a history of over 2200 years since its establishment and served as the capital of the Southern Song Dynasty. As Hangzhou’s most prominent historical district, Qinghefang represents the architectural characteristics of the late Ming and early Qing dynasties [13,14]. Wushan Square, the city’s dynamic center, is located 400 m west of the district, accessible on foot, while the nationally renowned West Lake Scenic Area lies a further 600 m west. Serving as both a hub for urban residents’ daily activities and a popular tourist destination, it constitutes a complex “living heritage” ecosystem (Figure 1).
Figure 1.
Location map of Qinghefang Historical and Cultural District. Map showing the geographical location of the study area.
The district is primarily composed of two streets: Gaoyin Street to the north, a well-known culinary thoroughfare under one-way traffic control; and Hefang Street, which runs parallel to Gaoyin Street, serves as the district’s central street and operates as a pedestrian street. Extending over 500 m, Hefang Street is dominated by commercial establishments, supplemented by diverse amenities including time-honored pharmacies, traditional teahouses, museums, and handicraft workshops. More than ten alleyways traverse Hefang Street, guiding tourists and inhabitants into the courtyard spaces and intricate lane networks behind the traditional two stories’ buildings. Notably, the eastern section of Hefang Street intersects with South Zhongshan Road, also referred to as the “Southern Song Imperial Street.” Designed by acclaimed architect Wang Shu, this urban regeneration project was opened to the public in 2009 as a 900 m pedestrian street with sections of the original Southern Song Dynasty street pavement, uncovered through archaeological excavations, are preserved and exhibited in their original location. With its dual identity as a protected cultural sanctuary and a high-traffic tourist destination, the district offers an ideal context for exploring the spatial and emotional tensions between heritage authenticity and modern commercialization (Figure 2).
Figure 2.
Heritage and urban layout of Qinghefang Historical and Cultural District. Map showing the cultural relic protection units, pedestrian walkways, roads, and street scenery within the district. boundary data source: https://www.tianditu.gov.cn; other map data source: https://www.mapbox.com.
2.2. Data Collection and Preprocessing
To capture a comprehensive spectrum of public sentiments, textual data were harvested from the most popular social media “Xiaohongshu (RedNote)” platforms. RedNote is currently one of the most widely used social media apps in China. It has also become a go-to search engine for user-driven recommendations, such as travel tips and product reviews. The use of RedNote as a search engine for product reviews helps enable a positive feedback loop known as the “social commerce cycle”. Both locals and tourists post content about daily activities and travel guides on it. Given that “Qinghefang” is also known as “Hefang Street”, data were collected twice using these two terms as keywords, after which the datasets were merged for analysis. The data collection period spanned from 1 December 2024 to 1 December 2025, ensuring the inclusion of recent visitors’ experiences. A custom-built web crawler utilizing Python 3.12.11 libraries was employed to extract online reviews, resulting in an initial corpus of 7620 raw entries. To ensure analytical rigor, a multi-stage data cleaning pipeline was implemented. This process involved the removal of HTML tags, URLs, emojis, and non-textual characters, followed by the deduplication of repeated entries to eliminate spam. Furthermore, reviews with fewer than 10 characters were excluded due to their lack of semantic depth. Following these preprocessing steps, the final valid dataset comprised 6468 distinct reviews, which formed the empirical basis for the subsequent analysis.
This study analyzed publicly accessible user-generated texts posted on RedNote that were retrievable via keyword search (“Qinghefang” and “Hefang Street”) during the period from 1 December 2024 to 1 December 2025. Data collection was conducted for research purposes only and focused on textual content relevant to place-related narratives. Data collection and processing were designed to follow applicable laws and institutional policies, and to minimize privacy risks. We consulted RedNote’s publicly available platform rules/terms at the time of collection and limited the crawler to a conservative request rate to reduce operational burden on the platform. If requested by the platform or rights holders, the dataset can be taken down and will not be redistributed. We collected and retained only the fields necessary for analysis, including post text, posting time (at day-level or month-level granularity), and an internal record ID. Therefore, we followed a privacy-by-design approach throughout data handling.
2.3. Analytical Framework
This study explores an analytical framework that combines large language models (LLMs) with deep learning methods to efficiently extract valuable information from large volumes of online reviews at a relatively low cost. The proposed approach involves three main steps: first, using the deep learning tool BERTopic to cluster raw text into coherent themes (Section 3.1); second, employing the DeepSeek V3.2 LLM to automatically assign labels to the clustered text (Section 3.2); and third, introducing a fine-tuned BERT model to determine the sentiment orientation of the original text and assign sentiment scores (Section 3.3). Based on these clusters, the sentiment tendencies of different themes are then interpreted (Section 3.4). The detailed methodology is described below.
2.3.1. Topic Modeling with BERTopic
To deconstruct the thematic structure of visitors’ narratives, this study utilized BERTopic, an advanced topic modeling technique that generates dense vector representations of documents [15]. This technique differs from traditional machine-learning-based clustering methods by leveraging deep learning, and it represents one of the most powerful unsupervised/semi-supervised approaches for Chinese topic modeling currently available. The process began with semantic embedding [16], where the pre-trained Chinese model shibing624/text2vec-base-chinese was employed to convert textual reviews into high-dimensional vectors. To optimize clustering performance, normalized embeddings were generated in batches [17]. Subsequently, the UMAP (Uniform Manifold Approximation and Projection) algorithm was applied for dimensionality reduction. The model parameters were tuned specifically for this dataset, utilizing a cosine metric and a neighbor size of 15 to preserve local semantic structures while preparing the data for density-based clustering.
Clustering was performed using HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise). To capture fine-grained thematic distinctions, the cluster selection method was set to “leaf” with a minimum cluster size of 30, allowing for the identification of specific, niche visitors’ experiences. To validate the model’s reliability, we performed stability diagnostics by varying the min_cluster_size from 20 to 50. The resulting thematic structures remained highly consistent, indicating that the model is robust to parameter fluctuations. Furthermore, we evaluated semantic quality using two quantitative metrics: Topic Coherence () and Topic Diversity. The model achieved a Coherence score of 0.6285 and a Diversity score of 0.7378, confirming that the 66 identified topics were both internally consistent and distinct from one another. A critical step in this workflow was the handling of noise; an outlier reduction strategy based on c-TF-IDF (class-based Term Frequency-Inverse Document Frequency) was implemented to reassign unclustered documents to their nearest thematic neighbors, ensuring maximum data utilization [18]. Finally, the textual representation of each topic was refined using a CountVectorizer configured with a custom stop-word list and a bigram range (1, 2), which effectively captured meaningful Chinese phrases and compound words integral to describing architectural features.
2.3.2. Interpretive Synthesis Using Large Language Models (LLMs)
While quantitative clustering identifies latent themes, transforming these clusters into meaningful perceptual dimensions requires a multi-stage qualitative synthesis [18]. This study integrated DeepSeek V3.2 to interpret the outputs of the BERTopic model through a structured two-step workflow. To ensure reproducibility, the model was accessed via API with deterministic parameters (temperature = 0).
In the first stage (Topic Labeling), the LLM was provided with the top 10 keywords for each of the 66 identified topics. The model was prompted to generate a concise, descriptive label for each topic to facilitate initial interpretation. In the second stage (Dimension Synthesis), rather than using pre-defined categories, the five core perceptual dimensions were derived through a hybrid human-AI approach. First, researchers performed a manual grouping of the 66 topics into five clusters based on the semantic similarity and structural proximity visualized in the hierarchical dendrogram. The hierarchical clustering process utilized the Ward linkage method and Cosine distance as the proximity metric. This configuration minimizes within-cluster variance, ensuring that merged topics share a tight semantic bond. The decision to define five dimensions was supported by a data-driven “elbow” criterion observed in the dendrogram: at the five-cluster level, the branch height (representing inter-cluster distance) showed a significant increase, suggesting a natural saturation point where further merging would obscure meaningful experiential distinctions. Second, the collective keywords and the topic labels from each cluster were fed into the LLM with the following prompt:
“Below are several groups of topics and their associated keywords extracted from public reviews. For each group: (1) Analyze the common semantic threads across these topics. (2) Synthesize a high-level dimension name (e.g., ‘Food & Dining’) that encompasses all topics within the group. (3) Briefly justify how this dimension reflects the tourists and locals’ spatial or cultural experience.”
This “human-in-the-loop” workflow ensured that the categorization was grounded in the data’s inherent structure [19]. The dendrogram provided the objective spatial-semantic evidence for grouping, while the LLM provided the linguistic synthesis to name those groups. Finally, two experts reviewed the LLM-synthesized dimension names to ensure they aligned with the architectural and cultural context of the Qinghefang District, resulting in the five dimensions: Hangzhou Urban Tourism & Culture, Hangzhou Housing & Residential Choice, Hangzhou Food & Dining, Qinghefang Culture & Creative, and Unknown.
2.3.3. Sentiment and Emotion Analysis with Fine-Tuned BERT
To quantify the emotional dimension embedded within visitors’ narratives, this study employed a fine-tuned BERT model optimized for multi-class sentiment classification in Chinese-language texts. This model is based on the Transformer architecture and represents a discriminative application within deep learning [20], It enables context-aware representation learning through a bidirectional attention mechanism [21]. Applying this approach to sentiment classification allows for the identification of subtle emotional cues related to architectural aesthetics, spatial comfort, and the tensions arising from commercialization.
A labeled subset of the review corpus was used to train a sentiment classifier with three categories: negative, neutral, and positive. Prior to training, the dataset underwent stratified splitting using an 80/20 ratio to prevent distributional bias across sentiment classes. Each sentence was tokenized using the bert-base-chinese tokenizer and converted into fixed-length input sequences (maximum length = 128). To mitigate imbalances among sentiment categories, a WeightedRandomSampler was applied during batch construction, ensuring that minority classes were adequately represented during training iterations.
The BERT classifier was fine-tuned with a learning rate of 2 × 10−5, weight decay of 0.01, and a dropout probability of 0.1 to reduce overfitting. Gradient clipping (max norm = 1.0) was used to stabilize updates during backpropagation. To further enhance generalization capability, a two-phase learning rate strategy was tested:
- (1)
- ReduceLROnPlateau, which adapts the learning rate based on validation loss trends; and
- (2)
- CosineAnnealingLR, which gradually anneals the learning rate to a minimum threshold.
This hybrid configuration ensured that the optimization process remained both stable and responsive to convergence behavior.
Evaluation metrics included accuracy, macro-averaged precision, recall, F1-score, and confusion matrix visualization normalized by row percentage to reflect classification reliability across sentiment types [22]. In addition, multi-class ROC curves were generated using one-vs-rest probability outputs to assess discriminative performance across the three emotion categories.
Upon completion of training, the model parameters yielding the highest validation accuracy were saved as the final classifier. For each review in the full dataset, the classifier produced both a sentiment label and a continuous probability distribution, enabling quantitative estimation of emotional polarity and emotional intensity. These outputs were subsequently integrated with the topic clusters derived from BERTopic, allowing the study to map emotional responses onto specific spatial or experiential themes.
3. Results
3.1. Thematic Structure of Public Experience (From BERTopic)
The initial BERTopic analysis generated 66 distinct topics from 6468 visitors’ reviews collected in the Qinghefang District. Each topic represents a coherent semantic cluster of public narratives, capturing specific aspects of experience. To visualize the distribution and density of these topics, a two-dimensional embedding of all reviews was produced using UMAP, followed by HDBSCAN clustering (Figure 3). The scatter plot illustrates that while most topics are well-separated, a small proportion of reviews (341) were classified as outliers, corresponding to the unassigned category (−1).
Figure 3.
Scatter plot of 66 BERTopic clusters derived from visitors’ reviews. Each point represents a review embedded in two-dimensional space using UMAP. Colors indicate cluster membership, with gray points corresponding to unassigned (−1) reviews.
Hierarchical clustering of the 66 topics further revealed higher-level groupings, enabling the condensation of granular themes into five core perceptual dimensions. These groups were determined based on semantic similarity and contextual relevance among the topics:
Group 1: Topics 1, 2, 5, 8, 10, 11, 12, 17, 20, 23, 25, 31, 37, 39, 45, 46, 48, 49, 51, 52, 53, 58, 60, 61, 62, 63, 65.
Group 2: Topics 18, 28, 41, 42, 54, 55.
Group 3: Topics 3, 4, 6, 13, 15, 16, 29, 30, 38, 40, 44, 47, 56.
Group 4: Topics 0, 7, 9, 14, 19, 21, 22, 24, 26, 32, 33, 34, 35, 36, 43, 50, 57, 59, 64.
Unassigned (−1): Reviews that could not be meaningfully clustered due to low semantic similarity or ambiguous content.
The distribution of topics within these five groups highlights the diversity of visitors’ experience. Group 1 encompasses the largest number of topics, reflecting broad engagement with the district’s housing, streetscapes, and cultural ambiance. Group 2 primarily focuses on visitors’ choices related to urban tourism and cultural activities in Hangzhou. Group 3 emphasizes food, dining, and related gastronomic experiences. Group 4 is closely associated with Qinghefang’s culture and creative industries, including shops, workshops, and traditional handicrafts. The unassigned category has 341 reviews, which represents reviews that were either too general or did not fit the primary thematic structures.
3.2. Core Perceptual Dimensions Identified Through LLM Synthesis
Following the hybrid human-AI workflow described in Section 2.3.2, the 66 granular topics were synthesized into five core perceptual dimensions. This process leveraged the structural grouping from the hierarchical dendrogram (Figure 4) and the semantic summarization capabilities of DeepSeek V3.2. The synthesis successfully captured the multifaceted nature of public experiences, ranging from functional urban requirements to hedonic cultural consumption.
Figure 4.
Hierarchical dendrogram of 66 topics. The dendrogram shows the semantic similarity among topics and the formation of five core perceptual groups, serving as the basis for higher-level thematic analysis.
As a result of this expert-verified synthesis, five primary dimensions were established: Hangzhou Urban Tourism & Culture, Hangzhou Housing & Residential Choice, Hangzhou Food & Dining, Qinghefang Culture & Creative, and an Unknown Category. Traditionally, this step has been performed manually in prior studies, which is often limited by subjective interpretive bias. By employing a prompt-based LLM workflow guided by algorithmic clustering, this study ensures that the identification of key information in large-scale online reviews is both data-driven and linguistically nuanced, providing a more transparent basis for heritage management.
3.3. Performance Evaluation of the Fine-Tuned BERT Sentiment Classifier
The next step is to quantify the emotional dimension embedded within public reviews. To develop the classifier, we constructed a specialized training dataset by pooling 8572 manually labeled review segments from various historic districts. To ensure model robustness and avoid bias, the training set was curated to maintain a relatively balanced distribution: 3814 positive, 3183 negative, and 1575 neutral samples. The labeling was performed by three independent researchers in the field of urban heritage. They followed a strict protocol where “Neutral” was reserved for purely objective spatial descriptions (e.g., “The street is 500 m long”). The final interannotator agreement reached a Cohen’s of 0.84, reflecting high consistency. Crucially, to prevent data leakage that could inflate performance scores, a document-level de-duplication (based on MD5 hashing) was executed before the data split. The dataset was then partitioned into training and test sets ( ratio) using stratified sampling to preserve the class proportions across both subsets.
To ensure the reliability of the sentiment analysis applied to the public reviews, the performance of the fine-tuned BERT model was rigorously evaluated using a held-out test set comprising 1715 reviews. As illustrated in the training and validation curves, the model demonstrated rapid convergence and robust generalization capabilities. The training process was monitored using an early stopping mechanism to mitigate overfitting. As shown in Figure 5, the model achieved optimal performance at Epoch 6, reaching a training accuracy of 99.60% and a validation accuracy of 96.74%. The validation loss stabilized at approximately 0.14.
Figure 5.
Training vs. Validation Loss and Accuracy. The top panel shows the rapid decrease in loss, while the bottom panel demonstrates the stabilization of accuracy. The model training was halted at Epoch 6 via early stopping to prevent overfitting.
Upon evaluation on the independent test set, the classifier achieved an overall accuracy of 96.27%. The macro-averaged F1-score was 0.9543, and the weighted F1-score was 0.9629, suggesting that the model maintains high predictive stability even with imbalanced class distributions.
To further analyze the model’s classification behavior across different sentiment categories (Negative, Neutral, Positive), a normalized confusion matrix was generated (Figure 6).
Figure 6.
Normalized Confusion Matrix (Percentage). The diagonal elements represent the recall rate for each class (Class 0: Negative, Class 1: Neutral, Class 2: Positive).
The confusion matrix reveals high classification accuracy across all categories. Class 0 (Negative) achieved the highest correct classification rate at 97.96%, followed by Class 2 (Positive) at 96.07%. Class 1 (Neutral), which is typically the most challenging due to semantic ambiguity, still maintained a robust accuracy of 93.33%. The misclassification rates were minimal, with less than 3.6% of neutral comments being misidentified as positive or negative, confirming the model’s sensitivity to subtle emotional nuances.
Finally, the discriminative ability of the classifier was assessed using Multi-class Receiver Operating Characteristic (ROC) curves (Figure 7). The Area Under the Curve (AUC) values for all three classes were exceptionally high, ranging from 0.995 to 0.999. These results indicate that the fine-tuned BERT model possesses a robust and highly reliable ability to distinguish sentiments. It should be noted that while the final application of this model to the 6468 reviews from Qinghefang District showed a skewed distribution (81.4% positive), the model itself was trained and validated on the aforementioned balanced dataset. Therefore, the high AUC values are a reflection of the model’s learning efficacy on distinct emotional features rather than an artifact of class imbalance in the case study area (Figure 8).
Figure 7.
Multi-class ROC Curves. The Area Under the Curve (AUC) values for all classes approach 1.0.
Figure 8.
Extract representative text for sentiment analysis.
3.4. Sentiment Polarity and Emotional Intensity Distribution
Figure 9 presents the sentiment polarity distribution for the five core perceptual groups. The results indicate that the district functions primarily as a high-satisfaction tourism destination, with positive sentiment dominating across most categories. Notably, the theme of “Hangzhou’s urban tourism and culture,” which is dominated by tourist reviews, received positive sentiment in 86.9% of cases. The theme of “Hangzhou food and dining,” where both tourists and locals are equally represented, obtained 88.8% positive sentiment, while “Culture & Creative” received 76.8% positive sentiment. These results indicate that the district’s urban tourism and cultural attractiveness remain strong, and both tourists and locals collectively support a vibrant catering industry and innovative cultural sectors. Together, they generate a high volume of positive emotions, with only a very small proportion of negative sentiment.
Figure 9.
Distribution of Sentiment Polarity across Perceptual Dimensions. The chart compares the absolute count of negative, neutral, and positive reviews, highlighting the dominance of positive sentiment in tourism-related categories versus the mixed/neutral profile of residential topics.
In contrast, the sentiment structure of the “Hangzhou housing and residential preferences” dimension, which is dominated by local residents, differs from the three categories mentioned above. Neutral sentiment accounts for 37.4% of the total, a proportion significantly higher than in the other three themes, while negative sentiment is also lower than in the other categories. This structural difference reflects the pragmatic, transactional nature of residential narratives—focused on prices, locations, and verification—rather than the emotive appreciation typical of tourist experiences.
To provide a more granular understanding, Figure 10 visualizes the relationship between topic popularity (Count) and average emotional valence (Mean Sentiment Score) for all 66 identified topics. The sentiment score is calculated on a scale from −1 (Negative) to 1 (Positive), with dashed lines indicating the global average sentiment (μ ≈ 0.81) and average topic frequency (μ ≈ 96.5).
Figure 10.
Topic-Level Sentiment Analysis. The scatter plot displays each topic’s mean sentiment score against its occurrence count. The dashed lines represent the dataset’s global averages, distinguishing between niche/mainstream and high/low satisfaction topics.
The scatter plot reveals three distinct clusters of public experience:
High-Impact Core Attractions (High Count, High Sentiment): Topics such as Spring Festival Fair (Topic 0, Score = 0.83) and West Lake Top Sights (Topic 1, Score = 0.87) appear in the upper-right quadrant. These represent the district’s “flagship” experiences, successfully combining high tourists and locals volume with consistently excellent feedback.
Niche High-Quality Services (Low Count, Very High Sentiment): Several specific services, including Hotel Services (Topic 52) and Accommodation & Booking (Topic 60), achieved near-perfect sentiment scores (>0.98) despite lower review volumes. This indicates specialized areas where service quality is exceptional but discussed less frequently.
Functional and Mixed-Sentiment Zones (Low Sentiment): Topics falling significantly below the global sentiment average are primarily concentrated in the residential and commercial management domains. For instance, Jiangcheng Road Rentals (Topic 28) and Hangzhou Second-Hand Housing (Topic 54) show markedly lower mean scores (~0.28–0.36). It is crucial to note that these lower scores do not necessarily imply overt hostility, but rather a predominance of neutral, informational discourse characteristic of real estate discussions. This indicates that historical districts are not only for tourists but also serve as residential areas for local residents and new migrants. There is a significant difference between the values those tourists expect to gain and what they expect to achieve. The negative emotions caused by fluctuations in housing prices and rents are part of everyday life, in contrast to the “public perspective.”
The sentiment analysis demonstrates a clear bifurcation in the district’s digital footprint: a highly positive, emotionally resonant “tourist layer” centered on culture and food, and a more neutral, utilitarian “resident layer” focused on housing and logistics. This distinction validates the AI model’s ability to disentangle complex, overlapping urban narratives.
4. Discussion
4.1. The Dual Identity of Historic Districts: “Tourist Gaze” vs. “Living Space”
The most significant finding of this study is the distinct emotional divergence between tourism-oriented dimensions and residential-functional dimensions. The sentiment analysis reveals that Qinghefang operates as a dual ecosystem. On one hand, the “Qinghefang Culture & Creative” and “Hangzhou Food & Dining” categories evoke high-intensity positive emotions, confirming that the district’s architectural heritage and culinary assets successfully function as a “servicescape” that generates delight for both tourists and locals. This aligns with servicescape theory, where physical cues (e.g., historic streetscapes, Hanfu experiences) directly drive satisfaction. On the other hand, the “Hangzhou Housing & Residential Choice” dimension is characterized by a prevalence of neutral sentiment and lower emotional intensity. This finding is critical because it highlights that for residents or potential renters, the historic district is evaluated through a utilitarian lens—focused on price and convenience—rather than an aesthetic one. The AI analysis effectively disentangled these overlapping narratives, demonstrating that lower sentiment scores in residential topics do not necessarily indicate failure in urban management, but rather a shift in the user’s psychological mode from “hedonic appreciation” to “functional evaluation.”
4.2. Methodological Advancements and Interpretive Depth
Traditional heritage studies often rely on keyword frequency or small-scale surveys, which struggle to capture the nuance of large-scale public opinion. This study explores an analytical framework that combines large language models (LLMs) with deep learning methods, enabling the efficient extraction of valuable information from large volumes of online reviews at relatively low cost. The proposed workflow first uses the deep learning tool BERTopic to cluster raw text into coherent themes. Then, the DeepSeek V3.2 LLM is introduced to provide a necessary interpretive layer, allowing it to assign labels to the clusters with human-like understanding (for example, distinguishing between commercial tourism concerns and residential issues). Finally, the fine-tuned BERT model achieves high discrimination accuracy (AUC > 0.99), enabling precise identification of sentiment orientations within the complex context of the built environment. Under this workflow, strongly positive and strongly negative texts are automatically selected, which can assist heritage managers in making more targeted improvements to their management strategies.
4.3. Limitations and Future Directions
While this study confirms the efficacy of textual analysis, certain limitations remain. The current framework relies solely on text-based reviews, potentially overlooking the visual dimension of public experience. Photographs and videos shared on social media play a critical role in shaping the perception of heritage sites and could offer complementary spatial insights. Future research should aim to integrate Computer Vision (CV) techniques to analyze user-generated imagery alongside text, creating a multi-modal understanding of how tourists and locals “see” and “feel” historic environments. Additionally, extending this framework to other historic districts with different cultural attributes could further validate the generalizability of these AI-driven methodologies.
5. Conclusions
This research established an AI-driven analytical framework to decode the complex spatial and emotional experiences within the Qinghefang District. By synthesizing large-scale public online reviews through a hybrid pipeline of BERTopic clustering, LLM-based interpretation, and fine-tuned BERT sentiment analysis, the study successfully mapped the multidimensional structure of public perception. The results reveal a clear emotional dichotomy: while cultural and culinary experiences drive intense positive engagement, residential functions evoke a more neutral, pragmatic response. Ultimately, this study demonstrates that artificial intelligence can effectively translate unstructured digital footprints into actionable spatial insights, providing a scientific basis for heritage conservation that is both data-informed and deeply attuned to human experience.
Author Contributions
Conceptualization, X.D.; methodology, X.D.; software, X.Z.; validation, X.D. and K.Z.; formal analysis, K.Z.; investigation, X.D. and K.Z.; resources, X.D. and K.Z.; data curation, Q.D. and K.Z.; writing—original draft preparation, X.Z. and X.D.; writing—review and editing, X.D.; visualization, X.Z.; supervision, Q.D.; project administration, Q.D.; funding acquisition, Q.D. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the National Natural Science Foundation of China (No. 51878612).
Data Availability Statement
The data presented in this study are available on request from the corresponding author.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- UNESCO. Historic Districts for All: A Social and Human Approach for Sustainable Revitalization; Brochure Designed for Local Authorities. Available online: https://unesdoc.unesco.org/ark:/48223/pf0000158331 (accessed on 1 January 2026).
- Mehrabian, A.; Russell, J.A. An Approach to Environmental Psychology; The MIT Press: Cambridge, MA, USA, 1974. [Google Scholar]
- Scannell, L.; Gifford, R. Defining place attachment: A tripartite organizing framework. J. Environ. Psychol. 2010, 30, 1–10. [Google Scholar] [CrossRef] [Scilit]
- Wang, L. Rethinking authenticity in tourism experience. In The Political Nature of Cultural Heritage and Tourism; Routledge: London, UK, 2017; pp. 469–490. [Google Scholar]
- Bitner, M.J. Servicescapes: The Impact of Physical Surroundings on Customers and Employees. J. Mark. 1992, 56, 51–71. [Google Scholar] [CrossRef] [Scilit]
- Meng, X.; Chang, J. Sustainable reuse evaluation framework for coastal industrial living preservation of heritage buildings based on visual perception driven. Sci. Rep. 2025, 15, 35859. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Zhang, J.; Shi, Y.; Zhao, L.; Cai, C.; Furuya, K. Toward sustainable and differentiated protection of cultural heritage illustrated by a multisensory analysis of Suzhou and Kyoto using deep learning. NPJ Herit. Sci. 2025, 13, 287. [Google Scholar] [CrossRef] [Scilit]
- D’Orazio, M.; di Giuseppe, E.; Mariotti, C.; Muccioli, M.F. Leveraging user-generated content to enhance heritage monitoring protocols and resources allocation through aspect-based sentiment analysis. J. Inf. Technol. Constr. 2025, 30, 397–417. [Google Scholar] [CrossRef] [Scilit]
- Zhang, A.; Xiao, H. Digitalising cultural heritage through online reviews: A sentiment analysis. Curr. Issues Tour. 2025, 1–18. [Google Scholar] [CrossRef] [Scilit]
- Gulati, S. Tapping public sentiments on Twitter for tourism insights: A study of famous Indian heritage sites. Int. Hosp. Rev. 2022, 36, 244–257. [Google Scholar] [CrossRef] [Scilit]
- Zhou, K.; Chen, W.; Sheng, W.; Hu, B.; Yang, Y.; Yang, L.; Lu, H. Explainable AI with fine-tuned large language models for sustainable cultural heritage management. Sci. Rep. 2025, 15, 41370. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- UNESCO World Heritage Centre. Recommendation on the historic urban landscape. In Proceedings of the Records of the General Conference 36th Session, Paris, France, 25 October–10 November 2011. [Google Scholar]
- Cao, K.; Xie, W.; Zhu, J.; Wei, F. Commercial Culture as a Key Impetus in Shaping and Transforming Urban Structure: Case Study of Hangzhou, China. Sustainability 2023, 15, 10620. [Google Scholar] [CrossRef] [Scilit]
- Tian, M.; Li, Z.; Xia, Q.; Peng, Y.; Cao, T.; Du, T.; Xing, Z. Walking in China’s Historical and Cultural Streets: The Factors Affecting Pedestrian Walking Behavior and Walking Experience. Land 2022, 11, 1491. [Google Scholar] [CrossRef] [Scilit]
- Li, Q.; Chen, H.; Long, R.; Huang, Z.; Yang, S.; Sun, Q.; Sun, Y.; Ye, X. Research on data-driven group consensus decision-making of green methanol vehicle evaluation based on BERTopic text mining. Sustain. Energy Technol. Assess. 2025, 80, 104362. [Google Scholar] [CrossRef] [Scilit]
- Son, H.; Park, Y.E. Agenda-setting effects for covid-19 vaccination: Insights from 10 million textual data from social media and news articles using BERTopic. Int. J. Inf. Manag. 2025, 83, 102907. [Google Scholar] [CrossRef] [Scilit]
- Yu, S.; Jin, M.; Weng, K. Do residential time-of-use tariff policies gain customers’ favor? Insight from a social network-enhanced BERT-BiLSTM analysis. Energy Rep. 2025, 14, 4872–4884. [Google Scholar] [CrossRef] [Scilit]
- Chen, W.; Li, A.; Pan, C.; Yu, T.; Ali, A.; Sun, Y. Algorithmic management in the workplace: A systematic review and topic modeling integration using BERTopic. Int. J. Inf. Manag. 2026, 86, 102994. [Google Scholar] [CrossRef] [Scilit]
- Yi, J.; Oh, Y.K.; Kim, J.-M. Unveiling the drivers of satisfaction in mobile trading: Contextual mining of retail investor experience through BERTopic and generative AI. J. Retail. Consum. Serv. 2025, 82, 104066. [Google Scholar] [CrossRef] [Scilit]
- Gardazi, N.M.; Daud, A.; Malik, M.K.; Bukhari, A.; Alsahfi, T.; Alshemaimri, B. BERT applications in natural language processing: A review. Artif. Intell. Rev. 2025, 58, 1–49. [Google Scholar] [CrossRef] [Scilit]
- Koroteev, M.V. BERT: A review of applications in natural language processing and understanding. arXiv 2021, arXiv:2103.11943. [Google Scholar] [CrossRef] [Scilit]
- Rogers, A.; Kovaleva, O.; Rumshisky, A. A primer in BERTology: What we know about how BERT works. Trans. Assoc. Comput. Linguist. 2020, 8, 842–866. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.









