Calculation method of landscape satisfaction and controversy based on social media images and texts
Through the combination of social media images and text, using CNN image clustering and social interaction analysis, landscape satisfaction and controversy are calculated, and the problem of ignoring social interaction behavior in the prior art is solved, and a more accurate assessment of landscape preference is provided.
Patent Information
- Application Number
- CN202310556335.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2043-05-17
AI Technical Summary
When using social media images to study landscape preferences, the prior art ignores the importance of social interaction behaviors and the intensity of image dissemination among users, resulting in the inability to fully understand the public's emotions and preferences.
By crawling social media data, grouping photos using CNN image clustering and K-mean clustering, combining social interaction information and text sentiment analysis, landscape satisfaction and controversy are calculated, hierarchical analysis method and expert scoring method are used to determine the weight, and discreteness analysis method is used to evaluate the controversy.
It realizes a more objective and accurate reflection of users' landscape preferences and provides scientific basis for urban greenway planning.
Smart Images

Figure FHA0000012706210000011 
Figure FHA0000012706210000021 
Figure GHA0000012706220000031
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of landscape assessment, and in particular to a method for calculating landscape satisfaction and controversy based on social media images and texts. Background Art
[0002] Landscape preference is part of landscape perception. It reflects the comprehensive result of a series of perceptual activities such as emotional cognition when the public faces the landscape. It embodies the subject's liking and attraction, interest and excitement, and the beauty of the landscape and its opposing judgments.
[0003] With the rapid urbanization process, people have fewer and fewer opportunities to contact nature. Greenways, as linear green spaces, have become particularly valuable. They can establish a connection between urban habitats and biodiversity. Therefore, understanding the public's preferences for greenway landscapes is particularly important for building high-quality and attractive urban green spaces.
[0004] Existing research on greenway landscape preferences is mostly based on questionnaires, interviews, and participatory mapping to obtain preference feedback. Although these methods may obtain detailed information, they can often only collect a small amount of data in a limited space or within a limited time, making it difficult to conduct large-scale assessments, which may lead to simplified results or inconsistency issues.
[0005] In recent years, with the development of the internet, social media images have been successfully applied to studies of landscape preferences in urban green spaces. For example, Huai et al. (2022) used Flickr photos to investigate differences in landscape preferences between park visitors and locals, and Zhou et al. (2023) used social media images to explore the impact of landscape elements in urban waterfront parks on public preferences. However, current research using social media photos often overlooks the inherent communication and influence of each photo. Meanwhile, not all photos uploaded to social media are popular. While the public may upload images they find interesting or unique, they may also upload images that express negative opinions. Therefore, using images alone cannot determine the uploader's likes and dislikes and cannot fully reveal the public's emotions and preferences.
[0006] In summary, current research on landscape preference still has the following shortcomings:
[0007] 1. The importance of social interaction (likes, reposts, and comments) between users on social media has been overlooked. The information generated by these behaviors reflects the spread and influence of image content, and reflects the attention paid to landscapes by a wider range of online users beyond the uploader, which is very important for the study of landscape preferences.
[0008] 2. Some images on social media may represent features that tourists find unique or noteworthy, but not necessarily preferred. Therefore, images alone cannot fully explain tourists' landscape preferences.
[0009] Therefore, it is necessary to improve the existing technology to overcome the defects in current research. Summary of the Invention
[0010] The technical problem to be solved by the present invention is to provide a method for calculating landscape satisfaction and controversy based on social media images and texts to address the defects existing in the existing technology.
[0011] The technical solution of the present invention to solve the above technical problems is as follows:
[0012] The method for calculating landscape satisfaction and controversy based on social media images and texts includes the following steps:
[0013] S1. Crawling to obtain data: short texts and photos from mobile social media on Weibo, a social media website. Specifically, using the keyword "greenway", we crawled Weibo information using Python. The metadata retrieved included photo ID, short text, photo, number of likes, number of comments, and number of reposts.
[0014] S2. Process the crawled photo data using CNN and Google Cloud Graph clustering technology: Use image clustering based on convolutional neural networks and machine learning to group the photo data into clusters with different landscape themes. Specifically, use a pre-trained CNN model to extract feature vectors representing the visual content of the photos, and then use K-means clustering to cluster the images based on the similarity of these feature vectors;
[0015] S3. Determine the landscape themes of the clustered photos: cluster the landscape themes of the photos into N clusters, where N is a natural number greater than or equal to 2;
[0016] S4. Calculate the weight coefficients of likes, reposts, and comments on the photo; analyze the short text corresponding to each photo, calculate the sentiment index of the text, and identify the sentiment index of the text as the sentiment index of the photo corresponding to the text;
[0017] S5. Calculate the satisfaction after weighting likes, reposts, comments, and sentiment index
[0018] S6. Calculate the controversy level of users on each landscape theme using the dispersion analysis method;
[0019] Furthermore, in S3, N is set to 10, and ten categories among environmental landscape themes, cultural landscape themes, and service facility landscape themes are determined as photo landscape themes for landscape preference assessment. The specific categories are shown in the following table:
[0020]
[0021] Furthermore, in said S4, the weight coefficients of likes, reposts and comments of the photo are calculated using the analytic hierarchy process or the expert scoring method;
[0022] Furthermore, the expert scoring method specifically involves inviting 30 experts to score, and the research calculates that the weight coefficients of likes, comments, and reposts are 0.31, 0.35, and 0.34 respectively;
[0023] Furthermore, in S5, the satisfaction calculation formula is as follows:
[0024]
[0025] In the formula, Q is the average sentiment of each cluster, that is, the satisfaction level of the public’s landscape preference; e c Represents the number of comments on a single photo, s c Represents the total number of comments, Represents the percentage of comments on a single photo; f Represents the number of reposts of a single photo, s l Represents the total number of Weibo reposts, Represents the share of reposts of a single photo; e l Represents the number of likes for a single photo, s l Represents the total number of likes, represents the percentage of likes for a single photo; w1, w2, and w3 represent the weight coefficients for likes, reposts, and comments; F represents the sentiment value of each text message; and n represents the number of images in each cluster. To narrow the gap between the data, the study added the -ln function to the formula.
[0026] The beneficial effects of the present invention are as follows: combining the AHP hierarchical analysis method or the expert analysis method, using a calculation formula, using text, photos and social interaction information to calculate the user's satisfaction with each landscape theme, and using the discrete degree analysis method to calculate the user's controversy over each landscape theme; through the satisfaction and controversy analysis, the user's landscape preferences can be reflected more objectively and accurately. DETAILED DESCRIPTION
[0027] The principles and features of the present invention are described below. The examples given are only used to explain the present invention and are not used to limit the scope of the present invention.
[0028] The method for calculating landscape satisfaction and controversy based on social media images and texts includes the following steps:
[0029] S1. Crawling to obtain data: short texts and photos from mobile social media on Weibo, a social media website. Specifically, using the keyword "greenway", we crawled Weibo information using Python. The metadata retrieved included photo ID, short text, photo, number of likes, number of comments, and number of reposts.
[0030] S2. Process the crawled photo data using CNN and Google Cloud Graph clustering technology: Use image clustering based on convolutional neural networks and machine learning to group the photo data into clusters with different landscape themes. Specifically, use a pre-trained CNN model to extract feature vectors representing the visual content of the photos, and then use K-means clustering to cluster the images based on the similarity of these feature vectors;
[0031] S3. Determine the landscape themes of the clustered photos: cluster the landscape themes of the photos into N clusters, where N is a natural number greater than or equal to 2;
[0032] S4. Calculate the weight coefficients of likes, reposts, and comments on the photo; analyze the short text corresponding to each photo, calculate the sentiment index of the text, and identify the sentiment index of the text as the sentiment index of the photo corresponding to the text;
[0033] S5. Calculate the satisfaction after weighting likes, reposts, comments, and sentiment index
[0034] S6. Use the dispersion analysis method to calculate the controversy level of users on each landscape theme.
[0035] To better understand whether images convey positive or negative sentiment, we used the snowNLP Naive Bayes method to perform sentiment analysis on the text corresponding to the images. Sentiment analysis, also known as opinion mining or sentiment analysis, uses data mining and natural language processing (NLP) techniques to analyze, process, judge, and summarize subjective text with emotional overtones. It can be used to understand people's attitudes toward social phenomena or preferences. There are two approaches to sentiment analysis for Weibo data: machine learning algorithms and sentiment dictionaries. This approach has important applications in areas such as opinion judgment, information prediction, and artificial intelligence.
[0036] Based on previous research, we found that Naive Bayes (snowNLP) provides good sentiment analysis results. SnowNLP is based on Bayes' theorem and assumes that each conditional feature is independent of other conditional features. SnowNLP is a Chinese natural language processing software package that includes functions such as Chinese word segmentation, sentiment analysis, text keyword extraction, post-labeling, text classification, and text summarization. For sentiment analysis, the SnowNLP library includes a built-in sentiment analysis model pre-trained using product review data. The result of SnowNLP sentiment analysis is a number between 0 and 1. When the result exceeds 0.5, it means that the sentiment tends to be pleasant. The more positive the sentiment, the higher the value. On the other hand, when the value is less than 0.5, the sentiment is more likely to be negative. The more negative the sentiment, the lower the value.
[0037] Specific applications:
[0038] This paper examines the landscape of Beijing's greenways. Specifically, we use data from Sina Weibo, one of the most popular social media sharing platforms globally, and particularly in China, with over 200 million daily active users. Despite limited access to automatically scraped geotagged data, social media can still provide valuable information about urban residents' recreational preferences and has high potential for local-scale research.
[0039] First, we used a custom Python tool to collect Weibo data from the sharing website Sina Weibo, using the keywords "Beijing" and "Greenway" from July 31, 2013, to November 1, 2022. This data, totaling 1,140 messages, included 1,102 text messages and 3,377 images. The retrieved data included image information, text information, user ID, posting date, number of likes, number of posts, and number of comments.
[0040] Automatically crawled social media data often contains a significant amount of noise, so this data needs to be removed. This article first removed news and advertising information posted by public accounts, retaining only original content posted by individual users. Furthermore, this article also removed invalid information that mentioned the Beijing Greenway but had little relevance to the description or evaluation of the Greenway. Ultimately, this article retained 684 valid Weibo posts, including 684 text messages and 2,277 images.
[0041] The processed social media data were then analyzed and processed, mainly in two aspects: first, the clusters that met the greenway landscape preference assessment after image clustering were screened; second, the importance weight coefficients of different social behaviors were calculated using the Analytic Hierarchy Process (AHP); and third, the landscape preference was calculated after the sentiment of likes, reposts, comments, and text reactions to the photos was weighted.
[0042] The following is a detailed description of the above analysis and processing process:
[0043] Based on the established greenway element perception and satisfaction evaluation indicators and combined with existing research results at home and abroad, we summarize three major themes for evaluating the public's landscape preferences for greenways: environmental landscape theme, cultural landscape theme, and service facility landscape theme. The specific themes are shown in Table 1: Correspondence between image clusters and greenway landscape preference evaluation categories:
[0044]
[0045]
[0046] Table 1
[0047] In a specific embodiment, the clustered photo landscape themes are determined as follows, including ten themes, as shown in Table 2:
[0048]
[0049] Table 2
[0050] In existing technical research, the number of images in landscape element clusters is usually compared to assess the level of public attention. Our research has improved the method by further considering that the influential information generated by social interaction behavior will to some extent aggravate the public's emotional attitude, and proposed a landscape satisfaction calculation formula that incorporates social interaction information.
[0051] First, we used Snow NLP to calculate the sentiment intensity F of the text information for each image in each image cluster, and multiplied it by the social influence index of the text to get the sentiment value corresponding to each image. Then, we added up the sentiment values of each photo and divided them by the total number of photos to obtain the average sentiment value Q of each cluster, that is, the satisfaction level of public landscape preferences. The calculation formula is as follows:
[0052]
[0053] In the formula, e c Represents the number of comments on a single photo, s c Represents the total number of comments, Represents the percentage of comments on a single photo; f Represents the number of reposts of a single photo, s l Represents the total number of Weibo reposts, Represents the share of reposts of a single photo; e l Represents the number of likes for a single photo, s l Represents the total number of likes, represents the percentage of likes for a single photo; w1, w2, and w3 represent the weight coefficients for likes, reposts, and comments; F represents the sentiment value of each text message; and n represents the number of images in each cluster. To narrow the gap between the data, the study added the -ln function to the formula.
[0054] Finally, by calculating the satisfaction levels of the 10 landscape themes after image clustering and conducting comparative analysis, we can obtain the level of satisfaction of Beijing users with the various elements of the urban greenway, thereby providing a scientific theoretical basis for subsequent urban greenway planning.
[0055] In another specific embodiment, the weight coefficients of comments, reposts, and likes represented by x, y, and z in the formula for calculating the preference value of a certain category of landscape elements are determined as follows:
[0056] 1. Expert scoring method: After inviting 30 experts to conduct scoring, the research calculated that the weight coefficients of likes, comments, and reposts represented by x, y, and z of Weibo short texts were 0.31, 0.35, and 0.34 respectively;
[0057] 2. Analytic Hierarchy Process (AHP): First, use the arithmetic mean, sum-product method or square root method to calculate the initial weight coefficient of the indicator, then normalize the weight coefficient, calculate the maximum characteristic root and perform consistency check. The above method belongs to the existing conventional method in this field, and the specific formula is not repeated here.
[0058] As a further improvement of the above technical solution, the controversy degree is calculated as follows: Landscape controversy degree is to evaluate the degree of difference in the public's emotions towards landscape elements. The dispersion analysis method of the emotional value of each cluster is used to perform dispersion analysis. The greater the degree of dispersion, the greater the difference in the public's emotions towards the landscape characteristics of its cluster, that is, the greater the controversy degree.
[0059] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for calculating landscape satisfaction and controversy based on social media images and texts, characterized by: The steps include: S1. Crawling data: We crawl short texts and photos from the social media site Weibo. Specifically, we use Python to crawl Weibo information using the keyword "greenway". The metadata retrieved includes photo ID, short text, photo, number of likes, number of comments, and number of reposts. S2. Process the crawled photo data using CNN and Google Cloud Graph clustering technology: Use image clustering based on convolutional neural networks and machine learning to group the photo data into clusters with different landscape themes. Specifically, use a pre-trained CNN model to extract feature vectors representing the visual content of the photos, and then use K-means clustering to cluster the images based on the similarity of these feature vectors; S3. Determine the landscape themes of the clustered photos: cluster the landscape themes of the photos into N clusters, where N is a natural number greater than or equal to 2; S4. Calculate the weight coefficients of likes, reposts, and comments for photos within each landscape theme; analyze the short text corresponding to each photo, calculate the sentiment index of the text, and identify the sentiment index of the text as the sentiment index of the photo corresponding to the text; S5. Calculate the satisfaction after weighting likes, reposts, comments, and sentiment index S6. Calculate the controversy level of users on each landscape theme using the dispersion analysis method; In S5, the satisfaction calculation formula is as follows: In the formula, Q is the average sentiment of each cluster, that is, the satisfaction level of the public’s landscape preference; e c Represents the number of comments on a single photo, s c Represents the total number of comments, Represents the percentage of comments on a single photo; f Represents the number of reposts of a single photo, s l Represents the total number of Weibo reposts, Represents the share of reposts of a single photo; e l Represents the number of likes for a single photo, s l Represents the total number of likes, represents the percentage of likes for a single photo; w1, w2, and w3 represent the weight coefficients of likes, reposts, and comments; F represents the sentiment value of each text message; and n represents the number of pictures in each cluster. In order to narrow the gap between the data, the study added the -ln function to the formula.
2. The method for calculating landscape satisfaction and controversy based on social media images and text according to claim 1, characterized in that: In S3, N is set to 10, and ten categories among the environmental landscape theme, the cultural landscape theme, and the service facility landscape theme are determined as the photo landscape themes for landscape preference evaluation. The specific categories are shown in the following table:
3. The method for calculating landscape satisfaction and controversy based on social media images and text according to claim 2, characterized in that: In S4, the weight coefficients of likes, reposts, and comments on the photo are calculated using the hierarchical analysis method or the expert scoring method.
4. The method for calculating landscape satisfaction and controversy based on social media images and text according to claim 3, characterized in that: The expert scoring method specifically involves inviting 30 experts to give scores, and the research calculates that the weight coefficients of likes, comments, and reposts are 0.31, 0.35, and 0.34, respectively.
Citation Information
Patent Citations
Character-level convolutional neural network-based guest opinion mining method
CN109829166A
Online social media news dispute detection method based on comment tree
CN114625944A