User personalized product recommendation method and device

By constructing user long-term and short-term interest embeddings and user feature embeddings, combining GraphSAGE and Skip-gram models, optimizing GraphSAGE's aggregation function, and using transfer learning and GBDT models, we generate comprehensive user embeddings to match products. This solves the problem of insufficient recommendation accuracy in existing technologies and achieves more accurate personalized product recommendations.

CN115880018BActive Publication Date: 2025-09-26INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211206430.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-09-26
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

Existing product recommendation technologies fail to effectively consider users' short-term interest changes and personalized characteristics, resulting in insufficient recommendation accuracy.

Method used

By constructing users' long-term interest embeddings, short-term interest embeddings, and user feature embeddings, combining the GraphSAGE graph neural network and the Skip-gram model, optimizing the aggregation function of GraphSAGE, and using transfer learning and the GBDT model to amplify data, we can generate comprehensive user embeddings to match products.

Benefits of technology

It improves the accuracy of product recommendations, can better reflect users' long-term and short-term interests and personalized characteristics, and improves recommendation effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115880018B_ABST
    Figure CN115880018B_ABST
Patent Text Reader

Abstract

Embodiments of the present invention disclose a method and apparatus for personalized product recommendations for users. These methods relate to the field of product recommendation technology and can be used in finance or other fields. The method comprises: determining a user's long-term interest embedding based on a user's order behavior sequence; determining a user's short-term interest embedding based on a user's product click sequence; determining a user comprehensive embedding based on the long-term interest embedding, the short-term interest embedding, and the user's user feature embedding; and determining products matching the user based on the user comprehensive embedding. This invention helps improve the accuracy of user product recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of product recommendation, and in particular to a method and device for user-personalized product recommendation. Background Art

[0002] Currently, when recommending products to users, users are typically predicted to be interested in products based on their past purchases, and then recommendations are made. However, this current recommendation method does not take into account that users' short-term interests may fluctuate significantly. For example, users' needs may vary over time, and the number of samples of previously purchased products often fails to reflect changes in users' short-term interests. Furthermore, this current recommendation method does not consider user characteristics, which can significantly influence the products that users will be interested in. Therefore, this current recommendation method suffers from insufficient accuracy, and the existing technology lacks a more accurate solution for recommending products to users. Summary of the Invention

[0003] In order to solve at least one technical problem in the above-mentioned background technology, the present invention proposes a method and device for user personalized product recommendation.

[0004] To achieve the above object, according to one aspect of the present invention, a method for user-personalized product recommendation is provided, the method comprising:

[0005] Determine the user's long-term interest embedding based on the user's order behavior sequence;

[0006] Determine the user's short-term interest embedding based on the user's product click sequence;

[0007] A user comprehensive embedding is determined based on the long-term interest embedding, the short-term interest embedding, and the user's user feature embedding, and a product matching the user is determined based on the user comprehensive embedding.

[0008] Optionally, determining the user's long-term interest embedding based on the user's order behavior sequence specifically includes:

[0009] Determine commodity purchase data according to the order behavior sequence, and construct a graph model according to the commodity purchase data, wherein the graph model comprises: nodes and directed edges, and the nodes include: user nodes and commodity nodes;

[0010] Using the GraphSAGE graph neural network algorithm to determine the node embedding of each product node in the graph model;

[0011] N commodity nodes are screened out from all commodity nodes according to the node embeddings, and the long-term interest embeddings are generated according to the node embeddings of the N commodity nodes, where N is a positive integer.

[0012] Optionally, generating the long-term interest embedding according to the node embeddings of the N product nodes specifically includes:

[0013] The node embeddings of the N product nodes are pooled to obtain the long-term interest embedding.

[0014] Optionally, the user-personalized product recommendation method further includes:

[0015] The graph model is expanded using the product purchase data of similar users in a third-party domain using a transfer learning method.

[0016] Optionally, the determining of the node embedding of each commodity node in the graph model using the GraphSAGE graph neural network algorithm specifically includes:

[0017] When determining the node embedding of the target product node, the weights of the directed edges of the neighboring product nodes of the target product node are first normalized, and then the neighboring product nodes are aggregated according to the normalized weights.

[0018] Optionally, the selecting N commodity nodes from all commodity nodes according to the node embedding specifically includes:

[0019] Calculate the sum of the distances between the node embedding of each product node and the node embeddings of all product nodes;

[0020] Select N commodity nodes with the smallest sum of distances from all commodity nodes.

[0021] Optionally, the directed edge is used to represent the purchase order of products; the weight value of the directed edge between two product nodes is determined by the number of times the two product nodes appear in the same order.

[0022] Optionally, generating a user's short-term interest embedding based on the product click sequence specifically includes:

[0023] Dividing the product click sequence into multiple subsequences according to preset time intervals;

[0024] The Skip-gram model is used to train the embedding of the user's short-term interest products corresponding to each subsequence;

[0025] The user's short-term interest product Embedding corresponding to each of the subsequences is pooled to obtain the short-term interest Embedding.

[0026] Optionally, the user-personalized product recommendation method further includes:

[0027] The GBDT model is used to amplify the user's features and obtain the user's user feature embedding.

