Knowledge graph tourist attraction recommendation method, system and equipment based on graph pruning and graph reconstruction and medium

By introducing graph pruning and graph reconstruction technology in knowledge graph tourism recommendation, combining user historical interaction data and multi-dimensional scenic spot attribute information, noise and sparseness problems are solved, and the accuracy and personalization of recommendations are significantly improved.

CN119884501APending Publication Date: 2025-04-25JIANGSU HONGXIN SYST INTEGRATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411948641.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing travel recommendation method based on knowledge graphs faces the problems of noise and sparsity in user interaction data, resulting in insufficient accuracy and personalization of recommendation results.

Method used

Using a method based on graph pruning and graph reconstruction, the user preference modeling is dynamically adjusted through user historical interaction data and multi-dimensional scenic spot attribute information in the knowledge graph, noise data is removed, the relationship representation between users and scenic spots is optimized, and the recommendation accuracy of the model is improved through a self-supervised learning mechanism.

Benefits of technology

Effectively remove noise data, optimize the relationship between users and attractions, improve the accuracy and personalization of the recommendation model, and improve the satisfaction of the travel experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884501A_ABST
    Figure CN119884501A_ABST
Patent Text Reader

Abstract

The invention discloses a knowledge graph tourist attraction recommendation method, system and device based on graph pruning and graph reconstruction and a medium, and the method comprises the steps: collecting data related to tourist attractions, including scenic spot features and user interaction data; constructing a user-scenic spot interaction graph according to the data related to the scenic spots; extending a user-scenic spot interaction graph by utilizing scenic spot attribute information in a pre-constructed knowledge graph; performing graph pruning on the expanded user-scenic spot interaction graph, and pruning connecting edges which do not accord with user preferences in the user-scenic spot interaction graph; performing graph reconstruction on the pruned user-scenic spot interaction graph, and adding a connecting edge representing potential preference of the user; on the basis of the reconstructed user-scenic spot interaction graph, calculating a scenic spot recommendation score; and generating a scenic spot recommendation list according to the high-low ranking of the scenic spot recommendation scores. According to the method, the interest of the user can be accurately matched, and the individuation and satisfaction of tourism experience are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a tourist attraction recommendation technology, and in particular to a method, system, device and medium for recommending tourist attractions based on a knowledge graph based on graph pruning and graph reconstruction. Background Art

[0002] With the economic growth and the continuous improvement of living standards, tourism has gradually become one of the preferred activities for people during holidays. The huge potential and booming development of the tourism industry not only provides tourists with a rich cultural experience, but also promotes the improvement of local employment, consumption and infrastructure, and promotes the development of the regional economy. However, with the development of information technology, tourists often find it difficult to find the most suitable travel plan when faced with a large amount of attraction information and choices. In this context, knowledge graph technology has gradually shown its advantages in the field of tourist attraction recommendations. By integrating attraction features, user preferences, evaluations and historical data, knowledge graphs can more accurately describe the potential associations between users and attractions, thereby providing more personalized and intelligent recommendations, and improving the accuracy and satisfaction of the travel experience.

[0003] The key to solving the recommendation problem through knowledge graphs is how to extract implicit semantic information and potential associations of users and items from a large amount of heterogeneous data. Some studies mainly adopt the path method to introduce meta-paths of heterogeneous information network mining in the recommendation system to build a recommendation model. This method effectively utilizes the path connection information in the knowledge graph and improves the recommendation effect. Another type of method is based on the knowledge graph embedding model, combined with the embedding representation technology, to learn the latent feature vectors of entities and relationships, thereby giving the model the ability of knowledge reasoning and fusion. Although these knowledge graph-based recommendation methods have the potential to achieve their goals, their application in the field of tourism recommendation is still insufficient.

[0004] The current tourism recommendation methods based on knowledge graphs mainly face the following two problems:

[0005] 1. Noise problem in user interaction data. In the process of user interaction, there may be wrong preference choices, resulting in noise information mixed in the collected data. This noise information affects the quality of the construction of the user interaction graph, so that when the knowledge graph message is transmitted based on the graph, the model may not be able to accurately learn the relationship between users and scenic spots, thus affecting the accuracy of the recommendation results.

