A product recommendation method, device, equipment and storage medium

By identifying the data type and selecting the similarity algorithm and standardizing it, combined with the purchase quantity weight, the homogeneity and sparseness problems in the traditional collaborative filtering algorithm are solved, the accuracy and efficiency of product recommendations are improved, and the recommendation is similar to users is achieved. A product that people like.

CN114581200BActive Publication Date: 2024-12-13华润数字科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210253927.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2024-12-13
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

When calculating the similarity of non-Bolean vectors, the similarity of users with different purchase volume ratios are considered the same due to homogeneity, and the sparseness and redundancy increase when the data volume increases, resulting in the recommended effect. Poor, especially when new users or new products are added, time and data accumulation is required.

Method used

By identifying the data type of interaction information between users and products, selecting the corresponding similarity algorithm for calculation, and standardizing the results, introducing mean and confidence intervals to reduce the impact of randomness, combining the purchase weight, the recommendation factor is calculated to improve the Recommended accuracy.

Benefits of technology

It improves the accuracy and efficiency of product recommendations, reduces the impact of randomness, and combines the recommendation degree calculation methods of UserCF and ItemCF to enhance the exploration of the algorithm and can recommend products that people who are similar to users like.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114581200B_ABST
    Figure CN114581200B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention belong to the field of artificial intelligence, and in particular, to a method, device, equipment and storage medium for recommending goods, the method comprising: identifying the data type of the interactive information between users and goods, selecting a corresponding goods similarity algorithm according to the data type to calculate the goods similarity, and standardizing the calculated goods similarity results, wherein the data type includes Boolean vectors and non-Boolean vectors; selecting a corresponding user similarity algorithm according to the data type to calculate the user similarity, and standardizing the user similarity; and calculating and sorting the recommendation factors between each user and the goods according to the goods similarity and the user similarity, and adding the most relevant N goods to the corresponding user recommendation list according to the recommendation factors, wherein N is the capacity of the recommendation list. The present invention improves the accuracy of recommending goods to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a product recommendation method, device, equipment and storage medium. Background Art

[0002] In recent years, with the rapid development of Internet technology, various types of data on the Internet have been expanding day by day, and personalized services for users have gradually become important. For this reason, various recommendation algorithms have emerged. Collaborative filtering algorithm is the most commonly used, most influential and most widely used algorithm in recommendation system. It filters information and recommends products to users by calculating the similarity between users or products. It can realize personalized recommendations, and does not need to analyze the characteristics of the products themselves at runtime, but relies on the interactive relationship between products and users. Collaborative filtering algorithms are divided into user-based UserCF and product-based ItemCF. UserCF recommends by finding users with similar interests to the target user, which can help users recommend products that have not been browsed. ItemCF recommends by measuring the similarity between products, which is more stable than UserCF. Both methods have their own advantages and disadvantages, and have different complexities and performances depending on the scale of users and products in the data.

[0003] However, the inventors found that traditional collaborative filtering algorithms usually simply use Euclidean distance, cosine similarity, and Pearson correlation when calculating the similarity of non-Boolean vectors. However, these methods will treat the similarity of users with the same purchase ratio but different quantities as the same due to homogeneity; while the Jaccard similarity measurement method is more commonly used in calculating Boolean vectors. When the amount of data increases, the sparsity of traditional collaborative filtering methods becomes more prominent, the redundancy of the system continues to increase, and invalid calculations increase; especially when new users or new products are added, the recommendation effect is poor, and it takes time and data accumulation. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to propose a product recommendation method, device, equipment and storage medium, which overcomes the similarity measurement problem caused by homogeneity and randomness in the prior art and improves the accuracy of product recommendations to users.

[0005] In order to solve the above technical problems, an embodiment of the present invention provides a product recommendation method, including: identifying the data type of interaction information between users and products, selecting a corresponding product similarity algorithm according to the data type to calculate product similarity, and standardizing the calculated product similarity results, wherein the data type includes a Boolean vector and a non-Boolean vector; selecting a corresponding user similarity algorithm according to the data type to calculate user similarity, and standardizing the calculated user similarity results; and calculating and sorting the recommendation factors between each user and the product according to the standardized product similarity and user similarity, and adding the most relevant N products to the corresponding user recommendation list according to the recommendation factors, wherein N is the capacity of the recommendation list.

[0006] Furthermore, when the data type of the interaction information between the user and the product is a Boolean variable, the product similarity between product i and product j is calculated using the following formula:

[0007]

[0008] Among them, s1 I,j is the similarity between product i and product j, A means that user k purchased both product i and product j, B means that user k purchased product i or product j, C means that user k did not purchase product i or product j, n is the total number of users, x1, x2, x3 are adjustable weight coefficients, Where S represents any A, B, C;

[0009] When all people buy goods randomly, calculate the similarity s1 between goods i and j i,j The theoretical mean of the random variable; Calculate the product similarity s1 according to the Monte Carlo simulation method i,j The approximate confidence interval [l1, u1] of i,j The values ​​of are set to the theoretical mean, and the s1 set to the theoretical mean i,j Perform Z-score standardization.

