[0046] Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary only for explaining the present invention and should not be construed as limiting the present invention.
[0047] Those skilled in the art will understand that unless otherwise stated, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the word "comprising" used in the description of the present invention refers to the presence of said features, integers, steps, operations, elements and/or components, but does not exclude the presence or addition of one or more other features, Integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Additionally, "connected" or "coupled" as used herein may include wirelessly connected or coupled. As used herein, the term "and/or" includes any and all combinations of one or more of the associated listed items.
[0048] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It should also be understood that terms such as those defined in commonly used dictionaries should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless defined as herein explain.
[0049] In order to facilitate the understanding of the embodiments of the present invention, several specific embodiments will be taken as examples for further explanation below in conjunction with the accompanying drawings, and each embodiment does not constitute a limitation to the embodiments of the present invention.
[0050] The embodiment of the present invention makes full use of the scoring matrix of user items, item attribute information, and user-item attribute associations to construct a heterogeneous graph network, uses graph neural network methods to learn representations of users and items, and makes more accurate recommendations.
[0051] The embodiment of the present invention designs a learning method based on graph neural network on heterogeneous graph learning, without any offline calculation of similarity and exchange matrix or design of knowledge representation structure based on random walk, thereby improving recommendation efficiency.
[0052] The embodiment of the present invention designs a graph neural network learning method to learn the user's more fine-grained preference for item attributes, and distinguish the item's attributes into different views to learn the influence of different views on different users' preferences, so as to personalize for different users Recommendation, improve the recommendation effect.
[0053] At present, due to the fact that the research on cross-domain recommendation algorithms does not fully consider the attribute characteristics between items to learn the representation of items, it is difficult to realize personalized recommendations based on the influence of different attributes of items on users. This invention will use heterogeneous graphs to represent heterogeneous Based on the characteristics of the association relationship between qualitative nodes, combined with multi-field item association relationships and the original user-item scoring matrix, a heterogeneous graph composed of users and item nodes in the aggregated auxiliary domain and target domain is established. The preferences of users and item attributes are learned.
[0054] Most of the existing heterogeneous graph-based algorithms are artificial algorithms or offline similarity calculations based on meta-paths, and there is still room for development in terms of computing power, spatial performance, and recommendation effects. For this reason, the present invention proposes a multi-view learning method oriented to item attributes, and applies it to cross-domain recommendation scenarios, constructs heterogeneous graphs according to attributes for multiple items in different fields, establishes an end-to-end model, and conducts more effective personalized It has important theoretical significance and application value.
[0055] The schematic diagram of the implementation principle of a cross-domain recommendation method based on multi-view knowledge representation proposed by the present invention is as follows image 3 As shown, mainly through image 3 The first two modules are used to build the model, and the third module is used for preference prediction across domain recommendations.
[0056] Module 1: cross-domain multi-view construction, the main function is to integrate the project data sets of the source domain and the target domain, use the similar attributes of the items as the basis for view division, and integrate different items into a view (one view in a view) Items with similar properties are represented in the form of heterogeneous graphs), utilizing all subgraphs to form multiple views. Each view is used as the input of the graph attention network, and the initial knowledge representation of the item under each view is obtained through the graph attention network.
[0057] Module 2: Multi-head attention design, the same item will appear in multiple views due to different attributes. This stage is mainly for the initial knowledge representation of the project obtained from different views, and the initial knowledge representation of the project in each view is used as the input of the multi-head attention network, and the project knowledge with user preferences in different views is obtained through the multi-head attention network. The representation vector integrates the item knowledge representation vectors with user preferences in different views to obtain the final knowledge representation vector of items with user preferences.
[0058] Module 3: Preference prediction design in cross-domain scenarios. By designing preference prediction, the target field is recommended to the user according to the final knowledge representation of the project with user preferences and the information of the target field.
[0059] Related parameter definition
[0060] Definition 1: Heterogeneous Graph
[0061] In the traditional Homogeneous Graph, there is only one type of node and edge in the graph data, while the heterogeneous information network (Heterogeneous Information Networks, HIN) can represent the directed picture, Figure 4 It is a schematic representation of a heterogeneous graph, such as Figure 4 As shown, the formal definition of heterogeneous graph is as follows:
[0062] (1) Directed graph G(ν,ε), where ν is the entity set and ε is the relationship set between entities;
[0063] (2) Two type mapping functions: f e (ν)->O,f r (ε)->R, where O is the entity type and R is the relationship type;
[0064] (3) If |O|+|R|>2, then G(ν,ε) is called HIN
[0065]The data set in the embodiment of the present invention is organized according to the heterogeneous graph described in Definition 1, where the node types of the data are items and attributes, and the edge types are item-item and item-attribute respectively. like Figure 4 shown.
[0066] Graph neural network is a neural network for processing graph-structured data. It iteratively aggregates the local neighborhood structure information of nodes on the graph to generate a low-dimensional knowledge representation of the node. In the embodiment of the present invention, the multi-view attention network in the graph neural network is adopted, which is defined as follows:
[0067] Graph Attention Network: Use the attention mechanism to learn different weights for each neighbor node (Equation 4.1) to distinguish the contribution of different neighbor nodes to the knowledge representation of the target node, which updates the knowledge representation of the node through iterative learning (4.2) and The attention size of its surrounding nodes.
[0068] Attention weight:
[0069]
[0070] Multi-view attention network: train multiple independent attention networks, and then stitch together the knowledge representations of nodes in different views to aggregate the knowledge representations as the final knowledge representation of nodes. The final knowledge representation of each item with user preference is integrated by using multiple trained attention networks to obtain the final knowledge representation of the item with user preference.
[0071] The final knowledge representation vector of items with user preferences is a knowledge representation vector that includes the integration of multiple factors. The multiple factors include the information of each view (attribute) of the item, the user's preference information on the item, and the weight of these factors on the final knowledge representation vector of the item with user preference.
[0072] Program description
[0073] Module 1: Cross-domain multi-view construction
[0074] Usually, the single-domain heterogeneous graph information includes user item rating data, and contains item attribute information, user information and other data. These characteristics of raw data in multiple fields are not convenient for intuitive analysis of the overall characteristics of the data, and are not conducive to subsequent data modeling and analysis. Therefore, the present invention first needs to preprocess the data. In actual data, there are multiple types of relationships between items, and items in different fields also have many similar relationships. The embodiment of the present invention first uses the one-hot (one-hot encoding, also known as one-bit effective encoding, of which The method is to use N bits of state bits to encode N states. Each state has its state bits, and at any time, only one of them is valid) vector z j As the initial embedding representation of items, integrate all items in different domains into a heterogeneous graph structure, construct items with the same or similar attribute relationship types in different domains in a heterogeneous graph form view, and then according to domain Construct subgraphs of different perspectives, that is, different views, according to the attribute types of different items, that is, construct a corresponding number of views according to the number of attributes.
[0075] Figure 5 It is a schematic diagram of a cross-domain multi-view construction process provided by an embodiment of the present invention. like Figure 5 As shown in , for example, a view is constructed according to the theme attributes of the book field and the movie field, so that books and movies of the same theme are connected in sub-views. After the multi-view construction is completed, the next step is to perform representation learning. The items under each view are separately learned by graph attention, and the graph attention network is used to learn the knowledge representation of the neighbor nodes around the aggregation item, learn and distinguish the influence of each neighbor node, and aggregate to obtain the initial value of the item under each view. knowledge representation
[0076] Module 2: Multi-head Attention Design
[0077] The graph attention network can well aggregate the neighbor node information in the graph structure data, so in the embodiment of the present invention, after constructing knowledge representation through cross-domain multi-view, the graph attention network is further designed to aggregate the neighborhoods of items under different views respectively Information is incorporated into knowledge representation. Considering that different users have different preferences for different items, the multi-head attention design is divided into two parts. The first part is the multi-head attention layer, which is used to learn the different knowledge representations of users for input under each view. The preferences of the components further construct the project knowledge representation; the second part is the view layer, which is used to learn the user's preferences for the items in the view under different views, and construct the final knowledge representation vector of the project.
[0078] (1) Multi-head attention layer
[0079] Multi-head attention refers to the use of multiple memory modules to learn the component information of an item, which is equivalent to a component and can be intuitively imagined as different components of the input information. In the multi-head attention layer design part, the initial knowledge representation of the project obtained in the previous module Use the multi-head attention network to represent the component information of further learning items for the items under a single view, and use the memory module to store each component information, and integrate the user vector and attention, highlight the most influential part, and then aggregate these information to get Item knowledge representation under each attention Such as formula 4.3, where s represents a view, γ represents a memory module in the view, and τ represents the number of memory modules. Furthermore, the attention form is shown in Equation 4.4. Item knowledge representations in different domains are fully learned under each view, Image 6 A schematic diagram of a multi-head attention layer provided for an embodiment of the present invention, such as Image 6 shown.
[0080] Item Knowledge Representation Aggregated by Multiple Memory Modules:
[0081]
[0082] Attention form:
[0083]
[0084] beta uγ is the attention parameter
[0085] (2) View layer
[0086] In the view layer, the item knowledge representation vector with specific user preferences under different views finally obtained by the multi-head attention layer As input, use the attention layer for further learning, and output the knowledge representation of the item vector of the view layer. Because different views have different influences on the user's preference, the user's representation vector p is fused here u , to model and distinguish item knowledge representations from different perspectives and item knowledge representations from user preferences to the view layer Contributions to fully learn item knowledge representations in both source and target domains for recommendation in the target domain. Figure 7 A schematic diagram of a view layer provided by an embodiment of the present invention, such as Figure 7 shown. The final result is a heterogeneous graph item knowledge representation belonging to items with respect to multiple views and user preferences. Here, the embodiment of the present invention has completed the construction of cross-domain project multi-view knowledge representation.
[0087] View layer item knowledge representation:
[0088] Module 3: Design of Preference Prediction Algorithm
[0089] The embodiment of the present invention obtains item knowledge representation φ with preferences for different views and users through attention (u,j) , and then combine the target domain item knowledge representation with the user item U-I scoring matrix of the target domain (including the user feature vector p u and item feature vector q j The knowledge representation of the inner product of ) to get the knowledge representation of the project users in the target domain ψ (u,j) , and then use MLP (multi-layer perceptron in machine learning) to aggregate (splicing) these two information for training to make preference prediction. MLP assigns different weights to the final knowledge representation of items with user preferences and the knowledge representation of items by users in the target domain, learns the user's preference information for each item in the target domain, and then recommends the user's preference information in the target domain corresponding item.
[0090] Figure 8 It is a partial schematic diagram of a joint knowledge representation provided by the embodiment of the present invention. like Figure 8 shown. The loss function for rating prediction should also incorporate user preference information in the target domain.
[0091] Final project knowledge representation:
[0092] Preference Prediction: Represents fully connected networks (4.7)
[0093] p u Represents the user feature vector in the target domain, q j Represents the target field item feature vector, p u ⊙q j Represents the knowledge representation vector of the scoring matrix obtained by the Hadamard product of these two vectors. Represents the Hadamard product of the user feature vector in the target domain and the final knowledge representation vector of the item with user preferences, and || is a vector splicing operation.
[0094] The pseudocode of a cross-domain knowledge representation and preference prediction algorithm proposed by the embodiment of the present invention is as follows: Figure 9 shown.
[0095] To sum up, the embodiment of the present invention proposes a multi-view learning method oriented to item attributes, and applies it to cross-domain recommendation scenarios. A heterogeneous graph is constructed according to attributes for multiple items in different fields, and an end-to-end model is established. More effective personalized recommendation has important theoretical significance and application value.
[0096] In the embodiment of the present invention, in the heterogeneous graph knowledge representation learning method, the method of multi-view attention network is adopted. By setting up a multi-view and multi-head attention network learning method, we can fully learn item knowledge representation and make cross-domain recommendation, thereby improving the recommendation effect. By fusing the preference information of different users, the designed preference prediction algorithm combines the final item knowledge representation learned by the model and the user-item scoring matrix in the target domain, and finally jointly calculates the user's preference prediction for items in the target domain, which also solves the single-domain problem. Data sparsity and cold start problems in recommendation.
[0097] The embodiment of the present invention fully considers the same attribute characteristics of items in different fields, considers the impact of each component of data on users, and makes full use of the rating matrix of user items and their attribute information to construct item knowledge representation, and uses graph neural network to learn The method learns to make recommendations, and is applied to recommendation tasks to make more accurate recommendations.
[0098] Those skilled in the art can understand that the accompanying drawing is only a schematic diagram of an embodiment, and the modules or processes in the accompanying drawing are not necessarily necessary for implementing the present invention.
[0099] It can be known from the above description of the implementation manners that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM, disk , CD, etc., including several instructions to make a computer device (which may be a personal computer, server, or network device, etc.) execute the methods described in various embodiments or some parts of the embodiments of the present invention.
[0100]Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for relevant parts, refer to part of the description of the method embodiments. The device and system embodiments described above are only illustrative, and the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, It can be located in one place, or it can be distributed to multiple network elements. Part or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. It can be understood and implemented by those skilled in the art without creative effort.
[0101] The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.