A city park site recommendation method and system based on crowd activity preferences

By constructing a park venue recommendation system based on knowledge graphs, and combining multi-dimensional sensory environment and deep learning models, the problems of multi-sensory feature integration and activity preference matching in existing park recommendation technologies have been solved, realizing personalized recommendations for park venues and improving user experience.

CN122174059APending Publication Date: 2026-06-09SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SOUTH CHINA AGRICULTURAL UNIVERSITY
Filing Date
2026-02-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing park recommendation technologies fail to systematically integrate multi-dimensional sensory features, making it difficult to accurately reflect the park environment and failing to consider visitor activity preferences, resulting in insufficient personalized recommendations.

Method used

A knowledge graph-based park venue recommendation system is constructed. By combining multi-dimensional sensory environmental data and spatial structure data with a deep learning model, and integrating individual user attributes and activity preferences, personalized venue recommendations are achieved.

Benefits of technology

It enables multi-dimensional consideration of park environment, identifies the correlation between environmental characteristics and people's activity preferences, provides personalized venue recommendations, and improves the accuracy of park venue selection and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122174059A_ABST
    Figure CN122174059A_ABST
Patent Text Reader

Abstract

This application relates to a method and system for recommending urban park locations based on crowd activity preferences. The method includes: responding to a park location recommendation instruction by detecting user-input information; and obtaining a recommendation result based on a knowledge graph and a trained park location recommendation model, whereby the recommendation result includes at least one location. The knowledge graph is constructed based on a park location feature dataset and a crowd activity preference dataset; the park location recommendation model is trained using a deep learning model based on the knowledge graph; and the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations within the park. This method enables personalized recommendations for park locations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method and system for recommending urban park locations based on people's activity preferences. Background Technology

[0002] As an important component of the urban ecosystem, urban parks have become vital public spaces for citizens' daily leisure, fitness, and social activities. With rising living standards, park visitors' demands for a higher quality and more personalized experience are gradually evolving. However, with a large number of parks of various types, visitors often face difficulties in choosing a park that suits their preferences due to a lack of comprehensive and relevant information.

[0003] While some parks currently offer visitor information and activity recommendations, the environmental experience in parks often involves multi-sensory interaction. Existing recommendation technologies tend to focus on single-sensory elements, failing to systematically integrate visual, auditory, and olfactory features, thus making it difficult to accurately reflect the park environment. Furthermore, current recommendation technologies do not address the matching between park locations and visitor activity preferences, hindering personalized recommendations. In summary, existing recommendation technologies suffer from shortcomings such as limited environmental sensory features and a lack of consideration for activity preference matching, making it difficult to meet the diverse and personalized needs of visitors. Summary of the Invention

[0004] Therefore, it is necessary to provide a method and system for recommending urban park locations based on people's activity preferences, which can achieve personalized recommendations for park locations, in order to address the above-mentioned technical problems.

[0005] This application provides a method for recommending urban park locations based on people's activity preferences, the method comprising: In response to park location recommendation instructions, the system detects the information entered by the user. Based on the detection results of the user input information, a recommendation result is obtained through a pre-trained park location recommendation model based on the knowledge graph. The recommendation result contains at least one location. The knowledge graph is constructed based on the park location feature dataset and the crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

[0006] In one embodiment, the step of obtaining a recommendation result based on a knowledge graph and a trained park location recommendation model, based on the detection results of the user input information, includes: When it is detected that the user has not entered any information, a preset general user feature vector is obtained; based on the general user feature vector and all possible activity and place combinations in the knowledge graph, a score value for each activity and place combination is obtained through a trained park place recommendation model; the top N activity and place combinations with the highest scores are output as the general recommendation results.

[0007] In one embodiment, the step of obtaining a recommendation result based on a knowledge graph and a trained park location recommendation model, based on the detection results of the user input information, includes: When a user inputs individual attribute information and specifies a target activity type, the system retrieves locations that match the target activity type from the knowledge graph to obtain a set of candidate locations. Based on individual user attribute information, target activity type and candidate location set, a pre-trained park location recommendation model is used to predict and score the user’s willingness to carry out target activities in each location. The top N locations with the highest willingness scores are output as recommendations.

[0008] In one embodiment, the step of obtaining a recommendation result based on a knowledge graph and a trained park location recommendation model, based on the detection results of the user input information, includes: When it is detected that a user only inputs individual user attribute information without specifying the target activity type, similar historical user groups are identified in the knowledge graph based on the individual user attribute information, and candidate activity and location combinations of all preferences of similar historical user groups are obtained; Based on individual user attribute information and various candidate activity and venue combinations, a trained park venue recommendation model is used to obtain the user's preference score for each candidate activity and venue combination. The top N candidate activity and location combinations with the highest preference scores are output as recommendations.