[0028] Optionally, determining a user comprehensive embedding according to the long-term interest embedding, the short-term interest embedding, and the user characteristic embedding of the user specifically includes:

[0029] Splicing the short-term interest Embedding with the user feature Embedding to obtain a splicing result;

[0030] An inner product operation is performed on the splicing result and the long-term interest Embedding to obtain the user comprehensive Embedding.

[0031] Optionally, determining a product matching the user based on the user's comprehensive embedding specifically includes:

[0032] Calculate the similarity between the user's comprehensive embedding and the product embedding of each product, and determine the products that match the user based on the similarity.

[0033] To achieve the above object, according to another aspect of the present invention, a device for user-personalized product recommendation is provided, the device comprising:

[0034] Long-term interest embedding construction unit, used to determine the user's long-term interest embedding based on the user's order behavior sequence;

[0035] The short-term interest embedding construction unit is used to determine the user's short-term interest embedding based on the user's product click sequence;

[0036] The product matching unit is used to determine a user comprehensive embedding based on the long-term interest embedding, the short-term interest embedding, and the user feature embedding of the user, and determine a product that matches the user based on the user comprehensive embedding.

[0037] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a computer device is further provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the above-mentioned method for personalized product recommendation for users are implemented.

[0038] In order to achieve the above-mentioned purpose, according to another aspect of the present invention, a computer-readable storage medium is further provided, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the above-mentioned user personalized product recommendation method are implemented.

[0039] To achieve the above-mentioned object, according to another aspect of the present invention, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned method for user-personalized product recommendation when executed by a processor.

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

[0041] An embodiment of the present invention determines a user's long-term interest embedding based on their order behavior sequence, determines a user's short-term interest embedding based on their product click sequence, then determines a user comprehensive embedding based on the long-term interest embedding, the short-term interest embedding, and the user's user characteristic embedding. Furthermore, products matching the user are determined based on the user comprehensive embedding. This invention combines the user's long-term interests, short-term interests, and characteristics to provide personalized product recommendations to the user, improving the accuracy of product recommendations compared to existing solutions that make recommendations based solely on historically purchased products. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0043] Figure 1 This is a flow chart of a method for user personalized product recommendation according to an embodiment of the present invention;

[0044] Figure 2 This is a flowchart of constructing a long-term interest Embedding according to an embodiment of the present invention;

[0045] Figure 3 This is a flowchart of commodity node screening according to an embodiment of the present invention;

[0046] Figure 4 This is a flowchart of constructing short-term interest embedding according to an embodiment of the present invention;

[0047] Figure 5 This is a flow chart of generating user comprehensive embedding according to an embodiment of the present invention;

[0048] Figure 6 It is an overall flow chart of the product recommendation method of the present invention;

[0049] Figure 7 This is a schematic diagram of connections between different domains according to an embodiment of the present invention;

[0050] Figure 8 Schematic diagram of normalized weighted aggregation according to an embodiment of the present invention;

[0051] Figure 9 Schematic diagram of the GBDT model according to an embodiment of the present invention;

[0052] Figure 10 This is a structural block diagram of a device for user-personalized product recommendation according to an embodiment of the present invention;

[0053] Figure 11 Schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0055] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0056] It should be noted that the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or apparatuses.

[0057] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0058] It should be noted that the acquisition, storage, use, and processing of data in the technical solution of this application comply with the relevant provisions of national laws and regulations.

[0059] It should be noted that the user personalized product recommendation method and device of the present invention can be used in the financial field, and can also be used in any field other than the financial field. The application field of the user personalized product recommendation method and device of the present invention is not limited.

[0060] It should be noted that the term "embedding" in this invention is an existing concept in the field of machine learning. Simply put, embedding represents an object using a low-dimensional vector. That is, the long-term interest embedding, short-term interest embedding, and user feature embedding in this invention are all low-dimensional vectors.

[0061] Figure 1 FIG. 1 is a flow chart of a method for user personalized product recommendation according to an embodiment of the present invention. Figure 1 As shown, in one embodiment of the present invention, the user personalized product recommendation method of the present invention includes steps S101 to S103.

[0062] Step S101: Determine the user's long-term interest embedding based on the user's order behavior sequence.

[0063] A user may start another order before completing one, so it's necessary to first segment and aggregate user behavior at the order level. This method filters all orders within a certain period of time and then extracts the user's order behavior sequence. In one embodiment of the present invention, the user's order behavior sequence can be in the form of Table 1 below.

[0064]

[0065] Table 1

[0066] Step S102: Determine the user's short-term interest embedding based on the user's product click sequence.

[0067] The present invention sorts the products that the user has clicked and browsed by time to obtain a product click sequence. In one embodiment of the present invention, when generating the product click sequence, products that the user has clicked and browsed for no more than a preset time are removed, and the preset time can be 20 seconds.

[0068] Step S103 , determining a user comprehensive embedding based on the long-term interest embedding, the short-term interest embedding, and the user feature embedding of the user, and determining a product matching the user based on the user comprehensive embedding.

[0069] The present invention combines the user's long-term interests, short-term interests and characteristics to make personalized product recommendations to the user, which improves the accuracy of product recommendations compared to the existing solution that only recommends products based on historical purchases.

