Commodity recommendation method and device, electronic equipment and program product
By performing dual sorting and filtering before fine sorting of products, the problem of insufficient diversity in product recommendations is solved, and efficient and accurate product recommendations are achieved.
Patent Information
- Application Number
- CN202511529527.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-24
- Publication Date
- 2025-11-21
AI Technical Summary
In existing technologies, the diversity of product recommendations is insufficient, resulting in a high degree of similarity among recommended products, which fails to meet the diverse needs of users.
The system retrieves multiple first-order items from users to be recommended using a defined recall strategy. These items are then sorted according to a first matching degree and a first sorting rule. First-order items with similarity less than a similarity threshold are filtered out to form a second-order item sequence. Finally, the items are sorted according to a second matching degree and a second sorting rule to determine the items to be recommended.
It improves the diversity and accuracy of product recommendations, balances recommendation efficiency and diversity, and ensures that recommended products are highly matched with users while having low similarity.
Smart Images

Figure CN120996914A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of product recommendation technology, and in particular relates to product recommendation methods, devices, electronic devices and program products. Background Technology
[0002] To increase product sales and provide users with a better shopping experience, sales platforms usually recommend relevant products to users based on their preferences, thereby increasing product click-through rates and conversion rates.
[0003] Currently, a multi-path recall approach is commonly used to obtain a variety of recalled products. These recalled products are then subjected to a double ranking process to achieve diverse product recommendations. However, in multi-path recall, the recall strategy is often closely related to the user's historical behavior and preferences, resulting in a high degree of similarity among the recalled products. Consequently, the diversity of recommended products obtained through double ranking is insufficient. Summary of the Invention
[0004] This application provides product recommendation methods, apparatus, electronic devices, and program products, which can improve the accuracy of product recommendations.
[0005] In a first aspect, embodiments of this application provide a product recommendation method, including: Based on the set recall strategy, obtain multiple first products corresponding to the users to be recommended; Based on the first matching degree between different first products and the user to be recommended, and the set first sorting rule, the multiple first products are sorted to obtain a first product sequence; The first product in the first product sequence is filtered in the order from front to back. The filtered first product is used as the second product. The second product sequence is obtained based on the second product. The similarity between any second product and other second products is less than the set similarity threshold. Based on the second matching degree between different second products and the user to be recommended in the second product sequence and the set second sorting rule, the second products in the second product sequence are sorted, and the products to be recommended are determined based on the sorted second product sequence.
[0006] Secondly, embodiments of this application provide a product recommendation device, including: The recall module is used to retrieve multiple first-order products corresponding to the users to be recommended, based on the set recall strategy. The first sorting module is used to sort the plurality of first products according to the first matching degree between different first products and the user to be recommended and the set first sorting rules to obtain a first product sequence; The filtering module is used to filter the first product in the first product sequence in the order from front to back, take the filtered first product as the second product, and obtain the second product sequence based on the second product, wherein the similarity between any second product and other second products is less than a set similarity threshold. The second sorting module is used to sort the second products in the second product sequence according to the second matching degree between different second products and the user to be recommended and the set second sorting rules, and to determine the products to be recommended according to the sorted second product sequence.
[0007] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the product recommendation method described in the first aspect.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the product recommendation method described in the first aspect.
[0009] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the product recommendation method described in the first aspect.
[0010] The beneficial effects of the embodiments in this application compared with the prior art are: In this embodiment, since the similarity between any second product and other second products in the obtained second product sequence is less than the similarity threshold, that is, when filtering the first products in the first product sequence in the order from front to back, the first products with a similarity less than the similarity threshold with the first products ranked first can be filtered out as second products. This ensures that the similarity between any second product and other second products is less than the similarity threshold. Therefore, a second product sequence with diverse second products can be obtained. Furthermore, based on the second matching degree and the second ranking rule between different second products and the user to be recommended in the diverse second product sequence, the second products in the second product sequence are ranked more accurately. The products to be recommended are determined based on the ranked second product sequence, which can improve the diversity and accuracy of the final products to be recommended. At the same time, the diversity and efficiency of product recommendation are balanced by double ranking and filtering before fine ranking. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0012] Figure 1 This is a flowchart illustrating a product recommendation method provided in one embodiment of this application; Figure 2 This is a flowchart illustrating another product recommendation method provided in an embodiment of this application; Figure 3 This is a schematic diagram of the product recommendation device provided in the embodiments of this application; Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0014] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0015] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0016] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0017] References to "one embodiment" or "some embodiments" in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized.
[0018] Example 1: Figure 1This illustration shows a flowchart of a product recommendation method provided in an embodiment of this application. It should be noted that this embodiment uses an e-commerce platform as the executing entity for the product recommendation method. In other embodiments, the executing entity can also be a hardware device or software system such as a server, edge device, or hardware accelerator, depending on the specific application requirements.
[0019] The above methods are detailed below: S101. Based on the set recall strategy, obtain multiple first products corresponding to the users to be recommended.
[0020] It should be understood that the users to be recommended are the users who need to be recommended products. This can include, but is not limited to, users whose actions include logging in, adding to cart, purchasing, and searching. The specific settings can be configured according to actual application needs.
[0021] For example, when an e-commerce platform detects that a user has logged into the platform, it can designate that user as a potential recommender, obtain multiple first-tier products corresponding to that user, and then recommend products to that user.
[0022] Recall strategy typically refers to a strategy of quickly filtering a subset of products from a large product library that are relevant to the user's potential interests for further evaluation and ranking.
[0023] Optionally, recall strategies may include, but are not limited to, recall strategies based on popular products, recall strategies based on operational strategies, recall strategies based on content, and recall strategies based on user behavior.
[0024] Popular product recall typically refers to recalling products based on the most popular items currently available; operational strategy recall typically refers to recalling products based on business needs and specific scenarios (such as event recall or geographic recall) to meet specific business objectives; content-based recall typically refers to recalling products that users are interested in based on the product's content characteristics (such as title, name, text description, and images) and user history behavior; social relationship-based recall typically refers to recalling products based on users' social network information, such as recalling products that users' friends are interested in or recalling products related to users' social circles.
[0025] S102. Based on the first matching degree between different first products and the users to be recommended, and the set first sorting rules, sort the multiple first products to obtain a first product sequence.
[0026] It should be understood that the first sorting rule can be from high to low or from low to high, and the specific sorting can be set according to the actual application requirements.
[0027] Optionally, the first matching degree can reflect the degree of interest of the user to be recommended in the corresponding first product, or it can reflect the degree of matching between the corresponding first product and the shopping needs of the user to be recommended (such as product function needs, application scenario needs, price needs, and timeliness needs). The specific setting can be determined according to the actual application needs.
[0028] For example, the similarity between the target user corresponding to the first product and the user to be recommended can be obtained as the matching degree between the first product and the user to be recommended. The target user corresponding to the first product can include, but is not limited to, users who have made purchases, favorited, added to cart, or browsed the first product within a set historical time period (such as the past week).
[0029] It should be noted that in this embodiment of the application, the number of first products included in the first product sequence can be limited to N (N is greater than 1). That is, after sorting multiple first products, the first N first products in the sorting are obtained to form the first product sequence. In this way, the subsequent calculation volume is reduced and the product recommendation efficiency is improved by fast filtering based on the first matching degree.
[0030] S103. Filter the first products in the first product sequence from front to back, take the filtered first products as the second products, and obtain the second product sequence based on the second products. The similarity between any second product and other second products is less than the set similarity threshold.
[0031] It should be understood that the final second product sequence is usually composed of the filtered first products (i.e., the second products). In the second product sequence, the similarity between any second product and other second products is less than a set similarity threshold, that is, the similarity between any two filtered first products is less than the similarity threshold. In other words, when filtering the first products in the first product sequence, one can usually first obtain the similarity between different first products, and then, based on the similarity between different first products, filter the first products in the first product sequence in a forward-to-back order to obtain the filtered first products.
[0032] It should be understood that the similarity threshold can be obtained based on user input or settings, or it can be calculated by the e-commerce platform using intelligent algorithms based on information such as recommendation needs. No specific restrictions are imposed here.
[0033] Optionally, the similarity between any two first products can be obtained based on one or more related information such as the product information corresponding to the first product (let's call it first product information), sales information, and knowledge graph.
[0034] Product information may include, but is not limited to, information related to product attributes such as type, name, title, product identifier, price, category, specifications, and inventory status; sales information may include, but is not limited to, product sales-related information such as total sales volume, periodic sales volume, real-time sales volume, average order value, transaction price, and discount rate.
[0035] It should be understood that when obtaining the similarity between any two first products, the similarity can be obtained by measuring the cosine similarity, Euclidean distance, correlation distance, squared chord distance, or squared Euclidean distance between the associated information of different first products. The specific setting can be determined according to the actual application requirements.
[0036] It should be noted that, in this embodiment of the application, when filtering the first product in the first product sequence, an initialized second product sequence can usually be obtained first. The second product in the initialized second product sequence can be determined based on the first product in the first product sequence, or it can be determined based on other products, depending on the actual application requirements.
[0037] After obtaining the initial second product sequence, based on the second products in the second product sequence, the first products in the first product sequence whose similarity to the second products in the latest second product sequence is greater than or equal to the similarity threshold can be filtered out in order from front to back. That is, the first products in the first product sequence whose similarity to existing second products is less than the similarity threshold are taken as new second products and added to the second product sequence, so that in the final second product sequence, the similarity between any second product and other second products is less than the similarity threshold. In other words, the similarity between any two second products is less than the similarity threshold, ensuring the diversity of second products for subsequent fine-tuning, thereby ensuring the diversity of product recommendations.
[0038] As an example, suppose we receive a recommendation request: to recommend products that better match user preferences. Based on this request, the first ranking rule is determined to be sorting by first matching degree from high to low. When filtering the first product sequence in a forward-to-back order, the first product ranked first in the first product sequence can be used as the first second product. Then, when filtering the first products in the first product sequence to obtain the final second product sequence, starting from the second first product, we determine whether the similarity between the current first product and existing second products is less than a similarity threshold. Through orderly judgment, we select first products with a high first matching degree with the user to be recommended and low similarity among themselves as second products. This ensures that each second product has a high first matching degree with the user to be recommended and good diversity.
[0039] As another example, suppose the obtained recommendation requirement is: to explore the dynamic interest boundaries of users. Based on this recommendation requirement, the first ranking rule is determined to be sorting by first matching degree from low to high. When filtering the first items in the first item sequence in a forward-to-back order to obtain the final second item sequence, the first item ranked first in the first item sequence can be used as the first second item. Furthermore, when filtering the first items in the first item sequence, we can start from the second first item and determine whether the similarity between the current first item and the existing second items is less than a similarity threshold. Through orderly judgment, we obtain first items that are related to the user to be recommended but have a low first matching degree and low similarity to each other as second items. This results in diverse second items, reduces the impact of information cocoons, and explores the potential needs of the user to be recommended, thereby improving the user experience.
[0040] In this embodiment, after obtaining an ordered sequence of first products based on the matching degree between the first product and the user to be recommended, the first products in the first product sequence can be filtered in order from front to back based on the similarity between the first products in the first product sequence. The filtered first products with a similarity less than the similarity threshold with other first products are used as the second products to obtain the second product sequence, thereby improving the diversity of the second products for subsequent fine ranking and thus improving the diversity of product recommendations.
[0041] S104. Based on the second matching degree between different second products and the users to be recommended in the second product sequence and the set second sorting rules, sort the second products in the second product sequence, and determine the products to be recommended based on the sorted second product sequence.
[0042] It should be noted that the second sorting rule and the first sorting rule can be the same sorting rule or different sorting rules.
[0043] In this embodiment, the second sorting rule may be to sort according to the second matching degree from high to low, so as to determine the multiple second products with the highest second matching degree with the user to be recommended as the recommended products for product recommendation. In other embodiments, the second sorting rule may also be to sort according to the second matching degree from low to high.
[0044] Optionally, the second matching degree can reflect the degree of interest of the user to be recommended in the corresponding second product, or it can reflect the degree of matching between the corresponding second product and demand information (such as shopping demand and recommendation demand, or one or more demand information). The specific setting can be determined according to the actual application requirements.
[0045] It is important to note that shopping demand is typically used to reflect the current shopping needs of the user to be recommended (i.e., the user's current shopping intent). It is highly real-time and is usually determined based on the products corresponding to the user's real-time behavior (such as searching, adding to cart, and clicking). Recommendation demand, on the other hand, is typically used to reflect the needs of the user to be recommended or the e-commerce platform for product recommendations. It is usually determined based on the user's shopping behavior and preferences, or the operational or marketing needs of the e-commerce platform.
[0046] In this embodiment, the methods for obtaining the first matching degree between the user to be recommended and the first product, and the methods for obtaining the second matching degree between the user to be recommended and the second product are different, so as to obtain the second matching degree between the user to be recommended and the second product through a more accurate algorithm in the second sorting stage, thereby improving the accuracy of the final recommended products.
[0047] It should be understood that when determining the products to be recommended based on the sorted second product sequence, the corresponding number of second products can usually be selected from the second product sequence as the products to be recommended based on the set target quantity (e.g., 20).
[0048] In some embodiments, after obtaining the sorted second product sequence, the sorted second product sequence can be filtered, such as by inventory filtering, to avoid recommending out-of-stock products to the user and to ensure user experience.
[0049] In this embodiment, since the similarity between any second product and other second products in the obtained second product sequence is less than the similarity threshold, that is, when filtering the first products in the first product sequence in the order from front to back, the first products with a similarity less than the similarity threshold with the first products ranked first can be filtered out as second products. This ensures that the similarity between any second product and other second products is less than the similarity threshold. Therefore, a second product sequence with diverse second products can be obtained. Furthermore, for the second product sequence with diversity, the second products in the second product sequence are sorted more accurately according to the second matching degree and the second sorting rule between different second products and the users to be recommended. The products to be recommended are determined according to the sorted second product sequence, which can improve the diversity and accuracy of the final products to be recommended. At the same time, the diversity and efficiency of product recommendation are balanced by double sorting and filtering before fine sorting.
[0050] In some embodiments, prior to step S102 described above, the method further includes: Using a predefined first algorithm, based on the first product information corresponding to the first product and the first user information of the user to be recommended, the first matching degree corresponding to different first products is obtained. The first product information includes the business format, brand and category corresponding to the first product. The first user information is used to reflect the first historical products corresponding to the first user behavior of the user to be recommended and the business format, brand and category corresponding to the first historical products.
[0051] In this embodiment of the application, the e-commerce platform can classify the business formats according to the operating mode of the store corresponding to the product. That is, the business format corresponding to the product is determined according to the operating mode of the store corresponding to the product, such as the e-commerce business format corresponding to ordinary e-commerce products, and the department store business format corresponding to products with offline shopping mall counters.
[0052] In this embodiment, due to user consumption habits, users who prefer department store goods are more likely to continue consuming department store goods than those in other formats, and are also more likely to consume goods from the same brand. Therefore, in this embodiment, the first product information corresponding to the first product may include the product identifier of the first product and the corresponding format, brand, and category. In other embodiments, the first product information may also include, but is not limited to, product identifier, type, name, title, price, category, specifications, and inventory status.
[0053] In this embodiment, the first user behavior may include purchasing behavior, and the first user information may include the product identifier of the first historical product corresponding to the first user behavior of the user to be recommended, as well as the business format, brand, and category corresponding to the first historical product. This allows for a more accurate calculation of the first matching degree between the user to be recommended and the first product based on the business format corresponding to the first historical product purchased by the user to be recommended and the business format, brand, and category corresponding to the first product. Accordingly, the first matching degree can be used to reflect the probability that the user to be recommended will purchase the corresponding first product.
[0054] In other embodiments, the first user action may include, but is not limited to, actions such as searching, clicking, adding to cart, and adding to favorites.
[0055] In some embodiments, the first user information may include the product identifier of the first historical product corresponding to the first user behavior, and the number of purchases corresponding to the historical business format. Here, the historical business format refers to the business format corresponding to the product in the first user behavior. It should be understood that the historical business format reflects the number of times the product corresponding to that historical business format has been purchased. By statistically analyzing the number of times the user to be recommended purchases products in different business formats, the first matching degree between the user to be recommended and the first product can be calculated more quickly and accurately.
[0056] In other embodiments, the first product information may include the business format, brand, and classification information of the first product; the first user information may include the business format, brand, and classification information of the first historical product. The classification information, arranged from smallest to largest granularity, may include type, category, and subcategory. That is, the subcategory in the first product information and the first user information can be replaced with coarser-grained classification information such as category or type, as needed. The specific granularity of the classification information in the first product information and the first user information can be determined based on the usage frequency of the corresponding product (e.g., the usage frequency of pet health products, pet food, etc.) or the application scenario corresponding to the corresponding product.
[0057] For example, the granularity of classification information can be determined based on one or more of the following data: the personalized needs of the users to be recommended (reflecting the specific interests and preferences of the users to be recommended), the diversity goals of product recommendations (reflecting the diverse requirements of the users to be recommended for products, such as category diversity requirements or product category diversity requirements), and the recommendation scenario.
[0058] In other embodiments, the first user information may also include product information such as the price, title, specifications, and application scenarios of the first historical product.
[0059] In some embodiments, the first user information may further include the attribute information of the user to be recommended, which may include, but is not limited to, user ID, age, gender, spending power, and location.
[0060] Optionally, the first algorithm may include, but is not limited to, algorithms based on vector distance (such as cosine similarity algorithm or squared distance algorithm), algorithms based on set overlap (such as Jaccard similarity coefficient), and algorithms based on machine learning (such as deep learning model or graph neural network), etc. The specific algorithm can be set according to the actual application requirements.
[0061] In some embodiments, the first algorithm may be a machine learning-based algorithm (let's call it the first model). When obtaining the first matching degree corresponding to different first products, the first product information and the first user information may be used as inputs to a trained first model. The first model analyzes the matching degree between the user to be recommended and the first product based on the first product information and the first user information, obtains the first matching degree, and outputs it.
[0062] Optionally, the first model can be a dual-tower model, which processes the first user information and the first product information separately through two independent towers (i.e., two independent networks). Then, based on the user feature vector and product feature vector output by the two towers, the first matching degree corresponding to the first product is analyzed and output. By using two towers to independently and focusedly extract feature information from their respective input data, the efficiency and accuracy of feature extraction can be balanced, helping to improve the accuracy of subsequent analysis.
[0063] In some embodiments, the e-commerce platform can obtain recent event tracking data (such as event tracking data from the past three months), and based on the obtained event tracking data, obtain the first user information of a sample user and the first product information corresponding to a sample product (such as the product clicked by the sample user, the product that was not clicked after being exposed, or any product, etc.), construct a sample and set the label of the sample (to reflect the true matching degree between the sample user and the sample product), thereby obtaining multiple samples.
[0064] After obtaining multiple samples, they can be divided into training samples and test samples according to a certain ratio (such as 80% and 20%). Then, the training samples are used to train the first model, and the test samples are used to evaluate the accuracy and other performance of the trained first model.
[0065] It should be understood that the training process of the first model is the process of fitting the first matching degree between the sample user and the sample product, predicted by the first model based on the input first user information and first product information, and the corresponding sample label value (i.e., the true matching degree). In this embodiment, the loss function of the first model can be defined as the mean of the binomial cross-entropy of each sample. During training, the loss function is minimized so that the first matching degree predicted by the first model based on the input sample fits the corresponding true matching degree better and better. At the same time, the model parameters that maximize the evaluation index (such as the accuracy index) in the test sample are selected to obtain the optimal parameters of the first model. Through the above training process, the fitting effect of the first model can be ensured, and its performance can be evaluated through test samples so that the best-performing first model can be selected as the trained first model for calculating the first matching degree corresponding to the first product in the product recommendation process.
[0066] In this embodiment, based on the business format, brand, and category corresponding to the first product, and the first historical products and their corresponding business formats, brands, and categories corresponding to the first user behavior of the user to be recommended, a first matching degree between the first product and the user to be recommended is calculated. By using these three dimensions—business format, brand, and category—the probability of the user to be recommended purchasing the first product can be measured more accurately, resulting in a more accurate first matching degree. Furthermore, through the above processing, products with a low probability of purchase can be quickly filtered out in the coarse-sorting stage, improving response efficiency and reducing subsequent computational load.
[0067] In some embodiments, prior to step S104 described above, the method further includes: The second algorithm is adopted to obtain the second matching degree corresponding to different second products based on the second product information corresponding to the second product and the second user information of the user to be recommended. The second product information includes the business type corresponding to the second product, and the second user information is used to reflect at least one of the number of clicks and the number of purchases made by the user to be recommended on the target product. The target product is a product that meets at least one of the business type, brand and category corresponding to the second product. The complexity of the second algorithm is higher than that of the first algorithm.
[0068] In some embodiments, the second product information may also include, but is not limited to, product identification, price, brand, application scenario, and classification information.
[0069] In this embodiment of the application, the second user information may include at least one of the number of clicks and the number of purchases made by the user to be recommended on the target product. The target product may be a product that meets at least one of the three conditions of business format, brand and category corresponding to the current second product.
[0070] For example, suppose the target products include products from the same business format as the current second product and products from the same brand. Suppose the second user information includes click counts and purchase counts. Also suppose the business format for the second product is 'a', the brand is 'b', and the category is 'c'. Then, the product from business format 'a' and the product from brand 'b' can be selected as target products. Based on the user's historical click and purchase behavior data, the historical click and purchase counts of the user to be recommended for products from business format 'a' and products from brand 'b' can be calculated to obtain the required second user information.
[0071] In other embodiments, the second user information may further include the product information of the second historical products corresponding to the online second user behavior and offline purchase behavior of the user to be recommended. The second user behavior may include, but is not limited to, actions such as searching, clicking, adding to cart, purchasing, and favoriting. The product information of the second historical products in the second user information may include, but is not limited to, product identification, price, brand, business format, application scenario, and category information. By comprehensively reflecting the products preferred by the user to be recommended through various online user behaviors and various product information of the second historical products corresponding to offline purchase behavior, the second matching degree between the second product and the user to be recommended can be calculated more accurately in the second sorting stage, thus improving the accuracy of the final recommended products.
[0072] In some embodiments, the first user information may further include the attribute information of the user to be recommended, which may include, but is not limited to, user ID, age, gender, spending power, and location.
[0073] It should be noted that in the embodiments of this application, the first algorithm and the second algorithm are different algorithms. The second algorithm is an algorithm with higher complexity than the first algorithm, which improves the accuracy of the second matching degree calculated in the second sorting stage through a more complex and accurate second algorithm, thereby improving the accuracy of the final product recommendation. The aforementioned complexity may include at least one of time complexity and space complexity.
[0074] In other embodiments, the second algorithm may also be an algorithm with higher complexity and accuracy than the first algorithm.
[0075] In this embodiment of the application, the second algorithm can be a click-through rate prediction algorithm (such as Deep Factorization Machine, etc.).
[0076] In other embodiments, the second algorithm may include, but is not limited to, automatic feature interaction networks, feature importance and bilinear interaction networks, attention factor decomposition machines, and other models or algorithms.
[0077] In some embodiments, the second algorithm can be a deep learning-based algorithm (let's call it the second model). When obtaining the second matching degree corresponding to different second products, the second product information and the second user information of the user to be recommended can be directly input into the second model. The second model analyzes the matching degree between the user to be recommended and the second product based on the second product information and the second user information, obtains the second matching degree, and outputs it. It should be understood that the training process of the second model can refer to the training process of the first model described above, and will not be repeated here.
[0078] In this embodiment, at least one of the number of clicks and purchases by the user to be recommended on the target product is obtained to obtain second user information. The target product includes products in at least one of the business format, brand, and category corresponding to the current second product. Therefore, the second user information can more comprehensively reflect products that are similar to the current second product in one or more aspects among the products that the user to be recommended has historically clicked or purchased. Furthermore, in the second sorting stage, the second matching degree is calculated based on the second product information and the second user information corresponding to the second product, which can improve the accuracy of the second matching degree, thereby improving the accuracy of the final recommended product.
[0079] In some embodiments, step S103 includes: Determine an initialized second product sequence, wherein the initialized second product sequence includes at least one second product; Starting from the first first product in the first product sequence, determine whether the similarity between the current first product and the target second product is less than the above similarity threshold. The target second product is the second product in the current second product sequence. If the similarity between the current first product and the target second product is less than the similarity threshold, the current first product is added as the second product to the second product sequence, the next first product is used as the current first product, and the process returns to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold. If the similarity between the current first product and the target second product is greater than or equal to the similarity threshold, the next first product is taken as the current first product, and the process returns to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold.
[0080] It should be noted that when determining the initial second product sequence, the second products included in the initial second product sequence can be determined based on the first product sequence, or based on the input or settings of the user to be recommended, or based on demand information (such as the shopping needs of the user to be recommended and / or the recommendation needs of the e-commerce platform, etc.). This application embodiment does not impose specific limitations on this.
[0081] As an example, the user's most recently added item to their cart can be used as the second item in the initial second item sequence. Based on this initial second item sequence, when filtering the first items in the first item sequence in a forward-to-back manner, the system can select items from the user's associated first items that have a similarity threshold less than the most recently added item as new second items. This ordered filtering process then refines the selection of second items that are associated with the user but offer greater diversity than their most recently added item, thereby increasing the diversity of the final recommended products.
[0082] As another example, the first item in the first item sequence can be directly used as the first second item in the initialized second item sequence.
[0083] As another example, based on the e-commerce platform's recommendation needs (such as marketing objectives), a product that should be prioritized for recommendation can be determined and used as the second product in the initial second product sequence. Similarly, the product most recently added to the user's shopping cart can also be used as the second product in the initial second product sequence. If the similarity between the product to be prioritized and the most recently added product is greater than or equal to a threshold, either the most recently added product or the product to be prioritized can be removed based on the requirements.
[0084] See Figure 2 After obtaining the initialized second product sequence, it is necessary to start from the first first product in the first product sequence and take it as the current first product in the order from front to back. Then, it is necessary to determine whether the similarity between the current first product and the second product in the current second product sequence (i.e. the target second product) is less than the similarity threshold (e.g., 0.6).
[0085] If the similarity between the current first product and the target second product is less than the similarity threshold, the current first product can be added as the second product to the second product sequence. At this time, the number of second products in the second product sequence is incremented by 1; the next first product is then added as the current first product, and the process returns to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold.
[0086] It should be noted that when there are multiple target second products, the current first product should be added as a second product to the second product sequence only if the similarity between the current first product and each target second product is less than the similarity threshold, so as to ensure the diversity of second products in the second product sequence.
[0087] If the similarity between the current first product and the target second product is greater than or equal to the similarity threshold, then the first product needs to be filtered out, and the next first product is directly used as the current first product. The process then returns to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold. This continues until all first products in the first product sequence have been evaluated (i.e., there is no next first product), resulting in the final second product sequence.
[0088] In this embodiment, an initialized second product sequence is first obtained according to the requirements. Then, based on the second products contained in the initialized second product sequence, the ordered first product sequence is filtered in a forward-backward order, and the second product sequence is updated in real time, so that the obtained second product sequence includes second products that meet the requirements and has diversity.
[0089] In some embodiments, before determining whether the similarity between the current first product and the target second product is less than the similarity threshold, the method further includes: Obtain the hash value corresponding to the current first product and the Hamming distance between the hash value corresponding to the target second product to obtain the similarity between the current first product and the target second product. The hash value is determined based on multiple keywords corresponding to the corresponding product and the weighting coefficients corresponding to different keywords.
[0090] A hash value is typically a fixed-length output value obtained by processing input data using a hash function.
[0091] It should be noted that the multiple keywords corresponding to a product can be determined based on user input or settings, or based on demand information such as recommendation needs or shopping needs; the weighting coefficients corresponding to different keywords can also be determined based on user input or settings, or based on demand information such as recommendation needs or shopping needs, or based on the TF-IDF value (Term Frequency-Inverse Document Frequency) of the keywords. The specific settings can be made according to the actual application requirements.
[0092] In some embodiments, the multiple keywords corresponding to a product may include keywords obtained by segmenting the product's title or name. In other embodiments, the multiple keywords corresponding to a product may include the business type and brand corresponding to the product. Furthermore, they may also include the name and application scenarios, etc.
[0093] As an example, the multiple keywords corresponding to a product include business type, application scenario, and keywords obtained from word segmentation of the product's name or title. When obtaining the weighted coefficients for each keyword corresponding to the first product, the weighted coefficients can be obtained based on the stored mapping relationship between keywords and weighted coefficients. Similarly, obtaining the weighted coefficients for each keyword corresponding to the target second product is also based on the above mapping relationship.
[0094] It is important to note that because the composition of different product names or titles may vary, the keywords obtained from word segmentation will differ. When obtaining hash values based on multiple keywords and their weighted coefficients for a given product, the sum of the weighted coefficients for each keyword may not be 1. This leads to incomparability between hash values for different products, affecting the accuracy of the similarity score. Therefore, to ensure the accuracy of hash value calculation and thus the accuracy of the similarity score, the weighted coefficients for the multiple keywords corresponding to the first product can be normalized to a sum of 1; similarly, the weighted coefficients for the multiple keywords corresponding to the target second product can be normalized to a sum of 1. These processes ensure the comparability of the hash values for the first and target second products.
[0095] When setting the mapping relationship between keywords and weighting coefficients, it is considered that the names of different products usually include brands, so that multiple keywords usually include brands. E-commerce platforms' recommendation requirements indicate that they should avoid recommending too many products of the same brand in product recommendations. Therefore, a higher weighting coefficient can be set for the keyword "brand" so that when calculating the similarity based on the hash value calculated from the keyword and the corresponding weighting coefficient, the influence of the keyword "brand" on the similarity calculation can be increased.
[0096] Optionally, when obtaining the hash value corresponding to a product (including the first product and the target second product), one can first obtain the hash values corresponding to different keywords, and then perform a weighted calculation based on the hash values corresponding to different keywords and a weighting coefficient to obtain the hash value corresponding to the product. Alternatively, one can first perform a weighted calculation based on different keywords and their corresponding weighting coefficients to obtain weighted keywords, and then obtain the hash value corresponding to the product based on the different weighted keywords. The specific settings can be configured according to the actual application requirements.
[0097] In this embodiment, when obtaining the similarity between the current first product and the target second product based on the hash value corresponding to the current first product (let's call it the first hash value) and the hash value corresponding to the target second product (let's call it the second hash value), the Hamming distance between the first hash value and the second hash value can be calculated as their corresponding similarity. Since hash values are usually fixed-length binary strings, and the Hamming distance can provide a consistent similarity measure, the Hamming distance can accurately detect minute differences between the first hash value and the second hash value, obtaining a highly accurate similarity. Furthermore, the calculation is simple, has low time complexity, and can quickly and accurately filter the first product.
[0098] In other embodiments, the similarity between the first product and the target second product can also be obtained by calculating the Manhattan distance, cosine distance, or edit distance between the first hash value and the second hash value.
[0099] In some embodiments, the e-commerce platform can pre-generate hash values corresponding to different products, and then send the hash values to a cloud server, so that the cloud server associates and stores the product identifier corresponding to the product with the hash value. When recommending products, to reduce the computing power requirements of the e-commerce platform, the cloud server can execute the steps of the product recommendation method provided in this application embodiment, or execute the step of filtering the first product in the first product sequence in a forward-to-back order, up to obtaining the second product sequence based on the second product. Since the cloud server directly stores the hash values corresponding to the products, it can directly obtain the hash values for similarity calculation. Therefore, it can perform calculations using a high-computing-power cloud server, reducing the computing power requirements of the e-commerce platform and improving computational efficiency while protecting the data privacy and security of the e-commerce platform.
[0100] In this embodiment, because hash algorithms have characteristics such as collision resistance and avalanche effect, they are very sensitive to input data. Different data correspond to basically different hash values. Therefore, the hash value corresponding to the first product is obtained based on multiple keywords corresponding to the first product and the weighting coefficients corresponding to different keywords. The hash value corresponding to the target second product is also obtained based on multiple keywords corresponding to the target second product and the weighting coefficients corresponding to different keywords. The similarity between the first product and the target second product is calculated based on the two hash values. This can more accurately measure whether the first product and the target second product are the same or similar, thereby filtering the first product more accurately, improving the accuracy of the first product filtering, and thus improving the diversity of the second product in the obtained second product sequence.
[0101] In some embodiments, obtaining multiple keywords corresponding to different products to be processed and weighting coefficients corresponding to different keywords includes: Based on the diversity objective, multiple keywords corresponding to the different products to be processed are obtained, as well as the weighting coefficients corresponding to the different keywords. The diversity objective is used to reflect the diversity requirements of products when recommending products to the users to be recommended.
[0102] Optionally, diversity requirements may include, but are not limited to, brand diversity, classification diversity (such as type diversity, category diversity, or product category diversity), application scenario diversity, price diversity, business format diversity, style diversity, size diversity, and service diversity (such as delivery time, recycling services, and value-added services).
[0103] As an example, diversity objectives can include brand diversity, business format diversity, and application scenario diversity. Accordingly, when obtaining multiple keywords corresponding to different products to be processed based on diversity objectives, three keywords—matching criteria, business format, and application scenario—can be obtained for the products to be processed.
[0104] Furthermore, diversity targets can also reflect the importance of different diversity requirements (which can also be regarded as priorities), so as to quickly and accurately obtain the weighting coefficients corresponding to different keywords based on the importance of different diversity requirements.
[0105] For example, the importance of different diversity requirements in the diversity objective, from highest to lowest, includes: application scenario diversity, brand diversity, and business format diversity. That is, when recommending products, application scenario diversity is prioritized, followed by brand diversity, and business format diversity is considered last. Therefore, when obtaining the weighting coefficients for different keywords, the highest weighting coefficient is typically set for application scenario keywords, a moderate weighting coefficient for brand keywords, and a smaller weighting coefficient for business format keywords. For example, application scenario diversity, brand diversity, and business format diversity are set to 0.5, 0.35, and 0.15, respectively.
[0106] It should be noted that diversity targets can be determined based on user settings or input, or by the e-commerce platform based on recommendation needs, or by the e-commerce platform based on feedback data from users to be recommended on historically recommended products (reflecting user evaluations or suggestions for improvement on the diversity of historically recommended products, etc.). The specific target can be set according to the actual application needs.
[0107] In this embodiment, based on the diversity requirements when recommending products to users, the system obtains multiple keywords and weighted coefficients corresponding to different keywords for the products to be processed, namely the first product and the target second product. This allows for a more accurate calculation of the similarity between the first product and the target second product, taking into full account the influence of different keywords. This improves the accuracy of filtering the first product, ensures that the diversity of the filtered second products meets the diversity requirements, and enhances the product recommendation effect and user experience.
[0108] In some embodiments, before obtaining the similarity between the current first product and the target second product based on the hash value corresponding to the current first product and the hash value corresponding to the target second product, the method further includes: Obtain multiple keywords corresponding to different products to be processed and the weighting coefficients corresponding to different keywords. The products to be processed include the current first product and the target second product.
[0109] For any of the above-mentioned products to be processed, determine the hash values corresponding to different keywords, and perform a weighted operation based on the hash values corresponding to different keywords and the above-mentioned weighting coefficients to obtain the hash value corresponding to the above-mentioned products to be processed.
[0110] In this embodiment, to improve the local sensitivity of the obtained hash values, thereby making the hash values corresponding to products with similar keywords closer together, for multiple keywords corresponding to any product to be processed, the hash values corresponding to different keywords can be obtained first. This ensures that when there are the same keywords among the multiple keywords corresponding to different products to be processed, the same hash value can be generated for the same keyword. Then, for any product to be processed, a weighted calculation is performed based on the hash values corresponding to different keywords among its multiple keywords and the weighting coefficient to obtain the hash value corresponding to the product to be processed. This reduces the local sensitivity of keywords by directly performing a weighted calculation based on keywords and their corresponding weighting coefficients and then obtaining the corresponding hash value, thus ensuring the accuracy of similarity calculation.
[0111] In some embodiments, when obtaining hash values corresponding to different keywords through a hash algorithm, semantic hashing or semantic alignment processing can be used to obtain hash values corresponding to different keywords. This allows for the acquisition of the same or similar hash values for the same keywords among multiple keywords corresponding to different products to be processed, through semantic mapping. This reduces the impact of keywords with different textual expressions but essentially the same meaning when calculating the similarity degree based on the obtained hash values corresponding to the products to be processed, thereby improving the accuracy of similarity degree calculation.
[0112] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0113] Example 2: Corresponding to the product recommendation method described in the above embodiments, Figure 3 A structural block diagram of the product recommendation device provided in the embodiments of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.
[0114] Reference Figure 3 The device includes: a recall module 310, a first sorting module 320, a filtering module 330, and a second sorting module 340. Among them, The recall module 310 is used to obtain multiple first products corresponding to the users to be recommended based on the set recall strategy.
[0115] The first sorting module 320 is used to sort the multiple first products according to the first matching degree between different first products and the users to be recommended and the set first sorting rules, so as to obtain a first product sequence.
[0116] The filtering module 330 is used to filter the first product in the first product sequence, take the filtered first product as the second product, and obtain the second product sequence based on the second product, wherein the similarity between any second product and other second products is less than a set similarity threshold.
[0117] The second sorting module 340 is used to sort the second products in the second product sequence in a forward order, according to the second matching degree between different second products and the users to be recommended and the set second sorting rules, and to determine the products to be recommended based on the sorted second product sequence.
[0118] In this embodiment, since the similarity between any second product and other second products in the obtained second product sequence is less than the similarity threshold, that is, when filtering the first products in the first product sequence in the order from front to back, the first products with a similarity less than the similarity threshold with the first products ranked first can be filtered out as second products. This ensures that the similarity between any second product and other second products is less than the similarity threshold. Therefore, a second product sequence with diverse second products can be obtained. Furthermore, based on the second matching degree and the second ranking rule between different second products and the user to be recommended in the diverse second product sequence, the second products in the second product sequence are ranked more accurately. The products to be recommended are determined based on the ranked second product sequence, which can improve the diversity and accuracy of the final products to be recommended. At the same time, the diversity and efficiency of product recommendation are balanced by double ranking and filtering before fine ranking.
[0119] In some embodiments, the filtering module 330 includes: An initialization unit is used to determine an initialized second product sequence, wherein the initialized second product sequence includes at least one second product.
[0120] The judgment unit is used to determine, starting from the first first product in the first product sequence, whether the similarity between the current first product and the target second product is less than the similarity threshold, wherein the target second product is the second product in the current second product sequence.
[0121] The first loop unit is used to add the current first product as the second product to the second product sequence, and to take the next first product as the current first product, when the similarity between the current first product and the target second product is less than the similarity threshold. Then, it returns to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold.
[0122] The second loop unit is used to, if the similarity between the current first product and the target second product is greater than or equal to the similarity threshold, take the next first product as the current first product and return to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold.
[0123] In some embodiments, the filtering module 330 further includes: The similarity calculation unit is used to obtain the Hamming distance between the hash value corresponding to the current first product and the hash value corresponding to the target second product, and to obtain the similarity between the current first product and the target second product. The hash value is determined based on multiple keywords corresponding to the corresponding product and the weighting coefficients corresponding to different keywords.
[0124] In some embodiments, the filtering module 330 further includes: The first acquisition unit is used to acquire multiple keywords corresponding to different products to be processed and weighting coefficients corresponding to different keywords. The products to be processed include the current first product and the target second product.
[0125] The hash value calculation unit is used to determine the hash value corresponding to different keywords for any of the above-mentioned products to be processed, and to perform a weighted operation based on the hash value corresponding to different keywords and the above-mentioned weighting coefficient to obtain the hash value corresponding to the above-mentioned products to be processed.
[0126] In some embodiments, the filtering module 330 further includes: The second acquisition unit is used to acquire multiple keywords corresponding to the different products to be processed, as well as the weighting coefficients corresponding to the different keywords, according to the diversity objective. The diversity objective is used to reflect the diversity requirements of products when recommending products to the users to be recommended.
[0127] In some embodiments, the product recommendation device further includes: The first matching degree acquisition module is used to obtain the first matching degree corresponding to different first products by using a set first algorithm, based on the first product information corresponding to the first product and the first user information of the user to be recommended. The first product information includes the business format, brand and category corresponding to the first product, and the first user information is used to reflect the first historical products corresponding to the first user behavior of the user to be recommended and the business format, brand and category corresponding to the first historical products.
[0128] In some embodiments, the product recommendation device further includes: The second matching degree acquisition module is used to obtain the second matching degree corresponding to different second products by using a set second algorithm, based on the second product information corresponding to the second product and the second user information of the user to be recommended. The second product information includes the business type corresponding to the second product, and the second user information is used to reflect at least one of the number of clicks and the number of purchases made by the user to be recommended for the target product. The target product is a product that meets at least one of the business type, brand and category corresponding to the second product. The complexity of the second algorithm is higher than that of the first algorithm.
[0129] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.
[0130] Example 3: Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 4 As shown, the electronic device 4 of this embodiment includes: at least one processor 40 ( Figure 4 The diagram shows only one processor, a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, which, when executing the computer program 42, performs the steps in any of the above method embodiments.
[0131] The electronic device 4 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. This electronic device may include, but is not limited to, a processor 40 and a memory 41. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 4 and does not constitute a limitation on electronic device 4. It may include more or fewer components than shown, or combine certain components, or different components. For example, it may also include input / output devices, network access devices, etc.
[0132] The processor 40 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0133] In some embodiments, the memory 41 may be an internal storage unit of the electronic device 4, such as a hard disk or memory of the electronic device 4. In other embodiments, the memory 41 may be an external storage device of the electronic device 4, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 4. Furthermore, the memory 41 may include both internal and external storage units of the electronic device 4. The memory 41 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 41 can also be used to temporarily store data that has been output or will be output.
[0134] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0135] This application also provides a network device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.
[0136] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the steps in the above-described method embodiments.
[0137] This application provides a computer program product that, when run on an electronic device, enables the electronic device to implement the steps described in the various method embodiments above.
[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographic device / electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.
[0139] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0140] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0141] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0142] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0143] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A product recommendation method, characterized in that, include: Based on the set recall strategy, obtain multiple first products corresponding to the users to be recommended; Based on the first matching degree between different first products and the user to be recommended, and the set first sorting rule, the multiple first products are sorted to obtain a first product sequence; The first product in the first product sequence is filtered in the order from front to back. The filtered first product is used as the second product. The second product sequence is obtained based on the second product. The similarity between any second product and other second products is less than the set similarity threshold. Based on the second matching degree between different second products and the user to be recommended in the second product sequence and the set second sorting rule, the second products in the second product sequence are sorted, and the products to be recommended are determined based on the sorted second product sequence.
2. The product recommendation method as described in claim 1, characterized in that, The step of filtering the first product in the first product sequence in a forward-to-back order, using the filtered first product as the second product, and obtaining the second product sequence based on the second product includes: Determine an initial second product sequence, the initial second product sequence comprising at least one second product; Starting from the first first product in the first product sequence, determine whether the similarity between the current first product and the target second product is less than the similarity threshold, wherein the target second product is the second product in the current second product sequence; If the similarity between the current first product and the target second product is less than the similarity threshold, the current first product is added as the second product to the second product sequence, the next first product is used as the current first product, and the process returns to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold. If the similarity between the current first product and the target second product is greater than or equal to the similarity threshold, the next first product is taken as the current first product, and the process returns to the step of determining whether the similarity between the current first product and the target second product is less than the similarity threshold.
3. The product recommendation method as described in claim 2, characterized in that, Before determining whether the similarity between the current first product and the target second product is less than the similarity threshold, the method further includes: Obtain the hash value corresponding to the current first product and the Hamming distance between the hash value corresponding to the target second product to obtain the similarity between the current first product and the target second product. The hash value is determined based on multiple keywords corresponding to the corresponding product and the weighting coefficients corresponding to different keywords.
4. The product recommendation method as described in claim 3, characterized in that, Before obtaining the Hamming distance between the hash value corresponding to the current first product and the hash value corresponding to the target second product, and thus determining the similarity between the current first product and the target second product, the method further includes: Obtain multiple keywords corresponding to different products to be processed and weighting coefficients corresponding to different keywords, wherein the products to be processed include the current first product and the target second product; For any of the multiple keywords corresponding to the product to be processed, determine the hash value corresponding to different keywords, and perform a weighted operation based on the hash value corresponding to different keywords and the weighting coefficient to obtain the hash value corresponding to the product to be processed.
5. The product recommendation method as described in claim 4, characterized in that, The process of obtaining multiple keywords corresponding to different products to be processed and the weighting coefficients corresponding to different keywords includes: Based on the diversity objective, multiple keywords corresponding to the different products to be processed are obtained, as well as weighting coefficients corresponding to the different keywords. The diversity objective is used to reflect the diversity requirements of products when recommending products to the users to be recommended.
6. The product recommendation method according to any one of claims 1 to 5, characterized in that, Before sorting the plurality of first products according to the first matching degree between different first products and the user to be recommended and the set first sorting rule to obtain the first product sequence, the method further includes: Using a predefined first algorithm, based on the first product information corresponding to the first product and the first user information of the user to be recommended, a first matching degree is obtained for different first products. The first product information includes the business format, brand, and category corresponding to the first product. The first user information is used to reflect the first historical products corresponding to the first user behavior of the user to be recommended, as well as the business format, brand, and category corresponding to the first historical products.
7. The product recommendation method as described in claim 6, characterized in that, Before sorting the second products in the second product sequence according to the second matching degree between different second products and the user to be recommended and the set second sorting rule, the method further includes: The second algorithm is adopted to obtain the second matching degree corresponding to different second products based on the second product information corresponding to the second product and the second user information of the user to be recommended. The second product information includes the business type corresponding to the second product, and the second user information is used to reflect at least one of the number of clicks and the number of purchases made by the user to be recommended on the target product. The target product is a product that meets at least one of the business type, brand and category corresponding to the second product. The complexity of the second algorithm is higher than that of the first algorithm.
8. A product recommendation device, characterized in that, include: The recall module is used to retrieve multiple first-order products corresponding to the users to be recommended, based on the set recall strategy. The first sorting module is used to sort the plurality of first products according to the first matching degree between different first products and the user to be recommended and the set first sorting rules to obtain a first product sequence; The filtering module is used to filter the first product in the first product sequence, take the filtered first product as the second product, and obtain the second product sequence based on the second product, wherein the similarity between any second product and other second products is less than a set similarity threshold. The second sorting module is used to sort the second products in the second product sequence in a forward order, according to the second matching degree between different second products and the user to be recommended, and the set second sorting rules, and to determine the product to be recommended based on the sorted second product sequence.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Point of Interest data processing method and device, electronic equipment and storage medium
CN109710709A
Method and system for improving commodity recommendation diversity
CN110910207A
Personalized search method and device, computer equipment and storage medium
CN114579843A
Article recommendation method, system and device, medium and program product
CN118260472A
Music recommendation method and device
CN118916512A