A product recommendation method, device and medium based on multi-model fusion
Through multi-model fusion technology, combined with content recommendation and collaborative filtering, using user interest vectors and product standardized feature vectors, combined with non-negative matrix decomposition and gradient boosting models, the limitations of existing recommendation systems in adapting to various application scenarios are solved. It improves the accuracy and diversity of recommendations and is suitable for a variety of recommendation scenarios.
Patent Information
- Application Number
- CN202210350985.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-02
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-04-02
AI Technical Summary
Existing recommendation system algorithms have limitations in adapting to a variety of application scenarios. Content-based recommendation algorithms are difficult to guarantee accuracy and relevance. Algorithms based on association rules are computationally intensive and have problems with cold start and sparsity. Popularity-based recommendation algorithms The algorithm cannot provide personalized recommendations and cannot effectively solve the problem of personalized product recommendation for users in the era of information overload.
Using a product recommendation method based on multi-model fusion, through the similarity calculation of user interest vectors and product standardized feature vectors, combined with the non-negative matrix decomposition and gradient boosting model of the user-product matrix, the content recommendation and collaborative filtering technology are integrated to generate the final For product recommendation results, XGBoost is used for two-layer model fusion to improve recommendation accuracy.
It breaks the limitations of a single recommendation algorithm in adapting to scenarios, gives full play to the advantages of each algorithm, solves the problem of sparse matrix of user historical preferences, improves the accuracy and diversity of recommendations, avoids overfitting of a single model, and is suitable for a variety of applications. Recommended scenario.
Smart Images

