A personalized recommendation method and system based on graph representation learning and deep semantic matching model

By combining graph representation learning and deep semantic matching models with Node2Vec, DSSM and XGBoost algorithms, it solves problems such as recommendation system ranking method selection, feature engineering time-consuming and data sparsity, improves recommendation accuracy and user satisfaction, and solves the cold start problem. , achieving efficient massive data processing.

CN114840745BActive Publication Date: 2024-10-15DATAGRAND TECH INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210324668.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2024-10-15
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

Existing recommendation systems have shortcomings in the selection of ranking methods, feature engineering that consumes a lot of manpower and time, data sparsity, insufficient consideration of user behavior timing characteristics, and cold start problems, resulting in limited recommendation effects and low efficiency.

Method used

Adopt a personalized recommendation method based on graph representation learning and deep semantic matching model, through graph representation vector generation, user interest sequence feature extraction, static attribute vector generation and XGBoost model training, combined with Node2Vec, DSSM and XGBoost algorithms to optimize recommendation ranking and solve Data sparsity and cold start problems are solved to improve recommendation accuracy and user satisfaction.

Benefits of technology

It achieves higher recommendation accuracy and user satisfaction, alleviates the cold start problem, improves training speed and memory efficiency, supports real-time processing of massive data, and meets the stability requirements of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114840745B_ABST
    Figure CN114840745B_ABST
Patent Text Reader

Abstract

The present invention relates to a personalized recommendation method based on graph representation learning and deep semantic matching model, the method comprising the following steps: the first step, data preparation; the second step, graph representation vector generation; the third step, user interest sequence feature vector generation; the fourth step, static attribute vector generation of users and items, forming a DSSM double tower model; the fifth step, training and predicting the model based on XGBoost, and finally selecting TopK as the final recommendation result according to the score size; and also comprising a personalized recommendation system based on graph representation learning and deep semantic matching model. The recommendation sorting method of the present invention proposes a method of fusion recommendation of Node2Vec, DSSM, and XGBOOST, which ensures the accuracy of recommendation and user satisfaction, and effectively alleviates the cold start problem of users and items, has more efficient model training, better portability and flexibility, supports distributed rapid processing of massive data, and lays the foundation for the real-time and stability of the recommendation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a personalized recommendation method and a personalized recommendation system based on graph representation learning and deep semantic matching model. Background Art

[0002] In recent years, with the rapid development of information technology and the rise of mobile Internet, people have entered the era of massive data. When faced with a wide variety of commodities, movies, songs, videos and other services every day, people will feel at a loss, that is, how to quickly find the information of interest, which is the often mentioned problem of information overload. At the same time, various items on the Internet have a long tail phenomenon, which mainly means that most items have no or very few display opportunities. The emergence of personalized recommendation systems is a good response to the above problems, and it has basically become a standard feature or even a highlight feature of various products.

[0003] In the process of building a recommendation system, the selection of a ranking method plays a crucial role in the final generation of recommendation results, and directly determines the accuracy and satisfaction of the recommendation system. However, the current recommendation system ranking method has the following problems:

[0004] 1) The rule-based combination recommendation method has limited effect. Based on weighted, cascaded, and stacked combination recommendation methods, many of them are based on expert experience or business rules to combine multiple recommendation recall results to obtain the final recommendation result. In essence, they are still based on manual rule processing. This method can continuously adjust parameters to optimize the effect and achieve local optimality, but it is difficult to automatically learn various features and weights like many machine learning models to achieve global optimality, and the effect is also limited.

[0005] 2) The feature process consumes a lot of manpower and time. Traditional machine learning models, including linear models and tree models, often require a lot of feature engineering to determine their effectiveness. This requires algorithm engineers and other roles to spend a lot of time and energy on feature extraction and exploratory applications, and to optimize the model effect through continuous attempts. At the same time, the model effect is strongly related to the business scenario, and a lot of work needs to be reprocessed when the scenario changes.

[0006] 3) Data is sparse. Currently, the number of items in actual business scenarios in the industry is huge, and most item data is sparse. In addition, when constructing feature vectors in traditional machine learning models, discrete features are often encoded using a one-hot method, especially when a large number of ID features are introduced for encoding. The dimension of one-hot encoding is equal to the total number of items. For example, the dimension of one-hot encoding of Alibaba's products is at least in the tens of millions. This encoding method is extremely sparse for product data, even if multi-hot encoding is used to encode user historical behaviors, it is also a very sparse vector. This has led to greatly limited applications of many collaborative filtering recommendation algorithms and extension methods.

[0007] 4) The temporal characteristics of user behavior are not fully considered. User behavior data has a temporal order in many cases. The user's interest at a certain moment has a strong correlation with the most recent behavior data, which also greatly affects the final recommendation results. However, when making actual recommendations, many classic latent semantic models do not take this information into consideration.

[0008] 5) The cold start problem has a great impact on the recommendation effect. A large number of new items and new users are generated every day. Due to the lack of behavioral data, there is less information about item and user profiles. This cold start problem poses a great challenge to improving the recommendation effect. The degree of solution to the cold start problem is also an important aspect of measuring the quality of the recommendation system. In addition, there is a lot of attribute information about users and items, and the types are relatively diverse. The general one-hot encoding or binning method often has limited use of this information. Summary of the invention

