Public cultural resource recommendation method and device based on graph neural network
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INST OF AUTOMATION CHINESE ACAD OF SCI
- Filing Date
- 2024-07-24
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]本发明提供一种基于图神经网络的公共文化资源推荐方法及装置,用以解决现有技术中由于馆藏文物数量繁多,注册用户众多,传统的推荐方法无法应对如此海量的数据,难以馆间联合推荐,无法满足用户的推荐需求的问题
[0042]本发明提供的基于图神经网络的公共文化资源推荐装置方法及装置,通过构建用于表征每一公共文化资源数据中,多个文化资源点与资源锚点的资源相似度的第一关系网络,以及构建用户与资源锚点的第二关系网络,来预测用户后续感兴趣的资源锚点,使得可以根据用户感兴趣的资源锚点,进一步根据第一关系网络,来向用户推荐最可能感兴趣的公共文化资源,解决了当前公共文化资源繁多,且注册用户众多,无法满足用户的推荐需求的问题。
Smart Images

Figure CN119166904B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of cultural resource recommendation, and in particular to a method and apparatus for recommending public cultural resources based on graph neural networks. Background Technology
[0002] With societal progress, technological advancements, and the digital transformation of museums and cultural centers, recommendation models for museum collections are receiving increasing attention and playing a crucial role in the development and dissemination of public culture. However, due to the vast number of artifacts and registered users, traditional recommendation methods are ill-equipped to handle such massive amounts of data. They often only offer localized recommendations for exhibits or artifacts around a single cultural center or museum, failing to meet users' specific needs. Summary of the Invention
[0003] This invention provides a public cultural resource recommendation method and apparatus based on graph neural networks, which solves the problem that traditional recommendation methods cannot handle such massive amounts of data due to the large number of cultural relics in museum collections and registered users, making it difficult to conduct joint recommendations between museums and meet users' recommendation needs.
[0004] This invention provides a public cultural resource recommendation method based on graph neural networks, comprising the following steps:
[0005] Process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points.
[0006] Based on the resource characteristics and resource anchors of each public cultural resource data, a first relationship network of multiple cultural resource points and resource anchors is constructed. The first relationship network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data.
[0007] Based on the first relationship network, construct a second relationship network between users and resource anchors;
[0008] Based on the second relationship network, obtain the prediction results of the relationship changes between users and resource anchors;
[0009] Based on the relationship change prediction results and the first relationship network, the recommendation results of public cultural resources are obtained, and public cultural resources are recommended to users according to the recommendation results.
[0010] According to the public cultural resource recommendation method based on graph neural networks provided by the present invention, the step of constructing a first relationship network between cultural resource points and resource anchor points based on the resource characteristics and resource anchor points of each public cultural resource data includes:
[0011] Based on the resource characteristics of each public cultural resource data, the feature similarity between each cultural resource point and the resource anchor point is calculated.
[0012] The first relationship network is obtained based on the feature similarity between each cultural resource point and the resource anchor point.
[0013] According to the public cultural resource recommendation method based on graph neural networks provided by the present invention, the step of constructing a second relationship network between users and resource anchors based on a first relationship network includes:
[0014] Obtain the cultural resource points viewed by the user within the historical time period, and obtain at least one primary cultural resource point;
[0015] Based on the first relationship network, query the first resource anchor point corresponding to the first cultural resource point; at the same time, obtain the resource similarity between the first cultural resource point and the first resource anchor point;
[0016] Based on the resource similarity between the first cultural resource point and the first resource anchor point, the association weight between the user and the first resource anchor point is obtained;
[0017] A second relationship network is constructed based on the association weight between the user and the first resource anchor.
[0018] The public cultural resource recommendation method based on graph neural networks provided by the present invention further includes:
[0019] When a user generates browsing history of cultural resource points after a historical period, obtain the second cultural resource point browsed by the user.
[0020] Based on the first relationship network, obtain the second resource anchor point corresponding to the second cultural resource point, and at the same time, obtain the resource similarity between the second cultural resource point and the second resource anchor point;
[0021] Update the second relationship network based on the resource similarity between the second cultural resource point and the second resource anchor point.
[0022] According to the public cultural resource recommendation method based on graph neural networks provided by the present invention, the step of obtaining the prediction result of the relationship change between users and resource anchors based on the second relationship network includes:
[0023] At preset time intervals, the second relationship network is obtained multiple times to obtain the first relationship network sequence of users and resource anchors; and the second relationship network sequences of other users and resource anchors are obtained to obtain multiple second relationship network sequences.
[0024] Calculate the similarity between the most recently acquired second relation network in the first relation network sequence and the relation network of each second relation network in each second relation network sequence to obtain the calculation result;
[0025] Based on the calculation results, at least one similar user is selected from other users to obtain a third relationship network sequence between similar users and resource anchors;
[0026] Based on the first and third relational network sequences, obtain the prediction results of the relationship changes between users and resource anchors.
[0027] According to the public cultural resource recommendation method based on graph neural networks provided by the present invention, the step of obtaining the prediction result of the relationship change between users and resource anchors based on the first relationship network sequence and the third relationship network sequence includes:
[0028] In each third relation network sequence, the second relation networks are sorted from largest to smallest according to their relation network similarity to obtain the first-ranked similar relation network.
[0029] In each third relation network sequence, the second relation network obtained after a preset time interval for each similar relation network is obtained to obtain the predicted relation network;
[0030] Based on the predicted relationship network, obtain the predicted results of changes in the relationship between users and resource anchors.
[0031] The public cultural resource recommendation method based on graph neural networks provided by the present invention further includes:
[0032] When no second relationship network exists in the similar relationship network after a preset time interval, the user corresponding to the similar relationship network is excluded from the similar users.
[0033] The present invention also provides a public cultural resource recommendation device based on graph neural networks, comprising the following modules:
[0034] The data processing module is used to process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points.
[0035] The first relation construction module is used to construct a first relation network between multiple cultural resource points and resource anchors based on the resource characteristics and resource anchors of each public cultural resource data. The first relation network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data.
[0036] The second relationship construction module is used to construct a second relationship network between users and resource anchors based on the first relationship network;
[0037] The relationship prediction module is used to obtain the prediction results of the relationship changes between users and resource anchors based on the second relationship network;
[0038] The resource recommendation module is used to obtain recommendation results for public cultural resources based on the relationship change prediction results and the first relationship network, so as to recommend public cultural resources to users based on the recommendation results.
[0039] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the public cultural resource recommendation device method based on graph neural networks as described above.
[0040] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the public cultural resource recommendation device method based on graph neural networks as described above.
[0041] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the public cultural resource recommendation device method based on graph neural networks as described above.
[0042] The present invention provides a public cultural resource recommendation device and method based on graph neural networks. By constructing a first relation network to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data, and constructing a second relation network between users and resource anchors, the method predicts the resource anchors that users may be interested in. This allows the method to recommend the most likely public cultural resources to users based on the resource anchors that users are interested in, and further based on the first relation network. This solves the problem that the current public cultural resources are numerous and the number of registered users is too large to meet the recommendation needs of users. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0044] Figure 1 This is a flowchart illustrating a public cultural resource recommendation method based on graph neural networks provided by the present invention.
[0045] Figure 2 This is a schematic diagram illustrating the principle of a feature extraction model provided by the present invention.
[0046] Figure 3 This is a schematic diagram illustrating the principle of aligning resource features of various resource anchor points provided by the present invention.
[0047] Figure 4 This is a schematic diagram illustrating the principle of a relational network sequence provided by the present invention.
[0048] Figure 5 This is a schematic diagram illustrating the principle of an RNN prediction model provided by the present invention.
[0049] Figure 6 This is a schematic diagram of the structure of a public cultural resource recommendation device based on graph neural networks provided by the present invention.
[0050] Figure 7 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0052] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such descriptions can be used interchangeably where appropriate to allow embodiments to be implemented in a sequence other than that illustrated or described in this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved. The module division described in this application is a logical division. In practical applications, there may be other division methods. For example, multiple modules may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the shown or discussed mutual coupling, direct coupling, or communication connection may be through some interface, and the indirect coupling or communication connection between units may be electrical or other similar forms, none of which are limited in this application. Furthermore, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units. Some or all of the units can be selected to achieve the purpose of the solution in this application according to actual needs.
[0053] The following is combined with Figures 1-7 The specific contents of this invention are described below.
[0054] Figure 1 This is one of the flowcharts illustrating the public cultural resource recommendation method based on graph neural networks provided by this invention, such as... Figure 1 As shown, the method includes steps S101-S105.
[0055] Step S101: Process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points.
[0056] In embodiments of the present invention, public cultural resources can be various cultural relics exhibits in museums, cultural centers, or exhibition halls. Each individual museum, cultural center, or exhibition hall corresponds to one set of public cultural resource data, and any set of public cultural resource data includes multiple cultural resource points. For example, for museum 1, it includes cultural resource points such as cultural relic A, cultural relic B, and cultural relic C, constituting multiple cultural resource points existing in the public cultural resource data. In embodiments of the present invention, museums are used as a type of public cultural resource, and the various cultural relics in the museum are used as cultural resource points. The above description is merely illustrative and is not intended to limit the present invention.
[0057] In embodiments of this invention, multiple public cultural resource data are processed, specifically semantic feature extraction of cultural relic resource data from various museums, and a cultural relic anchor database is constructed for each museum. This process mainly includes three parts: local cultural relic feature calculation, cultural relic anchor selection, and cultural relic anchor feature alignment. The cultural relic resource data primarily consists of digital data such as images, videos, and texts related to cultural relics. During analysis and processing, images and texts of cultural relics are used as the basis for analysis.
[0058] Specifically, step S101 includes steps S1011-S1013.
[0059] Step S1011: Using CLIP as the main architecture, extract the semantic features of cultural resource points according to the resource feature extraction model to obtain the resource features of each cultural resource point.
[0060] like Figure 2 As shown, the entire feature extraction model training consists of two stages. The first stage utilizes existing artifact image-text data pairs, based on the CLIP contrastive learning approach, for initial training. The second stage, after training stabilizes, involves data annotation of the artifacts. This annotation uses existing artifact classification models for multi-label annotation, fusing image and text features through addition. All model parameters except the last layer are frozen, and the classification model is trained. After training, the fused features are output as the final artifact semantic features, with a semantic feature dimension of 1024. In practice, to facilitate data expansion and handle massive datasets, a separate artifact feature extraction model is trained for each museum's data set.
[0061] Step S1012: Select resource anchor points from multiple cultural resource points in each public cultural resource data.
[0062] In this invention, when the cultural resource points are various cultural relics, the resource anchor points are the cultural relic anchor points. The selection of cultural relic anchor points involves choosing representative data points from numerous cultural relic data resources and making recommendations and feature alignment around these anchor points.
[0063] For example, firstly, based on existing classification methods and experience, existing cultural relics are simply divided according to year, material, and type. Within each subclass, deep clustering is used to generate several cluster centers for each subclass. For each cluster center, the most similar cultural relic is selected as the anchor relic, and its characteristics are used as anchor features. Then, resource anchors are selected from multiple cultural resource points in each public cultural resource data.
[0064] Step S1013: Select a reference anchor point from multiple resource anchor points, and align the resource characteristics of each resource anchor point according to the reference anchor point.
[0065] Figure 3 This is a schematic diagram illustrating the principle of aligning resource features of various resource anchor points provided by the present invention. The feature alignment of cultural relic anchor points is used to align the cultural relic feature extraction models of different museums. The framework structure is as follows: Figure 3 As shown, targeting the data features of Museum 1, a feature transformation module consisting of two fully connected layers is added before the last classification layer of the artifact feature extraction model 2. This module aligns the artifact feature extraction model 2 with the artifact feature extraction model 1, freezing the parameters of other layers. The specific steps are as follows: First, obtain the features of the artifact anchor points of Museum 1 under artifact feature extraction model 1, i.e., the features of the Museum 1 anchor points; second, obtain the features of the artifact anchor points of Museum 1 under artifact feature extraction model 2, after passing through the feature transformation module (…). Figure 3 The dashed line represents the transformed anchor point features of Museum 1; the transformed features of the artifact anchor points of Museum 2 under artifact feature extraction model 2 are obtained. Figure 3 Alignment loss and classification loss are calculated separately, and the alignment loss and classification loss are added together as the final loss. The parameters of the feature transformation module are optimized so that the cultural relic feature extraction model 2 is aligned with the cultural relic feature extraction model 1.
[0066] For other public cultural resources such as Museum 3 and Museum 4, the resource anchor point of Museum 1 is used as the benchmark anchor point. The above method is used in sequence to complete the resource feature alignment of each resource anchor point, thereby realizing the model parameter alignment of the cultural relic feature extraction model corresponding to each museum.
[0067] In embodiments of the present invention, the cultural relic feature extraction model used as a benchmark is generally constructed from a wider variety of cultural relic data to ensure that other museum anchor cultural relics can be matched in the benchmark.
[0068] Step S102: Based on the resource characteristics and resource anchors of each public cultural resource data, construct a first relationship network between multiple cultural resource points and resource anchors. The first relationship network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data.
[0069] In embodiments of the present invention, for each museum, there is a corresponding first relationship network used to characterize the resource similarity between each cultural relic and its anchor point in that museum. That is, based on the resource characteristics and resource anchor points of each public cultural resource data, the resource similarity between multiple cultural resource points and their anchor points in each public cultural resource data is calculated, as detailed in the following embodiments.
[0070] In one possible implementation, based on the resource characteristics and resource anchors of each public cultural resource data, a first relationship network between cultural resource points and resource anchors is constructed, including:
[0071] Step S1021: Calculate the feature similarity between each cultural resource point and the resource anchor point based on the resource characteristics of each public cultural resource data.
[0072] For example,
[0073] For each museum, after the artifact anchor points are constructed, the artifact features of each artifact are normalized, and the similarity between the artifact features and the anchor point features is calculated sequentially. For artifact 1, the similarity is... For artifact 2, the similarity is... For cultural relic n, the similarity is ;
[0074] in , arrive These are the characteristics of cultural relics 1, 2, up to n. Anchor point features.
[0075] Step S1022: Based on the feature similarity between each cultural resource point and the resource anchor point, the first relationship network is obtained.
[0076] Specifically, artifacts are treated as nodes in a graph, artifacts and anchor points are treated as edges, and the similarity between artifacts and anchor points is the weight of the edges. A artifact-anchor point relationship network is constructed for each museum, resulting in the first relationship network.
[0077] Step S103: Based on the first relationship network, construct a second relationship network between users and resource anchors.
[0078] In an embodiment of the present invention, a second relationship network between users and resource anchors is used to record users' browsing history preferences, wherein users and resource anchors are graph nodes, and the weight of the edge between users and resource anchors represents the degree of user interest in resource anchors.
[0079] An example user can view artifact data from multiple museums, so the anchor artifacts associated with the user cover all museum anchor artifact data, and duplicate artifact anchors are removed.
[0080] In one possible implementation, a second relationship network between users and resource anchors is constructed based on the first relationship network, including steps S1031-S1034. Steps S1031-S1034 are used to obtain the initial second relationship network between users and resource anchors.
[0081] S1031, obtain the cultural resource points browsed by the user within the historical time period, and obtain at least one first cultural resource point.
[0082] Specifically, this includes querying the types of artifacts in museums that a user has visited during a historical period, including artifact 1 in museum 1 and artifacts 2 and 3 in museum 2.
[0083] Step S1032: Based on the first relationship network, query the first resource anchor point corresponding to the first cultural resource point; at the same time, obtain the resource similarity between the first cultural resource point and the first resource anchor point.
[0084] Query the first relation network of Museum 1 to find the cultural relic anchor point corresponding to cultural relic 1, and obtain the resource similarity Q1 between cultural relic 1 and cultural relic anchor point 1; at the same time, query the first relation network of Museum 2 to find the cultural relic anchor points corresponding to cultural relic 2 and cultural relic 3, and obtain the resource similarity Q2 and Q3 between cultural relic 2 and cultural relic anchor point 2, respectively.
[0085] Step S1033: Based on the resource similarity between the first cultural resource point and the first resource anchor point, obtain the association weight between the user and the first resource anchor point.
[0086] At this point, for artifact anchor point 1 of Museum 1, the association weight is Q1; for artifact anchor point 2 of Museum 2, the association weight is Q2+Q3.
[0087] Step S1034: Construct a second relationship network based on the association weight between the user and the first resource anchor.
[0088] Finally, a second relationship network is constructed based on the association weight Q1 between the user and the cultural relic anchor point 1, and the association weight Q2+Q3 between the user and the cultural relic anchor point 2.
[0089] In one possible implementation, constructing a second relationship network between users and resource anchors based on the first relationship network further includes steps S1035-S1037.
[0090] In an embodiment of the present invention, each time a user browses cultural relic data, the edge weights of the user-resource anchor relationships are calculated and updated according to the first relationship network of cultural relic-anchor points, decreasing sequentially according to the proportion of browsing time. The steps for calculating and updating the edge weights of the user-resource anchor relationship are as follows:
[0091] Step S1035: When a user generates browsing records of cultural resource points after a historical time period, obtain the second cultural resource point browsed by the user.
[0092] For example, when a user generates a browsing record of a cultural resource point after a historical period, it is recorded that the user has browsed artifact 4 in museum 3.
[0093] Step S1036: Based on the first relationship network, obtain the second resource anchor point corresponding to the second cultural resource point, and at the same time, obtain the resource similarity between the second cultural resource point and the second resource anchor point.
[0094] Based on the first relationship network of Museum 3, obtain the second resource anchor point (cultural relic anchor point 3) corresponding to the second cultural resource point (cultural relic 4), and at the same time, obtain the resource similarity (Q4) between the second cultural resource point and the second resource anchor point.
[0095] Step S1037: Update the second relationship network based on the resource similarity between the second cultural resource point and the second resource anchor point.
[0096] At this point, in the second relationship network, the weight correspondence between the newly added cultural relic anchor point 3 and the user is established.
[0097] It should be noted that when a user generates new browsing history, the following situations may also occur:
[0098] When a user's browsing history for cultural resource points is generated after a historical period, it is recorded that the user viewed artifact 5 in Museum 1.
[0099] Based on the first relationship network of Museum 1, obtain the resource similarity Q5 between artifact 5 and artifact anchor 1 in Museum 1.
[0100] At this point, the association weight between the user and the cultural relic anchor point 1 is updated to A*Q1+B*Q5, for example, A is 99% and B is 1%.
[0101] Specifically, in updating the second relationship network, the primary source of the association weight for resource anchors already existing in the network should be the cultural resource points recently viewed by the user. However, this update needs to be gradual. Therefore, during the update of the association weight between the user and cultural relic anchor 1, for the cultural resource points corresponding to the same resource anchor, the weight ratio B of newly viewed cultural resource points should be much smaller than the weight ratio A of historically viewed cultural resource points, in order to achieve a gradual update of the second relationship network.
[0102] Step S104: Based on the second relationship network, obtain the prediction results of the relationship changes between users and resource anchors.
[0103] In one possible implementation, the prediction results of the relationship change between the user and the resource anchor are obtained according to the second relationship network, including steps S1041-S1044.
[0104] S1041, according to a preset time interval, the second relationship network is obtained multiple times to obtain the first relationship network sequence of users and resource anchors; and, the second relationship network sequence of other users and resource anchors is obtained to obtain multiple second relationship network sequences.
[0105] In an embodiment of the present invention, the user's second relationship network is acquired multiple times at preset time intervals to obtain a first relationship network sequence between the user and resource anchors. First relational network sequence include M represents the total number of second relation networks obtained for each user. Simultaneously, a sequence of second relation networks between other users and resource anchors is obtained, resulting in multiple second relation network sequences. For users 1 to n, the second relation network sequences are respectively... For the nth other user, the second relational network sequence include .
[0106] In each of the above relational network sequences, Sort from 1 to m according to the time of acquisition.
[0107] In one possible implementation, for any one Before performing the following steps, edges with weights less than a preset weight and their corresponding resource anchors are removed from the second relation network of the user's anchor, resulting in a new... Used for subsequent prediction steps. For example, in an embodiment of the present invention, the preset weight value is 0.1.
[0108] S1042, calculate the relationship network similarity between the most recently acquired second relationship network in the first relationship network sequence and each second relationship network in each second relationship network sequence, and obtain the calculation result.
[0109] Calculate the first relational network sequence The most recent acquisition The similarity between the relation network and each second relation network in each second relation network sequence is used to obtain the calculation result.
[0110] For example, the second relational network sequence of the nth other user. That is, calculate separately and The similarity of the relational networks is calculated to obtain the results.
[0111] In embodiments of the present invention, any second relationship network is a one-dimensional data structure, including the association weights between users and various resource anchors. For = ( ); = ( Let k be the one-dimensional data length of the second relationship network. When the one-dimensional data lengths of the two second relationship networks are different, the shorter data length is padded with null values to reach the longer data length, and then the relationship network similarity is calculated. The formula for calculating relationship network similarity is as follows:
[0112]
[0113] S1043, Based on the calculation results, at least one similar user is selected from other users to obtain a third relationship network sequence between similar users and resource anchors.
[0114] Obtain all computation results from the first other user to the nth other user. For the nth other user, in the second relational network sequence... middle, To and The second relationship network with the highest similarity to the existing relationship network.
[0115] The second relational network sequence of each other user is obtained sequentially. The second relationship network with the highest similarity Set a preset similarity threshold. Regarding the aforementioned second relationship network Perform filtering. Result in values greater than or equal to a preset similarity threshold. The second relationship network.
[0116]
[0117] The similar users are identified as other users 1, other users 2, other users 3, other users 4, and other users 5. The third relationship network sequence is the relationship network sequence corresponding to other users 1-5. .
[0118] S1044, Based on the first relationship network sequence and the third relationship network sequence, obtain the prediction results of the relationship change between users and resource anchors.
[0119] In an embodiment of the present invention, based on a user's first relationship network sequence and a third relationship network sequence of similar users, the changes in the user's first relationship network sequence in subsequent time periods can be predicted by observing the changes in the third relationship network sequence.
[0120] In one possible implementation, the prediction results of the relationship change between the user and the resource anchor are obtained based on the first relationship network sequence and the third relationship network sequence, including S1044A-S1044C.
[0121] S1044A: In each third relation network sequence, sort the second relation networks from largest to smallest according to relation network similarity to obtain the first-ranked similar relation network.
[0122] Specifically, within each third relation network sequence, the second relation networks are sorted from highest to lowest similarity to obtain the top-ranked similar relation network. The top-ranked similarity networks are as follows: ,like Figure 4 In the context of relational network sequences The shaded area is shown. The first relational network sequence... The most recent acquisition (In this embodiment, m is 10), and Alignment, see Figure 4 .
[0123] S1044B, in each third relation network sequence, obtain the second relation network obtained after a preset time interval for each similar relation network, and obtain the predicted relation network.
[0124] like Figure 4 As shown, the dashed arrows correspond to the predicted relational network sequences. The m-th (10th) is the predictive relation network. .
[0125] In embodiments of the present invention, the predictive relationship network can be obtained in the following ways:
[0126] For the first relation network in the predicted relation network sequence In other words, the relationship network corresponding to the dashed arrows includes... and ,according to and The results are obtained by superimposing the weights according to the preset weights. Similarly, the relationship network is obtained sequentially. .
[0127] In embodiments of the present invention, the predictive relationship network can also be obtained in the following ways:
[0128] Prediction model structure as follows Figure 5 As shown, this is the UNet graph structure based on RNN for temporal relationships, with a fixed temporal length of 10. Before input, the graph structure of the input sequence is adjusted to be the same. Since the second relationship network structure of the user-anchor point is relatively simple, two layers of graph downsampling are used for aggregation, and RNN is used to obtain temporal relationship features. Finally, one layer of graph upsampling is used to obtain the weight change prediction result of the second relationship network of the current user-anchor point.
[0129] S1044C: Based on the predicted relationship network, obtain the prediction results of the relationship changes between users and resource anchors.
[0130] In one possible implementation, the method of obtaining the prediction result of the relationship change between the user and the resource anchor based on the first relationship network sequence and the third relationship network sequence further includes step S1044D.
[0131] Step S1044D: When there is no second relationship network in the similar relationship network after a preset time interval, the user corresponding to the similar relationship network is excluded from the similar users.
[0132] Specifically, if no second relationship network exists in the similarity relationship network after a preset time interval, it means that the relationship network sequence of the similar users lacks subsequent reference value. The users corresponding to the similarity relationship network are excluded from the similar users to avoid interfering with the prediction results of relationship changes.
[0133] Step S105: Based on the relationship change prediction results and the first relationship network, obtain the recommendation results of public cultural resources, and recommend public cultural resources to users based on the recommendation results.
[0134] For example, based on the obtained prediction results For each museum, the first relationship network of its artifacts and anchor points is obtained, and then, according to the corresponding weights, it is compared with the relationship change prediction results. The scores are multiplied and added to the corresponding cultural relics. The top 5 cultural relic data points with the highest scores are the current museum's recommendation results. All museum recommendation results and scores are statistically analyzed, and the top 10 highest-scoring cultural relic data points are selected as the final recommendation results to the user.
[0135] By employing the above method, the present invention can achieve at least one of the following beneficial effects:
[0136] 1. By constructing a first relation network to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data, and constructing a second relation network between users and resource anchors, we can predict the resource anchors that users will be interested in later. This allows us to recommend the public cultural resources that users are most likely to be interested in based on the resource anchors that users are interested in, and further based on the first relation network. This solves the problem that there are many public cultural resources and a large number of registered users, making it difficult to associate and recommend them, and thus failing to meet users' recommendation needs.
[0137] 2. By calculating the feature similarity between cultural resource points and resource anchor points to construct the first relationship network, the inherent connections and similarities between cultural resources can be accurately reflected, providing a reliable foundation for subsequent recommendations.
[0138] 3. Construct a second relationship network between users and resource anchors based on users' historical browsing records, and introduce association weights to measure the degree of association between users and resource anchors, making the recommendation results more personalized and accurate.
[0139] 4. When a user generates new browsing history, the second relationship network can be updated in real time to ensure the timeliness and accuracy of the recommendation results and better adapt to changes in user interests.
[0140] 5. By acquiring and analyzing the relationship network sequence between users and other users, it is possible to predict the changing trend of the relationship between users and resource anchors, perceive changes in user interests in advance, and provide more timely recommendation services.
[0141] The following describes the public cultural resource recommendation device based on graph neural networks provided by the present invention. The public cultural resource recommendation device based on graph neural networks described below can be referred to in correspondence with the public cultural resource recommendation method based on graph neural networks described above.
[0142] like Figure 6 As shown, the present invention also provides a public cultural resource recommendation device based on graph neural networks, comprising the following modules:
[0143] Data processing module 610 is used to process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points.
[0144] The first relationship construction module 620 is used to construct a first relationship network between multiple cultural resource points and resource anchors based on the resource characteristics and resource anchors of each public cultural resource data. The first relationship network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data.
[0145] The second relationship construction module 630 is used to construct a second relationship network between users and resource anchors based on the first relationship network;
[0146] The relationship prediction module 640 is used to obtain the prediction results of the relationship changes between users and resource anchors based on the second relationship network.
[0147] The resource recommendation module 650 is used to obtain recommendation results for public cultural resources based on the relationship change prediction results and the first relationship network, so as to recommend public cultural resources to users based on the recommendation results.
[0148] In one possible implementation, the first relationship construction module 620 is specifically used for:
[0149] Based on the resource characteristics of each public cultural resource data, the feature similarity between each cultural resource point and the resource anchor point is calculated; based on the feature similarity between each cultural resource point and the resource anchor point, the first relationship network is obtained.
[0150] In one possible implementation, the second relationship construction module 630 is specifically used for:
[0151] Obtain the cultural resource points browsed by the user within the historical time period to obtain at least one first cultural resource point; query the first resource anchor point corresponding to the first cultural resource point based on the first relationship network; at the same time, obtain the resource similarity between the first cultural resource point and the first resource anchor point; obtain the association weight between the user and the first resource anchor point based on the resource similarity between the first cultural resource point and the first resource anchor point; construct a second relationship network based on the association weight between the user and the first resource anchor point.
[0152] In one possible implementation, the second relationship construction module 630 is further configured to:
[0153] When a user generates browsing history for cultural resource points after a historical period, the second cultural resource point browsed by the user is obtained; based on the first relationship network, the second resource anchor point corresponding to the second cultural resource point is obtained, and at the same time, the resource similarity between the second cultural resource point and the second resource anchor point is obtained; based on the resource similarity between the second cultural resource point and the second resource anchor point, the second relationship network is updated.
[0154] In one possible implementation, the relationship prediction module 640 includes:
[0155] The relationship acquisition unit is used to acquire the second relationship network multiple times at preset time intervals to obtain the first relationship network sequence of users and resource anchors; and to acquire the second relationship network sequence of other users and resource anchors to obtain multiple second relationship network sequences.
[0156] The similarity calculation unit is used to calculate the similarity between the most recently acquired second relationship network in the first relationship network sequence and the relationship network of each second relationship network in each second relationship network sequence, and to obtain the calculation result.
[0157] The user filtering unit is used to filter out at least one similar user from other users based on the calculation results, and obtain a third relationship network sequence between similar users and resource anchors.
[0158] The result prediction unit is used to obtain the prediction results of the relationship changes between users and resource anchors based on the first relationship network sequence and the third relationship network sequence.
[0159] In one possible implementation, the result prediction unit is specifically used for:
[0160] In each third relationship network sequence, the second relationship networks are sorted from largest to smallest according to their relationship network similarity to obtain the first-ranked similar relationship network; in each third relationship network sequence, the second relationship network obtained after a preset time interval for each similar relationship network is obtained to obtain the predicted relationship network; based on the predicted relationship network, the prediction result of the relationship change between users and resource anchors is obtained.
[0161] In one possible implementation, the user filtering unit is further configured to exclude users corresponding to the similar relationship network from the similar users when no second relationship network exists in the similar relationship network after a preset time interval.
[0162] Figure 7 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 7 As shown, the electronic device may include: a processor 710, a communications interface 720, a memory 730, and a communication bus 740, wherein the processor 710, the communications interface 720, and the memory 730 communicate with each other via the communication bus 740. The processor 710 can call logical instructions in the memory 730 to execute a public cultural resource recommendation method based on a graph neural network, the method including:
[0163] Process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points.
[0164] Based on the resource characteristics and resource anchors of each public cultural resource data, a first relationship network of multiple cultural resource points and resource anchors is constructed. The first relationship network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data.
[0165] Based on the first relationship network, construct a second relationship network between users and resource anchors;
[0166] Based on the second relationship network, obtain the prediction results of the relationship changes between users and resource anchors;
[0167] Based on the relationship change prediction results and the first relationship network, the recommendation results of public cultural resources are obtained, and public cultural resources are recommended to users according to the recommendation results.
[0168] Furthermore, the logical instructions in the aforementioned memory 730 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0169] On the other hand, the present invention also provides a computer program product, the computer program product comprising a computer program that can be stored on a non-transitory computer-readable storage medium, wherein when the computer program is executed by a processor, the computer is able to execute the public cultural resource recommendation method based on graph neural networks provided by the above methods, the method comprising:
[0170] Process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points.
[0171] Based on the resource characteristics and resource anchors of each public cultural resource data, a first relationship network of multiple cultural resource points and resource anchors is constructed. The first relationship network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data.
[0172] Based on the first relationship network, construct a second relationship network between users and resource anchors;
[0173] Based on the second relationship network, obtain the prediction results of the relationship changes between users and resource anchors;
[0174] Based on the relationship change prediction results and the first relationship network, the recommendation results of public cultural resources are obtained, and public cultural resources are recommended to users according to the recommendation results.
[0175] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the public cultural resource recommendation method based on graph neural networks provided by the methods described above, the method comprising:
[0176] Process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points.
[0177] Based on the resource characteristics and resource anchors of each public cultural resource data, a first relationship network of multiple cultural resource points and resource anchors is constructed. The first relationship network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data.
[0178] Based on the first relationship network, construct a second relationship network between users and resource anchors;
[0179] Based on the second relationship network, obtain the prediction results of the relationship changes between users and resource anchors;
[0180] Based on the relationship change prediction results and the first relationship network, the recommendation results of public cultural resources are obtained, and public cultural resources are recommended to users according to the recommendation results.
[0181] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0182] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0183] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A public cultural resource recommendation method based on graph neural networks, characterized in that, include: Process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points. Based on the resource characteristics and resource anchors of each public cultural resource data, a first relationship network of multiple cultural resource points and resource anchors is constructed. The first relationship network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data. Based on the first relationship network, construct a second relationship network between users and resource anchors; Based on the second relationship network, obtain the prediction results of the relationship changes between users and resource anchors; Based on the relationship change prediction results and the first relationship network, the recommendation results of public cultural resources are obtained, so as to recommend public cultural resources to users according to the recommendation results; The construction of a second relationship network between users and resource anchors based on the first relationship network includes: Obtain the cultural resource points viewed by the user within the historical time period, and obtain at least one primary cultural resource point; Based on the first relationship network, query the first resource anchor point corresponding to the first cultural resource point; at the same time, obtain the resource similarity between the first cultural resource point and the first resource anchor point; Based on the resource similarity between the first cultural resource point and the first resource anchor point, the association weight between the user and the first resource anchor point is obtained; Construct a second relationship network based on the association weights between users and the first resource anchor point; The step of obtaining the prediction results of the relationship change between users and resource anchors based on the second relationship network includes: At preset time intervals, the second relationship network is obtained multiple times to obtain the first relationship network sequence of users and resource anchors; and the second relationship network sequences of other users and resource anchors are obtained to obtain multiple second relationship network sequences. Calculate the similarity between the most recently acquired second relation network in the first relation network sequence and the relation network of each second relation network in each second relation network sequence to obtain the calculation result; Based on the calculation results, at least one similar user is selected from other users to obtain a third relationship network sequence between similar users and resource anchors; Based on the first and third relational network sequences, obtain the prediction results of the relationship changes between users and resource anchors.
2. The public cultural resource recommendation method based on graph neural networks according to claim 1, characterized in that, The first relationship network between cultural resource points and resource anchor points is constructed based on the resource characteristics and resource anchor points of each public cultural resource data, including: Based on the resource characteristics of each public cultural resource data, the feature similarity between each cultural resource point and the resource anchor point is calculated. The first relationship network is obtained based on the feature similarity between each cultural resource point and the resource anchor point.
3. The public cultural resource recommendation method based on graph neural networks according to claim 1, characterized in that, Also includes: When a user generates browsing history of cultural resource points after a historical period, obtain the second cultural resource point browsed by the user. Based on the first relationship network, obtain the second resource anchor point corresponding to the second cultural resource point, and at the same time, obtain the resource similarity between the second cultural resource point and the second resource anchor point; Update the second relationship network based on the resource similarity between the second cultural resource point and the second resource anchor point.
4. The public cultural resource recommendation method based on graph neural networks according to claim 1, characterized in that, The step of obtaining the prediction results of the relationship change between users and resource anchors based on the first relationship network sequence and the third relationship network sequence includes: In each third relation network sequence, the second relation networks are sorted from largest to smallest according to their relation network similarity to obtain the first-ranked similar relation network. In each third relation network sequence, the second relation network obtained after a preset time interval for each similar relation network is obtained to obtain the predicted relation network; Based on the predicted relationship network, obtain the predicted results of changes in the relationship between users and resource anchors.
5. The public cultural resource recommendation method based on graph neural networks according to claim 4, characterized in that, Also includes: When no second relationship network exists in the similar relationship network after a preset time interval, the user corresponding to the similar relationship network is excluded from the similar users.
6. A public cultural resource recommendation device based on graph neural networks, characterized in that, include: The data processing module is used to process multiple public cultural resource data to obtain the resource characteristics and resource anchor points of each public cultural resource data. Each public cultural resource data includes multiple cultural resource points. The first relation construction module is used to construct a first relation network between multiple cultural resource points and resource anchors based on the resource characteristics and resource anchors of each public cultural resource data. The first relation network is used to characterize the resource similarity between multiple cultural resource points and resource anchors in each public cultural resource data. The second relationship construction module is used to construct a second relationship network between users and resource anchors based on the first relationship network; The relationship prediction module is used to obtain the prediction results of the relationship changes between users and resource anchors based on the second relationship network; The resource recommendation module is used to obtain recommendation results of public cultural resources based on the relationship change prediction results and the first relationship network, so as to recommend public cultural resources to users based on the recommendation results; The construction of a second relationship network between users and resource anchors based on the first relationship network includes: Obtain the cultural resource points viewed by the user within the historical time period, and obtain at least one primary cultural resource point; Based on the first relationship network, query the first resource anchor point corresponding to the first cultural resource point; at the same time, obtain the resource similarity between the first cultural resource point and the first resource anchor point; Based on the resource similarity between the first cultural resource point and the first resource anchor point, the association weight between the user and the first resource anchor point is obtained; Construct a second relationship network based on the association weights between users and the first resource anchor point; The step of obtaining the prediction results of the relationship change between users and resource anchors based on the second relationship network includes: At preset time intervals, the second relationship network is obtained multiple times to obtain the first relationship network sequence of users and resource anchors; and the second relationship network sequences of other users and resource anchors are obtained to obtain multiple second relationship network sequences. Calculate the similarity between the most recently acquired second relation network in the first relation network sequence and the relation network of each second relation network in each second relation network sequence to obtain the calculation result; Based on the calculation results, at least one similar user is selected from other users to obtain a third relationship network sequence between similar users and resource anchors; Based on the first and third relational network sequences, obtain the prediction results of the relationship changes between users and resource anchors.
7. An electronic 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 program, it implements the public cultural resource recommendation device method based on graph neural networks as described in any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the public cultural resource recommendation device method based on graph neural networks as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Article scoring and recommending method of social network
CN104966125A
Network resource recommendation method and device based on knowledge graph entity anchoring
CN113590946A