Commodity recommendation method and system based on collaborative filtering
By constructing a preference matrix and DTW distance based on user browsing behaviors, combined with the collaborative filtering algorithm, the problem of similarity calculation of similarity in collaborative filtering ignores other characteristics of users or products, and realizes more personalized, accurate and timeliness recommendations, improved User experience and purchase conversion rate.
Patent Information
- Application Number
- CN202411524689.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-30
AI Technical Summary
In collaborative filtering, similarity calculation is usually based on the interaction between users or products, which may ignore other characteristic information of users or products, resulting in a lack of diversity in recommendation results, which cannot be accurately recommended, and reduces user purchases interest.
By obtaining the daily views and time of each user of each user types and various products in each type of products, the daily views of each user's daily browsing and the preferences of the types of products in each product types and the preferences of each product are established. Obtain the DTW distance between users, determine the reference recommendation of the various users of the other users, and finally complete the recommendation of product recommendations based on the recommendation.
By analyzing users' browsing records and browsing time, provide more personalized recommendations to improve user experience and satisfaction. Precise product recommendations can attract users to click, increase purchase conversion rates, promote sales growth, and the recommended system is more timid and accurate Sex can provide relatively accurate recommendations when new users have not yet produced sufficient data to relieve the problem of cold start.
Smart Images

Figure CN119048203B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a product recommendation method and system based on collaborative filtering. Background Art
[0002] The product recommendation method based on collaborative filtering is a widely used personalized recommendation technology. It predicts the products that users may be interested in by analyzing the user's historical behavior data. It can find other users with similar interests and hobbies as the target user, and then recommend products that similar users like but the target user has not yet come into contact with. It can also determine the similarity between products by analyzing the user's evaluation patterns of different products, and then recommend similar products to users. The product recommendation method based on collaborative filtering and its system can effectively improve the service quality and commercial value of the e-commerce platform, and also provide users with a more convenient and comfortable shopping experience. However, it should also be noted that with the increase in the number of users and the variety of products, how to efficiently process large-scale data sets and how to protect user privacy have become key challenges that need to be solved when implementing collaborative filtering algorithms.
[0003] The patent application document with publication number CN114861079A discloses a collaborative filtering recommendation method and system that integrates product features, which belongs to the field of intelligent product recommendation for new retail enterprises. It makes improvements based on the use of collaborative filtering algorithm to calculate item similarity, integrates product features, calculates a similarity matrix based on product features, and combines it with the product similarity matrix of the collaborative filtering algorithm. Finally, based on the similarity between items and the user's historical interest information, a predicted score for the product is obtained, thereby generating a recommendation list for the user.
[0004] However, when using collaborative filtering algorithms to recommend products based on user preferences for products, because user preferences may change over time, collaborative filtering algorithms usually only consider static historical interaction data when making predictions, which may not accurately reflect the user's current preferences. At the same time, in collaborative filtering, similarity calculations are usually based on the interaction between users or products, which may ignore other feature information of users or products, resulting in a lack of diversity in recommendation results, making it impossible to make accurate recommendations, and reducing users' purchasing interest. Summary of the invention
[0005] In order to solve the problem that in collaborative filtering, similarity calculation is usually performed based on the interaction behavior between users or commodities, which may ignore other characteristic information of users or commodities, resulting in a lack of diversity in recommendation results, thereby failing to make accurate recommendations and reducing the user's purchasing interest, the present invention provides a commodity recommendation method and system based on collaborative filtering.
[0006] In a first aspect, the present invention provides a product recommendation method based on collaborative filtering, which adopts the following technical solution:
[0007] The commodity recommendation method based on collaborative filtering includes: obtaining the number of daily browsing times and the browsing time of each commodity in each commodity category of each user; determining the daily browsing degree of each commodity in each commodity category of each user, wherein the daily browsing degree is positively correlated with the number of daily browsing times and the browsing time of each commodity in the commodity category of the user on that day; determining the preference degree of the user for each commodity category, wherein the preference degree is positively correlated with the maximum value of the daily browsing degree of each commodity in the commodity category of the user, and negatively correlated with the number of days from the last browsing day of each commodity in the commodity category of the user to the current day; constructing a preference matrix according to the preference degree of all users for each commodity category, obtaining the DTW distance between users according to the preference matrix, determining the reference recommendation degree of each user for each commodity category of other users, wherein the reference recommendation degree is positively correlated with the preference degree of the user, and negatively correlated with the absolute value of the difference between the DTW distance between the user and other users and the preference degree between the user and other users; determining the recommendation degree of each commodity category of each user, wherein the recommendation degree is positively correlated with the maximum reference recommendation degree of the user and the average of all the reference recommendation degrees of the user; and completing the commodity recommendation based on collaborative filtering according to the recommendation degree.
[0008] The beneficial effects are: by analyzing users' purchase records and browsing behaviors, more personalized recommendations can be provided to each user, improving user experience and satisfaction; accurate product recommendations can attract user clicks, thereby increasing purchase conversion rates and promoting sales growth; through users' browsing time and frequency, users' potential needs can be identified, thereby recommending products that users may be interested in but have not yet purchased; as user behavior data continues to accumulate, user preferences and product reference recommendations can be updated in real time, making the recommendation system more timely and accurate; by integrating the behavioral data of multiple users, relatively accurate recommendations can still be provided when new users have not yet generated enough data, alleviating the cold start problem; taking into account the preferences of different users, more diverse recommended products are introduced to help users discover new products and enhance the shopping experience.
[0009] Furthermore, the daily browsing degree satisfies the following relationship:
[0010] ; In the formula, For users For Within the product category The first Daily browsing rate, For users For Within the product category The first Number of daily visits, For users For Within the product category The first Day 1 View time, Represents the normalization function.
[0011] The beneficial effects are: by comprehensively considering the number of views and browsing time, the user's interest in the product can be evaluated more accurately; the use of a normalization function can reduce the impact of extreme values on the daily browsing level, making the recommendation results more stable and reliable; the user's latest behavior can be reflected in real time, ensuring the dynamics and accuracy of the recommendation system.
[0012] Furthermore, the degree of preference satisfies the following relationship:
[0013] ; In the formula, For users For The degree of preference for a product category, For users For Within the product category The maximum value of the daily browsing degree of products, For users Last viewed Within the product category The number of days between the product date and the current date, For the The number of products in a product category, Represents the normalization function.
[0014] The beneficial effects are: by combining the daily browsing degree and time factors, the user's preference for specific product categories can be quantified more accurately, reflecting the user's real interest; taking into account the time distance of the user's last browsing, the user's preference changes can be captured, making the recommendation more in line with the current interest status; through the normalization function, the preference levels of different users can be compared, ensuring fairness and accuracy in subsequent recommendations in a multi-user environment; by integrating historical behavior, the quality of personalized recommendations can be improved, thereby improving user satisfaction.
[0015] Furthermore, the row index of the preference matrix is the user, the column index is the product category, and the elements are the user's preference for each product category.
[0016] Furthermore, the reference recommendation degree satisfies the following relationship:
[0017] ; In the formula, For users For users No. The reference recommendation degree of the product category, For users For The degree of preference for a product category, For users For The degree of preference for a product category, For users With users The DTW distance between For users With users The DTW distance between is the number of users, is a hyperparameter, is the maximum value function.
[0018] The beneficial effects are: by introducing the DTW distance, the recommendation method can process time series data, so as to more comprehensively understand the changes in user behavior and be more suitable for product recommendations with time correlation; by comprehensively considering the user's preference level and the DTW distance, the similarity between users in specific product categories can be dynamically evaluated, reflecting the potential association between users; by combining the differences in preference levels between users and the DTW distance, the user's behavior patterns can be captured more accurately, thereby improving the accuracy of personalized recommendations.
[0019] Furthermore, the recommendation degree satisfies the following relationship:
[0020] ; In the formula, For users No. The recommendation degree of the product category, For users For users No. The reference recommendation degree of the product category, For all other users No. The average reference recommendation degree of the category products, is the number of users, represents the normalization function, is the maximum value function.
[0021] The beneficial effects are: through the combination of the maximum reference recommendation degree and the average reference recommendation degree, it can comprehensively reflect the degree of association between the user and other users in a specific product category, thereby enhancing the accuracy of the recommendation; the maximum reference recommendation degree takes into account the strongest similarity between users, and the average reference recommendation degree takes into account the overall trend, thereby taking into account both individual strong associations and the overall average level when making recommendations, thereby improving the reliability of recommendations; at the same time, when the reference recommendation degree between the user and other users changes, the recommendation degree will be adjusted accordingly, thereby timely reflecting the user's new needs and dynamically adapting to changes in user behavior.
[0022] Furthermore, completing the product recommendation based on collaborative filtering according to the recommendation degree includes: taking any user as the target user, taking the product category with the highest recommendation degree of the target user as the target product category, and taking the user corresponding to the highest reference recommendation degree of the target product category between the target user and other users as the approximate user of the target user; for each product in the target product category, in response to the approximate user having browsed the product but the target user not browsing the product, recommending the product to the target user; in response to the approximate user and the target user not browsing the product, when the browsing degree of the product on the day before the current day is the highest among the daily browsing degrees of other users for each product in the target product category, recommending the product to the target user, thereby completing the product recommendation based on collaborative filtering.
[0023] In a second aspect, the present invention provides a product recommendation system based on collaborative filtering, which adopts the following technical solution:
[0024] The product recommendation system based on collaborative filtering includes: a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the product recommendation method based on collaborative filtering is implemented.
[0025] By adopting the above technical solution, the above-mentioned collaborative filtering-based product recommendation method is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a terminal device based on the memory and the processor for easy use.
[0026] The present invention has the following technical effects:
[0027] By analyzing the number of times users browse and their browsing time, we can more accurately capture user preferences and improve the relevance of recommendations. We can dynamically adjust recommendation results and promptly update preferences based on users' latest behaviors to ensure the timeliness of recommendations. By building reference recommendation levels between users, we can discover potential users with similar interests, thereby increasing the diversity and coverage of recommendations, and ultimately improving user satisfaction and purchase conversion rates. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-restrictive manner, and the same or corresponding reference numerals represent the same or corresponding parts.
[0029] Figure 1 It is a flow chart of a method for recommending products based on collaborative filtering in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0031] It should be understood that when the terms "first", "second", etc. are used in the claims, descriptions, and drawings of the present invention, they are only used to distinguish different objects, rather than to describe a specific order. The terms "include" and "comprise" used in the description and claims of the present invention indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their collections.
[0032] The embodiment of the present invention discloses a product recommendation method based on collaborative filtering, referring to Figure 1 , comprising steps S1 to S7:
[0033] S1: Obtain the number of daily views and the browsing time of each user for each product in each product category.
[0034] Obtain the user's product browsing history on the corresponding platform through the corresponding platform, including the number of product browsing times per day and the time of each browsing.
[0035] S2: Determine the daily browsing degree of each user for each product in each product category.
[0036] It should be noted that the longer the single browsing time of a product is, the more attractive the product is to users; the more daily browsing times a product is viewed, the more the user likes the product. The daily browsing degree is determined by the daily browsing times of each product in each product category of each user and the browsing time of each time.
[0037] Specifically, the daily browsing degree satisfies the following relationship:
[0038] ;
[0039] In the formula, For users For Within the product category The first Daily browsing rate, For users For Within the product category The first Number of daily visits, For users For Within the product category The first Day 1 View time, Represents the normalization function.
[0040] in, Indicates user For Within the product category The first Daily browsing degree: the larger the value, the more active the user is in browsing the product; Indicates user For Within the product category The first Day 1 The browsing time is normalized to the corresponding single-day browsing time to reflect the proportion of browsing time in the corresponding single-day browsing time. The larger the proportion of browsing time of a product in a single day, the more active the user is in browsing the product and the more interested he is in the product. At the same time, the more browsing times a day are, the more the user likes the product. Reflects the user's daily The browsing degree of a product. The larger the value, the higher the purchasing interest and the greater the enthusiasm.
[0041] S3: Determine the user's preference for each product category.
[0042] It should be noted that because user preferences may change over time and there is a certain upper limit to the time users spend browsing every day, the user's preference for each type of product is analyzed through the degree of browsing of all the user's products, the browsing time of the corresponding products, and the number of days from the current day. The higher the browsing degree, the higher the degree of liking for the product, and the more likely the user is to like products in this category. At the same time, the closer the browsed products are to the present, the closer they are to the user's current browsing preferences, and the more reference value they have.
[0043] Specifically, the degree of preference satisfies the following relationship:
[0044] ;
[0045] In the formula, For users For The degree of preference for a product category, For users For Within the product category The maximum value of the daily browsing degree of products, For users Last viewed Within the product category The number of days between the product date and the current date, For the The number of products in a product category, Represents the normalization function.
[0046] in, Indicates user For The preference degree of a product category. The larger the value, the more the user likes the product category. For users For Within the product category The maximum value of the daily browsing degree of a product. The larger the value, the more the user browses the product. The higher the browsing degree, the more the user likes the product. At the same time, the more likely the user is to like other products in the same product category. At the same time, the closer the browsing time is to the present, the more it conforms to the user's current browsing preferences and the more reference value it has. Therefore, through Reflect the user No. The first The larger the value, the more users like to browse the product.
[0047] S4: Based on the preference of all users for each product category, a preference matrix is constructed, and the DTW distance between users is obtained based on the preference matrix.
[0048] Specifically, the row index of the preference matrix is the user, the column index is the commodity category, and the elements are the user's preference degree for each commodity category.
[0049] S5: Determine the reference recommendation degree of each user for each product category of other users.
[0050] It should be noted that, because different users may have the same preferences, when the product categories that different users like are extremely similar, products that have been browsed by users with similar preferences can be used to recommend products within the product category that the users have not browsed.
[0051] Specifically, the reference recommendation degree satisfies the following relationship:
[0052] ; In the formula, For users For users No. The reference recommendation degree of the product category, For users For The degree of preference for a product category, For users For The degree of preference for a product category, For users With users The DTW distance between For users With users The DTW distance between is the number of users, is a hyperparameter, is the maximum value function.
[0053] Implementers can set the value of the hyperparameter according to actual implementation, for example, 0.001.
[0054] in, For users and users Between The greater the value, the more likely the user is to Maybe you like product categories more The more products you buy, the more you need recommendations. Indicates user and users The smaller the value, the more similar the preferences of the two users are. Indicates user With users The DTW distance is Reflect the user With users The larger the value, the more similar the preferences.
[0055] S6: Determine the recommendation degree of each product category for each user.
[0056] It should be noted that, because the reference recommendation degrees may be the same, and the reference recommendation degrees are obtained by comparing the user's own preferences with the similarity between users, in order to make the recommendation more accurate, it is necessary to further consider the recommendation degrees of the products.
[0057] Specifically, the recommendation degree satisfies the following relationship:
[0058] ;
[0059] In the formula, For users No. The recommendation degree of the product category, For users For users No. The reference recommendation degree of the product category, For all other users No. The average reference recommendation degree of the category products, is the number of users, represents the normalization function, is the maximum value function.
[0060] in, Indicates user No. The greater the value, the more it needs to be recommended to users. Recommend this product category, Indicates user Between all other users The average reference recommendation degree of the commodities in this category. The larger the value, the higher the overall popularity of the commodities in this category.
[0061] S7: According to the recommendation degree, complete the product recommendation based on collaborative filtering.
[0062] Specifically, completing the product recommendation based on collaborative filtering according to the recommendation degree includes:
[0063] Take any user as the target user, take the product category with the highest recommendation degree of the target user as the target product category, and take the user with the highest reference recommendation degree of the target product category between the target user and other users as the approximate user of the target user;
[0064] For each product in the target product category, in response to the similar user having browsed the product but the target user not browsing the product, the product is recommended to the target user; in response to the similar user and the target user not browsing the product, when the product has the highest browsing degree on the day before the current day among the daily browsing degrees of other users for each product in the target product category, the product is recommended to the target user, thereby completing product recommendation based on collaborative filtering.
[0065] The embodiment of the present invention further discloses a product recommendation system based on collaborative filtering, including a processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the product recommendation method based on collaborative filtering according to the present invention is implemented.
[0066] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface, and their configuration and functions are known in the art, so they will not be described in detail here.
[0067] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, or any other medium that can be used to store the required information and can be accessed by an application, module, or both. Any such computer storage medium may be part of the device or accessible or connectable to the device.
[0068] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.
[0069] The above are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A product recommendation method based on collaborative filtering, characterized in that: include: Get the number of daily views and the duration of each view of each product in each product category by each user; Determine the daily browsing degree of each user for each product in each product category, where the daily browsing degree is positively correlated with the number of times the user browses the product in the product category on that day and the time of each browsing on that day; Determine the user's preference for each commodity category. The preference is positively correlated with the maximum value of the user's daily browsing of each commodity in the commodity category, and negatively correlated with the number of days from the last time the user browsed each commodity in the commodity category to the current day. The preference satisfies the relationship: , For users For The degree of preference for a product category, For users For Within the product category The maximum value of the daily browsing degree of products, For users Last viewed Within the product category The number of days between the product date and the current date, For the The number of products in a product category, represents a normalization function; based on the preference of all users for each commodity category, a preference matrix is constructed, the DTW distance between users is obtained according to the preference matrix, and the reference recommendation degree of each user for each commodity category of other users is determined. The reference recommendation degree is positively correlated with the preference degree of the user, and negatively correlated with the DTW distance between the user and other users and the absolute value of the difference between the preference degree of the user and other users. The reference recommendation degree satisfies the relationship: , For users For users No. The reference recommendation degree of the product category, For users For The degree of preference for a product category, For users With users The DTW distance between For users With users The DTW distance between is the number of users, is a hyperparameter, is a maximum value function; determining the recommendation degree of each commodity category of each user, the recommendation degree is positively correlated with the maximum reference recommendation degree of the user and the average of all the reference recommendation degrees of the user; According to the recommendation degree, the product recommendation based on collaborative filtering is completed.
2. The method for recommending products based on collaborative filtering according to claim 1, characterized in that: The daily browsing degree satisfies the following relationship: ; In the formula, For users For Within the product category The first Daily browsing rate, For users For Within the product category The first Number of daily visits, For users For Within the product category The first Day 1 View time, Represents the normalization function.
3. The product recommendation method based on collaborative filtering according to claim 1, characterized in that: The row index of the preference matrix is the user, the column index is the commodity category, and the elements are the user's preference degree for each commodity category.
4. The product recommendation method based on collaborative filtering according to claim 1, characterized in that: The recommendation degree satisfies the following relationship: ; In the formula, For users No. The recommendation degree of the product category, For users For users No. The reference recommendation degree of the product category, For all other users No. The average reference recommendation degree of the category products, is the number of users, represents the normalization function, is the maximum value function.
5. The method for recommending products based on collaborative filtering according to claim 1, characterized in that: The step of completing the product recommendation based on collaborative filtering according to the recommendation degree includes: Take any user as the target user, take the product category with the highest recommendation degree of the target user as the target product category, and take the user with the highest reference recommendation degree of the target product category between the target user and other users as the approximate user of the target user; For each product in the target product category, in response to the similar user having browsed the product but the target user not browsing the product, the product is recommended to the target user; in response to the similar user and the target user not browsing the product, when the product has the highest browsing degree on the day before the current day among the daily browsing degrees of other users for each product in the target product category, the product is recommended to the target user, thereby completing product recommendation based on collaborative filtering.
6. The product recommendation system based on collaborative filtering is characterized by: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the product recommendation method based on collaborative filtering according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Collaborative filtering recommendation method and system fusing commodity features
CN114861079A
Personalized commodity recommendation method with offline parking record and online purchase behavior fused
CN114549143A
Commodity recommendation method, system, equipment and medium
CN114626909A