Scenic spot recommendation method and system based on community perception and adaptive random walk
By constructing a user tourist attraction recommendation network based on community sensing and adaptive random walk methods, using multi-label propagation and Skip-Gram model, it solves the problem of insufficient high-order relationship modeling in traditional recommendation methods and improves the accuracy of attraction recommendation. sex and user experience.
Patent Information
- Application Number
- CN202210352673.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2024-10-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional attraction recommendation methods fail to effectively model the high-order relationships between users, resulting in large errors in recommendations and affecting user experience.
Using methods based on community sensing and adaptive random walks, we build user tourist attraction recommendation networks, use multi-label propagation methods to generate node community membership information, combine with the Skip-Gram model to train user node representation vectors, and use the C-means algorithm Perform clustering, accurately model user community relationships, and recommend scenic spots.
It improves the accuracy and user experience of attraction recommendation. Through adaptive random walk strategy and community sensing technology, it accurately captures users' high-order relationships and enhances the accuracy of recommendations.
Smart Images

Figure CN114707066B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data analysis, and in particular to a method and system for recommending scenic spots based on community perception and adaptive random walking. Background Art
[0002] With the development of the times and the advancement of science and technology, many of people's daily lives have gradually shifted from offline to online. Online tourist attraction recommendation is a typical example. Online tourist attraction recommendation connects each user through the Internet based on the user's travel experience and evaluation, and recommends the most likely attractions to the user. However, with the expansion of the network scale and the rapid development of the tourism industry, the tourist attraction recommendation network has become more complex. How to make accurate tourist attraction recommendations to users so that each user can choose their favorite attractions with a greater probability is very meaningful for user tourist attraction recommendations. However, the traditional tourist attraction recommendation method does not model the high-order relationships between users more accurately, resulting in large errors in the traditional tourist attraction recommendation, which affects the user experience. Therefore, the present invention accurately models the high-order relationships between users, improves the accuracy of tourist attraction recommendations, and thus improves the user experience, which has certain value. Summary of the invention
[0003] The purpose of the present invention is to provide a method and system for recommending attractions based on community perception and adaptive random walk, which models the user tourist attraction recommendation network in a more refined way, performs targeted random walk design according to the characteristics of nodes with different degrees during the random walk process, and effectively improves the accuracy of attraction recommendations.
[0004] To achieve the above object, the technical solution of the present invention is: a method for recommending scenic spots based on community perception and adaptive random walk, comprising the following steps:
[0005] Step S1, constructing a user tourist attraction recommendation network based on user characteristics, user travel records and evaluation of tourist attractions;
[0006] Step S2: Based on the user tourist attraction recommendation network, a random walk parameter adaptive calculation strategy based on node degree centrality is used to determine subsequent random walk parameter values;
[0007] Step S3: Based on the user tourist attraction recommendation network, a multi-label propagation method is used to generate node community membership information, and the information is converted into a random walk transition probability matrix; for the high-degree nodes in the user tourist attraction recommendation network, a random walk strategy based on community information guidance is executed according to the random walk transition probability matrix;
[0008] Step S4: For low-degree nodes in the user tourist attraction recommendation network, a heuristic random walk strategy based on a restart mechanism is executed;
[0009] Step S5: Based on the node sequence obtained by random walk, the Skip-Gram model is trained to obtain the representation vector of each user node in the network;
[0010] Step S6: Based on the user node representation vectors obtained through Skip-Gram model training, the C-means algorithm is first used to cluster the user node representation vectors to obtain a set of users with close internal connections. For users who want to recommend attractions, several users who are closest to them in the representation vector space are selected from their communities, and several of their favorite attractions are selected as recommended attractions based on their evaluations of tourist attractions.
[0011] In one embodiment of the present invention, step S2 is specifically as follows:
[0012] Step S21: For the user tourist attraction recommendation network obtained in step S1, calculate the centrality of each user node, and arrange each node in descending order of centrality to generate an ordered node centrality sequence S c ;
[0013] Step S22: From the descending sequence S of the node centrality c Select the first α proportion of nodes as the starting nodes of the random walk based on the node degree centrality, and construct the starting node set S start ;
[0014] Step S23: start Each node in is used as the community center, and two different types of fixed walking strategies are designed to construct different node path sets. The maximum community radius and the minimum community radius with the corresponding node as the community center are estimated. The node path sequence sets obtained by the first type and the second type of walking strategies are marked as S respectively. p1 and S p2 ;
[0015] Step S24: After generating the path sets corresponding to the two types of walking by the two different types of fixed walking strategies in step S23, calculate the mean value r1 of the walking path length according to the first type of walking strategy and the mean value r2 of the walking path length according to the second type of walking strategy, and then approximately calculate the average maximum community radius r in the network. max and the average minimum community radius r min as follows:
[0016]
[0017]
[0018] r max =max(r1,r2)
[0019] r min =min(r1,r2)
[0020] Among them, len(p) is the length of the random walk path p, and n is the total number of nodes in the network.
[0021] Step S25: Based on the average maximum community radius and the average minimum community radius in the network obtained in step S24, combined with the meanings of the random walk length walk_length, the window length window_size, and the number of random walks of each node number_walks, the adaptive calculation is as follows:
[0022]
[0023]
[0024] number_walks(u)=min(d(u),num max )
[0025] Among them, d(u) is the degree of node u, num max The upper limit of the number of roaming times is set manually in advance.
[0026] In one embodiment of the present invention, step S23 is specifically as follows: two different types of fixed wandering strategies have different node selection bases when the node jumps. Assume that the current node of the wandering is u. The first type of wandering strategy selects the neighbor node with the smallest absolute value of the centrality difference with node u as the next hop node among the neighbor nodes with a centrality smaller than node u, that is, it moves along the direction in which the centrality gradient decreases the least each time; on the contrary, the second type of wandering strategy selects the neighbor node with the largest absolute value of the centrality difference with node u as the next hop node among the neighbor nodes with a centrality smaller than node u, that is, it moves along the direction in which the centrality gradient decreases the most each time; both types of wandering select a fixed next hop node according to their strategies until the centrality gradient can no longer be reduced and then stops, that is, the centralities of the node neighbors are greater than or equal to the current node.
[0027] In one embodiment of the present invention, step S3 uses the graph multi-label propagation algorithm BMLPA to calculate whether node u belongs to community c. k The conditional probability p(u|c k ), based on this conditional probability, the transition probability of node u to its neighbor v is calculated as follows:
[0028]
[0029] Among them, C is the public community label of nodes u and v obtained by the multi-label propagation algorithm BMLPA; for the high-degree nodes in the user tourist attraction recommendation network, the next hop node is selected by probability according to the transition probability matrix for random walk.
[0030] In one embodiment of the present invention, the heuristic random walk strategy based on the restart mechanism in step S4 is specifically:
[0031] Step S41, select a low-degree node u as a source node to start a random walk process;
[0032] Step S42: After randomly walking forward from the low-degree node u for t steps, the random walk is restarted with the next-hop node v of the low-degree node u in the currently generated node sequence as the source node;
[0033] Step S43, repeat step S42 until the total length of all obtained sequences reaches the determined random walk length walk_length;
[0034] Step S44: connect all short sequences to obtain a final complete random walk path starting from the low-degree node u.
[0035] In one embodiment of the present invention, step S5 is specifically implemented as follows:
[0036] The Skip-Gram model assumes that all nodes in the network are independent of each other, and uses the probability of multiplication between nodes to approximate the joint probability of node co-occurrence, with maximizing this probability as the optimization goal, as shown in the following formula:
[0037]
[0038] Where w is the size of the window, f(v i )∈R d For node v i The d-dimensional center vector of i-w , ..., v i+w}\v i is the random walk sequence with node v i The window centered on node v does not include i Considering the complexity of probability calculation, negative sampling technology is introduced to speed up the Skip-Gram model training process and stochastic gradient descent SGD is used to optimize the model.
[0039] In one embodiment of the present invention, step S6 is specifically implemented as follows:
[0040] The C-means algorithm is used to cluster the representation vectors of user nodes. The cost function is minimized through iterative optimization to obtain closely connected user clusters. The optimization function is as follows:
[0041]
[0042] where u i 、u j is the center representation vector in the user cluster C; for the C-Means clustering algorithm, by specifying the number of communities k, the membership matrix U of the node in k communities is obtained, and its element value u in the i-th row and j-th column is ij Represents node v i To the community j The membership probability of v is then generated by specifying a community threshold δ to generate the community set for each node. i For the community j The membership degree u ij ≥δ, then the node v i Assigned to community c j If node v i If the membership of all communities is less than δ, then the node will be treated as an isolated node and included in an isolated community, whose members only include node v i ;
[0043] After obtaining each user community set through iterative optimization, for the user who wants to recommend attractions, several users closest to him are selected from his community cluster, and the tourist attractions most loved by these users are used as recommended attractions.
[0044] The present invention also provides a scenic spot recommendation system based on community perception and adaptive random walk, including a user tourist attraction recommendation network construction module, a random walk parameter adaptive calculation module, a random walk module, a node representation vector optimization module, a clustering and scenic spot recommendation module,
[0045] The user tourist attraction recommendation network construction module starts from the user who needs to make tourist attraction recommendations and constructs a user tourist attraction recommendation network based on the interaction records and personal characteristics of the user with other users;
[0046] The random walk parameter adaptive calculation module performs a random walk parameter adaptive calculation strategy based on node degree centrality to determine appropriate subsequent random walk parameter values based on the user tourist attraction recommendation network constructed by the user tourist attraction recommendation network construction module;
[0047] The random walk module generates node community membership information based on the user tourist attraction recommendation network obtained by the user tourist attraction recommendation network construction module using a multi-label propagation method, and converts it into a random walk transition probability matrix; for high-degree nodes in the user tourist attraction recommendation network, a random walk strategy based on community information guidance is executed according to the transition probability matrix; for low-degree nodes in the user tourist attraction recommendation network, a heuristic random walk strategy based on a restart mechanism is executed;
[0048] The node representation vector optimization module uses the node sequence obtained by random walk as the input of Skip-Gram model to train and obtain the representation vector of each user node in the network;
[0049] The clustering and scenic spot recommendation module, based on the node representation vector obtained by the node representation vector optimization module, first uses a C-means algorithm to cluster the user node vectors to obtain multiple closely connected user groups, and for the user to whom scenic spots are to be recommended, selects several users with the closest vector distance from their user group, and selects several of their favorite tourist attractions as their recommended attractions.
[0050] In one embodiment of the present invention, the random walk module specifically: designs targeted community-aware random walk strategies according to the respective characteristics of high-degree and low-degree nodes; the random walk strategy based on community membership can accurately capture the community center characteristics of high-degree nodes; the random walk based on heuristic strategy helps to clearly capture the community boundary characteristics of low-degree nodes.
[0051] In one embodiment of the present invention, the clustering and scenic spot recommendation module specifically: clusters similar users together according to user characteristics, historical travel records and travel ratings. For users who need to recommend tourist attractions, first find the cluster to which they belong, then find the user with the closest vector distance, and find several scenic spots with the highest ratings from the set of scenic spot ratings they have visited as recommended attractions.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1. The present invention accurately models the high-order relationships between users, thereby improving the accuracy of scenic spot recommendations;
[0054] 2. The difficulty of determining the random walk parameters of the present invention is solved by setting an adaptive strategy based on the meaning of each random walk parameter, which improves the convenience of using the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0056] The technical solution of the present invention is described in detail below in conjunction with the accompanying drawings.
[0057] The present invention provides a method for recommending scenic spots based on community perception and adaptive random walking, comprising the following steps:
[0058] Step S1, constructing a user tourist attraction recommendation network based on user characteristics, user travel records and evaluation of tourist attractions;
[0059] Step S2: Based on the user tourist attraction recommendation network, a random walk parameter adaptive calculation strategy based on node degree centrality is used to determine subsequent random walk parameter values;
[0060] Step S3: Based on the user tourist attraction recommendation network, a multi-label propagation method is used to generate node community membership information, and the information is converted into a random walk transition probability matrix; for the high-degree nodes in the user tourist attraction recommendation network, a random walk strategy based on community information guidance is executed according to the random walk transition probability matrix;
[0061] Step S4: For low-degree nodes in the user tourist attraction recommendation network, a heuristic random walk strategy based on a restart mechanism is executed;
[0062] Step S5: Based on the node sequence obtained by random walk, the Skip-Gram model is trained to obtain the representation vector of each user node in the network;
[0063] Step S6: Based on the user node representation vectors obtained through Skip-Gram model training, the C-means algorithm is first used to cluster the user node representation vectors to obtain a set of users with close internal connections. For users who want to recommend attractions, several users who are closest to them in the representation vector space are selected from their communities, and several of their favorite attractions are selected as recommended attractions based on their evaluations of tourist attractions.
[0064] The present invention also provides a scenic spot recommendation system based on community perception and adaptive random walk, including a user tourist attraction recommendation network construction module, a random walk parameter adaptive calculation module, a random walk module, a node representation vector optimization module, a clustering and scenic spot recommendation module,
[0065] The user tourist attraction recommendation network construction module starts from the user who needs to make tourist attraction recommendations and constructs a user tourist attraction recommendation network based on the interaction records and personal characteristics of the user with other users;
[0066] The random walk parameter adaptive calculation module performs a random walk parameter adaptive calculation strategy based on node degree centrality to determine appropriate subsequent random walk parameter values based on the user tourist attraction recommendation network constructed by the user tourist attraction recommendation network construction module;
[0067] The random walk module generates node community membership information based on the user tourist attraction recommendation network obtained by the user tourist attraction recommendation network construction module using a multi-label propagation method, and converts it into a random walk transition probability matrix; for high-degree nodes in the user tourist attraction recommendation network, a random walk strategy based on community information guidance is executed according to the transition probability matrix; for low-degree nodes in the user tourist attraction recommendation network, a heuristic random walk strategy based on a restart mechanism is executed;
[0068] The node representation vector optimization module uses the node sequence obtained by random walk as the input of Skip-Gram model to train and obtain the representation vector of each user node in the network;
[0069] The clustering and scenic spot recommendation module, based on the node representation vector obtained by the node representation vector optimization module, first uses a C-means algorithm to cluster the user node vectors to obtain multiple closely connected user groups, and for the user to whom scenic spots are to be recommended, selects several users with the closest vector distance from their user group, and selects several of their favorite tourist attractions as their recommended attractions.
[0070] The following is the specific implementation process of the present invention.
[0071] Please refer to Figure 1 ,The present invention provides a method for recommending attractions based on community perception and adaptive random walk, and provides a system, which includes: a user tourist attraction recommendation network construction module, a random walk parameter adaptive calculation module, a random walk module, a node representation vector optimization module, a clustering and attraction recommendation module;
[0072] Step S1: Build the entire user tourist attraction recommendation network based on user characteristics, user historical interaction records, and evaluation of tourist attractions, so as to be used for subsequent network analysis tasks;
[0073] Step S2: before performing random walk to collect node sequences, executing a random walk parameter adaptive calculation strategy based on node degree centrality to determine appropriate subsequent random walk parameter values;
[0074] Step S3, using a multi-label propagation method to generate node community membership information, and convert it into a random walk transition probability matrix; for high-degree nodes in the user tourist attraction recommendation network, a probability-based random walk is performed according to the transition probability matrix, and the random walk combines the node community information reflected by the network structure itself; the walk based on community information is more inclined to the walk of the local structure of the high-degree node, so as to help capture the community center;
[0075] Step S4: For low-degree nodes in the user tourist attraction recommendation network, a heuristic random walk based on a restart mechanism is performed. The restart mechanism is more inclined to the walk of the local structure of low-degree nodes, so as to help capture the community boundary;
[0076] Step S5: The node sequence obtained by random walk is used as the training corpus of the Skip-Gram model, and finally the representation vector of each user node in the network is obtained;
[0077] Step S6: Based on the node representation vectors obtained through Skip-Gram model training, the C-means algorithm is first used to cluster the representation vectors of the user nodes to obtain a set of users with close internal connections. For users who want to recommend scenic spots, several users who are closest to them in the representation vector space are selected from their communities, and their favorite scenic spots are selected as recommended scenic spots based on their evaluations of the scenic spots.
[0078] Preferably, in this embodiment, step S2 specifically includes the following steps:
[0079] Step S21: For the user tourist attraction recommendation network obtained in step S1, calculate the centrality of each user node, and arrange each node in descending order of centrality to generate an ordered node centrality sequence S c ;
[0080] Step S22: From the descending sequence S of the node centrality c Select the first α proportion of nodes as the starting nodes of the centrality-based walk, and construct the starting node set S start ;
[0081] Step S23: start Each node in is used as the community center. Two different types of fixed walking strategies are designed to construct different node path sets. The maximum community radius and the minimum community radius with the node as the community center are estimated. The node path sequence sets obtained by the first type and the second type of walking strategies are marked as S respectively. p1 and S p2 ;
[0082] Step S24: After the wandering strategy in step S23 generates the path sets corresponding to the two types of wandering, the mean value r1 of the wandering path length according to the first type of wandering strategy and the mean value r2 of the wandering path length according to the second type of wandering strategy are calculated, and then the average maximum community radius r in the network can be approximately calculated. max and the average minimum community radius r min as follows:
[0083]
[0084]
[0085] r max =max(r1,r2)
[0086] r min =min(r1,r2)
[0087] Among them, len(p) is the length of the random walk path p, and n is the total number of nodes in the network.
[0088] Step S25: Based on the average maximum community radius and the average minimum community radius in the network obtained in step S24, combined with the meanings of the random walk length walk_length, the window length window_size, and the number of random walks of each node number_walks, the adaptive calculation is as follows:
[0089]
[0090]
[0091] number_walks(u)=min(d(u),num max )
[0092] Among them, d(u) is the degree of node u, num max The upper limit of the number of roaming times is set manually in advance.
[0093] Preferably, in this embodiment, step S3 specifically includes the following steps:
[0094] Use the traditional graph multi-label propagation algorithm BMLPA to calculate whether node u belongs to community c k The conditional probability p(u|c k ), based on this conditional probability, the transition probability of node u to its neighbor v is calculated as follows:
[0095]
[0096] Among them, C is the public community label of nodes u and v obtained by the multi-label propagation algorithm BMLPA. For the high-degree nodes in the user tourist attraction recommendation network, the next hop node is selected by probability according to the transition probability matrix for random walk;
[0097] Preferably, in this embodiment, step S4 specifically includes the following steps:
[0098] Step S41, select a low-degree node u as a source node to start a random walk process;
[0099] Step S42: After randomly walking forward from the low-degree node u for t steps, the random walk is restarted with the next-hop node v of the low-degree node u in the currently generated node sequence as the source node;
[0100] Step S43, repeat step S42 until the total length of all obtained sequences reaches the random walk length walk_length automatically determined in the previous step S35.
[0101] Step S44: connect all the above short sequences to obtain the final complete random walk path starting from the low-degree node u.
[0102] Preferably, in this embodiment, step S5 specifically includes the following steps:
[0103] The Skip-Gram model assumes that all nodes in the network are independent of each other, and uses the probability of multiplication between nodes to approximate the joint probability of node co-occurrence, with maximizing this probability as the optimization goal, as shown in the following formula
[0104]
[0105] Where w is the size of the window, f(v i )∈R d For node v i The d-dimensional center vector of i-w , ..., v i+w}\v i is the random walk sequence with node v i The window centered on node v does not include i Considering the complexity of probability calculation, negative sampling technology is introduced to speed up the Skip-Gram model training process and stochastic gradient descent SGD is used to optimize the model.
[0106] Preferably, in this embodiment, step S6 specifically includes the following steps:
[0107] The C-means algorithm is used to cluster the representation vectors of user nodes. The cost function is minimized through iterative optimization to obtain closely connected user clusters. The optimization function is as follows:
[0108]
[0109] where u i 、u j is the center representation vector in the user cluster C. For the C-Means clustering algorithm, by specifying the number of communities k, the membership matrix U of the node in k communities is obtained, and its element value u in the i-th row and j-th column is ij Represents node v i To the community j Next, we generate a community set for each node by manually specifying a community threshold δ, that is, if the node v i For the community j The membership degree u ij ≥δ, then the node v i Assigned to community c j If the node v i If the membership of all communities is less than δ, then the node will be treated as an isolated node and included in an isolated community, whose members only include node v i .
[0110] After obtaining each user community set through iterative optimization, for the user who wants to recommend attractions, several users closest to him are selected from his community cluster, and recommendations are made based on the favorite tourist attractions of these users.
[0111] The above are preferred embodiments of the present invention. Any changes made according to the technical solution of the present invention, as long as the resulting functions do not exceed the scope of the technical solution of the present invention, belong to the protection scope of the present invention.
Claims
1. A method for recommending scenic spots based on community perception and adaptive random walk, characterized in that: The steps include: Step S1, constructing a user tourist attraction recommendation network based on user characteristics, user travel records and evaluation of tourist attractions; Step S2: Based on the user tourist attraction recommendation network, a random walk parameter adaptive calculation strategy based on node degree centrality is used to determine subsequent random walk parameter values; Step S3: Based on the user tourist attraction recommendation network, a multi-label propagation method is used to generate node community membership information, and the information is converted into a random walk transition probability matrix; for the high-degree nodes in the user tourist attraction recommendation network, a random walk strategy based on community information guidance is executed according to the random walk transition probability matrix; Step S4: For low-degree nodes in the user tourist attraction recommendation network, a heuristic random walk strategy based on a restart mechanism is executed; Step S5: Based on the node sequence obtained by random walk, the Skip-Gram model is trained to obtain the representation vector of each user node in the network; Step S6: Based on the user node representation vectors obtained by Skip-Gram model training, the C-means algorithm is first used to cluster the user node representation vectors to obtain a set of users with close internal connections. For the user who wants to recommend attractions, several users with the closest distance in the representation vector space are selected from their community, and several favorite attractions that the user has visited are selected as the recommended attractions according to their evaluation of tourist attractions; The step S2 is specifically as follows: Step S21: For the user tourist attraction recommendation network obtained in step S1, calculate the centrality of each user node, and arrange each node in descending order of centrality to generate an ordered node centrality sequence S c ; Step S22: From the descending sequence S of the node centrality c Select the first α proportion of nodes as the starting nodes of the random walk based on the node degree centrality, and construct the starting node set S start ; Step S23: start Each node in is used as the community center, and two different types of fixed walking strategies are designed to construct different node path sets. The maximum community radius and the minimum community radius with the corresponding node as the community center are estimated. The node path sequence sets obtained by the first type and the second type of walking strategies are marked as S respectively. p1 and S p2 ; Step S24: After generating the path sets corresponding to the two types of walking by the two different types of fixed walking strategies in step S23, calculate the mean value r1 of the walking path length according to the first type of walking strategy and the mean value r2 of the walking path length according to the second type of walking strategy, and then approximately calculate the average maximum community radius r in the network. max and the average minimum community radius r min as follows: r max =max(r1,r2) r min =min(r1,r2) Where len(p) is the length of the random walk path p, and n is the total number of nodes in the network; Step S25: Based on the average maximum community radius and the average minimum community radius in the network obtained in step S24, combined with the meanings of the random walk length walk_length, the window length window_size, and the number of random walks of each node number_walks, the adaptive calculation is as follows: number_walks(u)=min(d(u),num max ) Among them, d(u) is the out-degree of node u, num max The upper limit of the number of roaming times is set in advance; The step S3 uses the graph multi-label propagation algorithm BMLPA to calculate whether the node u belongs to the community c k The conditional probability p(u|c k ), based on this conditional probability, the transition probability of node u to its neighbor v is calculated as follows: Among them, C is the public community label of nodes u and v obtained by the multi-label propagation algorithm BMLPA; for the high-degree nodes in the user tourist attraction recommendation network, the next hop node is selected by probability according to the transition probability matrix for random walk; The heuristic random walk strategy based on the restart mechanism in step S4 is specifically: Step S41, select a low-degree node u as a source node to start a random walk process; Step S42: After randomly walking forward from the low-degree node u for t steps, the random walk is restarted with the next-hop node v of the low-degree node u in the currently generated node sequence as the source node; Step S43, repeat step S42 until the total length of all obtained sequences reaches the determined random walk length walk_length; Step S44, connecting all short sequences to obtain a final complete random walk path starting from the low-degree node u; The step S23 is specifically as follows: two different types of fixed wandering strategies have different node selection bases when jumping nodes. Assume that the current wandering node is u. The first type of wandering strategy selects the neighbor node with the smallest absolute value of the centrality difference with node u as the next hop node among the neighbor nodes with smaller centrality than node u, that is, it moves along the direction with the smallest decrease in centrality gradient each time; on the contrary, the second type of wandering strategy selects the neighbor node with the largest absolute value of the centrality difference with node u as the next hop node among the neighbor nodes with smaller centrality than node u, that is, it moves along the direction with the largest decrease in centrality gradient each time; both types of wandering select fixed next hop nodes according to their strategies until the centrality gradient can no longer be reduced and then stops, that is, the centralities of the node neighbors are all greater than or equal to the current node.
2. The method for recommending scenic spots based on community perception and adaptive random walking according to claim 1, characterized in that: The step S5 is specifically implemented as follows: The Skip-Gram model assumes that all nodes in the network are independent of each other, and uses the probability of multiplication between nodes to approximate the joint probability of node co-occurrence, with maximizing this probability as the optimization goal, as shown in the following formula: Where w is the size of the window, f(v i )∈R d For node v i The d-dimensional center vector of i-w , ..., v i+w }\v i is the random walk sequence with node v i The window centered on the node v is not included. i Considering the complexity of probability calculation, negative sampling technology is introduced to speed up the Skip-Gram model training process and stochastic gradient descent SGD is used to optimize the model.
3. The method for recommending scenic spots based on community perception and adaptive random walking according to claim 1, characterized in that: The step S6 is specifically implemented as follows: The C-means algorithm is used to cluster the representation vectors of user nodes. The cost function is minimized through iterative optimization to obtain closely connected user clusters. The optimization function is as follows: where u i 、u j is the center representation vector in the user cluster C; for the C-Means clustering algorithm, by specifying the number of communities k, the membership matrix U of the node in k communities is obtained, and its element value u in the i-th row and j-th column is ij Represents node v i To the community j The membership probability of v is then generated by specifying a community threshold δ to generate the community set for each node. i For the community j The membership degree u ij ≥δ, then the node v i Assigned to community c j If node v i If the membership of all communities is less than δ, then the node will be treated as an isolated node and included in an isolated community, whose members only include node v i ; After obtaining each user community set through iterative optimization, for the user who wants to recommend attractions, several users closest to him are selected from his community cluster, and the tourist attractions most loved by these users are used as recommended attractions.
4. A scenic spot recommendation system based on community perception and adaptive random walk, characterized in that: To implement the method of claim 1, the system comprises a user tourist attraction recommendation network construction module, a random walk parameter adaptive calculation module, a random walk module, a node representation vector optimization module, a clustering and tourist attraction recommendation module, The user tourist attraction recommendation network construction module starts from the user who needs to make tourist attraction recommendations and constructs a user tourist attraction recommendation network based on the interaction records and personal characteristics of the user with other users; The random walk parameter adaptive calculation module performs a random walk parameter adaptive calculation strategy based on node degree centrality to determine appropriate subsequent random walk parameter values based on the user tourist attraction recommendation network constructed by the user tourist attraction recommendation network construction module; The random walk module generates node community membership information based on the user tourist attraction recommendation network obtained by the user tourist attraction recommendation network construction module using a multi-label propagation method, and converts it into a random walk transition probability matrix; for high-degree nodes in the user tourist attraction recommendation network, a random walk strategy based on community information guidance is executed according to the transition probability matrix; for low-degree nodes in the user tourist attraction recommendation network, a heuristic random walk strategy based on a restart mechanism is executed; The node representation vector optimization module uses the node sequence obtained by random walk as the input of Skip-Gram model to train and obtain the representation vector of each user node in the network; The clustering and scenic spot recommendation module, based on the node representation vector obtained by the node representation vector optimization module, first uses a C-means algorithm to cluster the user node vectors to obtain multiple closely connected user groups, and for the user to whom scenic spots are to be recommended, selects several users with the closest vector distance from their user group, and selects several of their favorite tourist attractions as their recommended attractions.
5. The scenic spot recommendation system based on community perception and adaptive random walk according to claim 4, characterized in that: The clustering and scenic spot recommendation module specifically: clusters similar users together according to user characteristics, historical travel records and travel ratings. For users who need recommended tourist attractions, first find the cluster to which they belong, then find the user with the closest vector distance, and find several scenic spots with the highest ratings from the set of scenic spot ratings they have visited as recommended scenic spots.