[0006] 2. Sparsity problem in user interaction data. The sparsity of user interaction data makes it difficult for the model to fully capture the user's true interests, further reducing the accuracy of the recommendation effect. Taking the tourism scenario as an example, a tourist who is interested in natural scenery may be misjudged by the model as having a strong preference for historical and cultural attractions because he visited historical sites during a trip. In his future travel plans, the model may give priority to recommending more historical sites and ignore his real interest in natural scenery. Because the tourist's interaction data is relatively sparse, the model may over-rely on some secondary information and ignore the user's core preference for the type of attraction, resulting in recommendation results that do not match their actual needs. Summary of the invention

[0007] In view of the deficiencies in the prior art, the present invention provides a method, system, device and medium for recommending tourist attractions based on a knowledge graph based on graph pruning and graph reconstruction, which dynamically adjusts the user preference modeling by using the user's historical interaction data and the multi-dimensional tourist attraction attribute information in the knowledge graph. Through the graph pruning and self-supervised learning mechanism, the noise data is effectively removed, the relationship representation between users and attractions is optimized, and the recommendation accuracy and comprehensive performance of the model are continuously improved. By mining the rich tourist attraction information in the knowledge graph and accurately matching the user's interests, a personalized tourist attraction recommendation list is generated for the user, which assists the user in making a reasonable travel plan and improves the personalization and satisfaction of the travel experience.

[0008] To achieve the above object, the present invention adopts the following technical solutions:

[0009] A method for recommending tourist attractions in a knowledge graph based on graph pruning and graph reconstruction, comprising the following steps:

[0010] S1. Collecting data related to tourist attractions, including characteristics of tourist attractions and user interaction data;

[0011] S2. Construct a user-attraction interaction graph based on the collected data related to tourist attractions; the nodes of the user-attraction interaction graph are users and attractions, and the connecting edges between the nodes represent the interaction relationship between users and attractions;

[0012] S3, using the scenic spot attribute information in the pre-built knowledge graph to expand the user-attraction interaction graph;

[0013] S4, performing graph pruning on the expanded user-attraction interaction graph, and pruning the connection edges in the user-attraction interaction graph that do not conform to the user's preferences;

[0014] S5, reconstructing the pruned user-attraction interaction graph and adding connection edges that represent the user's potential preferences;

[0015] S6. Calculate the attraction recommendation score based on the reconstructed user-attraction interaction graph;

[0016] S7. Generate a list of recommended attractions by sorting the recommended attractions according to their scores.

[0017] To optimize the above technical solutions, the specific measures taken also include:

[0018] Furthermore, in S1, the scenic spot characteristics include scenic spot type, rating, historical background and geographical location; the user interaction data includes browsing, collection, comment and rating.

[0019] Furthermore, S2 specifically includes:

[0020] Construct the user-attraction interaction graph G based on the collected data related to tourist attractions U =(U,I,e U ), where U is the user set, I is the scenic spot set, ε U is the interactive relationship set between users and attractions. In addition, a user-attraction interaction matrix is ​​constructed. represents the real number field of |U|′|I| dimension, which is used to obtain the historical interaction information between users and attractions. The element R in the user-attraction interaction matrix ui =1 means the user has interacted with the scenic spot, R ui =0 indicates that the user has no interaction with the scenic spot; the row number u of the user-scenic spot interaction matrix indicates the serial number of the user, and the column number i indicates the serial number of the scenic spot.

[0021] Furthermore, S3 is specifically:

[0022] Using the scenic spot attribute information in the pre-built knowledge graph, for each scenic spot i∈I, construct its corresponding attribute set N i , the association between users and attractions is incorporated into the user-attraction interaction graph, where I is the attraction set.

[0023] Furthermore, S4 is specifically:

[0024] The knowledge graph G includes an entity set E and a relationship set R. The entity set E contains elements in the user set U and the scenic spot set. The relationship between each entity is represented by a triple (h, r, t), where h, t∈E represent the head entity and the tail entity respectively, and r∈R represents the relationship between entities.

[0025] S4.1. Fuse the relation r in the knowledge graph with the tail entity t to obtain the aggregated tail entity v, which represents the different semantic information carried by the triples. Then, aggregate all the neighbor information of the head entity to obtain the aggregated representation vector of the scenic spot i:

[0026]

[0027] In the formula, e iRepresents the aggregate representation vector of scenic spot i, using e r and e v to represent the representation vectors of relation r and aggregate tail entity v respectively, ⊙ represents the element-by-element product, N i ={(r, v)|(r, v)∈G} represents the attributes of scenic spot i;