[0070] like Figure 2 As shown, in one embodiment of the present invention, the above step S101 of determining the user's long-term interest Embedding according to the user's order behavior sequence specifically includes steps S201 to S203.

[0071] Step S201 : determining commodity purchase data according to the order behavior sequence, and constructing a graph model according to the commodity purchase data, wherein the graph model comprises nodes and directed edges, and the nodes comprise user nodes and commodity nodes.

[0072] In one embodiment of the present invention, the directed edge is used to represent the order of purchasing products; the weight value of the directed edge between two product nodes is determined by the number of times the two product nodes appear in the same order.

[0073] Step S202: Using the GraphSAGE graph neural network algorithm, determine the node embedding of each product node in the graph model.

[0074] Step S203 , screening out N commodity nodes from all commodity nodes according to the node embeddings, and generating the long-term interest embedding according to the node embeddings of the N commodity nodes, where N is a positive integer.

[0075] In one embodiment of the present invention, generating the long-term interest embedding according to the node embeddings of the N product nodes in step S203 specifically includes:

[0076] The node embeddings of the N product nodes are pooled to obtain the long-term interest embedding.

[0077] In one embodiment of the present invention, the user personalized product recommendation method of the present invention further includes the following steps:

[0078] The graph model is expanded using the product purchase data of similar users in a third-party domain using a transfer learning method.

[0079] This paper defines a user's long-term interests as past purchases. Due to cold start, the user order sequences we obtain may be very few, so the long-term interest data for each user is very sparse. Therefore, we can leverage third-party source domains with rich data and, based on domain similarity, apply embeddings from these third-party domains to our own domain to improve the accuracy of recommendations in our own domain. Domain similarity can be assessed from the following perspectives:

[0080] 1. User similarity: The two domains have many common users, for example, two apps from the same company have many common users.

[0081] 2. Product similarity. The two domains share many of the same products. For example, two apps share many of the same products.

[0082] like Figure 7 As shown, for cases where two domains have overlapping users or products, the embedding representations of the same user or product in different domains can be shared and merged to ensure that the embedding contains information from each domain. These overlapping users or products can be used as a bridge to connect different domains, enriching the data in the graph model and helping to improve the accuracy of product recommendations.

[0083] The present invention will build a graph model for each user. The nodes of the graph model are composed of the user and the purchased goods. The user can be uniquely identified by his / her ID, and each product can be uniquely identified by goodId+shopId+cateId. If there are products with special significance, they can be uniquely identified in other ways. For example, air tickets can be uniquely identified by business line+departure place+destination.

[0084] Directed edges in the graph model are generated by user behavior. For example, if a user purchases item A and item B, a directed edge will be generated from A to B. If there are multiple directed edges from A to B, the weight of the edge is strengthened.

[0085] The present invention also needs to define the edge weights between nodes. This paper defines edge weights as follows:

[0086] (user,item) edge weight: user_item rating matrix, edge weight is the normalized rating;

[0087] (user, user) edge weight: attribute similarity. Here, the two users are from a third-party domain and a user from this domain. Using user similarity, we can connect the two domains. Note that for each user's graph model, there is only one user (user node): the current user.

[0088] (item,item) edge weight: attribute similarity.

[0089] Some orders may contain multiple products, and these products may have good compatibility. Taking this into account, the present invention improves the edge weights of products that appear in the same order. The specific method is: the order behavior sequence contains the items_pair attribute, which records the products that appear in the same order. For example, if a certain item1 has appeared in an order with multiple products, then the value of this column is in the form of [(item1, item2, the number of times item1 and item2 appear in an order together), (item1, item5, the number of times item1 and item5 appear in an order together)]. For example, if book1 and inverst_CD have appeared in the same two orders together, then the value of the attribute items_pair of book1 and inverst_CD contains the same partial content: (book1, inverst_CD, 2). This attribute is used to influence the weight value of the directed edge of the product node.

[0090] Thus, the present invention can obtain the edge weight list of each relationship:

[0091] [(user source ,user target ,similarity)

[0092] (user1,user2,rating)

[0093] (item1,item2,similarity)]

[0094] The present invention uses a graph network to model the user-item, user-user, and item-item relationships, thereby building a complete graph model. The component graph model can use the NetworkX function.

[0095]

Input

[0096]

Output

[0097] After constructing the graph model, the present invention uses the GraphSAGE graph neural network algorithm in step S202 to determine the node embedding of each product node in the graph model. The present invention uses the trained GraphSAGE model to generate the node embedding of the product nodes. The GraphSAGE calculation process mainly includes three parts:

[0098] (1) Neighbor node sampling: Sample the neighbor nodes of each node in the graph model. In the "1st layer", node v aggregates the information of the two neighbors of the "0th layer", and v's neighbor u also aggregates the information of the two neighbors of the "0th layer". At the "2nd layer", node v is expanded to the second-order neighbor node of the "0th layer" through the node u of the "1st layer". Therefore, when aggregating, aggregating K times can be expanded to K-order neighbors. In each iteration, the node obtains information from the adjacent nodes. As the number of iterations increases, the node incrementally obtains more information from farther away in the graph. Therefore, K does not need to take a very large value. When K = 2, the effect is very good, that is, it only needs to be expanded to the 2nd-order neighbors.

