CN115545834B - Personalized service recommendation method based on graphic neural network and metadata - Google Patents

Personalized service recommendation method based on graphic neural network and metadata Download PDF

Info

Publication number
CN115545834B
CN115545834B CN202211233361.1A CN202211233361A CN115545834B CN 115545834 B CN115545834 B CN 115545834B CN 202211233361 A CN202211233361 A CN 202211233361A CN 115545834 B CN115545834 B CN 115545834B
Authority
CN
China
Prior art keywords
service
user
node
preference
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211233361.1A
Other languages
Chinese (zh)
Other versions
CN115545834A (en
Inventor
翁和
王东京
张新
俞东进
陈建江
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Dianzi University
Original Assignee
Hangzhou Dianzi University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Dianzi University filed Critical Hangzhou Dianzi University
Priority to CN202211233361.1A priority Critical patent/CN115545834B/en
Publication of CN115545834A publication Critical patent/CN115545834A/en
Application granted granted Critical
Publication of CN115545834B publication Critical patent/CN115545834B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a personalized service recommendation method based on a graph neural network and metadata. Modeling a historical service interaction record of a user in a undirected graph, wherein the graph represents interaction behavior of the user and the service and the relationship between the service and between the service and metadata thereof; the graph neural network calculates and obtains the characteristic expression vector of each node according to the connection relation between the nodes in the current graph; and then, respectively carrying out fusion calculation on the nodes of different types by using methods such as linear transformation, attention mechanism and the like. The invention refines the main motivation of users when selecting services from three angles of service, provider and category and generalizes the development trend of the service preference of the users into three parts of long term, short term and dynamic so as to cope with the variability of the user preference; the introduction of metadata enriches the feature representation of the service, and accurate recommendation about the service can still be realized under the conditions of cold start and data sparseness.

Description

Personalized service recommendation method based on graphic neural network and metadata
Technical Field
The invention relates to the field of data mining and recommending systems, in particular to a personalized service recommending method based on a graphic neural network and metadata.
Background
With the vigorous development of information technology, compared with the traditional material and goods supply, the application service supply system based on digital information assets is mature gradually. Application service providers are businesses that configure, lease, and solution to businesses or individuals over a network, which have long incorporated the everyday life of the general public, such as mobile phone mobile communication services, streaming media push services, computing resource lease services, etc.
The service provider continuously strengthens the advantages of the product and widens and refines the requirements of the application scene so as to improve the advantages of the product. This makes service products from different companies and different series on the market very wide, and gives individuals or enterprise users a problem of "information overload" when selecting services-users cannot quickly locate services meeting the target requirements. Therefore, a method is needed to integrate the service commodity information in the current market, and recommend service commodities according to the user's expected service commodity information according to the user's history interaction record.
The current mainstream recommendation methods include traditional methods such as collaborative filtering, community recommendation, matrix decomposition and the like; there are also methods based on deep learning, such as RNN-based sequence recommendation algorithm, LSTM-based timing recommendation algorithm, etc. However, the above method generally models interaction records between users and articles, and does not deeply mine other characteristics of the articles, so that more accurate recommendation cannot be given. Currently, two major challenges faced by service recommendation systems are as follows: firstly, the user selects a service class to be affected by various factors, such as charge, provider, service class, etc., and specific factors affecting user preference need to be comprehensively and deeply examined; second, the user's demand for services is also often changing, and the model needs to be able to sensitively capture user preference transitions to provide more accurate service recommendations.
Disclosure of Invention
After the limitation depth investigation of the existing mainstream method, the invention provides a personalized service recommendation method based on a graph neural network and metadata.
Aiming at the interaction behavior of a user and a service, including commodity purchase, song listening, subscription flow and the like, the method is expressed by the characteristics of rich service through merging metadata information (provider, service class) of the service, and the distinction and the connection between different services are enhanced; and modeling the service sequence record of the user interaction and the relationship between the metadata and the service according to the recent service history sequence record of the user by a graph structure. The interactive record graph of the user is an undirected graph and comprises the user, the service, the provider and the category nodes. Based on this graph, the graph neural network can obtain their feature representation vectors from the relationships between the different nodes. Finally, the feature representation vector is fused and refined into the service preference vector representation of the user by using an attention mechanism and a linear transformation mode, and recommendation scores of different services can be obtained through operation with the service feature representation vector.
The personalized service recommendation method based on the graph neural network and the metadata comprises the following steps:
step (1) obtaining a service history sequence record of a user and provider and category information corresponding to the service as an interaction record of the service;
step (2), according to the time sequence of service interaction in the interaction records of the service obtained in the step (1), sequencing the interaction records in ascending order; grouping the interaction records according to the ID of the user; establishing a mapping dictionary L of each service, provider and category;
step (3) constructing a user service sequence diagram G u (V, E) comprising a service history sequence record of the user over a given time frame, the user's interaction with the service, the user's interaction with the provider, the user's interaction with the category, and the relationship between the service and the provider, the service and the category; the user service sequence diagram G u There are four types of nodes in (V, E): users, services, providers, categories.
Step (4) using a graph attention neural network, for a current node in a given user service sequence graph, calculating the attention weight a of a neighbor node j relative to the current node according to neighbor nodes directly connected with the current node ij The feature expression vector v of the neighboring node is reused j And attention weight a ij Is provided for updating the feature representation vector; the final feature representation vector for the user, service, vendor and category is v u ,v s,i ,v p,i ,v t,i
Step (5) constructing a service preference feature expression vector of the user:
representing the feature of the user node by vector v u Long-term preference p as user l
According to the interaction record of the service of the user in a given time range, weighting and calculating by using an attention mechanism, and respectively calculating the service history sequence record in the interaction record of the service and the corresponding provider and category information of the service to obtain the preference p of the user to the service s,s Preference p for suppliers p,s Preference p for categories t,s Normalizing the three preferences by using a layerrnorm method respectively, and finally fusing the three preferences to obtain the complete short-term preference p of the user s
Fusing the last service interacted in the interaction record of the service with the provider and category information corresponding to the service to obtain the dynamic preference p of the user d
Finally, the long-term preference p of the user is set l Short term preference p s And dynamic preference p d Fusion to obtain complete user service preference p;
step (6) transpose of the user's service preference vector and the service feature representation vector are subjected to dot product operation to obtain recommendation scores of each service
Figure GDA0004213723740000031
Obtaining the probability of each service interacted by using softmax function
Figure GDA0004213723740000032
Step (7), the following model parameters and loss functions are set for training the graph neural network model:
according to the batch training data size batch_size, training node characteristic representation vector dimension ebadd_dim, learning rate learning_rate, and user recently interacted service context window size hist_length; a cross entropy loss function is employed.
Preferably, in the step (1), the interaction record of the service is expressed as a sequence consisting of tuples:
u:[(s 1 ,p 1 ,t 1 ),…,(s i ,p i ,t i ),…,(s n ,p n ,t n )]
where u represents the current user ID, s i Representing service ID, p i Representing vendor ID, t i Representing a category ID.
Preferably, in the step (3), when the user service sequence diagram is established, for the first service in the interaction record, the undirected edge is used to connect the user node with the first service node, the provider node corresponding to the user node and the first service, and the user node with the class node corresponding to the first service. See the example in fig. 1 for a specific implementation.
Preferably, in the step (4), the updating rule of the feature expression vector is as follows:
for node i, there is a neighbor node j
Figure GDA0004213723740000041
The characteristic of the node i is expressed as a vector v by the neighbor nodes i Feature representation vector v with node j j Respectively through the same parameter matrix->
Figure GDA0004213723740000042
After linear transformation, the two are spliced and then pass through a vector of weights +.>
Figure GDA0004213723740000043
The set single-layer forward propagation network is activated by using a LeakyReLU activation function, and finally the importance e of the neighbor node j to the node i is obtained ij The method comprises the steps of carrying out a first treatment on the surface of the Calculating the importance of each neighbor node to the node i in the same way, and normalizing the importance by using a softmax function to obtain the attention weight a of each neighbor node ij The method comprises the steps of carrying out a first treatment on the surface of the Where d' represents the matrix dimension.
When the neighbor node features are fused, a multi-head attention computing mode is adopted, K independent attention mechanisms are set, the process of computing the attention weights in the two steps is repeated, and finally, feature expression vectors of all neighbor nodes, the attention weights and a shared parameter matrix W corresponding to the kth attention mechanism are expressed k Multiplying and accumulating, averaging according to the number of the attention mechanisms, and obtaining the feature expression vector v after updating the node i through a sigmoid activation function i The specific calculation mode is as follows:
e ij =LeakyReLU(a T [Wv i ||Wv j ]),
Figure GDA0004213723740000051
Figure GDA0004213723740000052
where || represents two vector concatenation, · T Representing the transpose of the matrix, exp represents the exponential function, sigma (·) represents the sigmoid function.
Preferably, in the step (5), the preference p for the service s,s The calculation mode of (2) comprises the following steps:
firstly, calculating the attention weight of each service in the current historical service sequence U, and expressing the characteristic expression vector v of each service s,i And last service feature representation vector v s,n Respectively by linear transformation W s,1 And W is s,2 Post-summing and adding bias term b 1 Activating by using sigmoid function to obtain fusion feature vector representation h of each service s,i Transpose v of importance of all services to user feature representation vector u T Multiplying and normalizing by softmax function to obtain the attention weight a of each service s,i The method comprises the steps of carrying out a first treatment on the surface of the Finally, weighting and summing the feature vectors of all the services in the current historical service sequence, and normalizing by using a layerrnorm method to obtain the preference p for the services s,s The specific calculation mode is as follows:
h s,i =σ(W s,1 v s,i +W s,2 v s,n +b 1 ),
Figure GDA0004213723740000061
Figure GDA0004213723740000062
the preference p for suppliers p,s The specific calculation mode is as follows:
h p,i =σ(W p,1 v p,i +W p,2 v p,n +b 2 ),
Figure GDA0004213723740000063
Figure GDA0004213723740000064
wherein v is p,i Representing vectors for the characteristics of provider nodes, W p,1 、W p,2 For linear transformation parameter matrix, b 2 Is an offset term, h p,i For each vendor, a) fusing feature vector representations p,i Attention weight for each vendor.
The preference p for category t,s The specific calculation mode is as follows:
h t,i =σ(W t,1 v t,i +W t,2 v t,n +b 3 ),
Figure GDA0004213723740000065
Figure GDA0004213723740000066
wherein v is t,i Representing vectors for characteristics of class nodes, W t,1 、W t,2 For linear transformation parameter matrix, b 3 Is an offset term, h t,i For each class of fused feature vector representations, a t,i Attention weights for each category;
splice three preferences in a short period of a user and then use a linear transformation layer W 1 Fusion is carried out to obtain the complete short-term preference p of the user s The specific calculation mode is as follows:
p s =W 1 (p s,s ||p p,s ||p t,s )
preference p for dynamic services d Representing the last service node characteristicVector v s,n Corresponding service node feature representation vector v p,n Class node feature representation vector v t,n Splicing and reusing linear transformation layer W 2 Fusion is carried out to obtain the dynamic preference of the user, and the specific calculation mode is as follows:
p d =W 2 (v s,n ||v p,n ||v t,n )
for the complete user service preference p, the long-term, short-term and dynamic service preference of the user are spliced and then the linear transformation layer W is used 3 The fusion and specific calculation modes are as follows:
p=W 3 (p l ||p s ||p d )
preferably, in the step (7),
the data size batch_size trained by batch is 256, the dimension of the trained node feature representation vector is 100, the learning rate learning_rate is 0.001, and the service context window size hist_length of recent interaction of users is 5.
The invention has the beneficial effects that:
first, the structure of the graph is used to model the user's listening behavior and complex relationships between different entities (users, services, suppliers, categories), which is beneficial to enriching the feature representation of the services and strengthening the links between different services.
Secondly, the service preference of the user is divided into three parts, namely long-term, short-term and dynamic preference, aiming at the service interaction history of each user, so that the recommendation system can be helped to better capture the change of the application scene and the service requirement of the user.
Finally, the service preference of the user is refined, and the original preference of the service is refined into the preference of the service itself, the provider corresponding to the service and the service class by introducing metadata information, so that the motivation of the user to select the service in the real scene is better refined.
According to the invention, through the interaction record and metadata between the user and the service, the service preference and the service characteristics of the user are well captured, and the problems of cold start and data sparseness can be relieved to a certain extent. The introduction of metadata strengthens the robustness of the model and the feature mining capabilities. Compared with the traditional recommendation algorithm, the method avoids heavy characteristic engineering and has good generalization capability.
Experiments of a real data set show that the personalized service recommendation method based on the graph neural network and the metadata has better recommendation capability compared with a traditional model, and exceeds a traditional recommendation algorithm in a plurality of indexes (Precision, recall and the like).
Drawings
FIG. 1 is a sequence diagram of a user service;
fig. 2 is a diagram of a model framework.
Detailed Description
The personalized service recommendation method based on the graphic neural network and the metadata provided by the invention is specifically described below, and as shown in a model frame diagram of fig. 2, the method comprises the following steps:
step (1) inputs historical service interaction data of the user, including the user's ID, the service ID, and a timestamp of the service interaction.
And (2) reading historical service interaction data, and sequencing according to the service sequence of each user and the time sequence ascending order. Creating a user service record sequence file separately, wherein each behavior user has a complete service interaction history: each row starts with { user ID: }, and the sequence of service IDs for subsequent users is arranged in { service 1, service 2, … … }. A mapping dictionary is established with the vendor ID and the category ID according to the ID of each service. In the scenario of specific service implementation, the mapping dictionary value may be null, for example, singer information and album information corresponding to the song may be missing (caused by single-song, missing additional information, etc.).
Representing interaction records of a user's service as a sequence of tuples:
u:[(s 1 ,p 1 ,t 1 ),…,(s i ,p i ,t i ),…,(s n ,p n ,t n )]
where u represents the current user ID, s i Representing service ID, p i Representing vendor ID, t i Representing a category ID; u is U, s i ∈S,p i ∈P,t i E, T; u, S, P, T represent user set, service set, vendor set, category set, respectively.
Step (3) constructing a user service sequence chart: establishing an undirected graph G according to the service record of the user u u (V, E) the figure contains a set V of four nodes of user, service, provider and category and an undirected edge set E between the nodes. All the nodes respectively belong to a user set U, a service set S, a provider set P and a category set T according to different types. Edge set E in the figure: for a first service in the interaction record, connecting a user node with a first service node, a user node with a provider node corresponding to the first service, and a user node with a class node corresponding to the first service by using an undirected edge; the provider and the class node are connected with the corresponding service node; the services are connected in series according to the time sequence relationships which are interacted; the providers and categories corresponding to the same service are connected to each other. See the example in fig. 1 for a specific implementation.
And (4) extracting the characteristic representation vector of each node by using the graph neural network, and mapping the characteristic representation vector into a vector space with uniform dimension. The characteristic representation vector of each node is composed of
Figure GDA0004213723740000092
And (d) represents the dimension of the vector. All feature representation vectors are first initialized using a gaussian distribution. In the training process, the node characteristic expression vector updating rule in the graph is as follows:
e ij =LeakyReLU(a T [Wv i ||Wv j ]),
Figure GDA0004213723740000091
Figure GDA0004213723740000101
the above formula describes the process of updating the feature expression vector of node i according to its neighbor nodes for node i in graph G. Feature representation vector { v } of all nodes in input graph G 1 ,v 2 ,...,v N }, wherein
Figure GDA0004213723740000102
N represents the number of nodes in graph G. For node i, updating the feature representation vector of node i by using its neighbor node j: the characteristic expression vector of the node i and the characteristic expression vector of the node j are combined through a shared parameter matrix +.>
Figure GDA0004213723740000103
Performing linear transformation, wherein the expression of the vector is to splice two vectors, and then pass through a vector consisting of weight vector +.>
Figure GDA0004213723740000104
A configured single layer forward propagation network, wherein · T Transpose of the representation matrix, then activating with a LeakyReLU nonlinear function to finally obtain e ij Representing the importance of the neighbor node j to the node i; then normalizing weights of all neighbor nodes of the node i, which are obtained through the same calculation mode, by using a softmax function; finally, setting K independent attention mechanisms by adopting a multi-head attention computing mode, repeating the two steps of attention weight computing processes, and enabling the characteristic expression vectors, the attention weights and the shared parameter matrix W of all neighbor nodes to be identical k Multiplying and accumulating, averaging according to the number of the nodes, and obtaining a feature expression vector v 'updated by the node i through a sigmoid function represented by sigma (#)' i
Step (5) modeling long-term service preferences of users: all the historical interaction information is obtained by the node of the user u, and the characteristic representation of the user node can be directly used as the long-term service preference of the user:
p l =v u .
wherein p is l Long-term service preference vector representing user, v u The feature representation vector representing the user node in figure G.
Step (6) modeling short-term service preferences of users: for the current historical service sequence U, service information interacted in a short period of a user and metadata information corresponding to the service are used for calculating to obtain service preference p of the user s,s Vendor preference p p,s Category preference p t,s . Wherein the short-term preference p of the user for the service s,s The calculation mode of (2) is as follows:
h s,i =σ(W s,1 v s,i +W s,2 v s,n +b 1 )
Figure GDA0004213723740000111
Figure GDA0004213723740000112
in the above formula, W s,1 And W is s,2 Are all indicated
Figure GDA0004213723740000113
Linear transformation parameter matrix of b 1 Representing a bias term; feature representation vector v for each service in the current sequence of services i Vector v representing the last service feature in the sequence n Adding by linear transformation, and obtaining their fusion eigenvector representation h by activating function s,i The method comprises the steps of carrying out a first treatment on the surface of the The characteristic expression vector of the user is transposed by v u T And h s,i After multiplication, normalization operation is carried out to obtain a weight coefficient a corresponding to each node s,i The method comprises the steps of carrying out a first treatment on the surface of the Finally, weighting and calculating all weight coefficients and the feature expression vector of the service, and using layerrnorm to enable the service preference vector p of the user s,s The distribution tends to be stable.
User preference p for vendor p,s The definition is as follows:
h p,i =σ(W p,1 v p,i +W p,2 v p,n +b 2 ),
Figure GDA0004213723740000114
Figure GDA0004213723740000115
wherein v is p,i Representing vectors for the characteristics of provider nodes, W p,1 、W p,2 For linear transformation parameter matrix, b 2 Is an offset term, h p,i For each vendor, a) fusing feature vector representations p,i Attention weight for each vendor.
Short-term user preference p for category t,s The definition is as follows:
h t,i =σ(W t,1 v t,i +W t,2 v t,n +b 3 ),
Figure GDA0004213723740000116
Figure GDA0004213723740000121
wherein v is t,i Representing vectors for characteristics of class nodes, W t,1 、W t,2 For linear transformation parameter matrix, b 3 Is an offset term, h t,i For each class of fused feature vector representations, a t,i Attention weight for each category.
And finally, fusing the three by using linear transformation to obtain the complete short-term service preference of the user, wherein the definition is as follows:
p s =W 1 (p s,s ||p p,s ||p t,s )
wherein W is 1 Representing a weight matrix of the linear transformation.
Step (7) modeling user dynamic service preference: the last service interacted by the user in the history record and the metadata information thereof are fused by linear transformation to be used as the dynamic service preference of the user, and the form is defined as follows:
p d =W 2 (v s,n ||v p,n ||v t,n )
wherein W is 2 Representing a weight matrix of the linear transformation.
Step (8) user-complete service preference modeling: and according to the calculated long-term, short-term and dynamic preferences of the user, fusing by using linear transformation to obtain the complete service preferences of the user:
p=W 3 (p l ||p s ||p d )
wherein W is 3 Representing a weight matrix of the linear transformation.
Step (9) calculating the recommendation score of each service to the current user:
Figure GDA0004213723740000122
wherein the method comprises the steps of
Figure GDA0004213723740000123
Representing recommendation scores for all candidate services of the current user, p T Representing the transpose of p.
The softmax function is then applied to derive the probability of future user interactions with the service:
Figure GDA0004213723740000124
wherein the method comprises the steps of
Figure GDA0004213723740000125
Representing the probability of the current user interacting with the service.
Step (10) training a model.
Setting parameters of a model:
batch_size=256, representing the amount of data per batch of training;
the vector dimension of the nodes in the user service sequence diagram;
learning_rate=0.001, learning rate;
epochs=2000, maximum number of iterations;
hist_length=5, the service context window size for recent interactions by the user.
The training model employs a cross entropy loss function for the back propagation process, defined as:
Figure GDA0004213723740000131
wherein y is i A one-hot coded vector representation of a service representing the actual interaction of the user;
Figure GDA0004213723740000132
representing the probability of a user interacting with the ith service in the future according to the current interaction record; n represents the number of all services.