[0009] In one embodiment, before detecting user-inputted information in response to a park location recommendation instruction, the method further includes: Multidimensional sensory environment data and spatial structure data of all locations in the park were collected to construct a park location feature dataset. Based on the park location feature dataset, all locations were clustered using the K-means clustering method to obtain multiple typical location types. Based on the preset park activity types, the individual attribute information of multiple visitors and the activity preference information of each visitor for different typical venue types are obtained to construct a population activity preference dataset. Based on a dataset of park features and a dataset of people’s activity preferences, an activity preference prediction model is constructed, and the SHAP method is used to interpret the activity preference prediction model. Using users, parks, and places as entities, a knowledge graph is constructed using the Neo4j graph database and the Cypher language. Among them, the park's attributes include park ID, name, type and basic physical information, and the location's attributes include location ID, park to which it belongs, location type, multi-dimensional sensory feature vector and activity preference vector. The activity preference vector is obtained from the activity preference prediction model.

[0010] In one embodiment, the process of collecting multidimensional sensory environment data and spatial structure data from all locations in the park to construct a park location feature dataset includes: Acquire panoramic videos of all locations in the park, and extract visual feature data from the panoramic videos. The visual feature data includes data on various visual feature indicators. The olfactory type of each location is obtained, and one-heat encoding is performed on different olfactory types to obtain olfactory feature data; Audio is extracted from panoramic videos of various locations, and the audio of each location is classified and one-hot encoded using a trained CLAP model to obtain auditory feature data. Spatial structure information is obtained from panoramic video, and road slope values ​​are obtained based on the spatial structure information. The road slope values ​​of each location are sequentially encoded to obtain road slope feature data.

[0011] In one embodiment, the step of constructing an activity preference prediction model based on a park location feature dataset and a crowd activity preference dataset includes: training an XGBoost model based on the park location feature dataset and the crowd activity preference dataset to obtain the activity preference prediction model.

[0012] In one embodiment, the method further includes: training the TabNet deep learning model based on a knowledge graph to obtain a trained park location recommendation model.

[0013] Another aspect of this application provides an urban park location recommendation system based on crowd activity preferences, the system comprising: The information detection module is used to detect the information entered by the user in response to the park location recommendation instructions; The location recommendation module is used to obtain recommendation results based on the detection results of the information input by the user and a pre-trained park location recommendation model based on the knowledge graph. The recommendation results contain at least one location. The knowledge graph is constructed based on the park location feature dataset and the crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

[0014] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, performs the following steps: In response to park location recommendation instructions, the system detects the information entered by the user. Based on the detection results of the user input information, a recommendation result is obtained through a pre-trained park location recommendation model based on the knowledge graph. The recommendation result contains at least one location. The knowledge graph is constructed based on the park location feature dataset and the crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

[0015] The aforementioned method and system for recommending urban park locations based on user activity preferences can generate recommendations using a pre-trained park location recommendation model based on a knowledge graph, based on the detection results of user input information. The knowledge graph is constructed from a park location feature dataset and a user activity preference dataset. The park location recommendation model is trained using a deep learning model based on the knowledge graph. The park location feature dataset includes multi-dimensional sensory environment data and spatial structure data for all locations within the park, enabling a multi-dimensional consideration of the park environment and overcoming the limitations of existing technologies that rely solely on single sensory features for location evaluation, thus providing a more realistic reflection of the park environment. Furthermore, by integrating multi-dimensional sensory environment feature data and user activity preference data to construct a knowledge graph and combining it with a deep learning model to obtain the park location recommendation model, this model can identify the correlation between park environment features and user activity preferences, providing corresponding recommendations to users with different needs and achieving personalized park location recommendations. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating a method for recommending urban park locations based on population activity preferences in one embodiment. Figure 2 This is a flowchart illustrating the park location recommendation step in one embodiment; Figure 3 This is a flowchart illustrating the park location recommendation step in another embodiment; Figure 4 This is a flowchart illustrating the park location recommendation step in another embodiment; Figure 5 This is a block diagram of a city park venue recommendation system based on crowd activity preferences in one embodiment; Figure 6This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0018] The urban park location recommendation method based on population activity preferences provided in this application can be applied in the context of urban park information services and executed by a terminal providing the information service. The terminal can communicate with the server via a network. The knowledge graph and park location recommendation model can run on either the terminal or the server; the terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, and the server can be a standalone server or a server cluster consisting of multiple servers.

[0019] In one embodiment, such as Figure 1 As shown, a method for recommending urban park locations based on people's activity preferences is provided. Taking the application of this method to a terminal as an example, the method includes the following steps: Step 101: In response to the park venue recommendation instruction, detect the information entered by the user; In practice, users can issue park recommendation commands to the terminal through the terminal's interactive device, and at the same time input information as the basis for subsequent venue recommendations; Step 102: Based on the detection results of the user input information, a recommendation result is obtained through a trained park location recommendation model based on the knowledge graph. The recommendation result contains at least one location. The knowledge graph is constructed based on the park location feature dataset and the crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