[0028] S4.2. Use historical interaction data R and the aggregate representation of attractions to encode user preferences, specifically:

[0029] The combination representation of user u is:

[0030] e u =f(R u , E)

[0031] Where R u represents the historical interaction record of user u, E represents the scenic spot representation matrix after the semantic information is aggregated, and the aggregated representation vector e of all scenic spots i Here, the function f represents the use of graph neural network to fuse the user's interactive information and the multi-dimensional information in the knowledge graph to obtain the user preference e u ;

[0032] S4.3. By analyzing the matching degree between scenic spot attributes and user preferences, identify the interactive behaviors that do not meet user preferences, specifically:

[0033] By calculating the aggregate representation vector e of the scenic spot i and user preferences u The cosine similarity between them is used to judge the structural similarity between users and attractions, and the cosine similarity is converted into normalized cosine distance to estimate the reliability of the interaction between users and attractions:

[0034]

[0035] c ui =(cos(e u , e i )+1) / 2

[0036] Among them, c ui Represents the reliability score of the connecting edge in the user-attraction interaction graph, and the final reliability score is It is defined as follows:

[0037]

[0038] In the formula, a represents the hyperparameter for regulating the change of threshold, t represents the number of iterations, and b max represents the upper threshold, represents a binary threshold function, when the reliability score c uiReturns 1 when the threshold is exceeded, based on the final reliability score Prune the connections whose values ​​are not 1 in the user-attraction interaction graph.

[0039] Furthermore, S5 is specifically:

[0040] Calculate the score s between the user and the candidate attractions ui :

[0041] s ui =s(e u e i )

[0042] Among them, s is the Sigmoid function, e i is the aggregate representation vector of the scenic spot, e u is user preference;

[0043] A self-supervised loss function is constructed based on the scores between users and candidate attractions to guide the reconstruction of the user-attraction interaction graph. The self-supervised loss function is:

[0044]

[0045] In the formula, represents the self-supervised loss, s is the Sigmoid function, ε U is the interactive relationship set between users and scenic spots, (u, i) is the sample pair in the interactive relationship set between users and scenic spots, u is the user number, i is the scenic spot number, E U,neg represents the negative sample set, (u, j) is the sample pair in the negative sample set, u is the user serial number, j is the scenic spot serial number; s uj is the score between the user and the attractions in the negative sample set.

[0046] Furthermore, S6 is specifically:

[0047] Based on the reconstructed user-attraction interaction graph, the user embedding learned by self-supervision is used and attractions embedded Calculate the recommendation score score(u,i):

[0048]

[0049] Where u is the user's serial number and i is the scenic spot's serial number.

[0050] The present invention also proposes a knowledge graph tourist attraction recommendation system based on graph pruning and graph reconstruction, comprising:

[0051] A data collection module, used to collect data related to tourist attractions, including characteristics of tourist attractions and user interaction data;

[0052] A graph construction module is used to construct a user-attraction interaction graph based on the collected data related to tourist attractions; the nodes of the user-attraction interaction graph are users and attractions, and the connecting edges between the nodes represent the interaction relationship between users and attractions;

[0053] A graph extension module, which is used to extend the user-attraction interaction graph using the attraction attribute information in the pre-built knowledge graph;

[0054] A graph pruning module is used to prune the expanded user-attraction interaction graph and prune the connection edges in the user-attraction interaction graph that do not conform to the user's preferences;

[0055] A graph reconstruction module is used to reconstruct the pruned user-attraction interaction graph and add connection edges that represent the user's potential preferences;

[0056] A score calculation module, used to calculate the score of the scenic spot recommendation based on the reconstructed user-scenic spot interaction graph;

[0057] The scenic spot recommendation module is used to generate a scenic spot recommendation list by sorting the scenic spot recommendation scores.

[0058] The present invention also proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the knowledge graph tourist attraction recommendation method based on graph pruning and graph reconstruction as described above is implemented.

[0059] The present invention also proposes a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the knowledge graph tourist attraction recommendation method based on graph pruning and graph reconstruction as described above.

[0060] The beneficial effects of the present invention are:

[0061] 1. Combining graph pruning with user preference modeling. Introducing a graph pruning module in user-attraction interaction modeling, by calculating the matching degree between users and attractions, identifying and filtering noise data in the interaction graph. Using the graph pruning strategy, dynamically remove the interaction information that does not conform to the user's true preferences, reducing the impact of noise on the model. This method helps to accurately capture the user's true interests and improve the recommendation accuracy and reliability of the model.

[0062] 2. Multi-dimensional information expansion model based on knowledge graph. Compared with traditional single interactive data modeling, the present invention uses multi-dimensional information in the knowledge graph, including scenic spot attributes, user historical behavior, and the relationship between scenic spots, to expand the user's interaction graph and enhance the model's ability to capture users' potential interests. These multi-level information are embedded and integrated through graph neural networks, so that the recommendation system can still provide accurate personalized recommendations in sparse data scenarios, effectively improving the overall performance of the recommendation model.

[0063] 3. Combining self-supervision tasks with graph construction. In the process of expanding the interaction graph, a self-supervision task based on structural consistency is introduced to ensure that the expanded user interaction data conforms to the user's real preferences. The self-supervision task optimizes the model's representation of the expanded data by identifying the structural consistency in the user interaction graph, preventing the introduction of new noise due to data expansion, and further improving the accuracy of the recommendation model. A dynamic pruning strategy is applied to filter out noisy data that does not conform to the user's real preferences. This step can significantly reduce invalid information in the user interaction graph and improve the model's ability to capture the user's real interests. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 This is a flow chart of the knowledge graph tourist attraction recommendation method based on graph pruning and graph reconstruction proposed by the present invention;

[0065] Figure 2 Schematic diagram of graph pruning and graph reconstruction. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] Embodiment 1

[0068] The present invention proposes a knowledge graph tourist attraction recommendation method based on graph pruning and graph reconstruction. The flowchart of the method is as follows: Figure 1 As shown, the following steps are included:

[0069] S1. Collect data related to tourist attractions, the data including attraction features and user interaction data; the attraction features include attraction type, rating, historical background and geographical location; the user interaction data includes browsing, collection, comment and rating.

[0070] S2. Construct a user-attraction interaction graph based on the collected data related to tourist attractions; the nodes of the user-attraction interaction graph are users and attractions, and the connecting edges between the nodes represent the interactive relationship between users and attractions; specifically, it includes:

[0071] Construct the user-attraction interaction graph G based on the collected data related to tourist attractions U =(U,I,ε U ), where U is the user set, I is the scenic spot set, ε U is the interactive relationship set between users and attractions. In addition, a user-attraction interaction matrix is ​​constructed. represents the real number field of |U|′|I| dimension, which is used to obtain the historical interaction information between users and attractions. The element R in the user-attraction interaction matrix ui =1 means the user has interacted with the scenic spot, R ui =0 indicates that the user has no interaction with the scenic spot; the row number u of the user-scenic spot interaction matrix indicates the serial number of the user, and the column number i indicates the serial number of the scenic spot.

[0072] S3. Use the scenic spot attribute information in the pre-built knowledge graph to expand the user-scenic spot interaction graph so that the user-scenic spot association contains multi-dimensional information; specifically:

[0073] Using the scenic spot attribute information in the pre-built knowledge graph, for each scenic spot i∈I, construct its corresponding attribute set N i , the association between users and attractions is incorporated into the user-attraction interaction graph, where I is the attraction set.

[0074] S4. To address the noise problem in the user interaction data, the expanded user-attraction interaction graph is pruned to prune the connection edges in the user-attraction interaction graph that do not conform to the user's preferences. S4 is specifically as follows:

[0075] The knowledge graph G includes an entity set E and a relationship set R. The entity set E contains elements in the user set U and the scenic spot set I. The relationship between each entity is represented by a triple (h, r, t), where h, t∈E represent the head entity and the tail entity respectively, and r∈R represents the relationship between entities.

[0076] S4.1. Fuse the relation r in the knowledge graph with the tail entity t to obtain the aggregated tail entity v, which represents the different semantic information carried by the triples. Then, aggregate all the neighbor information of the head entity to obtain the aggregated representation vector of the scenic spot i:

[0077]

[0078] In the formula, e i Represents the aggregate representation vector of scenic spot i, using e r and e vto represent the representation vectors of relation r and aggregate tail entity v respectively, ⊙ represents the element-by-element product, N i ={(r,v)|(r,v)∈G} represents the attributes of scenic spot i;