Claims (3)

1. The personalized service recommendation method based on the graphic neural network and the metadata is characterized by comprising the following steps of:
step (1) obtaining a service history sequence record of a user and provider and category information corresponding to the service as an interaction record of the service;
step (2), according to the time sequence of service interaction in the interaction records of the service obtained in the step (1), sequencing the interaction records in ascending order; grouping the interaction records according to the ID of the user; establishing a mapping dictionary L of each service, provider and category;
step (3) constructing a user service sequence diagram G u (V, E) comprising a service history sequence record of the user over a given time frame, the user's interaction with the service, the user's interaction with the provider, the user's interaction with the category, and the relationship between the service and the provider, the service and the category; the user service sequence diagram G u Node class in (V, E)There are four types: users, services, suppliers, categories;
step (4) using a graph attention neural network, for a current node in a given user service sequence graph, calculating the attention weight a of a neighbor node j relative to the current node according to neighbor nodes directly connected with the current node ij The feature expression vector v of the neighboring node is reused j And attention weight a ij Is provided for updating the feature representation vector; the final feature representation vector for the user, service, vendor and category is v u ,v s,i ,v p,i ,v t,i
Step (5) constructing a service preference feature expression vector of the user:
representing the feature of the user node by vector v u Long-term preference p as user l
According to the interaction record of the service of the user in a given time range, weighting and calculating by using an attention mechanism, and respectively calculating the service history sequence record in the interaction record of the service and the corresponding provider and category information of the service to obtain the preference p of the user to the service s,s Preference p for suppliers p,s Preference p for categories t,s Normalizing the three preferences by using a layerrnorm method respectively, and finally fusing the three preferences to obtain the complete short-term preference p of the user s Fusing the last service interacted in the interaction record of the service with the provider and category information corresponding to the service to obtain the dynamic preference p of the user d
Finally, the long-term preference p of the user is set l Short term preference p s And dynamic preference p d Fusion to obtain complete user service preference p;
step (6) transpose of the user's service preference vector and the service feature representation vector are subjected to dot product operation to obtain recommendation scores of each service
Figure FDA0004230951850000021
Obtaining the probability of each service interacted by using softmax function
Figure FDA0004230951850000022
Step (7), the following model parameters and loss functions are set for training the graph neural network model:
according to the batch training data size batch_size, training node characteristic representation vector dimension ebadd_dim, learning rate learning_rate, and user recently interacted service context window size hist_length; adopting a cross entropy loss function;
in the step (1), the interaction record of the service is expressed as a sequence consisting of tuples:
u:[(s 1 ,p 1 ,t 1 ),…,(s i ,p i ,t i ),…,(s n ,p n ,t n )]
where u represents the current user ID, s i Representing service ID, p i Representing vendor ID, t i Representing a category ID;
in the step (3), when a user service sequence diagram is established, for a first service in the interaction record, connecting a user node with the first service node, a provider node corresponding to the user node and the first service, and a class node corresponding to the user node and the first service by using undirected edges;
in the step (4), the updating rule of the feature expression vector is as follows:
for node i, there is a neighbor node j
Figure FDA0004230951850000023
The characteristic of the node i is expressed as a vector v by the neighbor nodes i Feature representation vector v with node j j Respectively through the same parameter matrix->
Figure FDA0004230951850000024
After linear transformation, the two are spliced and then pass through a vector of weights +.>
Figure FDA0004230951850000025
The set single-layer forward propagation network is activated by using a LeakyReLU activation function, and finally the importance e of the neighbor node j to the node i is obtained ij The method comprises the steps of carrying out a first treatment on the surface of the Calculating the importance of each neighbor node to the node i in the same way, and normalizing the importance by using a softmax function to obtain the attention weight a of each neighbor node ij The method comprises the steps of carrying out a first treatment on the surface of the Wherein d' represents the matrix dimension;
when the neighbor node features are fused, a multi-head attention computing mode is adopted, K independent attention mechanisms are set, the process of computing the attention weights in the two steps is repeated, and finally, feature expression vectors of all neighbor nodes, the attention weights and a shared parameter matrix W corresponding to the kth attention mechanism are expressed k Multiplying and accumulating, averaging according to the number of the attention mechanisms, and obtaining the feature expression vector v after updating the node i through a sigmoid activation function i The specific calculation mode is as follows:
e ij =LeakyReLU(a T [Wv i ||Wv j ]),
Figure FDA0004230951850000031
Figure FDA0004230951850000032
where || represents two vector concatenation, · T Representing the transpose of the matrix, exp represents the exponential function, sigma (·) represents the sigmoid function.
2. The personalized service recommendation method based on the graphic neural network and the metadata according to claim 1, wherein: in said step (5), said preference p for services s,s The calculation mode of (2) comprises the following steps:
firstly, calculating the attention weight of each service in the current historical service sequence U, and ensuring that each service is specificSign representation vector v s,i And last service feature representation vector v s,n Respectively by linear transformation W s,1 And W is s,2 Post-summing and adding bias term b 1 Activating by using sigmoid function to obtain fusion feature vector representation h of each service s,i Transpose v of importance of all services to user feature representation vector u T Multiplying and normalizing by softmax function to obtain the attention weight a of each service s,i The method comprises the steps of carrying out a first treatment on the surface of the Finally, weighting and summing the feature vectors of all the services in the current historical service sequence, and normalizing by using a layerrnorm method to obtain the preference p for the services s,s The specific calculation mode is as follows:
h s,i =σ(W s,1 v s,i +W s,2 v s,n +b 1 ),
Figure FDA0004230951850000041
Figure FDA0004230951850000042
the preference p for suppliers p,s The specific calculation mode is as follows:
h p,i =σ(W p,1 v p,i +W p,2 v p,n +b 2 ),
Figure FDA0004230951850000043
Figure FDA0004230951850000044
wherein v is p,i Representing vectors for the characteristics of provider nodes, W p,1 、W p,2 For linear transformation parameter matrix, b 2 Is an offset term, h p,i For each vendor, a) fusing feature vector representations p,i Attention weight for each provider;
the preference p for category t,s The specific calculation mode is as follows:
h t,i =σ(W t,1 v t,i +W t,2 v t,n +b 3 ),
Figure FDA0004230951850000045
Figure FDA0004230951850000046
wherein v is t,i Representing vectors for characteristics of class nodes, W t,1 、W t,2 For linear transformation parameter matrix, b 3 Is an offset term, h t,i For each class of fused feature vector representations, a t,i Attention weights for each category;
splice three preferences in a short period of a user and then use a linear transformation layer W 1 Fusion is carried out to obtain the complete short-term preference p of the user s The specific calculation mode is as follows:
p s =W 1 (p s,s ||p p,s ||p t,s )
preference p for dynamic services d Representing the last service node characteristic vector v s,n Corresponding service node feature representation vector v p,n Class node feature representation vector v t,n Splicing and reusing linear transformation layer W 2 Fusion is carried out to obtain the dynamic preference of the user, and the specific calculation mode is as follows:
p d =W 2 (v s,n ||v p,n ||v t,n )
for the complete user service preference p, the long-term, short-term and dynamic service preference of the user are spliced and then the linear transformation layer W is used 3 Fusion, concrete calculation formulaThe formula is as follows:
p=W 3 (p l ||p s ||p d )。
3. the personalized service recommendation method based on the graphic neural network and the metadata according to claim 2, wherein: in the step (7):
the data size batch_size trained by batch is 256, the dimension of the trained node feature representation vector is 100, the learning rate learning_rate is 0.001, and the service context window size hist_length of recent interaction of users is 5.
CN202211233361.1A 2022-10-10 2022-10-10 Personalized service recommendation method based on graphic neural network and metadata Active CN115545834B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211233361.1A CN115545834B (en) 2022-10-10 2022-10-10 Personalized service recommendation method based on graphic neural network and metadata

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211233361.1A CN115545834B (en) 2022-10-10 2022-10-10 Personalized service recommendation method based on graphic neural network and metadata

