Emotion map generation method and device, medium and product
Through cognitive psychology experiments and machine learning models, an emotional map of the community green space is generated, which solves the identification and solution of emotional problems in community green space design, and realizes the precise explanation of emotional experience and guidance of green space design.
Patent Information
- Application Number
- CN202410823207.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2025-02-25
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to accurately identify and solve key emotional problems in community green space design, and cannot generate emotional maps that accurately explain the causes of emotional experiences and guide green space design.
Through cognitive psychology experiments, a sample data set was constructed, and a machine learning model was used to predict emotions on community green space photos to generate comprehensive emotions values. Finally, visualize them through ArcMap software and fishnet model to generate emotions maps.
Accurately identify and solve key emotional problems in community green space design, and generate emotional maps that accurately explain the causes of emotional experience and guide green space design.
Smart Images

Figure CN119516032A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a method, device, medium and product for generating an emotion map. Background Art
[0002] Negative emotions caused by factors such as social environment and natural environment can have a harmful effect on the mental health of the elderly. Therefore, improving the emotional health of the elderly has become an urgent issue to be solved, which is important for improving the overall mental health level of the elderly in China.
[0003] Research on the spatial attributes of community green spaces in promoting mood improvement is still mainly based on external environmental characteristics, and the impact of its internal environmental characteristics on the emotions of the elderly still needs to be further studied.
[0004] The research methods used in the existing studies on the impact of environmental characteristics on the emotions of the elderly mainly include three aspects: measurement of visual environmental characteristics, measurement of visual perception preferences and measurement of emotions; there are both subjective measurement methods and objective measurement methods.
[0005] In terms of objective measurement of emotions, psychologists have found that most emotions can be simplified into a two-dimensional model of emotional valence and arousal. Physiological sensors are used to measure skin conductance levels, brain waves, etc. to quantify emotional arousal, while emotional valence is measured by capturing and scoring facial expressions. However, the physiological index levels measured by physiological sensors cannot directly represent the category of emotions and the corresponding environmental influence sources. The emotions in facial expressions may not be equal to the real emotions. Therefore, it is necessary to use a combination of subjective and objective methods to measure emotions.
[0006] The theoretical foundations of emotion maps mainly involve emotion psychology and spatial analysis. Emotion psychology provides an understanding of the classification, generation and influencing factors of emotions, while spatial analysis focuses on how emotions are manifested in different geographical locations and how these emotions interact with the social, cultural and physical environment.
[0007] Emotional psychology believes that the subjective experience of emotion is a state of the brain and is inherently consistent with the overt expression. Due to the fine differentiation of the facial skeletal muscle system and vascular system, infants can already show 8 basic emotional facial expressions from birth to one year old, namely interest, surprise, pleasure, pain, disgust, anger, fear and sadness. These basic emotional expressions occur at the sensory-emotional level and do not require cognitive processing. Therefore, the measurement of facial expressions of basic emotions can reflect the subjective emotional experience generated by the brain.
[0008] Spatial analysis forms the core element of Geographic Information Systems (GIS). With the help of computer hardware and software, it can realize the functions of collecting, entering, processing, modifying, retrieving, analyzing and simulating spatial data. Through spatial model analysis, this technology provides rich dynamic information and spatial information processing capabilities, supporting the research and decision-making process of emotional geography. In the context of emotion maps, spatial analysis is used to combine emotion data with geographic location information in order to visualize the distribution of emotions on a map. Spatial analysis can help identify the spatial distribution of emotion patterns and understand how emotions change with changes in geographic location and environmental factors.
[0009] In the practical application of emotion maps, the creation of emotion maps usually involves three stages: data collection, processing, and visualization. Data collection is carried out through various methods such as questionnaires, social media analysis, and mobile applications. The processing stage mainly includes data cleaning, emotion recognition, and classification. The visualization stage mainly uses GIS and data visualization technology to map emotion data into geographic space.
[0010] As a participatory crowdsourcing tool for citizens to understand their urban environment, emotion maps have the potential to attract citizens' attention and provide practical results that are readable and acceptable to city government representatives. Some countries have applied emotion map results to strategic planning analysis, policy documents and urban research. In China, most studies use microblog semantic analysis to collect emotion big data and construct emotion maps to discover emotion differences in different urban environments. This is an explanatory study of the spatial distribution characteristics of emotions.
[0011] In traditional methods of generating emotion maps, researchers usually rely on qualitative data collection and manual analysis, such as collecting information about people's emotional states through questionnaires, face-to-face interviews, or expert assessments. These data are then coded and mapped to geographic locations to form emotion maps. Although this method can provide in-depth individual emotional experiences, it is limited by small sample sizes, time-consuming and costly data collection, and is difficult to cover wide geographic areas and large populations.
[0012] With the development of machine learning technology, the process of generating emotion maps has undergone significant changes. Machine learning algorithms, especially natural language processing (NLP) and computer vision technology, make it possible to automatically extract emotional information from large amounts of unstructured data. For example, by analyzing posts, comments, and tags on social media, machine learning models can identify words and phrases that express emotions and associate them with the user's geographic location information, thereby automatically generating emotion maps.
[0013] In addition, deep learning models, such as deep convolutional neural networks (DCNN) and recurrent neural networks (RNN), perform well in processing image and text data and can identify features that affect emotions from complex patterns. These models can process data from satellite images, street view photos, or real-time video streams, further improving the accuracy and real-time nature of emotion maps.
[0014] Machine learning not only improves the efficiency and scale of emotion map generation, but also increases its dynamism and personalization. By training models to identify emotional expressions of different groups of people in different cultural and social backgrounds, machine learning helps create more detailed and diverse emotion maps with predictive properties. However, although machine learning technology can predict and explain the spatial distribution characteristics of emotions, it cannot explain the causes of different emotional experiences, and lacks guidance for the specific design of green spaces.
[0015] As an emerging research tool, emotion maps have been applied in practice, such as participatory crowdsourcing tools and strategic planning analysis. The development of machine learning technology has provided new possibilities for the generation of emotion maps, making them more detailed, diversified, and predictive. However, machine learning technology still needs to be further studied and improved in explaining the causes of emotional experience and guiding green space design.
[0016] In summary, although the positive correlation between urban green space and public health has been confirmed, there is still a need for further exploration and improvement in the study of emotions of the elderly and the generation of emotion maps. Current research cannot accurately identify and solve key emotional issues in the design of community green spaces, nor can it generate emotion maps that can accurately explain the causes of emotional experiences and guide the design of green spaces. Summary of the invention
[0017] In order to solve the above problems existing in the prior art, the present invention provides a method, device, medium and product for generating an emotion map.
[0018] To achieve the above object, the present invention provides the following solutions:
[0019] A method for generating an emotion map, comprising: determining the influence of visual features on emotions through cognitive psychology experiments; the visual features include: visual space scale, visual landscape type, visual element ratio and visual feature index;
[0020] Construct a sample dataset based on the impact of visual features on emotions;
[0021] Using the sample data set to train a machine learning model to obtain a trained machine learning model;
[0022] The community green space photos taken at different shooting angles at each shooting location are input into the trained machine learning model to obtain the emotion prediction values at different shooting angles at each shooting location;
[0023] The emotion prediction values of different shooting angles at each shooting position are averaged to obtain the comprehensive emotion value of each shooting position;
[0024] Using ArcMap software, the comprehensive emotion value is mapped to a projection coordinate system; the projection coordinate system is constructed based on the location of the community green space;
[0025] A fishing net model with a set grid size is constructed based on a projected coordinate system mapped with comprehensive emotion values;
[0026] The comprehensive emotion values of all positions in the grid in the fishing net model are averaged and assigned to the corresponding grid as the grid emotion value to obtain the assigned fishing net model;
[0027] The emotion map is obtained by adjusting the color attributes of the grid in the assigned fishing net model.
[0028] A computer device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any one of the above-mentioned methods for generating an emotion map.
[0029] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements any of the above-mentioned methods for generating an emotion map.
[0030] A computer program product comprises a computer program, wherein when the computer program is executed by a processor, the method for generating an emotion map described in any one of the above is implemented.
[0031] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects: the influence relationship of visual features on emotions determined by cognitive psychology experiments in this application can accurately identify and solve key emotional problems in the design of community green spaces. Moreover, after using the trained machine learning model to obtain the emotion prediction value of each shooting position at different shooting angles, the emotion prediction value is averaged to obtain the comprehensive emotion value of each shooting position. Using ArcMap software, the comprehensive emotion value is mapped to the projection coordinate system, and a fishing net model with a set grid size is constructed. After averaging the comprehensive emotion values of all positions in the grid in the fishing net model and assigning them to the corresponding grid as the grid emotion value, the color attributes of the grid are adjusted to generate an emotional map that can accurately explain the causes of emotional experience and guide the design of green spaces. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 A flow chart of a method for generating an emotion map provided by an embodiment of the present invention;
[0034] Figure 2 An implementation architecture diagram of the emotion map generation method provided in an embodiment of the present invention;
[0035] Figure 3 A schematic diagram of the mean relaxation emotion scores of each visual space scale provided by an embodiment of the present invention;
[0036] Figure 4 A schematic diagram of the mean relaxation emotion ratings of the elderly for different visual landscape photos provided by an embodiment of the present invention;
[0037] Figure 5 A schematic diagram of the intensity of surprised expressions caused by various visual elements provided in an embodiment of the present invention;
[0038] Figure 6 The S-curve fitting diagram of grass ratio and sadness intensity provided by the embodiment of the present invention;
[0039] Figure 7 An S-curve fitting diagram of road ratio and intensity of happiness provided by an embodiment of the present invention;
[0040] Figure 8 A polynomial function fitting diagram of the tree ratio and the intensity of fear provided by the embodiment of the present invention;
[0041] Fig. 9 A corresponding relationship diagram between the characteristic values and the target variables in the sample data set provided by the embodiment of the present invention;
[0042] Fig.10 An example diagram for constructing a data set provided by an embodiment of the present invention;
[0043] Fig.11 A graph showing the mood prediction results of various community green spaces provided by an embodiment of the present invention;
[0044] Fig.12 A map of the mean emotional valence of green spaces in various communities provided by an embodiment of the present invention;
[0045] Fig.13A map of the mean sentiment scores of different categories of green spaces in various communities provided by an embodiment of the present invention;
[0046] Fig.14 A graph showing the prediction results of the emotional valence of the green space in the Hopson City Community provided in an embodiment of the present invention;
[0047] Fig.15 A graph showing the prediction results of happy emotions in the green space of the Hopson City Community provided by an embodiment of the present invention;
[0048] Fig.16 A graph showing the prediction results of relaxation mood in the green space of the Hopson City Community provided in an embodiment of the present invention;
[0049] Fig.17 A graph showing the prediction results of sadness in the green space of the Hopson City Community provided in an embodiment of the present invention;
[0050] Fig.18 This is a graph of the prediction results of fear emotions in the green space of the Hopson City Community provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0052] The purpose of the present invention is to provide a method, device, medium and product for generating an emotion map, which is intended to accurately identify and solve key emotional problems in the design of community green spaces, while generating an emotion map that can accurately explain the causes of emotional experience and guide the design of green spaces.
[0053] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0054] Example 1
[0055] This embodiment provides a method for generating an emotion map. Figure 1 and Figure 2 As shown, the method includes:
[0056] Step 100: Determine the influence of visual features on emotions through cognitive psychology experiments. Visual features include: visual space scale, visual landscape type, visual element ratio and visual feature index.
[0057] In the actual application process, step 100 needs to determine the impact of visual features on the subjective emotion scores of the elderly. In this process, the objective visual landscape feature data and the relaxation emotion score are not directly derived from eye tracking or micro-expression intensity data. 82 valid subjects can be selected to make relaxation emotion scores for the displayed photo groups. Figure 2 Displays the basic information of valid subjects.
[0058] Based on the basic information of valid subjects, the following analysis was conducted through cognitive psychology experiments (referred to as experiments):
[0059] (1) Analysis of the impact of visual spatial scale on the relaxation emotion scores of the elderly.
[0060] In order to verify the hypothesis H1 that "the same visual type of landscape will have different effects on the emotions of the elderly at different visual spatial scales", the experiment compared the grassland landscape and road landscape photos in pairs at three visual spatial scales. In this process, the relaxation emotion ratings of each subject for the grassland or road landscape photos at different spatial scales were collected, with each photo rated by 82 subjects and each photo rated 164 times.
[0061] Table 1 shows the results of the Shapiro-Wilk normality test for the "relaxation" scores of grassland landscapes and road landscapes at the macro, meso and micro visual spatial scales. Statistical data revealed that the p-value was lower than 0.001 at the macro, meso and micro levels, indicating that the "relaxation" scores of grassland and road landscapes did not follow a normal distribution at these three visual spatial scales. Therefore, the Kruskal-Wallis H test was used to analyze the differences in "relaxation" scores at different visual spatial scales to explore whether there were statistically significant differences in the score distribution at the macro, meso and micro scales.
[0062] Table 1 Shapiro-Wilk normality test table of relaxation emotion scores
[0063]
[0064] The results of the Kruskal-Wallis H test (Table 2) clearly indicate that under the grassland landscape condition, the medians of different visual spatial scales are significantly different (p<0.001), while under the road landscape condition, no such significant difference was found (p=0.200). Further multiple comparisons were performed to analyze the relaxation emotion scores of different visual spatial scales under the grassland landscape (Table 3), and it was found that the relaxation emotion scores of different visual spatial scales were significantly different, especially the differences between micro and macro, and micro and meso scales were extremely significant (p<0.001).
[0065] Table 2 Kruskal-Wallis H test of relaxation emotion scores Table 1
[0066]
[0067] Table 3 Results of multiple comparison analysis of relaxation emotion scores at different visual spatial scales in grassland landscape
[0068] Fruit Table
[0069] Paired comparison combinations Dunn's test statistic p(corrected) Micro-Macro 63.518 0.000 Micro-Meso 97.439 0.000 Macro-Meso -33.921 0.004
[0070] The p values have been adjusted by Bonferroni correction.
[0071] In addition, by comparing the average relaxation emotion ratings of each photo ( Figure 3 ), analyze the impact of grassland landscape and road landscape on emotional experience at a specific visual scale. At the macro scale, the average relaxation emotion scores of grassland and road landscapes are the same, with no significant difference. However, at the meso scale, the average relaxation emotion score of grassland landscape is significantly higher than that of road landscape, indicating that at this scale, grassland landscape is more likely to stimulate relaxation in the elderly. On the other hand, at the micro scale, the relaxation emotion score of grassland landscape is significantly lower than that of road landscape, indicating that when grassland landscape exists but its area is too small, it may have an adverse effect on the relaxation emotion of the elderly.
[0072] To gain a deeper understanding of the potential relationship between visual spatial scale and relaxation emotion scores, Spearman correlation analysis was used for further analysis ( Table 4 ).
[0073] Table 4 Spearman correlation analysis between visual space scale and relaxation emotion score
[0074] Relaxation score Grassland Landscape-Visual Space Scale <![CDATA[-0.382 ** <!-- 5 -->]]> Roadscape-Visual Space Scale -0.094
[0075] In Table 4, * p<0.05, ** p<0.01.
[0076] There is a significant negative correlation between visual spatial scale and relaxation emotion scores in grassland landscapes (r = -0.382, p < 0.01), which indicates that when the visual spatial scale decreases, the relaxation emotion scores of the elderly tend to decrease. In the case of road landscapes, the correlation between visual spatial scale and relaxation emotion scores is not significant (r = -0.094, p > 0.05), indicating that changes in visual spatial scale in this environment have little effect on the relaxation emotion scores of the elderly.
[0077] Considering that visual spatial scale is a hierarchical variable, the causal relationship between visual spatial scale and relaxation emotion scores in grassland landscapes was further explored through virtual regression analysis in order to gain a deeper understanding of the dynamic relationship between the two (see Tables 5 and 6). The dependent variable in Tables 5 and 6 is the relaxation emotion score.
[0078] Table 5 Virtual variable coding table
[0079]
[0080]
[0081] Table 6 Results of virtual regression analysis (n=246)
[0082]
[0083] Based on the above description, the following regression model was constructed using virtual regression analysis to evaluate the impact of the visual spatial scale of grassland landscape on the “relaxed” mood of the elderly:
[0084] y=-0.726+0.774×x1+1.183×x2.
[0085] Among them, y represents the relaxation emotion score, x1 represents the dummy variable_macro, and x2 represents the dummy variable_meso.
[0086] In this model, the constant term of -0.726 represents the baseline relaxation emotion score, while the coefficients of the dummy variables of the macroscopic and mesoscopic visual spatial scales are 0.774 and 1.183, respectively. This shows that as the macroscopic and mesoscopic visual spatial scales increase, the relaxation emotion scores of the elderly increase significantly, showing a significant correlation with the positive enhancement of relaxation emotions in the elderly. The overall fitting effect of the model is significant (F(2,243)=65.700, p<0.001), explaining 35.1% of the variability of the observed data, proving the effectiveness of the visual spatial scale in influencing the relaxation emotions of the elderly.
[0087] (2) Analysis of the impact of visual landscape type on the relaxation emotion scores of the elderly.
[0088] To verify hypothesis H2, "Under the same visual spatial scale, different visual types of landscapes will have different effects on the emotions of the elderly", the experiment compared 11 photos of different visual landscape types at the mesoscopic scale. In this process, each subject's relaxation emotion rating for each type of visual landscape photo was collected. These photos were evaluated by 82 subjects in total, and the total number of ratings for each photo reached 820.
[0089] When the normality test was conducted on the relaxation emotion scores of the elderly under different landscape types, whether the data was divided according to the major categories of natural and artificial landscapes, or according to the subdivisions of forests, flowers, shrubs, grasses, grasslands, etc., the data did not show the properties of normal distribution. Therefore, a non-parametric test method was used to further explore the differences in relaxation emotion scores under different visual landscape types. The Mann-Whitney U test and Kruskal-Wallis H test were performed on the major categories and subcategories of visual landscapes, respectively, in order to explore whether there were significant differences in the distribution of scores under these different visual types (see Tables 7 and 8).
[0090] Table 7 Mann-Whitney U test table for relaxation emotion scores
[0091] Variable NameUZp Visual type category 105888.000-6.230.196
[0092] Table 8 Kruskal-Wallis H test of relaxation emotion scores Table II
[0093] Variable name H degrees of freedom p Visual type sub-classification 100.40810<0.001
[0094] The results of the nonparametric test revealed that there was no significant difference in the distribution of relaxation emotion scores between natural and artificial landscapes (p = 0.196). However, when the visual landscape types were further subdivided, significant differences were found (p < 0.001).
[0095] By analyzing the mean relaxation emotion ratings of the elderly on different visual landscape photos ( Figure 4 The results show that the difference in emotional experience of the elderly under different visual landscape environments can be explored. Positive values indicate that the elderly tend to feel more relaxed under a specific landscape type, while negative values indicate that the relaxation effect is not good. The order of relaxation emotion scores of each visual landscape type is as follows: landscape facilities > road landscape > grassland landscape > aquatic plant landscape > stone landscape > water landscape > recreational facilities > square landscape > flower, shrub and grass landscape > sports facilities > forest landscape. The results show that the effect of natural landscape types in promoting relaxation of the elderly exceeds that of artificial landscape types.
[0096] (3) Analysis of the impact of the proportion of visual elements on the relaxation emotion scores of the elderly.
[0097] In order to verify the hypothesis H3 that "different landscape visual elements and their composition ratios will have different effects on the emotions of the elderly", we first used image semantic segmentation technology to process 11 photos representing different types of visual landscapes in order to obtain the proportion data of each visual element. Then, we analyzed the influence of the proportion of visual elements on the relaxation emotion score.
[0098] Through image semantic segmentation technology, the label masks and corresponding proportion data of 11 photos of different visual landscape types were extracted and further organized into visual element proportion data (Table 9). It is worth noting that when calculating the road element proportion, the data of road, sidewalk and path labels are integrated. The pergola element proportion combines the data of awning, bench, canopy, ceiling, chair, armchair and seat labels. The seat element proportion is composed of the data of chair, seat, bench and armchair labels.
[0099] Among them, the label mask is a special image used to indicate the exact position and shape of the target object, usually composed of binary pixels, where the pixels of the target object are marked as 1 (or 255, depending on the specific implementation) and the background pixels are marked as 0.
[0100] Table 9 Correspondence between visual landscape elements and label names
[0101]
[0102] Table 10 Spearman correlation analysis results between the proportion of visual landscape elements and relaxation emotion scores
[0103] Relaxation score Signage ratio <![CDATA[-0.162 ** ]]> Grassland ratio <![CDATA[0.078 * ]]> road ratio <![CDATA[0.196 ** ]]> Electric pole ratio <![CDATA[-0.145 ** ]]> Flower, shrub and grass ratio -0.064 Building Proportions -0.037 Trash bin ratio <![CDATA[0.193 ** ]]> Pergola ratio <![CDATA[0.095 ** ]]> Forest proportion <![CDATA[-0.133 ** ]]> Street light ratio <![CDATA[0.146 ** ]]> Wall Scale -0.043 Bridge Proportion 0.048 People ratio <![CDATA[0.138 ** ]]> Water body ratio -0.005 Sky Scale <![CDATA[0.134 ** ]]> Land Ratio 0.044 Fence ratio -0.052 Ratio of recreational facilities -0.035 Stone placement ratio -0.020 Seat proportions 0.011
[0104] In the table, * p<0.05, ** p<0.01.
[0105] By performing Spearman correlation analysis on the proportion of visual elements in the photos and the relaxation emotion score (Table 10), a significant relationship was found between the proportion of landscape elements and the relaxation emotion experience of the elderly. Specifically, the proportion of elements such as signs, electric poles, and trees was negatively correlated with the relaxation emotion score, which means that when the proportion of these elements is high, the elderly feel less relaxed. On the contrary, the proportion of elements such as grass, roads, trash cans, pergolas, street lights, people, and sky is positively correlated with the relaxation emotion score, indicating that when the proportion of these elements increases, the elderly feel more relaxed.
[0106] Furthermore, a stepwise linear regression model was constructed with the proportion of visual elements with significant correlation as the independent variable and the relaxation emotion score as the dependent variable.
[0107] In the reconstructed model (Table 11), it is observed that the independent variables including signboards, grass, roads, trash cans and street lights are retained, while the proportions of electric poles, trees, people and sky are automatically excluded. The R 2The value is 0.102, which means that the selected visual element ratio explains 10.2% of the variance of the relaxation emotion score. The VIF values of all independent variables in the model are less than 10, indicating that there is no multicollinearity problem, which proves the reliability of the model. For example, the first stepwise linear regression model is constructed with the visual element ratio as the independent variable and the relaxation emotion score as the dependent variable. The first stepwise linear regression model is expressed as:
[0108] y=-0.032-273.627×x3+0.806×x4-1.285×x5+1992.571×x6+257.027×x7.
[0109] Where y represents the relaxation emotion score, x3 represents the signboard ratio, x4 represents the grass ratio, x5 represents the road ratio, x6 represents the trash can ratio, and x7 represents the street light ratio.
[0110] In this model (i.e., the first stepwise linear regression model), the regression coefficient of the signboard ratio is -273.627 (t = -6.726, p < 0.01), and the regression coefficient of the road ratio is -1.285 (t = -2.644, p < 0.01), indicating that there is a significant negative correlation between the proportion of these visual elements and the relaxation mood score. On the contrary, the regression coefficient of the grassland ratio is 0.806 (t = 4.019, p < 0.01), the regression coefficient of the trash can ratio is 1992.571 (t = 4.532, p < 0.01), and the regression coefficient of the street lamp ratio is 257.027 (t = 3.897, p < 0.01), indicating that these visual elements have a significant positive correlation with the relaxation mood score. According to the absolute value of the regression coefficient, the influence of the visual elements on the relaxation mood score is as follows: trash can > street lamp > signboard > road > grassland.
[0111] Table 11 Stepwise regression analysis results (n = 902)
[0112]
[0113]
[0114] (4) Analysis of the impact of visual feature indicators on the relaxation emotion scores of the elderly.
[0115] After an in-depth analysis of the impact of visual space scale, landscape type, and visual landscape elements on relaxation mood scores, the potential impact of green view rate, openness, enclosure, and walkability visual feature indicators on relaxation mood scores was further explored. This step involves accumulating and classifying the proportions of multiple visual landscape elements with similar characteristics to verify hypothesis H3. Among them, H3 means that different landscape visual elements and their composition ratios will have different effects on the emotions of the elderly.
[0116] Table 12 Spearman correlation analysis results between visual feature index and relaxation emotion score
[0117]
[0118] By performing Spearman correlation analysis on the visual feature indexes of the photos and the relaxation emotion scores (Table 12), the analysis results revealed that there was a significant correlation between the visual feature indexes and the relaxation emotion experience of the elderly. Specifically, the green view rate and enclosure showed a significant negative correlation with the relaxation emotion score, indicating that when the green view rate and enclosure of the visual landscape were high, the elderly tended to feel less relaxed. On the contrary, openness and walkability were positively correlated with the relaxation emotion score, indicating that as the openness and walkability of the visual landscape increased, the relaxation emotion of the elderly also increased.
[0119] Furthermore, a stepwise regression model was constructed with the visual feature index as the independent variable and the relaxation emotion score as the dependent variable to explore the specific impact of the visual feature index on the relaxation emotion score.
[0120] Table 13 Linear regression analysis results (n = 902)
[0121]
[0122]
[0123] By constructing a stepwise regression model (Table 13), it was found that green view rate and enclosure were retained as independent variables, while openness and walkability were not included in the model. The R 2 The value is 0.042, indicating that the selected visual feature indicators can explain 4.2% of the changes in relaxation emotion scores. In the stepwise regression analysis, the VIF values of each variable are all lower than 10, indicating that the model is not affected by multicollinearity, showing that the construction of the model is reasonable. Based on this, the second stepwise linear regression model is constructed with the visual feature indicators as independent variables and the relaxation emotion score as the dependent variable. The visual feature indicators include green view rate and enclosure. Among them, the second stepwise linear regression model is expressed as:
[0124] y=0.179+0.659×x 10 -1.02×x9.
[0125] Among them, y represents the relaxation emotion score, x 10 represents the green viewing rate, and x9 represents the enclosure degree.
[0126] In this model (i.e., the second stepwise linear regression model), the regression coefficient of enclosure is -1.02 (t=-5.035, p<0.01), indicating that enclosure is significantly negatively correlated with relaxation emotion scores. On the contrary, the regression coefficient of green view rate is 0.659 (t=3.196, p<0.01), revealing a positive correlation between green view rate and relaxation emotion scores. From the absolute value of the regression coefficient, among the visual feature indicators that affect relaxation emotion scores, enclosure has a greater influence than green view rate.
[0127] Furthermore, the influence of visual factors on micro-expressions of the elderly is analyzed.
[0128] The intensity of micro-expressions refers to the degree of arousal of the instantaneous micro-expression reaction when observing a specific visual element. Its intensity cannot be accurately assessed simply based on visual spatial scale or visual feature indicators such as green vision rate. Emotional valence is calculated from the intensity of micro-expressions. Therefore, when analyzing the impact of visual elements on micro-expressions, the only independent variables analyzed are the category of visual elements and their proportion in the visual field.
[0129] In the process of analyzing the impact of visual factors on micro-expressions of the elderly, after screening out data with a gaze sample ratio of less than 50% in the eye movement data and image quality of less than 75% in the micro-expression intensity data, a total of 53 valid data of subjects were obtained.
[0130] Based on the valid data of the 53 subjects given above, the analysis process of the impact of visual factors on micro-expressions of the elderly includes:
[0131] (1) Analysis of the impact of visual elements on the intensity of micro-expressions.
[0132] In order to further verify the hypothesis H3 that "different landscape visual elements and their composition ratios will have different effects on the emotions of the elderly", the study first analyzed the impact of visual element categories on the intensity of micro-expressions, and then explored the impact of different visual element ratios on the intensity of micro-expressions one by one.
[0133] Through the normality test, it was observed that under different landscape elements, the p-values of most micro-expression intensities were less than 0.05, except that the p-value of neutral expression intensity exceeded 0.05 under some conditions. This result indicates that 86.43% of the micro-expression intensities in the various landscape element types studied did not follow a normal distribution. To further analyze the potential differences in micro-expression intensity caused by different visual landscape elements, the Kruskal-Wallis H test was performed (shown in Table 14).
[0134] Table 14 Kruskal-Wallis H test table of various micro-expression intensities
[0135]
[0136] The results of nonparametric tests showed that the intensity of surprise expression was significantly different among different visual element types (p=0.006<0.05), indicating that the type of visual element had a significant effect on the intensity of surprise expression. In contrast, the intensity of other micro-expressions did not show significant differences among different visual element types (p>0.05). Next, the median of the intensity of surprise expression in different visual landscape element types was analyzed to analyze the differences in detail.
[0137] Figure 5 The results show that among different visual landscape elements, the intensity of surprise expression of electric poles is the highest (0.038), followed by trash cans (0.0248) and street lights (0.023). This indicates that these elements are more likely to trigger their surprise emotional response during visual observation. In contrast, the surprise expression intensity of other visual elements such as trees, vegetation and water bodies is relatively low, at 0.0078, 0.0064 and 0.0062 respectively, indicating that they trigger a lower degree of surprise emotion.
[0138] Before exploring the impact of the proportion of each visual element on the intensity of micro-expressions, visual elements with insufficient sample size or unchanged element proportions were first excluded, including signboards, telephone poles, trash cans, street lights, walls, bridges, land, and amusement facilities. Then, the relationship between the proportion of the remaining visual elements and the intensity of each type of micro-expression was studied through Spearman correlation analysis.
[0139] Table 15 Spearman correlation analysis results between the proportion of visual elements and the intensity of various micro-expressions
[0140]
[0141] Table 15 shows the correlation between the proportion of visual elements and the emotional response of the elderly. Specifically, it was found that there was a significant positive correlation between the proportion of grass and the intensity of sadness, which means that when the proportion of grass in the photo is high, the elderly tend to experience stronger sadness. The positive correlation between the proportion of roads and the intensity of happy emotions indicates that when the proportion of roads increases, the elderly may feel stronger happy emotions. The significant negative correlation between the proportion of trees and the intensity of fear emotions indicates that as the proportion of trees increases, the fear emotions felt by the elderly may weaken. No significant correlation was found between the proportions of other visual elements and the intensity of micro-expressions.
[0142] In order to understand the relationship between the above visual element ratios and micro-expression intensity, we first calculated the mean micro-expression intensity of each visual element at each ratio to represent the micro-expression intensity induced by that ratio. Then, we will further explore the causal relationship between the grass ratio and sadness intensity, the road ratio and happiness intensity, and the tree ratio and fear intensity.
[0143] (1-1) Analysis of the impact of grassland ratio on sadness intensity.
[0144] Through curve estimation analysis of SPSS software, the grassland proportion was used as the independent variable and the sadness intensity was used as the dependent variable to complete the regression analysis of various models (Table 16).
[0145] Table 16 List of regression analysis models
[0146]
[0147]
[0148] R with p-value of significance test and model explanatory power 2 The value was used as the evaluation standard. From the numerous curve regression models, the model obtained by S-curve fitting (R 2 =0.381, p<0.001) for regression analysis (Table 17). In Table 17, ln(sadness intensity) is the dependent variable.
[0149] Table 17S curve fitting results (n = 54)
[0150]
[0151] By analyzing the curve fitting diagram ( Figure 6 ), a significant curvilinear relationship between the proportion of grassland and the intensity of sadness can be observed. The R 2 The value reached 0.381, which means that the model can explain 38.1% of the data variation, mainly showing an S-shaped fitting trend. Through the ANOVA test, the significance of the model was confirmed (p<0.001). Based on this, with the proportion of grassland as the independent variable and the intensity of sadness as the dependent variable, the constructed model is expressed as follows:
[0152] ln(y1)=-2.425-0.023×(1 / x4).
[0153] In the formula, ln is the logarithm, y1 represents the sadness intensity, and x4 represents the grassland ratio.
[0154] The fitting model shows that the coefficient of the independent variable (1 / grassland ratio) is significant (t=-5.662, p<0.01), which indicates that there is a significant S-shaped relationship between the grassland ratio and the intensity of sadness. As the grassland ratio increases, the sadness intensity shows an S-shaped upward trend and eventually tends to stabilize. Through interviews with the elderly, it is speculated that the overly open grassland may make the elderly feel more lonely, which may be associated with their own aging, resulting in an instantaneous emotional response of sadness.
[0155] (1-2) Analysis of the impact of road ratio on happiness intensity.
[0156] SPSS software was used to perform curve estimation analysis, and a multi-model regression analysis was conducted with road proportion as the independent variable and happiness intensity as the dependent variable (Table 18).
[0157] Table 18 List of regression analysis models
[0158]
[0159]
[0160] Use a significant p-value and a high R 2 The value was used as the evaluation standard for the model fitting effect. The model obtained by S-curve fitting was selected from many curve regression models for regression analysis (Table 19, R 2 =0.266, p=0.014), the dependent variable in Table 19 is the intensity of happiness.
[0161] Table 19S curve fitting results (n = 22)
[0162]
[0163] Observe as Figure 7 The curve fitting plot shown in the figure shows that there is a significant curvilinear relationship between road ratio and happiness intensity. The R 2 The value is 0.266, which means that the fitted model can explain 26.6% of the data variance and shows the trend of an S-shaped curve. The significance of the model was verified by ANOVA test (p = 0.014). Based on this, with the road ratio as the independent variable and the happiness intensity as the dependent variable, the constructed model is expressed as: ln (y2) = -2.870-0.004 × (1 / x5). In the formula, y2 represents the happiness intensity and x5 represents the road ratio.
[0164] The regression model shows that the coefficient of the independent variable (1 / road ratio) is significant (t=-2.689, p=0.014<0.05), indicating that there is a significant S-shaped curve relationship between road ratio and happiness intensity. As the road ratio increases, the happiness intensity first shows an S-shaped curve growth trend and eventually stabilizes. Through interviews with the elderly, it is found that roads are the visual elements that the elderly pay special attention to when observing photos. Compared with whether the landscape can be seen, the elderly care more about whether the landscape can be entered. Therefore, when the road ratio accounts for a larger proportion, the elderly have a stronger happiness intensity.
[0165] (1-3) Analysis of the impact of tree ratio on the intensity of fear.
[0166] SPSS software was used to perform curve estimation analysis, with the proportion of trees as the independent variable and the intensity of fear as the dependent variable, and a multi-model regression analysis was performed (Table 20).
[0167] Table 20 List of regression analysis models
[0168]
[0169]
[0170] Based on the significant p-value and R 2 When the fitting effect of the model was evaluated by the value, all the curve regression models did not show significance. In view of this, the study further turned to nonlinear regression and tried to use rational polynomial functions for analysis. In this model, the initial values of parameters b1, b2, b3, b4 and b5 were all set to 1. Based on this, the proportion of trees was taken as the independent variable and the intensity of fear was taken as the dependent variable. The constructed model is expressed as: y3 = (b1 + b2 × x8 + b3 × x8 2 ) / (1+b4×x8+b5×x8 2 ). In the formula, y3 represents the fear intensity, and x8 represents the proportion of trees.
[0171] Table 21 Model parameter estimates (n=55)
[0172] Parameters Regression coefficient Standard error t-value p-value 95% CI b1 0.082 0.036 2.261 0.028 0.009~0.155 b2 -1.305 0.527 -2.477 0.017 -2.363~-0.247 b3 6.186 2.554 2.422 0.019 1.056~11.316 b4 -14.316 2.766 -5.176 0.000 -19.872~-8.761 b5 57.597 22.646 2.543 0.014 12.112~103.082
[0173] Table 22 Model fitting effect table
[0174]
[0175] Table 21 shows the estimated values of the five parameters, where the p-value of each parameter is significantly less than 0.05, and the 95% confidence interval does not contain 0, which further verifies the statistical significance of the parameters, indicating that the model exhibits a good fit. Model R 2The value is 0.141, which means that the model can explain about 14.1% of the total variation in fear intensity. Based on this, with the proportion of trees as the independent variable and the fear intensity as the dependent variable, the constructed model becomes: y3 = (0.082-1.305×x8+6.186×x8 2 ) / (1-14.316×x8+57.597×x8 2 ).
[0176] By analyzing Figure 8 The curve graph shown can identify the extreme points of the rational polynomial function model. When the forest ratio is about 0.1, the fear intensity reaches its lowest point. When the forest ratio is about 0.18, the fear intensity rises to the highest point. As the forest ratio increases further, the fear intensity gradually decreases and eventually tends to stabilize. Through interviews with the elderly, it is found that trees are both scenery and barriers for the elderly. When there are too few trees, the elderly believe that their privacy is not protected, and when there are too many trees, the elderly believe that the space is less bright and their sense of security decreases, which leads to an emotional response of fear.
[0177] (2) Analysis of the impact of visual elements on emotional valence.
[0178] In order to verify hypothesis H3 that "different landscape visual elements and their composition ratios will have different effects on the emotions of the elderly", this study explored the impact of visual element categories on emotional valence and analyzed the impact of different visual element ratios on emotional valence.
[0179] When the normality test of the emotional valence triggered by different visual landscape elements was conducted, it was found that under the conditions of 85% of the landscape elements, the p-value of the emotional valence was lower than 0.05, except for the specific conditions of signboards, telephone poles and trash cans, where the p-value exceeded 0.05. This shows that under the conditions of most landscape elements, the emotional valence did not follow a normal distribution. In order to analyze the possible differences in the emotional valence of different visual landscape elements, the Kruskal-Wallis H test was used for further statistical analysis (Table 23).
[0180] Table 23 Kruskal-Wallis H test table of emotional valence
[0181] Variable Name H Degrees of Freedom p Visual element type 18.281 19 0.504
[0182] The results of non-parametric tests showed that the distribution of emotional valence among different types of visual elements did not show statistically significant differences (p=0.504>0.05), indicating that the type of visual element may not have a significant impact on emotional valence.
[0183] Before exploring the impact of the proportion of each visual element on emotional valence, we first screened out visual elements with insufficient sample size and unchanged proportions, including signboards, telephone poles, trash cans, street lights, walls, bridges, land, and amusement facilities. Next, we conducted a Spearman correlation analysis between the proportions of the remaining visual elements and emotional valence.
[0184] Table 24 Spearman correlation analysis results between visual element ratio and emotional valence
[0185]
[0186] The results of the Spearman correlation analysis (Table 24) did not reveal any significant associations between specific landscape elements and the overall emotional experience of the elderly. No statistically significant correlations were found between the proportions of all landscape elements examined and emotional valence (p>0.05).
[0187] In this embodiment, an emotional valence lower than -0.33 is defined as a negative emotion, while an emotional valence higher than -0.33 is identified as a positive emotion. In order to explore whether there is a significant difference in the composition ratio of emotional types under different visual element conditions, this embodiment uses the emotional type as the tested variable and the visual element type as the grouping variable, and uses the chi-square test for analysis. The results of the chi-square test show that there is no significant difference in the composition ratio of emotional types under different visual element conditions (p>0.05). This shows that the type of visual element has no effect on the overall emotional feelings of the elderly.
[0188] In addition, the ratio of negative emotions to positive emotions under different visual elements is approximately 1:2.6, indicating that under different visual elements, the ratio of positive emotions is higher than that of negative emotions. This shows that even if there are visual elements that induce negative emotions in the elderly, the impact of green space on the elderly is still mainly positive emotions. Therefore, when optimizing the design of community green space, we should not only consider ways to enhance positive emotions, but also focus on ways to reduce negative emotions.
[0189] Based on the above description, by analyzing the influence of visual features on the subjective emotional scores of the elderly, and the influence of visual elements on the intensity of micro-expressions of the elderly, the eigenvalues and target variables in the sample data set can be determined. Among them, the eigenvalue refers to the various features on which the prediction of emotions depends, that is, the proportion of different landscape element labels in the photo, and the target variable refers to the emotional state of the elderly. In the above content, the emotional data has been strictly screened, and the data that does not meet the standards of eye movement sampling accuracy and micro-expression prediction reliability have been excluded. The experimental results show that the proportions of signboards, grass, roads, trash cans, street lights, etc. are closely related to the relaxation of the elderly. In addition, the proportion of grass is related to sad emotions, the proportion of roads is related to happy emotions, and the proportion of trees is related to fearful emotions.
[0190] In summary, based on the existing research conclusions, we need to construct four different data sets, corresponding to "the proportion of labels of signs, grass, roads, electric poles, trash cans, pergolas, trees, street lights, people, and sky and relaxation scores", "the proportion of grass labels and sadness intensity", "the proportion of road labels and happiness intensity", and "the proportion of tree labels and fear intensity". The corresponding relationship between the feature values and the target variables in the constructed sample data set is as follows: Fig. 9 shown.
[0191] Step 101: Construct a sample data set based on the relationship between visual features and emotions. In actual application, the construction of the sample data set mainly involves analyzing the results of the relationship between visual features and emotions of the elderly in cognitive psychology experiments, and based on this relationship, performing feature engineering to complete the construction of the sample data set.
[0192] In the process of performing cognitive psychology experiments in step 100, the subjective emotional ratings of the elderly on the photos and the micro-expression intensity data on different visual elements are collected, and the data collection work required for the construction of the data set has been preliminarily completed. However, in machine learning projects, the original data often contains a large number of original features, which may not be directly applicable to the training of the model, and further feature selection is required based on the correlation with the target. Based on this, this embodiment further performs feature selection by analyzing the part of the cognitive psychology experimental results related to the relationship between visual features and the emotions of the elderly, thereby completing the construction of the data set.
[0193] Step 102: Use the sample data set to train the machine learning model to obtain a trained machine learning model.
[0194] In the actual application process, in order to predict the impact of the visual landscape of community green space on the emotions of the elderly, this embodiment selects the Random Forest regression algorithm as the machine learning model. The Random Forest regression algorithm belongs to the Ensemble Learning method, which builds multiple independent decision trees and summarizes the prediction results of each decision tree to improve the overall prediction accuracy and stability. This model is particularly suitable for processing high-dimensional data sets and shows good adaptability to outliers and nonlinear relationships, which is extremely critical for understanding the complex emotional perception patterns of the elderly.
[0195] In the specific application process, the main steps of model training are data partitioning and hyperparameter optimization. Before model training, the feature values in the sample data set are first normalized to ensure the consistency of the data during training. Then the data is partitioned, with 80% of the data used as the training set and the remaining 20% used as the test set. During the training process, the key parameters of the random forest, such as the number of decision trees, the maximum depth of the tree, and the sample sampling ratio, are adjusted to optimize the model performance. The initial settings of these hyperparameters can be optimized through a systematic grid search method.
[0196] After the above processing, the machine learning model is evaluated. Common indicators for evaluating the performance of random forest regression models include mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R 2 ). Generally speaking, the smaller the MSE, RMSE, and MAE values are, and the R 2 The closer the value of is to 1, the better the prediction performance of the model. The random forest model can also provide an assessment of the importance of each feature in the prediction, which helps to identify key features that have a significant impact on the model's prediction results. By analyzing the importance of these features, the model can be optimized more carefully, such as removing features with less impact. In addition, the evaluation results of the model can be fine-tuned. If the model is overfitting, you can consider reducing the maximum depth of the tree or increasing the minimum number of samples for the leaf node. Conversely, if there is underfitting, you can try to increase the number of trees or adjust other related parameters.
[0197] Step 103: Input the community green space photos at different shooting angles at each shooting location into the trained machine learning model to obtain the emotion prediction values at different shooting angles at each shooting location.
[0198] Step 104: average the emotion prediction values of different shooting angles at each shooting position to obtain a comprehensive emotion value of each shooting position.
[0199] Step 105: Using ArcMap software, the comprehensive emotion value is mapped to a projected coordinate system. The projected coordinate system is constructed based on the location of the community green space.
[0200] Step 106: Construct a fishing net model with a set grid size based on the projected coordinate system mapped with the comprehensive emotion value.
[0201] Step 107: The comprehensive emotion values of all positions in the grid in the fishing net model are averaged and assigned to the corresponding grid as the grid emotion value to obtain the assigned fishing net model.
[0202] Step 108: Adjust the color attributes of the grids in the assigned fishing net model to obtain a mood map.
[0203] Based on the above steps 103 to 108, the emotion map is mainly generated based on machine learning. In the actual application process, by using the optimized random forest regression model, the proportion of landscape element labels in the community visual landscape photos from the human perspective is used as input, and the random forest regression model predicts the emotion value of each photo accordingly. The emotion values of photos taken at different angles at each shooting location are averaged to obtain the comprehensive emotion value of the location. Using ArcMap software, the comprehensive emotion value of the location is mapped to the projection coordinate system, and a fishing net model with a set grid size (for example, a 25m×25m grid size) is constructed. The emotion values of all locations in the grid are averaged and assigned to the grid. The color attributes of the grid are adjusted to complete the drawing of the emotion perception map, that is, the emotion map is obtained. By predicting the random forest model of different emotions, 5 different emotion maps can be obtained, including an emotion valence map, a relaxation emotion map, a sadness emotion map, a happiness emotion map, and a fear emotion map. Further, the emotional mean of each community green space can be obtained, thereby generating an individual emotion map of the community green space.
[0204] Based on the analysis of the emotion map, the specific spatial objects that need to be optimized at the community life circle scale can be identified. On the one hand, community green spaces with excessively high negative emotions or low positive emotions and their specific locations can be intuitively identified. On the other hand, combined with the interview content, areas that have not yet become community green spaces but where the elderly often carry out leisure and recreation activities, or vacant areas adjacent to community green spaces with excessively high negative emotions can be identified.
[0205] Example 2
[0206] This embodiment takes the green space of the Hopson City Life Circle community in Minhang District, Shanghai as an example, and uses the method provided in the above embodiment 1 to generate an emotion map. In this embodiment, the generation process of the emotion map includes:
[0207] 1. Dataset construction and division.
[0208] in accordance with Fig.10 , it is necessary to construct 4 different data sets, corresponding to "the ratio of labels of signboards, grass, roads, telephone poles, trash cans, pergolas, trees, street lights, people, and sky to relaxation scores", "the ratio of grass labels to sadness intensity", "the ratio of road labels to happiness intensity", and "the ratio of tree labels to fear intensity". However, in the influence relationship analysis of feature selection provided in the above embodiment 1, only the sample size in the data set of "the ratio of labels of signboards, grass, roads, telephone poles, trash cans, pergolas, trees, street lights, people, and sky to relaxation scores" exceeds 100, meeting the basic requirements for machine learning sample size. The sample sizes of the remaining three data sets are too small, which will lead to low credibility of the machine learning prediction results. Therefore, only the random forest algorithm is applied to the generation of the relaxation emotion map, while the generation of the sadness, happiness, and fear emotion maps is calculated according to the curve regression equation model provided in the above embodiment 1.
[0209] After constructing the eigenvalues (proportions of each landscape element) and the target variable (emotional value), the data set was split in JupyterNotebook, with 80% of the data constituting the training set and 20% of the data constituting the test set. The split data set was then regularized to avoid overfitting of the model.
[0210] 2. Model hyperparameter tuning and training.
[0211] Before the model training begins, the five important hyperparameters of the random forest are tuned, including the number of decision trees (n_estimators), the maximum depth of the decision tree (max_depth), the minimum number of separation samples (min_samples_split), the minimum number of leaf node samples (min_samples_leaf), and the maximum number of separation features (max_features). The ranges of these five hyperparameters are defined and stored in the hyperparameter range dictionary.
[0212] In each training of the random forest regression model, the RandomizedSearchCV function randomly matches each hyperparameter combination in the dictionary and outputs the optimal combination. It should be noted that this function does not traverse all the permutations and combinations of hyperparameters, but performs random matching, and the result is the optimal combination of hyperparameters after 200 random matches.
[0213] Based on the optimal result of random matching and 200 selections, several values are selected in the vicinity, and each hyperparameter combination is traversed through the GridSearchCV function to obtain the optimal result of the hyperparameter.
[0214] After three rounds of matching and selection, the optimal hyperparameter combination was obtained, thus determining the optimal random forest regression model for the training data set.
[0215] 3. Model evaluation.
[0216] The optimal random forest regression model was applied to the training set and the test set, and the mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), and coefficient of determination (R 2 ).
[0217] Based on the evaluation results, the model is applied to the R 2 The R value of the model established by stepwise regression is 0.118, which is higher than the R value of the model established by stepwise regression. 2 The value indicates that the random forest model has a better fitting effect than the stepwise regression model.
[0218] 4. Model prediction.
[0219] According to the method of constructing a training data set, the label ratios of relevant elements in human perspective photos in community green spaces were constructed into a prediction data set, and the optimal random forest regression model was used to predict the relaxation emotions of the elderly in the green space of the Hopson City Life Circle community in Minhang District, Shanghai.
[0220] 5. Emotional map generation.
[0221] The predicted values of relaxation, happiness, sadness and fear at each point in the community green space were obtained by using the random forest regression algorithm and the curve regression model, and the emotional valence of each point was further calculated. The community green space emotion map for the elderly was generated by the method described in Example 1. Figure 5 Zhang, and the emotional map of the 25m×25m grid of the community green space Figure 5 open.
[0222] (1) Analysis of the emotional responses of the elderly to community green space systems.
[0223] Calculate the mean of the above emotion type prediction values for three types of community green spaces: community parks, community greenways, and pocket parks, and get Fig.11 result.
[0224] from Fig.11It can be seen that pocket parks have the lowest emotional valence, followed by community parks, and finally community greenways. Therefore, in the optimization of community green space systems, pocket parks should be given priority. For pocket parks, it is necessary to reduce the emotional experience of fear of the elderly. For community parks, it is necessary to reduce the emotional experience of sadness of the elderly and enhance the emotional experience of relaxation and happiness. For community greenways, the emotional experience basically meets the existing emotional needs of the elderly.
[0225] (2) Prediction of emotional responses of older adults to community green space.
[0226] The emotional map of the elderly can reveal the optimization design priority sequence of each type of community green space, as well as the emotional experience problems of the elderly ( Fig.12 and Fig.13 ). Among them, in the mean value map of each type of emotion, the darker the color of the area, the higher the mean value of the emotion in that area is relative to other areas.
[0227] When optimizing the design of pocket parks, the Anning Lanxin Park, which has the lowest emotional value among pocket parks, should be optimized first, followed by the Fengqing Road-Ruili Road Pocket Park. The Jinggu Road-Ruili Road Pocket Park basically meets the emotional needs of the elderly and does not need to be optimized. For Anning Lanxin Park, the emotional experience of fear should be reduced and the emotional experience of happiness should be enhanced. For Fengqing Road-Ruili Road Pocket Park, the emotional experience of sadness should be reduced and the emotional experience of relaxation should be enhanced.
[0228] When optimizing the design of community parks, the Minhang Science and Technology Park, which has the lowest emotional valence among the community parks, should be optimized first, followed by the Ginkgo Park. The optimization design of the Minhang Science and Technology Park should aim to reduce the emotional experience of fear and enhance the emotional experience of relaxation and happiness. The optimization design of the Ginkgo Park should mainly focus on reducing the emotional experience of sadness.
[0229] Compared with pocket parks and community parks, community greenways have better met the emotional needs of the elderly. However, if it is necessary to optimize the design of community greenways, the Jianchuan Road Greenway and Ruili Road Greenway, which have relatively low emotional valence, can be optimized. In the Jianchuan Road Greenway, the emotional experience of fear should be reduced, and the emotional experience of relaxation and happiness should be enhanced. The optimization design of the Ruili Road Greenway is mainly to reduce the emotional experience of sadness.
[0230] In summary, when optimizing the design of individual community green spaces, the priority sequence of community green spaces that need necessary optimization design is: Anning Lanxin Garden, Fengqing Road-Ruili Road Pocket Park, Minhang Science and Technology Park and Ginkgo Park.
[0231] (3) Prediction of emotional responses of the elderly within community green spaces.
[0232] from Figures 14 to 18 In the 25×25m grid emotion map of the community green space shown, we can clearly see the geographical locations where specific emotional experience problems occur in each community green space, providing a basis for subsequent more in-depth optimization design.
[0233] Based on the above description, the construction of a machine learning model and the generation of an emotion map for predicting emotions using the green space of the Hopson City Life Circle community in Minhang District, Shanghai as an example. The construction of the machine learning model mainly includes three steps: data set construction, model selection and training, and model evaluation. Among them, the feature selection basis in the data set construction step comes from the analysis of the results of cognitive psychology experiments. By analyzing the influence of the visual characteristics of community green space on the emotions of the elderly, the feature values and target variables in the data set are clarified. In order to generate emotion maps of different emotion types, four data sets need to be constructed, namely "signboard, grass, road, electric pole, trash can, pergola, tree, street lamp, person, sky label ratio and relaxation score", "grass label ratio and sadness intensity", "road label ratio and happiness intensity" and "tree label ratio and fear intensity".
[0234] Based on the prediction accuracy and stability, the random forest regression algorithm was selected as the machine learning model for emotion prediction. The hyperparameters of the model were adjusted through random matching and ergodic matching to determine the optimal prediction model. After evaluating the model, the emotions of the elderly were predicted to obtain the predicted values of the elderly emotions in each photo.
[0235] Using ArcMap software, the predicted values of elderly people's emotions are mapped to the projection coordinate system to generate the elderly people's emotion map of community green space. Based on the elderly people's emotion map of community green space, the priority sequence of community green space optimization design objects can be clarified, and targeted optimization design can be carried out in combination with the emotional problems of specific spaces.
[0236] Example 3
[0237] A computer device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the emotion map generating method in Embodiment 1.
[0238] Example 4
[0239] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the emotion map generation method in embodiment 1.
[0240] Example 5
[0241] A computer program product includes a computer program, which implements the emotion map generation method in embodiment 1 when executed by a processor.
[0242] Example 6
[0243] A computer device, which may be a database. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store pending transactions. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the emotion map generation method in Example 1 can be implemented.
[0244] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0245] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present invention may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited thereto. The processor involved in each embodiment provided by the present invention may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited thereto.
[0246] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0247] The principles and implementation methods of the present invention are described in this article using specific examples. The description of the above embodiments is only used to help understand the method and core ideas of the present invention. The same and similar parts between the embodiments can be referred to each other. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A method for generating an emotion map, characterized in that: The method comprises: Through cognitive psychology experiments, the influence of visual features on emotions is determined; the visual features include: visual space scale, visual landscape type, visual element ratio and visual feature index; Construct a sample dataset based on the impact of visual features on emotions; Using the sample data set to train a machine learning model to obtain a trained machine learning model; The community green space photos taken at different shooting angles at each shooting location are input into the trained machine learning model to obtain the emotion prediction values at different shooting angles at each shooting location; The emotion prediction values of different shooting angles at each shooting position are averaged to obtain the comprehensive emotion value of each shooting position; Using ArcMap software, the comprehensive emotion value is mapped to a projection coordinate system; the projection coordinate system is constructed based on the location of the community green space; A fishing net model with a set grid size is constructed based on a projected coordinate system mapped with comprehensive emotion values; The comprehensive emotion values of all positions in the grid in the fishing net model are averaged and assigned to the corresponding grid as the grid emotion value to obtain the assigned fishing net model; The emotion map is obtained by adjusting the color attributes of the grid in the assigned fishing net model.
2. The method for generating an emotion map according to claim 1, characterized in that: A random forest regression algorithm is used as the machine learning model.
3. The method for generating an emotion map according to claim 1, characterized in that: In the process of determining the relationship between visual features and emotions through cognitive psychology experiments, a model was constructed with the proportion of visual elements as the independent variable and the intensity of emotions as the dependent variable; The visual element ratios include: signboard ratio, grass ratio, road ratio, trash can ratio, street light ratio and tree ratio; Among them, the grassland ratio is taken as the independent variable and the sadness intensity is taken as the dependent variable. The constructed model is expressed as follows: ln(y1)=-2.425-0.023×(1 / x4); In the formula, ln is the logarithm, y1 represents the sadness intensity, and x4 represents the proportion of grassland; Taking the road ratio as the independent variable and the happiness intensity as the dependent variable, the constructed model is expressed as: ln(y2)=-2.870-0.004×(1 / x5); In the formula, y2 represents the intensity of happiness, and x5 represents the road ratio; Taking the proportion of trees as the independent variable and the intensity of fear as the dependent variable, the constructed model is expressed as follows: <h2 style=";text-align:left;direction:ltr">y3 = (b1 + b2 × x8 + b3 × x8<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> ) / (1+b4×x8+b5×x8<h2 style=";text-align:left;direction:ltr"> 2 <h2 style=";text-align:left;direction:ltr"> ); Where y3 represents the fear intensity and x8 represents the proportion of trees.
4. The method for generating an emotion map according to claim 1, characterized in that: In the process of determining the relationship between the influence of visual features and emotions through cognitive psychology experiments, the first stepwise linear regression model was constructed with the proportion of visual elements as the independent variable and the relaxation emotion score as the dependent variable.
5. The method for generating an emotion map according to claim 4, characterized in that: The first stepwise linear regression model is expressed as: y=-0.032-273.627×x3+0.806×x4-1.285×x5+1992.571×x6+257.027×x7; Where y represents the relaxation emotion score, x3 represents the signboard ratio, x4 represents the grass ratio, x5 represents the road ratio, x6 represents the trash can ratio, and x7 represents the street light ratio.
6. The method for generating an emotion map according to claim 1, characterized in that: In the process of determining the influence of visual features on emotions through cognitive psychology experiments, a second stepwise linear regression model was constructed with visual feature indicators as independent variables and relaxation emotion score as dependent variable; the visual feature indicators included green view rate and enclosure.
7. The method for generating an emotion map according to claim 6, characterized in that: The second stepwise linear regression model is expressed as: y=0.179+0.659×x 10 -1.02×x9; Among them, y represents the relaxation emotion score, x 10 represents the green viewing rate, and x9 represents the enclosure degree.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the emotion map generation method according to any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the emotion map generation method according to any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the emotion map generation method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Metaphor map-based video emotion analysis and visualization method and system
CN111191554A
System And Method For Assessing An Image Sentiment
US20200273189A1
Cited By
Signal system and method for urban streetscape visual emotion prediction and application
CN120296583A
Signal system, method and application for urban street view visual sentiment prediction
CN120296583B