[0079] S4.2. In order to capture the structural and semantic representation of users, historical interaction data R and the aggregate representation of attractions are used to encode user preferences, specifically:

[0080] The combination representation of user u is:

[0081] e u =f(R u ,E)

[0082] Where R u represents the historical interaction record of user u, E represents the scenic spot representation matrix after the semantic information is aggregated, and the aggregated representation vector e of all scenic spots i Here, the function f represents the use of graph neural network to fuse the user's interactive information and the multi-dimensional information in the knowledge graph to obtain the user preference e u ;

[0083] S4.3. By analyzing the matching degree between scenic spot attributes and user preferences, identify the interactive behaviors that do not meet user preferences, specifically:

[0084] By calculating the aggregate representation vector e of the scenic spot i and user preferences u The cosine similarity between them is used to judge the structural similarity between users and attractions, and the cosine similarity is converted into normalized cosine distance to estimate the reliability of the interaction between users and attractions:

[0085]

[0086] c ui =(cos(e u ,e i )+1) / 2

[0087] Among them, c ui Represents the reliability score of the connection edge in the user-attraction interaction graph. Generally speaking, reliable connection edges will have higher scores, while edges with lower scores need to be pruned. The final reliability score is It is defined as follows:

[0088]

[0089] In the formula, a represents the hyperparameter for regulating the change of threshold, t represents the number of iterations, and b max represents the upper threshold, represents a binary threshold function, when the reliability score c uWhen i exceeds the threshold, it returns 1, and the final reliability score is calculated based on the final reliability score. Prune the connections whose values ​​are not 1 in the user-attraction interaction graph.

[0090] S5, in order to solve the problem of data sparsity, the pruned user-attraction interaction graph is reconstructed to add connection edges that represent the user's potential preferences; by expanding the indirect relationship between users and attractions, increasing the interaction samples between users and attractions, and using the multi-level information in the knowledge graph to complete the sparse data, the user's potential preferences are discovered. S5 is specifically:

[0091] Calculate the score s between the user and the candidate attractions ui :

[0092] s ui =s(e u e i )

[0093] Among them, s is the Sigmoid function, e i is the aggregate representation vector of the scenic spot, e u is user preference;

[0094] An auxiliary self-supervision task based on structural consistency is introduced, and a self-supervision loss function is constructed based on the scores between users and candidate attractions to guide the reconstruction of the user-attraction interaction graph. The self-supervision loss function is:

[0095]

[0096] In the formula, represents the self-supervised loss, s is the Sigmoid function, ε U is the interactive relationship set between users and scenic spots, (u, i) is the sample pair in the interactive relationship set between users and scenic spots, u is the user number, i is the scenic spot number, E U,neg represents the negative sample set, (u, j) is the sample pair in the negative sample set, u is the user serial number, j is the scenic spot serial number; s uj is the score between the user and the attractions in the negative sample set. The self-supervised task ensures the rationality of the extended model by identifying the structural consistency in the interaction graph. By optimizing the self-supervised loss function, the embedding representation of users and attractions more accurately reflects the user's potential interests, ensuring the reliability of subsequent recommendation scores. The overall process of graph pruning and graph reconstruction is as follows: Figure 2 shown.

[0097] S6. Based on the reconstructed user-attraction interaction graph, calculate the attraction recommendation score; S6 is specifically:

[0098] Based on the reconstructed user-attraction interaction graph, the user embedding learned by self-supervision is used and attractions embedded Calculate the recommendation score score(u,i):

[0099]

[0100] Where u is the user's serial number and i is the scenic spot's serial number.

[0101] S7. Generate a list of recommended attractions by sorting the recommended attractions according to their scores.

[0102] Embodiment 2

[0103] The present invention proposes a knowledge graph tourist attraction recommendation system based on graph pruning and graph reconstruction corresponding to the method of embodiment 1, including:

[0104] A data collection module, used to collect data related to tourist attractions, including characteristics of tourist attractions and user interaction data;

[0105] A graph construction module is used to construct a user-attraction interaction graph based on the collected data related to tourist attractions; the nodes of the user-attraction interaction graph are users and attractions, and the connecting edges between the nodes represent the interaction relationship between users and attractions;

[0106] A graph extension module, which is used to extend the user-attraction interaction graph using the attraction attribute information in the pre-built knowledge graph;