[0020] Specifically, when it is detected that the user has not entered any information, a general recommendation result is output; the general recommendation result can be a recommendation result generated by the terminal for the user, or a recommendation result pre-generated and stored by the terminal. The general recommendation result can include at least one combination of activity and location.

[0021] When a user inputs individual attribute information and specifies the target activity type, a recommendation result is obtained based on the knowledge graph and a trained park venue recommendation model. This recommendation result should include at least one recommended venue.

[0022] When it is detected that a user has only entered individual user attribute information without specifying the target activity type, the recommendation result obtained by the pre-trained park venue recommendation model based on the knowledge graph should include at least one candidate activity and venue combination.

[0023] Therefore, the final output recommendation result can be either a combination of N activities and venues or N venues, where N is a positive integer.

[0024] In practice, the aforementioned deep learning model can be the TabNet model.

[0025] The aforementioned method for recommending urban park locations based on crowd activity preferences can respond to park location recommendation commands by detecting user input information. Then, based on the detection results of the user input information, a recommendation result is obtained using a pre-trained park location recommendation model based on a knowledge graph. The knowledge graph is constructed based on a park location feature dataset and a crowd activity preference dataset. The park location recommendation model is trained using a deep learning model based on the knowledge graph. The park location feature dataset includes multi-dimensional sensory environment data and spatial structure data for all locations within the park, enabling a multi-dimensional consideration of the park environment and overcoming the limitations of existing technologies that rely solely on single sensory features for location evaluation, thus providing a more realistic reflection of the park environment. Furthermore, by integrating multi-dimensional sensory environment feature data and crowd activity preference data to construct a knowledge graph and combining it with a deep learning model to obtain the park location recommendation model, this model can identify the correlation between park environment features and crowd activity preferences, outputting corresponding recommendation results to users with different needs, and achieving personalized park location recommendations.

[0026] In one embodiment, such as Figure 2 As shown, step 102 includes: Step 1021a: When it is detected that the user has not entered any information, obtain the preset general user feature vector; Step 1021b: Based on the general user feature vector and all possible combinations of activities and places in the knowledge graph, obtain the score value of each combination of activities and places through the trained park place recommendation model; Step 1021c: Output the top N activity and location combinations with the highest scores as general recommendation results.

[0027] Among them, the general user feature vector can be generated by the terminal based on historical user data; the park venue recommendation model can adopt the TabNet model.

[0028] Specifically, when the terminal detects that the user has not provided any information, the default recommendation method is adopted, and the pre-generated general user feature vector is automatically called as the feature vector of the current user. Then, the general user feature vector and the feature vector of all possible activity and place combinations in the knowledge graph are input into the park place recommendation model to predict the score value of each activity and place combination. Finally, the top N activity and place combinations with the highest scores are output as recommendations, that is, the general recommendation results.

[0029] In practice, in order to provide users with more choices without making it difficult for them to choose, the value of N can be set to a range of 2 to 10, preferably 3, that is, to provide users with 3 recommended items to choose from.

[0030] In this embodiment, for new users who have not entered any information, a preset general user feature vector can be used as the input of the park venue recommendation model to achieve general recommendations for users. Personalized recommendation services can be obtained with only a brief interaction.

[0031] In one embodiment, such as Figure 3 As shown, step 102 includes: Step 1022a: When the user inputs individual attribute information and specifies the target activity type, the location that matches the target activity type is obtained from the knowledge graph to obtain a candidate location set; Step 1022b: Based on the user's individual attribute information, target activity type, and candidate location set, predict the score using the trained park location recommendation model to obtain the user's willingness score for the target activity in each location; Step 1022c: Output the top N locations with the highest willingness scores as the recommendation results.

[0032] Specifically, the inputs to the park location recommendation model are user feature vectors generated based on individual user attribute information and location feature vectors generated based on the attributes of each candidate location.

[0033] Specifically, when the terminal detects that a user has entered their individual attribute information and specified a target activity type, it determines that the user belongs to the "specific activity type" user. The terminal will retrieve a set of candidate locations that match the target activity type from the knowledge graph and generate a user feature vector based on the user's individual attribute information. Subsequently, the user feature vector, the target activity type, and the location feature vectors of each candidate location are input into a trained park location recommendation model to predict the user's willingness score for the target activity at each candidate location. Finally, the top N locations with the highest willingness scores are output as recommendations, i.e., the recommendation results.

