A hybrid recommendation method integrating collaborative filtering and embedding technology

By integrating the ALS algorithm and the node2vec model, combining product side information, building a network structure diagram and performing vectorization processing, the problems of low accuracy and cold start in the recommendation system are solved, and accurate recommendations for new products and new users are achieved.

CN117216416BActive Publication Date: 2025-09-09HUAIYIN INSTITUTE OF TECHNOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311358647.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-19
Publication Date
2025-09-09
Estimated Expiration
2043-10-19

AI Technical Summary

Technical Problem

Existing recommendation algorithms have low accuracy when dealing with sparse information, large data volumes, and complex network structures, and suffer from cold start problems. In particular, they are unable to provide accurate recommendations when new products or new users join the e-commerce platform.

Method used

The ALS algorithm is used to train the latent semantic model and combined with the node2vec model in the Embedding technology. The side information of the product is added to make up for the lack of interaction, a network structure diagram is constructed and vectorized, and the cosine value is used to measure the similarity of the products. Finally, the recommendation results of the two algorithms are weighted combined.

Benefits of technology

It improves the accuracy and scalability of recommendations, solves the cold start problem, compensates for data sparsity, and enables accurate recommendations for new products and new users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117216416B_ABST
    Figure CN117216416B_ABST
Patent Text Reader

Abstract

The present invention discloses a hybrid recommendation method integrating collaborative filtering and Embedding technology, comprising the following steps: S1: data preprocessing, which involves first processing the data, cleaning the data, and converting the data into a specified format; S2: training a latent semantic model using the ALS algorithm, and calculating a user-item recommendation matrix based on a user rating table and an item data set; S3: vectorizing network nodes, which involves using the node2vec model in Embedding to implement node vectorization, adding item side information, and after completing the item vectorization, calculating the cosine value between the corresponding feature vectors of the items, and then recommending the item closest to the target item to the user; and S4: weightedly combining the recommendation results of the ALS algorithm and the Node2vec algorithm to obtain the final hybrid recommendation result. This method solves, to a certain extent, the shortcomings of certain recommendation algorithms, such as low accuracy, poor scalability, data sparsity, and the cold start problem that is prone to occur in recommendation systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to machine learning and recommendation system technology, and specifically relates to a hybrid recommendation method that integrates collaborative filtering and embedding technology. Background Art

[0002] In the prior art, there are already some technologies closely related to the present invention, such as collaborative filtering algorithms and Embedding technology.

[0003] First, recommendations based on collaborative filtering don't require rigorous modeling of items or users. Furthermore, the recommendations generated by this method are open and can share the experiences of others, effectively supporting users in discovering potential interests and preferences, thus providing a thinking medium for the present invention. However, in most implementations, user historical preferences are stored in sparse matrices, and calculations on sparse matrices present significant challenges, including the possibility that incorrect preferences of a small number of people can significantly impact the accuracy of recommendations.

[0004] Second, existing recommendation algorithms primarily focus on deep learning, combining one-hot encoding with neural network models to generate word vector representations by building statistical language models. However, these methods struggle with information sparseness, large data volumes, and complex network structures.

[0005] Finally, when recommendation algorithms are applied to recommendation systems, they often involve adding new products or adding new users. In these cases, the system lacks user attribute information and behavioral records, making it impossible to build user profiles and provide accurate recommendations. This startup situation is known as the cold start problem. Summary of the Invention

[0006] The present invention designs a hybrid recommendation method that integrates collaborative filtering and Embedding technology, and selects the ALS algorithm to train a latent semantic model to achieve the goal of collaborative filtering: to reveal hidden features that can explain why the corresponding predicted scores are given, and then make recommendations based on the scores. The node2vec model in the Embedding technology is used to process network structure data, wherein the node2vec model adds a wandering parameter, which is conducive to preserving network structure features, so that the vector value can contain the implicit relationship between nodes, is easy to store and calculate, and is adaptable. Compared with traditional recommendation models, it has obvious advantages. By adding side supplementary information to the nodes representing the products, the lack of interaction is compensated and the cold start problem is solved.

[0007] The technical solution disclosed in the present invention is as follows: a hybrid recommendation method integrating collaborative filtering and embedding technology, comprising the following steps:

[0008] S1: Data preprocessing: first process the data, clean the data and convert the data into the specified format;

[0009] S2: Use the ALS algorithm to train the latent semantic model and calculate the user-item recommendation matrix based on the user rating table and item dataset;

[0010] S3: Vectorize network nodes using the node2vec model in Embedding. Add product information. After completing product vectorization, calculate the cosine value between the corresponding feature vectors of the products, and then recommend the product closest to the target product to the user.

[0011] S4: Perform a weighted combination of the recommendation results of the ALS algorithm and the Node2vec algorithm to obtain the final hybrid recommendation result.

[0012] Based on the above solution, as a preferred method, step 1.1: randomly divide the user-clothing rating dataset into a training set and a test set in a ratio of 8:2. The training set is used to train the ALS model, and the test set is used to calculate the RMSE and MAE values ​​and verify the accuracy of the recommendation algorithm.

[0013] Step 1.2: Convert the training set to an Rating() type RDD and save it in memory. This will be used when training the ALS model. Extract the product names from the dataset and save all the product names in an Array[] type RDD. This will also be saved in memory and used when node2vec generates the dimensions corresponding to the product names.

[0014] Based on the above solution, as a preferred method, step 2.1: read the user ID uid and the product ID pid from the user rating table in the database as the user rating dataset;

[0015] Step 2.2: Train the latent semantic model using the ALS algorithm. First, define the model parameters: the rank of the latent feature vector, the number of iterations, and the regularization coefficient λ. Rank represents the complexity of the model, which refers to the number of feature values ​​for each user feature and each product feature; iterations is the number of times the model is trained, with a given training upper limit; and λ is a parameter to prevent overfitting.

[0016] Step 2.3: Load the user rating table from the database and randomly split the data set into a training set and a test set, using 80% of the data as the training set and 20% of the data as the test set;

[0017] Step 2.4: Use the root mean square error (RMSE) and mean absolute error (MAE) as the evaluation criteria for the model, that is, calculate the error between the predicted rating and the actual rating;

[0018] Step 2.5: Train the latent semantic model using the ALS algorithm and obtain the predicted score. Pass the parameters trainData, rank, iterations, and λ to the model respectively. Calculate the RMSE and MAE based on the error between the predicted score and the true score.

[0019] Step 2.6: Adjust the parameter values ​​and select the parameters with the smallest RMSE and MAE as the model optimization choice. The smaller the RMSE and MAE values, the better the performance on the test set.

[0020] Step 2.7: After training and calculation, the optimal parameters are obtained, and the latent semantic model optimization is completed;

[0021] Step 2.8: Obtain the user recommendation matrix, calculate the predicted rating based on the latent feature vectors of the user and item, and obtain the user's recommendation list based on the rating;

[0022] Step 2.9: Calculate the Cartesian product of user ID uid and product ID pid, generate a tuple of (uid, pid), and obtain the empty user-product rating matrix;

[0023] Step 2.10: Call the predict method in the latent semantic model trained by the ALS algorithm and pass in the empty rating matrix to obtain the predicted rating of the user-item.

[0024] Step 2.11: Use the filter function to filter out items with a predicted score greater than 0, and then group and aggregate them based on the user ID uid to obtain a score list;

[0025] Step 2.12: Sort the prediction results in the list by their prediction scores, and return the K products with the largest values ​​as the recommended results for the current user.

[0026] Based on the above solution, as a preferred method, step 3.1: Constructing a network structure, first construct a network based on the product browsing sequence. Since the browsing sequence has a temporal order, the resulting network structure diagram is a directed graph, in which nodes represent different products, edges represent the co-occurrence of this pair of products in the same sequence, the direction of the arrow indicates the browsing order, and the edge weight represents the number of times the two products co-occur in all sequences;

[0027] Step 3.2: Use node2vec to vectorize nodes. Based on the network structure diagram, use the node2vec algorithm to vectorize the nodes. Before this, you need to complete the model parameter settings. Set the walk length of the model's random walk, the number of walks for each node to numwalks, the two transition probabilities of the random walk to q and r, respectively, and the dimension of the node vector to dim. Use the Skip-Gram model for vector training, set its training window size to windowsize, and the number of iterations to iter. Finally, obtain the vector representation of the product.

[0028] Step 3.3: Add product side information. Side information includes product brand, category, and online rating. Side information supplements product information and is added to the product vector representation. If the original product vector dimension is X, the method of adding side information is to use different weights to add it as a new attribute of the product vector. By comparing the clustering effect, these three indicators are finally supplemented with the merchant's X+1th dimension, X+2th dimension, and X+3th dimension with weights of λ1, λ2, and λ3 respectively. The final business dimension is X+3. The first X dimensions represent the original attributes of the product, and the last three dimensions represent the supplementary side information of the product.

[0029] Step 3.4: Match similar products. After completing the vectorization of the products, perform vector measurement on the similarity between the products. In the constructed space, similar products are merged and clustered. At this time, the similarity between two nodes is transformed into the similarity between two vectors. In space, the closer the distance, the smaller the difference, and the farther the distance, the greater the difference. According to the distance measurement standard between vectors, the cosine value between vectors is used as the measurement standard. By measuring the angle between two vectors and the vector length, this method defines the cosine value between two vectors as:

[0030]

[0031] Where a and b represent two different commodity vectors, Θ represents the angle between the vectors,

[0032] The above formula describes the spatial distance between two product vectors. The larger the cosine value between the two product vectors, the closer the spatial distance between them and the higher the similarity, and vice versa. Each product can thus obtain a cosine value, and each value represents the similarity between the remaining products and the product. Finally, the top N products with the corresponding cosine values ​​for each product are selected as the matching sequence of the most similar products, and then Top-N recommendations are made in ascending order.

[0033] Based on the above solution, as a preferred method, the recommendation results of the ALS algorithm and the Node2vec algorithm are weighted and predicted. The formula for prediction and recommendation is as follows:

[0034] Result=αAresult+(1-α)Nresult

[0035] Where 0≤α≤1, Aresult is the recommendation based on ALS score prediction, Nresult is the recommendation based on the distance between items under node2vec, and α is the proportion of the recommendation results based on ALS and Node2vc in the final recommendation results. The final recommendation results of the two recommendation algorithms are obtained according to the weights of the two recommendation results.

[0036] Compared with the prior art, the present invention has the following beneficial effects:

[0037] The node2vec graph embedding algorithm is integrated with the recommendation system to achieve graph embedding of entity objects.

[0038] The node2vec model is an improvement on the DeepWalk model. By adding two walking parameter values ​​to control the model's walking strategy, it is easier to capture the homogeneity and structure of the network structure than the DeepWalk model.

[0039] After using node2vec to build the network structure diagram, add side supplementary information to the nodes representing the products to make up for the lack of interaction and solve the cold start problem. Due to the regular updates of the e-commerce platform, there is no interactive information or sparse information between the newly added product groups and user groups in different time periods. At this time, it is impossible to complete the targeted recommendation of products based on historical information. In this invention, in order to solve the cold start problem of products in such recommendation systems, the side information of the products is used as a supplement, and these indicators are used as new dimension values ​​to constitute a supplementary description of the product vector, thereby better solving the problem of no user browsing information for the product, and also greatly improving the representativeness of the product vector.

[0040] In summary, the present invention trains a latent semantic model through the ALS algorithm to predict product ratings and make recommendations based on the ratings. This makes up for the data sparsity of the collaborative filtering algorithm. At the same time, by adopting the Node2vec model to construct the network structure and adding side supplementary information, it makes up for the lack of interaction and solves the cold start problem. Finally, the recommendation results based on the ALS algorithm and the Node2vec algorithm are weighted and combined to obtain the final hybrid recommendation result. Taking into account that different recommendation algorithms have different advantages and disadvantages, the present invention combines the advantages of each algorithm in different situations and proposes a hybrid recommendation algorithm that integrates collaborative filtering and Embedding technology, which to a certain extent solves the shortcomings of certain recommendation algorithms such as low accuracy, poor scalability, data sparsity, and the cold start problem that is prone to occur in the recommendation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is the ALS algorithm flow chart;

[0042] Figure 2 It is a user recommendation matrix flow chart;

[0043] Figure 3 It is the process of constructing the commodity network structure diagram;

[0044] Figure 4 It is a flowchart of the hybrid recommendation algorithm. DETAILED DESCRIPTION

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the specific embodiments of the present invention will be described below with reference to the accompanying drawings. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings and other embodiments can be obtained based on these drawings without inventive work.

[0046] A hybrid recommendation algorithm that integrates collaborative filtering and embedding technology includes the following steps:

[0047] Step 1: Data preprocessing design. Before implementing the designed algorithm, we need to process the data, clean the data and convert the data into the specified format.

[0048] Step 1.1: Randomly split the user-clothing rating dataset into a training set and a test set in an 8:2 ratio. The training set is used to train the ALS model. The test set is used to calculate the RMSE and MAE values ​​and verify the accuracy of the recommendation algorithm.

[0049] Step 1.2: Convert the training set to an Rating() RDD and store it in memory. This will be used when training the ALS model. Extract the product names from the dataset and store them in an Array[] RDD. This will also be used when node2vec generates the corresponding product name dimension.

[0050] Step 2: Use the ALS algorithm to train the latent semantic model. The present invention uses ALS as a collaborative filtering algorithm to calculate the user-product recommendation matrix based on the user rating table and the product data set.

[0051] Step 2.1: Read the user ID uid and product ID pid from the user rating table in the database as the user rating dataset.

[0052] Step 2.2: Train the latent semantic model using the ALS algorithm. First, define the model parameters: the rank of the latent feature vector, the number of iterations, and the regularization coefficient λ. Rank represents the complexity of the model, which refers to the number of feature values ​​for each user feature and each product feature.

[0053] Iterations is the number of times the model is trained, giving a training upper limit; λ is a parameter to prevent overfitting.

[0054] Step 2.3: Load the user rating table from the database and randomly split the dataset into a training set and a test set, using 80% of the data as the training set and 20% of the data as the test set.

[0055] Step 2.4: Use the root mean square error (RMSE) and mean absolute error (MAE) as the evaluation criteria for the model, that is, calculate the error between the predicted rating and the true rating.

[0056] Step 2.5: Train the latent semantic model using the ALS algorithm and obtain the predicted score. Pass the parameters trainData, rank, iterations, and λ to the model respectively. Calculate the RMSE and MAE based on the error between the predicted score and the true score.

[0057] Step 2.6: Adjust the parameter values ​​and select the parameters with the smallest RMSE and MAE as the model optimization choice. The smaller the RMSE and MAE values, the better the performance on the test set.

[0058] Step 2.7: After training, the optimal parameters are obtained, that is, the latent semantic model optimization is completed. The ALS model training process is as follows: Figure 1 shown.

[0059] Step 2.8: Obtain the user recommendation matrix, calculate the predicted rating based on the latent feature vectors of the user and item, and obtain the user's recommendation list based on the rating.

[0060] Step 2.9: Calculate the Cartesian product of user ID uid and product ID pid, generate a tuple of (uid, pid), and obtain an empty user-product rating matrix.

[0061] Step 2.10: Call the predict method in the latent semantic model trained by the ALS algorithm and pass in the empty rating matrix to obtain the predicted rating of the user-item.

[0062] Step 2.11: Use the filter function to filter out items with a predicted score greater than 0, and then group and aggregate them based on the user ID uid to obtain a score list.

[0063] Step 2.12: Sort the prediction results in the list by the prediction score, and return the K products with the largest values ​​as the recommendation results for the current user. The recommendation process is as follows: Figure 2 shown.

[0064] Step 3: Vectorize the network nodes using the node2vec model in Embedding technology. Add product information. After completing product vectorization, calculate the cosine value between the corresponding feature vectors of the products, and then recommend the product closest to the target product to the user.

[0065] Step 3.1: Constructing the network structure. Using the Node2vec model, we need to construct a network based on the product browsing sequence. Since the browsing sequence has a temporal relationship, the network structure diagram formed is a directed graph. The nodes represent different products, the edges represent the co-occurrence of the pair of products in the same sequence, the direction of the arrows represents the order of browsing, and the edge weights represent the number of times the two products co-occur in all sequences. The network structure diagram construction process is as follows: Figure 3 shown.

[0066] Step 3.2: Use node2vec to vectorize nodes. Based on the network structure diagram, apply the node2vec algorithm to vectorize the nodes. Before doing this, set the model parameters. Set the walk length of the model's random walks, the number of walks for each node to numwalks, the two random walk transition probabilities to q and r, and the dimension of the node vector to dim. Also, use the Skip-Gram model for vector training, setting the training window size (window size) and the number of iterations (iter). Finally, obtain a vector representation of the product.

[0067] Step 3.3: Add product side information such as brand, category, and online ratings. Side information supplements product information and needs to be added to the product vector representation. If the original product vector has a dimension of X, this information is added as new attributes of the product vector using different weights. By comparing the clustering results, these three indicators are ultimately added to the merchant's X+1, X+2, and X+3 dimensions with weights of λ1, λ2, and λ3, respectively. The resulting quotient dimension is X+3, where the first X dimensions represent the original product attributes and the last three dimensions represent the supplementary side information.

[0068] Step 3.4: Match similar products. After completing the vectorization of the products, perform vector measurement on the similarity between the products, and merge and cluster similar products in the constructed space. At this point, the similarity between two nodes is transformed into the similarity between two vectors. In space, the closer the distance, the smaller the difference, and the farther the distance, the greater the difference. Based on the distance measurement standard between vectors, the cosine value between vectors is used as the measurement standard. By measuring the angle between two vectors and the vector length, this method defines the cosine value between two vectors as: Where a and b represent two different product vectors, and Θ represents the angle between the vectors. The above formula describes the spatial distance between two product vectors. The larger the cosine value between the two product vectors, the closer they are in space and the higher their similarity, and vice versa. Each product is assigned a cosine value, each representing the similarity between the remaining products and that product. Finally, the top N products with the highest cosine values ​​for each product are selected as the matching sequence of most similar products. These products are then ranked in ascending order for top-N recommendations.

[0069] Step 4: Perform a weighted combination of the recommendation results based on the ALS algorithm and the Node2vec algorithm to obtain the final hybrid recommendation result. The hybrid recommendation process is as follows: Figure 4 shown.

[0070] Specifically, this hybrid recommendation algorithm is based on the rating prediction of the ALS model and the Top-N recommendation under Node2vec. The purpose of rating prediction is to give possible predicted ratings for products that users may like. In the ALS model training, we first determine the optimal ALS model based on the RMSE and MAE values. During model training, the algorithm will fill the user-rating matrix to make the matrix as non-sparse as possible. In the trained model, products are recommended to users based on the possible ratings of users for unrated products. In Node2vec recommendations, recommendations are mainly made based on the cosine values ​​between the corresponding feature vectors of the products, and the products closest to the target products are recommended to users. The hybrid recommendation algorithm performs weighted prediction recommendations based on the recommendation results of the two, and the formula for prediction recommendation is as follows:

[0071] Result=αAresult+(1-α)Nresult

[0072] Where 0≤α≤1, Aresult is the recommendation based on the ALS score prediction, Nresult is the recommendation based on the distance between items in node2vec, and α is the weight of the ALS-based recommendation result and the Node2vc-based recommendation result in the final recommendation result. The final recommendation results of the two recommendation algorithms are obtained based on the weight of the two recommendation results.

[0073] It should be noted that the above embodiments can be freely combined as needed. The above description is only a preferred embodiment of the present invention. It should be pointed out that those skilled in the art can make several improvements and modifications without departing from the principles of the present invention, and such improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A hybrid recommendation method that integrates collaborative filtering and embedding technology, characterized in that: Including steps: S1: Data preprocessing: first process the data, clean the data and convert the data into the specified format; S2: Use the ALS algorithm to train the latent semantic model and calculate the user-item recommendation matrix based on the user rating table and item dataset; S3: Vectorization of network nodes. Node2vec model in Embedding is used to implement node vectorization. Side information of products is added. After completing the vectorization of products, the cosine value between the corresponding feature vectors of products is calculated. Then, the product closest to the target product is recommended to the user. Step 3.1: Construct the network structure. First, construct a network based on the product browsing sequence. Since browsing sequences have a temporal order, the resulting network structure is a directed graph, where nodes represent different products, edges represent the co-occurrence of pairs of products in the same sequence, the direction of the arrows indicates the order of browsing, and the edge weights represent the number of times the two products co-occur in all sequences. Step 3.2: Use node2vec to implement node vectorization. Based on the network structure diagram, use the node2vec algorithm to vectorize the nodes. Before that, you need to complete the model parameter settings, set the walklength of the model random walk, set the number of walks for each node to num walks, and set the two transition probabilities of the random walk to The dimension dim of the node vector. The Skip-Gram model is used for vector training. The training window size window size and the number of iterations iter are set to obtain the vector representation of the product. Step 3.3: Add product side information. Side information includes product brand, category, and online ratings. Side information supplements product information and is added to the product vector representation. If the original product vector has a dimension of X, the method of adding side information is to use different weights to add it as a new attribute of the product vector. By comparing the clustering effect, these three indicators are finally supplemented with the merchant's X+1th dimension, X+2th dimension, and X+3th dimension with weights of λ1, λ2, and λ3, respectively. The final dimension is X+3. The first X dimensions represent the original attributes of the product, and the last three dimensions represent the supplementary side information of the product. Step 3.4: Match similar products. After completing the vectorization of the products, perform vector measurement on the similarity between the products. In the constructed space, similar products are merged and clustered. At this time, the similarity between two nodes is transformed into the similarity between two vectors. In space, the closer the distance, the smaller the difference, and the farther the distance, the greater the difference. According to the distance measurement standard between vectors, the cosine value between vectors is used as the measurement standard. By measuring the angle between two vectors and the vector length, this method defines the cosine value between two vectors as: , in Represents two different product vectors, represents the angle between vectors, The above formula describes the spatial distance between two product vectors. The larger the cosine value between the two product vectors, the closer they are in space and the higher their similarity, and vice versa. Each product can thus obtain a cosine value, each representing the similarity between it and the remaining products. Finally, the top N products with the highest cosine values ​​for each product are selected as the matching sequence of the most similar products. Top-N recommendations are then made in ascending order. S4: Perform a weighted combination of the recommendation results of the ALS algorithm and the Node2vec algorithm to obtain the final hybrid recommendation result.

2. The hybrid recommendation method integrating collaborative filtering and embedding technology according to claim 1, characterized in that: Step 1.1: The user-clothing rating dataset is randomly divided into a training set and a test set in a ratio of 8:

2. The training set is used to train the ALS model, and the test set is used to calculate the RMSE and MAE values ​​and verify the accuracy of the recommendation algorithm. Step 1.2: Convert the training set to an Rating() type RDD and save it in memory. This will be used when training the ALS model. Extract the product names from the dataset and save all the product names in an Array[] type RDD. This will also be saved in memory and used when node2vec generates the dimensions corresponding to the product names.

3. The hybrid recommendation method integrating collaborative filtering and embedding technology according to claim 1, characterized in that: Step 2.1: Read the user ID uid and product ID pid from the user rating table in the database as the user rating dataset; Step 2.2: Train the latent semantic model using the ALS algorithm. First, define the model parameters: the rank of the latent feature vector, the number of iterations, and the regularization coefficient λ. Rank represents the complexity of the model, which refers to the number of feature values ​​for each user feature and each product feature; iterations is the number of times the model is trained, with a given training upper limit; and λ is a parameter to prevent overfitting. Step 2.3: Load the user rating table from the database and randomly split the data set into a training set and a test set, using 80% of the data as the training set and 20% of the data as the test set; Step 2.4: Use the root mean square error (RMSE) and mean absolute error (MAE) as the evaluation criteria for the model, that is, calculate the error between the predicted rating and the actual rating; Step 2.5: Train the latent semantic model using the ALS algorithm and obtain the predicted score. Pass the parameters trainData, rank, iterations, and λ to the model respectively. Calculate the RMSE and MAE based on the error between the predicted score and the true score. Step 2.6: Adjust the parameter values ​​and select the parameters with the smallest RMSE and MAE as the model optimization choice. The smaller the RMSE and MAE values, the better the performance on the test set. Step 2.7: After training and calculation, the optimal parameters are obtained, and the latent semantic model optimization is completed; Step 2.8: Obtain the user recommendation matrix, calculate the predicted rating based on the latent feature vectors of the user and item, and obtain the user's recommendation list based on the rating; Step 2.9: Calculate the Cartesian product of user ID uid and product ID pid, generate a tuple of (uid, pid), and obtain the empty user-product rating matrix; Step 2.10: Call the predict method in the latent semantic model trained by the ALS algorithm and pass in the empty rating matrix to obtain the predicted rating of the user-item. Step 2.11: Use the filter function to filter out items with a predicted score greater than 0, and then group and aggregate them based on the user ID uid to obtain a score list; Step 2.12: Sort the prediction results in the list by their prediction scores, and return the K products with the largest values ​​as the recommended results for the current user.

4. The hybrid recommendation method integrating collaborative filtering and embedding technology according to claim 1, characterized in that: The recommendation results of the ALS algorithm and the Node2vec algorithm are weighted and predicted. The formula for prediction and recommendation is as follows: , in, Aresult is the recommendation based on ALS score prediction, and Nresult is the recommendation based on the distance between products under node2vec. is the proportion of the recommendation results based on ALS and the recommendation results based on Node2vc in the final recommendation results. According to the weights of the two recommendation results, the final recommendation results of the two recommendation algorithms are obtained.

Citation Information

Patent Citations

  • Customized recommending method based on latent factor model

    CN107330727A

  • Weight-based conditional walk graph recommendation method

    CN111104606A