[0009] The purpose of the present invention is to overcome the shortcomings of the above-mentioned prior art and provide a recommendation ranking method and ranking system based on the combination of graph representation learning and deep semantic matching model. The ranking method and ranking system of the present invention should be able to ensure the accuracy of recommendation and user satisfaction, while effectively alleviating the cold start problem of users and items, and also have better training speed, lower memory consumption, and be able to quickly process massive data to meet the real-time and stability requirements of the recommendation system.

[0010] In order to achieve the above invention purpose, the technical solution provided by the present invention is as follows:

[0011] A personalized recommendation method based on graph representation learning and deep semantic matching model, the method comprising the following steps:

[0012] The first step is data preparation. The user behavior data, user static attribute data, and item static attribute data are used as input data. The input data is preprocessed to obtain a list of items operated by each user and a list of which users have operated each item. Sample data for XGBoost model training is constructed and divided into training and test sets.

[0013] The second step is to generate graph representation vectors. For all user behavior sequence vectors, we use items as nodes to build a graph structure. We use the second-order random walk algorithm to get the sampled walk sequence of each node. We regard the sampled sequence as a piece of text and use the skip-gram model to learn the vector representation to get the vectorized representation of each node, thereby obtaining the vectorized representation of users and items.

[0014] The third step is to generate the feature vector of the user interest sequence. Based on the contextual features of the user behavior sequence, the item vectors of the user's most recent K operations and the most recent m item vectors are sum_pooled, and the results are used as the user's near-real-time and short-term preference features to be integrated into the overall feature vector.

[0015] The fourth step is to generate static attribute vectors of users and items. DSSM uses two relatively independent complex networks to train models for multi-dimensional user and item attribute features, generate static attribute vector representations of users and items, and form a DSSM double-tower model.

[0016] The fifth step is to train and predict the model based on XGBoost. The XGBoost algorithm is used as the final recommendation model for training, and the score of the recommended candidate set is predicted. The TopK is selected as the final recommendation result according to the score size.

[0017] In a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention, the process of preprocessing the input data in the first step is as follows:

[0018] S11. Perform field type check, abnormal value check, repeated data collection cleaning, abnormal user filtering, and overheated item filtering operations;

[0019] S12. The cleaned user behavior data is processed in two aspects. First, it is sorted in descending order according to the time of the behavior to obtain a list of items operated by each user and a list of which users have operated each item. Second, sample data for XGBoost model training is constructed and divided into training set and test set.

[0020] In a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention, in S11, any user userid i, there will be a list of m items [itemid1, itemid2, ..., itemid m ], and for any item itemid i , there will be a list of n users who have performed the action [useriid1, userid2, ..., userid n ].

[0021] In the second step, for the preprocessed user-operated item list and the user list data whose items have been operated, U represents the set of all users in the behavior data. For any user u j ∈U, whose behavior sequence vector is represented by u j =[itemiid1,itemid2,...,itemid m ], u=[u1,u2,...,u n ], the behavior of all users is the sequence vector u.

[0022] In a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention, in the second step, for the user behavior sequence vector used, the following operations are performed:

[0023] S21. Import data. For all user U’s behavior sequence vectors u, take items as nodes, and adjacent items in the sequence as edges. The weights on the edges are the frequency probabilities of adjacent item pairs. Then, a graph structure can be constructed, expressed as G = (V, E, W), where V is defined as the set of all item nodes, E is the combination of the edges connecting these item nodes, and W represents the weights between adjacent item nodes. The weights between nodes are the number of co-occurrences of item pairs divided by the total number of co-occurrences of all item pairs.

[0024] S22. Second-order random walk sampling sequence, using the second-order random walk algorithm to select adjacent nodes in the graph structure, through the control of parameters p and q, the algorithm can be arbitrarily switched between BFS and DFS to achieve the best effect. Assume that the walk length is fixed to l, C i represents the i-th node in the walking process, the initialization node C0 is t, (t, v) means the current node is v, the previous node is t, then C i-1 At node v to C i is the walking probability P(C i =x|C i-1 =v), can be calculated as follows:

[0025]

[0026] in

[0027]

[0028] α pq represents the preference of random walk, d tx represents the shortest distance between nodes t and x, and its value can only be 0, 1, or 2. If t and x are equal, the probability of sampling x is 1 / p; if t and x are connected, the probability of sampling x is 1; if t and x are not connected, the probability of sampling x is 1 / q, w vx is the weight of the edge connecting node v and node x, which is calculated as follows:

[0029]

[0030] w vx It corresponds to the proportion of the number of co-occurrences of node v and node x in the total number of all co-occurring node pairs. Count(v, x) represents the number of co-occurrences of node v and node x in all sequences. By setting the vector dimension d, the number of walks generated by each node r, the walk length l, the context window length k, the return probability p and the input and output parameters q, the sampled walk sequence of each node can be obtained.

[0031] S23. Use the Skip-gram model to generate vector representations and obtain the vectorized representation of the user. Consider the sampled sequence as a text and each itemid as a word. Learn the vector representation based on the Skip-gram model in word2vec. Use the negative sampling method to optimize the model to accelerate the training of the model. Use the IF_ISF (Item Frequency-Inverse Sequence Frequency) method to perform non-uniform sampling on the non-interacted item data. i of The calculation is as follows:

[0032]

[0033] Where count(itemid i ) indicates itemid i The total number of occurrences in all sequences, total seq Indicates the total number of sequences. Indicates that itemid is included i The number of sequences is set by setting the sequence window size and vector dimension parameters, and finally the vectorized representation of each node is obtained. The vector representation of the node obtained by the above three steps S21, S22 and S23 That is, the vectorized representation of the user;

[0034] Similarly, I represents the set of all items in the behavior data, then for any item i j ∈I, the corresponding user sequence vector is represented as i j =[userid1, userid2,..., userid y ], i = {i1, i2, ..., i s ], for i, the vector representation of each item can be obtained by following the three steps S21, S22 and S23 above.

[0035] In the third step, the item vectors of the user's most recent k (k≤5) operations and the results of sum_pooling the item vectors of the most recent m (m≥10) operations are used as the user's near real-time and short-term preference features and integrated into the overall feature vector, which are recorded as and

[0036] In the fourth step, the overall structure of the DSSM dual-tower model is divided into three layers: input layer, representation layer and matching layer: in the input layer, the original user and item attribute features are embedded and mapped to a low-dimensional space, and then feature splicing is performed; in the representation layer, the spliced ​​feature vectors provide different deep neural network models, and the features of users and items are converted into vectors of fixed length after passing through their respective connection layers; the matching layer calculates the similarity between users and items and calculates logloss, which is a logarithmic loss function. A value can be calculated through this function to determine whether the model has converged. If it has not converged, iterative training needs to be continued. If it has converged, the model training process is terminated and the model training is completed.

[0037] In the fourth step, after the DSSM dual-tower model is trained, all parameters of its embedding layer are obtained, and then the embedding vectors of the static attributes of users and items are obtained. By adjusting the activation function activation, learning rate lengning_rate, hidden layer number hider_layer, and optimizer parameters of the solution parameters of the DSSM, the vectorized representations of users and items are obtained respectively. and

[0038] In the fifth step, based on the sample data generated in the first step, combined with the graph representation vectors of users and items, the user near-real-time interest vector and short-term interest vector generated based on the user sequence data, and then the user static attribute feature vector and the item static attribute feature vector obtained based on the neural network model, vector splicing is performed as a feature vector, and then the XGBoost model is trained, and the model parameters are adjusted for optimization. Finally, the score prediction is performed on the candidate set to be recommended, and the TopK is selected as the final recommendation result according to the score size.

[0039] In the fifth step, when adjusting the model parameters for optimization, the model parameters include the learning rate, the maximum depth of the tree in the stopping condition, the maximum number of sub-models, and the parameters λ and γ in the regularization term.

[0040] A personalized recommendation system based on graph representation learning and deep semantic matching model, the personalized recommendation system comprises a data acquisition and preprocessing module, a graph representation vector generation module, a user interest sequence feature vector generation module, a user and item static attribute vector generation module and a model training and prediction module, wherein:

[0041] The data acquisition and preprocessing module takes user behavior data, user static attribute data and item static attribute data as input data, preprocesses the input data, obtains a list of items operated by each user and a list of which users have operated each item, and constructs sample data for XGBoost model training, which is divided into a training set and a test set;

[0042] The graph representation vector generation module constructs a graph structure for all user behavior sequence vectors, taking items as nodes, and uses a second-order random walk algorithm to obtain a sampled walk sequence for each node. The sampled sequence is regarded as a piece of text, and the skip-gram model is used to learn the vector representation to obtain a vectorized representation of each node, thereby obtaining a vectorized representation of the user and a vectorized representation of the item;

[0043] The user interest sequence feature vector generation module performs sum_pooling on the item vectors of the user's most recent K operations and the most recent m item vectors based on the contextual features of the user's behavior sequence, and integrates the results into the overall feature vector as the user's near real-time and short-term preference features;

[0044] The user and item static attribute vector generation module uses two relatively independent complex networks to perform model training on multi-dimensional user and item attribute features respectively using DSSM, generates static attribute vector representations of users and items, and forms a DSSM double-tower model;

[0045] The model training and prediction module performs model training and prediction based on XGBoost, uses the XGBoost algorithm as the final recommendation model for training, predicts the scores of the recommended candidate sets, and selects the TopK as the final recommendation results according to the score size.

[0046] Based on the above technical solution, the personalized recommendation method and recommendation system based on graph representation learning and deep semantic matching model of the present invention have the following technical advantages compared with the prior art:

[0047] 1. The personalized recommendation method and recommendation system based on graph representation learning and deep semantic matching model creatively proposes a method of Node2Vec, DSSM, and XGBoost fusion recommendation, which can well deal with data sparsity, cold start, weakened user behavior sequence, difficulty in describing user interests, and other problems, and greatly ensure the accuracy of recommendation and user satisfaction. Among them, Node2Vec converts user sequences and item sequences into low-dimensional, real-valued, dense vector forms through graph representation learning to deal with data sparsity problems; the DSSM model models the multi-dimensional static attribute features of users and items and also expresses them in low-dimensional vector forms. On the one hand, it deals with data sparsity problems. In addition, since the input is an attribute feature, it is applicable to cold-start users and items, which can deal with cold start problems; the item vectors of the user's most recent K operations and the most recent m item vectors are sum_pooled, and the results are used as user-side near-real-time and short-term preference features to be integrated into the overall feature vector. Here, the adjacent K and M behaviors are taken, which reflects the sequentiality of the behavior data, and the vector reflects the expression of interest, and sum_pooling reflects the description of user interest.