[0034] In one embodiment, such as Figure 4 As shown, step 102 includes: Step 1023a: When it is detected that the user only inputs the user's individual attribute information without specifying the target activity type, the similar historical user group is identified in the knowledge graph based on the user's individual attribute information, and the candidate activity and place combination of all preferences of the similar historical user group is obtained. Step 1023b: Based on the user's individual attribute information and each candidate activity and venue combination, obtain the user's preference score for each candidate activity and venue combination through the trained park venue recommendation model; Step 1023c: Output the top N candidate activity and location combinations with the highest preference scores as the recommendation results.

[0035] Specifically, when the terminal detects that a user has entered individual attribute information but has not specified a specific target activity type, it determines that the user is an "activity exploration" user. Then, a user feature vector is generated based on the user's individual attribute information. Based on this user feature vector, the activity preference information of similar historical user groups is obtained from the knowledge graph. Based on the activity preference information, the preferred activities of similar historical users and the places that match the preferred activities are determined, resulting in all preferred activity and place combinations of similar historical user groups. A user feature vector is generated based on the user's individual attribute information, and a combination feature vector of candidate activities and places is generated based on each candidate activity and place combination. The user feature vector and the feature vector of each candidate activity and venue combination are input into the trained park venue recommendation model to obtain the user's preference rating for each candidate activity and venue combination; finally, the top N candidate activity and venue combinations with the highest scores are output as the recommendation results.

[0036] This invention combines knowledge graphs with a park venue recommendation model to provide personalized recommendations for park venues to users with different needs. It also solves the problem of recommendation operability for new users when historical data is lacking, enabling personalized recommendation services in park scenarios and improving the service quality and user experience of park venues.

[0037] In one embodiment, prior to step 101, the method further includes: Multidimensional sensory environment data and spatial structure data of all locations in the park were collected to construct a park location feature dataset. Based on the park location feature dataset, all locations were clustered using the K-means clustering method to obtain multiple typical location types. As shown in Table 1, the multidimensional sensory environment data includes at least one of visual feature data, olfactory feature data, and auditory feature data, and the spatial structure data includes road slope feature data. In specific implementation, when clustering all locations using the K-means clustering method, the elbow method and silhouette coefficient can be used to determine the optimal number of clusters and obtain multiple typical location types.

[0038] Based on the preset park activity types, the individual attribute information of multiple visitors and the activity preference information of each visitor for different typical venue types are obtained to construct a population activity preference dataset. In practice, based on existing literature and preliminary surveys, park activities can be divided into four major categories, including 11 subcategories and 60 minor categories, covering sports and fitness, culture and art, themed entertainment, and leisure tourism, as shown in Table 2. Then, individual attribute information and activity preference information in typical park locations are collected through questionnaires to construct a user characteristic dataset. To cover the effects of various factors on the activities of different groups of people in park activities, this embodiment constructs visitor individual attribute information indicators based on age, gender, education level, professional background, economic status, park activity background, and park activity frequency (Table 3).

[0039] When collecting activity preference information, multiple typical venue types obtained from clustering can be combined, and tour routes containing each typical venue can be selected. After recruiting subjects to visit the routes in person, they can review the environment of each venue through a panoramic cloud tour platform and focus on the multiple activities they often engage in in the park. They can then use a Likert five-point scale to rate their willingness to participate in activities in each venue (1 for completely unwilling and 5 for very willing) to fully understand visitors' activity preferences under different venue characteristics.

[0040] Based on a dataset of park features and a dataset of people’s activity preferences, an activity preference prediction model is constructed, and the SHAP method is used to interpret the activity preference prediction model. Among them, the terminal can generate activity preference prediction scores for different activities for all venues in the park through the activity preference prediction model, thereby obtaining the activity preference vector for each venue; In practice, the activity preference prediction model can be the XGBoost model. The terminal trains the XGBoost model based on the park location feature dataset and the crowd activity preference dataset to obtain the activity preference prediction model. The XGBoost model learns the relationship between user individual attributes, activity preferences and location environmental features, and can generate activity preference prediction scores for parks that users have not rated based on multi-dimensional sensory environmental features.

[0041] Furthermore, the SHAP method can quantify the contribution of each variable to the prediction results of the activity preference prediction model, identify the importance of variables, provide a basis for recommending places within the park, and thus improve the interpretability of the model.

[0042] Using users, parks, and places as entities, a knowledge graph is constructed using the Neo4j graph database and the Cypher language. Among them, the park's attributes include park ID, name, type and basic physical information, and the location's attributes include location ID, park to which it belongs, location type, multi-dimensional sensory feature vector and activity preference vector. The activity preference vector is obtained from the activity preference prediction model.

[0043] In practice, the specific process of constructing a knowledge graph is as follows: First, parks and places are considered as entities; among them, the park entity represents a specific urban park, while the place entity represents the micro-space units within the park, such as entrance plazas, equipment areas, and understory spaces.