[0010] Furthermore, when the data type of the interaction information between the user and the product is not a Boolean variable, the following formula is used to calculate the similarity between product i and product j:

[0011]

[0012] Among them, s1 i,j is the similarity between product i and product j, n is the total number of users, b k,i The number of times user k purchased product i;

[0013] Calculate the similarity s1 of all products i,j The results were Z-score standardized.

[0014] Furthermore, when the data type of the interaction information between users and commodities is a Boolean variable, the user similarity between user i and user j is calculated using the following formula:

[0015]

[0016] Among them, s2 i,j is the user similarity between user i and user j, D means that product k is purchased by both user i and user j, E means that product K is purchased by user i or user j, F means that product k is not purchased by user i or user j, m is the total number of products, x4, x5, x6 are weight coefficients, Where S represents any D, E, F;

[0017] When everyone buys goods randomly, calculate the user similarity s2 between user i and user j i,j The theoretical mean of the random variable; Calculate the user similarity s2 according to the Monte Carlo simulation method i,j The approximate confidence interval [l2, u2] of i,j The values ​​of are set to the theoretical mean, and the values ​​of s2 set to the theoretical mean i,j Perform Z-score standardization.

[0018] Furthermore, when the data type of the interaction information between the user and the product is not a Boolean variable, the user similarity between user i and user j is calculated using the following formula:

[0019]

[0020] Among them, s2 i,j is the user similarity between user i and user j, m is the total number of products, b i,k The number of times user i purchased product k;

[0021] Similarity s2 for all users i,j Perform Z-score standardization.

[0022] Furthermore, the Z-score standardization is calculated as follows:

[0023]

[0024] Among them, Si,j is the product similarity s1 between product i and product j I,j Or the user similarity s2 between user i and user j i,j, μ is the similarity of all products s1 i,j Or user similarity s2 i,j The actual mean of , σ is the similarity of all products s1 i,j Or user similarity s2 i,j The difference between the resulting mean and the theoretical mean.

[0025] Furthermore, the recommendation factor is calculated according to the following formula:

[0026]

[0027] Among them, s1 k,j represents the similarity between product k and product j, s2 i,k ′ represents the user similarity between user i and user k′, s2 t,i represents the user similarity between user t and user i, s1 l,j The similarity between product l and product j, n is the total number of users, m is the total number of products; B i is the set of product numbers purchased by user i, F i is a set of product IDs collected by user i, C i is the set of product numbers added to the shopping cart by user i, B′ j is the set of user IDs that purchased product j, F′ j is the set of IDs of users who have collected product j, C′ j The set f1, f2, ..., f7 consisting of the IDs of users who added product j to the shopping cart is a weight parameter.

[0028] In order to solve the above technical problems, an embodiment of the present invention also provides a product recommendation device, including: a product similarity processing module, used to identify the data type of interaction information between users and products, select a corresponding product similarity algorithm according to the data type to calculate product similarity, and standardize the calculated product similarity results, wherein the data type includes Boolean vectors and non-Boolean vectors; a user similarity processing module, used to select a corresponding user similarity algorithm according to the data type to calculate user similarity, and standardize the calculated user similarity results; and a product recommendation processing module, used to calculate and sort the recommendation factor between each user and the product based on the standardized product similarity and user similarity, and add the most relevant N products to the corresponding user recommendation list according to the recommendation factor, wherein N is the capacity of the recommendation list.

[0029] In order to solve the above technical problems, an embodiment of the present invention also provides a product recommendation calculation device, which includes a processor, a memory, and a product recommendation calculation program stored in the memory. When the product recommendation calculation program is executed by the processor, the steps of the product recommendation calculation method as described above are implemented.

[0030] In order to solve the above technical problems, an embodiment of the present invention further provides a computer-readable storage medium, on which a product recommendation calculation program is stored. When the product recommendation calculation program is executed by a processor, the steps of the product recommendation calculation method as described above are implemented.

[0031] Compared with the prior art, the embodiments of the present invention mainly have the following beneficial effects: the present application selects the corresponding similarity algorithm to calculate the product similarity and user similarity by identifying whether the data type of the interaction information between the user and the product is a Boolean vector or a non-Boolean vector, and standardizes the calculated product similarity and user similarity results, thereby reducing the influence of randomness; and based on the standardized product similarity and user similarity, calculates and sorts the recommendation factor between each user and the product to form a user recommendation list, thereby improving the accuracy of recommending products to users.

[0032] Furthermore, when the data type of the interactive information between users and commodities is a Boolean variable, the mean and confidence interval of the commodity similarity and user similarity are introduced and standardized, thereby reducing the influence of randomness; when the data type of the interactive information between users and commodities is a non-Boolean variable, the coefficient of the purchase amount weight is introduced when calculating the commodity similarity and user similarity, thereby improving the problem of inaccurate recommendation caused by the traditional methods such as Euclidean distance, cosine similarity, and Pearson correlation in the prior art when dealing with non-Boolean vectors, which regards the similarity of user pairs with the same purchase amount ratio but different quantities as the same due to homogeneity; in addition, the recommendation factor is calculated by combining the comprehensive commodity similarity and user similarity, and a method for calculating the recommendation degree combining UserCF and ItemCF is given, which not only retains the stability of ItemCF, but also incorporates the feature that UserCF can recommend new commodities, so that the commodity recommendation has the function of recommending commodities similar to commodities liked by people similar to the user, and enhances the exploratory nature of the algorithm. Therefore, the embodiment of the present invention provides a more efficient and accurate commodity recommendation method. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the scheme in the present invention, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 A flowchart of an embodiment of a product recommendation method in product recommendation according to the present invention;