[0099] (2) Aggregation function generates node embeddings: Aggregate neighbor node features according to the aggregation function to generate the current node embedding. Since the neighbors of nodes in the graph are unordered, changing the order of the input nodes should not change the output of the function. The aggregation function used in this paper is the LSTM aggregator. The order of the neighbor nodes is shuffled and then input into the LSTM. LSTM is used to encode the neighbor features. LSTM has stronger expressive power than simple averaging and pooling operations.

[0100] (3) Output: Node embeddings generated using the aggregation function. The calculated embeddings are embedding vectors that contain information about user and product interactions. For a newly added node a, its vector representation can be obtained simply by knowing its own characteristics and adjacent nodes. There is no need to retrain the vector representations of all other nodes.

[0101] In one embodiment of the present invention, the above step S202 uses the GraphSAGE graph neural network algorithm to determine the node embedding of each product node in the graph model, specifically including:

[0102] When determining the node embedding of the target product node, the weights of the directed edges of the neighboring product nodes of the target product node are first normalized, and then the neighboring product nodes are aggregated according to the normalized weights.

[0103] In one embodiment of the present invention, the present invention also optimizes the aggregation of GraphSAGE in transfer learning.

[0104] GraphSAGE is a method that obtains the representation of nodes at the kth level by aggregating the embeddings of the k-1th level node itself and its neighbors. Therefore, cross-domain embeddings can also be generated from it.

[0105] However, simply combining the overlapping embeddings of two domains, such as average-pooling or concat, fails to capture the importance of the embeddings from different domains. Therefore, this paper uses an element-wise attention mechanism to assign different embedding weights to the two domains. This automatically assigns a smaller weight to the less-performing embeddings in the sparse domain, minimizing their impact on the results in the source domain. This is the key to cross-domain transfer.

[0106] However, GraphSAGE cannot handle weighted graphs and can only aggregate neighbor nodes with equal weights, without considering the different importance of different neighbor nodes. In order to solve the problem of equal weight aggregation optimization, Figure 8 As shown in the figure, compared to directly performing equal-weight aggregation on neighbor nodes, the weights of the edges can be normalized before aggregation. That is, the aggregation method is changed from the original:

[0107]

[0108] becomes a normalized aggregation:

[0109]

[0110]

[0111] Since neighbors with larger edge weights have a greater impact on the target node, the normalized weights are multiplied by the corresponding neighbor node features before feature fusion is performed. Node weight normalization can be completed in the preprocessing node without affecting the algorithm speed.

[0112] like Figure 3 As shown, in one embodiment of the present invention, the step S203 of selecting N commodity nodes from all commodity nodes according to the node Embedding specifically includes step S301 and step S302.

[0113] Step S301 : Calculate the sum of the distances between the node embedding of each product node and the node embeddings of all product nodes.

[0114] Step S302 : Filter out N commodity nodes with the smallest sum of distances from all commodity nodes.

[0115] Traditional recall often pools all product embeddings from a user's short-term historical behavior to form a user embedding that represents the user. This approach can fuse information to a certain extent and reduce time and space costs, but it can easily cause information loss, and the pooled embeddings can be drastically inaccurate. Therefore, this invention does not average all product embeddings. Instead, it selects N product embeddings from the graph model as representatives of all products. This product embedding must minimize the sum of distances to all product embeddings in the category.

[0116]

[0117] The present invention selects N product nodes with the smallest sum of distances from all product nodes, and then pools the node embeddings of these N product nodes to obtain the user's long-term interest embedding. In a specific embodiment of the present invention, N can be set as needed, for example, it can be set to 10.

[0118] The user behavior sequence model used in the present invention is a pooling-based architecture paradigm, which is characterized by treating the user's historical behavior as an unordered set. Methods include sum / max pooling and various attention methods. However, the method of embedding each product in the user behavior sequence and then performing pooling essentially treats each product clicked by the user as equally important. In fact, the contribution of the products clicked by the user to the task is different. For example, when predicting the probability of a user clicking on a target product, it is obvious that products in the same category as the target product that have been clicked in the past will play a more important role. Moreover, a user's behavior cannot be described by a simple product. It is not only related to the attributes of the behavior itself (such as time, behavioral intention, etc.), but also to the user's attributes and preferences (such as age, whether the user is a parent-child user).

[0119] Therefore, the present invention amplifies the embedding data to obtain the user's short-term interest embedding and user feature embedding, and also adds these types of embeddings to the model training.

[0120] like Figure 4 As shown, in one embodiment of the present invention, the above step S102 generates the user's short-term interest embedding according to the product click sequence, which specifically includes steps S401 to S403.

[0121] Step S401: Divide the product click sequence into multiple subsequences according to preset time intervals.

[0122] Step S402: Use the Skip-gram model to train the user's short-term interest product Embedding corresponding to each of the subsequences.

[0123] Step S403 , pooling the user's short-term interest product Embedding corresponding to each of the subsequences to obtain the short-term interest Embedding.

