A commodity recommendation algorithm and system for online shopping malls
By calculating the similarity and credibility between users, and combining the denoised user social information and the product correlation relationship of user activity, the matrix decomposition process is optimized, the data sparsity and cold start problems are solved, and the online mall product recommendation is improved. accuracy and reliability.
Patent Information
- Application Number
- CN202410873963.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-02
AI Technical Summary
Existing recommendation algorithms face data sparsity and cold-start problems, leading to estimation errors in latent factors of user-item rating matrices and inaccuracies in recommendation results.
By obtaining user information, product information and user social information, calculate the similarity and credibility between users, combine the denoised user social information and user activity product correlation, optimize the matrix decomposition process to improve the accuracy of the recommendation results .
The accuracy and credibility of the recommendation results are improved, making the predicted scores closer to the real scores, and providing a product list that meets the user's personalized needs.
Smart Images

Figure CN118411232B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a commodity recommendation algorithm and system for an online shopping mall. Background Art
[0002] With the rapid development of new technologies such as the Internet and big data, people's lives have become more convenient, but it has also led to an explosive growth of network data. In order to quickly help users find content of interest, more and more researchers are committed to the research of recommendation algorithms to improve the quality of recommendations and recommend content that is more in line with their preferences to users. However, the current recommendation algorithms still have problems such as data sparsity and cold start. Among them, the data sparsity problem is that the user-item rating matrix is usually very sparse, which will cause errors in the estimation of potential factors in matrix decomposition, affecting the predicted ratings and recommendation results; the cold start problem is that when new users or new items are added to the system, the model is difficult to determine the items required by the user due to the lack of historical rating data, thereby affecting the accuracy and credibility of the recommendation results. Based on this, the present invention proposes a product recommendation algorithm and system for online shopping malls. Summary of the invention
[0003] The present invention provides a commodity recommendation algorithm and system for an online shopping mall, which improves the accuracy and credibility of recommendation results.
[0004] According to one aspect of the present disclosure, a product recommendation algorithm for an online shopping mall is provided, the algorithm comprising:
[0005] Get a data set containing user information, product information, product rating information, and user social information;
[0006] Calculate the similarity between users and the credibility between users based on the data set;
[0007] For each user u, the similarity between trusted users is calculated based on the similarity between users and the credibility between users. ;
[0008] The common friends of user u and user v are set comm. The interaction frequency of friend k is determined based on the number of interactions between user u and friend k in set comm, and the number of interactions between user v and friend k in set comm. The average interaction frequency is calculated based on the interaction frequencies of all friends in set comm.
[0009] The quotient is obtained by dividing the number of friends in the common friend set comm of user u and user v by the sum of the number of friends in the friend set of user u and the number of friends in the friend set of user v;
[0010] The user's denoised social information similarity is obtained by multiplying the quotient by the average interaction frequency. ;
[0011] Calculate the user similarity of the integrated user social information according to the data set ;
[0012] Calculate product similarity based on the data set ;
[0013] According to the objective function L shown in formula (1), the user potential feature vector matrix is determined and the product potential feature vector matrix :
[0014] (1)
[0015] Among them, the user potential feature vector matrix U is a matrix with d rows and m columns, the product potential feature vector matrix V is a matrix with d rows and n columns, U and V are unknown quantities, R is the user rating matrix, and R is a known quantity;
[0016] i represents the user, j represents the product, represents the rating of user i on product j; is an indicator function, which is 1 if user i has rated product j, and 0 if user i has not rated product j;
[0017] represents the user similarity between user i and user f that integrates user social information, Represents product j and product Similarity of products;
[0018] The second term in the objective function represents the regularization term of the user social information after noise removal, and the correction parameter , correction parameters , the third term in the objective function represents the regularization term of product association that incorporates user activity, and the fourth and fifth terms are regularization terms. and are greater than 0, for norm;
[0019] The user-item prediction score matrix is obtained by multiplying the transposed matrix of the user's latent feature vector matrix and the item's latent feature vector matrix;
[0020] Determine the recommended products with scores greater than a score threshold according to the user-product prediction score matrix, and recommend the products to the user.
[0021] In a possible implementation, the calculation of user similarity integrating user social information , including: calculating the user similarity of integrated user social information according to formula (2) :
[0022] (2)
[0023] in, is the adjustment coefficient, which is used to adjust the weight of the similarity between trusted users and the similarity of users’ denoised social information. .
[0024] In a possible implementation, the product similarity is calculated using formula (3):
[0025] (3)
[0026] Among them, f(u) is the first weight, and the user set H that has rated both product c and product j is is the average value of all user scores in set H, is the rating of product c by user u, is the rating of product j by user u.
[0027] In a possible implementation, the calculating the similarity between users and the credibility between users according to the data set includes:
[0028] The similarity between users is calculated by formula (4):
[0029] (4)
[0030] in, and Represent the average ratings of user u and user v respectively, represents the rating of user u on product j, represents the rating of user v on product j, The set of products rated by user u, The set of products rated by user v;
[0031] Represents the relevant weight of the user, through and The number of items in the intersection of and The quantity of commodities in the set is combined to obtain the relevant weight.
[0032] In a possible implementation, the calculating the similarity between users and the credibility between users according to the data set further includes:
[0033] The credibility between users is calculated by formula (5):
[0034] (5)
[0035] in, represents the credibility of user v to user u, represents the maximum value of the user u's score, represents the trust distance, that is, the number of indirectly related users between user u and user v, represents the maximum trust distance between users, is a correction factor between 0 and 1;
[0036] Similarity between users and credibility between users Calculate the similarity between credible users.
[0037] According to another aspect of the present invention, there is provided a product recommendation system for an online shopping mall, the system applying the recommendation algorithm, the system comprising:
[0038] User module, used for registration, login or management of ordinary users or administrator users;
[0039] User social module, used to add or delete friends of users;
[0040] The product order module is used by ordinary users to search for products, view product details, collect products or evaluate products, and by administrators to list products, remove products or manage orders;
[0041] The data collection and processing module is used to collect and process the user's operation information, historical rating information and social information on the product to obtain the predicted rating results;
[0042] The personalized recommendation module is used to recommend products with high predicted scores to users based on the predicted score results.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] The product recommendation algorithm and system for online shopping malls of the disclosed embodiment use the denoised user social information and the product association relationship with user activity as regular terms to limit the learning of the user potential feature matrix and the item potential feature matrix during matrix decomposition. This makes the predicted rating value closer to the rating value in the real rating matrix. This obtains a list of products to be recommended that meets the personalized needs of the user, and recommends more accurate products to the user. This improves the accuracy and credibility of the recommendation results. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A flowchart of a product recommendation algorithm for an online shopping mall according to an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0046] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0047] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0048] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0049] Figure 1 FIG. 1 is a flowchart of a product recommendation algorithm for an online shopping mall according to an embodiment of the present disclosure. Figure 1 As shown, a product recommendation algorithm for an online shopping mall is provided, and the algorithm includes:
[0050] S01, obtaining a data set including user information, product information, product rating information and user social information;
[0051] S02, calculating the similarity between users and the credibility between users according to the data set;
[0052] S03, for each user u, calculate the similarity between trusted users based on the similarity between users and the credibility between users ;
[0053] The common friends of user u and user v are set comm. The interaction frequency of friend k is determined based on the number of interactions between user u and friend k in set comm, and the number of interactions between user v and friend k in set comm. The average interaction frequency is calculated based on the interaction frequencies of all friends in set comm.
[0054] The quotient is obtained by dividing the number of friends in the common friend set comm of user u and user v by the sum of the number of friends in the friend set of user u and the number of friends in the friend set of user v;
[0055] S04, obtaining the user's denoised social information similarity according to the product of the quotient and the average interaction frequency ;
[0056] Recommendation algorithms that integrate social information generally believe that only people with the same interests and preferences can become friends, so they will recommend content that the user's social friends like to the user. However, in real life, users not only have social connections with people who share common interests with them, but also with colleagues and relatives who do not share common interests. Some users like to add friends at random, and the user does not have common interests and preferences with these friends. Therefore, there may be useless social relationships in the user's social information. These useless social relationships will cause the recommendation algorithm to misjudge the user's interests and preferences, resulting in low quality of the final recommendation. Therefore, it is necessary to eliminate the noise in the user's social information. Users will often interact with their friends who have common interests, such as chatting, liking, commenting, etc., and will not interact with friends who do not have common interests. Therefore, considering the interaction frequency between the user's social friends when calculating the similarity of the user's social information can effectively eliminate the noise in the user's social information, thereby improving the quality of the recommendation.
[0057] S05: Calculate the user similarity of the integrated user social information according to the data set. ;
[0058] Calculate product similarity based on the data set ;
[0059] S06: Determine the user potential feature vector matrix according to the objective function L shown in formula (1): and the product potential feature vector matrix :
[0060] (1)
[0061] Among them, the user potential feature vector matrix U is a matrix with d rows and m columns, the product potential feature vector matrix V is a matrix with d rows and n columns, U and V are unknown quantities, R is the user rating matrix, and R is a known quantity;
[0062] i represents the user, j represents the product, represents the rating of user i on product j; is an indicator function, which is 1 if user i has rated product j, and 0 if user i has not rated product j;
[0063] represents the user similarity between user i and user f that integrates user social information, Represents product j and product Similarity of products;
[0064] The second term in the objective function represents the regularization term of the user social information after noise removal, and the correction parameter , correction parameters , the third term in the objective function represents the regularization term of product association that incorporates user activity, and the fourth and fifth terms are regularization terms. and are greater than 0, for norm;
[0065] For example, the objective function L has a function on the variable Find the partial derivative, the objective function L with respect to the variable Find partial derivatives and update variables according to the gradient descent method and variables , the update step length is , until the objective function L tends to a minimum value, the user's potential feature vector matrix is obtained and the product potential feature vector matrix .
[0066] S07, multiplying the transposed matrix of the user potential feature vector matrix and the product potential feature vector matrix to obtain a user-product prediction score matrix;
[0067] S08, determining the recommended products with scores greater than a score threshold according to the user-product prediction score matrix, and recommending the products to the user.
[0068] The decomposed user's latent feature matrix can reflect the preference similarity of the user's social friends. The objective function optimizes the matrix decomposition model by using the similarity of the user's social information after denoising. The regularization of the user's social information after denoising constrains the objective function, and it can be obtained that the target user's latent feature vector should be consistent with the latent feature vector of the social friend after denoising. The project association regularization term with user activity constrains the latent feature matrix of the project decomposed by the matrix decomposition model, and mines more latent feature vectors of the project. The user-project rating matrix, denoised user social information, and the user activity are added to the matrix decomposition model to restrict the learning of the model, so that the predicted rating value is closer to the rating value in the real rating matrix. The stochastic gradient descent method is used to optimize the objective function so that the function continues to converge, thereby obtaining the optimal parameter value.
[0069] In a possible implementation, the calculation of user similarity integrating user social information , including: calculating the user similarity of integrated user social information according to formula (2) :
[0070] (2)
[0071] in, is the adjustment coefficient, which is used to adjust the weight of the similarity between trusted users and the similarity of users’ denoised social information. .
[0072] In a possible implementation, the product similarity is calculated using formula (3):
[0073] (3)
[0074] Among them, f(u) is the first weight, and the user set H that has rated both product c and product j is is the average value of all user scores in set H, is the rating of product c by user u, is the rating of product j by user u.
[0075] In a possible implementation, the calculating the similarity between users and the credibility between users according to the data set includes:
[0076] The similarity between users is calculated by formula (4):
[0077] (4)
[0078] in, and Represent the average ratings of user u and user v respectively, represents the rating of user u on product j, represents the rating of user v on product j, The set of products rated by user u, The set of products rated by user v;
[0079] Represents the relevant weight of the user, through and The number of items in the intersection of and The quantity of commodities in the set is combined to obtain the relevant weight.
[0080] In order for the recommendation system to calculate the similarity between users, in addition to considering user interest information, additional information can also be used, such as user social information. User social information also hides user preferences. Two users with the same interests and hobbies will become friends, and they will influence each other's preferences.
[0081] The relevant weights can evaluate the similarity between users, but in order to find reliable users with similar interests, credibility needs to be introduced. If the credibility between two users reaches a certain threshold, it means that the two users have the same interests and preferences. The higher the credibility, the more similar the interests and preferences between the two users.
[0082] In a possible implementation, the calculating the similarity between users and the credibility between users according to the data set further includes:
[0083] The credibility between users is calculated by formula (5):
[0084] (5)
[0085] in, represents the credibility of user v to user u, represents the maximum value of the user u's score, represents the trust distance, that is, the number of indirectly related users between user u and user v, represents the maximum trust distance between users, is a correction factor between 0 and 1;
[0086] Similarity between users and credibility between users Calculate the similarity between credible users.
[0087] According to another aspect of the present invention, there is provided a product recommendation system for an online shopping mall, the system applying the recommendation algorithm, the system comprising:
[0088] User module, used for registration, login or management of ordinary users or administrator users;
[0089] User social module, used to add or delete friends of users;
[0090] The product order module is used by ordinary users to search for products, view product details, collect products or evaluate products, and by administrators to list products, remove products or manage orders;
[0091] The data collection and processing module is used to collect and process the user's operation information, historical rating information and social information on the product to obtain the predicted rating results;
[0092] The personalized recommendation module is used to recommend products with high predicted scores to users based on the predicted score results.
[0093] For example, after an ordinary user successfully logs in, the system will obtain the user's ID, and then the system will process the user's historical behavior data in the mall according to the recommendation algorithm, analyze the user's preferences, predict the ratings of products that the user has not browsed, and then recommend to the user the top N products that best meet his or her personalized needs based on the ratings, and display the products that the user may like in the mall's "Guess You Like Module".
[0094] When the ordinary user wants to buy fresh food and browses and looks at grapes in the mall, the system will think that the user may like grapes during this period, so the "Guess you like" module of the user will recommend grapes to the user. The personalized mall recommendation system designed in this paper also takes into account the user's social information. Users can add or delete friends, and the user's social information will also affect the user's recommendation. Therefore, the system will also recommend products that the user's friends may like to the user.
[0095] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0096] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A product recommendation algorithm for an online shopping mall, characterized in that: The algorithm includes: Get a data set containing user information, product information, product rating information, and user social information; Calculate the similarity between users and the credibility between users based on the data set; For each user u, the similarity between trusted users is calculated based on the similarity between users and the credibility between users. ; The common friends of user u and user v are set comm. The interaction frequency of friend k is determined based on the number of interactions between user u and friend k in set comm, and the number of interactions between user v and friend k in set comm. The average interaction frequency is calculated based on the interaction frequencies of all friends in set comm. The quotient is obtained by dividing the number of friends in the common friend set comm of user u and user v by the sum of the number of friends in the friend set of user u and the number of friends in the friend set of user v; The user's denoised social information similarity is obtained by multiplying the quotient by the average interaction frequency. ; Calculate the user similarity of the integrated user social information according to the data set ; Calculate product similarity based on the data set ; According to the objective function L shown in formula (1), the user potential feature vector matrix U and the product potential feature vector matrix V are determined: (1) Among them, the user potential feature vector matrix U is a matrix with d rows and m columns, the product potential feature vector matrix V is a matrix with d rows and n columns, U and V are unknown quantities, R is the user rating matrix, and R is a known quantity; i represents the user, j represents the product, represents the rating of user i on product j; is an indicator function, which is 1 if user i has rated product j, and 0 if user i has not rated product j; represents the user similarity between user i and user f that integrates user social information, Represents product j and product Similarity of products; The second term in the objective function represents the regularization term of the user social information after noise removal, and the correction parameter , correction parameters , the third term in the objective function represents the regularization term of product association that incorporates user activity, and the fourth and fifth terms are regularization terms. and are greater than 0, is the F norm; The user-item prediction rating matrix is obtained by multiplying the transposed matrix of the user's latent feature vector matrix and the item's latent feature vector matrix; Determine the recommended products with scores greater than a score threshold according to the user-product prediction score matrix, and recommend the products to the user; The calculation integrates the user similarity of user social information , including: calculating the user similarity of integrated user social information according to formula (2) : (2) in, is the adjustment coefficient, which is used to adjust the weight of the similarity between trusted users and the similarity of users’ denoised social information. .
2. A product recommendation algorithm for an online shopping mall according to claim 1, characterized in that: The product similarity is calculated by formula (3): (3) Among them, f(u) is the first weight, and the user set H that has rated both product c and product j is is the average value of all user scores in set H, is the rating of product c by user u, is the rating of product j by user u.
3. The product recommendation algorithm for an online shopping mall according to claim 1, characterized in that: The calculating the similarity between users and the credibility between users according to the data set includes: The similarity between users is calculated by formula (4): (4) in, and Represent the average ratings of user u and user v respectively, represents the rating of user u on product j, represents the rating of user v on product j, The set of products rated by user u, The set of products rated by user v; Represents the relevant weight of the user, through and The number of items in the intersection of and The quantity of commodities in the set is combined to obtain the relevant weight.
4. The product recommendation algorithm for an online shopping mall according to claim 3, characterized in that: The calculating the similarity between users and the credibility between users according to the data set also includes: The credibility between users is calculated by formula (5): (5) in, represents the credibility of user v to user u, represents the maximum value of the user u's score, represents the trust distance, that is, the number of indirectly related users between user u and user v, represents the maximum trust distance between users, is a correction factor between 0 and 1; Similarity between users and credibility between users Calculate the similarity between credible users.
5. A product recommendation system for an online shopping mall, characterized in that: The system applies the algorithm according to any one of claims 1 to 4, and the system comprises: User module, used for registration, login or management of ordinary users or administrator users; User social module, used to add or delete friends of users; The product order module is used by ordinary users to search for products, view product details, collect products or evaluate products, and by administrators to list products, remove products or manage orders; The data collection and processing module is used to collect and process the user's operation information, historical rating information and social information on the product to obtain the predicted rating results; The personalized recommendation module is used to recommend products with high predicted scores to users based on the predicted score results.