[0035] Figure 2 is a structural schematic diagram of an embodiment of a commodity recommendation calculation device in commodity recommendation according to the present invention;

[0036] Figure 3 It is a structural diagram of an embodiment of a commodity recommendation computing device in commodity recommendation according to the present invention. DETAILED DESCRIPTION

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present invention; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention; the terms "including" and "having" and any variations thereof in the specification and claims of the present invention and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present invention or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0038] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0039] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.

[0040] The embodiment of the present invention proposes a collaborative filtering calculation method, device, equipment and storage medium for product recommendation. The product recommendation method of the embodiment of the present invention is generally executed by a terminal device, which can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Moving Picture Experts Group Audio Layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, Moving Picture Experts Group Audio Layer 4) players, laptop portable computers and desktop computers, etc.

[0041] like Figure 1 FIG. 1 is a flowchart of an embodiment of a method for recommending products according to the present invention. The method comprises the following steps:

[0042] Step 101, identifying the data type of the interactive information between the user and the product, selecting a corresponding product similarity algorithm according to the data type to calculate the product similarity, and normalizing the calculated product similarity result, wherein the data type includes a Boolean vector and a non-Boolean vector.

[0043] In the embodiment of the present invention, different similarity calculation methods are applied according to different data types, and the data type is determined by a Boolean variable. A Boolean variable is a variable with only two logical states, and its value is: true and false. When the amount of data is small or the phenomenon that users repurchase a certain commodity within a certain period of time is small, for example, less than a set threshold, a Boolean vector is applied to express the interaction information between the user and the commodity and complete the similarity calculation; when the amount of data is relatively abundant or the phenomenon that users repurchase a certain commodity within a certain period of time is large, for example, more than a set threshold, a non-Boolean vector is applied to express the interaction information between the user and the commodity and complete the similarity calculation.

[0044] In one embodiment, when the data type of the interaction information between the user and the product is a Boolean variable, the following formula is used to calculate the similarity between product i and product j:

[0045]

[0046] That is:

[0047]

[0048] In formula (1), s1 i,j is the similarity between product i and product j, n is the total number of users, x1, x2, x3 are adjustable weight coefficients, and I(·) is the indicative function, that is, S represents any A, B, or C. The first item A indicates that user k purchased both item i and item j, indicating that there is a certain correlation between the two items. Therefore, a weight coefficient - positive number x1 is added to the correlation between the two items. The second item B indicates that user k purchased item i or item j, indicating that there is a certain mutual exclusivity between the two items. Therefore, a weight coefficient - negative number x2 is added to the correlation between the two items. The third item C indicates that user k did not purchase item i or item j. It is difficult to intuitively say that there is any relationship between the two items. The weight coefficient -x3 can be set to zero, and it can also be used for parameter adjustment.

[0049] Since Boolean variables express less information, the same user may buy two unrelated products at the same time, or may not buy two related products at the same time, or may even buy two mutually exclusive products at the same time. If no secondary processing is done, the similarity will be greatly affected by randomness. Therefore, in this implementation, a hierarchical method is used to reduce the impact of randomness in product similarity. Specifically, in the case of full symmetry, that is, when everyone buys products randomly, calculate s1 i,j The mean and confidence interval of .

[0050]

[0051]

[0052]

[0053] That is:

[0054]

[0055] In formula (2), P 1,k represents the probability that user k purchases both item i and item j under fully symmetric conditions, P 2,k represents the probability that user k purchased only one of product i and product j under the fully symmetric condition, P 3,k represents the probability that user k does not purchase item i and item j in the case of full symmetry, m is the total number of items, b k is the number of times user k purchases a product, is the formula for the number of combinations, which represents the number of combinations of t different objects randomly selected from s different objects to form a group.

[0056] Then the random variable of the similarity between product i and product j follows the following distribution:

[0057]

[0058] X i,j,k =x1 I(A)+x2 I(B)+x3 I(C)

[0059] That is:

[0060] X i,j,k =x1 I(user k buy both item i and item j )+x2 I(user k buy one of item i and item j)+x3 I(user k buy none of item i and item j )

[0061] Formula (3)

[0062] In formula (3), X i,j,k represents the contribution of user k to the similarity between product i and product j, which follows a multinomial distribution. n is the total number of users, x1, x2, x3 are adjustable weight coefficients, and I(·) is an indicative function. Then X i,j,k =(x1, x2, x3)~PN(1:P 1,k , P 2,k , P 3,k ).

[0063] The theoretical mean of the similarity between products in the fully symmetrical case is:

[0064]