[0124] In the above steps, we constructed long-term interest embeddings based on users' actual purchasing behavior. However, user purchases are low-frequency behaviors, and the available information is limited. Clicks, on the other hand, are more frequent than purchases. Users may click on many products in a single day. Click sequences more closely reflect users' short-term interests. Because data is sparse, we need to expand data over a longer period of time. However, this also brings a problem: users' interests may change more over long periods of time than over shorter periods. Therefore, this invention divides click sequences into multiple subsequences (in this embodiment, "session" is used to represent subsequences) based on time intervals (sessions) to ensure relevance.

[0125] The process of constructing training data based on click behavior is as follows:

[0126] For each user, sort the user's click behavior into a long sequence by time;

[0127] To reduce noise, remove clicks that stay on the page for less than 30 seconds;

[0128] In order to make the click behaviors in a sequence have a strong correlation, the present invention divides two click behaviors with a half-hour interval into two sequences. For each user, multiple session sequences are generated;

[0129] Each session may contain the following two items:

[0130] The item that the user clicked on and ultimately made a purchase;

[0131] Items that users clicked but did not ultimately make a purchase.

[0132] This paper uses the Skip-gram model in Word2vec to train embeddings for products of short-term interest to users. The Skip-gram model predicts context words (other words in the window excluding the central word) given a central word. To illustrate the subsequent training steps, we first explain the principles of the Skip-gram model.

[0133] Suppose there are five words in our text sequence, ["the", "boy", "loves", "playing", "game"]. Assume our window size is Skip-window = 2, and the center word is "loves", then the context words (also called "background words") are: "the", "boy", "playing", "game". The context words here are also called "background words".

[0134] What Skip-window can do for us is to generate the conditional probability of the background words "the", "boy", "playing", and "game" with a distance of no more than 2 from the center word "loves". Assuming that the background words are independent of each other, the conditional probability can be expressed as:

[0135] P(the|loves)*P(boy|loves)*P(playing|loves)*P(game|loves)

[0136] This is a one-to-many scenario, where multiple words are inferred based on one word.

[0137] Skip-gram first one-hot encodes each word, forming a V*1 vector. Then, based on the index mapping, each word is mapped into a d-dimensional space. This method usually maps all words to a matrix W (of shape V*d), so that each word corresponds one-to-one to a column in the matrix.

[0138] To train the Skip-gram model, we first initialize a d-dimensional matrix as the weight matrix W' (the matrix shape is V*d). Each word has the opportunity to become the center word, and also become the background word of other center words because the window is changing. The matrix W is the vector v when it is the center word. i , the matrix W' is the vector u when it is used as a background word i .

[0139] Take out the word vector v of the central word c (vector shape is 1*d) and the other words in the weight matrix W' are inner products. Assuming that the index of the background word is o, the calculation result of each word is

[0140] From the previous step we have V numbers. Assuming i represents any word in the dictionary, the probability of each word is Note that the input of the whole process is (center word vector, background word vector), and we infer the background words from the center words.

[0141] Because context words are independent, let T represent the position of the center word in the window and m the size of the window. This allows us to calculate the probability of inferring context words from each center word. Since we provide the context word vectors as input, we only need to maximize the output probability of the context word. After writing the probability as a continuous multiplication, we transform the function to perform maximum likelihood estimation:

[0142]

[0143] The subscript j represents the subscript of the context word. Because a central word infers multiple context words, j cannot be 0. The logarithm of the function is taken. Because the logarithm function is monotonically increasing, the maximum value of the likelihood function is the same as the maximum value of the likelihood function after taking the logarithm, but it is more convenient for solving.

[0144] After obtaining the probability, we can use the gradient descent method to update the parameters and update the vector of the central word. After all the words in the vocabulary are trained, we get two word vectors for each word v i and u i , v i is the vector when it is the central word, u i It is the vector of the background word. We usually use v i As the final choice.

[0145] The Skip-gram model is designed to learn the representation of words in a sentence. In the scenario of the present invention, a central product has a certain relevance in a context product window, so the present invention uses Skip-gram to train the embedding of products of short-term interest to users.

[0146] Through the analysis of the above principles, the present invention can compare the product click sequence to a sentence, and the products are the words in the sentence. Assume that the set S is S click sessions obtained from N users, and each session s=(item1,item2,…,item M)∈S is a sequence of M items that a user clicks continuously. The items that a user views in a short period of time are similar, and the items in the same session can be regarded as a sentence. When the time interval between two consecutive clicks of a user exceeds half an hour, a new session is started. At this time, our training goal is: for each item i , to learn a d-dimensional vector vitem i Using the Skip-gram model, the present invention defines the optimization function as:

[0147]

[0148] c is the central item in the session, and o is the context item in the session;

[0149] v c Represents the embedding of the central product attributes, v o Indicates the embedding of the context item. Without ', it indicates the input embedding, and with ', it indicates the output embedding.

[0150] D positive is the positive sample set, D negative is a set of negative samples;

[0151] D buy Represents the items purchased within the session;

[0152] Refers to a set of negative samples of the same category. In order to reduce the number of products recommended to users that are mostly of the same type, negative sampling is performed here on products of the same category.

[0153] Negative samples are used to speed up training and improve the quality of the resulting product vectors. This method randomly selects a small number of products that have not been viewed by users to update their corresponding weights. Negative sampling updates only a small number of weights for each training sample, thus reducing the computational effort during gradient descent.