[0044] Then, the attributes of the park entity are configured to include park ID, name, type, and basic physical information (such as area, address, etc.), while the attributes of the place entity include place ID, park to which it belongs, place type, multi-dimensional sensory feature vector, activity preference vector, etc.

[0045] Finally, Neo4j graph database was used to complete entity, relation and attribute modeling, and Cypher language was used to implement graph structure creation, attribute update and query functions.

[0046] The above embodiments integrate user individual attributes, activity preferences, and location feature information through knowledge graphs to form a semantic association structure of "user-activity-location," providing a reliable data foundation for subsequent park location recommendations and making the recommendation results more reliable.

[0047] In one embodiment, multidimensional sensory environment data and spatial structure data of all locations in the park are collected to construct a park location feature dataset, including: Acquire panoramic videos of all locations in the park, and extract visual feature data from the panoramic videos. The visual feature data includes data on various visual feature indicators. Specifically, panoramic cameras were used to capture images of all locations in the park, resulting in panoramic videos. Multiple images were extracted from the panoramic videos at time intervals. Then, a fully convolutional network (FCN) model trained on the ADE20K dataset and OpenCV technology were used to process the images. Object detection was performed on the images based on a trained PP-YOLOE model, extracting data for various visual feature indicators, i.e., visual feature data. In specific implementation, visual feature indicators may include green visibility rate, sky visibility, color temperature, and the richness of cultural activity facilities, etc. (Tables 1 and 4).

[0048] To quantify the impact of the visual environment of parks on people's activity preferences, the above steps process park images using semantic segmentation, OpenCV technology, and object detection to obtain various visual feature indicators.

[0049] The olfactory type of each location is obtained, and one-heat encoding is performed on different olfactory types to obtain olfactory feature data; In practice, the smells of various places in the park can be recorded through field surveys and classified into six olfactory types: "soil and moisture smell", "stinky smell", "floral and fruity smell", "grass and tree smell", "food smell" and "no obvious smell". Then, the above olfactory types are uniquely encoded to obtain olfactory characteristic data.

[0050] Audio is extracted from panoramic videos of various locations, and the audio of each location is classified and one-hot encoded using a trained CLAP model to obtain auditory feature data. In practice, audio is extracted from panoramic videos of various locations. The CLAP model, pre-trained on the ESC-50 dataset, classifies the audio of each location into four types: geological sounds, animal sounds, human sounds, and traffic sounds. One-hot encoding is then performed on these auditory types to obtain auditory feature data. Spatial structure information is obtained from panoramic video, and road slope values ​​are obtained based on the spatial structure information. The road slope values ​​of each location are sequentially encoded to obtain road slope feature data.

[0051] Spatial structure information can be in GPX (GPS Exchange Format), which is a standardized GPS data exchange format built using XML language and is mainly used to store geospatial information.

[0052] Different sensory perceptions can influence people's activity choices in parks. To quantify the impact of multi-dimensional sensory characteristics of parks on people's activity preferences, the above embodiments integrate multi-dimensional sensory environmental data to construct a multi-dimensional and quantifiable index system of park features, providing a more reliable data foundation for park evaluation.

[0053] In one embodiment, the method further includes: training the TabNet deep learning model based on a knowledge graph to obtain a trained park location recommendation model.

[0054] This embodiment uses the TabNet deep learning model as the park location recommendation model. The TabNet deep learning model has good interpretability, can fuse user feature vectors and location feature vectors for modeling, and uses a sparse attention mechanism to weight and filter input features to identify the most important feature vectors in each decision, thereby achieving accurate matching and recommendation between users, activities and locations.

[0055] The specific construction process of the park location recommendation model is as follows: (1) Define input features: User feature vector This represents the individual attribute information of the i-th user, including age, gender, education level, professional background, economic status, park activity background and frequency of park activities, etc. (see Table 3). Activity Preference Vector This represents the predicted scores of activity preferences for j activities at different locations; Location feature vector Indicates park location The multi-dimensional sensory environmental characteristics include visual, acoustic, olfactory, and spatial structure information (see Table 1).

[0056] The above three types of feature vectors are fused to form a comprehensive vector. , which serve as input features for the TabNet model.

[0057] (2) Sparse attention feature selection mechanism: To achieve key feature selection, in the t-th decision step, the TabNet model automatically selects the most representative feature subset through a sparse attention mechanism and generates a mask matrix. .

[0058]

[0059] in, Select a mask matrix for the features in the t-th decision layer; It is a linear feature transformation function; This is the output feature vector from the previous step. The function sparsemax outputs a sparse weight distribution, making some feature weights zero, thus achieving feature selection; the selected feature subset is input into the feature transformer for nonlinear transformation to obtain the decision features for this step.

[0060] (3) Output and loss function: The decision features of all decision steps are aggregated to obtain the final prediction score:

[0061] in, It is an aggregate function. Indicates the first The decision feature vectors generated by the feature transformer in each decision layer This represents the predicted preference rating of user i for activity j in location k.

[0062] Loss function:

[0063] Where N is the total number of samples, To predict preference scores, For the actual score, the first term is the mean squared error (MSE) between the predicted score and the actual score; the second term is the sparsity regularization term, which is used to constrain the sparsity of the attention mask. This is the regularization coefficient, used to balance prediction accuracy and feature selection sparsity.

[0064] In one embodiment, constructing an activity preference prediction model based on a park location feature dataset and a crowd activity preference dataset includes: training an XGBoost model based on the park location feature dataset and the crowd activity preference dataset to obtain the activity preference prediction model.

[0065] This embodiment uses the XGBoost model to train an activity preference prediction model, which has better predictive performance than the linear regression model. It helps to more accurately characterize the intensity of users' willingness to participate in specific activities in different park environments, thereby improving the reliability of the unrated venue preference prediction and the final recommendation results.

[0066] It should be understood that, although Figure 1-4 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1-4 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0067] Furthermore, the items listed in Tables 1-4 are merely some examples of this application, not all examples, and are only for the purpose of illustrating and describing the technical solutions of this application. The park site characteristic indicators, activity types, visitor individual attribute information, visual characteristic indicators, etc. in this application are not limited to the specific indicators or types in the tables. Therefore, Tables 1-4 should not be construed as limitations on this application.

[0068] In practice, some of the items may not be used, or all other indicators not listed in the table but which can be obtained by a person skilled in the art without creative effort may be used, all of which fall within the scope of protection of this application.

[0069] The following are Tables 1-4 of this application:

[0070]

[0071]

[0072]

[0073] In one embodiment, such as Figure 5 As shown, a city park venue recommendation system based on crowd activity preferences is provided. The system includes: Information detection module 201 is used to detect user-inputted information in response to park location recommendation instructions; The location recommendation module 202 is used to obtain recommendation results based on the detection results of the information input by the user and a trained park location recommendation model based on the knowledge graph. The recommendation results contain at least one location. The knowledge graph is constructed based on the park location feature dataset and the crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

[0074] In one embodiment, the location recommendation module 202 includes a general recommendation unit, which is specifically used to: when it is detected that the user has not entered any information, obtain a preset general user feature vector; based on the general user feature vector and all possible activity and location combinations in the knowledge graph, obtain a score value for each activity and location combination through a trained park location recommendation model; and output the top N activity and location combinations with the highest scores as the general recommendation results.

[0075] In one embodiment, the location recommendation module 202 includes an activity-specific user recommendation unit, which is specifically used to: when a user inputs individual attribute information and specifies a target activity type, retrieve locations that match the target activity type from a knowledge graph to obtain a candidate location set; based on the user's individual attribute information, the target activity type, and the candidate location set, perform prediction scoring using a trained park location recommendation model to obtain a score value for the user's willingness to engage in the target activity at each location; and output the top N locations with the highest willingness scores as the recommendation result.

[0076] In one embodiment, the location recommendation module 202 includes an activity exploration-based user recommendation unit, which is specifically used to: when it is detected that a user only inputs individual user attribute information without specifying the target activity type, determine similar historical user groups in the knowledge graph based on the individual user attribute information, and obtain candidate activity and location combinations with all preferences of similar historical user groups; according to the individual user attribute information and each candidate activity and location combination, obtain the user's preference score for each candidate activity and location combination through a trained park location recommendation model; and output the top N candidate activity and location combinations with the highest preference scores as the recommendation results.

[0077] In one embodiment, the system further includes a knowledge graph creation module, which is specifically used for: The park location feature data collection unit is used to collect multi-dimensional sensory environment data and spatial structure data of all locations in the park, construct a park location feature dataset, and cluster all locations using the K-means clustering method based on the park location feature dataset to obtain multiple typical location types; The crowd activity preference data collection unit is used to acquire individual attribute information of multiple visitors and activity preference information of each visitor for different typical venue types based on preset park activity types, and to construct a crowd activity preference dataset. The activity preference prediction model building unit is used to construct an activity preference prediction model based on a park location feature dataset and a crowd activity preference dataset, and to interpret the activity preference prediction model using the SHAP method. The knowledge graph creation unit is used to construct knowledge graphs using the Neo4j graph database and Cypher language, with users, parks, and places as entities. Among them, the park's attributes include park ID, name, type and basic physical information, and the location's attributes include location ID, park to which it belongs, location type, multi-dimensional sensory feature vector and activity preference vector. The activity preference vector is obtained from the activity preference prediction model.

