A method and device for selecting consumables
By training the consumable selection model, using multiple dimension feature data of the target order data to determine the appropriate consumables, the problems of unreasonable and low efficiency of consumable selection in the prior art are solved, and the intelligence and cost reduction of consumable selection are achieved.
Patent Information
- Application Number
- CN202210201101.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-02
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2042-03-02
AI Technical Summary
The prior art lacks manual experience or incomplete conditions in the selection of consumables, resulting in poor rationality and low efficiency of consumables, resulting in waste of consumables and increased costs.
By obtaining feature data in multiple dimensions of multiple historical order data, the consumables selection model is trained, and the pre-trained model is used to determine the target consumables based on the feature data of multiple dimensions of the target order data, realizing intelligent and rational consumables selection.
It improves the efficiency of consumable selection, reduces the cost of consumable waste, and achieves more accurate and reasonable consumable selection.
Smart Images

Figure CN114676977B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method and device for selecting consumables. Background Art
[0002] Consumables, such as order consumables in e-commerce systems, are used to hold items in orders to achieve logistics distribution. At present, the selection of consumables is generally done manually based on experience or by the business system based on a single condition. However, when manual experience is insufficient or the conditions are not comprehensive, it is easy to lead to poor rationality and low efficiency in the selection of consumables, resulting in waste of consumables and increased costs. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides a method and device for selecting consumables, which can determine target consumables based on feature data of multiple dimensions of target order data and a pre-trained consumable selection model, thereby realizing intelligent and rational consumable selection, improving the efficiency of consumable selection, and reducing the cost of consumable waste.
[0004] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for selecting consumables is provided, comprising:
[0005] Obtain feature data of multiple dimensions of target order data;
[0006] Inputting the feature data of the multiple dimensions into a pre-trained consumables selection model to determine the target consumables corresponding to the target order data;
[0007] Among them, the consumable selection model is trained in the following manner: obtain multiple historical order data and consumable data corresponding to each historical order data, each historical order data includes feature data of multiple dimensions; train based on the feature data of multiple dimensions of multiple historical order data and the consumable data to obtain the consumable selection model.
[0008] Optionally, training is performed based on feature data of multiple dimensions of multiple historical order data and the consumables data to obtain the consumables selection model, including:
[0009] Training is performed based on the feature data of each dimension of each of the historical order data in multiple historical order data and the consumables data to obtain a decision tree model corresponding to each dimension; and the decision tree models corresponding to the various dimensions are combined to obtain the consumables selection model.
[0010] Optionally, inputting the feature data of the multiple dimensions into a pre-trained consumables selection model to determine the target consumables corresponding to the target order data includes:
[0011] Input the feature data of each dimension of the target order data into the consumable selection model to determine the consumable selection results corresponding to the dimensions of the target order data; determine the target consumables according to the consumable selection results corresponding to the dimensions of the target order data.
[0012] Optionally, inputting the feature data of each dimension of the target order data into the consumable selection model to determine the consumable selection result corresponding to the dimension of the target order data includes: matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model, so as to use the consumable selection result corresponding to the feature data range obtained by matching as the consumable selection result corresponding to the dimension of the target order data;
[0013] The target consumables are determined according to the consumable selection results corresponding to the various dimensions of the target order data, including: determining the selection probabilities of the various consumables corresponding to the target order data according to the consumable selection results corresponding to the various dimensions of the target order data, and selecting one that meets a preset probability from the various consumables as the target consumable according to the selection probabilities.
[0014] Optionally, matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model includes:
[0015] If the target order data includes only one item, matching the feature data of the item in each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model;
[0016] If the target order data includes multiple items, the sum of the feature data of the multiple items in each dimension of the target order data is determined, and the sum of the feature data is matched with the feature data range of the corresponding dimension in the consumable selection model.
[0017] Optionally, before determining the target consumables based on the consumables selection results corresponding to each dimension of the target order data, it also includes: determining that the feature data of each dimension of the target order data matches the feature data range of the corresponding dimension in the consumable selection model; otherwise, grouping all items in the target order data, determining the grouped consumables corresponding to each group, and using each of the grouped consumables as the target consumables.
[0018] Optionally, grouping all items in the target order data includes:
[0019] When the number of all the items is less than or equal to 2, each of the items is considered as a group;
[0020] When the number of all the items is greater than 2, an evaluation index value for grouping all the items according to multiple combination strategies is determined, a target combination strategy is screened from the multiple combination strategies according to the evaluation index value, and all the items in the target order data are grouped according to the target combination strategy.
[0021] According to another aspect of an embodiment of the present invention, there is provided a device for selecting consumables, comprising:
[0022] An acquisition module is used to acquire feature data of multiple dimensions of target order data;
[0023] A determination module, inputting the feature data of the multiple dimensions into a pre-trained consumables selection model to determine the target consumables corresponding to the target order data;
[0024] Among them, the consumable selection model is trained in the following manner: obtain multiple historical order data and consumable data corresponding to each historical order data, each historical order data includes feature data of multiple dimensions; train based on the feature data of multiple dimensions of multiple historical order data and the consumable data to obtain the consumable selection model.
[0025] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including:
[0026] one or more processors;
[0027] a storage device for storing one or more programs,
[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the consumables selection method provided by the present invention.
[0029] According to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method for selecting consumables provided by the present invention is implemented.
[0030] An embodiment of the above invention has the following advantages or beneficial effects: a consumables selection model is obtained by training the feature data of multiple dimensions of multiple historical order data and the consumables data corresponding to each historical order data. When determining the target consumables corresponding to the target order data, the feature data of multiple dimensions of the target order data is first obtained and input into the consumables selection model, thereby determining the target consumables corresponding to the target order data. The method of the embodiment of the present invention uses the consumables selection model to select target consumables according to the feature data of multiple dimensions, making the consumables selection more intelligent and rational, reducing the waste cost of consumables, and improving the operating efficiency of consumables selection.
[0031] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0033] Figure 1 is a schematic diagram of the main process of a method for selecting consumables according to an embodiment of the present invention;
[0034] Figure 2 is a schematic diagram of the main process of another method for selecting consumables according to an embodiment of the present invention;
[0035] Figure 3 is a schematic diagram of the main process of a method for grouping all items in a target order according to an embodiment of the present invention;
[0036] Figure 4 is a schematic diagram of a process of a method for selecting consumables according to an embodiment of the present invention;
[0037] Figure 5 is a schematic diagram of main modules of a consumables selection device according to an embodiment of the present invention;
[0038] Figure 6 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0039] Figure 7 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0040] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0041] Figure 1 is a schematic diagram of the main process of a method for selecting consumables according to an embodiment of the present invention, such as Figure 1 As shown, the method comprises the following steps:
[0042] Step S101: Acquire feature data of multiple dimensions of target order data;
[0043] Step S102: input feature data of multiple dimensions into a pre-trained consumables selection model to determine target consumables corresponding to the target order data.
[0044] In the embodiment of the present invention, consumables are used to pack items for logistics distribution, such as order consumables for packing items in an e-commerce system, such as packaging bags, packaging boxes, etc. For items in order data, if the consumables are too large, it is easy to cause waste of consumables. Therefore, reasonable selection of consumables is conducive to reducing the cost of consumable waste.
[0045] In an embodiment of the present invention, the pre-trained consumable selection model is trained in the following manner: first, multiple historical order data and consumable data corresponding to each historical order data are obtained, each historical order data includes feature data of multiple dimensions of the historical order data, and then training is performed based on the feature data of multiple dimensions of the multiple historical order data and the consumable data corresponding to each historical order data to obtain a consumable selection model.
[0046] Optionally, based on a large amount of historical order data and the consumables data corresponding to the historical order data, a plurality of historical order data with relatively reasonable consumable selection and the consumables data corresponding to each historical order data are selected as training data sets to train the consumables selection model, thereby making the obtained consumables selection model more accurate and reasonable when performing consumables selection.
[0047] In an embodiment of the present invention, the feature data of multiple dimensions may be one or more dimensions of length, width, height, weight, category, etc. of items in the historical order data or the target order data. When the historical order data or the target order data include multiple items, the feature data of each dimension may be the sum of the feature data of that dimension of the multiple items. By training with the feature data of multiple dimensions of multiple historical order data, a consumable selection model is obtained, so that the target consumables of the target order data can be determined according to the feature data of multiple dimensions, thereby enhancing the generalization ability of the model and making the consumable selection more accurate and reasonable.
[0048] Optionally, the consumable data includes a consumable identification, which is used to identify consumables of different sizes and / or types. Different consumables can be identified according to their size, such as volume, such as large bags, medium bags, small bags, etc. Different consumables can also be identified according to their type, such as whether they are frozen, such as freezers.
[0049] In an embodiment of the present invention, training is performed based on feature data of multiple dimensions of multiple historical order data and consumable data to obtain a consumable selection model, which may include: training a random forest model using feature data of multiple dimensions of multiple historical order data and consumable data corresponding to each historical order data, determining various parameters in the random forest model, and thereby obtaining a consumable selection model.
[0050] In an embodiment of the present invention, training is performed based on feature data and consumable data of multiple dimensions of multiple historical order data to obtain a consumable selection model, which may include: training based on feature data and corresponding consumable data of each dimension of each historical order data in the multiple historical order data to obtain a decision tree model corresponding to each dimension; and combining the decision tree models corresponding to each dimension to obtain a consumable selection model.
[0051] Optionally, the decision tree model can be trained using feature data of each dimension of the length dimension, width dimension, height dimension, type dimension, and category dimension in multiple historical order data and the consumables data corresponding to each historical order data to obtain a decision tree model corresponding to each dimension, and then obtain each decision tree model corresponding to each dimension, wherein each decision tree model is a branch of the random forest model, and a random forest model, i.e., a consumables selection model, can be obtained by combining each decision tree model. Optionally, the combination of each decision tree model can be implemented using an integrated algorithm, such as a bagging integrated algorithm, an XGboost algorithm, or an Adaboost algorithm (such as Adaboost.RT).
[0052] After obtaining the pre-trained consumables selection model, the target consumables corresponding to the target order data are determined using the pre-trained consumables selection model. First, feature data of multiple dimensions of the target order data are obtained, wherein the multiple dimensions of the target order data are one or more of the multiple dimensions of the historical order data; then, the feature data of the multiple dimensions of the target order data are input into the pre-trained consumables selection model to determine the consumables selection results corresponding to each dimension of the target order data, and then, the target consumables corresponding to the target order data are determined according to the consumables selection results corresponding to each dimension of the target order data.
[0053] According to an implementation of the embodiment of the present invention, Figure 2 As shown, the target consumables corresponding to the target order data include:
[0054] Step S201: Acquire feature data of multiple dimensions of target order data;
[0055] Step S202: inputting the feature data of each dimension of the target order data into the consumables selection model, matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumables selection model, and using the consumables selection result corresponding to the matched feature data range as the consumables selection result corresponding to each dimension of the target order data;
[0056] Step S203: determining the selection probability of each consumable corresponding to the target order data according to the consumable selection results corresponding to each dimension of the target order data;
[0057] Step S204: selecting one of the consumables that meets a preset probability as a target consumable from among the consumables according to the selection probability.
[0058] In an embodiment of the present invention, the consumable selection result corresponding to each dimension of the target order data is the consumable selection result corresponding to the feature range of the corresponding dimension in the consumable selection model, which can be selected as the selection probability of each consumable in each dimension of the target order data. For example, according to the feature data of the weight dimension of the target order data is 5kg, the feature data range of the weight dimension matched to the consumable selection model is less than or equal to 5kg, and the selection probabilities of consumables 1, consumables 2, consumables 3 and consumables 4 in the feature data range are 80%, 15%, 5% and 0% respectively, which is the selection probability of each consumable in the weight dimension of the target order data. Then, for any consumable, the average value of the selection probability of each dimension of the target order data for the any consumable is calculated, and the average value of the selection probability of each consumable by the target order data is used as the selection probability of each consumable corresponding to the target order data. Then, the average value of the selection probability of each consumable is calculated, and the one whose average value of the selection probability of each consumable meets the preset probability or the one whose average value of the selection probability of each consumable is the largest can be used as the target consumable corresponding to the target order data.
[0059] In the embodiment of the present invention, matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model may include:
[0060] Determine whether the target order data includes only one item or multiple items;
[0061] If the target order data includes only one item, the feature data of the item in each dimension of the target order data is matched with the feature data range of the corresponding dimension in the consumable selection model;
[0062] If the target order data includes multiple items, the sum of the feature data of the multiple items in each dimension of the target order data is determined, and the sum of the feature data is matched with the feature data range of the corresponding dimension in the consumable selection model.
[0063] In an embodiment of the present invention, if the target order data includes only one item, the feature data of each dimension of the item is directly matched with the feature data range of the corresponding dimension in the consumable selection model to determine the selection probability of the target order data for each consumable, and the consumable with the largest selection probability is used as the target consumable corresponding to the target order data; if the target order data includes multiple items, such as skuA (5kg, 100|50|30, hardware); skuB (6kg, 100|50|50; hardware); skuC (6kg, 100|50|50; hardware); the multiple items can be regarded as a whole item, and the feature data of each dimension of the whole item is the feature data of each dimension of the multiple items. The sum of the feature data, that is, the feature data of each dimension of the whole item are 17kg, 300|150|130, hardware, and then the feature data of each dimension of the whole item (that is, the sum of the feature data of each dimension of multiple items) is matched with the feature data range of the corresponding dimension in the consumables selection model, so as to match the consumables selection result corresponding to the obtained feature data range as the consumables selection result corresponding to each dimension of the whole item, that is, the selection probability of each consumable of the target order data under this dimension; then according to the consumables selection results corresponding to each dimension of the whole item, the selection probability of each consumable of the whole item under multiple dimensions is determined, and then the one with the largest selection probability is determined from each consumable as the target consumable.
[0064] Optionally, when the categories of multiple items in the target order data are different, the selection probabilities of each consumable corresponding to the target order data can be determined based on multiple dimensions other than the category, so as to determine the one with the highest selection probability from among the consumables as the target consumable; multiple items can also be grouped according to category, with items of different categories in different groups, and then for each group, the grouped consumables corresponding to each group can be determined based on feature data of multiple dimensions including the category, and each grouped consumable can be used as the target consumable.
[0065] Before determining the target consumables according to the consumable selection results corresponding to each dimension of the target order data, it also includes: determining that the feature data of each dimension of the target order data matches the feature data range of the corresponding dimension in the consumable selection model; otherwise, grouping all items in the target order data, determining the grouped consumables corresponding to each group, and using each grouped consumable as the target consumable. If there is at least one dimension of feature data in the target order data that does not match the feature data range of the corresponding dimension in the consumable selection model, that is, there is at least one dimension whose consumable selection result corresponding to the feature data range of the corresponding dimension matched in the consumable selection model is 0 (that is, it does not exist), then it is necessary to group all items in the target order data, determine the grouped consumables corresponding to each group, and use each grouped consumable as the target consumable of the target order data. Optionally, grouping can be performed by using one or more combination strategies.
[0066] For example, according to the feature data of each dimension of the five dimensions of weight, length, width, height and category in multiple historical order data and the consumables data corresponding to each historical order data, a decision tree model corresponding to each dimension is obtained by training, and then the decision tree models corresponding to each dimension are combined to obtain a consumables selection model. As shown in Tables 1-5, the selection probabilities of each consumable for different feature data ranges of each dimension of the consumables selection model are respectively shown. When selecting the target consumables of the target order data, the feature data of the five dimensions of weight, length, width, height and category in the target order data are first obtained, which are 5kg, 80cm, 50cm, 30cm and hardware respectively. The feature data of each dimension in the target order data is matched with the feature data range of the corresponding dimension in the consumables selection model to obtain the consumables selection results corresponding to each dimension of the target order data, that is, the selection probability of each consumable for the feature data range of the corresponding dimension, as shown in Table 6. Then, the selection probability of each consumable corresponding to the target order data is calculated according to the consumables selection model, that is, the average value of the selection probability of each consumable in each dimension, and the consumable with the largest average value of the selection probability, i.e., consumable 2 (middle), is used as the target consumable of the target order data.
[0067] Table 1
[0068]
[0069] Table 2
[0070]
[0071] Table 3
[0072]
[0073] Table 4
[0074]
[0075] Table 5
[0076]
[0077] Table 6
[0078]
[0079] In the embodiment of the present invention, Figure 3 As shown, all items in the target order data are grouped, including:
[0080] Step S301: Determine whether the number of all items is greater than 2; if not, execute step S302; if yes, execute step S303;
[0081] Step S302: each item in all items is regarded as a group;
[0082] Step S303: determining evaluation index values for grouping all items according to multiple combination strategies;
[0083] Step S304: screening a target combination strategy from multiple combination strategies according to the evaluation index value;
[0084] Step S305: group all items in the target order data according to the target combination strategy.
[0085] In an embodiment of the present invention, when grouping all items in the target order data, if there are only two items in the target order data, each item is regarded as a group, that is, all items are divided into two groups. If there is only one item in the target order data, the item can be regarded as a group. If there are more than two items in the target order data, all items are grouped according to multiple combination strategies. For example, if all items in the target order data are three items, namely, item 1, item 2 and item 3, the three items can be grouped according to three combination strategies. The first combination strategy: item 1 and item 2 are one group, and item 3 is another group; the second combination strategy: item 1 and item 3 are one group, and item 2 is another group; the third combination strategy: item 2 and item 3 are one group, and item 1 is another group; then for each combination strategy, the group consumables corresponding to each group in the combination strategy are determined, and then the group consumables corresponding to each combination strategy are determined.
[0086] After all items are grouped according to multiple combination strategies, evaluation index values for grouping all items according to the multiple combination strategies are determined. Optionally, the evaluation index value can be obtained by weighted summing the index value corresponding to each grouped consumable in each combination strategy and the preset weight of each grouped consumable.
[0087] Optionally, the evaluation index value may be the consumable cost corresponding to the target order data. For example, the cost of each grouped consumable determined by each combination strategy and the preset weight of each grouped consumable (such as 1) may be used to calculate the consumable cost corresponding to the target order data under each combination strategy. Then, the combination strategy with the lowest consumable cost is used as the target combination strategy. All items in the target order data are grouped according to the target combination strategy, and the grouped consumables corresponding to each group of the target combination strategy are used as target consumables.
[0088] In another optional implementation, the index value of each grouped consumable, that is, each consumable, can also be set according to business needs, such as a priority score, so that the evaluation index value can be obtained by weighted summing up the priority score of each grouped consumable determined by each combination strategy and the preset weight of each grouped consumable.
[0089] Among them, the priority score can also be determined according to the inventory of each grouped consumable, and then the evaluation index value of each combination strategy is determined. For example, the order of priority scores from high to low is set according to the order of inventory from high to low, that is, when the inventory of a certain grouped consumable is lower than the set threshold, and the inventory of other grouped consumables exceeds the set threshold, the priority score of other grouped consumables whose inventory exceeds the set threshold can be set higher than the grouped consumables whose inventory is lower than the set threshold, so as to calculate the evaluation index value according to the priority score of each grouped consumable in each component strategy and the preset weight of each grouped consumable, and select the combination strategy with the highest evaluation index value as the target combination strategy, so as to group all items in the target order data according to the target combination strategy.
[0090] In one implementation of the embodiment of the present invention, when all items in the target order data are grouped according to multiple combination strategies, when at least one group in a certain combination strategy does not match the corresponding grouped consumables, the at least one group can be further grouped, and the consumables of each group after the further grouping can be determined. For example, in the first combination strategy above, if the group corresponding to item 3 can match the grouped consumables, and the groups corresponding to items 1 and 2 cannot match the grouped consumables, the groups of items 1 and 2 are further grouped, that is, item 1 and item 2 are respectively grouped, and then the grouped consumables corresponding to item 1 and item 2 are respectively determined.
[0091] like Figure 4 The figure is a flow chart of a method for selecting consumables according to an embodiment of the present invention. The method for selecting consumables comprises the following steps:
[0092] Step S401: Acquire feature data of multiple dimensions of target order data;
[0093] Step S402: inputting feature data of multiple dimensions into a pre-trained consumable selection model, matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model, wherein the feature data of each dimension is the sum of the feature data of the dimension of all items in the target order data;
[0094] Step S403: determine whether the feature data of each dimension matches the feature data range of the corresponding dimension in the consumable selection model; if so, execute step S404; if not, execute step S406;
[0095] Step S404: taking the consumable selection result corresponding to the feature data range of the corresponding dimension in the consumable selection model as the consumable selection result corresponding to the corresponding dimension in the target order data;
[0096] Step S405: obtaining the selection probability of each consumable corresponding to the target order data according to the consumable selection results corresponding to each dimension in the target order data, and taking the consumable with the highest selection probability as the target consumable corresponding to the target order data;
[0097] Step S406: Determine whether the number of all items in the target order data is greater than 2, if not, execute step S407; if yes, execute step S408;
[0098] Step S407: treat each item in the target order data as a group; then execute step S410;
[0099] Step S408: grouping all items in the target order data according to multiple combination strategies, and determining the evaluation index value (consumables cost) corresponding to each combination strategy;
[0100] Step S409: taking the combination strategy with the lowest evaluation index value as the target combination strategy, and grouping all items in the target order data according to the target combination strategy;
[0101] Step S410: Acquire feature data of multiple dimensions of each group;
[0102] Step S411: input the features of multiple dimensions of each group into the pre-trained consumable selection model, and match the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model, wherein the feature data of each dimension is the sum of the feature data of the dimension of all items in each group;
[0103] Step S412: taking the consumable selection result corresponding to the feature data range of the corresponding dimension in the consumable selection model as the consumable selection result corresponding to the corresponding dimension of each group;
[0104] Step S413: obtaining the selection probability of each consumable corresponding to each group according to the consumable selection results corresponding to each dimension of each group;
[0105] Step S414: The consumable with the highest selection probability is selected as the grouped consumable corresponding to each group, and each grouped consumable is used as the target consumable.
[0106] The method for selecting consumables provided in the embodiment of the present invention uses feature data of multiple dimensions of multiple historical order data and consumable data corresponding to each historical order data to train a consumable selection model, and inputs feature data of multiple dimensions of target order data into the consumable selection model to determine the consumable selection result of each dimension of the target order data, and determines the target consumables corresponding to the target order data according to the consumable selection results of each dimension. When all items in the target order data as a whole cannot match the corresponding consumables, all items in the target order data can be grouped to determine each grouped consumable, and each grouped consumable is used as the target consumable. When grouping, it can also be grouped according to multiple combination strategies, and the target combination strategy is screened out according to the evaluation index value, and grouped according to the target combination strategy to determine the target consumable. The method of the embodiment of the present invention realizes the intelligent and rational selection of consumables, improves the efficiency of consumable selection, and reduces the cost of consumable waste. At the same time, reasonable consumables also improve the user experience.
[0107] like Figure 5 As shown, another aspect of the embodiment of the present invention provides a consumables selection device 500, comprising:
[0108] Acquisition module 501, acquiring feature data of multiple dimensions of target order data;
[0109] A determination module 502 inputs the feature data of multiple dimensions into a pre-trained consumable selection model to determine the target consumable corresponding to the target order data;
[0110] The model training module 503 obtains multiple historical order data and consumable data corresponding to each historical order data, each historical order data includes feature data of multiple dimensions; training is performed based on the feature data of multiple dimensions of the multiple historical order data and the consumable data to obtain a consumable selection model.
[0111] In an embodiment of the present invention, the model training module 503 is further used to: perform training based on feature data and consumables data of each dimension of each historical order data in multiple historical order data to obtain a decision tree model corresponding to each dimension; and combine the decision tree models corresponding to each dimension to obtain a consumables selection model.
[0112] In an embodiment of the present invention, the determination module 502 is further used to: input the feature data of each dimension of the target order data into the consumable selection model to determine the consumable selection results corresponding to each dimension of the target order data; and determine the target consumables based on the consumable selection results corresponding to each dimension of the target order data.
[0113] In an embodiment of the present invention, the determination module 502 is further used to: match the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model, so as to match the consumable selection result corresponding to the obtained feature data range as the consumable selection result corresponding to the dimension of the target order data; and is also used to: determine the selection probability of each consumable corresponding to the target order data according to the consumable selection results corresponding to each dimension of the target order data, and select one that meets a preset probability from each consumable as the target consumable according to the selection probability.
[0114] In an embodiment of the present invention, the determination module 502 is further used to: if the target order data includes only one item, match the feature data of the item in each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model; if the target order data includes multiple items, determine the sum of the feature data of the multiple items in each dimension of the target order data, and match the sum of the feature data with the feature data range of the corresponding dimension in the consumable selection model.
[0115] In an embodiment of the present invention, the determination module 502 is also used to: before determining the target consumables based on the consumables selection results corresponding to each dimension of the target order data, determine that the feature data of each dimension of the target order data matches the feature data range of the corresponding dimension in the consumables selection model; otherwise, group all items in the target order data, determine the grouped consumables corresponding to each group, and use each grouped consumable as the target consumable.
[0116] In the embodiment of the present invention, the determination module 502 is further used to: when the number of all items is less than or equal to 2, each of all items is grouped; when the number of all items is greater than 2, determine the evaluation index value for grouping all items according to multiple combination strategies, screen a target combination strategy from the multiple combination strategies according to the evaluation index value, and group all items in the target order data according to the target combination strategy.
[0117] The consumables selection device of the embodiment of the present invention can be connected to a business system (such as a warehouse operation system). When order data is generated, feature data of multiple dimensions of the order data is obtained, and then the reasonable consumables corresponding to the order data can be obtained through the consumables selection device. Optionally, the consumables selection device can be used as a middleware to provide consumables selection services; it can also use interface technology such as publishing interfaces through protocols (such as http, rpc and other protocols) to provide consumables selection services; it can also use components to provide consumables selection services, for example, in the form of java jar packages introduced into the business system. By introducing the consumables selection device into the business system, the consumables selected for each order data can be determined more efficiently and reasonably, thereby improving the operating efficiency and overcoming the defects of unreasonable and inefficient consumables selection caused by manual selection and single condition selection.
[0118] Another aspect of an embodiment of the present invention provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for selecting consumables of an embodiment of the present invention.
[0119] Another aspect of the embodiments of the present invention provides a computer-readable medium having a computer program stored thereon, and when the program is executed by a processor, the method for selecting consumables according to the embodiments of the present invention is implemented.
[0120] Figure 6 An exemplary system architecture 600 is shown to which the method or apparatus for selecting consumables according to the embodiments of the present invention may be applied.
[0121] like Figure 6 As shown, system architecture 600 may include terminal devices 601, 602, 603, network 604 and server 605. Network 604 is used to provide a medium for communication links between terminal devices 601, 602, 603 and server 605. Network 604 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0122] Users can use terminal devices 601, 602, and 603 to interact with server 605 through network 604 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 601, 602, and 603, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).
[0123] The terminal devices 601 , 602 , and 603 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0124] The server 605 may be a server that provides various services, such as a background management server (only for example) that provides support for shopping websites browsed by users using the terminal devices 601, 602, and 603. The background management server may analyze and process the received consumable selection request and other data, and feed back the processing result (such as the consumable selection result - only for example) to the terminal device.
[0125] It should be noted that the method for selecting consumables provided in the embodiment of the present invention is generally executed by the server 605 , and accordingly, the device for selecting consumables is generally disposed in the server 605 .
[0126] It should be understood that Figure 6 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0127] Reference below Figure 7 , which shows a schematic diagram of the structure of a computer system 700 of a terminal device suitable for implementing an embodiment of the present invention. Figure 7 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0128] like Figure 7 As shown, the computer system 700 includes a central processing unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the system 700 are also stored. The CPU 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0129] The following components are connected to the I / O interface 705: an input section 706 including a keyboard, a mouse, etc.; an output section 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, a modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage section 708 as needed.
[0130] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the central processing unit (CPU) 701, the above-mentioned functions defined in the system of the present invention are executed.
[0131] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0132] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0133] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor includes an acquisition module, a determination module, and a model training module. The names of these modules do not, in some cases, constitute a limitation on the modules themselves. For example, the acquisition module may also be described as "acquiring feature data of multiple dimensions of target order data."
[0134] As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiment; or it may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device includes: obtaining feature data of multiple dimensions of target order data; inputting the feature data of multiple dimensions into a pre-trained consumable selection model to determine the target consumables corresponding to the target order data; wherein the consumable selection model is trained in the following manner: obtaining multiple historical order data and consumable data corresponding to each historical order data, each historical order data including feature data of multiple dimensions; training based on the feature data of multiple dimensions of multiple historical order data and consumable data to obtain a consumable selection model.
[0135] According to the technical solution of the embodiment of the present invention, a consumable selection model is obtained by training the feature data of multiple dimensions of multiple historical order data and the consumable data corresponding to each historical order data. The consumable selection results of each dimension of the target order data are determined by inputting the feature data of multiple dimensions of the target order data into the consumable selection model. According to the consumable selection results of each dimension, the target consumable corresponding to the target order data is determined. When all items in the target order data as a whole cannot be matched to the corresponding consumables, all items in the target order data can be grouped to determine each grouped consumable, and each grouped consumable is used as the target consumable. When grouping, it can also be grouped according to multiple combination strategies, and the target combination strategy is screened out according to the evaluation index value, and grouped according to the target combination strategy to determine the target consumable. The method of the embodiment of the present invention realizes the intelligent and rational selection of consumables, improves the efficiency of consumable selection, reduces the cost of consumable waste, and at the same time, reasonable consumables also improve the user experience.
[0136] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for selecting consumables, characterized in that: include: Obtain feature data of multiple dimensions of target order data; Inputting the feature data of the multiple dimensions into a pre-trained consumables selection model to determine the target consumables corresponding to the target order data; The consumables selection model is trained in the following manner: obtaining a plurality of historical order data and consumables data corresponding to each of the historical order data, wherein each of the historical order data includes feature data of multiple dimensions; training is performed based on the feature data of multiple dimensions of the plurality of historical order data and the consumables data to obtain the consumables selection model; Inputting the feature data of the multiple dimensions into a pre-trained consumable selection model to determine the target consumables corresponding to the target order data, including: inputting the feature data of each dimension of the target order data into the consumable selection model to determine the consumable selection result corresponding to each dimension of the target order data; determining the target consumables according to the consumable selection results corresponding to each dimension of the target order data; Among them, inputting the feature data of each dimension of the target order data into the consumable selection model to determine the consumable selection result corresponding to each dimension of the target order data includes: matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model, so as to use the consumable selection result corresponding to the feature data range obtained by matching as the consumable selection result corresponding to the dimension of the target order data; The target consumables are determined according to the consumable selection results corresponding to the various dimensions of the target order data, including: determining the selection probabilities of the various consumables corresponding to the target order data according to the consumable selection results corresponding to the various dimensions of the target order data, and selecting one that meets a preset probability from the various consumables as the target consumable according to the selection probabilities.
2. The method according to claim 1, characterized in that The consumables selection model is obtained by training based on feature data of multiple dimensions of multiple historical order data and the consumables data, including: Training is performed based on the feature data of each dimension of each of the historical order data in multiple historical order data and the consumables data to obtain a decision tree model corresponding to each dimension; and the decision tree models corresponding to the various dimensions are combined to obtain the consumables selection model.
3. The method according to claim 1, characterized in that Matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model includes: If the target order data includes only one item, matching the feature data of the item in each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model; If the target order data includes multiple items, the sum of the feature data of the multiple items in each dimension of the target order data is determined, and the sum of the feature data is matched with the feature data range of the corresponding dimension in the consumable selection model.
4. The method according to claim 1, characterized in that: Before determining the target consumables according to the consumable selection results corresponding to each dimension of the target order data, it also includes: determining that the feature data of each dimension of the target order data matches the feature data range of the corresponding dimension in the consumable selection model; otherwise, grouping all items in the target order data, determining the grouped consumables corresponding to each group, and using each of the grouped consumables as the target consumables.
5. The method according to claim 4, characterized in that Group all items in the target order data, including: When the number of all the items is less than or equal to 2, each of the items is considered as a group; When the number of all the items is greater than 2, an evaluation index value for grouping all the items according to multiple combination strategies is determined, a target combination strategy is screened from the multiple combination strategies according to the evaluation index value, and all the items in the target order data are grouped according to the target combination strategy.
6. A device for selecting consumables, characterized in that: include: An acquisition module is used to acquire feature data of multiple dimensions of target order data; A determination module, inputting the feature data of the multiple dimensions into a pre-trained consumables selection model to determine the target consumables corresponding to the target order data; The consumables selection model is trained in the following manner: obtaining a plurality of historical order data and consumables data corresponding to each of the historical order data, wherein each of the historical order data includes feature data of multiple dimensions; training is performed based on the feature data of multiple dimensions of the plurality of historical order data and the consumables data to obtain the consumables selection model; Inputting the feature data of the multiple dimensions into a pre-trained consumable selection model to determine the target consumables corresponding to the target order data, including: inputting the feature data of each dimension of the target order data into the consumable selection model to determine the consumable selection result corresponding to each dimension of the target order data; determining the target consumables according to the consumable selection results corresponding to each dimension of the target order data; Among them, inputting the feature data of each dimension of the target order data into the consumable selection model to determine the consumable selection result corresponding to each dimension of the target order data includes: matching the feature data of each dimension of the target order data with the feature data range of the corresponding dimension in the consumable selection model, so as to use the consumable selection result corresponding to the feature data range obtained by matching as the consumable selection result corresponding to the dimension of the target order data; The target consumables are determined according to the consumable selection results corresponding to the various dimensions of the target order data, including: determining the selection probabilities of the various consumables corresponding to the target order data according to the consumable selection results corresponding to the various dimensions of the target order data, and selecting one that meets a preset probability from the various consumables as the target consumable according to the selection probabilities.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 5.
8. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Cargo management method and system for online purchasing platform
CN112508493A
Method and device for processing order data
CN113762835A