[0154] In order to make the recommendation results more inclined towards the products purchased by the user, the present invention introduces the real purchased product information in the process of generating product embedding.

[0155] In one embodiment of the present invention, the user personalized product recommendation method of the present invention further includes the following steps:

[0156] The GBDT model is used to amplify the user's features and obtain the user's user feature embedding.

[0157] To prevent the target user from cold-starting and having relatively few usable features, this paper trains a GBDT model offline to amplify user features. This paper uses GBDT as a feature extraction tool to discover discriminative features and feature combinations, reducing the labor cost of feature engineering.

[0158] The following first explains the principle of GBDT generating features. Figure 9 As shown in Figure 1, assume that the GBDT consists of two trees, and the GBDT feature is the middle dotted line. When the GBDT is trained and making predictions, instead of outputting the classification probability, the leaf node corresponding to the predicted probability calculated by each tree in the model is marked as 1. This constructs new training data. Suppose the GBDT has two weak classifiers, represented by black and white. The black weak classifier has 3 leaf nodes, and the white weak classifier has 2 leaf nodes. The black weak classifier's prediction for a value between 0 and 1 falls on the second leaf node, and the white weak classifier's prediction for a value between 0 and 1 also falls on the second leaf node. Therefore, the black weak classifier's prediction is [0 1 0], and the white weak classifier's prediction is [0 1]. Taken together, the GBDT output is the combination of these weak classifiers, [0 1 0 0 1]. The GBDT feature for this sample is then [0 1 0 0 1].

[0159] Multiple trees can produce multiple discriminative feature combinations, and each GBDT tree learns from the shortcomings of previous trees. In GBDT, the feature split in the early trees primarily reflects discriminative features for the majority of samples, while the later trees primarily reflect the minority samples for which the residuals remain large after passing through the previous n trees. Features that are discriminative overall are prioritized over those that are discriminative for minority samples.

[0160] The steps of using GBDT to amplify user features are as follows:

[0161] (1) Use the original training set to train the GBDT model to construct a series of decision trees to form a strong classifier. GBDT can generally be implemented using xgboost or lightgbm.

[0162] (2) Use GBDT to predict which leaf node the sample will fall on in each tree, preparing for the subsequent discrete feature construction. At this time, what we need is not the GBDT prediction result, but the specific location of the training data on each tree.

[0163] (3) Use the new data to perform one-hot encoding to mark the position of the leaf node to which the sample output belongs as 1, and obtain the position mark vector W of each sample. The output of all samples will form a sparse matrix that marks the leaf node position of each decision tree output.

[0164] (4) The labeled vector W is used as new training data for subsequent model training.

[0165] In addition to the new features generated above, user feature embedding also includes the user's geographic location, age, gender, etc.

[0166] like Figure 5 As shown, in one embodiment of the present invention, the above step S103 determines the user comprehensive Embedding according to the long-term interest Embedding, the short-term interest Embedding and the user feature Embedding of the user, which specifically includes step S501 and step S502.

[0167] Step S501: Concatenate the short-term interest Embedding and the user feature Embedding to obtain a concatenation result.

[0168] Step S502 : performing an inner product operation on the concatenation result and the long-term interest Embedding to obtain the user comprehensive Embedding.

[0169] Figure 6 This is the overall flow chart of the product recommendation method of the present invention, such as Figure 6 As shown, the present invention inputs the user feature embedding and the short-term interest embedding into the concat layer for concat operation (splicing operation). The spliced ​​result is then sent to the upper neural network MLP layer, where the spliced ​​result is inner-producted with the long-term interest embedding to obtain the user comprehensive embedding. In this invention, the inner product operation on both sides is also optimized using cross-entropy loss, which ensures that the recall results are not only related to short-term interests but also to user behavior.

[0170] In one embodiment of the present invention, determining products matching the user based on the user's comprehensive embedding in step S103 specifically includes:

[0171] Calculate the similarity between the user's comprehensive embedding and the product embedding of each product, and determine the products that match the user based on the similarity.

[0172] like Figure 6As shown, during the recall process, the present invention calculates the similarity between the user embedding and the product embedding, and uses vector retrieval based on the inner product or Euclidean distance to find the product that best matches the user. The product that matches the user is the product that is subsequently recommended to the user.

[0173] As can be seen from the above embodiments, the user-personalized product recommendation method of the present invention has at least the following advantages:

[0174] 1. When constructing a long-term interest embedding for each user, this invention: (1) Graph Embedding technology is used to ensure that each node's embedding contains global graph information and local similarity information of neighboring nodes. (2) Transfer learning is used to expand user-related product data, and the GraphSAGE aggregation function is optimized based on the characteristics of transfer learning. (3) The method of selecting graph embedding nodes is optimized to reduce information loss.

[0175] 2. The present invention divides the time intervals of user product click behaviors into multiple sequences, thereby amplifying user short-term interest data while ensuring that user interest points do not spread and disappear.

[0176] 3. The present invention uses the GBDT model to amplify user features as training data for MLP, which helps to improve the accuracy of recommendations.