[0078] In one embodiment, the park location feature data acquisition unit is specifically used for: acquiring panoramic videos of all locations in the park; extracting visual feature data from the panoramic videos, the visual feature data including data of various visual feature indicators; acquiring the olfactory type of each location; performing one-hot encoding on different olfactory types to obtain olfactory feature data; separating audio from the panoramic videos of each location; classifying and one-hot encoding the audio of each location using a trained CLAP model to obtain auditory feature data; acquiring spatial structure information based on the panoramic videos; obtaining road slope values ​​based on the spatial structure information; and sequentially encoding the road slope values ​​of each location to obtain road slope feature data.

[0079] In one embodiment, the activity preference prediction model building unit is specifically used to: train the XGBoost model based on the park location feature dataset and the crowd activity preference dataset to obtain the activity preference prediction model.

[0080] In one embodiment, the system further includes a park venue recommendation model training module, which is used to train the TabNet deep learning model based on a knowledge graph to obtain a trained park venue recommendation model.

[0081] Specific limitations regarding the urban park location recommendation system based on crowd activity preferences can be found in the limitations of the urban park location recommendation method based on crowd activity preferences described above, and will not be repeated here. Each module in the aforementioned urban park location recommendation device based on crowd activity preferences can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0082] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements a method for recommending urban park locations based on population activity preferences. The display screen can be an LCD screen or an e-ink screen. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0083] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0084] In one embodiment, a computer device is provided, including 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 perform the following steps: in response to a park location recommendation instruction, detecting information input by a user; Based on the detection results of the user input information, a recommendation result is obtained through a pre-trained park location recommendation model based on the knowledge graph. The recommendation result contains at least one location. The knowledge graph is constructed based on the park location feature dataset and the crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

[0085] In one embodiment, when the processor executes the computer program, it further performs the following steps: when it detects that the user has not entered any information, it obtains a preset general user feature vector; based on the general user feature vector and all possible activity and location combinations in the knowledge graph, it obtains a score value for each activity and location combination through a trained park location recommendation model; and it outputs the top N activity and location combinations with the highest scores as the general recommendation result.

[0086] In one embodiment, when the processor executes the computer program, it further performs the following steps: when it detects that the user inputs individual attribute information and specifies the target activity type, it retrieves places that match the target activity type from the knowledge graph to obtain a candidate place set; based on the user's individual attribute information, the target activity type, and the candidate place set, it performs prediction scoring through a trained park place recommendation model to obtain the user's willingness score for the target activity in each place; and it outputs the top N places with the highest willingness scores as the recommendation result.

[0087] In one embodiment, when the processor executes the computer program, it further performs the following steps: when it detects that the user only inputs individual user attribute information without specifying the target activity type, it determines similar historical user groups in the knowledge graph based on the individual user attribute information and obtains candidate activity and place combinations with all preferences of similar historical user groups; based on the individual user attribute information and each candidate activity and place combination, it obtains the user's preference score for each candidate activity and place combination through a trained park place recommendation model; and outputs the top N candidate activity and place combinations with the highest preference scores as the recommendation result.

[0088] In one embodiment, when the processor executes the computer program, it further performs the following steps: collecting multidimensional sensory environment data and spatial structure data of all locations in the park, constructing a park location feature dataset, and clustering all locations using the K-means clustering method based on the park location feature dataset to obtain multiple typical location types; based on preset park activity types, acquiring individual attribute information of multiple visitors and activity preference information of each visitor for different typical location types, and constructing a crowd activity preference dataset; based on the park location feature dataset and the crowd activity preference dataset, constructing an activity preference prediction model, and interpreting the activity preference prediction model using the SHAP method; using users, parks, and locations as entities, constructing a knowledge graph using the Neo4j graph database and Cypher language; wherein, the park's attributes include park ID, name, type, and basic physical information, and the location's attributes include location ID, affiliated park, location type, multidimensional sensory feature vector, and activity preference vector, and the activity preference vector is obtained from the activity preference prediction model.

[0089] In one embodiment, when the processor executes the computer program, it further performs the following steps: acquiring panoramic videos of all locations in the park, extracting visual feature data from the panoramic videos, the visual feature data including data of various visual feature indicators; acquiring the olfactory type of each location, performing one-hot encoding on different olfactory types to obtain olfactory feature data; separating audio from the panoramic videos of each location, classifying and one-hot encoding the audio of each location using a trained CLAP model to obtain auditory feature data; acquiring spatial structure information based on the panoramic videos, obtaining road slope values ​​based on the spatial structure information, and sequentially encoding the road slope values ​​of each location to obtain road slope feature data.

[0090] In one embodiment, the processor, when executing the computer program, also performs the following steps: training the XGBoost model based on a park location feature dataset and a crowd activity preference dataset to obtain an activity preference prediction model.

[0091] In one embodiment, when the processor executes the computer program, it also performs the following steps: training the TabNet deep learning model based on the knowledge graph to obtain a trained park location recommendation model.

