Commodity combination method, device, electronic device and readable storage medium
By using a pre-trained probability parameter prediction model, combining historical sales volume and current price, the target combination products are selected, which solves the problems of low accuracy and insufficient diversity of dish combinations, and achieves a more accurate and diversified product combination recommendation.
Patent Information
- Application Number
- CN201811436585.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-11-28
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2038-11-28
AI Technical Summary
Among the existing dish combination methods, the accuracy of the dish's calorie estimate is low, resulting in a lower accuracy of the best combination dishes. At the same time, the dish combination method limits the diversity of the combination results.
By generating a candidate product set based on the historical sales volume and current price of the target product, a pre-trained probability parameter prediction model is used to predict the initial probability parameters of each product and the joint probability parameters between the products, and these probability parameters are used to select the target combination product. This model includes encoding networks and decoding networks, both of which are long and short-term memory networks.
It improves the accuracy of product combinations and increases the diversity of combination results, so that product combinations that meet user needs can be recommended more accurately.
Smart Images

Figure CN109902852B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of personalized recommendation, and more particularly to a commodity combination method, device, electronic device, and readable storage medium. Background Art
[0002] In the search engine, search results are displayed according to the keywords entered by the user, including web page information and advertising information related to the keywords. This type of advertising information creates high economic benefits.
[0003] In the prior art, the application No. 201610172831.6 proposed a calorie-based dish combination. The main steps include: calculating the calories that the user needs to supplement when dining according to the user's daily basic calories and the calories that need to be consumed on the day obtained in advance; formulating multiple alternative dish combinations for the current user according to the calorie value corresponding to each dish and the dish combination method; generating multiple dish combination plans in the alternative dish combination according to the user's consumption behavior and taste preferences in the system; and recommending the best combination of dishes to the user according to the ranking of the dish combination plans.
[0004] Research on the above scheme shows that due to the low accuracy of calorie estimation of dishes, the accuracy of the best combination of dishes is low; in addition, the dish combination method limits the diversity of combination results. Summary of the invention
[0005] The embodiments of the present disclosure provide a commodity combination method, device, electronic device and readable storage medium to solve the above-mentioned problems of low accuracy and limited diversity of dish combinations.
[0006] According to a first aspect of an embodiment of the present disclosure, a commodity combination method is provided, the method comprising:
[0007] Generate a set of candidate products based on the historical sales volume and current price of the target product;
[0008] A pre-trained probability parameter prediction model is used to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities. The probability parameter prediction model includes an encoding network and a decoding network. The encoding network and the decoding network are long short-term memory networks. During training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and the joint probability parameters output by the decoding network. The input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network. The initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model.
[0009] The target combination of commodities is selected according to the initial probability parameters of the commodities and the joint probability parameters between the commodities.
[0010] According to a second aspect of an embodiment of the present disclosure, there is provided a commodity combination device, the device comprising:
[0011] A candidate product set generation module is used to generate a candidate product set based on the historical sales volume and current price of the target product;
[0012] A probability parameter prediction module, used to use a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities, the probability parameter prediction model includes an encoding network and a decoding network, the encoding network and the decoding network are long short-term memory networks, during training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network, the input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network, the initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model;
[0013] The combination product selection module is used to select a target combination product according to the initial probability parameters of each product and the joint probability parameters between the products.
[0014] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0015] A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the aforementioned commodity combination method is implemented when the processor executes the program.
[0016] According to a fourth aspect of an embodiment of the present disclosure, a readable storage medium is provided, characterized in that when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the aforementioned commodity combination method.
[0017] The embodiment of the present disclosure provides a commodity combination method and device, the method comprising: generating a candidate commodity set according to the historical sales volume and current price of the target commodity; using a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities, the probability parameter prediction model comprising an encoding network and a decoding network, the encoding network and the decoding network being long short-term memory networks, during training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network, the input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network, the initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model; selecting the target combination commodity according to the initial probability parameters of each commodity and the joint probability parameters between commodities. The target combination commodity can be selected by the joint probability parameters, which helps to improve the accuracy of the target combination commodity, and the commodities can be combined arbitrarily, and the combination results are diversified. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the description of the embodiments of the present disclosure will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 A flowchart of the steps of a commodity combination method in an embodiment of the present disclosure is shown;
[0020] Figure 2 A tree structure diagram of a commodity combination in an embodiment of the present disclosure is shown;
[0021] Figure 3 A flowchart of the steps of a commodity combination method in another embodiment of the present disclosure is shown;
[0022] Figure 4 A schematic diagram of a training network in another embodiment of the present disclosure is shown;
[0023] Figure 5 A structural diagram of a commodity combination device in an embodiment of the present disclosure is shown;
[0024] Figure 6 A structural diagram of a commodity combination device in another embodiment of the present disclosure is shown;
[0025] Figure 7 A structural diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present disclosure.
[0027] Embodiment 1
[0028] Reference Figure 1 , which shows a step flow chart of a commodity combination method in an embodiment of the present disclosure, as follows.
[0029] Step 101: Generate a candidate product set based on the historical sales volume and current price of the target product.
[0030] The historical sales volume can be the total sales volume of the product in a specified historical time period, or the sales volume of the product in a unit historical time period. For example, if the total sales volume of the product in the three months before the current time is 1500, the historical sales volume can be 1500, or 1500 / 3=500.
[0031] In actual applications, the sales price of a product may change over time and in the market. The current price is the sales price of the product at the current time, which will affect the combination and sales amount of the product.
[0032] Specifically, the embodiments of the present disclosure may combine commodities with high historical sales volume and high current price, and recommend them to users.
[0033] It is understandable that the higher the historical sales volume and the higher the current price, the greater the sales amount. Recommending the product to users in the form of a combination of products will bring better commercial benefits to the merchant.
[0034] Step 102, using a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities, the probability parameter prediction model includes an encoding network and a decoding network, the encoding network and the decoding network are long short-term memory networks, during training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network, the input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network, the initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model.
[0035] The initial probability parameter is the probability parameter of the product being selected as the first product.
[0036] The joint probability parameter is a statement of the rationality of combining two products.
[0037] The above initial probability parameters and joint probability parameters can be expressed by probability, or by calculating the logarithm, exponent, linear transformation or other calculation results of the probability.
[0038] The joint probability parameter can be a non-conditional parameter, that is, when two products are combined, there are no other products that have already been combined. Figure 2 As shown, when products 1 and 3 are combined, there are no other products that have been combined, so the joint probability parameter 0.8 of products 1 and 3 is not a conditional parameter.
[0039] The joint probability parameter can also be a conditional parameter, that is, the premise of the joint probability parameter between two commodities is that the two commodities are combined with other commodities. Figure 2 As shown in the figure, 1, 2, and 3 are actual products, and 0 is a virtual product, which is used as an end mark to indicate the possibility of the end of the combination. When combining products, if products 1 and 3 have been selected, the joint probability parameter of product 3 needs to be considered when continuing to select products. For example, for product 2, the joint probability parameter of product 3 and product 2 is a reasonable expression of combining product 3 and product 2 on the premise that product 1 has been selected.
[0040] It can be understood that the joint probability parameter of every two commodities includes two types: unconditional parameters and conditional parameters, and the conditional parameters include conditional parameters that all commodities are selected before the two commodities.
[0041] The embodiment of the present disclosure can use the probability parameter prediction model to combine the commodities in the candidate commodity set and obtain the joint probability parameter between any two commodities, such as Figure 2 The resulting tree structure is shown.
[0042] Step 103: Select target combination products according to the initial probability parameters of the products and the joint probability parameters between the products.
[0043] It can be understood that in the process of combining commodities, commodities with the largest initial probability parameters or joint probability parameters are selected one by one as the combined commodities until the joint probability parameter of the virtual commodity and the commodity corresponding to the parent node is the largest. Figure 2As shown, when the first product is selected, the initial probability parameter of product 2 is the largest, so product 2 is selected as the first product; then the second product is selected, because in the child node of product 2, the joint probability parameter of products 3 and 2 is the largest, product 3 is selected as the second product; finally, the third product is selected, because in the child node of product 3, the joint probability parameter of virtual product 0 and product 3 is the largest, so the combination is accepted, and the final target combination product is 2-3.
[0044] It can be understood that in actual applications, there may be multiple target combination products, so other target combination products can be selected according to the above steps. For example, when selecting the first product, a product with an initial probability parameter is selected from other products other than product 2 as the first product, such as Figure 2 ; then, the second product is selected. Since the joint probability parameter of product 3 and product 1 in the child node of product 1 is the largest, product 3 is selected as the second product. Finally, the third product is selected. Since the joint probability parameter of virtual product 0 and product 3 in the child node of product 3 is the largest, the combination of products is ended, and the target combination of products is 1-3.
[0045] It should be noted that when selecting multiple target combination commodities, the first commodity may be reselected first, or the first commodity may not be reselected and reselection may be started from the second commodity. The embodiments of the present disclosure do not limit the strategy of reselecting commodities.
[0046] In summary, the embodiment of the present disclosure provides a commodity combination method, the method comprising: generating a candidate commodity set according to the historical sales volume and current price of the target commodity; using a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities, the probability parameter prediction model comprising an encoding network and a decoding network, the encoding network and the decoding network are long short-term memory networks, during training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network, the input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network, the initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model; selecting the target combination commodity according to the initial probability parameters of each commodity and the joint probability parameters between commodities. The target combination commodity can be selected by the joint probability parameter, which helps to improve the accuracy of the target combination commodity, and the commodities can be combined arbitrarily, and the combination results are diversified.
[0047] Embodiment 2
[0048] Reference Figure 3, which shows a specific step flow chart of the commodity combination method in another embodiment of the present disclosure, as follows.
[0049] Step 201: Obtain a product set provided by each merchant and feature information of each product in the product set.
[0050] Feature information includes but is not limited to: historical sales, current price, category, and word vector.
[0051] The historical sales volume and current price may refer to the detailed description in step 101 .
[0052] The category is the category to which the product belongs. For example, for a product, the category can be divided into vegetables, seafood, meat, etc. In practical applications, the classification of categories can be set according to the actual application scenario, and the embodiments of the present disclosure do not limit it. It can be understood that the more detailed the classification of categories, the more accurate the training results.
[0053] Word vectors are words converted into dense vectors. For identical or similar words, the corresponding word vectors are also identical or similar. Word vectors include discrete representation and distributed representation. Discrete representation represents a word as a long vector, where only one dimension takes the value 1 and the other dimensions take the value 0; distributed representation represents a word as a fixed-length dense vector. Word vectors are well-known technologies and will not be described in detail here.
[0054] It can be understood that steps 201 to 203 are the training process of the combined model. Among them, the merchant in step 201 can be an online store or a physical store on the application platform. In actual application, in order to ensure the accuracy of training, a large number of merchants can be selected, and all the products of each merchant can be formed into a product set for training.
[0055] Step 202: Count the initial probability parameters of each commodity provided by each merchant and the joint probability parameters between commodities from the historical orders of each merchant to obtain sample values of the initial probability parameters and the joint probability parameters.
[0056] Specifically, both the initial probability parameter and the joint probability parameter can be obtained from the statistics of historical orders. For the initial probability parameter of a product, the ratio of the number of orders for each product as the first product to the total number of orders can be used. For example, if the total number of orders is 100, the number of orders for products 1, 2, and 3 as the first product is 20, 75, and 5, respectively. Figure 2 As shown, the initial probability parameters of commodities 1, 2, and 3 may be 20 / 100=0.2, 75 / 100=0.75, and 5 / 100=0.05, respectively.
[0057] The joint probability parameter between products can be the ratio of the number of orders for product A and B as the i-th product and the i+1-th product, respectively, to the number of orders for product A as the i-th product. For example, if the number of orders for product 1 as the first product is 20, and the number of orders for product 1 as the first product and product 3 as the second product is 16, then Figure 2 As shown, the joint probability parameter of commodity 1 as the first commodity and commodity 3 can be 16 / 20=0.8.
[0058] It can be understood that the joint probability parameter is related to the order of the goods, such as Figure 2 As shown, the joint probability parameter of commodity 1 as the first commodity and commodity 3 is 0.8, but the joint probability parameter of commodity 3 as the first commodity and commodity 1 is 0.
[0059] In addition, the joint probability parameters are related to the location of the goods, e.g. Figure 2 As shown, the joint probability parameter of commodity 1 as the first commodity and commodity 3 is 0.8, and the joint probability parameter of commodity 1 as the second commodity and commodity 3 needs to consider the first commodity. When the first commodity is commodity 1, the joint probability parameter of commodity 1 and commodity 3 as the second commodity and the third commodity is 0.
[0060] Step 203, obtaining a probability parameter prediction model through training based on the characteristic information of each commodity, historical orders, and sample values of the initial probability parameters and the joint probability parameters.
[0061] Among them, the initial probability parameters and joint probability parameters are used for supervised learning, so that the initial probability parameters and joint probability parameters predicted by the model are closest to the corresponding sample values.
[0062] Optionally, in another embodiment of the present disclosure, the above step 203 includes sub-steps 2031 to 2034:
[0063] Sub-step 2031, inputting the characteristic information of each commodity and the predicted value of the joint probability parameter fed back by the encoding network into the encoding network to obtain a first prediction vector.
[0064] like Figure 4 As shown, the characteristic information of the goods is input into the encoding network in sequence. In addition, the characteristic information of the virtual goods is also input into the encoding network, and the output of the encoding network is input into the decoding network.
[0065] Sub-step 2032: input the first prediction vector and the feature information of each product in the historical order into a decoding network to obtain a prediction value of a joint probability parameter between the products.
[0066] like Figure 4As shown in , when inputting each product 2-1-3 in the historical order, the start mark is input first, and then the products 2-1-3 are input sequentially. The decoding network can select each product in the order in sequence according to the expected probability distribution, such as Figure 4 Product 2 in the encoding end is fed back to product 1 at the encoding end, that is, the next product is product 1 based on the selection of product 2; product 1 is fed back to product 3 at the encoding end, that is, the next product is product 3 based on the selection of products 2 and 1; product 3 is fed back to virtual product 0 at the encoding end, that is, product 3 is the last product.
[0067] Sub-step 2033, calculating the predicted value of the joint probability parameter and the loss value between the sample values.
[0068] Specifically, the loss value LOSS can be calculated according to the following formula:
[0069]
[0070] Where M is the total number of merchants, m is the merchant ID, T is the length of the decoder, t is the product ID input to the decoder, N is the length of the encoder, n is the product ID input to the encoder, and y′ m,t,n is the predicted value of the joint probability parameter of merchant m, product t and product n, y m,t,n is the sample value of the joint probability parameter of merchant m, product t and product n.
[0071] It can be understood that T contains the start mark and N contains the virtual goods. When t corresponds to the start mark, y′ m,t,n ,y m,t,n They are respectively the predicted value and sample value of the initial probability parameter of product n of merchant m.
[0072] Sub-step 2034, when the loss value is less than a preset loss value threshold, the encoding network and the decoding network in the current state form a probability parameter prediction model.
[0073] Among them, the loss value threshold can be set according to the actual application scenario, and the embodiments of the present disclosure do not limit it.
[0074] In addition, when the loss value is greater than or equal to the loss value threshold, it is necessary to adjust the prediction parameters of the encoding network and the decoding network and continue training until the loss value is less than the loss value threshold.
[0075] Optionally, in another embodiment of the present disclosure, the encoding network and the decoding network are long short-term memory networks.
[0076] Among them, the Long Short-Term Memory Network (LSTM) is a time memory network used to predict events that occur in chronological order.
[0077] Step 204, obtaining product information, and counting historical sales corresponding to the product information from historical orders.
[0078] In actual applications, since the products provided by merchants may vary over time, in order to ensure the real-time nature of the product set, a snapshot of the current menu can be taken to obtain product information.
[0079] In addition, when a user completes an order for one or more items on an application platform or a merchant store, the application platform or merchant's order system can record the completed order, which includes product information and quantity, so that the number of items can be counted from historical orders within a specified time to obtain historical sales.
[0080] Step 205: Arrange the product information in descending order according to the historical sales volume to obtain a sales volume ranking sequence.
[0081] In the embodiment of the present disclosure, after arranging in descending order according to historical sales volume, the product information with the highest ranking can be taken as a candidate product set and recommended to the user, which can effectively improve the recommendation success rate.
[0082] Step 206 , obtaining a plurality of commodity information from the front positions of the sales volume sorting sequence, and arranging them in ascending order according to current prices to obtain a candidate commodity set.
[0083] The amount of product information can be determined according to the length of the encoder, which is the encoder length minus 1.
[0084] Step 207, obtaining feature information of each product in the candidate product set, wherein the feature information includes at least one of: historical sales volume, category, word vector, and current price.
[0085] This step can refer to the detailed description of step 201 and will not be described again here.
[0086] Step 208: Input the characteristic information of the commodity into a pre-trained probability parameter prediction model to obtain the initial probability parameter of each commodity and the joint probability parameter between commodities.
[0087] The embodiments of the present disclosure may use the probability parameter prediction model trained in steps 201 to 203 to predict the initial probability parameters and the joint probability parameters.
[0088] Step 209 , selecting one or more combination commodities that meet the preset price condition and / or include the preset commodities to obtain candidate combination commodities.
[0089] The price condition may be that the sum of the prices of the candidate combination products is within a price range, or is less than a price, or is greater than a price. The price condition may be determined based on the user's historical consumption records, thereby selecting a combination product that meets the user's consumption capacity.
[0090] In actual applications, different price conditions can be set according to different application requirements.
[0091] In addition, when selecting the target combination product, it can also be performed based on the required products. First, the candidate combination products that do not include the required products are eliminated, and the target combination product is selected from the remaining candidate combination products according to steps 210 to 211.
[0092] For example, for Figure 2 The tree structure shown in FIG. 1 obtains the combination products 1-3-0, 2-1-0, 2-3-0, and 3-0. According to the tree structure, the statistical results shown in Table 1 are obtained.
[0093] Table 1
[0094]
[0095] Among them, the price of 1-3-0 is 50, the price of 2-1-0 is 45, the price of 2-3-0 is 55, and the price of 3-0 is 30. If the price condition is less than or equal to 50, since the price of 2-3-0 is 55, it does not meet the price condition and cannot be used as a candidate combination product, while 1-3-0, 2-1-0, and 3-0 meet the price condition and can be used as candidate combination products.
[0096] In addition, based on the above price conditions, the condition of including product 1 must also be met. Therefore, 3-0 does not meet the condition of including the preset product and cannot be used as a candidate combination product. However, 1-3-0 and 2-1-0 include product 1 and can be used as candidate combination products.
[0097] Step 210: Calculate the combination score of each candidate combination product according to the initial probability parameters of each product and the joint probability parameters between products.
[0098] Among them, the candidate combination products are as follows Figure 2 In the tree structure shown, there is a path from the starting node to the leaf node with a value of 0.
[0099] The greater the combination score, the greater the recommendation success rate of the candidate combination product; the smaller the combination score, the smaller the recommendation success rate of the candidate combination product.
[0100] Optionally, in another embodiment of the present disclosure, step 210 includes sub-step 2101:
[0101] Sub-step 2101, for each candidate combination product, calculate the average value of the initial probability parameter of the first product of the candidate combination product and the joint probability parameters of the included products to obtain a combination score.
[0102] against Figure 2 The tree structure of the combination score can refer to Table 1, where the combination score of 1-3-0 can be (0.2+0.8) / 2=0.5, the combination score of 2-1-0 can be (0.75+0.35) / 2=0.55, the combination score of 2-3-0 can be (0.75+0.5) / 2=0.63, and the combination score of 3-0 is 0.05.
[0103] It can be understood that the combination score can also be the sum of the initial probability parameter of the first product in the candidate combination product and the joint probability parameter between the products, or a function of the sum or a function of the average value. However, the relationship between the sum or average value and the combination score must not change, that is, when the sum or average value increases, the combination score increases; when the sum or average value decreases, the combination score decreases.
[0104] Step 211: Select one or more combination products with higher combination scores from the candidate combination products to obtain a target combination product.
[0105] Specifically, one or more candidate combination products with higher target combination scores may be selected as target combination products. For example, as in the combination products in Table 1, if the candidate combination products are 1-3-0, 2-1-0, and 3-0, since the combination score of candidate combination product 3-0 is relatively low, 1-3-0 and 2-1-0 are selected as target combination products.
[0106] The embodiments of the present disclosure can estimate a combination score for the candidate combination products as a comprehensive evaluation of the candidate combination products to guide the selection of the target combination products.
[0107] The embodiments of the present disclosure can select target combination commodities in combination with prices, which helps users control the consumption amount and can further improve the recommendation success rate of the combination commodities.
[0108] In summary, the embodiment of the present disclosure provides a commodity combination method, the method comprising: generating a candidate commodity set according to the historical sales volume and current price of the target commodity; using a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities, the probability parameter prediction model comprising an encoding network and a decoding network, the encoding network and the decoding network are long short-term memory networks, during training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network, the input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network, the initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model; selecting the target combination commodity according to the initial probability parameters of each commodity and the joint probability parameters between commodities. The target combination commodity can be selected by the joint probability parameter, which helps to improve the accuracy of the target combination commodity, and the commodities can be arbitrarily combined, and the combination results are diversified. The target combination commodity can be selected by the joint probability parameter, which helps to improve the accuracy of the target combination commodity, and the commodities can be arbitrarily combined, and the combination results are diversified. In addition, the information of products with high historical sales volume and high price can be used as candidate product sets to help increase sales amount; the joint probability parameters of products can be predicted based on product feature information; the target combination products can be selected by comprehensively combining scores and prices; and the model can be trained through an encoding and decoding network composed of long short-term memory networks.
[0109] Embodiment 3
[0110] Reference Figure 5 , which shows a structural diagram of a commodity combination device in an embodiment of the present disclosure, as follows.
[0111] The candidate commodity set generating module 301 is used to generate a candidate commodity set according to the historical sales volume and current price of the target commodity.
[0112] The probability parameter prediction module 302 is used to use a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities. The probability parameter prediction model includes an encoding network and a decoding network. The encoding network and the decoding network are long short-term memory networks. During training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network. The input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network. The initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model.
[0113] The combination product selection module 303 is used to select a target combination product according to the initial probability parameters of each product and the joint probability parameters between the products.
[0114] In summary, the embodiment of the present disclosure provides a commodity combination device, the device comprising: a candidate commodity set generation module, used to generate a candidate commodity set according to the historical sales volume and current price of the target commodity; a probability parameter prediction module, used to use a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities, the probability parameter prediction model comprising an encoding network and a decoding network, the encoding network and the decoding network are long short-term memory networks, during training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network, the input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network, the initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model; a combination commodity selection module, used to select the target combination commodity according to the initial probability parameters of each commodity and the joint probability parameters between commodities. The target combination commodity can be selected by the joint probability parameter, which helps to improve the accuracy of the target combination commodity, and the commodities can be arbitrarily combined, and the combination results are diversified.
[0115] Embodiment 3 is a device embodiment corresponding to Embodiment 1. The detailed description may refer to Embodiment 1 and will not be repeated here.
[0116] Embodiment 4
[0117] Reference Figure 6 , which shows a structural diagram of a commodity combination device in another embodiment of the present disclosure, as follows.
[0118] The feature information sample extraction module 401 is used to obtain the commodity set provided by each merchant and the feature information of each commodity in the commodity set.
[0119] The probability parameter sample statistics module 402 is used to count the initial probability parameters of each commodity provided by each merchant and the joint probability parameters between commodities from the historical orders of each merchant, and obtain sample values of the initial probability parameters and the joint probability parameters.
[0120] The model training module 403 is used to obtain a probability parameter prediction model through training of the characteristic information of each commodity, historical orders, and sample values of the initial probability parameters and the joint probability parameters.
[0121] The candidate product set generation module 404 is used to generate a candidate product set according to the historical sales volume and current price of the target product; optionally, in another embodiment of the present disclosure, the candidate product set generation module 404 includes:
[0122] The historical sales statistics submodule 4041 is used to obtain product information and to count the historical sales corresponding to the product information from historical orders.
[0123] The sales volume sorting submodule 4042 is used to sort the product information in descending order according to the historical sales volume to obtain a sales volume sorting sequence.
[0124] The price sorting submodule 4043 is used to obtain a plurality of commodity information from the front positions of the sales volume sorting sequence, and arrange them in ascending order according to the current prices to obtain a candidate commodity set.
[0125] The probability parameter prediction module 405 is used to predict the initial probability parameter of each commodity in the candidate commodity set and the joint probability parameter between commodities using a pre-trained probability parameter prediction model; optionally, in another embodiment of the present invention, the probability parameter prediction module 405 includes:
[0126] The feature information extraction submodule 4051 is used to obtain feature information of each product in the candidate product set, and the feature information includes at least one of: historical sales volume, category, word vector, and current price.
[0127] The probability parameter prediction submodule 4052 is used to input the characteristic information of the product into a pre-trained probability parameter prediction model to obtain the initial probability parameters of each product and the joint probability parameters between products. The probability parameter prediction model includes an encoding network and a decoding network. The encoding network and the decoding network are long short-term memory networks. During training, the input of the encoding network is the product characteristics of each product sample and the initial probability parameters and joint probability parameters output by the decoding network. The input of the decoding network is the product characteristics of each product in the historical order and the output of the encoding network. The initial probability parameters of each product in the historical order and the joint probability parameters between products are used to indicate the training of the probability parameter prediction model.
[0128] The combination product selection module 406 is used to select a target combination product according to the initial probability parameters of the products and the joint probability parameters between the products. Optionally, in another embodiment of the present disclosure, the combination product selection module 406 includes:
[0129] The candidate combination commodity selection submodule 4061 is used to select one or more combination commodities that meet a preset price condition and / or include preset commodities to obtain candidate combination commodities.
[0130] The combination score calculation submodule 4062 is used to calculate the combination score of each candidate combination product according to the initial probability parameters of each product and the joint probability parameters between the products.
[0131] The target combination product selection submodule 4063 is used to select one or more combination products with higher combination scores from the candidate combination products to obtain the target combination product.
[0132] Optionally, in another embodiment of the present disclosure, the model training module 403 includes:
[0133] The coding prediction submodule is used to input the characteristic information of each commodity and the predicted value of the joint probability parameter fed back by the coding network into the coding network to obtain a first prediction vector.
[0134] The decoding prediction submodule is used to input the first prediction vector and the feature information of each commodity in the historical order into the decoding network to obtain the predicted value of the joint probability parameter between the commodities.
[0135] The loss value calculation submodule is used to calculate the predicted value of the joint probability parameter and the loss value between the sample values.
[0136] The model generation submodule is used to form a probability parameter prediction model for the encoding network and decoding network in the current state when the loss value is less than a preset loss value threshold.
[0137] Optionally, in another embodiment of the present disclosure, the above-mentioned combined score calculation submodule 4062 includes:
[0138] The combination score calculation unit is used to calculate, for each candidate combination product, an average value of the initial probability parameter of the first product of the candidate combination product and the joint probability parameters of the included products to obtain a combination score.
[0139] In summary, the embodiments of the present disclosure provide a commodity combination device, which includes: a feature information sample extraction module, which is used to obtain a commodity set provided by each merchant and feature information of each commodity in the commodity set; a probability parameter sample statistics module, which is used to count the initial probability parameters of each commodity provided by the merchant and the joint probability parameters between commodities from the historical orders of each merchant, and obtain sample values of the initial probability parameters and the joint probability parameters; a model training module, which is used to obtain a probability parameter prediction model through training the feature information of each commodity, historical orders, and sample values of the initial probability parameters and the joint probability parameters; a candidate commodity set generation module, which is used to generate a candidate commodity set according to the historical sales volume and current price of the target commodity; a probability parameter prediction module, which is used to adopt pre-trained The trained probability parameter prediction model predicts the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities. The probability parameter prediction model includes an encoding network and a decoding network. The encoding network and the decoding network are long short-term memory networks. During training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network. The input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network. The initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model. The combination commodity selection module is used to select the target combination commodity according to the initial probability parameters of each commodity and the joint probability parameters between commodities. The target combination commodity can be selected by the joint probability parameters, which helps to improve the accuracy of the target combination commodity, and the commodities can be arbitrarily combined, and the combination results are diversified. In addition, the commodity information with high historical sales volume and high price can be obtained as the candidate commodity set, which helps to increase the sales amount; the joint probability parameters of commodities can be predicted according to commodity feature information; the target combination commodity can be selected by comprehensively combining the score and price; the model training can be realized by the encoding and decoding network composed of long short-term memory networks.
[0140] Embodiment 4 is a device embodiment corresponding to Embodiment 2. The detailed description may refer to Embodiment 2 and will not be repeated here.
[0141] The embodiment of the present disclosure also provides an electronic device, referring to Figure 7 , including: a processor 501, a memory 502, and a computer program 5021 stored in the memory 502 and executable on the processor, wherein the processor 501 implements the commodity combination method of the aforementioned embodiment when executing the program.
[0142] An embodiment of the present disclosure further provides a readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the commodity combination method of the aforementioned embodiment.
[0143] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0144] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system or other device. Various general purpose systems may also be used together with the teachings based thereon. According to the above description, it is apparent that the structure required for constructing such systems is. In addition, the embodiments of the present disclosure are not directed to any particular programming language either. It should be understood that the contents of the embodiments of the present disclosure described herein may be realized using various programming languages, and the description of the specific languages above is intended to disclose the best mode of implementation of the embodiments of the present disclosure.
[0145] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the embodiments of the present disclosure can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0146] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present disclosure, the various features of the embodiments of the present disclosure are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be interpreted as reflecting the following intention: that the claimed embodiments of the present disclosure require more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, the inventive aspects lie in less than all the features of the single embodiment disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself as a separate embodiment of the embodiments of the present disclosure.
[0147] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0148] The various component embodiments of the embodiments of the present disclosure may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the commodity combination device according to the embodiments of the present disclosure. The embodiments of the present disclosure may also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program implementing an embodiment of the present disclosure may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0149] It should be noted that the above embodiments illustrate rather than limit the embodiments of the present disclosure, and that those skilled in the art may design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets should not be constructed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of multiple such elements. The embodiments of the present disclosure may be implemented by means of hardware including several different elements and by means of appropriately programmed computers. In a unit claim that lists several devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names.
[0150] 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 aforementioned method embodiments and will not be repeated here.
[0151] The above description is only a preferred embodiment of the embodiments of the present disclosure and is not intended to limit the embodiments of the present disclosure. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the embodiments of the present disclosure should be included in the protection scope of the embodiments of the present disclosure.
[0152] The above is only a specific implementation of the embodiment of the present disclosure, but the protection scope of the embodiment of the present disclosure is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed by the embodiment of the present disclosure, which should be included in the protection scope of the embodiment of the present disclosure. Therefore, the protection scope of the embodiment of the present disclosure should be based on the protection scope of the claims.
Claims
1. A commodity combination method, characterized in that: The method comprises: Generate a candidate product set based on the historical sales volume and current price of the target product, including: Obtain product information, and count historical sales corresponding to the product information from historical orders; Arranging the product information in descending order according to the historical sales volume to obtain a sales volume ranking sequence; Acquire multiple product information from the front positions of the sales volume sorting sequence, and arrange them in ascending order according to current prices to obtain a candidate product set; A pre-trained probability parameter prediction model is used to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities. The probability parameter prediction model includes an encoding network and a decoding network. The encoding network and the decoding network are long short-term memory networks. During training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network. The input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network. The initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model. The probability parameter prediction model is trained by the following steps: obtaining the commodity set provided by each merchant and the characteristic information of each commodity in the commodity set, wherein the characteristic information includes historical sales volume, current price, category, and word vector; Counting the initial probability parameters of each commodity provided by each merchant and the joint probability parameters between commodities from the historical orders of each merchant, and obtaining sample values of the initial probability parameters and the joint probability parameters; A probability parameter prediction model is obtained by training the characteristic information of each commodity, historical orders, and sample values of initial probability parameters and joint probability parameters; The step of selecting target combination commodities according to the initial probability parameters of the commodities and the joint probability parameters between the commodities comprises: Select one or more combination products that meet preset price conditions and / or include preset products to obtain candidate combination products; Calculating the combination score of each candidate combination product according to the initial probability parameters of each product and the joint probability parameters between the products, including: for each candidate combination product, calculating the average of the initial probability parameter of the first product of the candidate combination product and the joint probability parameters between the products included in the candidate combination product to obtain the combination score; One or more combination products with higher combination scores are selected from the candidate combination products to obtain a target combination product.
2. The method according to claim 1, characterized in that The step of using the pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities includes: Acquire feature information of each product in the candidate product set, where the feature information includes at least one of: historical sales volume, category, word vector, and current price; The characteristic information of the commodity is input into a pre-trained probability parameter prediction model to obtain the initial probability parameter of each commodity and the joint probability parameter between commodities.
3. The method according to claim 1, characterized in that The step of obtaining a probability parameter prediction model by training the characteristic information of each commodity, historical orders, and sample values of the initial probability parameter and the joint probability parameter comprises: Inputting the characteristic information of each commodity and the predicted value of the joint probability parameter fed back by the encoding network into the encoding network to obtain a first prediction vector; Inputting the first prediction vector and feature information of each product in the historical order into a decoding network to obtain a prediction value of a joint probability parameter between the products; Calculating the predicted value of the joint probability parameter and the loss value between the sample values; When the loss value is less than a preset loss value threshold, the encoding network and the decoding network in the current state constitute a probability parameter prediction model.
4. A commodity combination device, characterized in that: The device comprises: The candidate product set generation module is used to generate a candidate product set based on the historical sales volume and current price of the target product, including: Obtain product information, and count historical sales corresponding to the product information from historical orders; Arranging the product information in descending order according to the historical sales volume to obtain a sales volume ranking sequence; Acquire multiple product information from the front positions of the sales volume sorting sequence, and arrange them in ascending order according to current prices to obtain a candidate product set; A probability parameter prediction module is used to use a pre-trained probability parameter prediction model to predict the initial probability parameters of each commodity in the candidate commodity set and the joint probability parameters between commodities. The probability parameter prediction model includes an encoding network and a decoding network. The encoding network and the decoding network are long short-term memory networks. During training, the input of the encoding network is the commodity features of each commodity sample and the initial probability parameters and joint probability parameters output by the decoding network. The input of the decoding network is the commodity features of each commodity in the historical order and the output of the encoding network. The initial probability parameters of each commodity in the historical order and the joint probability parameters between commodities are used to indicate the training of the probability parameter prediction model. The probability parameter prediction model is trained by the following steps: obtaining the commodity set provided by each merchant and the characteristic information of each commodity in the commodity set, and the characteristic information includes historical sales, current price, category, and word vector; Counting the initial probability parameters of each commodity provided by each merchant and the joint probability parameters between commodities from the historical orders of each merchant, and obtaining sample values of the initial probability parameters and the joint probability parameters; A probability parameter prediction model is obtained by training the characteristic information of each commodity, historical orders, and sample values of initial probability parameters and joint probability parameters; The combination product selection module is used to select the target combination product according to the initial probability parameters of each product and the joint probability parameters between the products, including: Select one or more combination products that meet preset price conditions and / or include preset products to obtain candidate combination products; Calculating the combination score of each candidate combination product according to the initial probability parameters of each product and the joint probability parameters between the products, including: for each candidate combination product, calculating the average of the initial probability parameter of the first product of the candidate combination product and the joint probability parameters between the products included in the candidate combination product to obtain the combination score; One or more combination products with higher combination scores are selected from the candidate combination products to obtain a target combination product.
5. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the commodity combination method as described in one or more of claims 1 to 3 is implemented.
6. A readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the commodity combination method as described in one or more of method claims 1 to 3.
Citation Information
Patent Citations
Dish combination recommending method and dish combination recommending system based on required heat
CN105844357A
Commodity information recommending method and commodity information recommending system based on user historical behaviors
CN106485562A
Commodity purchase quantity prediction method and device based on deep learning
CN108764974A