[0048] 2. The recommendation method and recommendation system of the present invention are based on the user's historical behavior sequence, combined with massive historical user behavior data, and based on the Node2Vec method to learn the implicit semantics of users and items, and construct a low-dimensional graph vector representation of users and items. It not only makes full use of implicit feedback data to improve the recommendation effect, but also can well deal with the problem of data sparsity.

[0049] 3. The recommendation method and recommendation system of the present invention also introduce the item vectors of the user's adjacent behaviors and the item vectors of all historical behaviors as the features of the current sample, which not only takes into account the temporal characteristics of the user's behavior, but also takes into account the user's real-time interests and long-term interests, thereby improving the depth and breadth of the application and the accuracy of the recommendation.

[0050] 4. The recommendation method and recommendation system of the present invention perform deep semantic matching learning and vectorization representation of static attribute information of users and items based on the deep semantic matching model DSSM (DeepStructured Semantic Model), further enrich sample features to improve prediction accuracy, and can effectively alleviate the cold start problem of users and items.

[0051] 5. The recommendation method and recommendation system of the present invention perform ranking learning of recommendation results based on XGBoost. XGBoost is an optimized distributed gradient boosting library. The algorithm used is an improvement on the GBDT (Gradient Boosting DecisionTree) algorithm, which aims to be efficient, flexible, portable, and large-scale parallel Boost tree. It can well solve the problem of large-scale data in the industrial sector, and well cope with the challenges of high availability and high concurrency of the recommendation system. It supports efficient parallel training, and has the advantages of faster training speed, lower memory consumption, better accuracy, and support for distributed processing. It can process massive data more quickly, laying a solid foundation for the real-time and stability of the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is a schematic diagram of the overall process of a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention.

[0053] Figure 2 It is a schematic diagram of the second-order random walk process in a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention.

[0054] Figure 3 It is a schematic diagram of generating user near real-time and short-term interest sequence feature vectors in a personalized recommendation method based on graph representation learning and deep semantic matching model in the present invention.

[0055] Figure 4 It is a schematic diagram of the composition of the DSSM double-tower model in a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention.

[0056] Figure 5 It is a schematic diagram of the structural composition of a personalized recommendation system based on graph representation learning and deep semantic matching model of the present invention. DETAILED DESCRIPTION

[0057] Below we further elaborate on the personalized recommendation method and recommendation system based on graph representation learning and deep semantic matching model of the present invention in combination with the accompanying drawings and specific embodiments, so as to more clearly understand its structural composition and working mode, but this cannot be used to limit the scope of protection of the present invention.

[0058] This paper proposes a recommendation ranking method based on the combination of graph representation learning and deep semantic matching model. The basic working ideas of this method are as follows:

[0059] First, representing user behavior data in the form of a graph network structure can not only well characterize the topological structure in the network, but also represent the graph network structure into a low-dimensional, real-valued, dense vector form through graph representation learning.

[0060] Secondly, based on user behavior analysis, the user's near-real-time and short-term interest features are mined, and interest vectors are generated through sum-pooling.

[0061] Then, combined with the three-layer network structure of "input layer-representation layer-matching layer" of the Deep Structured Semantic Model (DSSM), the multi-dimensional static attribute information of users and items is converted into vectorized representation.

[0062] Finally, the feature vectors are concatenated and input into XGBoost for model training, and the new recommendation candidate set is predicted and ranked to obtain the final recommendation result.

[0063] like Figure 1 As shown, the recommendation sorting method of the present invention specifically includes the following implementation steps:

[0064] The first step is data preparation. The user behavior data, user static attribute data, and item static attribute data are used as input data. The input data is preprocessed to obtain a list of items operated by each user and a list of which users have operated each item. Sample data for XGBoost model training is constructed and divided into training and test sets.

[0065] The second step is to generate graph representation vectors. For all user behavior sequence vectors, we use items as nodes to build a graph structure. We use the second-order random walk algorithm to get the sampled walk sequence of each node. We regard the sampled sequence as a piece of text and use the skip-gram model to learn the vector representation to get the vectorized representation of each node, thereby obtaining the vectorized representation of users and items.

[0066] The third step is to generate the feature vector of the user interest sequence. Based on the contextual features of the user behavior sequence, the item vectors of the user's most recent K operations and the most recent m item vectors are sum_pooled, and the results are used as the user's near-real-time and short-term preference features to be integrated into the overall feature vector.

[0067] The fourth step is to generate static attribute vectors of users and items. DSSM uses two relatively independent complex networks to train models for multi-dimensional user and item attribute features, generate static attribute vector representations of users and items, and form a DSSM double-tower model.

[0068] The fifth step is to train and predict the model based on XGBoost. The XGBoost algorithm is used as the final recommendation model for training, and the score of the recommended candidate set is predicted. The TopK is selected as the final recommendation result according to the score size.