[0065] Since it is difficult to obtain the confidence interval using mathematical methods in the form of similarity, the Monte Carlo simulation method is used to obtain s1 in the case of full symmetry. i,k The Monte Carlo simulation is implemented as follows: generate n independent numbers, and for each number, according to P 1,k The probability of assigning x1, P 2,k The probability of assigning x2, P 3,k The probability of x3 is assigned, and then the n independently generated numbers are summed to obtain s1 for a single experiment in the case of full symmetry. i,j After repeating the above process for a set number of times (for example, 500 times), the 500 s1 i,j The experimental values ​​are sorted from small to large. For example, according to the set 90% confidence interval, the 25th value can be recorded as l1, the 475th value can be recorded as u1, and s1 can be obtained accordingly. i,k The approximate 90% confidence interval of [l1, u1]. Of course, the set number of times and the set confidence interval can also be other values, and the position of the number of times corresponding to the confidence interval is not specifically limited in the present invention.

[0066] where s1 i,k The approximate setting of the confidence interval [l1, u1] means: Taking the 90% confidence interval [l1, u1] as an example, when users purchase completely randomly, there is no similarity between all products, that is, any two products are neither similar nor mutually exclusive, then s1 i,kThe approximate 90% confidence interval [l1, u1] represents that the similarity between two completely unrelated products will have a 90% probability of falling within the interval [l1, u1]. Therefore, in the standardization process, all pairs of products whose similarities fall within the interval [l1, u1] are considered unrelated, thereby reducing the impact of randomness on product similarity.

[0067] Then all s1 that fall within the approximate confidence interval i,j are all set to the theoretical mean value E(s1) of the random variable and are standardized. i,j Perform Z-score standardization, which converts multiple groups of data into unitless Z-score values, unifies the data standards, improves data comparability, and weakens data interpretability:

[0068]

[0069] In formula (5), μ is all s1 i,j The calculated result mean, σ is the value of all s1 i,j In this embodiment, after Z-score standardization, the new user similarity has a mean of 0 and a standard deviation of 1.

[0070] In another embodiment, when the data type of the interaction information between the user and the product is not a Boolean variable, the following formula is used to calculate the similarity between product i and product j:

[0071]

[0072] In formula (6), s1 i,j is the similarity between product i and product j, n is the total number of users, b k,i is the number of times user k purchased product i. When the user and product information are not Boolean variables, it is considered that when the number of times two products are purchased is similar, the similarity of the two products is high; when the number of times the two products are purchased is very different, the similarity of the two products is low. According to the mean inequality, b k,j and b k,i The more the ratio deviates from 1, the The smaller the value, the more consistent the similarity and b k,j and b k,i However, since this is a homogeneous formula, if it is directly used as a similarity measure, two commodities with the same proportion but different purchase quantities will have the same similarity, which may not be consistent with reality. Therefore, in the embodiment of the present invention, it is multiplied by the coefficient min{b k,j , b k,j}.

[0073] Because non-Boolean variables contain more information than Boolean variables and are less affected by randomness, in this embodiment, there is no need to repeat the operation of reducing randomness for the commodity similarity based on Boolean variables, but directly standardize the commodity similarity, that is, for all s1 i,j The Z-score standardization is performed. The specific method is as described above and will not be repeated here.

[0074] Step 102: Select a corresponding user similarity algorithm according to the data type to calculate the user similarity, and perform standardization on the calculated user similarity result.

[0075] Similar to product similarity, in the process of calculating user similarity, different similarity calculation methods are applied according to different data types.

[0076] In one embodiment, when the data type of the interaction information between the user and the commodity is a Boolean variable, the user similarity between user i and user j is calculated using the following formula:

[0077]

[0078] That is:

[0079]

[0080] In formula (7), s2 i,j is the user similarity between user i and user j, m is the total number of products, x4 , x5, x6 are adjustable weight coefficients, and I(·) is the indicative function, that is, S represents any D, E, and F. The first item D means that product k is purchased by both user i and user j, indicating that there is a certain correlation between the two customers. For this reason, a weight coefficient - positive number x4 is added to the correlation between the two customers; the second item E represents that product K is purchased by user i or user j, indicating that there is a certain mutual exclusivity between the two customers. For this reason, a weight coefficient - negative number x5 is added to the correlation between the two customers; the third item F represents that product k is not purchased by user i or user j. It is difficult to intuitively say that there is any relationship between the two customers. The weight coefficient -x6 can be set to zero, which can also be used for parameter adjustment.

[0081] Similarly, since Boolean variables express less information, similarity is more affected by randomness. Therefore, in this implementation, a hierarchical method is also used to reduce the impact of randomness in user similarity. Specifically, in the case of full symmetry, that is, when everyone buys goods randomly, calculate s2 i,j The mean and a confidence interval, such as a 90% confidence interval, for .

[0082]

[0083]

[0084]

[0085] That is:

[0086]