[0107] A graph pruning module is used to prune the expanded user-attraction interaction graph and prune the connection edges in the user-attraction interaction graph that do not conform to the user's preferences;

[0108] A graph reconstruction module is used to reconstruct the pruned user-attraction interaction graph and add connection edges that represent the user's potential preferences;

[0109] A score calculation module, used to calculate the score of the scenic spot recommendation based on the reconstructed user-scenic spot interaction graph;

[0110] The scenic spot recommendation module is used to generate a scenic spot recommendation list by sorting the scenic spot recommendation scores.

[0111] The implementation methods of each module and module function in the system are completely consistent with the steps of the method in Example 1, so they will not be repeated here.

[0112] Embodiment 3

[0113] The present invention proposes an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for recommending tourist attractions based on a knowledge graph based on graph pruning and graph reconstruction as described in Example 1 is implemented.

[0114] Embodiment 4

[0115] The present invention proposes a computer-readable storage medium storing a computer program, wherein the computer program enables a computer to execute the knowledge graph tourist attraction recommendation method based on graph pruning and graph reconstruction as described in Example 1.

[0116] In the embodiments disclosed in the present application, the computer storage medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. The computer storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the above. More specific examples of computer storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above.

[0117] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in this application can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0118] The above are only preferred embodiments of the present invention, and the protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should be regarded as the protection scope of the present invention.

Claims

1. A knowledge graph tourist attraction recommendation method based on graph pruning and graph reconstruction, characterized in that: The following steps are involved: S1. Collecting data related to tourist attractions, including characteristics of tourist attractions and user interaction data; S2. Construct a user-attraction interaction graph based on the collected data related to tourist attractions; the nodes of the user-attraction interaction graph are users and attractions, and the connecting edges between the nodes represent the interaction relationship between users and attractions; S3, using the attraction attribute information in the pre-built knowledge graph to expand the user-attraction interaction graph; S4, performing graph pruning on the expanded user-attraction interaction graph, and pruning the connection edges in the user-attraction interaction graph that do not conform to the user's preferences; S5, reconstructing the pruned user-attraction interaction graph and adding connection edges that represent the user's potential preferences; S6. Calculate the attraction recommendation score based on the reconstructed user-attraction interaction graph; S7. Generate a list of recommended attractions by sorting the recommended attractions according to their scores.

2. The method for recommending tourist attractions based on knowledge graphs based on graph pruning and graph reconstruction as claimed in claim 1, characterized in that: In S1, the scenic spot characteristics include the type of scenic spot, rating, historical background and geographical location; the user interaction data includes browsing, collection, comment and rating.

3. The method for recommending tourist attractions based on knowledge graphs based on graph pruning and graph reconstruction as claimed in claim 1, characterized in that: S2 specifically includes: Construct the user-attraction interaction graph G based on the collected data related to tourist attractions U =(U,I,ε U ), where U is the user set, I is the scenic spot set, ε U is the interactive relationship set between users and attractions. In addition, a user-attraction interaction matrix is ​​constructed. represents the real number field of |U|′I| dimension, which is used to obtain the historical interaction information between users and attractions. The element R in the user-attraction interaction matrix ui =1 means the user has interacted with the scenic spot, R ui =0 indicates that the user has no interaction with the scenic spot; the row number u of the user-scenic spot interaction matrix indicates the serial number of the user, and the column number i indicates the serial number of the scenic spot.

4. The method for recommending tourist attractions based on knowledge graphs based on graph pruning and graph reconstruction as claimed in claim 1, characterized in that: S3 is specifically: Using the scenic spot attribute information in the pre-built knowledge graph, for each scenic spot i∈I, construct its corresponding attribute set N i , the association between users and attractions is incorporated into the user-attraction interaction graph, where I is the attraction set.

5. The method for recommending tourist attractions based on knowledge graphs based on graph pruning and graph reconstruction as claimed in claim 1, characterized in that: S4 is specifically: The knowledge graph G includes an entity set E and a relationship set R. The entity set E contains elements in the user set U and the scenic spot set I. The relationship between each entity is represented by a triple (h, r, t), where h, t∈E represent the head entity and the tail entity respectively, and r∈R represents the relationship between entities. S4.