[0177] It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0178] Based on the same inventive concept, an embodiment of the present invention also provides a user personalized product recommendation device, which can be used to implement the user personalized product recommendation method described in the above embodiment, as described in the following embodiment. Since the principle of solving the problem by the user personalized product recommendation device is similar to that of the user personalized product recommendation method, the embodiment of the user personalized product recommendation device can refer to the embodiment of the user personalized product recommendation method, and the repeated parts will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and conceived.

[0179] Figure 10 FIG. 1 is a structural block diagram of a device for user-personalized product recommendation according to an embodiment of the present invention. Figure 10 As shown, in one embodiment of the present invention, the user personalized product recommendation device of the present invention includes:

[0180] Long-term interest embedding construction unit 1 is used to determine the user's long-term interest embedding based on the user's order behavior sequence;

[0181] Short-term interest embedding construction unit 2 is used to determine the user's short-term interest embedding based on the user's product click sequence;

[0182] The product matching unit 3 is used to determine a user comprehensive embedding based on the long-term interest embedding, the short-term interest embedding and the user's user feature embedding, and determine a product that matches the user based on the user comprehensive embedding.

[0183] In one embodiment of the present invention, the long-term interest embedding construction unit 1 specifically includes:

[0184] A graph model construction module is configured to determine product purchase data based on the order behavior sequence and to construct a graph model based on the product purchase data, wherein the graph model comprises nodes and directed edges, wherein the nodes comprise user nodes and product nodes;

[0185] A node embedding determination module is used to determine the node embedding of each commodity node in the graph model using the GraphSAGE graph neural network algorithm;

[0186] The long-term interest embedding determination module is configured to filter out N commodity nodes from all commodity nodes according to the node embeddings, and generate the long-term interest embedding according to the node embeddings of the N commodity nodes, where N is a positive integer.

[0187] In one embodiment of the present invention, the long-term interest Embedding determination module is specifically configured to pool the node Embeddings of the N commodity nodes to obtain the long-term interest Embedding.

[0188] In one embodiment of the present invention, the user-personalized product recommendation device of the present invention further includes:

[0189] The transfer learning unit is used to expand the graph model with the commodity purchase data of similar users in a third-party domain by adopting a transfer learning method.

[0190] In one embodiment of the present invention, the node embedding determination module specifically includes:

[0191] The normalized weighted aggregation submodule is used to normalize the weights of the directed edges of the neighboring commodity nodes of the target commodity node when determining the node embedding of the target commodity node, and then aggregate the neighboring commodity nodes according to the normalized weights.

[0192] In one embodiment of the present invention, the long-term interest embedding determination module specifically includes:

[0193] The distance calculation submodule is used to calculate the sum of the distances between the node embedding of each product node and the node embeddings of all product nodes;

[0194] The node selection submodule is used to select N commodity nodes with the smallest sum of distances from all commodity nodes.

[0195] In one embodiment of the present invention, the directed edge is used to represent the order of purchasing products; the weight value of the directed edge between two product nodes is determined by the number of times the two product nodes appear in the same order.

[0196] In one embodiment of the present invention, the short-term interest embedding construction unit 2 specifically includes:

[0197] A subsequence division module, configured to divide the product click sequence into multiple subsequences according to a preset time interval;

[0198] A Skip-gram model training module, configured to train the user's short-term interest product Embedding corresponding to each of the subsequences using a Skip-gram model;

[0199] The short-term interest Embedding determination module is used to pool the user's short-term interest product Embedding corresponding to each of the subsequences to obtain the short-term interest Embedding.

[0200] In one embodiment of the present invention, the user-personalized product recommendation device of the present invention further includes:

[0201] The user feature amplification unit is used to amplify the user's features using the GBDT model to obtain the user's user feature embedding.

[0202] In one embodiment of the present invention, the product matching unit 3 specifically includes:

[0203] A splicing processing module, configured to splice the short-term interest Embedding with the user feature Embedding to obtain a splicing result;

[0204] The inner product operation module is used to perform an inner product operation on the splicing result and the long-term interest Embedding to obtain the user comprehensive Embedding.

[0205] In one embodiment of the present invention, the product matching unit 3 specifically includes:

[0206] The similarity calculation module is used to calculate the similarity between the user's comprehensive embedding and the product embedding of each product, and determine the product that matches the user based on the similarity.

[0207] In order to achieve the above object, according to another aspect of the present application, a computer device is also provided. Figure 11 As shown, the computer device includes a memory, a processor, a communication interface and a communication bus. The memory stores a computer program that can be run on the processor. When the processor executes the computer program, the steps in the above embodiment method are implemented.

[0208] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or a combination of the above chips.

[0209] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and units, such as the corresponding program units in the above-described method embodiments of the present invention. The processor executes the non-transitory software programs, instructions, and modules stored in memory to perform various processor functions and work data processing, thereby implementing the methods in the above-described method embodiments.

[0210] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory may optionally include a memory remotely located relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0211] The one or more units are stored in the memory, and when executed by the processor, perform the method in the above embodiment.

[0212] The specific details of the above-mentioned computer device can be understood by referring to the corresponding descriptions and effects in the above-mentioned embodiments, and will not be repeated here.

[0213] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed in a computer processor, the steps in the above-mentioned method for personalized product recommendation for users are implemented. It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.