[0069] In a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention, the process of preprocessing the input data in the first step is as follows:

[0070] S11. Perform field type check, abnormal value check, repeated data collection cleaning, abnormal user filtering, and overheated item filtering operations;

[0071] S12. The cleaned user behavior data is processed in two aspects. First, it is sorted in descending order according to the time of the behavior to obtain a list of items operated by each user and a list of which users have operated each item. Second, sample data for XGBoost model training is constructed and divided into training set and test set.

[0072] In a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention, the process of preprocessing the input data in the first step is as follows:

[0073] S11. Perform field type check, abnormal value check, repeated data collection cleaning, abnormal user filtering, and overheated item filtering operations;

[0074] S12. The cleaned user behavior data is processed in two aspects. First, it is sorted in descending order according to the time of the behavior to obtain a list of items operated by each user and a list of which users have operated each item. Second, sample data for XGBoost model training is constructed and divided into training set and test set.

[0075] In a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention, in S11, any user userid i , there will be a list of m items [itemid1, itemid2, ..., itemid m ], and for any item itemid i , there will be a list of n users [userid1, userid2, ..., userid n ].

[0076] In the fusion recommendation method proposed in the present invention, three main parts of data are used in the input data, namely user behavior data, user static attribute data, and item static data data. User behavior data is the interaction data between users and items in different business scenarios, which is generally stored in rows. The main fields include the unique ID (userid) identifying the user, the unique ID (itemid) identifying the item, the behavior type (behavior_type), the time when the behavior occurs (behavior_time), etc., where the behavior type is click, like, favorite, comment, purchase, etc., and the time when the behavior occurs is represented by the timestamp when the behavior occurs. User static attribute data mainly includes user demographic information and user portrait information, etc., which are stored in rows. The main fields include the unique ID (userid) identifying the user, age (age), gender (sex), tag (tag), region (province, city), occupation (occupation), etc. Item static attributes, the main fields include: the unique ID (itemid) identifying the item, title (title), category (category), tag (tag), etc.

[0077] In the second step, for the preprocessed user-operated item list and the user list data whose items have been operated, U represents the set of all users in the behavior data. For any user u j ∈U, whose behavior sequence vector is represented by u j =[itemid1,itemid2,...,itemid m ], u=[u1,u2,...,,u n ], the behavior of all users is the sequence vector u.

[0078] In a personalized recommendation method based on graph representation learning and deep semantic matching model of the present invention, in the second step, for the user behavior sequence vector used, the following operations are performed:

[0079] S21. Import data. For all user U’s behavior sequence vectors u, take items as nodes, and adjacent items in the sequence as edges. The weights on the edges are the frequency probabilities of adjacent item pairs. Then, a graph structure can be constructed, expressed as G = (V, E, W), where V is defined as the set of all item nodes, E is the combination of the edges connecting these item nodes, and W represents the weights between adjacent item nodes. The weights between nodes are the number of co-occurrences of item pairs divided by the total number of co-occurrences of all item pairs.

[0080] S22. Second-order random walk sampling sequence, such as Figure 2As shown in the figure, the second-order random walk algorithm is used to select adjacent nodes in the graph structure. By controlling the parameters p and q, the algorithm can be arbitrarily switched between BFS and DFS to achieve the best effect. As the basic algorithm of the graph, the graph traversal algorithm can be divided into breadth-first search BFS and depth-first search DFS according to the order of visiting nodes. Assume that the walk length is fixed to l, C i represents the i-th node in the walking process, the initialization node C0 is t, (t, v) means the current node is v, the previous node is t, then C i-1 At node v to C i is the walking probability P(C i =x|C i-1 =v), can be calculated as follows:

[0081]

[0082] in

[0083]

[0084] α pq represents the preference of random walk, d tx represents the shortest distance between nodes t and x, and its value can only be 0, 1, or 2. If t and x are equal, the probability of sampling x is 1 / p; if t and x are connected, the probability of sampling x is 1; if t and x are not connected, the probability of sampling x is 1 / q, w vx is the weight of the edge connecting node v and node x, which is calculated as follows:

[0085]

[0086] w vx It corresponds to the proportion of the number of co-occurrences of node v and node x in the total number of co-occurrences of all node pairs. Count(v, x) represents the number of co-occurrences of node v and node x in all sequences. Figure 2 In G, the probability of walking can be determined by parameters p and q. The processing process is as follows Figure 2 As shown, it means that the current node is v, and the next step is to go to the x node, and the x node has four options from x1 to x4. The specific node to choose depends on the value of p and q parameters and the calculation of this value.

[0087]

[0088] Finally, the final walk node sequence can be generated. In summary, by setting the vector dimension d, the number of walks r generated by each node, the walk length l, the context window length k, the return probability p and the input and output parameters q, the sampled walk sequence of each node can be obtained. By setting the vector dimension d, the number of walks r generated by each node, the walk length l, the context window length k, the return probability p and the input and output parameters q, the sampled walk sequence of each node can be obtained;

[0089] S23. Use the Skip-gram model to generate vector representations and obtain the vectorized representation of the user. Treat the sampled sequence as a piece of text and each itemid as a word. Learn the vector representation based on the Skip-gram model in word2vec. Use the negative sampling method to optimize the model to accelerate the training of the model. Use the IF_lSF (Item Frequency-Inverse Sequence Frequency) method to perform non-uniform sampling on the non-interacted item data. i of The calculation is as follows:

[0090]

[0091] Where count(itemid i ) indicates itemid i The total number of occurrences in all sequences, total seq Indicates the total number of sequences, c Indicates that itemid is included i The number of sequences is set by setting the sequence window size and vector dimension parameters, and finally the vectorized representation of each node is obtained. The vector representation of the node obtained through the above three steps S21, S22 and S23 is the vectorized representation of the user;

[0092] Similarly, I represents the set of all items in the behavior data, then for any item i j ∈I, the corresponding user sequence vector is represented as i j =[userid1, userid2,..., userid y ], i = {i1, i2, ..., i s ], for i, the vector representation of each item can be obtained by following the three steps S21, S22 and S23 above.

[0093] In the third step, if Figure 3As shown in the figure, as the scale of user and item data continues to increase, user interests change dramatically in many recommendation scenarios. By introducing new information about user historical behavior sequence features, the feature depth and breadth of recommendation model training are further enriched, so that the recommendation model can better capture and tap user interests, which often leads to better recommendation results. Focusing on the contextual features of user behavior sequences, the present invention integrates the item vectors of the user's most recent k (k≤5) operations and the results of sum_pooling the most recent m (m≥10) item vectors as user-side near-real-time and short-term preference features into the overall feature vector, which are recorded as and exist Figure 3 In the figure, the middle one represents a user and a sequence of item ids corresponding to his or her behaviors, and each item id actually corresponds to a vector representation generated by Node2Vec (that is, a series of boxes). The short-term interest generation method shown above performs sum_pooling on the vectors corresponding to m item ids to obtain the final vector representation of the short-term interest. The real-time interest generation method shown below performs sum_pooling on the vectors corresponding to k item ids to obtain the final vector representation of the short-term interest.

[0094] In the fourth step, if Figure 4 As shown in the figure, the overall structure of the DSSM dual-tower model is divided into three layers: input layer, representation layer and matching layer. In the input layer, the original user and item attribute features are embedded and mapped to a low-dimensional space, and then feature splicing is performed. In the representation layer, the spliced ​​feature vectors provide different deep learning models, and the user and item features are converted into vectors of fixed length after passing through their respective connection layers. The matching layer calculates the similarity between users and items and calculates logloss. Logloss is a logarithmic loss function, through which a value can be calculated to determine whether the model has converged. If it has not converged, iterative training needs to be continued. If it has converged, the model training process is terminated and the model training is completed.

[0095] In the fourth step, after the DSSM dual-tower model is trained, all parameters of its embedding layer are obtained, and then the embedding vectors of the static attributes of users and items are obtained. By adjusting the activation function activation, learning rate lengning_rate, hidden layer number hider_layer, and optimizer parameters of the solution parameters of the DSSM, the vectorized representations of users and items are obtained respectively. and

[0096] In the fifth step, based on the sample data generated in the first step, combined with the graph representation vectors of users and items, the user near-real-time interest vector and the short-term interest vector generated based on the user sequence data, and then based on the user static attribute feature vector and the item static attribute feature vector obtained by the neural network model, vector splicing is performed as a feature vector, and then the XGBoost model is trained. The full name of the XGBoost model is "Extreme Gradient Boosting", which is a commonly used gradient boosting model. At the same time, the XGBoost model parameters are adjusted for optimization, and finally the score prediction is performed on the candidate set to be recommended, and the TopK is selected as the final recommendation result according to the score size.

[0097] In the fifth step, when adjusting the XGBoost model parameters for optimization, the model parameters include the learning rate, the maximum depth of the tree in the stopping condition, the maximum number of sub-models, and the parameters λ and γ in the regularization term.

[0098] In summary, after the previous multiple feature processing, the XGBoost model is finally used as the final recommendation model for training. Based on the sample data generated in the first step, combined with the graph representation vectors of users and items, the user near-real-time interest vector and short-term interest vector generated based on user sequence data, the user static attribute feature vector and item static attribute feature vector obtained based on the neural network model, the vector is concatenated as the feature vector The XGBoost model is trained. The model parameters are adjusted for optimization, including the learning rate, the maximum depth of the tree in the stop condition, the maximum number of sub-models, and the parameters λ and γ in the regularization term. Finally, the score of the candidate set to be recommended is predicted, and the TopK is selected as the final recommendation result according to the score size.

[0099] like Figure 5 As shown, the present invention also designs a personalized recommendation system based on graph representation learning and deep semantic matching model, which includes a data acquisition and preprocessing module, a graph representation vector generation module, a user interest sequence feature vector generation module, a user and item static attribute vector generation module and a model training and prediction module, wherein:

[0100] The data acquisition and preprocessing module takes user behavior data, user static attribute data and item static attribute data as input data, preprocesses the input data, obtains a list of items operated by each user and a list of which users have operated each item, and constructs sample data for XGBoost model training, which is divided into a training set and a test set;

[0101] The graph representation vector generation module constructs a graph structure for all user behavior sequence vectors, taking items as nodes, and uses a second-order random walk algorithm to obtain a sampled walk sequence for each node. The sampled sequence is regarded as a piece of text, and the skip-gram model is used to learn the vector representation to obtain a vectorized representation of each node, thereby obtaining a vectorized representation of the user and a vectorized representation of the item;

[0102] The user interest sequence feature vector generation module performs sum_pooling on the item vectors of the user's most recent K operations and the most recent m item vectors based on the contextual features of the user's behavior sequence, and integrates the results into the overall feature vector as the user's near real-time and short-term preference features;

[0103] The user and item static attribute vector generation module uses two relatively independent complex networks to perform model training on multi-dimensional user and item attribute features respectively using DSSM, generates static attribute vector representations of users and items, and forms a DSSM double-tower model;

[0104] The model training and prediction module performs model training and prediction based on XGBoost, uses the XGBoost algorithm as the final recommendation model for training, predicts the scores of the recommended candidate sets, and selects the TopK as the final recommendation results according to the score size.

[0105] The personalized recommendation system based on graph representation learning and deep semantic matching model is used as a computer medium, runs in a computer system, executes the first to fifth steps, and obtains accurate personalized recommendation results.

[0106] Undoubtedly, the above is only a specific example of implementing the personalized recommendation method and recommendation system based on graph representation learning and deep semantic matching model of the present invention, and other feasible step substitutions and parameter selections are also included. In short, the protection scope of the present invention also includes other obvious changes and substitutions for those skilled in the art.

Claims

1. A personalized recommendation method based on graph representation learning and deep semantic matching model, characterized in that: The method comprises the following steps: The first step is data preparation. The user behavior data, user static attribute data and item static attribute data are used as input data. The input data is preprocessed to obtain a list of items operated by each user and a list of which users have operated each item. Sample data for XGBoost model training is constructed and divided into training set and test set. The second step is to generate graph representation vectors. For all user behavior sequence vectors, we use items as nodes to build a graph structure. We use the second-order random walk algorithm to get the sampled walk sequence of each node. We regard the sampled sequence as a piece of text and use the skip-gram model to learn the vector representation to get the vectorized representation of each node, thereby obtaining the vectorized representation of users and items. The third step is to generate the feature vector of the user interest sequence. Based on the contextual features of the user behavior sequence, the item vectors of the user's most recent K operations and the most recent m item vectors are sum_pooled, and the results are used as the user's near-real-time and short-term preference features to be integrated into the overall feature vector. The fourth step is to generate static attribute vectors of users and items. DSSM uses two relatively independent complex networks to train models for multi-dimensional user and item attribute features, generate static attribute vector representations of users and items, and form a DSSM double-tower model. The fifth step is to train and predict the model based on XGBoost. The XGBoost algorithm is used as the final recommendation model for training, and the score of the recommended candidate set is predicted. The TopK is selected as the final recommendation result according to the score size.

2. According to claim 1, a personalized recommendation method based on graph representation learning and deep semantic matching model is characterized in that: The process of preprocessing the input data in the first step is as follows: S11. Perform field type check, abnormal value check, repeated data collection cleaning, abnormal user filtering, overheated items filtering operations to achieve data cleaning; S12. The cleaned user behavior data is processed in two aspects. First, it is sorted in descending order according to the time of the behavior to obtain a list of items operated by each user and a list of which users have operated each item. Second, sample data for XGBoost model training is constructed and divided into training set and test set.

3. The personalized recommendation method based on graph representation learning and deep semantic matching model according to claim 2, characterized in that: In S11, any userid i , there will be a list of m items [itemid1, itemid2, ..., itemid m ], and for any item itemid i , there will be a list of n users [userid1, userid2, ..., userid n ].

4. The personalized recommendation method based on graph representation learning and deep semantic matching model according to claim 1, characterized in that: In the second step, for the preprocessed user-operated item list and the user list data whose items have been operated, U represents the set of all users in the behavior data. For any user u j ∈U, whose behavior sequence vector is represented by u j =[itemid1itemid2,...,itemid m ], the behavior sequence vector of all users is u, u=[u1,u2,...,u n ].

5. The personalized recommendation method based on graph representation learning and deep semantic matching model according to claim 4, characterized in that: In the second step, for the user behavior sequence vector used, perform the following operations: S21. Import data. For all user U’s behavior sequence vectors u, take items as nodes, and adjacent items in the sequence as edges. The weights on the edges are the frequency probabilities of adjacent item pairs. Then, a graph structure can be constructed, expressed as G = (V, E, W), where V is defined as the set of all item nodes, E is the combination of the edges connecting these item nodes, and W represents the weights between adjacent item nodes. The weights between nodes are the number of co-occurrences of item pairs divided by the total number of co-occurrences of all item pairs. S22. Second-order random walk sampling sequence, using the second-order random walk algorithm to select adjacent nodes in the graph structure. By controlling the parameters p and q, the algorithm can be arbitrarily transformed in BFS and DFS to achieve the best effect; assuming that the walk length is fixed to l, C i represents the i-th node in the walking process, the initialization node C0 is t, (t, v) means the current node is v, the previous node is t, then C i-1 At node v to C i is the walking probability P(C i =x|C i-1 =v), can be calculated as follows: in α pq represents the preference of random walk, d tx represents the shortest distance between nodes t and x, and its value can only be 0, 1, or 2. If t and x are equal, the probability of sampling x is 1 / p; if t and x are connected, the probability of sampling x is 1; if t and x are not connected, the probability of sampling x is 1 / q, w vx is the weight of the edge connecting node v and node x, which is calculated as follows: w vx It corresponds to the proportion of the number of co-occurrences of node v and node x in the total number of all co-occurring node pairs. Count(v, x) represents the number of co-occurrences of node v and node x in all sequences. By setting the vector dimension d, the number of walks generated by each node r, the walk length l, the context window length k, the return probability p and the input and output parameters q, the sampled walk sequence of each node can be obtained. S23. Use the Skip-gram model to generate vector representations and obtain vector representations of users. Treat the sampled sequence as a piece of text and each itemid as a word. Learn vector representations based on the Skip-gram model in word2vec. Use negative sampling to optimize the model to accelerate model training. Use the IF_ISF method to perform non-uniform sampling on non-interacted item data. i of The calculation is as follows: Where count(itemid i ) indicates itemid i The total number of occurrences in all sequences, total seq Indicates the total number of sequences. Indicates that itemid is included i The number of sequences is set by setting the sequence window size and vector dimension parameters, and finally the vectorized representation of each node is obtained. The vector representation of the node obtained by the above three steps S21, S22 and S23 That is, the vectorized representation of the user; Similarly, I represents the set of all items in the behavior data, then for any item i j ∈I, the corresponding user sequence vector is represented as i j =[userid1, userid2,..., userid y ],i=[i1,i2,...,i s ], for i, the vector representation of each item can be obtained by following the three steps S21, S22 and S23 above.

6. The personalized recommendation method based on graph representation learning and deep semantic matching model according to claim 1, characterized in that: In the fourth step, the overall structure of the DSSM dual-tower model is divided into three layers: input layer, representation layer and matching layer: in the input layer, the original user and item attribute features are embedded and mapped to a low-dimensional space, and then feature splicing is performed; in the representation layer, the spliced ​​feature vectors provide different deep learning models, and the features of users and items are converted into vectors of fixed length after passing through their respective connection layers; the matching layer calculates the similarity between users and items and calculates logloss.

7. The personalized recommendation method based on graph representation learning and deep semantic matching model according to claim 1, characterized in that: In the fourth step, after the DSSM dual-tower model is trained, all parameters of its embedding layer are obtained, and then the embedding vectors of the static attributes of users and items are obtained. By adjusting the activation function activation, learning rate lengning_rate, hidden layer number hider_layer, and optimizer parameters of the solution parameters of the DSSM, the vectorized representations of users and items are obtained respectively. and 8. The personalized recommendation method based on graph representation learning and deep semantic matching model according to claim 1, characterized in that: In the fifth step, based on the sample data generated in the first step, combined with the graph representation vectors of users and items, the user near-real-time interest vector and short-term interest vector generated based on the user sequence data, and then the user static attribute feature vector and the item static attribute feature vector obtained based on the neural network model, vector splicing is performed as a feature vector, and then the XGBoost model is trained, and the model parameters are adjusted for optimization. Finally, the score prediction is performed on the candidate set to be recommended, and the TopK is selected as the final recommendation result according to the score size.

9. The personalized recommendation method based on graph representation learning and deep semantic matching model according to claim 8, characterized in that: In the fifth step, when adjusting the model parameters for optimization, the model parameters include the learning rate, the maximum depth of the tree in the stopping condition, the maximum number of sub-models, and the parameters λ and γ in the regularization term.

10. A personalized recommendation system based on graph representation learning and deep semantic matching model, characterized in that: The personalized recommendation system consists of a data acquisition and preprocessing module, a graph representation vector generation module, a user interest sequence feature vector generation module, a user and item static attribute vector generation module, and a model training and prediction module, among which: The data acquisition and preprocessing module takes user behavior data, user static attribute data and item static attribute data as input data, preprocesses the input data, obtains a list of items operated by each user and a list of which users have operated each item, and constructs sample data for XGBoost model training, which is divided into a training set and a test set; The graph representation vector generation module constructs a graph structure for all user behavior sequence vectors, taking items as nodes, and uses a second-order random walk algorithm to obtain a sampled walk sequence for each node. The sampled sequence is regarded as a piece of text, and the skip-gram model is used to learn the vector representation to obtain a vectorized representation of each node, thereby obtaining a vectorized representation of the user and a vectorized representation of the item; The user interest sequence feature vector generation module performs sum_pooling on the item vectors of the user's most recent K operations and the most recent m item vectors based on the contextual features of the user's behavior sequence, and integrates the results into the overall feature vector as the user's near real-time and short-term preference features; The user and item static attribute vector generation module uses two relatively independent complex networks to perform model training on multi-dimensional user and item attribute features respectively using DSSM, generates static attribute vector representations of users and items, and forms a DSSM double-tower model; The model training and prediction module performs model training and prediction based on XGBoost, uses the XGBoost algorithm as the final recommendation model for training, predicts the scores of the recommended candidate sets, and selects the TopK as the final recommendation results according to the score size.