1. Fuse the relation r in the knowledge graph with the tail entity t to obtain the aggregated tail entity v, which represents the different semantic information carried by the triples. Then, aggregate all the neighbor information of the head entity to obtain the aggregated representation vector of the scenic spot i: In the formula, e i Represents the aggregate representation vector of scenic spot i, using e r and e v to represent the representation vectors of relation r and aggregate tail entity v respectively, ⊙ represents the element-by-element product, N i ={(r,v)|(r,v)∈G} represents the attributes of scenic spot i; S4.

2. Use historical interaction data R and the aggregate representation of attractions to encode user preferences, specifically: The combination representation of user u is: e u =f(R u ,E) Where R u represents the historical interaction record of user u, E represents the scenic spot representation matrix after the semantic information is aggregated, and the aggregated representation vector e of all scenic spots i Here, the function f represents the use of graph neural network to fuse the user's interactive information and the multi-dimensional information in the knowledge graph to obtain the user preference e u ; S4.

3. By analyzing the matching degree between scenic spot attributes and user preferences, identify the interactive behaviors that do not meet user preferences, specifically: By calculating the aggregate representation vector e of the scenic spot i and user preferences u The cosine similarity between them is used to judge the structural similarity between users and attractions, and the cosine similarity is converted into normalized cosine distance to estimate the reliability of the interaction between users and attractions: c ui =(what(s) u ,And i )+1) / 2 Among them, c ui Represents the reliability score of the connecting edge in the user-attraction interaction graph, and the final reliability score is It means that the definition is as follows: In the formula, a represents the hyperparameter for regulating the change of threshold, t represents the number of iterations, and b max represents the upper threshold, represents a binary threshold function, when the reliability score c u When i exceeds the threshold, it returns 1, and the final reliability score is calculated based on the Prune the connections whose values ​​are not 1 in the user-attraction interaction graph.

6. The method for recommending tourist attractions based on knowledge graphs based on graph pruning and graph reconstruction as claimed in claim 1, characterized in that: S5 is as follows: Calculate the score s between the user and the candidate attractions ui : s ui =s(e u yes i ) Among them, s is the Sigmoid function, e i is the aggregate representation vector of the scenic spot, e u is user preference; A self-supervised loss function is constructed based on the scores between users and candidate attractions to guide the reconstruction of the user-attraction interaction graph. The self-supervised loss function is: Where L represents the self-supervisory loss, s is the Sigmoid function, and ε U is the interactive relationship set between users and scenic spots, (u, i) is the sample pair in the interactive relationship set between users and scenic spots, u is the user number, i is the scenic spot number, E U,neg represents the negative sample set, (u, j) is the sample pair in the negative sample set, u is the user serial number, j is the scenic spot serial number; s uj is the score between the user and the attractions in the negative sample set.

7. The method for recommending tourist attractions based on knowledge graphs based on graph pruning and graph reconstruction as claimed in claim 1, characterized in that: S6 is specifically: Based on the reconstructed user-attraction interaction graph, the user embedding learned by self-supervision is used and attractions embedded Calculate the recommendation score score(u,i): Where u is the user's serial number and i is the scenic spot's serial number.

8. A knowledge graph tourist attraction recommendation system based on graph pruning and graph reconstruction, characterized in that: include: A data collection module, used to collect data related to tourist attractions, including characteristics of tourist attractions and user interaction data; A graph construction module is used to construct a user-attraction interaction graph based on the collected data related to tourist attractions; the nodes of the user-attraction interaction graph are users and attractions, and the connecting edges between the nodes represent the interaction relationship between users and attractions; A graph extension module, which is used to extend the user-attraction interaction graph using the attraction attribute information in the pre-built knowledge graph; A graph pruning module is used to prune the expanded user-attraction interaction graph and prune the connection edges in the user-attraction interaction graph that do not conform to the user's preferences; A graph reconstruction module is used to reconstruct the pruned user-attraction interaction graph and add connection edges that represent the user's potential preferences; A score calculation module, used to calculate the score of the scenic spot recommendation based on the reconstructed user-scenic spot interaction graph; The scenic spot recommendation module is used to generate a scenic spot recommendation list by sorting the scenic spot recommendation scores.

9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for recommending tourist attractions based on the knowledge graph based on graph pruning and graph reconstruction as described in any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: The computer program enables the computer to execute the knowledge graph tourist attraction recommendation method based on graph pruning and graph reconstruction as described in any one of claims 1 to 7.