[0214] In order to achieve the above-mentioned purpose, according to another aspect of the present application, a computer program product is further provided, including a computer program / instruction, which implements the steps of the above-mentioned user personalized product recommendation method when executed by a processor.

[0215] Obviously, those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computing device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0216] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.

Claims

1. A method for user-personalized product recommendation, characterized in that: include: Determine the user's long-term interest embedding based on the user's order behavior sequence; Determine the user's short-term interest embedding based on the user's product click sequence; Determining a user comprehensive embedding based on the long-term interest embedding, the short-term interest embedding, and the user's user feature embedding, and determining a product matching the user based on the user comprehensive embedding; The process of determining the user's long-term interest embedding based on the user's order behavior sequence specifically includes: Determine commodity purchase data according to the order behavior sequence, and construct a graph model according to the commodity purchase data, wherein the graph model comprises: nodes and directed edges, and the nodes include: user nodes and commodity nodes; Using the GraphSAGE graph neural network algorithm to determine the node embedding of each product node in the graph model; Filtering N commodity nodes from all commodity nodes according to the node embedding, and generating the long-term interest embedding according to the node embeddings of the N commodity nodes, where N is a positive integer; The graph model is expanded using the product purchase data of similar users in a third-party domain using a transfer learning method; the directed edges are used to represent the order in which products are purchased; and the weight of a directed edge between two product nodes is determined by the number of times the two product nodes appear in the same order. The determining of the user comprehensive embedding according to the long-term interest embedding, the short-term interest embedding, and the user characteristic embedding of the user specifically includes: Splicing the short-term interest Embedding with the user feature Embedding to obtain a splicing result; An inner product operation is performed on the splicing result and the long-term interest Embedding to obtain the user comprehensive Embedding.

2. The user personalized product recommendation method according to claim 1, characterized in that: Generating the long-term interest embedding according to the node embeddings of the N product nodes specifically includes: The node embeddings of the N product nodes are pooled to obtain the long-term interest embedding.

3. The user-personalized product recommendation method according to claim 1, characterized in that: The GraphSAGE graph neural network algorithm is used to determine the node embedding of each commodity node in the graph model, specifically including: When determining the node embedding of the target product node, the weights of the directed edges of the neighboring product nodes of the target product node are first normalized, and then the neighboring product nodes are aggregated according to the normalized weights.

4. The user-personalized product recommendation method according to claim 1, characterized in that: The step of selecting N commodity nodes from all commodity nodes according to the node embedding specifically includes: Calculate the sum of the distances between the node embedding of each product node and the node embeddings of all product nodes; Select N commodity nodes with the smallest sum of distances from all commodity nodes.

5. The user-personalized product recommendation method according to claim 1, characterized in that: Determining the user's short-term interest embedding based on the user's product click sequence specifically includes: Dividing the product click sequence into multiple subsequences according to preset time intervals; The Skip-gram model is used to train the embedding of the user's short-term interest products corresponding to each subsequence; The user's short-term interest product Embedding corresponding to each of the subsequences is pooled to obtain the short-term interest Embedding.

6. The user-personalized product recommendation method according to claim 1, characterized in that: Also includes: The GBDT model is used to amplify the user's features and obtain the user's user feature embedding.

7. The user personalized product recommendation method according to claim 1, characterized in that: Determining products matching the user based on the user's comprehensive embedding specifically includes: Calculate the similarity between the user's comprehensive embedding and the product embedding of each product, and determine the products that match the user based on the similarity.

8. A user-personalized product recommendation device, characterized in that: include: Long-term interest embedding construction unit, used to determine the user's long-term interest embedding based on the user's order behavior sequence; The short-term interest embedding construction unit is used to determine the user's short-term interest embedding based on the user's product click sequence; A product matching unit, configured to determine a user comprehensive embedding based on the long-term interest embedding, the short-term interest embedding, and the user feature embedding, and determine a product matching the user based on the user comprehensive embedding; The long-term interest Embedding construction unit specifically includes: A graph model construction module is configured to determine product purchase data based on the order behavior sequence and to construct a graph model based on the product purchase data, wherein the graph model comprises nodes and directed edges, wherein the nodes comprise user nodes and product nodes; A node embedding determination module is used to determine the node embedding of each commodity node in the graph model using the GraphSAGE graph neural network algorithm; a long-term interest embedding determination module, configured to filter out N commodity nodes from all commodity nodes according to the node embeddings, and generate the long-term interest embedding according to the node embeddings of the N commodity nodes, where N is a positive integer; a transfer learning unit configured to expand the graph model using the product purchase data of similar users in a third-party domain using a transfer learning method; the directed edges are configured to represent the order in which products are purchased; and the weight of the directed edge between two product nodes is determined by the number of times the two product nodes appear in the same order; The product matching unit specifically includes: A splicing processing module, configured to splice the short-term interest Embedding with the user feature Embedding to obtain a splicing result; The inner product operation module is used to perform an inner product operation on the splicing result and the long-term interest Embedding to obtain the user comprehensive Embedding.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Information recommendation method and device based on artificial intelligence, electronic equipment and storage medium

    CN111444428A

  • Commodity list recommendation method based on long-term and short-term interest preferences

    CN111932336A