Order splitting processing method, device, computer equipment and storage medium
By converting warehouse inventory data in the e-commerce snack industry into decimal and performing optimization calculations, the problem of order splitting and warehouse selection in the existing technology is solved, inventory management and logistics cost optimization is achieved, shipping efficiency is improved and freight costs are reduced.
Patent Information
- Application Number
- CN202411493173.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-06-03
- Estimated Expiration
- 2044-10-24
AI Technical Summary
The existing technology is too simple in the order splitting and warehouse selection in the e-commerce snack industry, which fails to effectively optimize inventory and reduce logistics costs, resulting in inefficient delivery efficiency and unreasonable freight costs.
By obtaining inventory data, the inventory situation of each warehouse is converted into decimal and stored as key-value pairs, the shipment warehouse quantity is optimized, the situation of multiple warehouses of the same goods is checked and processed, and finally select the lowest cost delivery combination through cost calculation, and update the inventory and display the delivery situation.
Automatic order splitting and warehouse selection are realized, inventory management and logistics costs are optimized, shipment efficiency is improved, and freight costs are reduced.
Smart Images

Figure CN119026753B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an order splitting method, and more specifically to an order splitting processing method, device, computer device, and storage medium. Background Art
[0002] In the e-commerce snack industry, an order usually contains multiple items, and there are often situations where some items are out of stock in the warehouse. This leads to the following problems: it is necessary to determine which warehouses can provide all the out-of-stock items and decide which warehouse to ship from through manual communication to ensure the most reasonable logistics cost. This manual processing method is inefficient and affects the timeliness of shipping.
[0003] Currently, when dealing with this problem, e-commerce warehouses generally take the measure of finding a warehouse that can fully meet the order requirements and giving priority to the warehouse closest to the shipping address for shipping. If some items cannot be found in this warehouse, they are supplemented from the warehouse with the second-closest distance. The goal of this approach is to complete the order in the form of multiple packages, but both the efficiency and logistics cost are not satisfactory. To improve the shipping efficiency and reduce the logistics cost, an efficient system can be established to automatically split the order, select the best combination of warehouses to meet the order requirements, and thus optimize the inventory management and logistics cost. Currently, although offline warehouses try to replenish goods as much as possible, simple order splitting is still carried out on the system. This approach fails to effectively manage the inventory and accurately calculate the logistics fees, resulting in often unreasonable freight costs and affecting the balance between processing efficiency and cost.
[0004] Therefore, it is necessary to design a new method to solve the problems that the existing technology is too simple in order splitting and warehouse selection, fails to effectively optimize the inventory and reduce the logistics cost, resulting in low shipping efficiency and unreasonable freight costs. Summary of the Invention
[0005] The purpose of the present invention is to overcome the defects of the existing technology and provide an order splitting processing method, device, computer device, and storage medium.
[0006] To achieve the above purpose, the present invention adopts the following technical solutions: The order splitting processing method includes:
[0007] Obtain the inventory data of the items and record whether the items in the order are fully shipped;
[0008] Convert the inventory situation of each warehouse in the order into decimal and store it as a key-value pair to obtain a storage result;
[0009] Perform an optimal solution calculation for the number of shipping warehouses according to the storage result to obtain an optimal combination of warehouses;
[0010] Check whether there is a situation where multiple warehouses have the same goods in the optimal warehouse combination through bitwise operations;
[0011] When there is a situation where multiple warehouses have the same goods in the optimal warehouse combination, construct a combination set;
[0012] Perform data translation and cost calculation on the combination set, and determine the shipping combination with the lowest cost to obtain the final shipping combination;
[0013] Update the inventory according to the final shipping combination, and display the shipping situation and order quantity of each warehouse.
[0014] Its further technical solution is: obtain the inventory data of the goods, and record whether the goods in the order are fully shipped, including:
[0015] Select the allocated warehouses, and obtain the inventory data of each kind of goods in each warehouse in the order;
[0016] Obtain the logistics tariff template and store it;
[0017] Record the goods numbers in the order, and convert the goods numbers into binary decimal integers.
[0018] Its further technical solution is: convert the inventory situation of each warehouse in the order into decimal and store it as key-value pairs to obtain the storage result, including:
[0019] Compare the quantity of the goods in the order with the inventory of the allocated warehouses to check whether the allocated warehouses are out of stock;
[0020] When the allocated warehouses are not out of stock, use binary calculation to record the inventory status and convert it into decimal for storage to obtain the decimal result;
[0021] Store the warehouse ID and the decimal result as key-value pairs to obtain the storage result.
[0022] Its further technical solution is: perform optimal solution calculation on the number of shipping warehouses according to the storage result to obtain the optimal warehouse combination, including:
[0023] Sort the decimal results in the storage result in descending order to obtain the sorting result;
[0024] Use recursive calculation and exclusive OR operation to find the minimum number of warehouses that meet the conditions in the sorting result to obtain the screening result;
[0025] Reduce the screening result to obtain the optimal warehouse combination.
[0026] Its further technical solution is: The method for checking whether there is a situation of multiple warehouses having the same goods in the optimal warehouse combination obtained by bit operation includes:
[0027] Perform a bitwise OR operation on each warehouse combination in the optimal warehouse combination to check whether the warehouse combination can meet the demand for all goods in the order;
[0028] For the warehouse combination that can meet the demand for all goods in the order, determine whether there is a situation of multiple warehouses having the same goods.
[0029] Its further technical solution is: The method for constructing the combination set includes:
[0030] For the warehouse combination that has the situation of multiple warehouses having the same goods and can meet the demand for all goods in the order, construct the storage result of the combination of multiple warehouses having the same goods to obtain the construction result;
[0031] Find out the warehouse combinations in the construction result that meet the condition that all goods are in stock through bit operation to obtain the combination set.
[0032] Its further technical solution is: The method for performing data translation and cost calculation on the combination set and determining the shipping combination with the lowest cost to obtain the final shipping combination includes:
[0033] Translate the data in the combination set to determine the specific goods in each warehouse;
[0034] Calculate the weight, volume, and receiving address information of the order according to the specific goods in each warehouse;
[0035] Calculate the total cost of each intermediate warehouse combination according to the logistics tariff template and select the shipping combination with the lowest cost to obtain the final shipping combination.
[0036] The present invention also provides an order splitting processing device, including:
[0037] An inventory data acquisition unit, configured to acquire the inventory data of goods and record whether the goods in the order are fully shipped;
[0038] A conversion storage unit, configured to convert the inventory situation of each warehouse in the order into a decimal number and store it as a key-value pair to obtain the storage result;
[0039] A calculation unit, configured to perform an optimal solution calculation for the number of shipping warehouses according to the storage result to obtain the optimal warehouse combination;
[0040] An inspection unit, configured to check whether there is a situation of multiple warehouses having the same goods in the optimal warehouse combination through bit operation;
[0041] A construction unit, configured to construct a combination set when there is a situation of multiple warehouses having the same goods in the optimal warehouse combination;
[0042] A combination determination unit for performing data translation and cost calculation on the combination set, and determining the shipping combination with the lowest cost to obtain the final shipping combination;
[0043] An update unit for updating the inventory according to the final shipping combination, and displaying the shipping situation and order quantity of each warehouse.
[0044] The present invention also provides a computer device, which includes a memory and a processor. A computer program is stored on the memory, and when the processor executes the computer program, the above method is implemented.
[0045] The present invention also provides a storage medium, which stores a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0046] The beneficial effects of the present invention compared with the prior art are as follows: By obtaining inventory data and storing the inventory situation of each warehouse in decimal. Then, calculating the optimal shipping warehouse combination, checking and processing the situation of the same goods in multiple warehouses. Finally, selecting the shipping combination with the lowest cost through cost calculation, updating the inventory and displaying the shipping situation; solving the problems that the order splitting and warehouse selection in the prior art are too simple, and the inventory cannot be effectively optimized and the logistics cost cannot be reduced, resulting in low shipping efficiency and unreasonable freight costs.
[0047] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. Description of the Drawings
[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0049] Figure 1 It is a schematic diagram of the application scenario of the order splitting processing method provided by the embodiment of the present invention;
[0050] Figure 2 It is a schematic flowchart of the order splitting processing method provided by the embodiment of the present invention;
[0051] Figure 3 It is a schematic sub - flowchart of the order splitting processing method provided by the embodiment of the present invention;
[0052] Figure 4 It is a schematic sub - flowchart of the order splitting processing method provided by the embodiment of the present invention;
[0053] Figure 5 Schematic diagram of a sub - process of the order splitting processing method provided by an embodiment of the present invention;
[0054] Figure 6 Schematic diagram of a sub - process of the order splitting processing method provided by an embodiment of the present invention;
[0055] Figure 7 Schematic diagram of a sub - process of the order splitting processing method provided by an embodiment of the present invention;
[0056] Figure 8 Schematic diagram of a sub - process of the order splitting processing method provided by an embodiment of the present invention;
[0057] Figure 9 Schematic block diagram of the order splitting processing device provided by an embodiment of the present invention;
[0058] Figure 10 Schematic block diagram of the computer device provided by an embodiment of the present invention. Detailed implementation manners
[0059] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0060] It should be understood that when used in this specification and the appended claims, the terms "comprises" and "comprising" indicate the presence of the described features, wholes, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.
[0061] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in this specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0062] It should be further understood that the term "and / or" used in this specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0063] Please refer to Figure 1 and Figure 2 , Figure 1 which is a schematic diagram of the application scenario of the order splitting processing method provided by an embodiment of the present invention.Figure 2 This is a schematic flowchart of the order splitting processing method provided by an embodiment of the present invention. This order splitting processing method is applied to a server. The server interacts with a terminal. When processing a large number of orders, to avoid memory exhaustion, the inventory is first abstracted as a two-dimensional matrix, a virtual two-dimensional table is constructed based on whether there is a shortage of goods, and it is stored in binary format. Using the dynamic programming (DP) algorithm in combination with existing data (such as logistics fees and inventory), the optimal number of warehouses is calculated, and a threshold is set to reduce invalid combination calculations. When multiple warehouses offer the same goods, all possible warehouse combinations are recursively generated using binary operations (such as bitwise AND, bitwise OR, bitwise XOR, bitwise negation). Based on these combinations, the freight of each combination is calculated, and the combination with the lowest cost is selected. Finally, the warehouse combinations that meet the shipping criteria are organized into a key-value structure, and the optimal freight combination is screened through information such as weight and volume, and a bill splitting suggestion is provided to improve the order processing efficiency. It can solve the problems in the prior art that the order splitting and warehouse selection are too simple, and the inventory cannot be effectively optimized and the logistics cost cannot be reduced, resulting in low shipping efficiency and unreasonable freight costs.
[0064] Figure 2 This is a schematic flowchart of the order splitting processing method provided by an embodiment of the present invention. As Figure 2 shown, this method includes the following steps S110 to S170.
[0065] S110. Obtain the inventory data of the goods and record whether the goods in the order are fully shipped.
[0066] In one embodiment, please refer to Figure 3 , the above step S110 may include steps S111 to S113.
[0067] S111. Select the allocated warehouse and obtain the inventory data of each kind of goods in each warehouse in the order.
[0068] In this embodiment, select the warehouse to be allocated and collect the inventory information of each kind of goods in each warehouse in the order. This data includes the current inventory quantity of each kind of goods in each warehouse.
[0069] S112. Obtain the logistics fee template and store it.
[0070] In this embodiment, obtain the corresponding logistics fee template and store it in the form of logistics + warehouse for subsequent calculation.
[0071] S113. Record the goods numbers in the order and convert the goods numbers into binary decimal integers.
[0072] In this embodiment, record the subscript of the order goods, and convert the order goods into a binary decimal integer by shifting the goods digits to the left by -1, so as to efficiently process and analyze inventory data.
[0073] S120. Convert the inventory situation of each warehouse in the order into a decimal number and store it as a key-value pair to obtain a storage result.
[0074] In this embodiment, the storage result refers to the result obtained after storing the warehouse id and the decimal result as a key-value pair.
[0075] In one embodiment, please refer to Figure 4 , the above step S120 may include steps S121 to S123.
[0076] S121. Compare the quantity of goods in the order with the inventory of the warehouses participating in the allocation to check whether the allocated warehouses are out of stock.
[0077] In this embodiment, compare the quantity of each type of goods in the order with the inventory of the warehouses participating in the allocation to determine whether the warehouses have sufficient goods. If the inventory of a certain warehouse is not enough to meet the order demand, mark that warehouse as out-of-stock.
[0078] S122. When the allocated warehouses are not out of stock, record the inventory status using binary calculation and convert it to decimal for storage to obtain a decimal result.
[0079] In this embodiment, the decimal result refers to the decimal conversion result of the inventory status.
[0080] For warehouses with sufficient inventory, record their inventory status using binary calculation. This usually involves representing the inventory situation of each type of goods with binary bits. For example, each binary bit can represent the inventory status of a good, 1 means in stock, and 0 means out of stock. Then convert this binary representation into a decimal value to simplify storage and subsequent calculations.
[0081] S123. Store the warehouse ID and the decimal result as a key-value pair to obtain a storage result.
[0082] In this embodiment, store the warehouse ID and its corresponding decimal result as a key-value pair. This can efficiently retrieve and manage inventory data, facilitating quick search and comparison of the inventory status of each warehouse in subsequent processing.
[0083] Using binary and decimal to represent the inventory status simplifies the data processing process and speeds up the calculation; the key-value pair storage method reduces data redundancy, making the retrieval of warehouse inventory status more direct; by converting the inventory status into decimal, it is convenient to perform further operations and comparisons, such as calculating the optimal distribution plan.
[0084] S130. Calculate the optimal number of shipping warehouses based on the storage result to obtain an optimal combination of warehouses.
[0085] In one embodiment, refer to Figure 4 , the above step S130 may include steps S131 to S133.
[0086] S131. Sort the decimal results in the storage result in descending order to obtain a sorted result.
[0087] In this embodiment, the sorted result refers to sorting the storage result in descending order.
[0088] Arrange all the decimal values in the storage result in descending order. These decimal values represent the coverage of different warehouses for goods.
[0089] The sorted result makes the subsequent calculations more efficient. Prioritizing the processing of warehouses with higher coverage can help find the optimal solution faster, thereby reducing the amount of calculation.
[0090] S132. Use recursive calculation and exclusive - OR operation to find the minimum number of warehouses that meet the conditions in the sorted result to obtain a filtered result.
[0091] In this embodiment, the filtered result refers to the result of the minimum number of warehouses that meet the conditions in the sorted result.
[0092] Utilize recursive calculation and exclusive - OR operation to detect which combinations of warehouses can cover all the required goods and calculate the minimum number of warehouses that meet the conditions.
[0093] Recursive calculation can deeply explore all possible combinations of warehouses, and the exclusive - OR operation helps quickly evaluate the coverage of these combinations. In this way, it is possible to effectively filter out the smallest and condition - meeting combinations of warehouses, avoiding redundant calculations.
[0094] S133. Reduce the filtered result to obtain an optimal combination of warehouses.
[0095] In this embodiment, based on the filtered result of the previous step, further reduce the combination of warehouses to exclude those warehouses that are included in other combinations of warehouses, thereby streamlining the final combination of warehouses.
[0096] The reduction step can avoid meaningless redundant calculations and ensure that the finally selected combination of warehouses is the most concise and effective. This not only improves the calculation efficiency but also optimizes the use of resources.
[0097] Based on the storage results of K-V, calculate the optimal solution for the number of shipping warehouses for the order splitting suggestions. First, sort the decimal numbers in the values array of the storage results in descending order. For example, in an order, if the binary corresponding to the situation where the goods are not out of stock is 111 (decimal: 7), and if the second good is out of stock, it is 101 (decimal: 5). Then, perform a recursive calculation on the module for screening the optimal solution. By performing an exclusive OR operation on the goods in the warehouse, find the minimum number of warehouses that meet the conditions. The decimal number of this optimal solution is 2n - 1. To avoid meaningless calculations, the warehouse data needs to be reduced based on the principle of completely containing other warehouses and having a greater variety of goods than the warehouse to be removed. For example: The order goods situation is goods 1, goods 2, goods 3, goods 4, and the inventory situation is: Warehouse C (goods 1, goods 2) corresponding to the binary 1100, Warehouse A (goods 2, goods 3, goods 4) corresponding to the binary 0111, Warehouse D (goods 1, goods 3) corresponding to the binary 1010, Warehouse B (goods 1, goods 3, goods 4) corresponding to the binary 1011. Finally, the optimal number of warehouses obtained is 2.
[0098] S140. Check whether there is a situation where the same goods are stored in multiple warehouses in the warehouse combination of the optimal solution through bitwise operations.
[0099] In one embodiment, please refer to Figure 6 , the above step S140 may include steps S141 to S142.
[0100] S141. Perform a bitwise OR operation on each warehouse combination in the warehouse combination of the optimal solution to check whether the warehouse combination can meet the demand for all goods in the order.
[0101] In this embodiment, perform a bitwise "OR" operation on each warehouse combination in the optimal solution to determine whether these combinations can meet the demand for all goods in the order. This is achieved by merging the inventory data of all relevant warehouses and checking whether the merged result covers all the goods required by the order.
[0102] This operation ensures that the selected warehouse combination can fully meet the order requirements and avoids missing any necessary goods. This operation is a key step in verifying the effectiveness of the optimal solution and helps ensure that the finally selected warehouse combination can indeed complete the shipping task.
[0103] S142. Determine whether there is a situation where the same goods are stored in multiple warehouses for the warehouse combination that can meet the demand for all goods in the order.
[0104] In this embodiment, for those warehouse combinations that can meet the demand for all goods in the order, further check whether there is a situation where the same goods are provided by multiple warehouses. This is usually achieved by performing a bitwise "AND" operation on the warehouse inventory data.
[0105] Identifying and handling the situation of multiple warehouses having the same goods can reduce the redundant use of resources, optimize the warehouse configuration, and ensure more efficient inventory management. Through this step, it can be ensured that the finally selected warehouse combination can not only meet the order requirements, but also avoid unnecessary repeated supply, thereby reducing costs and improving logistics efficiency.
[0106] In this embodiment, by recursively performing a bitwise "OR" operation on the warehouse storage data (represented in decimal) with the data of other warehouses, if the operation result is equal to the value obtained by shifting the goods size to the left, it is considered that these warehouse combinations can meet all the shipping requirements of the order. On this basis, it is also necessary to check whether there is a situation of multiple warehouses having the same goods inventory, that is, performing a bitwise "AND" operation on the inventory data i of warehouse A and the inventory data j of warehouse B.
[0107] S150. When there is a situation of multiple warehouses having the same goods in the optimal solution warehouse combination, construct a combination set.
[0108] In this embodiment, the combination set refers to the warehouse combinations selected from all possible warehouse combinations that meet the conditions of "multiple warehouses having the same goods and being able to meet all the goods requirements of the order". Each warehouse combination in the combination set meets two conditions:
[0109] Can meet all the goods requirements of the order: that is, this combination can provide all the goods required by the order.
[0110] There is a situation of multiple warehouses having the same goods: that is, in this combination, some goods come from multiple warehouses.
[0111] In one embodiment, please refer to Figure 7 , the above step S150 may include steps S151 to S152.
[0112] S151. For the warehouse combination that has the situation of multiple warehouses having the same goods and can meet all the goods requirements of the order, construct the storage result of the multiple-warehouse same-goods combination to obtain the construction result.
[0113] In this embodiment, obtain all warehouses and their inventory information, and match them with the order requirements; for each kind of goods, find all the warehouses that provide the goods and create combinations of these warehouses; record all the eligible warehouse combinations (that is, those that can meet all the goods requirements of the order and each good has inventory in multiple warehouses). This result set includes all the warehouse combinations that can effectively meet the order requirements, forming a "construction result".
[0114] Ensure that all possible warehouse combinations are considered to avoid missing any combination that can meet the order; record the situation of multiple warehouses having the same goods, enabling the system to handle different warehouse configurations.
[0115] S152. Use bitwise operations to find out the warehouse combinations in the construction result that meet the condition that all goods are in stock, so as to obtain a combination set.
[0116] In this embodiment, bitwise operation technology is used to quickly process and retrieve information. Each warehouse can be represented by a bit, and each good can also be represented by a bit. Through bitwise operations, it can be efficiently determined whether a certain warehouse combination covers all the required goods. Screen out the warehouse combinations that meet all the goods requirements from the construction result to obtain the final "combination set".
[0117] Bitwise operations can efficiently handle a large number of combinations and conditional judgments, and are particularly suitable for processing large-scale data sets; ensure that the finally obtained warehouse combinations can meet the requirements of all goods in the order, avoiding the situation of insufficient inventory; simplify the combination screening process through bitwise operations, reducing the computational complexity and time cost.
[0118] Decide whether to construct a K-V set for storing the extended multi-warehouse same-goods combination according to the warehouse combinations that have the situation of the same goods in multiple warehouses and can meet the requirements of all goods in the order. First, perform bitwise operations on the inventory data of each warehouse (for example, perform an AND operation on 1011 and 1110 to get 1010) to determine the existence of goods in each warehouse. Then, obtain non-repeated bits through the negation operation (for example, 0101), and then use the decimal values of these bits as indexes to traverse and calculate the warehouse combinations that meet the condition that all goods are in stock, and store these combinations in the K-V structure, where the Key is the warehouse and the V is the decimal position subscript of the goods. To improve performance, prune and optimize the logic, and set a benchmark number of warehouses to interrupt the logic of the excess part, thereby reducing the recursion depth. For example, the following combinations are included:
[0119] Combination 1: [Warehouse A (0111): Goods 2, Goods 3, Goods 4], [Warehouse B (1000): Goods 1];
[0120] Combination 2: [Warehouse A (0111): Goods 2, Goods 3, Goods 4], [Warehouse C (1000): Goods 1];
[0121] Combination 3: [Warehouse A (0111): Goods 2, Goods 3, Goods 4], [Warehouse D (1000): Goods 1];
[0122] Combination 4: [Warehouse B (1011): Goods 1, Goods 3, Goods 4], [Warehouse A (0100): Goods 2];
[0123] Combination 5: [Warehouse C (1100): Goods 1, Goods 2], [Warehouse A (0011): Goods 3, Goods 4].
[0124] S160. Translate the data of the combination set and calculate the cost, and determine the shipping combination with the lowest cost to obtain the final shipping combination.
[0125] In this embodiment, the final shipping combination refers to the shipping plan with the lowest total cost selected by calculating and comparing the costs of each combination among all possible shipping combinations.
[0126] In one embodiment, please refer to Figure 8 , the above step S160 may include steps S161 to S163.
[0127] S161. Translate the data of the combination set to determine the specific goods in each warehouse.
[0128] In this embodiment, the data in the combination set is translated into the information of the specific goods actually stored in each warehouse. This ensures an accurate understanding of the actual inventory in each warehouse and provides a real data basis for subsequent order processing. Accurate goods information can prevent order processing problems caused by data errors and improve the reliability of the overall system.
[0129] S162. Calculate the weight, volume and receiving address information of the order according to the specific goods in each warehouse.
[0130] In this embodiment, extract the detailed information of the specific goods from each warehouse, such as weight and volume; multiply the weight and volume of each kind of goods by the quantity of each kind of goods in the order and sum up to obtain the total weight and total volume of the order; extract and format the receiving address information of the order to ensure accuracy.
[0131] Calculating the weight and volume of the order helps to reasonably arrange the transportation method and select the appropriate logistics service, while the receiving address information is used to ensure accurate delivery. This step ensures the efficiency and accuracy of logistics operations and avoids additional costs or delays caused by calculation errors.
[0132] S163. Calculate the total cost of each intermediate warehouse combination according to the logistics tariff template, and select the shipping combination with the lowest cost to obtain the final shipping combination.
[0133] In this embodiment, obtain the specific goods information of each combination from the intermediate warehouse combination, including weight, volume, shipping location, etc.; calculate the total cost of each combination using the rules in the tariff template. For example:
[0134] Apply the weight cost standard in the tariff template according to the total weight of each combination; apply the volume cost standard according to the total volume of each combination; calculate the additional cost according to the distance or area from the shipping location to the destination.
[0135] For each intermediate warehouse combination, sum up the calculated various fees (such as basic freight, volume fee, weight fee, etc.) to obtain the total fee for this combination; compare the total fees of all intermediate warehouse combinations; select the combination with the lowest fee as the final shipping plan.
[0136] Save the relevant information of the combination with the lowest fee for subsequent processing; perform actual shipping operations according to the determined optimal combination.
[0137] Example: Assume that in the logistics tariff template, it is stipulated that: the freight per kilogram is $5; the freight per cubic meter is $10.
[0138] For an order of a certain combination: the total weight is 20 kg or the total volume is 2 m³;
[0139] The calculation method is as follows:
[0140] Weight fee = 20 kg * $5 / kg = $100, or, volume fee = 2 m³ * $10 / m³ = $20;
[0141] Total fee = $20, or, $100.
[0142] Repeat the above calculation steps for all intermediate warehouse combinations, and select the combination with the lowest total fee as the final shipping plan.
[0143] By calculating the fees for each possible shipping combination, the most economical distribution plan can be found. This step optimizes the logistics cost, improves the overall cost - effectiveness, and ensures that the company minimizes expenses while meeting customer needs.
[0144] S170. Update the inventory according to the said final shipping combination, and display the shipping situation and order quantity of each warehouse.
[0145] In this embodiment, after determining the final shipping warehouse and goods in the final shipping combination, perform a logical deduction on the inventory, and display the warehouse and order quantity in the way of one split into n.
[0146] Specifically, first, determine the final shipping combination, which includes the shipping warehouse and specific goods. According to the warehouses and goods involved in the final shipping combination, deduct the corresponding quantities from the inventory of each relevant warehouse. For example, if the final shipping combination decides to ship 10 pieces of product X and 5 pieces of product Y from warehouse A, then deduct the quantities of these 10 pieces of product X and 5 pieces of product Y from the inventory of warehouse A respectively. Update the inventory database or system to reflect the inventory status after these deduction operations. Display the shipping situation and order quantity in the way of "one split into N". That is, display the result of the final shipping combination as the actual goods and quantities shipped from each warehouse. Display the order quantity processed by each warehouse.
[0147] Display example: Warehouse A: 10 pieces of product X and 5 pieces of product Y are shipped, and the number of orders processed is 3.
[0148] Warehouse B: 7 pieces of product Z are shipped, and the number of orders processed is 2.
[0149] Comprehensively display the shipping details of each warehouse and the total number of orders processed, and provide them to management for analysis and decision-making.
[0150] By logically deducting inventory, ensure that the system inventory is consistent with the actual inventory, reducing inventory management errors caused by shipping; automatically updating inventory reduces the workload of manual operations, improving the efficiency and accuracy of inventory management; display the shipping situation and the number of orders in the way of "one split into N", making the shipping situation and the number of orders processed in each warehouse clear at a glance; provide detailed shipping and order data to support warehouse management and logistics optimization, helping to analyze shipping efficiency and order processing; by displaying the shipping situation and the number of orders in each warehouse, management can better evaluate the workload of the warehouse and logistics efficiency, and make reasonable resource allocation and scheduling; help identify possible bottlenecks and improvement points, optimize inventory configuration and shipping processes, and improve overall operational efficiency.
[0151] Considering that the calculation of a large number of orders may instantaneously consume a large amount of memory and cause the service to be unavailable, abstract the inventory as a two-dimensional matrix, and construct a virtual two-dimensional table with whether there is a shortage of goods as the core target, and use binary to store the inventory data of the corresponding order goods in the warehouse. Combine the existing data of the system, such as logistics fees and inventory, through the dynamic programming (DP) algorithm, and use the binary data of the warehouse inventory to calculate the optimal solution, determine the optimal number of warehouses for the warehouse to be matched, and reduce the invalid calculation of the combined warehouse by setting a threshold. When there are multiple warehouses with the same goods in the warehouses to be allocated, it is necessary to find all possible warehouse allocation combinations, and use operations such as bitwise AND, bitwise OR, bitwise XOR, and bitwise negation of binary to expand the combinations, and recursively obtain different combination results of multiple warehouses with the same goods. According to the combination results, translate the goods information through sample data, calculate the fees of each warehouse combination through weight, volume, and delivery address, etc., and use CAS to obtain the warehouse goods combination with the lowest logistics fee. Finally, obtain the splitting suggestion, which significantly improves the processing efficiency of the warehouse for orders. For the found warehouse combinations, through calculation methods such as bitwise AND, bitwise OR, and bitwise XOR of binary, obtain a set of non-repeating K-V structures of warehouse shipments as the data set, abstract the specific goods as weight and volume, and screen out the combination result with the least freight as the order splitting suggestion, effectively improving the user processing efficiency.
[0152] Use the out-of-stock flag to filter out the order array that requires splitting suggestions, and improve the system memory utilization through binary storage and operations. Use the dynamic programming (DP) algorithm to obtain the optimal solution for the number of warehouses, and reasonably prune the invalid logic based on this optimal solution to improve the execution efficiency. At the same time, calculate all combination data that meet the same goods in multiple warehouses, and display the combination result with the lowest logistics cost. Warehouse personnel only need to split and ship orders according to the suggestions, without worrying about whether all the goods in the order are shipped or whether the logistics cost is reasonable, which greatly reduces the workload of warehouse personnel in selecting goods and calculating freight, and significantly improves the overall shipping efficiency.
[0153] The above order splitting processing method stores the inventory data by obtaining it and converting the inventory situation of each warehouse into decimal. Then, calculate the optimal shipping warehouse combination, check and process the situation of the same goods in multiple warehouses. Finally, select the shipping combination with the lowest cost through cost calculation, update the inventory, and display the shipping situation; solve the problems in the prior art that the order splitting and warehouse selection are too simple, and the inventory cannot be effectively optimized and the logistics cost cannot be reduced, resulting in low shipping efficiency and unreasonable freight costs.
[0154] Figure 9 It is a schematic block diagram of an order splitting processing device 300 provided by an embodiment of the present invention. As Figure 9 shown, corresponding to the above order splitting processing method, the present invention also provides an order splitting processing device 300. The order splitting processing device 300 includes units for executing the above order splitting processing method, and the device can be configured in a server. Specifically, please refer to Figure 9 , the order splitting processing device 300 includes an inventory data acquisition unit 301, a conversion storage unit 302, a calculation unit 303, an inspection unit 304, a construction unit 305, a combination determination unit 306, and an update unit 307.
[0155] The inventory data acquisition unit 301 is used to acquire the inventory data of the goods and record whether all the goods in the order are shipped; the conversion storage unit 302 is used to convert the inventory situation of each warehouse in the order into decimal and store it as a key-value pair to obtain the storage result; the calculation unit 303 is used to calculate the optimal solution for the number of shipping warehouses according to the storage result to obtain the optimal warehouse combination; the inspection unit 304 is used to check whether there is a situation of the same goods in multiple warehouses in the optimal warehouse combination through bit operations; the construction unit 305 is used to construct a combination set when there is a situation of the same goods in multiple warehouses in the optimal warehouse combination; the combination determination unit 306 is used to perform data translation and cost calculation on the combination set and determine the shipping combination with the lowest cost to obtain the final shipping combination; the update unit 307 is used to update the inventory according to the final shipping combination and display the shipping situation and the number of orders of each warehouse.
[0156] In one embodiment, the inventory data acquisition unit 301 includes:
[0157] A data acquisition subunit, configured to select an assigned warehouse and acquire the inventory data of each item in the order in each warehouse; a template acquisition subunit, configured to acquire and store a logistics tariff template; and a recording subunit, configured to record the item numbers in the order and convert the item numbers into binary-coded decimal integers.
[0158] In one embodiment, the conversion and storage unit 302 includes:
[0159] A comparison subunit, configured to compare the quantity of the items in the order with the inventory in the participating assigned warehouses to check whether the assigned warehouses are out of stock; a conversion subunit, configured to, when the assigned warehouses are not out of stock, record the inventory status using a binary calculation method and convert it into decimal for storage to obtain a decimal result; and a storage subunit, configured to store the warehouse ID and the decimal result as a key-value pair to obtain a storage result.
[0160] In one embodiment, the calculation unit 303 includes:
[0161] A sorting subunit, configured to sort the decimal results in the storage result in descending order to obtain a sorting result; a screening subunit, configured to use recursive calculation and exclusive OR operation to find the minimum number of warehouses that meet the conditions in the sorting result to obtain a screening result; and a reduction subunit, configured to reduce the screening result to obtain an optimal warehouse combination.
[0162] In one embodiment, the inspection unit 304 includes:
[0163] A bitwise OR operation subunit, configured to perform a bitwise OR operation on each warehouse combination in the optimal warehouse combination to check whether the warehouse combination can meet the demand for all items in the order; and a judgment subunit, configured to judge whether there is a situation where the same item is stored in multiple warehouses for the warehouse combination that can meet the demand for all items in the order.
[0164] In one embodiment, the construction unit 305 includes:
[0165] A combination construction subunit, configured to construct a storage result of the multi-warehouse same-item combination for the warehouse combination that has the situation of the same item in multiple warehouses and can meet the demand for all items in the order to obtain a construction result; and a set determination subunit, configured to find the warehouse combinations that meet the condition that all items are in stock in the construction result through bitwise operation to obtain a combination set.
[0166] In one embodiment, the combination determination unit 306 includes:
[0167] A translation subunit for translating the data in the combination set to determine specific goods in each warehouse; an information calculation subunit for calculating the weight, volume, and receiving address information of an order based on the specific goods in each warehouse; a total cost calculation subunit for calculating the total cost of each intermediate warehouse combination according to a logistics tariff template and selecting the shipping combination with the lowest cost to obtain a final shipping combination.
[0168] It should be noted that those skilled in the art can clearly understand the specific implementation processes of the above order splitting processing device 300 and each unit. They can refer to the corresponding descriptions in the foregoing method embodiments. For the sake of convenience and conciseness of description, they will not be elaborated here.
[0169] The above order splitting processing device 300 can be implemented in the form of a computer program, and this computer program can run on a computer device as shown in Figure 10 shown.
[0170] Please refer to Figure 10 , Figure 10 which is a schematic block diagram of a computer device provided by an embodiment of the present application. This computer device 500 can be a server. Among them, the server can be an independent server or a server cluster composed of multiple servers.
[0171] Refer to Figure 10 , this computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501. Among them, the memory can include a non-volatile storage medium 503 and an internal memory 504.
[0172] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. This computer program 5032 includes program instructions. When the program instructions are executed, the processor 502 can be made to execute an order splitting processing method.
[0173] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0174] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can be made to execute an order splitting processing method.
[0175] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that Figure 10The structure shown is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device 500 to which the solution of this application is applied. Specifically, the computer device 500 may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.
[0176] Among them, the processor 502 is used to run the computer program 5032 stored in the memory to implement the following steps:
[0177] Obtain the inventory data of the goods and record whether the goods in the order are fully shipped; convert the inventory situation of each warehouse in the order into decimal and store it as a key-value pair to obtain a storage result; perform an optimal solution calculation on the number of shipping warehouses according to the storage result to obtain an optimal combination of warehouses; check whether there is a situation where the same goods are stored in multiple warehouses in the optimal combination of warehouses through bit operations; when there is a situation where the same goods are stored in multiple warehouses in the optimal combination of warehouses, construct a combination set; perform data translation and cost calculation on the combination set and determine the shipping combination with the lowest cost to obtain the final shipping combination; update the inventory according to the final shipping combination and display the shipping situation and order number of each warehouse.
[0178] In one embodiment, when the processor 502 implements the step of obtaining the inventory data of the goods and recording whether the goods in the order are fully shipped, the following steps are specifically implemented:
[0179] Select the allocated warehouses and obtain the inventory data of each type of goods in each warehouse in the order; obtain the logistics tariff template and store it; record the goods numbers in the order and convert the goods numbers into binary decimal integers.
[0180] In one embodiment, when the processor 502 implements the step of converting the inventory situation of each warehouse in the order into decimal and storing it as a key-value pair to obtain a storage result, the following steps are specifically implemented:
[0181] Compare the quantity of the goods in the order with the inventory of the allocated warehouses to check whether the allocated warehouses are out of stock; when the allocated warehouses are not out of stock, use binary calculation to record the inventory status and convert it into decimal for storage to obtain a decimal result; store the warehouse ID and the decimal result as a key-value pair to obtain a storage result.
[0182] In one embodiment, when the processor 502 implements the step of performing an optimal solution calculation on the number of shipping warehouses according to the storage result to obtain an optimal combination of warehouses, the following steps are specifically implemented:
[0183] Sort the decimal results in the stored results in descending order to obtain a sorted result; use recursive calculation and exclusive OR operation to find the minimum number of warehouses that meet the conditions in the sorted result to obtain a filtered result; reduce the filtered result to obtain an optimal warehouse combination.
[0184] In one embodiment, when the processor 502 implements the step of checking whether there are multiple warehouses with the same goods in the optimal warehouse combination through bitwise operations, the specific implementation is as follows:
[0185] Perform a bitwise OR operation on each warehouse combination in the optimal warehouse combination to check whether the warehouse combination can meet the demand for all goods in the order; for the warehouse combination that can meet the demand for all goods in the order, determine whether there is a situation where multiple warehouses have the same goods.
[0186] In one embodiment, when the processor 502 implements the step of constructing a combination set, the specific implementation is as follows:
[0187] For the warehouse combination that has the situation of multiple warehouses with the same goods and can meet the demand for all goods in the order, construct a storage result of the combination of multiple warehouses with the same goods to obtain a construction result; find the warehouse combination that meets the condition that all goods are in stock in the construction result through bitwise operations to obtain a combination set.
[0188] In one embodiment, when the processor 502 implements the step of performing data translation and cost calculation on the combination set, and determining the shipping combination with the lowest cost to obtain the final shipping combination, the specific implementation is as follows:
[0189] Translate the data of the combination set to determine the specific goods in each warehouse; calculate the weight, volume, and delivery address information of the order according to the specific goods in each warehouse; calculate the total cost of each intermediate warehouse combination according to the logistics tariff template, and select the shipping combination with the lowest cost to obtain the final shipping combination.
[0190] It should be understood that in the embodiment of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0191] Those of ordinary skill in the art can understand that all or part of the processes in the methods of implementing the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0192] Therefore, the present invention also provides a storage medium. The storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when the computer program is executed by a processor, the processor executes the following steps:
[0193] Obtain the inventory data of the goods and record whether the goods in the order are fully shipped; convert the inventory situation of each warehouse in the order into decimal and store it as a key-value pair to obtain a storage result; perform an optimal solution calculation for the number of shipping warehouses according to the storage result to obtain an optimal combination of warehouses; check whether there is a situation of multiple warehouses having the same goods in the optimal combination of warehouses through bitwise operations; when there is a situation of multiple warehouses having the same goods in the optimal combination of warehouses, construct a combination set; perform data translation and cost calculation on the combination set and determine the shipping combination with the lowest cost to obtain the final shipping combination; update the inventory according to the final shipping combination and display the shipping situation and order quantity of each warehouse.
[0194] In one embodiment, when the processor executes the computer program to implement the step of obtaining the inventory data of the goods and recording whether the goods in the order are fully shipped, the following steps are specifically implemented:
[0195] Select the allocated warehouse and obtain the inventory data of each type of goods in each warehouse in the order; obtain the logistics tariff template and store it; record the goods numbers in the order and convert the goods numbers into binary decimal integers.
[0196] In one embodiment, when the processor executes the computer program to implement the step of converting the inventory situation of each warehouse in the order into decimal and storing it as a key-value pair to obtain a storage result, the following steps are specifically implemented:
[0197] Compare the quantity of the goods in the order with the inventory of the allocated warehouses to check whether the allocated warehouses are out of stock; when the allocated warehouses are not out of stock, use binary calculation to record the inventory status and convert it into decimal for storage to obtain a decimal result; store the warehouse ID and the decimal result as a key-value pair to obtain a storage result.
[0198] In one embodiment, when the processor executes the computer program to implement the step of calculating the optimal solution of the number of shipping warehouses according to the stored result to obtain the optimal warehouse combination, the specific implementation steps are as follows:
[0199] Sort the decimal results in the stored result in descending order to obtain a sorted result; use recursive calculation and exclusive OR operation to find the minimum number of warehouses that meet the conditions in the sorted result to obtain a filtered result; reduce the filtered result to obtain the optimal warehouse combination.
[0200] In one embodiment, when the processor executes the computer program to implement the step of checking whether there is a situation of multiple warehouses having the same goods in the optimal warehouse combination through bitwise operations, the specific implementation steps are as follows:
[0201] Perform a bitwise OR operation on each warehouse combination in the optimal warehouse combination to check whether the warehouse combination can meet all the goods requirements of the order; for the warehouse combination that can meet all the goods requirements of the order, judge whether there is a situation of multiple warehouses having the same goods.
[0202] In one embodiment, when the processor executes the computer program to implement the step of constructing a combination set, the specific implementation steps are as follows:
[0203] For the warehouse combination that has the situation of multiple warehouses having the same goods and can meet all the goods requirements of the order, construct the stored result of the multiple-warehouse same-goods combination to obtain a construction result; find out the warehouse combination that meets the condition that all goods are in stock in the construction result through bitwise operations to obtain a combination set.
[0204] In one embodiment, when the processor executes the computer program to implement the step of performing data translation and cost calculation on the combination set and determining the shipping combination with the lowest cost to obtain the final shipping combination, the specific implementation steps are as follows:
[0205] Translate the data in the combination set to determine the specific goods in each warehouse; calculate the weight, volume and receiving address information of the order according to the specific goods in each warehouse; calculate the total cost of each intermediate warehouse combination according to the logistics tariff template and select the shipping combination with the lowest cost to obtain the final shipping combination.
[0206] The storage medium can be various computer-readable storage media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disc that can store program codes.
[0207] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0208] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0209] The steps in the method embodiments of the present invention can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of the present invention can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of the present invention can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit.
[0210] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0211] As described above, the above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. The order splitting processing method is characterized by: include: Obtain inventory data for goods and record whether the goods in the order have been fully shipped; Convert the inventory status of each warehouse in the order into decimal and store it as a key-value pair to obtain the storage result; Calculate the optimal solution of the number of shipping warehouses according to the storage results to obtain an optimal warehouse combination; Use bitwise operations to check whether the optimal warehouse combination has multiple warehouses with the same goods; When the optimal warehouse combination contains multiple warehouses with the same goods, a combination set is constructed; Performing data translation and cost calculation on the combination set, and determining the lowest cost shipping combination to obtain a final shipping combination; Update the inventory according to the final delivery combination and display the delivery status and order quantity of each warehouse; The inventory status of each warehouse in the order is converted into decimal and stored as a key-value pair to obtain a storage result, including: Compare the quantity of the goods in the order with the inventory of the warehouse involved in the allocation to check whether the allocated warehouse is out of stock; When the assigned warehouse is not out of stock, the inventory status is recorded using binary calculation method and converted to decimal storage to obtain a decimal result; The storage warehouse ID and the decimal result are a key-value pair to obtain the storage result; The step of performing optimal calculation of the number of shipping warehouses according to the storage result to obtain an optimal warehouse combination includes: Sorting the decimal results in the stored results in descending order to obtain a sorted result; Use recursive calculation and XOR operation to find the minimum number of warehouses that meet the conditions of the sorting result to obtain the screening result; The screening results are narrowed down to obtain an optimal warehouse combination.
2. The order splitting processing method according to claim 1, characterized in that: The acquisition of inventory data of goods and recording whether the goods in the order are fully shipped include: Select the assigned warehouse and obtain the inventory data of each item in the order in each warehouse; Obtain the logistics rate template and store it; Record the item number in the order and convert the item number to a binary decimal integer.
3. The order splitting processing method according to claim 1, characterized in that: The bitwise operation is used to check whether the optimal warehouse combination has multiple warehouses with the same goods, including: Perform a bitwise OR operation on each warehouse combination in the optimal warehouse combination to check whether the warehouse combination can meet all the product requirements of the order; For the warehouse combination that can meet all the product requirements of the order, determine whether there are multiple warehouses with the same product.
4. The order splitting processing method according to claim 1, characterized in that: The construction combination set includes: For warehouse combinations that have multiple warehouses with the same product and can meet all product requirements of the order, a storage result of the multiple warehouses with the same product combination is constructed to obtain a construction result; By bitwise operation, a warehouse combination satisfying the requirement that all goods are in stock is found in the construction result to obtain a combination set.
5. The order splitting processing method according to claim 4 is characterized in that: The data translation and cost calculation of the combination set and determination of the lowest cost shipping combination to obtain the final shipping combination include: Translating the data of the combined set to determine the specific goods in each warehouse; Calculate the weight, volume and delivery address information of the order based on the specific goods in each warehouse; The total cost of each intermediate warehouse combination is calculated according to the logistics rate template, and the delivery combination with the lowest cost is selected to obtain the final delivery combination.
6. The order splitting processing device is characterized by: include: The inventory data acquisition unit is used to acquire the inventory data of the goods and record whether the goods in the order have been fully shipped; The conversion storage unit is used to convert the inventory status of each warehouse in the order into decimal and store it as a key-value pair to obtain a storage result; A calculation unit, used to perform optimal solution calculation of the number of shipping warehouses according to the stored results to obtain an optimal warehouse combination; The checking unit is used to check whether the optimal warehouse combination contains the same product in multiple warehouses through bit operations; The construction unit is used to construct a combination set when there are multiple warehouses with the same goods in the optimal warehouse combination; A combination determination unit, used for performing data translation and cost calculation on the combination set, and determining a delivery combination with the lowest cost to obtain a final delivery combination; An updating unit, used for updating the inventory according to the final delivery combination, and displaying the delivery status and order quantity of each warehouse; The conversion storage unit comprises: A comparison subunit is used to compare the quantity of the goods in the order with the inventory of the warehouse involved in the allocation to check whether the allocated warehouse is out of stock; a conversion subunit is used to record the inventory status using a binary calculation method when the allocated warehouse is not out of stock, and convert it into decimal storage to obtain a decimal result; a storage subunit is used to store the warehouse ID and the decimal result as a key-value pair to obtain a storage result; The computing unit comprises: The sorting subunit is used to sort the decimal results in the storage results in descending order to obtain the sorting results; the screening subunit is used to use recursive calculation and XOR operation to find the minimum number of warehouses that meet the conditions of the sorting results to obtain the screening results; the reduction subunit is used to reduce the screening results to obtain the optimal warehouse combination.
7. A computer device, characterized in that: The computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 5 when executing the computer program.
8. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Method and device for determining warehouse storage distribution
CN104574013A
E-commerce order number generation method and device, equipment and storage medium
CN112365323A