Publications (2)

Publication Number Publication Date
CN115545834A CN115545834A (en) 2022-12-30
CN115545834B true CN115545834B (en) 2023-06-23

Family

ID=84734434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211233361.1A Active CN115545834B (en) 2022-10-10 2022-10-10 Personalized service recommendation method based on graphic neural network and metadata

Country Status (1)

Country Link
CN (1) CN115545834B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110060097A (en) * 2019-04-01 2019-07-26 苏州市职业大学 User behavior sequence of recommendation method based on attention mechanism and convolutional neural networks
CN114529364A (en) * 2022-02-17 2022-05-24 桂林理工大学 Commodity sequence recommendation method based on attention mechanism
CN114817663B (en) * 2022-05-05 2023-02-17 杭州电子科技大学 Service modeling and recommendation method based on class perception graph neural network

Also Published As

Publication number Publication date
CN115545834A (en) 2022-12-30

Similar Documents

Publication Publication Date Title
CN111125537B (en) Session recommendation method based on graph representation
CN112613602A (en) Recommendation method and system based on knowledge-aware hypergraph neural network
CN110727864B (en) User portrait method based on mobile phone App installation list
CN112508256B (en) User demand active prediction method and system based on crowdsourcing
CN112559878B (en) Sequence recommendation system and recommendation method based on graph neural network
CN116010684A (en) Article recommendation method, device and storage medium
CN111241394A (en) Data processing method and device, computer readable storage medium and electronic equipment
CN112528164B (en) User collaborative filtering recall method and device
CN112256916B (en) Short video click rate prediction method based on graph capsule network
CN111832637B (en) Distributed deep learning classification method based on alternating direction multiplier method ADMM
Zhong et al. Design of a personalized recommendation system for learning resources based on collaborative filtering
CN115269977A (en) Recommendation method for fusion knowledge and collaborative information based on graph neural network
CN111125428A (en) Time-dependent movie recommendation method based on score prediction function fitting structure
CN113051468B (en) Movie recommendation method and system based on knowledge graph and reinforcement learning
CN112883289B (en) PMF recommendation method based on social trust and tag semantic similarity
US20240037133A1 (en) Method and apparatus for recommending cold start object, computer device, and storage medium
CN112801803A (en) Financial product recommendation method and device
CN115545834B (en) Personalized service recommendation method based on graphic neural network and metadata
CN114429384B (en) Intelligent product recommendation method and system based on e-commerce platform
CN115238191A (en) Object recommendation method and device
CN112464106B (en) Object recommendation method and device
CN113034231B (en) Multi-supply chain commodity intelligent recommendation system and method based on SaaS cloud service
CN112734519B (en) Commodity recommendation method based on convolution self-encoder network
CN115599990A (en) Knowledge perception and deep reinforcement learning combined cross-domain recommendation method and system
CN111177580A (en) Method for realizing personalized recommendation by utilizing multiple implicit feedback

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant