Online shopping strategy recommendation method based on time sequence knowledge graph embedding
By using a method based on time-series knowledge graph embedding, combined with time attributes and knowledge graph embedding models, the problem of poor processing of implicit association features between users and products in online shopping recommendation systems is solved, and more accurate and timely recommendation results are achieved. Enhanced interpretability of recommendation systems.
Patent Information
- Application Number
- CN202410696866.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-31
- Publication Date
- 2024-08-30
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing online shopping recommendation systems fail to fully consider the time factor when processing the implicit correlation characteristics between users and products, resulting in unsatisfactory processing results of sparse data and cold start problems, and user preferences change dynamically with time. Nowadays, There are methods that fail to effectively capture the role of temporal weighting.
An online shopping strategy recommendation method based on time-series knowledge graph embedding is adopted. By constructing recommended information knowledge graph quadruples, time attributes are used to constrain the importance of user and product features, and combined with the knowledge graph embedding model, the correlation probability between users and candidate products is calculated. , and realize product recommendation through preference propagation.
It improves the accuracy and timeliness of recommendations, enhances the interpretability of recommendation results, effectively overcomes sparse data and cold start problems, and provides users with more personalized and dynamic recommendation services.
Smart Images

Figure CN118568346A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data mining, and in particular to an online shopping strategy recommendation method based on temporal knowledge graph embedding. Background Art
[0002] In order to solve the sparse user-item interaction and cold start problems in early collaborative filtering algorithms, knowledge graphs began to be integrated into recommendation systems as auxiliary information. This approach uses different strategies, including representation-based methods, path-based methods, and the fusion of the two. In the representation-based method, the relationship between users and items is directly modeled by learning the path between user and item pairs. This method can effectively capture user preferences and item attributes, but its limitation is that it only supplements the connection between users and items and fails to capture the richer semantic relationships in the knowledge graph. On the other hand, in the path-based method, information is propagated across the entire knowledge graph, thereby introducing noise that is not related to specific users and items. Although this method can transfer knowledge more comprehensively, it also brings certain problems. To overcome these limitations, researchers have tried to combine representation-based methods and path-based methods. Through this fusion, the recommendation system can simultaneously obtain rich semantic information from the knowledge graph and better capture the relationship between users and items. This comprehensive method solves the sparsity and cold start problems in the recommendation system to a certain extent, providing users with more accurate and personalized recommendation services.
[0003] Introducing knowledge graphs into information recommendation systems can more comprehensively represent relevant semantic relationships and deeply explore user interests. Therefore, knowledge graphs have become an important cornerstone of artificial intelligence applications, and have attracted widespread attention from academia and the business community in areas such as information retrieval, intelligent question answering, and online recommendations. At present, many classic knowledge graphs have been constructed, such as Freebase, DBpedia, and YAGO, which present complex knowledge of the real world in a machine-readable format. Inspired by word vectors, researchers transform entities and relationships in knowledge graphs into continuous space representations, which can contain more semantic relationships and make it easier for computers to calculate and process. This method is widely used in recommendation systems to provide users with more accurate and personalized recommendation services.
[0004] Compared with traditional recommendation scenarios, online shopping recommendations involve more important information, such as product categories, purchase history, shopping preferences, price ranges, brand preferences, etc. At the same time, the relationship between users and products is also key information that needs to be extracted. However, existing methods often do not fully consider the implicit association characteristics between product information and users when dealing with these problems, resulting in unsatisfactory results for sparse data and cold start problems.
[0005] Another challenge is that user preferences change dynamically over time, and most current work only focuses on static user-item interactions to predict current user interests. However, the importance of different features and relationships changes dynamically under the influence of time weights, which requires a more flexible approach to handle. Summary of the invention
[0006] The purpose of the present invention is to provide an online shopping strategy recommendation method based on temporal knowledge graph embedding, aiming to construct an online shopping strategy recommendation model based on temporal knowledge graph embedding, constrain the importance of user and product features through time attributes, and use preference propagation to complete the product recommendation task and improve the recommendation accuracy.
[0007] To achieve the above object, the present invention provides an online shopping strategy recommendation method based on temporal knowledge graph embedding, comprising the following steps:
[0008] Step 1: Construct a knowledge graph of recommended information quadruple and perform data preprocessing on online shopping information and user-related information;
[0009] Step 2: Use the knowledge graph embedding model to obtain the embedding representation of the head and tail entities in the relational space, and obtain the correlation probability between the user in the triple and the current candidate product item;
[0010] Step 3: Based on the correlation probability between the user in the triple and the current candidate product item, calculate the final output predicted click probability.
[0011] Optionally, the execution process of step 1 includes the following steps:
[0012] Step 1.1: Construct a matrix that defines the interaction between users and product items. The matrix is determined in the following form:
[0013]
[0014] Among them, the user set X = {x1, x2, ...} and the commodity item set Y = {y1, y2, ...}, and according to the historical interaction information between users and commodity items; when When the current user x m With commodity items n There has been an implicit interaction between them; otherwise, Userx m The k-order related entity is defined as is the starting point of user’s interest; The collection of commodity items at that time; is about user x m by is the triple set of the head entity, where k = 1, 2, ..., H;
[0015] Step 1.2: Construct an online shopping item information embedding matrix in the following form:
[0016] u i = l 1:n =[l1,l2,…l n ]
[0017] Where n represents the number of participles; u i = l 1:n =[l1,l2,…l n ]∈R d×n To indicate the title u i The word embedding matrix of the online shopping item information is pre-learned from a large-scale corpus or randomly initialized;
[0018] Step 1.3: Construct a function to extract features from the head and tail entities and relations in the following form:
[0019]
[0020] in, and τ is the boundary separating positive and negative quadruplets, Represent a quadruple and an invalid quadruple set respectively;
[0021] Step 1.4: Construct the recommended information knowledge graph quadruple and calculate the quadruple importance score. The calculation method is as follows:
[0022]
[0023] Where d is the time distance between the two most recent interactions between user x and the entities of the triple.
[0024] Optionally, the execution process of step 2 includes the following steps:
[0025] Step 2.1: Use the knowledge graph embedding model to obtain the embedding representation of the head and tail entities of the quadruple in the relational space;
[0026] Step 2.2: Taking into account the time factor, the importance score, quadruple and candidate product item y calculated in step 1.4 are used to calculate the importance score, quadruple and candidate product item y. n The relevant probabilities jointly participate in the final probability decision;
[0027] Step 2.3: Obtain the triplet of the user at the kth level and the current candidate item y n The probability p of k , of the following form:
[0028]
[0029] Among them, R m ∈R d×d is the triple relationship matrix representation, h m ∈R d is the representation of the head entity on the relation hyperplane, and the associated probability p k As the embedding representation y of the candidate product in the current relationship n and the representation of the correlation between triplets.
[0030] Optionally, the process of step 3 includes the following steps:
[0031] Step 3.1: After the first-level preference propagation of the head entity, the tail entity embeddings of all first-order interest sets are weighted summed to obtain the first-level diffusion representation of user interest. The form is as follows:
[0032]
[0033] Step 3.2: Use the tail entity of the first-level quadruple as the head entity of the second-order quadruple, and obtain the user's second-level interests through preference propagation again Repeat step 3.1 to get
[0034] Step 3.3: Repeat until the entire user set is traversed and then exit the loop. The format is as follows:
[0035]
[0036] in, A collection of user interests;
[0037] Step 3.4: Calculate the probability that a user clicks on the item of interest, which is in the following form:
[0038]
[0039] in, is the embedding y of the corresponding item on the relational plane emb And the calculation of user preference propagation The result of the inner product between them is used to determine the user's interest in the product item.
[0040] The present invention provides an online shopping strategy recommendation method based on temporal knowledge graph embedding. First, data preprocessing is performed on online shopping information and user-related information. According to the feature recommendation information knowledge graph quadruple and the quadruple importance score are calculated. After the data preprocessing is completed, the knowledge graph quadruple is used as input to finally obtain the correlation probability of the user in the triple and the current candidate commodity item. Finally, according to the obtained correlation probability of the user in the triple and the current candidate commodity item, the user behavior is predicted. The present invention converts the characteristic attributes of online shopping information into feature vectors, propagates preferences through the structural advantages of the knowledge graph, and collects user preferences divergently. At the same time, in the field of online shopping information recommendation, the influence of time factors on the user's current interests is innovatively considered, thereby enhancing the timeliness and accuracy of the recommended information. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 It is a schematic diagram of the steps of a method for recommending online shopping strategies based on temporal knowledge graph embedding of the present invention.
[0043] Figure 2 It is a schematic diagram of the execution flow of the data preprocessing process of the present invention.
[0044] Figure 3 It is a schematic diagram of the execution flow of the feature extraction process of the present invention.
[0045] Figure 4 It is a schematic diagram of the execution flow of the information recommendation process of the present invention. DETAILED DESCRIPTION
[0046] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0047] See also Figure 1 The present invention provides an online shopping strategy recommendation method based on temporal knowledge graph embedding, comprising the following steps:
[0048] S1: Construct a knowledge graph of recommended information quadruple and perform data preprocessing on online shopping information and user-related information;
[0049] S2: Use the knowledge graph embedding model to get the embedding representation of the head and tail entities in the relational space, and obtain the correlation probability between the user in the triple and the current candidate product item;
[0050] S3: Based on the correlation probability between the user in the triple and the current candidate product item, the final output predicted click probability is calculated.
[0051] The steps of the method of the present invention include three processes: data preprocessing, feature extraction, and information recommendation. After the data preprocessing of step S1 is completed, the self-built quadruple is used to extract the relevant features of the online shopping information. In order to maximize the advantages of knowledge representation, the present invention introduces the knowledge graph embedding model TransD model. This model is a continuation of the graph embedding method. By using this model, the head entity and the tail entity of the triple are projected into two relational spaces respectively, and a projection matrix related to the entities and relations of the triple is obtained. For the recommendation of online shopping information, the entity attributes of the relevant recommended information, the relations between the entities, the time attributes, etc. are closely related. The present invention obtains the time attributes between the entities and relations of the online shopping information, so that the entities are learned in the knowledge graph embedding process of the relevant online shopping information, and finally the correlation probability of the user's triples in the current layer and the current candidate product items is obtained;
[0052] According to the result obtained in step S2, the final output predicted click probability is calculated based on the obtained correlation probability between the tourist in the quadruple and the current candidate product item, thereby realizing the prediction of tourist behavior and achieving information recommendation for each user.
[0053] The following is a further explanation based on the specific implementation steps:
[0054] Step S1 is the data preprocessing process, such as Figure 2 As shown in the figure, information embedding and interaction matrix Y are realized through knowledge graph, which specifically includes the following steps:
[0055] S1.1: Construct a matrix that defines the interaction between users and merchandise items, which is determined in the following form:
[0056]
[0057] Among them, the user set X = {x1, x2, ...} and the commodity item set Y = {y1, y2, ...}. And according to the historical interaction information between users and commodity items. When the current user x m With commodity items n There has been an implicit interaction between them; otherwise, Userx m The k-order related entity is defined as The user's interest starts at this time. The collection of commodity items at that time. is about user x m by is the triple set of the head entity, where k = 1, 2, ..., H;
[0058] S1.2: Construct an online shopping item information embedding matrix, which is in the following form:
[0059] u i = l 1:n =[l1,l2,…l n ]
[0060] Where n represents the number of participles. i = l 1:n =[l1,l2,…l n ]∈R d×n To indicate the title u i The word embedding matrix can be pre-learned from a large corpus or randomly initialized;
[0061] S1.3: Construct a function to extract features from head and tail entities and relations, which has the following form:
[0062]
[0063] in, and τ is the boundary separating positive and negative quadruplets, Represent a quadruple and an invalid quadruple set respectively;
[0064] S1.4: Construct the recommended information knowledge graph quadruple and calculate the quadruple importance score, which is in the following form:
[0065]
[0066] Where d is the time distance between the two most recent interactions between user x and the entity of the triple;
[0067] Furthermore, the feature extraction process is as follows Figure 3 As shown, step S2 performs data preprocessing on the online shopping information and user-related information according to step S1, and then continues to extract relevant features of the online shopping information.
[0068] Step S2 specifically includes the following steps:
[0069] S2.1: Use the TransD model to get the embedding representation of the head and tail entities of the quadruple in the relational space;
[0070] S2.2: Taking the time factor into full consideration, the distance score, triples and candidate tourism items y calculated in step S1 are n The relevant probabilities jointly participate in the final probability decision;
[0071] S2.3: Get the user's triplet at level k and the current candidate item y n The probability p of k , which has the following form:
[0072]
[0073] Among them, R m ∈R d×d is the triple relationship matrix representation, h m ∈R d is the representation of the head entity on the relation hyperplane. The relevant probability p k As the embedding representation y of the candidate item in the current relationship n and the representation of the correlation between triplets.
[0074] The information diffusion process is Figure 4 As shown, step S3 extracts relevant features of online shopping information to propagate user preferences and spread user interests, and finally outputs predicted click probability, which specifically includes the following steps:
[0075] S3.1: After the first-level preference propagation of the head entity, the tail entity embeddings of all first-order interest sets are weighted summed to obtain the first-level diffusion representation of user interest. Its form is as follows:
[0076]
[0077] S3.2: Use the tail entity of the first-level quadruple as the head entity of the second-order quadruple, and obtain the user's second-level interests through preference propagation again Repeating the above formula, we can get
[0078] S3.3: Repeat until the entire user set is traversed and the loop is exited. Its form is as follows:
[0079]
[0080] in, A collection of user interests;
[0081] S3.4: Calculate the probability that a user clicks on the item of interest, which is in the following form:
[0082]
[0083] in, is the embedding y of the item on the relational plane emb And the calculation of user preference propagation The result of the inner product between them is used to obtain the user's interest in the product item, thereby completing the information recommendation. This is the online shopping strategy recommendation method based on temporal knowledge graph embedding.
[0084] In the present invention, a online shopping strategy recommendation model based on temporal knowledge graph embedding is proposed. The model can effectively handle the evolution of different user and commodity item attributes over time, and incorporate this information into the knowledge graph embedding. By using the knowledge graph embedding technology, the present invention can learn the structural information of high-dimensional users and commodity items, and represent each attribute as a low-dimensional continuous vector. In addition, the present invention constructs a knowledge graph quadruple by fusing time characteristics to control the importance of time attributes to the relationship. By analyzing historical interaction items, the present invention can propagate user preferences, thereby obtaining a wide range of user interest sets. The advantage of this method is that it can retain the structure of user and commodity information to the maximum extent, so that the knowledge representation is optimized, thereby achieving accurate prediction and recommendation. At the same time, the present invention provides more relevant auxiliary information for the online shopping recommendation system to solve the cold start problem, so that the recommendation results have diversity and a wider range of recommendation effects. In addition, the interpretability of time attributes also enhances the interpretability of recommendation results.
[0085] It is particularly noteworthy that by introducing knowledge graph embedding of users and product items and time attributes, the method of the present invention has demonstrated excellent performance in experiments on standard datasets such as MovieLens, outperforming other baseline methods and showing good generalization ability. This innovative model is of great significance to online shopping agents because it fully exploits user attributes and product characteristics, allowing products to be delivered to users more accurately, thereby improving economic benefits.
[0086] At the same time, the temporal knowledge graph embedded online shopping recommendation model of the present invention also shows potential and excellent interpretability. For users, this means that they can get reasonable and clearly sourced product recommendations without having to make a lot of comparisons, thereby improving their shopping experience. This model can intuitively show how the recommendation results are obtained, making it easier for users to understand and trust the recommendations of the recommendation system.
[0087] In summary, the advantages of the present invention are:
[0088] (1) The present invention uses knowledge graph embedding technology to enrich the semantic associations between users and product attributes and construct an online shopping knowledge graph with more extensive information. This can preserve the structure of user and product information to the greatest extent, optimize knowledge representation, and achieve accurate prediction and recommendation. The present invention provides an effective way to accurately capture user preferences and product features.
[0089] (2) In the field of online shopping information recommendation, the present invention innovatively considers the impact of time factors on users' current interests, thereby enhancing the timeliness and accuracy of recommended information. The present invention proposes an online shopping information recommendation model based on knowledge graph embedding, which effectively overcomes the data sparsity and cold start problems in the traditional travel information recommendation process. This method uses the characteristics of time attributes to make the recommendation results more interpretable, thereby enhancing the interpretability of the recommendation system.
[0090] What is disclosed above is only a preferred embodiment of the present invention, and it certainly cannot be used to limit the scope of rights of the present invention. Ordinary technicians in this field can understand that all or part of the processes of the above embodiment and equivalent changes made according to the claims of the present invention still fall within the scope of the invention.
Claims
1. A method for recommending online shopping strategies based on temporal knowledge graph embedding, characterized in that: The following steps are involved: Step 1: Construct a knowledge graph of recommended information quadruple and perform data preprocessing on online shopping information and user-related information; Step 2: Use the knowledge graph embedding model to obtain the embedding representation of the head and tail entities in the relational space, and obtain the correlation probability between the user in the triple and the current candidate product item; Step 3: Based on the correlation probability between the user in the triple and the current candidate product item, calculate the final output predicted click probability.
2. The online shopping strategy recommendation method based on temporal knowledge graph embedding according to claim 1 is characterized in that: The execution process of step 1 includes the following steps: Step 1.1: Construct a matrix that defines the interaction between users and product items. The matrix is determined in the following form: Among them, the user set X = {x1, x2, ...} and the commodity item set Y = {y1, y2, ...}, and according to the historical interaction information between users and commodity items; when When the current user x m With commodity items n There has been an implicit interaction between them; otherwise, Userx m The k-order related entity is defined as is the starting point of user’s interest; The collection of commodity items at that time; is about user x m by is the triple set of the head entity, where k = 1, 2, ..., H; Step 1.2: Construct an online shopping item information embedding matrix in the following form: u i =l 1:n =[l1,l2,…l n ] Where n represents the number of participles; u i = l 1:n =[l1,l2,…l n ]∈R d×n To indicate the title u i The word embedding matrix of the online shopping item information is pre-learned from a large-scale corpus or randomly initialized; Step 1.3: Construct a function to extract features from the head and tail entities and relations in the following form: in, and τ is the boundary separating positive and negative quadruplets, Represent a quadruple and an invalid quadruple set respectively; Step 1.4: Construct the recommended information knowledge graph quadruple and calculate the quadruple importance score. The calculation method is as follows: Where d is the time distance between the two most recent interactions between user x and the entities of the triple.
3. The online shopping strategy recommendation method based on temporal knowledge graph embedding according to claim 2 is characterized in that: The execution process of step 2 includes the following steps: Step 2.1: Use the knowledge graph embedding model to obtain the embedding representation of the head and tail entities of the quadruple in the relational space; Step 2.2: Taking into account the time factor, the importance score, quadruple and candidate product item y calculated in step 1.4 are used to calculate the importance score, quadruple and candidate product item y. n The relevant probabilities jointly participate in the final probability decision; Step 2.3: Obtain the triplet of the user at the kth level and the current candidate item y n The probability p of k , of the following form: Among them, R m ∈R d×d is the triple relationship matrix representation, h m ∈R d is the representation of the head entity on the relation hyperplane, and the associated probability p k As the embedding representation y of the candidate product in the current relationship n and the representation of the correlation between triplets.
4. The online shopping strategy recommendation method based on temporal knowledge graph embedding according to claim 3 is characterized in that: The process of step 3 includes the following steps: Step 3.1: After the first-level preference propagation of the head entity, the tail entity embeddings of all first-order interest sets are weighted summed to obtain the first-level diffusion representation of user interest. The form is as follows: Step 3.2: Use the tail entity of the first-level quadruple as the head entity of the second-order quadruple, and obtain the user's second-level interests through preference propagation again Repeat step 3.1 to get Step 3.3: Repeat until the entire user set is traversed and then exit the loop. The format is as follows: in, A collection of user interests; Step 3.4: Calculate the probability that a user clicks on the item of interest, which is in the following form: in, is the embedding y of the corresponding item on the relational plane emb And the calculation of user preference propagation The result of the inner product between them is used to determine the user's interest in the product item.