Figure CN114741592B
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and specifically to a product recommendation method, device and medium based on multi-model fusion. Background Art
[0002] With the development of information technology and big data technology, people have entered the era of information overload from the era of information scarcity. In this era, it is becoming increasingly difficult for people to find information of interest from a large amount of information, and it is becoming increasingly difficult to intuitively display information to users who are interested in it. The task of the recommendation system is to connect users and information, as well as various relationships between users and information, and recommend appropriate information to users.
[0003] The recommendation system mines and analyzes user behavior information to find the user's personalized needs, and then accurately recommends specific item information to the right users, helping users find items that they are interested in but difficult to find. Over the years, various algorithms used in recommendation systems have been developed. A high-quality recommendation system will make users dependent on the system. Therefore, the recommendation system can not only provide personalized services to users, but also establish a long-term and stable cooperative relationship with users, improve user retention rate, and prevent user loss.
[0004] The general recommendation system model process is that the simplest form of user behavior data on the website is logs, which record various user behaviors, such as web browsing, clicks, purchases, comments, ratings, etc. How to make good use of these massive log data to provide users with customized services is a very critical issue.
[0005] The key to test the success of a recommendation system is to ensure high-quality recommendation results. Since the development of recommendation system technology, many recommendation algorithms have been proposed and used in the industry. After a lot of practice, it is difficult to find a solution that can be widely adapted to any application scenario. Each recommendation method has its limitations. For example, the features extracted by the content-based recommendation algorithm must be accurate and have certain practical significance, otherwise it is difficult to ensure the relevance of the recommendation results; the recommendation algorithm based on association rules has a large amount of calculation, and because of the use of user data, there are inevitably cold start and sparsity problems; the recommendation algorithm based on popularity cannot provide personalized recommendations for users. Therefore, in actual application scenarios, regardless of the definition of product attributes, the complexity of product information, and the order of magnitude of user visits, the best solution to solve the limitations of various recommendation methods is the fusion technology of multiple recommendation algorithms. Summary of the invention
[0006] In order to solve the above problems, this application proposes a product recommendation method based on multi-model fusion, including:
[0007] Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively;
[0008] Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained;
[0009] Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data;
[0010] Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model;
[0011] According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting;
[0012] The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
[0013] In one example, according to the product browsing data, all the products are used as training samples, and a product recommendation model is trained by gradient boosting, specifically including:
[0014] For each product, according to whether there is corresponding product browsing data, a corresponding label is generated for the product, and the product with the generated label is used as a training sample to obtain a training sample set;
[0015] If the labels in the training samples are unbalanced, the boundary samples in the training sample set are distinguished based on the oversampling method to generate different numbers of synthetic samples for different boundary samples, so that the number ratio of training samples with different labels in the training sample set is closer to 1:1 compared with before the oversampling method;
[0016] In the training sample, extract the product behavior features of the user, and pre-process the product behavior features to convert the timestamp type features into the year difference from the current statistical date, convert the text type features into one-hot encoding, and discretize and bin the continuous row numerical type features;
[0017] According to the preprocessed product behavior characteristics, the product recommendation model is trained by gradient boosting.
[0018] In one example, predicting the third product recommendation table by the product recommendation model to obtain a final recommendation result for recommending products to the user specifically includes:
[0019] Based on business needs, determine the threshold number of products recommended to users;
[0020] Deduplicating the products included in the third product recommendation table and performing predictions through the product recommendation model, and arranging the selected recommended products that do not exceed the product quantity threshold in order to obtain a final recommendation result, and determining an average recommendation score of the recommended products;
[0021] If the number of recommended products in the final recommendation result is lower than the product quantity threshold, the product recommendation model is used to make predictions among all the products to recommend products that meet the average recommendation score until the number of recommended products reaches the product quantity threshold.
[0022] In one example, before determining, according to the product browsing data of the user, the user interest vector of the user for the first product included in the product browsing data, the method further includes:
[0023] Extract product type relationship table and product management table from the enterprise operation database;
[0024] Processing the modeling table field information in a standard preprocessing manner to perform hot encoding processing on the fields representing the role-product relationship in the product type relationship table;
[0025] For each of the products, add the product types corresponding to the product after hot coding to obtain all application scenarios of the product;
[0026] The behavior records of the user related to each product are screened out from the product management table, and invalid data in the behavior records are removed.
[0027] In one example, determining, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data specifically includes:
[0028] According to the product browsing data of the user, for each first product included in the product browsing data, determining a product attribute vector corresponding to the first product;
[0029] Combining all the product attribute vectors and calculating the average value, a user interest vector of the user for the first product is obtained;
[0030] According to the product information corresponding to all products, the product standardized feature vectors corresponding to all products are obtained, specifically including:
[0031] Screening is performed based on the product information corresponding to all products to obtain product modeling features, wherein the screening method includes at least one of the following: screening based on expert experience, screening based on the differentiation of products based on specified attributes in numerical distribution, and screening based on indicator correlation;
[0032] The product input features are subjected to zero-mean normalization processing to obtain a standardized feature vector.
[0033] In one example, based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained, which specifically includes:
[0034] For each user, determine the user interest vector corresponding to the user, and traverse each of the product standardized feature vectors, calculate the distance between the user interest vector and each of the product standardized feature vectors, and obtain a similarity matrix;
[0035] A recommended product sequence corresponding to each of the users is obtained according to the similarity matrix, and a first product recommendation table for the user is obtained according to the recommended product sequence.
[0036] In one example, determining the number of product browsing times of the user for the first product according to the product browsing data, and extracting the user's user application product data according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data, specifically includes:
[0037] Selecting a designated identifier from the user's identity information as the unique identifier of the user, and generating a first mapping relationship between the user and the first product, and a second mapping relationship between the user and the second product included in the product application data of the user, based on the unique identifier;
[0038] Obtaining a third mapping relationship according to combining the first mapping relationship and the second mapping relationship;
[0039] Determine the number of product browsing times of the user for the first product and the number of product application times of the user for the second product according to the third mapping relationship;
[0040] Counting the number of product browsing times and the number of product application times to determine effective outliers, and performing noise reduction processing on the effective outliers by means of equal frequency binning;
[0041] The product browsing times and product application times after noise reduction are normalized.
[0042] In one example, based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the product browsing times and the product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model, which specifically includes:
[0043] Determine a corresponding scoring relationship according to the normalized product browsing times and product application times, and obtain a user-product matrix according to the scoring relationship, wherein the scores in the user-product matrix are all implicit positive feedbacks, and 0 represents a behavior record that the user has not executed;
[0044] Performing non-negative matrix decomposition according to the user-product matrix, decomposing the input sparse matrix into two dense matrices, the dense matrix including a user-implicit factor matrix and a product-implicit factor matrix; wherein the matrix values of the two dense matrices are the user's preference degree for each factor and the degree to which the product contains each factor, respectively;
[0045] The root mean square error RMSE, the mean absolute error term MAE, and the coordinated pair score FCP of the prediction score are evaluated through three-fold cross validation, and the prediction results are sorted to obtain a second product recommendation table for the user.
[0046] On the other hand, the present application also proposes a product recommendation device based on multi-model fusion, including:
[0047] at least one processor; and,
[0048] a memory communicatively connected to the at least one processor; wherein,
[0049] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform, for example:
[0050] Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively;
[0051] Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained;
[0052] Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data;
[0053] Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model;
[0054] According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting;
[0055] The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
[0056] On the other hand, the present application also proposes a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0057] Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively;
[0058] Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained;
[0059] Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data;
[0060] Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model;
[0061] According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting;
[0062] The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
[0063] The method proposed in this application can bring the following beneficial effects:
[0064] Different from the single type of recommendation algorithm method, the fusion technology of multiple recommendation algorithm models breaks the limitation of a single recommendation algorithm in adapting to the scene. An important principle of the fusion recommendation algorithm is that the combination should be able to avoid or make up for the weaknesses of each recommendation technology and give full play to the advantages of each algorithm. The fusion technology used in this article is a combination of content-based recommendation and collaborative filtering recommendation, which fully combines the content-based recommendation algorithm based on the product's own characteristics to recommend without over-recommendation of hot spots; and the collaborative filtering recommendation algorithm does not require special processing of the project, but establishes the connection between products through users. At the same time, it solves the widespread problem of sparse matrix of user historical preferences, including the possibility that the wrong preferences of a small number of people may have a great impact on the accuracy of recommendations.
[0065] The multi-model fusion algorithm can have a very obvious improvement in effect compared to the single model algorithm. In practical application scenarios, the improved method proposed in this paper can also solve the problems of fixed fusion parameters, inflexible application to various recommendation scenarios, and sparse matrix of user-product behavior record data in common fusion technologies such as linear weighted fusion, cross fusion technology, waterfall fusion, and feature fusion, which cannot produce good recommendation results. In addition, based on the selection of model-based fusion methods, the two-layer prediction model can use common classification algorithms. In the past, the commonly used methods such as random forest, large entropy, GBDT, etc. with good fusion effects, the XGBoost method is proposed as a two-layer model fusion technology. This method is an improvement of GBDT technology. GBDT uses traditional CART as the base classifier, while XGBoost supports linear classifiers, which is equivalent to introducing logistic regression and linear regression with L1 and L2 regularization terms, controlling the complexity of the model. At the same time, the regularization term reduces the variance of the model and prevents the model from overfitting. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0067] Figure 1 A flowchart of a product recommendation method based on multi-model fusion in an embodiment of the present application;
[0068] Figure 2 This is a flow chart of content recommendation based on the content recommendation dimension in an embodiment of the present application;
[0069] Figure 3 A schematic diagram of a process flow based on the collaborative dimension of user behavior in an embodiment of the present application;
[0070] Figure 4 This is a flowchart of a product recommendation method based on multi-model fusion in a scenario in an embodiment of the present application;
[0071] Figure 5 This is a schematic diagram of a product recommendation device based on multi-model fusion in an embodiment of the present application. DETAILED DESCRIPTION
[0072] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0073] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0074] like Figure 1 As shown, the embodiment of the present application provides a product recommendation method based on multi-model fusion, including:
[0075] S101: determining, based on the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtaining, based on product information corresponding to all products, product standardized feature vectors corresponding to all products respectively.
[0076] Content-based recommendation mainly mines the user interests reflected in the user behavior data and recommends products that the user may be interested in. Generally speaking, before determining the user interest vector, data preprocessing is required first.
[0077] Specifically, first extract the product type relationship table and product management table from the enterprise operation database, and then process the modeling table field information in the standard preprocessing method to perform hot encoding on the field representing the role-product relationship (Productcode) in the product type relationship table. At this time, for each product, add the product types corresponding to the product after hot encoding to obtain all the application scenarios of the product. Filter out the user's behavior records related to each product from the product management table, and remove invalid data from the behavior records. For example, remove relevant records of products that have been removed from the platform, irrelevant page browsing records, invalid order application records, etc.
[0078] At this time, if Figure 2 As shown, when determining the user interest vector, first, based on the user's product browsing data, for each first product included in the product browsing data, the product attribute vector corresponding to the first product is determined, which is equivalent to the user's preference vector each time when browsing. All product attribute vectors are combined and the user interest vector for the first product is obtained by averaging.
[0079] When generating a standardized feature vector, first, the product information corresponding to all products is screened to obtain the product modeling features, wherein the screening method includes at least one of the following: screening based on expert experience, screening based on the discrimination of products based on the specified attributes in the numerical distribution, and screening based on the correlation of indicators. Data normalization (normalization) processing is a basic work of data mining. Different evaluation indicators often have different dimensions. In order to eliminate the influence of the differences in dimensions and value ranges between indicators, it is necessary to perform standardization processing, scale the data according to the proportion, and make it fall into a specific area to facilitate comprehensive analysis. After the data preprocessing is completed, the standardization processing can be zero-mean normalization (z-score standardization) to obtain a standardized feature vector. Among them, the standardized feature vector can also be called a product attribute vector or a product vector, which is a structural attribute that can describe each product itself, such as the bank it belongs to, the appropriate group, the interest rate, the amount and term, etc.
[0080] S102: Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained.
[0081] Specifically, for each user, determine the user interest vector corresponding to the user, traverse each product standardized feature vector, calculate the distance between the user interest vector and the product standardized feature vector, and obtain the similarity matrix. Different attributes have different importance to user choices and different impacts on similarity. Weights can be assigned to calculate weighted distances. The cosine distance is used here: the two are regarded as two vectors in space, emphasizing the size of the directional angle, being insensitive to numerical values, and only indicating the difference in direction. According to the similarity matrix, a recommended product sequence corresponding to each user is obtained, sorted from high to low, and the first product recommendation table for the user is obtained based on the recommended product sequence.
[0082] Of course, the behavior records can be preprocessed here. In the product browsing data, the user behavior table user_vist and the product similarity matrix product_normal are merged to form the user's complete browsing information. Then, according to the user grouping, the mean of each user's browsing products is calculated, and the product weight is calculated and improved later according to the time series analysis method. At this time, the similarity between each user and other products product_normal can be calculated through the behavior vector of each user.
[0083] S103: Determine the number of product browsing times of the user for the first product based on the product browsing data, and extract the user's user application product data based on the user's order data to determine the number of product applications of the user for the second product included in the user application product data.
[0084] The recommendation method based on collaborative filtering mainly trains the non-negative matrix factorization (NMF) algorithm based on user behavior data, forms the user's second product recommendation table based on the trained algorithm, and realizes personalized product recommendations based on user behavior data, allowing data to come from users and serve users.
[0085] Specifically, Figure 3 As shown, data cleaning can still be performed first to remove invalid data, and then a specified identifier is selected from the user's identity information (such as a mobile phone number) as the user's unique identifier, and a first mapping relationship between the user and the first product (user-interest-product, user-visit-item) and a second mapping relationship between the user and the second product included in the user's application product data (user-application-product, user-apply-item) are generated based on the unique identifier. Then, the first mapping relationship and the second mapping relationship are combined to obtain a third mapping relationship (user--item-visitcount-apply count).
[0086] According to the third mapping relationship, the number of times the user browses the first product, and the number of times the user applies for the second product are determined. Statistics are taken from the number of product browsing and product application to determine the effective outliers, and the outliers with larger values are classified into the normal value range by equal frequency binning, so as to reduce the noise and make the data smoother. The order of magnitude of the number of product browsing is generally greater than the order of magnitude of the number of product applications. Direct weighting will make the score unreasonable. MaxAbsScaler maximum value normalization is adopted to classify the two columns of data into [0,5]. The cost paid by users for different behaviors of products is different. A higher weight should be given to application behavior and a lower weight should be given to browsing behavior. The specific weight coefficient setting is based on the 3:1 correspondence obtained by analyzing the data. The weighted sum of the two columns of data is the user's score for the product [0,5], which represents the degree of preference.
[0087] S104: Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the product browsing times and the product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model;
[0088] Specifically, according to the normalized product browsing times and product application times, the corresponding rating relationship is determined, and the user-product matrix (user-item rating mapping matrix) is obtained based on the rating relationship. The user-product matrix is different from the traditional movie rating recommendation. Its scores are all implicit positive feedback, and 0 represents the user's unexecuted behavior record, which is exactly the sequence we want to predict and recommend.
[0089] A collaborative filtering algorithm based on matrix decomposition is selected to realize rating prediction. Non-negative matrix decomposition is performed based on the user-product matrix, and the input sparse matrix is decomposed into two dense matrices, including the user-implicit factor matrix Pu and the product-implicit factor matrix qi. The matrix values of the two dense matrices are the user's preference for each factor and the degree to which the product contains each factor, which is similar to the idea of soft classification.
[0090] and These are two ways to calculate the predicted score through the user-implicit factor matrix Pu and the product-implicit factor matrix qi. is the predicted score, μ+b u +b i is the bias term, μ is the constant coefficient, b u is the user bias term, b iis the product bias term. Experimental results show that adding the bias term makes the predicted score closer to the real score, but greatly reduces the diversity of the recommended results in the second product recommendation table. This reflects that the two branches of the recommendation system - the score prediction problem and the second product recommendation table problem - are not positively correlated. We focus on the second product recommendation table problem, so we usually do not add the bias term. However, in other scenarios, we can add the bias term based on actual needs.
[0091] The root mean square error RMSE, mean absolute error MAE, and coordinated pair score FCP of the predicted score are evaluated through three-fold cross validation, and the predicted results are sorted to obtain the second product recommendation table for the user.
[0092] S105: According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting.
[0093] Multi-model fusion algorithms can have significantly improved results compared to single-model algorithms, but how to flexibly and effectively integrate them to give full play to the strengths of each algorithm and meet diverse user needs is the key to greatly improving the quality of recommendation results. Common multi-model fusion methods include linear weighted fusion, cross fusion, waterfall fusion, feature fusion, classifier fusion, etc. Among them, the GBDT (Gradient Boosting Decision Tree) method has the best fusion effect.
[0094] In this paper, based on the coarse-grained recall of two recommendation algorithms, content and collaborative filtering, gradient boosting (for example, XGBoost) is used for precise recall. This method optimizes and improves GBDT, and adds regularization terms to the algorithm, that is, it penalizes too many features, balances accuracy and complexity, converges faster, avoids overfitting, and more intuitively reflects the importance of features, which has shown good results in the field of machine learning.
[0095] Specifically, Figure 4 As shown in the figure, for each product, a corresponding label is generated for the product according to whether there is corresponding product browsing data. For example, if there is browsing and clicking product data, it is recorded as 1, and if there is no browsing product, it is recorded as 0. The products with generated labels are used as training samples to obtain the training sample set.
[0096] In the case of sample imbalance, the accuracy of the model may be inaccurate. In this case, you can consider processing the sample set. Usually, there are many ways to deal with sample imbalance, such as undersampling and oversampling. Since the existing original sample set is relatively small, this application uses the BorderlineSMOTE method to create new samples. The algorithm further distinguishes the boundary samples and generates different numbers of synthetic samples for different boundary samples, thereby improving the category distribution of the samples, making the ratio of browsed and unbrowsed product data records closer to 1:1 than before the adjustment.
[0097] In the training samples, the user's product behavior features are extracted and preprocessed to convert the timestamp features into the year difference from the current statistical date, convert the text features into one-hot encoding, and discretize the continuous row numerical features into bins.
[0098] According to the preprocessed product behavior characteristics, the product recommendation model is trained by gradient boosting. During the model training process, the samples are divided into training set and test set in a ratio of 7:3, and then the CV function is used to train to obtain the optimal parameter set, and the parameter set is adjusted based on the actual product needs to obtain the final product recommendation model.
[0099] S106: The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
[0100] Specifically, based on business needs, a threshold N of the number of products recommended to users is determined. The products included in the third product recommendation table are deduplicated and predicted by the product recommendation model, and the selected recommended products that do not exceed the product quantity threshold are arranged in order to obtain the final recommendation result, and the average recommendation score of the recommended products is determined.
[0101] If the number of recommended products in the final recommendation result is lower than the product quantity threshold N, the product recommendation model is used to predict among all products to recommend products that meet the average recommendation score (reach or exceed the average recommendation score) until the number of recommended products reaches the product quantity threshold.
[0102] Different from the single type of recommendation algorithm method, the fusion technology of multiple recommendation algorithm models breaks the limitation of a single recommendation algorithm in adapting to the scene. An important principle of the fusion recommendation algorithm is that the combination should be able to avoid or make up for the weaknesses of each recommendation technology and give full play to the advantages of each algorithm. The fusion technology used in this article is a combination of content-based recommendation and collaborative filtering recommendation, which fully combines the content-based recommendation algorithm based on the product's own characteristics to recommend without over-recommendation of hot spots; and the collaborative filtering recommendation algorithm does not require special processing of the project, but establishes the connection between products through users. At the same time, it solves the widespread problem of sparse matrix of user historical preferences, including the possibility that the wrong preferences of a small number of people may have a great impact on the accuracy of recommendations.
[0103] The multi-model fusion algorithm can have a very obvious improvement in effect compared to the single model algorithm. In practical application scenarios, the improved method proposed in this paper can also solve the problems of fixed fusion parameters, inflexible application to various recommendation scenarios, and sparse matrix of user-product behavior record data in common fusion technologies such as linear weighted fusion, cross fusion technology, waterfall fusion, and feature fusion, which cannot produce good recommendation results. In addition, based on the selection of model-based fusion methods, the two-layer prediction model can use common classification algorithms. In the past, the commonly used methods such as random forest, large entropy, GBDT, etc. with good fusion effects, the XGBoost method is proposed as a two-layer model fusion technology. This method is an improvement of GBDT technology. GBDT uses traditional CART as the base classifier, while XGBoost supports linear classifiers, which is equivalent to introducing logistic regression and linear regression with L1 and L2 regularization terms, controlling the complexity of the model. At the same time, the regularization term reduces the variance of the model and prevents the model from overfitting.
[0104] In one embodiment, Figure 5 As shown, the present application also proposes a product recommendation device based on multi-model fusion, including:
[0105] at least one processor; and,
[0106] a memory communicatively connected to the at least one processor; wherein,
[0107] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform, for example:
[0108] Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively;
[0109] Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained;
[0110] Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data;
[0111] Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model;
[0112] According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting;
[0113] The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
[0114] In one embodiment, the present application further proposes a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0115] Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively;
[0116] Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained;
[0117] Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data;
[0118] Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model;
[0119] According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting;
[0120] The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
[0121] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0122] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0123] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0124] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0125] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0126] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0127] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0128] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0129] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0130] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0131] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A product recommendation method based on multi-model fusion, characterized in that: include: Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively; Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained; Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data; Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model; According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting; The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
2. The method according to claim 1, characterized in that According to the product browsing data, all the products are used as training samples, and a product recommendation model is trained by gradient boosting, specifically including: For each product, according to whether there is corresponding product browsing data, a corresponding label is generated for the product, and the product with the generated label is used as a training sample to obtain a training sample set; If the labels in the training samples are unbalanced, the boundary samples in the training sample set are distinguished based on the oversampling method to generate different numbers of synthetic samples for different boundary samples, so that the number ratio of training samples with different labels in the training sample set is closer to 1:1 compared with before the oversampling method; In the training sample, extract the product behavior features of the user, and pre-process the product behavior features to convert the timestamp type features into the year difference from the current statistical date, convert the text type features into one-hot encoding, and discretize and bin the continuous row numerical type features; According to the preprocessed product behavior characteristics, the product recommendation model is trained by gradient boosting.
3. The method according to claim 2, characterized in that Predicting the third product recommendation table by the product recommendation model to obtain a final recommendation result for recommending products to the user specifically includes: Based on business needs, determine the threshold number of products recommended to users; Deduplicating the products included in the third product recommendation table and performing predictions through the product recommendation model, and arranging the selected recommended products that do not exceed the product quantity threshold in order to obtain a final recommendation result, and determining an average recommendation score of the recommended products; If the number of recommended products in the final recommendation result is lower than the product quantity threshold, the product recommendation model is used to make predictions among all the products to recommend products that meet the average recommendation score until the number of recommended products reaches the product quantity threshold.
4. The method according to claim 1, characterized in that Before determining, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, the method further includes: Extract product type relationship table and product management table from the enterprise operation database; Processing the modeling table field information in a standard preprocessing manner to perform hot encoding processing on the fields representing the role-product relationship in the product type relationship table; For each of the products, add the product types corresponding to the product after hot coding to obtain all application scenarios of the product; The behavior records of the user related to each product are screened out from the product management table, and invalid data in the behavior records are removed.
5. The method according to claim 4, characterized in that Determining, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data specifically includes: According to the product browsing data of the user, for each first product included in the product browsing data, determining a product attribute vector corresponding to the first product; Combining all the product attribute vectors and calculating the average value, a user interest vector of the user for the first product is obtained; According to the product information corresponding to all products, the product standardized feature vectors corresponding to all products are obtained, specifically including: Screening is performed based on the product information corresponding to all products to obtain product modeling features, wherein the screening method includes at least one of the following: screening based on expert experience, screening based on the differentiation of products based on specified attributes in numerical distribution, and screening based on indicator correlation; The product input features are subjected to zero-mean normalization processing to obtain a standardized feature vector.
6. The method according to claim 5, characterized in that Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained, which specifically includes: For each user, determine the user interest vector corresponding to the user, and traverse each of the product standardized feature vectors, calculate the distance between the user interest vector and each of the product standardized feature vectors, and obtain a similarity matrix; A recommended product sequence corresponding to each of the users is obtained according to the similarity matrix, and a first product recommendation table for the user is obtained according to the recommended product sequence.
7. The method according to claim 4, characterized in that Determining the number of product browsing times of the user for the first product according to the product browsing data, and extracting the user application product data of the user according to the user's order data to determine the number of product application times of the user for the second product included in the user application product data, specifically includes: Selecting a designated identifier from the user's identity information as the unique identifier of the user, and generating a first mapping relationship between the user and the first product, and a second mapping relationship between the user and the second product included in the product application data of the user, based on the unique identifier; Obtaining a third mapping relationship according to combining the first mapping relationship and the second mapping relationship; Determine the number of product browsing times of the user for the first product and the number of product application times of the user for the second product according to the third mapping relationship; Counting the number of product browsing times and the number of product application times to determine effective outliers, and performing noise reduction processing on the effective outliers by means of equal frequency binning; The product browsing times and product application times after noise reduction are normalized.
8. The method according to claim 7, characterized in that Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the product browsing times and the product application times, and non-negative matrix decomposition training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model, which specifically includes: Determine a corresponding scoring relationship according to the normalized product browsing times and product application times, and obtain a user-product matrix according to the scoring relationship, wherein the scores in the user-product matrix are all implicit positive feedbacks, and 0 represents a behavior record that the user has not executed; Performing non-negative matrix decomposition according to the user-product matrix, decomposing the input sparse matrix into two dense matrices, the dense matrix including a user-implicit factor matrix and a product-implicit factor matrix; wherein the matrix values of the two dense matrices are the user's preference degree for each factor and the degree to which the product contains each factor, respectively; The root mean square error RMSE, the mean absolute error term MAE, and the coordinated pair score FCP of the prediction score are evaluated through three-fold cross validation, and the prediction results are sorted to obtain a second product recommendation table for the user.
9. A product recommendation device based on multi-model fusion, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform, for example: Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively; Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained; Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data; Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model; According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting; The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Determine, according to the product browsing data of the user, a user interest vector of the user for a first product included in the product browsing data, and obtain, according to the product information corresponding to all the products, product standardized feature vectors corresponding to all the products respectively; Based on the content recommendation dimension, according to the similarity between the user interest vector and the product standardized feature vector, a first product recommendation table for the user is obtained; Determine the number of product browsing times of the user for the first product according to the product browsing data, and extract the user application product data of the user according to the user's order data to determine the number of product applications of the user for the second product included in the user application product data; Based on the collaborative dimension of user behavior, a user-product matrix is obtained according to the number of product browsing times and the number of product application times, and non-negative matrix factorization training is performed according to the user-product matrix to obtain an NMF model, and a second product recommendation table for the user is obtained according to the NMF model; According to the product browsing data, using all the products as training samples, a product recommendation model is trained by gradient boosting; The first product recommendation table and the second product recommendation table are merged to obtain a third product recommendation table, and the third product recommendation table is predicted by the product recommendation model to obtain a final recommendation result for recommending products to the user.