[0087] In formula (8), P 4,k represents the probability that user i and user j purchase product k at the same time in a fully symmetric situation, P 5,k represents the probability that only one of user i and user j purchases product k under fully symmetric conditions, P 6,k represents the probability that neither user i nor user j purchases product k in the fully symmetric case, n is the total number of users, b′ k is the number of people who purchased product k, is the formula for the number of combinations, which represents the number of combinations of t different objects randomly selected from s different objects to form a group.

[0088] Then the random variable of user similarity between user i and user j follows the following distribution

[0089]

[0090] X′ i,j,k =x4 I(D)+x5 I(E)+x6 I(F)

[0091] That is:

[0092] X′ i,j,k =x4 I(both user i and user j buy item k )+x5 I(one of user i and user j buy item k )+x6 I(none of user i and user j buy item k )

[0093] Formula (9)

[0094] In formula (9), X′ i,j,kis the contribution of product k to the similarity between user i and user j, which follows a multinomial distribution, n is the total number of users, x1, x2, x3 are adjustable weight coefficients, I(·) is the indicative function, then X i,j,k =(x4, x5, x6)~PN(1:P 4,k , P 5,k , P 6,k ).

[0095] In the fully symmetric case, the theoretical mean of similarity between users is:

[0096]

[0097] Since it is difficult to obtain the confidence interval using mathematical methods in the form of similarity, the Monte Carlo simulation method is used to obtain s2 in the case of full symmetry. i,j The Monte Carlo simulation is implemented as follows: generate m independent numbers, and for each number, according to P 4,k The probability of assigning x4, P 5,k The probability of assigning x5, P 6,k The probability of x6 is assigned, and then the m independently generated numbers are summed to obtain s2 for a single experiment in the case of full symmetry. i,j Repeat the above process for a set number of times (for example, 500 times) and obtain 500 s2 i,j The experimental values ​​are sorted from small to large. For example, according to the set 90% confidence interval, the 25th value can be recorded as 12 and the 475th value can be recorded as u2, thereby obtaining an approximate 90% confidence interval [l2, u2] of s2. Of course, the set number of times and the set confidence interval can also be other values. The position of the sorting according to the number of times corresponding to the confidence interval is not specifically limited in the present invention.

[0098] where s2 i,k The approximate confidence interval [l2, u2] of is: Taking the 90% confidence interval [l1, u1] as an example, when users purchase completely randomly, there is no similarity between all users, that is, no two users have the same hobbies, then s2 i,k The approximate 90% confidence interval [l2, u2] represents that the similarity between two completely unrelated users will have a 90% probability of falling within the interval [l2, u2]. Therefore, in the normalization process, all user pairs whose similarities fall within the interval [l2, u2] are considered unrelated, thereby reducing the impact of randomness on user similarity.

[0099] Then all s2 that fall within the approximate confidence interval i,jare all set to the theoretical mean value E(s2) of the random variable and are standardized. i,j Perform Z-score standardization:

[0100]

[0101] In formula (11), μ′ is all s2 i,j The calculated result mean, σ′ is the mean of all s2 i,j In this embodiment, after Z-score standardization, the new user similarity has a mean of 0 and a standard deviation of 1.

[0102] In another embodiment, when the data type of the interaction information between the user and the commodity is not a Boolean variable, the user similarity between user i and user j is calculated using the following formula:

[0103]

[0104] In formula (12), s2 i,j is the similarity between user i and user j, m is the total number of products, b i,k is the number of times user i purchased product k. When the customer and product information are not Boolean variables, it is considered that when the number of purchases of two customers is similar, the similarity of the two customers is high; when the number of purchases of two customers is very different, the similarity of the two customers is low. According to the mean inequality, b i,k and b j,k The more the ratio deviates from 1, the The smaller the value, the more consistent the similarity and b i,k and b j,k However, since this is a homogeneous formula, if it is directly used as a similarity measure, two commodities with the same proportion but different purchase quantities will have the same similarity, which may not be consistent with reality. Therefore, in the embodiment of the present invention, it is multiplied by the coefficient min{b i,k , b i,k}.

[0105] Similarly, because non-Boolean variables contain more information than Boolean variables and are less affected by randomness, in this embodiment, there is no need to repeat the operation of reducing randomness for user similarities based on Boolean variables, but directly standardize the user similarities, that is, for all s2 i,j The Z-score standardization is performed. The specific method is as described above and will not be repeated here.

[0106] Step 103, based on the standardized product similarity and user similarity, the recommendation factor between each user and the product is calculated and sorted, and the most relevant N products are added to the corresponding user recommendation list according to the recommendation factor, where N is the capacity of the recommendation list.

[0107] In the embodiment of the present invention, the recommendation factor rec is defined as i,j Represents the recommendation degree between user i and product j. The calculation formula is as follows:

[0108]

[0109] In formula (13), s1 k,j represents the similarity between product k and product j, s2 i,k ' represents the user similarity between user i and user k', s2 t,i represents the user similarity between user t and user i, s1 l,j The similarity between product l and product j, n is the total number of users, m is the total number of products; B i is the set of product numbers purchased by user i, F i is a set of product IDs collected by user i, C i is the set of product numbers added to the shopping cart by user i, B′ j is the set of user IDs that purchased product j, F′ j is the set of IDs of users who have collected product j, C′ j is a set of user IDs that add product i to the shopping cart. f1, f2, ..., f7 are adjustable weight parameters. The addition of makes the collaborative filtering algorithm more exploratory, and also enables the recommendation model to have the function of recommending products similar to those liked by people similar to the user.

