A product selection method, device, processing equipment, computer-readable storage medium and program product
By initializing the collection of eliminated products and updating based on related orders, the problem that the forward warehouse product selection algorithm in the e-commerce retail scenario does not consider related purchases is solved, and the consumer shopping timeliness and order satisfaction rate is improved without increasing the number of product selections.
Patent Information
- Application Number
- CN202411755686.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-07-29
- Estimated Expiration
- 2044-12-02
AI Technical Summary
In the existing e-commerce retail scenarios, the forward warehouse product selection algorithm fails to effectively consider the associated purchase situation between products, resulting in invalid product selection. The precise solution algorithm based on integer planning is difficult to solve in large-scale order scenarios, and it is impossible to obtain an optimization solution within a reasonable time.
By initializing a collection of eliminated products, the quantity of associated orders based on the product is constantly updated and eliminated products until the quantity threshold is reached, and the product selection collection in the forward warehouse is determined to ensure that the selected products are sold at a high volume and the associated purchase situation is comprehensive.
Without increasing the number of products selected, consumers' shopping timeliness is improved, ensuring that the forward warehouse can cover the related purchase situation between products and improving order satisfaction rate.
Smart Images

Figure CN119671677B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to a product selection method and device, a processing device, a computer-readable storage medium, and a program product. Background Art
[0002] In the e-commerce retail scenario, in order to shorten the delivery time for consumers, sellers deploy front warehouses in some cities to store a small number of best-selling products. After a consumer places an order on the e-commerce platform, the seller will give priority to shipping from the front warehouse. When there is no stock in the front warehouse, it will be shipped from the full-category warehouse. Since the delivery time of the front warehouse is better than that of the full-category warehouse, it can bring a faster and better shopping experience to consumers. Therefore, the product selection strategy for the front warehouse will directly affect the consumer experience.
[0003] One of the existing product selection algorithms is reverse sorting based on historical sales volume, and the top N products with high sales volume are selected as the products to be stocked in the front warehouse. However, the method of reverse sorting based on sales volume does not consider the associated purchase situation between products, and there will be a situation of ineffective product selection. Another method is an exact solution algorithm based on integer programming, but there are problems such as difficult solution and inability to solve in a reasonable time for large-scale order scenarios with tens of thousands of products. Therefore, there is an urgent need for an effective product selection method to solve this problem. Summary of the Invention
[0004] To solve the above technical problems, embodiments of the present invention provide a product selection method and device, a processing device, a computer-readable storage medium, and a program product.
[0005] In a first aspect, the product selection method provided by an embodiment of the present application includes:
[0006] Initialize the first product set as an empty set, and the products in the first product set are eliminated products;
[0007] Based on the associated order quantity of each product in the second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set;
[0008] Update the associated orders of each product in the second product set based on the eliminated products, and based on the associated order quantity of each product in the updated second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set until the number of products in the second product set reaches a first quantity threshold;
[0009] Determine a third product set based on the second product set and the first product set, and the products in the third product set are the selected products.
[0010] In a second aspect, a product selection device provided by an embodiment of the present application is applied to a processing device, and the device includes:
[0011] A processing unit, configured to initialize the first product set as an empty set, where the products in the first product set are eliminated products; based on the associated order quantity of each product in the second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set; update the associated orders of each product in the second product set based on the eliminated products, and based on the associated order quantity of each product in the updated second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set until the number of products in the second product set reaches a first quantity threshold;
[0012] A determination unit, configured to determine a third product set based on the second product set and the first product set, where the products in the third product set are selected products.
[0013] In a third aspect, a processing device provided by an embodiment of the present application includes: a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute any one of the above product selection methods.
[0014] In a fourth aspect, a computer-readable storage medium provided by an embodiment of the present application is used to store a computer program, and the computer program causes a computer to execute any one of the above product selection methods.
[0015] In a fifth aspect, a computer program product provided by an embodiment of the present application includes computer program instructions, and the computer program instructions cause a computer to execute any one of the above product selection methods.
[0016] In the technical solution of the embodiment of the present application, by initializing the first commodity set as an empty set, the commodities in the first commodity set are eliminated commodities; based on the number of associated orders of each commodity in the second commodity set, select commodities from the second commodity set as eliminated commodities, and add the eliminated commodities to the first commodity set; update the associated orders of each commodity in the second commodity set based on the eliminated commodities, and based on the number of associated orders of each commodity in the updated second commodity set, select commodities from the second commodity set as eliminated commodities, and add the eliminated commodities to the first commodity set until the number of commodities in the second commodity set reaches the first quantity threshold; determine the third commodity set based on the second commodity set and the first commodity set, and the commodities in the third commodity set are the selected commodities; thus, a new pre-warehouse product selection algorithm is realized. Without increasing the number of selected products, the product selection of the pre-warehouse is achieved by selecting eliminated products. During the process of eliminating products, the impact of the eliminated products on the associated orders is continuously updated, so as to ensure that the finally selected products all have relatively high sales volume, and the associated purchase situations among them can all be covered by the selected products. Without increasing the number of selected products, the time efficiency experience of consumers' shopping is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flowchart of a product selection method according to an embodiment of the present application Figure 1 ;
[0018] Figure 2 is a schematic diagram of a commodity set according to an embodiment of the present application Figure 1 ;
[0019] Figure 3 is a schematic diagram of a commodity set according to an embodiment of the present application Figure 2 ;
[0020] Figure 4 is a flowchart of a product selection method according to an embodiment of the present application Figure 2 ;
[0021] Figure 5 is a schematic structural diagram of a product selection device provided by an embodiment of the present application;
[0022] Figure 6 is a schematic structural diagram of a processing device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0024] It should be noted that the terms "first", "second", etc. in this article are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the present disclosure, "a plurality" means at least two, such as two, three, etc., unless otherwise specifically defined.
[0025] To facilitate understanding of the technical solutions of the embodiments of the present application, the related technologies of the embodiments of the present application are described below. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the protection scope of the embodiments of the present application.
[0026] In the e-commerce retail scenario, the seller will deploy several large-scale full-category warehouses across the country to store the self-operated goods sold on the e-commerce platform. At the same time, to shorten the delivery time for consumers, the seller will also deploy front warehouses in some cities. The scale of the front warehouse is generally smaller than that of the full-category warehouse and only stores a small number of best-selling goods. After the consumer places an order on the e-commerce platform, the seller will give priority to shipping from the front warehouse. When there is no stock in the front warehouse (partial or national out-of-stock of the order), it will then ship from the full-category warehouse. Since the delivery time of the front warehouse (half a day to one day) is better than that of the full-category warehouse (more than 2 days), the former can bring a faster and better shopping experience to consumers. Therefore, the product selection strategy of the front warehouse will directly affect the consumer experience.
[0027] The main idea of the existing product selection algorithm is to perform a reverse sort based on historical sales volume, and select the top N products with high sales volume as the products to be stocked in the front warehouse, which is an approximate regularization method. Another method is an exact solution algorithm based on integer programming. The historical order and product information are input into the integer programming model, and the product selection plan that can maximize the overall order fulfillment rate of the front warehouse is obtained through the solver.
[0028] However, in the above solutions, the method of reverse sorting based on sales volume does not consider the associated purchase situation between products. For example, assume that a certain type of coffee machine has a high historical sales volume, and consumers often buy coffee beans when purchasing this coffee machine. However, there are many types of coffee beans to choose from, so the sales volume of coffee beans is relatively scattered, resulting in the sales volume of any one type of coffee bean being much lower than that of the coffee machine. If the reverse sorting product selection method is used, the coffee machine may be selected, but the coffee beans will not be selected. In this way, when consumers buy a coffee machine and coffee beans at the same time, since there is no stock of coffee beans in the front warehouse, the entire order can only be shipped from the full-category warehouse with a slow delivery time, resulting in an ineffective product selection situation. And the exact algorithm based on integer programming is difficult to solve, and can only handle scenarios with a scale of hundreds of products. For large-scale order scenarios with tens of thousands of products, it cannot be solved within a reasonable time. Therefore, the following technical solutions of the present application are proposed.
[0029] To facilitate the understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application are described in detail below through specific embodiments. The above related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and all of them fall within the protection scope of the embodiments of the present application. The embodiments of the present application include at least some of the following contents.
[0030] Figure 1 It is a flowchart of the product selection method provided by the embodiments of the present application Figure 1 , such as Figure 1 shown, the product selection method includes:
[0031] Step 101: Initialize the first product set as an empty set, and the products in the first product set are eliminated products.
[0032] In the embodiments of the present application, the first product set is a set of eliminated products. This set contains the eliminated products and the identification information of the eliminated products. The eliminated products selected into the first product set indicate the products that are not selected during product selection, that is, the eliminated products. It should be noted that the eliminated products can also be called eliminated items, and the set of eliminated products can also be called the set of eliminated items. From the perspective of algorithm input, the first product set can also be represented as eliminated_skus. Among them, sku (stock keeping unit) refers to the inventory unit, which is used to manage and track product inventory. On an e-commerce platform, a product may have multiple attributes such as colors, sizes, and styles. Each attribute can be regarded as an sku, and different skus may have different prices and inventory levels.
[0033] In the embodiments of the present application, before performing product selection, it is necessary to initialize the first product set as an empty set. Exemplarily, initialize the set of eliminated items as eliminated_skus = set(). In this way, when performing the product selection step, continuously select eliminated products and put them into the set of eliminated items until the pre-set conditions are met, so as to realize product selection through eliminated items.
[0034] Step 102: Based on the number of associated orders of each product in the second product set, select products from the second product set as eliminated products and add the eliminated products to the first product set.
[0035] In the embodiments of the present application, the second product set is a set of all products, which can be represented as all_sku_set from the perspective of algorithm input. This set contains each product and the identification information of the corresponding product.
[0036] In the embodiments of the present application, the associated orders of a product refer to all the orders containing the product. By counting the number of associated orders of each product in the second product set, the products with fewer associated orders are selected as eliminated products, and the eliminated products are added to the eliminated product set.
[0037] Step 103: Update the associated orders of each product in the second product set based on the eliminated products, and based on the number of associated orders of each product in the updated second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set until the number of products in the second product set reaches the first quantity threshold.
[0038] In the embodiments of the present application, the first quantity threshold is set to judge the limitation of product selection. Among them, the first quantity threshold represents the total number of product types limit for product selection, also known as the white list width. From the perspective of algorithm input, it can also be expressed as top_K. For example, when P products are determined to be eliminated, by updating the associated orders of the remaining N - P products in the second product set based on the P eliminated products, and based on the number of associated orders of the N - P products in the updated second product set, a new round of products is selected from the updated second product set as eliminated products, and the new round of eliminated products is added to the eliminated product set. The product selection steps are repeated like this until the number of products in the updated second product set meets the white list limit width.
[0039] Step 104: Determine a third product set based on the second product set and the first product set. The products in the third product set are the selected products.
[0040] In the embodiments of the present application, the third product set can be the white list for pre - warehouse product selection, and the products in the white list are the products selected by the pre - warehouse. The number of products selected in the third set can be the difference between the total number of products in the second product set and the number of eliminated products in the first product set. Specifically, referring to Figure 2 , Figure 2 is a schematic diagram of the relationship between product sets provided in the embodiments of the present application, showing the relationship schematic diagram between the first product set, the second product set, and the third product set provided in the embodiments of the present application. Since there is a limit to the number of products selected by the pre - warehouse, the white list width is set as the first quantity threshold. When the number of products in the third product set is greater than or equal to the first quantity threshold, the product selection steps are repeated, that is, the selection of eliminated products is repeated, and the eliminated products are put into the third set until the number of products in the second product set meets the white list limit width. At this time, the remaining products in the second product set after meeting the white list limit width are the products selected by the pre - warehouse.
[0041] As can be seen from the above, the product selection method provided by the embodiments of the present application initializes the first product set as an empty set, and the products in the first product set are eliminated products; based on the number of associated orders of each product in the second product set, products are selected from the second product set as eliminated products and added to the first product set; based on the eliminated products, the associated orders of each product in the second product set are updated, and based on the number of associated orders of each product in the updated second product set, products are selected from the second product set as eliminated products and added to the first product set until the number of products in the second product set reaches the first quantity threshold; the third product set is determined based on the second product set and the first product set, and the products in the third product set are the selected products; in this way, a new pre-warehouse product selection algorithm is realized. Without increasing the number of selected products, the product selection of the pre-warehouse is achieved by selecting eliminated products, and the influence of the eliminated products on the associated orders is continuously updated during the product elimination process, so as to ensure that the finally selected products all have relatively high sales volume and the associated purchase situations among them can all be covered by the selected products, thereby improving the time-consuming experience of consumers' shopping without increasing the number of selected products.
[0042] Figure 3 FIG. is a schematic diagram of a second product set provided by an embodiment of the present application. The second product set includes N products, where N is a positive integer. For example, all_sku_set = set(product 1, product 2, product 3,..., product N). Then step 102 can be executed through steps 1021 to 1023, and the specific steps are as follows:
[0043] Step 1021: Obtain the associated orders formed by N products and count the number of associated orders of the N products.
[0044] Here, when performing the product selection step, the associated orders formed by N products can be obtained first. At this time, the N products are all the products in the second product set. Then, the number of associated orders of the N products is counted. Specifically, the associated orders formed by N products can be the set of all orders containing each of the N products respectively. The associated orders of the N products can be represented as sku_order from the perspective of algorithm input. In sku_order, the identification information of each product is used as the keyword key, and the set of all order numbers containing the product is used as the value value. Counting the number of associated orders of the N products means counting the number of associated orders of each product in sku_order. It should be noted that the set sku_order formed by obtaining the associated orders of the N products can be a dictionary-type set, that is, there are keywords and the values corresponding to the keywords.
[0045] Exemplarily, obtaining the associated order set of N products can be sku_order = {key1 = Product 1: value1 = Order No. A + Order No. B + Order C}, {key2 = Product 2: value2 = Order No. A + Order No. C}, …, {keyN = Product N: valueN = Order No. A}. Among them, for Product 1, the associated orders of this Product 1 are Order A, Order B, and Order C, that is, the number of associated orders of Product 1 is 3; for Product 2, the associated orders of this Product 2 are Order A and Order C, that is, the number of associated orders of Product 2 is 2, …, for Product N, the associated order of this Product N is Order No. A, that is, the number of associated orders of Product N is 1.
[0046] In some embodiments, counting the number of associated orders of N products includes: counting the number of associated orders of the products among the N products except the eliminated products. Here, when repeatedly executing the product selection step, only count the number of associated orders of the products among the N products except the eliminated products. In this way, product selection is achieved by determining the eliminated products, and the influence weight of the eliminated products on subsequent orders is continuously updated during the process of eliminating products, so as to ensure that the finally selected products all have relatively high sales volume and the associated purchase situations among them can all be covered among the selected products.
[0047] Step 1022: Select P products from the N products as the eliminated products based on the number of associated orders. The P products are the top P products with the smallest number of associated orders among the N products, and P is a positive integer less than N.
[0048] Step 1023: Add the eliminated products to the first product set.
[0049] Here, when counting the number of associated orders of N products, that is, after counting the number of associated orders of each product in sku_order, sort the identification information of each product in sku_order in ascending order of the number of associated orders of each product to obtain a sorted list set, and this set can be represented as sorted_sku. Then, take the first P products in the list set sorted_sku as the eliminated products and put them into the eliminated product set.
[0050] Exemplarily, in sku_order, the associated orders of Product 1 are Order A, Order B, and Order C, that is, the number of associated orders of Product 1 is 3; for Product 2, the associated orders of this Product 2 are Order A and Order C, then the number of associated orders of Product 2 is 2, …, for Product N, the associated order of this Product N is Order No. A, then the number of associated orders of Product N is 1. Sort the N products in ascending order of the number of associated orders to obtain the list sorted_sku = set(Product N, Product 2, Product 1, …). Put the first P products in the list sorted_sku into the eliminated product set.
[0051] In some embodiments, a first value is selected from a first numerical range as the value of P. Here, the minimum value of the first numerical range is 1, and the maximum value of the first numerical range is determined based on the number of products in the third product set. Here, the number of products in the third product set is determined by the difference between the first product set and the second product set in the product selection step. Therefore, the value of P ranges from 1 to len(all_sku_set)-len(eliminated_skus). Here, len() represents the number of elements, i.e., the length, in a sequence type container such as a string, list, or tuple.
[0052] Specifically, selecting a first value from the first numerical range includes: selecting a first value from the first numerical range based on the number of products in the first product set; wherein, the smaller the number of products in the first product set, the larger the first value; the larger the number of products in the first product set, the smaller the first value. Here, when P>1, it has an accelerating effect, that is, when the number of eliminated products is far from the target number, a relatively large P can be appropriately selected. When the number of eliminated products approaches the target number, P can be gradually reduced to 1.
[0053] As can be seen from the above, the product selection method provided by the embodiments of the present application obtains associated orders formed by N products and counts the number of associated orders of the N products; selects P products from the N products as the eliminated products based on the number of associated orders, where the P products are the top P products with the smallest number of associated orders among the N products, and P is a positive integer less than N; adds the eliminated products to the first product set; thus, product selection for the front-end warehouse is realized by selecting the eliminated products, and the influence of the eliminated products on the associated orders is continuously updated during the process of eliminating products, so as to ensure that the finally selected products all have high sales volume and the associated purchase situations among them can be covered by the selected products. Without increasing the number of selected products, the time-consuming experience of consumers' shopping is improved.
[0054] In some embodiments, updating the associated orders of each product in the second product set based on the eliminated products includes: determining the associated orders and associated products of the eliminated products, and updating the associated orders of the N products based on the associated orders and associated products of the eliminated products. Here, when the eliminated products are put into the eliminated product set, all the associated order sets affected by the eliminated products are found through the associated order set sku_order of the N products, and for each associated order, the other products in the order are found as the associated products of the eliminated products. The associated orders of each product in the second set will be updated according to the associated orders and associated products of the eliminated products. At this time, the second product set includes N - P products.
[0055] In some embodiments, the associated products of M orders are obtained, where M is a positive integer, and the associated products of the M orders and the associated orders of N products are statistically obtained based on the same order data.
[0056] Here, obtaining the associated products of M orders can be the set of all associated products respectively included in the M orders. Among them, obtaining the associated products of M orders can be represented as order_sku. In order_sku, the M order numbers serve as the keyword key, and the set of all associated products on the order serves as the value value. Exemplarily, order_sku = {key1 = order number A: value1 = product 1 + product 2 + product N}, {key2 = order number B: value2 = product 1}, {key1 = order number C: value1 = product 1 + product 2}..., {keyN = order number N: valueN =...}. Among them, for order number A, the associated products of this order are product 1, product 2, and product N; for order number B, the associated product of this order is product 1; for order number C, the associated products of this order are product 1 and product 2.
[0057] It should be noted that the sets formed after obtaining the associated orders of N products and the sets formed after obtaining the associated products of M orders are dictionary-type sets, that is, there are keywords and the values corresponding to the keywords respectively. At the same time, the sets formed after obtaining the associated orders of N products and the sets formed after obtaining the associated products of M orders have an associated relationship.
[0058] In some embodiments, determining the associated orders and associated products of the eliminated products includes:
[0059] Based on the associated orders of N products, determining the associated order of the eliminated product as the first order; based on the associated products of M orders, determining the associated products of the first order as the first products; where the first products and the first order are the associated orders and associated products of the eliminated products.
[0060] Here, when it is determined that the first P products in the list sorted_sku are eliminated products, query the keywords (product identifiers) corresponding to these P eliminated products in sku_order, and determine the associated orders corresponding to these P eliminated products respectively according to the values corresponding to the keywords, and determine the associated orders corresponding to these P eliminated products as the first order. Then, query the keywords (order numbers) corresponding to the first order in order_sku, and determine the associated products corresponding to the first order respectively according to the values corresponding to the keywords, and determine the associated products corresponding to the first order as the first products.
[0061] Exemplarily, sku_order = {key1 = Product 1: value1 = Order No. A + Order No. B + Order C}, {key2 = Product 2: value2 = Order No. A + Order No. C}, …, {keyN = Product N: valueN = Order No. A}. order_sku = {key1 = Order No. A: value1 = Product 1 + Product 2 + Product N}, {key2 = Order No. B: value2 = Product 1}, {key1 = Order No. C: value1 = Product 1 + Product 2} …, {keyN = Order No. N: valueN = …}. sorted_sku = set(Product N, Product 2, Product 1…). When P is set to 1, determine the eliminated product set: eliminated_skus = set(Product N), that is, the eliminated product is Product N. Then, query for the keyword of Product N in sku_order, and the corresponding associated order number is Order A. Then, query for the keyword of Order No. A in order_sku, and the corresponding associated products are Product 1 and Product 2. In this way, determine the associated orders of the eliminated product and the corresponding associated products.
[0062] It should be noted that the number of the first orders can be one or more, and the number of the first products can be one or more. In the case of multiple ones, for each order, the corresponding associated products need to be determined separately.
[0063] In some embodiments, updating the associated orders of N products based on the associated orders and associated products of the eliminated product includes: deleting the first order of the first product in the associated orders of N products.
[0064] Here, when the eliminated product and the corresponding associated orders and associated products are determined, delete the first order of the first product in the associated orders of N products.
[0065] Exemplarily, sku_order = {key1 = Product 1: value1 = Order No. A + Order No. B + Order C}, {key2 = Product 2: value2 = Order No. A + Order No. C}, …, {keyN = Product N: valueN = Order No. A}. order_sku = {key1 = Order No. A: value1 = Product 1 + Product 2 + Product N}, {key2 = Order No. B: value2 = Product 1}, {key1 = Order No. C: value1 = Product 1 + Product 2} …, {keyN = Order No. N: valueN = …}. sorted_sku = set(Product N, Product 2, Product 1…).
[0066] When determining the set of eliminated products: eliminated_skus = set(product N), that is, after the eliminated product is product N, query for the keyword product N in sku_order, that is, {keyN = product N: valueN = order number A}, and then query for the keyword order number A in order_sku, {key1 = order number A: value1 = product 1 + product 2 + product N}, that is, the corresponding associated products are product 1 and product 2. Then update sku_order and delete order number A from product 1 and product 2. At this time, sku_order = {key1 = product 1: value1 = order number B + order C}, {key2 = product 2: value2 = order number C},.... In this way, one update of sku_order is completed.
[0067] As can be seen from the above, the product selection method provided by the embodiments of the present application obtains the associated products of M orders, and the associated products of M orders and the associated orders of N products are statistically obtained based on the same order data; based on the associated orders of N products and the associated products of M orders, determine the associated orders and associated products of the eliminated products; in this way, product selection is achieved through product elimination, and the influence weight of the eliminated products on subsequent orders is continuously updated during the process of product elimination, so as to ensure that the finally selected products all have relatively high sales volume and the associated purchase situations between them can all be covered by the selected products.
[0068] Embodiment 1
[0069] Figure 4 is a flowchart of a product selection method provided by the embodiments of the present application Figure 2 , as shown in the figure, which means starting from the reverse direction and considering product selection from the perspective of product elimination, that is, as long as one product in an order enters the eliminated product list, the order is doomed not to be locally satisfied. Specifically, the overall steps include:
[0070] Step 401, initialize the set of eliminated products.
[0071] Here, the set of eliminated products can be represented as eliminated_skus, and initializing the set of eliminated products can be represented as eliminated_skus = set(). Among them, the products in the set of eliminated products are eliminated products, which can also be called eliminated items.
[0072] Step 402, determine whether the second product set meets the first quantity threshold.
[0073] Here, determine whether the number of products in the second product set (that is, the difference between the total number in the set of all products all_sku_set and the number of products in the set of eliminated products) is less than or equal to the white list width (top_K). If it is satisfied, go to step 403; otherwise, go to step 404.
[0074] Step 403: If the second product set meets the first quantity threshold, stop product selection.
[0075] Here, if the number of products in the second product set is less than or equal to the width of the whitelist, stop product selection, return the second product set, and use the remaining products in the second product set after stopping product selection as the third product set, i.e., the front warehouse whitelist. That is, the remaining products in the third product set at this time are the products selected by the front warehouse.
[0076] Step 404: Calculate the number of orders affected by each product.
[0077] Here, calculate the number of elements in the set corresponding to each keyword in sku_order. Products that have entered the eliminated product set are no longer counted. Sort each product from smallest to largest in terms of the number of affected orders to obtain the sorted list set sorted_sku of each product.
[0078] Step 405: Select P products as eliminated products.
[0079] Here, put the first P items of sorted_sku into the eliminated product set eliminated_skus. Here, P can take an integer between 1 and len(all_sku_set)-len(eliminated_skus). When P>1, it has an accelerating effect. When the number of eliminated products is far from the target quantity, a relatively large value can be appropriately taken; when the number of eliminated products is close to the target quantity, the value can be gradually reduced to 1.
[0080] Step 406: Find the corresponding associated products by looking up the associated orders corresponding to the eliminated products.
[0081] When putting the eliminated products into the eliminated product set, find all associated order sets affected by the eliminated products through sku_order, and for each associated order, find the other products in the order as associated products through order_sku.
[0082] Step 407: Update the order sets affected by each product.
[0083] Here, delete all pairs of associated order associated products in Step 405 from sku_order to complete the updated order set sku_order. Iteratively execute Step 402 - Step 407 until product selection is satisfied.
[0084] As can be seen from the above, the product selection method provided by the embodiments of the present application starts from the reverse direction and considers associated orders and associated products from the perspective of eliminated products. As long as one product in an order enters the eliminated product list, the order is doomed to be unable to be locally fulfilled. Compared with the prior art, where it is impossible to ensure that products selected into the whitelist are not affected by products not selected due to associated purchases, which in turn affects the order fulfillment rate, without increasing the number of selected products, the proportion of orders that can be fully fulfilled by the front warehouse is increased, thereby enhancing the time efficiency experience of consumers when shopping, and it is easier to implement modeling.
[0085] Figure 5 is a schematic structural diagram of a product selection device provided by an embodiment of the present application, applied to a processing device, such as Figure 5 shown, the product selection device includes:
[0086] A processing unit 501, configured to initialize the first product set as an empty set, and the products in the first product set are eliminated products; based on the number of associated orders of each product in the second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set; update the associated orders of each product in the second product set based on the eliminated products, and based on the number of associated orders of each product in the updated second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set until the number of products in the second product set reaches a first quantity threshold.
[0087] A determination unit 502, configured to determine a third product set based on the second product set and the first product set, and the products in the third product set are selected products.
[0088] In some embodiments, the second product set includes N products, where N is a positive integer; the product selection device 500 further includes an acquisition unit 503, configured to acquire the associated orders formed by the N products and count the number of associated orders of the N products.
[0089] The processing unit 501 is further configured to select P products from the N products as the eliminated products based on the number of associated orders, where the P products are the top P products with the smallest number of associated orders among the N products, and P is a positive integer less than N; add the eliminated products to the first product set.
[0090] In some embodiments, the determination unit 502 is further configured to determine the associated orders and associated products of the eliminated products, and update the associated orders of each product in the second product set based on the associated orders and associated products of the eliminated products.
[0091] In some embodiments, the obtaining unit 503 is further configured to obtain associated products of M orders, where M is a positive integer, and the associated products of the M orders and the associated orders of the N products are obtained based on the same order data statistics.
[0092] In some embodiments, the determining unit 502 is further configured to, based on the associated orders of the N products, determine the associated order of the eliminated product as the first order; and based on the associated products of the M orders, determine the associated product of the first order as the first product; wherein the first product and the first order are the associated product and the associated order of the eliminated product.
[0093] In some embodiments, the processing unit 501 is further configured to delete the first order of the first product in the associated orders of the N products.
[0094] In some embodiments, the processing unit 501 is further configured to select a first value as the value of P from a first numerical range, where the minimum value of the first numerical range is 1, and the maximum value of the first numerical range is determined based on the number of products in the third product set.
[0095] In some embodiments, the processing unit 501 is further configured to select a first value from a first numerical range based on the number of products in the first product set; wherein the smaller the number of products in the first product set, the larger the first value; and the larger the number of products in the first product set, the smaller the first value.
[0096] In some embodiments, the processing unit 501 is further configured to count the number of associated orders of the products other than the eliminated products among the N products.
[0097] Those skilled in the art should understand that Figure 5 The implementation functions of the units in the shown product selection device can be understood with reference to the relevant descriptions of the foregoing method. Figure 5 The functions of the units in the shown product selection device can be implemented by a program running on a processor or by specific logic circuits.
[0098] Figure 6 is a schematic structural diagram of a processing device 600 provided by an embodiment of the present application. Figure 6 The shown processing device 600 includes a processor 610, and the processor 610 can call and run a computer program from a memory to implement the method in the embodiment of the present application.
[0099] Optionally, as Figure 6As shown, the processing device 600 may further include a memory 620. Among them, the processor 610 may call and run a computer program from the memory 620 to implement the method in the embodiments of the present application.
[0100] Among them, the memory 620 may be a separate device independent of the processor 610 or may be integrated in the processor 610.
[0101] Optionally, as Figure 6 shown, the processing device 600 may further include a transceiver 630. The processor 610 may control the transceiver 630 to communicate with other devices. Specifically, it may send information or data to other devices or receive information or data sent by other devices.
[0102] Among them, the transceiver 630 may include a transmitter and a receiver. The transceiver 630 may further include an antenna, and the number of antennas may be one or more.
[0103] In some embodiments, the processing device 600 may be a computer device, which includes a processor and a memory. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to implement the following method steps:
[0104] Initialize the first set of products as an empty set, and the products in the first set of products are eliminated products;
[0105] Based on the associated order quantity of each product in the second set of products, select products from the second set of products as eliminated products and add the eliminated products to the first set of products;
[0106] Update the associated orders of each product in the second set of products based on the eliminated products, and based on the associated order quantity of each product in the updated second set of products, select products from the second set of products as eliminated products and add the eliminated products to the first set of products until the number of products in the second set of products reaches a first quantity threshold;
[0107] Determine a third set of products based on the second set of products and the first set of products, and the products in the third set of products are selected products.
[0108] In some embodiments, the second set of products includes N products, where N is a positive integer; the processor in the computer device is further used to call and run a computer program from the memory to implement the following method steps:
[0109] Obtain the associated orders formed by the N products and count the associated order quantity of the N products;
[0110] Select P products from the N products as the eliminated products based on the associated order quantities of the N products, where the P products are the top P products with the smallest associated order quantities among the N products, and P is a positive integer less than N;
[0111] Add the eliminated products to the first product set.
[0112] In some embodiments, the processor in the computer device is further configured to call and run a computer program from the memory to implement the following method steps:
[0113] Determine the associated orders and associated products of the eliminated products, and update the associated orders of each product in the second product set based on the associated orders and associated products of the eliminated products.
[0114] In some embodiments, the processor in the computer device is further configured to call and run a computer program from the memory to implement the following method steps:
[0115] Obtain the associated products of M orders, where M is a positive integer, and the associated products of the M orders and the associated orders of the N products are statistically obtained based on the same order data.
[0116] In some embodiments, the processor in the computer device is further configured to call and run a computer program from the memory to implement the following method steps:
[0117] Based on the associated orders of the N products, determine the associated order of the eliminated products as the first order;
[0118] Based on the associated products of the M orders, determine the associated product of the first order as the first product; wherein, the first product and the first order are the associated product and associated order of the eliminated products.
[0119] In some embodiments, the processor in the computer device is further configured to call and run a computer program from the memory to implement the following method steps:
[0120] In the associated orders of the N products, delete the first order of the first product.
[0121] In some embodiments, the processor in the computer device is further configured to call and run a computer program from the memory to implement the following method steps:
[0122] Select a first value as the value of P from a first numerical range, where the minimum value of the first numerical range is 1, and the maximum value of the first numerical range is determined based on the number of products in the second product set.
[0123] In some embodiments, the processor in the computer device is further configured to call and run a computer program from the memory to implement the following method steps:
[0124] Select a first value from a first numerical range based on the number of products in the first product set; wherein, the smaller the number of products in the first product set, the larger the first value; the larger the number of products in the first product set, the smaller the first value.
[0125] In some embodiments, the processor in the computer device is further configured to call and run a computer program from the memory to implement the following method steps:
[0126] Count the number of associated orders of the products among the N products other than the eliminated products.
[0127] It should be understood that the processor in the embodiments of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method embodiments can be completed by the integrated logic circuit in the hardware of the processor or instructions in software form. The above processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0128] It can be understood that the memory in the embodiments of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0129] It should be understood that the above-mentioned memory is by way of example but not limitation. For example, the memory in the embodiments of the present application can also be a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate SDRAM (DDR SDRAM), an enhanced SDRAM (ESDRAM), a synch link DRAM (SLDRAM), and a direct rambus random access memory (DR RAM), and so on. That is to say, the memory in the embodiments of the present application is intended to include, but is not limited to, these and any other suitable types of memory.
[0130] The embodiments of the present application also provide a computer-readable storage medium for storing a computer program.
[0131] This computer-readable storage medium can be applied to the processing device in the embodiments of the present application, and the computer program causes the computer to execute the corresponding processes implemented by the processing device in each method of the embodiments of the present application. For the sake of brevity, it will not be elaborated here.
[0132] The embodiments of the present application also provide a computer program product, including computer program instructions. This computer program product can be applied to the processing device in the embodiments of the present application, and the computer program instructions cause the computer to execute the corresponding processes implemented by the processing device in each method of the embodiments of the present application. For the sake of brevity, it will not be elaborated here.
[0133] The embodiments of the present application also provide a computer program. This computer program can be applied to the processing device in the embodiments of the present application. When this computer program runs on a computer, it causes the computer to execute the corresponding processes implemented by the processing device in each method of the embodiments of the present application. For the sake of brevity, it will not be elaborated here.
[0134] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0135] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be elaborated here.
[0136] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings, direct couplings, or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of the devices or units can be in an electrical, mechanical, or other form.
[0137] The unit described as a separation component may or may not be physically separated. The component shown as a unit may or may not be a physical unit, that is, it may be located in one place or may be distributed across multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] In addition, each functional unit in various embodiments of the present application may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit.
[0139] If the above-mentioned function is implemented in the form of 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, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes.
[0140] As described above, the above are only specific implementation manners of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A product selection method, characterized in that, The method includes: Initializing the first set of products as an empty set, where the products in the first set of products are eliminated products; Selecting products from the second set of products as eliminated products based on the associated order quantities of each product in the second set of products, and adding the eliminated products to the first set of products; Updating the associated orders of each product in the second set of products based on the eliminated products, and selecting products from the second set of products as eliminated products based on the associated order quantities of each product in the updated second set of products, and adding the eliminated products to the first set of products until the number of products in the second set of products reaches a first quantity threshold; Determining a third set of products based on the second set of products and the first set of products, where the products in the third set of products are selected products.
2. The method according to claim 1, characterized in that, The second set of products includes N products, where N is a positive integer; The step of selecting products from the second set of products as eliminated products based on the associated order quantities of each product in the second set of products, and adding the eliminated products to the first set of products includes: Obtaining the associated orders formed by the N products and counting the associated order quantities of the N products; Selecting P products from the N products as the eliminated products based on the associated order quantities, where the P products are the top P products with the smallest associated order quantities among the N products, and P is a positive integer less than N; Adding the eliminated products to the first set of products.
3. The method according to claim 2, wherein The step of updating the associated orders of each product in the second set of products based on the eliminated products includes: Determining the associated orders and associated products of the eliminated products, and updating the associated orders of each product in the second set of products based on the associated orders and associated products of the eliminated products.
4. The method according to claim 3, characterized in that, The method further includes: Obtaining the associated products of M orders, where M is a positive integer, and the associated products of the M orders and the associated orders of the N products are statistically obtained based on the same order data; The step of determining the associated orders and associated products of the eliminated products includes: Determining the associated order of the eliminated products as a first order based on the associated orders of the N products; Determining the associated products of the first order as first products based on the associated products of the M orders; where the first products and the first order are the associated products and associated order of the eliminated products.
5. The method according to claim 4, wherein The step of updating the associated orders of the N products based on the associated orders and associated products of the eliminated products includes: Deleting the first order of the first products in the associated orders of the N products.
6. The method according to claim 2, wherein The method further includes: Selecting a first value as the value of P from a first numerical range, where the minimum value of the first numerical range is 1, and the maximum value of the first numerical range is determined based on the number of products in the second set of products.
7. The method according to claim 6, wherein The step of selecting a first value from the first numerical range includes: Select a first value from a first numerical range based on the number of products in the first product set; wherein, the smaller the number of products in the first product set, the larger the first value; the larger the number of products in the first product set, the smaller the first value.
8. The method according to any one of claims 2 to 7, characterized in that The step of counting the number of associated orders of the N products includes: Count the number of associated orders of the products among the N products other than the eliminated products.
9. A product selection device, characterized in that, Applied to a processing device, the apparatus includes: A processing unit, configured to initialize the first product set as an empty set, and the products in the first product set are eliminated products; based on the number of associated orders of each product in the second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set; update the number of associated orders of each product in the second product set based on the eliminated products, and based on the number of associated orders of each product in the updated second product set, select products from the second product set as eliminated products, and add the eliminated products to the first product set until the number of products in the second product set reaches a first quantity threshold; A determination unit, configured to determine a third product set based on the second product set and the first product set, and the products in the third product set are the selected products.
10. A processing device, characterized in that, Includes: A processor and a memory, the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, For storing a computer program, the computer program causes a computer to execute the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that, Includes computer program instructions, and the computer program instructions cause a computer to execute the method according to any one of claims 1 to 8.