[0092] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0093] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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.

[0094] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for recommending urban park locations based on people's activity preferences, characterized in that, The method includes: In response to park location recommendation instructions, the system detects the information entered by the user. Based on the detection results of the information input by the user, a recommendation result is obtained through a trained park location recommendation model based on a knowledge graph, and the recommendation result contains at least one location; The knowledge graph is constructed based on a park location feature dataset and a crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

2. The method according to claim 1, characterized in that, The step of obtaining recommendation results based on the detection results of the user input information and using a trained park location recommendation model based on a knowledge graph includes: When it is detected that the user has not entered any information, a preset general user feature vector is obtained; Based on the general user feature vector and all possible activity and location combinations in the knowledge graph, a score value for each activity and location combination is obtained through the trained park location recommendation model; The top N activity and venue combinations with the highest ratings are output as general recommendations.

3. The method according to claim 2, characterized in that, The step of obtaining recommendation results based on the detection results of the user input information and using a trained park location recommendation model based on a knowledge graph includes: When the user inputs individual attribute information and specifies a target activity type, the location that matches the target activity type is obtained from the knowledge graph to obtain a candidate location set; Based on the user's individual attribute information, the target activity type, and the candidate location set, the trained park location recommendation model is used to predict and score the user's willingness to engage in the target activity in each location, thereby obtaining a score value for the user's willingness to engage in the target activity in each location. The top N locations with the highest willingness scores are output as recommendations.

4. The method according to claim 3, characterized in that, The step of obtaining recommendation results based on the detection results of the user input information and using a trained park location recommendation model based on a knowledge graph includes: When it is detected that the user only inputs individual user attribute information without specifying the target activity type, similar historical user groups are identified in the knowledge graph based on the individual user attribute information, and candidate activity and location combinations of all preferences of the similar historical user groups are obtained; Based on the user's individual attribute information and each of the candidate activities and venue combinations, the user's preference score for each candidate activity and venue combination is obtained through a trained park venue recommendation model; The top N candidate activity and location combinations with the highest preference scores are output as recommendations.

5. The method according to any one of claims 1 to 4, characterized in that, Before detecting user-inputted information in response to park location recommendation instructions, the method further includes: Multidimensional sensory environment data and spatial structure data of all locations in the park are collected to construct the park location feature dataset. Based on the park location feature dataset, all locations are clustered using the K-means clustering method to obtain multiple typical location types. Based on the preset park activity types, the individual attribute information of multiple visitors and the activity preference information of each visitor for different typical venue types are obtained to construct the population activity preference dataset; Based on the park location feature dataset and the crowd activity preference dataset, an activity preference prediction model is constructed, and the SHAP method is used to interpret the activity preference prediction model. Using the user, the park, and the location as entities, the knowledge graph is constructed using the Neo4j graph database and the Cypher language. The park's attributes include park ID, name, type, and basic physical information. The location's attributes include location ID, affiliated park, location type, multi-dimensional sensory feature vector, and activity preference vector. The activity preference vector is obtained from the activity preference prediction model.

6. The method according to claim 5, characterized in that, The process involves collecting multi-dimensional sensory environmental data and spatial structure data from all locations within the park to construct a park location feature dataset, including: Acquire panoramic videos of all locations in the park, and extract visual feature data from the panoramic videos, the visual feature data including data of various visual feature indicators; The olfactory type of each location is obtained, and the different olfactory types are encoded using one-hot encoding to obtain the olfactory feature data; Audio is extracted from panoramic videos of each location, and the audio of each location is classified and one-hot encoded using a trained CLAP model to obtain the auditory feature data. Based on the panoramic video, spatial structure information is obtained, and road surface slope values ​​are obtained according to the spatial structure information. The road surface slope values ​​of each location are sequentially encoded to obtain the road surface slope feature data.

7. The method according to claim 5, characterized in that, The step of constructing an activity preference prediction model based on the park location feature dataset and the crowd activity preference dataset includes: training an XGBoost model based on the park location feature dataset and the crowd activity preference dataset to obtain the activity preference prediction model.

8. The method according to claim 5, characterized in that, The method further includes: training the TabNet deep learning model based on the knowledge graph to obtain the trained park location recommendation model.

9. A city park location recommendation system based on people's activity preferences, characterized in that, The system includes: The information detection module is used to detect the information entered by the user in response to the park location recommendation instructions; The location recommendation module is used to obtain recommendation results based on the detection results of the information input by the user and a trained park location recommendation model based on a knowledge graph. The recommendation results include at least one location. The knowledge graph is constructed based on a park location feature dataset and a crowd activity preference dataset; the park location recommendation model is obtained by training a deep learning model based on the knowledge graph; the park location feature dataset includes multi-dimensional sensory environment data and spatial structure data of all locations in the park.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.