[0110] Calculate the recommendation factor rec between all users i and products j i,j After that, for each user i, all the recommendation factors rec related to him are calculated and sorted. i,1 , rec i,2 , ..., rec i,m , the most relevant N items are added to the recommendation list, where N is the capacity of the recommendation list. When used for recommendation, N is determined by the number of items that can be displayed to customers on the UI interface of the recommendation system; when used for prediction, N is determined by the daily average number of user-item pairs that make purchases during the time period covered by the data.

[0111] By identifying the data type of the interactive information between the user and the product, the product similarity and user similarity are calculated respectively, that is, when the data type of the interactive information between the user and the product is a Boolean variable, the mean and confidence interval of the product similarity and user similarity are introduced and standardized, thereby reducing the influence of randomness; when the data type of the interactive information between the user and the product is a non-Boolean variable, the coefficient of the purchase amount weight is introduced when calculating the product similarity and user similarity, thereby improving the problem of inaccurate recommendation caused by the traditional methods such as Euclidean distance, cosine similarity, and Pearson correlation in the prior art when dealing with non-Boolean vectors, which regards the similarity of user pairs with the same purchase amount ratio but different quantities as the same due to homogeneity; in addition, the recommendation factor is calculated by combining the comprehensive product similarity and user similarity, and a recommendation degree calculation method combining UserCF and ltemCF is given, which not only retains the stability of ltemCF, but also incorporates the feature that UserCF can recommend new products, so that the product recommendation has the function of recommending products similar to the products liked by people similar to the user, and enhances the exploratory nature of the algorithm. Therefore, the embodiment of the present invention provides a more efficient and accurate product recommendation method.

[0112] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0113] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0114] Further references Figure 2 , as a response to the above Figure 1 The present invention provides an embodiment of a commodity recommendation computing device 200. Figure 1The method embodiment shown corresponds to the embodiment shown in FIG. Figure 2 As shown, a commodity recommendation calculation device 200 provided by an embodiment of the present invention includes:

[0115] The commodity similarity processing module 21 is used to identify the data type of the interactive information between the user and the commodity, select the corresponding commodity similarity algorithm according to the data type to perform commodity similarity calculation, and perform standardization processing on the calculated commodity similarity result, wherein the data type includes Boolean vector and non-Boolean vector;

[0116] A user similarity processing module 22, configured to select a corresponding user similarity algorithm according to the data type to perform user similarity calculation, and perform standardization processing on the calculated user similarity result;

[0117] The product recommendation processing module 23 is used to calculate and sort the recommendation factor between each user and the product based on the standardized product similarity and the user similarity, and add the most relevant N products to the corresponding user recommendation list based on the recommendation factor, where N is the capacity of the recommendation list.

[0118] In some optional implementations of this embodiment, the product similarity processing module further includes: a first calculation submodule, which is used to calculate the product similarity between product i and product j using the following formula when the data type of the interaction information between the user and the product is a Boolean variable:

[0119]

[0120] Among them, s1 I,j is the similarity between product i and product j, A means that user k purchased both product i and product j, B means that user k purchased product i or product j, C means that user k did not purchase product i or product j, n is the total number of users, x1, x2, x3 are adjustable weight coefficients, S represents any A, B, or C.

[0121] The first standardization processing submodule is used to calculate the commodity similarity s1 between commodity i and commodity j when all people buy commodities randomly. i,j The theoretical mean of the random variable; Calculate the product similarity s1 according to the Monte Carlo simulation method i,j The approximate confidence interval [l1, u1] of i,j The values ​​of are set to the theoretical mean, and the s1 set to the theoretical mean i,j Perform Z-score standardization.

[0122] In some optional implementations of this embodiment, the product similarity processing module further includes: a second calculation submodule, which is used to calculate the similarity between product i and product j using the following formula when the interaction information between the user and the product is a non-Boolean variable:

[0123]

[0124] Among them, s1 i,j is the similarity between product i and product j, n is the total number of users, b k,i The number of times user k purchased product i;

[0125] The second standardization processing submodule is used to perform similarity s1 on all products. i,j Perform Z-score standardization.

[0126] In some optional implementations of this embodiment, the user similarity processing module further includes: a third calculation submodule, which is used to calculate the user similarity between user i and user j using the following formula when the interaction information between the user and the product is a Boolean variable:

[0127]

[0128] Among them, s2 i,j is the user similarity between user i and user j, D means that product k is purchased by both user i and user j, E means that product K is purchased by user i or user j, F means that product k is not purchased by user i or user j, m is the total number of products, x4, x5, x6 are weight coefficients,

[0129] The third standard processing submodule is used to calculate the user similarity s2 between user i and user j when all people randomly purchase goods. i,j The theoretical mean of the random variable; Calculate the user similarity s2 according to the Monte Carlo simulation method i,j The approximate confidence interval [l2, u2] of i,j The values ​​of are set to the theoretical mean, and the values ​​of s2 set to the theoretical mean i,j Perform Z-score standardization.

[0130] In some optional implementations of this embodiment, the user similarity processing module further includes: a fourth calculation submodule, which is used to calculate the user similarity between user i and user j using the following formula when the data type of the interaction information between the user and the product is a non-Boolean variable:

[0131]

[0132] Among them, s2 i,j is the user similarity between user i and user j, m is the total number of products, b i,k The number of times user i purchased product k;

[0133] The fourth standardization processing submodule is used to perform similarity s2 on all users. i,j Perform Z-score standardization.

[0134] In some optional implementations of this embodiment, the calculation method for performing Z-score standardization by the first standardization processing module, the second standardization processing module, the third standardization processing module, and the fourth standardization processing module is:

[0135]

[0136] Among them, Si,j is the product similarity s1 between product i and product j I,j Or the user similarity s2 between user i and user j i,j , μ is the similarity of all products s1 i,j Or user similarity s2 i,j The actual mean of , σ is the similarity of all products s1 i,j Or user similarity s2 i,j The difference between the resulting mean and the theoretical mean.

[0137] In some optional implementations of this embodiment, the product recommendation processing module calculates the recommendation factor between each user and the product according to the product similarity and the user similarity according to the following formula:

[0138]

[0139] Among them, s1 k,j represents the similarity between product k and product j, s2 i,k ′ represents the user similarity between user i and user k′, s2 t,i represents the user similarity between user t and user i, s1 l,j The similarity between product l and product j, n is the total number of users, m is the total number of products; B i is the set of product numbers purchased by user i, F i is a set of product IDs collected by user i, C i is the set of product numbers added to the shopping cart by user i, B′ j is the set of user IDs that purchased product j, F′ j is the set of IDs of users who have collected product j, C′ jThe set f1, f2, ..., f7 consisting of the IDs of users who added product j to the shopping cart is the weight parameter.

[0140] The commodity recommendation calculations involved in the modules can refer to the various embodiments of the commodity recommendation method of the present invention, and will not be described in detail here.

[0141] To solve the above technical problems, the present application also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.

[0142] The computer device 3 includes a memory 31, a processor 32, and a network interface 33 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 3 with components 31-33, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0143] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0144] The memory 31 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 31 can be an internal storage unit of the computer device 3, such as a hard disk or memory of the computer device 3. In other embodiments, the memory 31 can also be an external storage device of the computer device 3, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 3. Of course, the memory 31 can also include both the internal storage unit of the computer device 3 and its external storage device. In this embodiment, the memory 31 is generally used to store the operating system and various application software installed on the computer device 3, such as computer-readable instructions of the text similarity calculation method, etc. In addition, the memory 31 can also be used to temporarily store various types of data that have been output or are to be output.

[0145] The processor 32 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 32 is generally used to control the overall operation of the computer device 3. In this embodiment, the processor 32 is used to run the computer-readable instructions stored in the memory 31 or process data, such as computer-readable instructions for running the text similarity calculation method.

[0146] The network interface 33 may include a wireless network interface or a wired network interface. The network interface 33 is generally used to establish a communication connection between the computer device 3 and other electronic devices.

[0147] The embodiment of the present invention further provides a computer-readable storage medium, on which a product recommendation calculation program is stored. When the product recommendation calculation program is executed by a processor, the steps of the product recommendation calculation method described above are implemented. The method implemented when the product recommendation calculation program is executed can refer to the various embodiments of the product recommendation calculation method of the present invention, which will not be repeated here.

[0148] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0149] Obviously, the embodiments described above are only some embodiments of the present invention, rather than all embodiments. The preferred embodiments of the present invention are given in the accompanying drawings, but they do not limit the patent scope of the present invention. The present invention can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive. Although the present invention has been described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific embodiments, or to perform equivalent replacements for some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is also within the scope of patent protection of the present invention.

Claims

1. A product recommendation method, characterized in that: The steps include: Identify the data type of the interactive information between the user and the product, select a corresponding product similarity algorithm according to the data type to perform product similarity calculation, and perform standardization on the calculated product similarity result, wherein the data type includes a Boolean vector and a non-Boolean vector; Selecting a corresponding user similarity algorithm according to the data type to perform user similarity calculation, and performing standardization processing on the calculated user similarity result; and According to the standardized similarity of the products and the similarity of the users, the recommendation factor between each user and the products is calculated and sorted, and the most relevant N products are added to the corresponding user recommendation list according to the recommendation factor, where N is the capacity of the recommendation list; The step of selecting a corresponding product similarity algorithm according to the data type to calculate product similarity specifically includes: When the data type of the interaction information between users and products is a Boolean variable, the following formula is used to calculate the product similarity between product i and product j: Among them, s1 1,j is the similarity between product i and product j, A means that user k purchased both product i and product j, B means that user k purchased product i or product j, C means that user k did not purchase product i or product j, n is the total number of users, x1, x2, x3 are adjustable weight coefficients, Where S represents any A, B, C; The calculated similarity result s1 of the product i,j The steps for standardization include: When all people buy goods randomly, calculate the similarity s1 between goods i and j i,j The theoretical mean of the random variable ; Calculate the product similarity s1 according to the Monte Carlo simulation method i,j The approximate confidence interval of [l1,u1]; All s1 that fall within the approximate confidence interval [l1, u1] i,j The values ​​of are set to the theoretical mean, and the s1 set to the theoretical mean i,j Perform Z-score standardization; Or the step of selecting a corresponding product similarity algorithm according to the data type to calculate product similarity specifically includes: When the data type of the interaction information between users and products is a non-Boolean variable, the following formula is used to calculate the similarity between product i and product j: Among them, s1 1,j is the similarity between product i and product j, n is the total number of users, b k,i The number of times user k purchased product i; The step of normalizing the calculated product similarity result specifically includes: Similarity s1 for all products i,j Perform Z-score standardization.

