Diversity recommendation optimization method fusing inventory information
By integrating the diversity recommendation optimization method of inventory information in the recommendation system, combining popularity, type and inventory constraints, the recommendation list is optimized, which solves the problem of out-of-stock in the existing recommendation system and improves the accuracy of recommendations and user satisfaction.
Patent Information
- Application Number
- CN202411742675.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-29
AI Technical Summary
When existing recommendation systems are subject to inventory constraints, they usually do not consider inventory information, which may lead to out-of-stock products and affect consumers' shopping experience.
A diversity recommendation optimization method is proposed to integrate inventory information. By constructing a diversity product recommendation model, combining popularity constraints, type constraints and inventory constraints, we re-maximize product prediction scores and optimize the top-k list recommended to users.
It improves the accuracy of recommendations and user satisfaction, reduces the phenomenon of recommending out-of-stock products, and ensures that the recommended products are in stock for purchase.
Smart Images

Figure QLYQS_8 
Figure QLYQS_39 
Figure QLYQS_40
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of information recommendation, and in particular to a product recommendation method integrating the diversity of inventory information. Background Art
[0002] Current recommendation systems are mostly focused on improving the accuracy of personalized recommendations. In recommendations with inventory constraints, the amount of inventory determines how many customers can get quality-assured service recommendations. Existing recommendation methods usually do not consider inventory information or assume that the inventory is infinite, which may cause the recommended products to be out of stock, seriously affecting consumers' shopping experience. Summary of the invention
[0003] In order to overcome the shortcomings of the prior art, the present invention proposes a diversity recommendation optimization method that integrates inventory information, in order to utilize the popularity constraints, inventory constraints and type constraints of commodities to re-maximize the predicted scores of commodities, optimize the top-k list recommended to users, thereby improving the accuracy of recommendations and user satisfaction.
[0004] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:
[0005] The diversity recommendation optimization method integrating inventory information of the present invention is characterized in that it is performed according to the following steps:
[0006] Step 1: Define user collection , product collection ;in, represents the mth user, Indicates the nth item. The inventory is recorded as ∈ , represents the inventory set; M represents the total number of users, and N represents the total number of products;
[0007] Get user-product rating matrix ,make The element in row m and column n Indicates the mth user For the nth product The real rating of represents a real number;
[0008] Step 2: Build and train a product recommendation model based on matrix decomposition to generate the mth user Original recommendation list of ;
[0009] Step 3: Build a diverse product recommendation model, including: objective function F and popularity constraints, type constraints, and inventory constraints;
[0010] Step 4: Use the heuristic algorithm to reconstruct the objective function F of the diversity product recommendation model to obtain the reconstructed objective function ';
[0011] Step 5: Reconstruct the objective function under popularity constraints, type constraints, and inventory constraints Solve and get the mth user The best recommended list .
[0012] The diversity recommendation optimization method integrating inventory information described in the present invention is also characterized in that step 2 is performed according to the following steps:
[0013] Step 2.1: In the interval Initialize the M×D dimension user feature matrix randomly , N×D dimensional product feature matrix ,make The element in row m and column d Indicates the mth user The d-th hidden feature of The mth row vector in Indicates the mth user The characteristic vector of The element in row n and column d Indicates the nth item The d-th hidden feature of The nth row vector in Indicates the nth item The feature vector of; D represents the dimension of the latent feature;
[0014] Step 2.2: Use formula (1) to get the mth user output by the product recommendation model For the nth item Prediction score of ;
[0015] (1)
[0016] Step 2.3: Use formula (2) to calculate the loss function L of the product recommendation model:
[0017] (2)
[0018] In formula (2), Indicates that the mth user and the nth item A user-item pair is formed. is the set of user-item pairs;
[0019] Step 2.4: Use equation (3) and equation (4) to establish the loss function L about and The gradient of
[0020] (3)
[0021] (4)
[0022] Step 2.5: Use equations (5) and (6) to establish and The update formula of
[0023] (5)
[0024] (6)
[0025] In formula (5) and formula (6), represents the update step size; Indicates the mth user The dth latent feature after update; Indicates the nth item The dth latent feature after update;
[0026] Step 2.6: Train the product recommendation model according to step 2.4 and step 2.5 until the loss function L converges, thereby obtaining a trained product recommendation model;
[0027] Step 2.7: Use the trained product recommendation model to predict the mth user The best prediction score for all products is calculated, and all products are sorted in descending order according to the best prediction score, so as to select the first k products to generate the mth user Original recommendation list of .
[0028] Further, the step 3 is performed as follows:
[0029] Step 3.1: With the goal of maximizing the average predicted score of all products, use formula (7) to construct the objective function F of the diversity product recommendation model:
[0030] (7)
[0031] In formula (7), Indicates the mth user For the nth item The best prediction score of Indicates whether to add the nth item Recommend to the mth user If recommended, then , otherwise, let 0; and ;
[0032] Step 3.2: Use formula (8) to construct the popularity constraint of the diverse product recommendation model;
[0033] (8)
[0034] In formula (8), Indicates the nth item The ratio of the number of reviews to the total number of product reviews; is the upper limit of total popularity;
[0035] Step 3.3: Use formula (9) to construct the type constraint of the diversity product recommendation model;
[0036] (9)
[0037] In formula (9), represents the set of products in category c, Represents the c-th category of goods The Items, Indicates whether the Items Recommend to the mth user ; Indicates whether to group the products in category c together Recommend the products in to the mth user If recommended, then , otherwise, let 0; and ; Indicates the total number of categories; The threshold indicating the number of categories;
[0038] Step 3.4: Use formula (10) to construct the inventory constraints of the diverse product recommendation model;
[0039] (10).
[0040] Further, step 4 is performed as follows:
[0041] Step 4.1: Use equation (11) and equation (12) to get the mth user In the past Category Items The proportion of comments And recommend it to the mth user No. Category Items The proportion ;
[0042] (11)
[0043] (12)
[0044] In formula (11) and formula (12), For the mth user A collection of rated products. express The number of items in Indicates the mth user Rated product collection Middle Items; Indicates recommendation to the mth user List of products Middle Items; and Respectively represent Category Items With Items score;
[0045] Step 4.2: Use formula (13) to get the recommendation to the mth user No. Category Items The proportion of products after adjusting weights , and then use formula (14) to get and The approximate value ;
[0046] (13)
[0047] (14)
[0048] In formula (13), represents the adjustment weight of the product ratio, and ;
[0049] Step 4.3: Use formula (15) to get the mth user Reconstructed objective function :
[0050] (15)
[0051] In formula (15), represents the adjustment weight, and .
[0052] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the diversity recommendation optimization method, and the processor is configured to execute the program stored in the memory.
[0053] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the diversity recommendation optimization method when executed by a processor.
[0054] Compared with the prior art, the present invention has the following beneficial effects:
[0055] 1. The present invention integrates commodity inventory constraints and type constraints, re-maximizes the average predicted rating of commodities by users, optimizes the final recommendation list, and improves the accuracy of recommendations and user satisfaction;
[0056] 2. The present invention effectively solves the problem of data sparsity. In the recommendation system, the ratings of users on items are usually sparse, that is, most users do not rate most items. Matrix decomposition can fill in these missing ratings through low-rank approximation, thereby improving the coverage and accuracy of recommendations.
[0057] 3. The present invention decomposes the original high-resolution user-item rating matrix into the product of a lower-dimensional user feature matrix and an item feature matrix. Matrix decomposition reduces the complexity of the model, making it more suitable for processing large-scale data sets.
[0058] 4. The present invention improves the flexibility of the recommendation method. The matrix decomposition model can be combined with other types of data (such as user context information, item content features, etc.) to further improve the quality and diversity of recommendations. DETAILED DESCRIPTION
[0059] In this embodiment, a diversity recommendation optimization method integrating inventory information comprehensively considers the constraints of inventory information on the recommendation method, generates an original recommendation list by using matrix decomposition, and then integrates the popularity constraint, inventory constraint and type constraint of the product to re-maximize the predicted score of the product, and optimizes the top-k list recommended to the user; thereby, the accuracy of the recommendation and the user's satisfaction can be improved, the model's recommendation probability for low-inventory products can be reduced, and the phenomenon of the recommendation method recommending out-of-stock products can be reduced. Specifically, the method includes the following steps:
[0060] Step 1: Define user collection , product collection ;in, represents the mth user, Indicates the nth item. The inventory is recorded as ∈ , represents the inventory set; M represents the total number of users, and N represents the total number of products;
[0061] Get user-product rating matrix ,make The element in row m and column n Indicates the mth user For the nth product The real rating of Represents a real number.
[0062] Step 2: Build and train a product recommendation model based on matrix decomposition to generate the mth user Original recommendation list of ;
[0063] Step 2.1: In the interval Initialize the M×D dimension user feature matrix randomly , N×D dimensional product feature matrix ,make The element in row m and column d Indicates the mth user The d-th hidden feature of The mth row vector in Indicates the mth user The characteristic vector of The element in row n and column d Indicates the nth item The d-th hidden feature of The nth row vector in Indicates the nth item The feature vector of ; D represents the dimension of latent features.
[0064] Step 2.2: Use formula (1) to get the mth user output by the product recommendation model For the nth item Prediction score of ;
[0065] (1)
[0066] Step 2.3: Use formula (2) to calculate the loss function L of the product recommendation model:
[0067] (2)
[0068] In formula (2), Indicates that the mth user and the nth item A user-item pair is formed. is a set of user-item pairs; It is a user-product pair The number of; the prediction score is calculated by formula (2) With real rating The error between .
[0069] Step 2.4: Use equation (3) and equation (4) to establish the loss function L about and The gradient of
[0070] (3)
[0071] (4)
[0072] Step 2.5: Use equations (5) and (6) to establish and The update formula of ;
[0073] (5)
[0074] (6)
[0075] In formula (5) and formula (6), represents the update step size; Indicates the mth user The dth latent feature after update; Indicates the nth item The d-th latent feature after update.
[0076] Step 2.6: Train the product recommendation model according to step 2.4 and step 2.5 until the loss function L converges, thereby obtaining a trained product recommendation model;
[0077] Step 2.7: Use the trained product recommendation model to predict the mth user The best prediction score for all products is calculated, and all products are sorted in descending order according to the best prediction score, so as to select the first k products to generate the mth user Original recommendation list of .
[0078] Step 3: Build a diverse product recommendation model;
[0079] Step 3.1: With the goal of maximizing the average predicted score of all products, use formula (7) to construct the objective function F of the diversity product recommendation model:
[0080] (7)
[0081] In formula (7), Indicates the mth user For the nth item The best prediction score of Indicates whether to add the nth item Recommend to the mth user If recommended, then , otherwise, let 0; and ;
[0082] For recommended products, equal , otherwise it is equal to 0, and their sum is divided by the number of recommendations made by the system Get the average prediction score, formula (7); Enforce the model to each user Recommend k products; for each user About Products The best prediction score Sort in descending order, and then select the first k products to recommend to the user .
[0083] Step 3.2: Use formula (8) to construct the popularity constraint of the diverse product recommendation model;
[0084] (8)
[0085] In formula (8), Indicates the nth item The ratio of the number of reviews to the total number of product reviews; The upper limit of total popularity; set an upper limit on the total popularity of recommended products To limit the total popularity of all recommended items for a given user.
[0086] Step 3.3: Use formula (9) to construct the type constraint of the diversity product recommendation model;
[0087] (9)
[0088] In formula (9), represents the set of products in category c, Represents the c-th category of goods The Items, Indicates whether the Items Recommend to the mth user ; Indicates whether to group the products in category c together Recommend the products in to the mth user If recommended, then , otherwise, let 0; and ; Indicates the total number of categories; Indicates the threshold of the number of categories; in order to constrain the product categories in each user's recommendation list to reach a certain proportion, the user recommendation category number threshold is introduced ; Make sure that each user's recommendation list appears at least Category of goods.
[0089] Step 3.4: Use formula (10) to construct the inventory constraints of the diverse product recommendation model;
[0090] (10)
[0091] Combined model, taking (7) as the objective function, and subject to the common constraints of equations (8), (9) and (10), the combined model is solved.
[0092] Step 4: Use the heuristic algorithm to reconstruct the objective function F of the diversity product recommendation model to obtain the reconstructed objective function ';
[0093] Step 4.1: Use equation (11) and equation (12) to get the mth user In the past Category Items The proportion of comments And recommend it to the mth user No. Category Items The proportion ;
[0094] (11)
[0095] (12)
[0096] In formula (11) and formula (12), For the mth user A collection of rated products. express The number of items in To recommend to the mth user List of products, including: express The number of items in Indicates the mth user Rated product collection Middle Items; Indicates recommendation to the mth user List of products Middle Items; and Respectively represent Category Items With Items score.
[0097] Step 4.2: Use formula (13) to get the recommendation to the mth user No. Category Items The proportion of products after weight adjustment , and then use formula (14) to get and The approximate value ;
[0098] (13)
[0099] (14)
[0100] In formula (13), represents the adjustment weight of the product ratio, and ; Approximate value Smaller values are better because they represent the ratio and are close to each other, while larger values make the proportions farther apart.
[0101] Step 4.3: Use formula (15) to get the mth user Reconstructed objective function :
[0102] (15)
[0103] In formula (15), represents the adjustment weight, and ;
[0104] Step 5: Reconstruct the objective function under popularity constraints, type constraints, and inventory constraints Solve and get the mth user The best recommended list .in, The weight is Penalty, product rating The weight is Rewards for each user From an empty recommendation list Initially, in each iteration, the commodity with the highest value in equation (15) is Add to Until every user in the system Recommend k products and get the best recommendation list .
[0105] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.
[0106] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.
[0107] In summary, the present invention proposes an inventory-constrained recommendation algorithm optimization framework, which utilizes the popularity constraints, inventory constraints, and type constraints of commodities to re-maximize the predicted scores of commodities and optimize the top-k lists recommended to users; the model optimizes the accuracy of recommendations and the usage of expected commodities, while taking into account the inventory constraints of commodities, thereby improving the accuracy of recommendations and user satisfaction.
Claims
1. A diversity recommendation optimization method integrating inventory information, characterized in that: The steps are as follows: Step 1: Define user collection , product collection ;in, represents the mth user, Indicates the nth item. The inventory is recorded as ∈ , represents the inventory set; M represents the total number of users, and N represents the total number of products; Get user-product rating matrix ,make The element in row m and column n Indicates the mth user For the nth product The real rating of represents a real number; Step 2: Build and train a product recommendation model based on matrix decomposition to generate the mth user Original recommendation list of ; Step 3: Build a diverse product recommendation model, including: objective function F and popularity constraints, type constraints, and inventory constraints; Step 4: Use the heuristic algorithm to reconstruct the objective function F of the diversity product recommendation model to obtain the reconstructed objective function '; Step 5: Reconstruct the objective function under popularity constraints, type constraints, and inventory constraints Solve and get the mth user The best recommended list .
2. The diversity recommendation optimization method integrating inventory information according to claim 1 is characterized in that: Described step 2 is carried out as follows: Step 2.1: In the interval Initialize the M×D dimension user feature matrix randomly , N×D-dimensional product feature matrix ,make The element in row m and column d Indicates the mth user The d-th hidden feature of The mth row vector in Indicates the mth user The characteristic vector of The element in row n and column d Indicates the nth item The d-th hidden feature of The nth row vector in Indicates the nth item The feature vector of; D represents the dimension of the latent feature; Step 2.2: Use formula (1) to get the mth user output by the product recommendation model For the nth item Prediction score of ; (1) Step 2.3: Use formula (2) to calculate the loss function L of the product recommendation model: (2) In formula (2), Indicates that the mth user and the nth item A user-item pair is formed. is the set of user-item pairs; Step 2.4: Use equation (3) and equation (4) to establish the loss function L about and The gradient of (3) (4) Step 2.5: Use equations (5) and (6) to establish and The update formula of (5) (6) In formula (5) and formula (6), represents the update step size; Indicates the mth user The dth latent feature after update; Indicates the nth item The dth latent feature after update; Step 2.6: Train the product recommendation model according to step 2.4 and step 2.5 until the loss function L converges, thereby obtaining a trained product recommendation model; Step 2.7: Use the trained product recommendation model to predict the mth user The best prediction score for all products is calculated, and all products are sorted in descending order according to the best prediction score, so as to select the first k products to generate the mth user Original recommendation list of .
3. The diversity recommendation optimization method integrating inventory information according to claim 2 is characterized in that: The step 3 is carried out as follows: Step 3.1: With the goal of maximizing the average predicted score of all products, use formula (7) to construct the objective function F of the diversity product recommendation model: (7) In formula (7), Indicates the mth user For the nth item The best prediction score of Indicates whether to add the nth item Recommend to the mth user If recommended, then , otherwise, let 0; and ; Step 3.2: Use formula (8) to construct the popularity constraint of the diverse product recommendation model; (8) In formula (8), Indicates the nth item The ratio of the number of reviews to the total number of product reviews; is the upper limit of the total prevalence; Step 3.3: Use formula (9) to construct the type constraint of the diversity product recommendation model; (9) In formula (9), represents the set of products in category c, Represents the c-th category of goods The Items, Indicates whether the Items Recommend to the mth user ; Indicates whether to group the products in category c together Recommend the products in to the mth user If recommended, then , otherwise, let 0; and ; Indicates the total number of categories; The threshold indicating the number of categories; Step 3.4: Use formula (10) to construct the inventory constraints of the diverse product recommendation model; (10)。 4. The diversity recommendation optimization method integrating inventory information according to claim 3 is characterized in that: Described step 4 is carried out as follows: Step 4.1: Use equation (11) and equation (12) to get the mth user In the past Products in this category Items The proportion of comments And recommend it to the mth user No. Products in this category Items The proportion ; (11) (12) In formula (11) and formula (12), For the mth user A collection of rated products. express The number of items in Indicates the mth user Rated product collection Middle Items; Indicates recommendation to the mth user List of products Middle Items; and Respectively represent Products in this category Items With Items score; Step 4.2: Use formula (13) to get the recommendation to the mth user No. Products in this category Items The proportion of products after adjusting weights , and then use formula (14) to get and The approximate value ; (13) (14) In formula (13), represents the adjustment weight of the product ratio, and ; Step 4.3: Use formula (15) to get the mth user Reconstructed objective function : (15) In formula (15), represents the adjustment weight, and .
5. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the diversity recommendation optimization method according to any one of claims 1 to 4, and the processor is configured to execute the program stored in the memory.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the diversity recommendation optimization method according to any one of claims 1 to 4 are executed.
Citation Information
Patent Citations
Socialized recommendation method based on matrix decomposition and network embedding joint model
CN110321494A
Logistics order splitting optimization method and system based on substitute recommendation
CN111738657A
Product recommendation optimization method fusing inventory information, electronic equipment and storage medium
CN116109235A
Comment information integrated e-commerce network commodity recommendation method and system
CN116579824A
E-commerce platform commodity recommendation method and system based on big data
CN118365431A