2. The commodity recommendation method according to claim 1, characterized in that: The selecting a corresponding user similarity algorithm according to the data type to perform user similarity calculation specifically includes: When the data type of the interaction information between users and products is a Boolean variable, the following formula is used to calculate the user similarity between user i and user j: Among them, s2 i,j is the user similarity between user i and user j, D means that product k is purchased by both user i and user j, E means that product K is purchased by user i or user j, F means that product k is not purchased by user i or user j, m is the total number of products, x4, x5, x6 are weight coefficients, Where S represents any D, E, F; The step of normalizing the calculated user similarity result specifically includes: When everyone buys goods randomly, calculate the user similarity s2 between user i and user j i,j The theoretical mean of the random variable ; Calculate the user similarity s2 according to the Monte Carlo simulation method i,j The approximate confidence interval of [l2,u2]; All s2 that fall within the approximate confidence interval [l2, u2] i,j The values ​​of are set to the theoretical mean, and the values ​​of s2 set to the theoretical mean i,j Perform Z-score standardization.

3. The commodity recommendation method according to claim 1, characterized in that: The selecting a corresponding user similarity algorithm according to the data type to perform user similarity calculation specifically includes: When the data type of the interaction information between users and products is a non-Boolean variable, the following formula is used to calculate the user similarity between user i and user j: Among them, s2 i,j is the user similarity between user i and user j, m is the total number of products, b i,k The number of times user i purchased product k; The step of normalizing the calculated user similarity result specifically includes: Similarity s2 for all users i,1 Perform Z-score standardization.

4. The commodity recommendation method according to any one of claims 1 to 3, characterized in that: The Z-score standardization is calculated as follows: Among them, Si,j is the product similarity s1 between product i and product j i,j Or the user similarity s2 between user i and user j i,j , μ is the similarity of all products s1 i,j Or user similarity s2 i,j The actual mean of , σ is the similarity of all products s1 i,j Or user similarity s2 i,j The difference between the resulting mean and the theoretical mean.

5. The commodity recommendation method according to claim 4, characterized in that: The step of calculating the recommendation factor between each user and the product according to the product similarity and the user similarity specifically includes: calculating the recommendation factor according to the following formula: Among them, s1 k,j represents the similarity between product k and product j, s2 i,k ′ represents the user similarity between user i and user k′, s2 t,i represents the user similarity between user t and user i, s1 1,j The similarity between product I and product j, n is the total number of users, m is the total number of products; B i is the set of product numbers purchased by user i, F i is the set of product numbers collected by user i, C1 is the set of product numbers added to the shopping cart by user i, B′ j is the set of user IDs that purchased product j, F′ j is the set of IDs of users who have collected product j, C′ j The set f1, f2, ..., f7 consisting of the IDs of users who added product j to the shopping cart is the weight parameter.

6. A commodity recommendation computing device, characterized in that: The commodity recommendation calculation device performs the steps of the commodity recommendation method according to any one of claims 1 to 5, and the commodity recommendation calculation device includes: A product similarity processing module is used to identify the data type of the interactive information between the user and the product, select the corresponding product similarity algorithm according to the data type to calculate the product similarity, and perform standardization processing on the calculated product similarity results, wherein the data type includes Boolean vectors and non-Boolean vectors; A user similarity processing module, configured to select a corresponding user similarity algorithm according to the data type to perform user similarity calculation, and perform standardization processing on the calculated user similarity result; and The product recommendation processing module is used to calculate and sort the recommendation factor between each user and the product based on the standardized product similarity and user similarity, and add the most relevant N products to the corresponding user recommendation list based on the recommendation factor, where N is the capacity of the recommendation list.

7. A commodity recommendation computing device, characterized in that: The commodity recommendation computing device includes a processor, a memory, and a commodity recommendation computing program stored in the memory. When the commodity recommendation computing program is executed by the processor, the steps of the commodity recommendation method according to any one of claims 1 to 5 are implemented.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a commodity recommendation calculation program, and when the commodity recommendation calculation program is executed by the processor, the steps of the commodity recommendation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Commodity similarity calculation method and commodity recommending system based on image similarity

    CN104504055A

  • Topic model-based commodity recommendation method and system

    CN106897914A