Inventory sorting method, electronic device and computer readable storage medium

Through the inventory sorting method and backpack algorithm, the problems of low inventory sorting efficiency and unreasonable inventory management in the existing technology are solved, and more efficient sorting and out-of-stock management are achieved.

CN115034719BActive Publication Date: 2024-11-26CHINA BRILLIANT SUPPLY CHAIN SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210740198.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-28
Publication Date
2024-11-26
Estimated Expiration
2042-06-28

AI Technical Summary

Technical Problem

It is difficult for existing inventory sorting technology to effectively calculate the optimal outbound combination, resulting in inventory backlog or insufficient, affecting zero inventory management and outbound planning arrangements.

Method used

Use inventory sorting methods, including obtaining outbound orders, sorting combinations, determining the sorting combination according to preset sorting rules or backpack algorithms, optimizing sorting batches using particle swarm algorithms, giving priority to whole packaging or small packaging, ensuring material output The number of libraries is reasonable.

Benefits of technology

It improves sorting efficiency, avoids the problems of inventory backlog and unreasonable allocation of outbound orders, reduces the time-consuming of manual calculations, and improves the warehouse's operating methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115034719B_ABST
    Figure CN115034719B_ABST
Patent Text Reader

Abstract

The present application discloses an inventory sorting method, an electronic device, and a computer-readable storage medium. The method includes: obtaining an outbound order; classifying and combining the outbound orders according to the types of inventory materials and outbound data to obtain at least one sub-outbound order; sorting according to the incoming batches of the same type of inventory based on the sub-outbound orders; wherein, in the sorting process, sorting is performed according to a pre-set sorting rule or according to the sorting rule in the outbound order; if the remaining number of items to be sorted in the current sub-outbound order is greater than or equal to the inventory number of the batch to be sorted, all the inventory of the batch to be sorted will be shipped out; if the remaining number of items to be sorted in the current sub-outbound order is less than the inventory number of the batch to be sorted, the backpack algorithm is used to determine the inventory sorting combination. Through the above method, the sorting efficiency is improved, and unfavorable inventory management problems such as inventory backlog and unreasonable outbound order allocation are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of cargo sorting, and in particular to an inventory sorting method, an electronic device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of the warehousing and logistics industry, more and more new problems will arise in actual inventory sorting tasks. As far as the current sorting technology is concerned, there is often an inconsistency in the minimum packaging standards for warehoused goods, and there are cases where the packaging has tails. After receiving an outbound order, it is difficult to calculate the optimal outbound combination for this outbound order by manual calculation. This is mainly because manual calculation takes more time, thereby reducing sorting efficiency. If you randomly select a combination of outbound packaging, on the one hand, the quantity taken out may be relatively large, which may cause inventory backlogs for corporate customers and is not conducive to achieving zero inventory management; on the other hand, the large number of sorting in the previous batch may result in insufficient inventory in the next batch, which is not conducive to the arrangement of customer outbound plans. Summary of the invention

[0003] The present application provides an inventory sorting method, an electronic device and a computer-readable storage medium, which can improve sorting efficiency and avoid unfavorable inventory management problems such as inventory backlog and unreasonable distribution of outbound orders.

[0004] In a first aspect, the present application provides an inventory sorting method, the method comprising: obtaining an outbound order; classifying and combining the outbound orders according to the types of inventory materials and outbound data to obtain at least one sub-outbound order; sorting according to the incoming batches of the same type of inventory based on the sub-outbound orders; wherein, during the sorting process, sorting is performed according to a pre-set sorting rule or a sorting rule in the outbound order; if the remaining number of items to be sorted in the current sub-outbound order is greater than or equal to the inventory number of the batch to be sorted, all the inventory of the batch to be sorted will be shipped out, and if there is a sorting demand that meets the conditions, all the inventory that meets the sorting conditions should also be sorted out; if the remaining number of items to be sorted in the current sub-outbound order is less than the inventory number of the batch to be sorted, a backpack algorithm is used to determine the inventory sorting combination; wherein, the total capacity of the backpack is the number of full boxes required for the sub-outbound order, the backpack capacity of the target material is the ratio of the volume of the target material to the total volume, and the backpack value of the target material is the ratio of the target material to the total number of boxes filled with the same type of materials.

[0005] Among them, the sorting rules include: giving priority to whole packages according to inventory; wherein a whole package includes multiple small packages; or, giving priority to whole packages according to inventory, when it does not meet the order requirements, obtaining a target number of small packages from the whole package; or, shipping according to inventory in sorted order; or, using the exhaustive method to generate sorting rules; or, giving priority to whole packages according to inventory, when the remaining quantity in the order is less than the quantity of the whole package, directly sorting a whole package; or, giving priority to whole packages according to inventory, when the remaining quantity in the order is less than the quantity of the whole package, shipping according to the minimum package of basic data; or, giving priority to whole packages according to inventory and basic data, when the remaining quantity in the order is less than the quantity of the whole package, obtaining a target number of small packages from the whole package; or, giving priority to whole packages according to inventory, when the remaining quantity in the order is less than the quantity of the whole package, reporting an error.

[0006] Among them, when the knapsack algorithm is used to determine the inventory sorting combination, the particle swarm algorithm is used to determine the best sorting batch from multiple sorting batches.

[0007] Among them, the particle swarm algorithm is used to determine the best sorting batch from multiple sorting batches, including: initializing the first speed and the first position of each target sorting batch; iteratively updating the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch; calculating the fitness value of each target sorting batch at the second position; determining whether to update the historical optimal position of each target sorting batch and the historical optimal positions of all target sorting batch groups according to the fitness; when the fitness meets the preset conditions or the number of iterations reaches the maximum number of iterations, the target sorting batch corresponding to the historical optimal position is determined as the best sorting batch.

[0008] Wherein, initializing the first speed and the first position of each target sorting batch includes: obtaining an initialization range; wherein the initialization range is a preset range or the initialization range is between the maximum value and the minimum value of all sorting batches; initializing the first speed and the first position of each target sorting batch within the initialization range.

[0009] Among them, initializing the first speed and the first position of each target sorting batch includes: initializing the first speed and the first position of each target sorting batch, and setting a non-inferior solution set, where the non-inferior solution set is used to store all non-inferior solutions of the global optimal solution found during the particle swarm algorithm operation; iteratively updating the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch, including: iteratively updating the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch, and generating a corresponding non-inferior solution set; determining whether to update the historical optimal position of each target sorting batch and the historical optimal position of all target sorting batch groups according to fitness, including: comparing all non-inferior solutions, and screening out the historical optimal position of each target sorting batch and the non-inferior solution set of the global optimal solution.

[0010] The iterative updating of the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch includes: obtaining the second speed and the second position by using the following formula: in, represents the speed at the kth iteration, represents the speed at the k+1th iteration, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, r1 and r2 are the disturbance coefficients, represents the historical optimal position of each target sorting batch after the kth iteration, The historical optimal position of all target sorting batch groups after the kth iteration, Represents the position of each target sorting batch after the kth iteration.

[0011] Among them, if the number of packages to be sorted is still greater than 0 after the backpack is sorted, a minimum number of packages is selected from the remaining selectable inventory and placed in the sorting result.

[0012] In a second aspect, the present application provides an electronic device, comprising a processor and a memory coupled to the processor; wherein the memory is used to store a computer program, and the processor is used to execute the computer program to implement the method provided in the first aspect above.

[0013] In a third aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method provided in the first aspect above.

[0014] The beneficial effects of the present application are as follows: Different from the prior art, the present application provides an inventory sorting method, which calculates the optimal outbound sorting combination through the material packaging conditions of different inventories in the warehouse and the number of customer order requirements. It is possible to avoid unpacking as much as possible while ensuring that the number of materials outbound is sufficient, that is, to give priority to the packaging of whole boxes; if unpacking is required, a whole small package is shipped as much as possible instead of unpacking small packages. Such an outbound sorting scheme can facilitate warehouse pickers and picking machines to sort according to the calculation results of the warehouse management system, greatly improve the sorting efficiency, and avoid unfavorable inventory management problems such as inventory backlogs and unreasonable distribution of outbound orders. At the same time, through the optimized warehouse management system, the time-consuming problem of manual calculation can be reduced, which greatly improves the production and operation methods of the warehouse. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:

[0016] Figure 1 It is a flowchart of the first embodiment of the inventory sorting method provided by the present application;

[0017] Figure 2 It is a flowchart of the second embodiment of the inventory sorting method provided by the present application;

[0018] Figure 3 It is a flowchart of the third embodiment of the inventory sorting method provided by the present application;

[0019] Figure 4 This is an application scenario diagram of the inventory sorting method provided by this application;

[0020] Figure 5 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;

[0021] Figure 6 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0022] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0023] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0024] See also Figure 1 , Figure 1 : is a flow chart of the first embodiment of the inventory sorting method provided by the present application. The method comprises:

[0025] Step 11: Get the outbound order.

[0026] Different inventories contain the following related item information, such as the total quantity, type, batch, packaging specifications and number of packages of the material. In addition, there is the following quantitative relationship equation in a box of materials: the total quantity of materials in the box = packaging specifications × number of packages.

[0027] In some embodiments, before obtaining the outbound order, the inventory materials can be classified by type, and the same type of inventory can be sorted according to the incoming batches to obtain the priority order of the same type of inventory batches.

[0028] Then, different sorting rules are designed according to the actual sorting needs. The setting standards of the sorting rules need to take into account the number of full boxes and the number of tail packings, and set the priority order of the material sorting rules.

[0029] Step 12: Classify and combine the outbound orders according to the types of inventory materials and outbound data to obtain at least one outbound sub-order.

[0030] Step 13: Based on the sub-outbound order, sorting is performed according to the incoming batches of the same type of inventory; wherein, during the sorting process, sorting is performed according to a pre-set sorting rule or according to the sorting rule in the outbound order.

[0031] Step 14: If the remaining quantity to be sorted in the current sub-outbound order is greater than or equal to the inventory quantity of the batch to be sorted, all the inventory of the batch to be sorted will be shipped out. If there is a sorting demand that meets the conditions, all the inventory that meets the sorting conditions should also be sorted out.

[0032] Step 15: If the remaining quantity to be sorted in the current sub-outbound order is less than the inventory quantity of the batch to be sorted, the backpack algorithm is used to determine the inventory sorting combination; among which, the total capacity of the backpack is the number of full boxes required for the sub-outbound order, the backpack capacity of the target material is the ratio of the volume of the target material to the total volume, and the backpack value of the target material is the ratio of the target material to the total number of boxes filled with the same type of materials.

[0033] If the number of packages to be sorted is still greater than 0 after the backpack is sorted, select a minimum number of packages from the remaining selectable inventory and put them into the sorting result.

[0034] The above sorting rules include:

[0035] Rule 1: Prioritize full packages based on inventory; a full package includes multiple small packages.

[0036] Use the knapsack algorithm to generate rule 1. The requirement of this sorting rule is to sort out the entire package as much as possible without unpacking it. First, use the knapsack algorithm to find the best sorting queue, then find the one that best meets the requirements based on the sorting quantity, and finally, if there is a remaining quantity, sort it in the first-in-first-out order.

[0037] Rule 2: Prioritize full packages based on inventory. If the order requirements are not met, obtain the target number of small packages from the full package.

[0038] In actual sorting situations, it is possible that due to factors such as item defective rate or transportation damage, it is necessary to unpack and sort. At this time, there may be tail disks. The specific steps of the sorting algorithm are: first know the number of boxes and the number of items that need to be shipped out, and then follow the principle of picking the smallest package, one by one, until the conditions are met. In the process of searching, if there is a quantity, continue to search, otherwise jump out of the loop to find the next one. If you can take a whole box, try to take the whole box. If you need to unpack, you need to take a complete minimum package. Otherwise, it means that there are tail disks, and the tail disk is larger than the required tail. At this time, you need to take away the remaining tail disks and not take a whole minimum package.

[0039] Rule three: Ship according to the inventory in the sorting order; that is, sort directly according to the order of entry into the warehouse, and search one by one in a cycle until the sorting condition position is met.

[0040] Rule 4: Use exhaustive method to generate sorting rules.

[0041] Rule 5: Prioritize full packages based on inventory. When the remaining quantity in the order is less than the number of full packages, directly sort one full package.

[0042] Rule 6: Full packages will be shipped first based on inventory. When the remaining quantity in the order is less than the quantity of a full package, the smallest package in the basic data will be shipped.

[0043] Rule 7: Full packages are produced according to inventory and basic data. When the remaining quantity in the order is less than the quantity of the full package, the target number of small packages are obtained from the full package.

[0044] Sorting Rule 7 adds a method for handling the remainder based on Sorting Rule 6, which is to unpack the package to make up the remainder. This situation where unpacking is required is because the goods themselves take up little space but have great value.

[0045] Rule 8: Full packages will be shipped first based on inventory. If the remaining quantity in the order is less than the quantity of a full package, an error will be reported.

[0046] In some embodiments, the sorting rules for the same type of inventory batches can be based on the priority order: absolute priority sorting and same-batch priority sorting. Absolute priority sorting means that a certain inventory is first specified as an absolute priority sorting level based on the urgency of the inventory's outbound delivery. The main purpose of this is to give priority to sorting this inventory. The same-batch sorting is mainly to solve the priority order of the same batch outbound delivery. In the same batch, it will ignore other sorting rules already available in the system and give priority to the outbound delivery of the batch of inventory.

[0047] The inventor has found through long-term research that the establishment of the above scheme has a major premise: that is, ignoring the total weight and the category of goods, that is, all goods are assumed to be one category and can be placed in the same backpack. However, in reality, there are obviously goods that cannot be placed in the same package. In addition, in addition to the value and volume of the goods, the total weight of the backpack must also be considered. This requires comprehensive consideration of various influencing factors from multiple angles to obtain a better / optimal combination. This kind of optimization problem that requires consideration of multiple optimization objective functions is also called a multi-objective knapsack problem. The multiple objectives here are reflected in value and volume. Compared with the traditional knapsack algorithm, the optimization target here increases the volume. Here, the optimization scheme based on the knapsack algorithm not only requires that the total value of the combined items is maximized, but also requires that the total volume is minimized, and the total mass of the items in the backpack should be subject to quantity restrictions.

[0048] In the above multi-objective backpack model, we can assume that there are N categories of items, and each category has M items. We need to select one item from each of these N categories and put it into the backpack. Assuming P is the value matrix of the items to be transported, R is the volume matrix of the items to be transported, C is the mass of the items to be transported, and X is the selection matrix, the multi-objective backpack problem can be expressed by the following formula:

[0049]

[0050]

[0051] xZ

[0052] Here, P, R, and X are all M×N matrices, and Z represents the restriction on the mass size of the backpack.

[0053] The above state transition equation is a typical recursive formula in the dynamic programming algorithm. In addition to using the exhaustive method with a larger time complexity, the knapsack algorithm can also be solved by the dynamic programming algorithm with a smaller time complexity. From a programming perspective, the calculation steps of the knapsack algorithm are all calculated around the dp array. The pseudo code of the dynamic programming solution of the knapsack algorithm is given below:

[0054] First, initialize the initial value of the recursive formula. If the backpack capacity C is 0, that is, dp[i][0], no matter which items are selected, the total value of the backpack must be 0. There is also dp[0][C], that is: when i is 0 and the item number 0 is stored, the maximum value that can be stored in the backpack of each capacity.

[0055] Initialization pseudo code:

[0056]

[0057] From the recursive formula dp[i][j]=max(dp[i-1][j], dp[i-1][j-weight[i]]+value[i]), it can be seen that dp[i][j] is derived from dp[i-1]a] and dp[i-1][j-weight[i]]. The traversal order adopted by the present invention is to traverse the item types first, and then traverse the backpack capacity corresponding to the items. The corresponding pseudo code is as follows:

[0058]

[0059]

[0060] Use dynamic programming to solve the steps of the knapsack algorithm. The solution of dynamic programming is to first abstract a digital state, and then determine the initial state and write the state transition equation. Generally, the transfer calculation of the latter state should depend on the calculated previous state (possibly multiple). In order to achieve the global optimum, the previous state needs to reach the local optimum, and the calculation of the latter state depends on the calculation of the previous state, so that the final global optimum can be achieved. This means that the problem has an optimal substructure. Moreover, each local optimal state will not change due to subsequent calculations, which is called no aftereffect. Simply put, the optimal state of dynamic programming depends on the results of multiple local optima, which is why dynamic programming requires filling in tables.

[0061] Let's take the backpack capacity of 20 as an example. Except for the row with item number 0, which is all 0 (parameter initialization), the other rows are recursively derived step by step through the recursive formula we summarized above. Suppose there are ten kinds of items, arranged in the order of A, B, C, D, E, F, G, H, I, J, the backpack capacity (volume) of the items is: [2, 2, 6, 5, 4, 3, 2, 5, 4, 6], the value of the items is: [6, 1, 5, 4, 10, 8, 2, 9, 3, 7], and the backpack capacity is limited to ≤20; then we can use the order of the items as the stage of the system, that is, the first item (A) as the first stage, the second item (B) as the second stage, the third item (C) as the third stage, and so on. The whole system is divided into 10 stages in total. Specifically, in filling in the table, it is to increase the number of optional items in turn and gradually iterate the sub-problems. In this way, the state c(k) of the system is the current capacity of the backpack, and the state transition equation is: c(k+1)=c(k)+x(k), and the stage indicator is: V(c(k), x(k))=c(k). The total objective function f(c(k)) is to maximize the total value of the items in the backpack from the state c(k) of the kth segment to the end of the process, that is: f(c(k))=max(v(c(k), x(k))+f(c(k+1))).

[0062] Where c(k) is the state of the kth stage, which is the capacity of the backpack at the kth stage; x(k) is the decision of the kth stage, where a decision of 1 means putting the kth item into the backpack, and 0 means the opposite; V(c(k), x(k)) is the stage indicator of the kth stage, which is the value of the kth item that can be obtained by the decision; f(c(k)) is the total objective function, which is the maximum value of items that can be carried within the capacity of the backpack.

[0063] The following table shows the specific filling process of the dynamic programming algorithm:

[0064]

[0065] The above table is an example to demonstrate the dynamic programming algorithm, where a0 is used to initialize the iteration parameters, a1 to a10 represent ten items, and 0 to 20 represent the growth process of the backpack size. For example, if the item number is a6 and the backpack capacity is 6, the backpack value is max{dp[a5][6-3]+8, dp[a5][6]}=max{14,16}=16, so when the backpack capacity is 6, the maximum value of the first two items is 16. For another example, when the item number is a9 and the backpack capacity is 14, the backpack value is dp[a9]

[14] =max{dp[a8][14-4]+3, dp[a8]

[14] }=max{27,33}=33.

[0066] Space complexity optimization: If we just want to get the final maximum value without backtracking, from the perspective of data dependency, our calculation of dp[i][C] only depends on dp[i-1][C] and dp[i-1][Cw[i]], that is, when updating the index C, it only depends on the value less than or equal to C. In this way, we can use a one-dimensional array to represent the state, and change the update process to a reverse process to ensure that when updating C, the value less than or equal to C is not changed. Then the entire space complexity changes from a two-dimensional matrix to a one-dimensional array.

[0067] The backpack algorithm is used in inventory sorting to find the optimal whole package combination, so that the sorting quantity obtained by the backpack algorithm is closest to the number of orders shipped. However, there is still a discrepancy between the sorting quantity obtained by the backpack algorithm and the actual order quantity, so this error can be considered by selecting a minimum number of whole packages in the selectable inventory and putting it into the sorting result.

[0068] In inventory sorting, the present invention also uses the exhaustive solution of the knapsack algorithm, which is to list all possible situations that meet the sorting conditions, and then select the optimal solution from them. The difference between the exhaustive method and the dynamic programming method is that the dynamic programming method has a recursive formula, and the final result depends on the derivation result of the previous step, while the exhaustive method lists all possible situations and then selects the optimal combination.

[0069] In this example, there are five categories of items, each of which contains four specific items. Now it is required to select one item from each of the five categories and put it into the backpack so that the total value of the items in the backpack is maximized, the total volume is minimized, and the total mass of the backpack does not exceed 85kg. The model of the multi-objective backpack problem is:

[0070]

[0071]

[0072] stC×X≤(85 85 85 85)

[0073] Among them, P x Indicates the value of items in the backpack; R x represents the volume of items in the backpack; C represents the mass of items; X represents the selected items. P represents the value of each item, and R represents the volume of each item. The values ​​of the P, R, and C matrices in this example are as follows:

[0074]

[0075]

[0076]

[0077] In some embodiments, in order to solve the multi-objective knapsack problem, a particle swarm algorithm needs to be introduced.

[0078] When the inventory sorting combination is determined based on the knapsack algorithm in the above embodiment, the particle swarm algorithm can be used to determine the best sorting batch from multiple sorting batches.

[0079] For details, see Figure 2 , the process of determining the best sorting batch from multiple sorting batches using particle swarm algorithm can be as follows:

[0080] Step 21: Initialize the first speed and the first position of each target sorting batch.

[0081] Get the initialization range; wherein the initialization range is a preset range or the initialization range is between the maximum value and the minimum value of all sorting batches.

[0082] Initialize a first speed and a first position of each target sorting batch within an initialization range.

[0083] Step 22: Iteratively update the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch.

[0084] The second speed and second position are obtained using the following formula:

[0085]

[0086]

[0087] in, represents the speed at the kth iteration, represents the speed at the k+1th iteration, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, r1 and r2 are the disturbance coefficients, represents the historical optimal position of each target sorting batch after the kth iteration, The historical optimal position of all target sorting batch groups after the kth iteration, Represents the position of each target sorting batch after the kth iteration.

[0088] Step 23: Calculate the fitness value of each target sorting batch at the second position.

[0089] Step 24: Determine whether to update the historical optimal position of each target sorting batch and the historical optimal position of all target sorting batch groups according to the fitness.

[0090] Step 25: When the fitness meets the preset conditions or the number of iterations reaches the maximum number of iterations, the target sorting batch corresponding to the historical optimal position is determined as the optimal sorting batch.

[0091] The basic steps of the particle swarm algorithm are as follows:

[0092] 1. The speed and position of the initial particle. The speed indicates the direction and distance the particle will move in the next iteration, and the position is a solution to the problem being solved. Assuming that there are N particles in the D-dimensional search space, each particle represents a solution, then: the initial position X of particle i i =(x i1 , x i2 , …, x iD ), the initial velocity V of particle i i =(v i1 , v i2 , …, v iD ), assuming that the set P i =(p i1 , p i2 ,…,p iD ) represents the optimal position (individual optimal solution) searched by particle i, and the set P g =(p g1 , p g2 , ..., p gD ) represents the optimal position searched by the group (group optimal solution).

[0093] 2. According to the above parameters, the speed and position of all particles are iteratively updated. The formula is as follows:

[0094] Speed ​​update formula:

[0095] Position update formula:

[0096] The speed update formula includes three items. The first item is the inertia part, which is composed of the inertia weight and the particle's own speed, indicating the particle's trust in its previous state of motion; the second item is the cognitive part, which represents the particle's own thinking, that is, the part of the particle's own experience, which can be understood as the distance and direction between the particle's current position and its own historical optimal position; the third item is the social part, which represents information sharing and cooperation between particles, that is, it comes from the experience of other excellent particles in the group, which can be understood as the distance and direction between the particle's current position and the group's historical optimal position.

[0097] Explanation of some parameters in the above formula: d∈[1, 2, ..., D], D represents the particle dimension, d represents the particle dimension number, k represents the number of iterations, and w represents the inertia weight, which represents the influence of the speed of the previous generation of particles on the speed of the current generation of particles, or the degree of trust of the particles in their current state of motion. The particles move inertially according to their own speed, and the inertia weight enables the particles to maintain the inertia of motion and the trend of searching for expansion space. Generally, the larger the w value, the stronger the ability to explore new areas, the stronger the global optimization ability, but the weaker the local optimization ability. Conversely, the weaker the global optimization ability, the stronger the local optimization ability. A larger w is conducive to global search, jumping out of local extreme values, and not falling into local optimality; while a smaller w is conducive to local search, allowing the algorithm to converge quickly to the optimal solution. When the problem space is large, in order to achieve a balance between search speed and search accuracy, it is usually practiced to make the algorithm have a higher global search ability in the early stage to obtain suitable seeds, and a higher local search ability in the later stage to improve convergence accuracy, so w should not be a fixed constant. c1 represents the weight of the particle's next action derived from its own experience, which is the acceleration weight that pushes the particle to the individual's optimal position, also known as the individual learning factor; c2 represents the weight of the particle's next action derived from the experience of other particles, which is the acceleration weight that pushes the particle to the group's optimal position, also known as the group learning factor, generally c1=c2; r1 and r2 are perturbation coefficients, generally random numbers in the interval [0, 1], which are used to increase the randomness of the search.

[0098] Then calculate the fitness value (the value of the objective function) of each particle in the new position, which is used to evaluate the quality of the particle position and decide whether to update the historical optimal position of the individual particle and the historical optimal position of the group to ensure that the particle searches in the direction of the optimal solution. After the k+1th iteration, is the position of particle i, and the fitness value SP k+1 , after k iterations, the optimal value of a single particle is The corresponding fitness value is SP k , if SP k+1 =SP k ,but otherwise Likewise, from Select the particle with the largest fitness value, and then update the corresponding

[0099] Finally, there is the optimization stopping criterion. Generally, there are two situations: the first is that the number of iterations reaches the maximum number of iteration steps; the second is that an acceptable satisfactory solution appears, that is, the difference between the fitness value of the optimal solution after the previous iteration and the fitness value of the optimal solution after this iteration is less than a certain value, and then the optimization is stopped.

[0100] Another point that needs to be explained is the initialization of algorithm parameters. If the initialization range of particles is well selected, the convergence time of optimization can be shortened. We need to analyze it according to the specific problem. If we judge from our experience that the optimal solution must be within a certain range, then initialize the particles within this range; if it cannot be determined, use the boundary of the particle value as the initialization range.

[0101] The following introduces the multi-objective particle swarm optimization algorithm. Compared with the single-objective particle swarm optimization algorithm, the multi-objective particle swarm optimization algorithm has more objective functions, and no longer has only one objective function. This involves the trade-off problem between the optimization of multiple objective functions. The specific trade-off method needs to consider the actual application situation. The weight of the objective function should be increased when the focus is on that objective function. The conflicting multi-objective functions bring two problems to the algorithm: one is how to select the individual optimal solution; the other is how to select the global optimal solution. Among them, the selection of the individual optimal solution, in the single-objective particle swarm algorithm, only needs to compare the size of the fitness value corresponding to each iteration target position. In the multi-objective particle swarm algorithm, because some objective function values ​​become better after the position update, some become worse, so how to make a trade-off in this case.

[0102] In order to solve the above problems, non-inferior solutions are introduced. In the feasible domain of a multi-objective optimization problem, there is a solution. If there is no other feasible solution that makes all the objective function values ​​in a solution inferior to that solution, then the solution is called a non-inferior solution of the multi-objective optimization problem. The set of all non-inferior solutions is called a non-inferior solution set.

[0103] In some embodiments, see Figure 3 , the following process can be used:

[0104] Step 31: Initialize the first speed and the first position of each target sorting batch, and set a non-inferior solution set, which is used to store all non-inferior solutions of the global optimal solution found during the particle swarm algorithm operation.

[0105] Step 32: Iteratively update the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch, and generate a corresponding non-inferior solution set.

[0106] Step 33: Calculate the fitness value of each target sorting batch at the second position.

[0107] Step 34: Compare all non-inferior solutions and select the non-inferior solution set of the historical optimal position and the global optimal solution for each target sorting batch.

[0108] In order to solve the above problems, non-inferior solutions are introduced. In the feasible domain of a multi-objective optimization problem, there is a solution. If there is no other feasible solution that makes all the objective function values ​​in a solution inferior to that solution, then the solution is called a non-inferior solution of the multi-objective optimization problem. The set of all non-inferior solutions is called a non-inferior solution set.

[0109] The following are the steps of the multi-objective particle swarm optimization algorithm:

[0110] 1. Initialize the population, and then set the non-inferior solution set to store all non-inferior solutions of the global optimal solution found during the algorithm operation.

[0111] 2. Iterate and update to generate the positions of the next generation of particles and the corresponding non-inferior solution set.

[0112] 3. Compare all non-inferior solutions and select the non-inferior solution set of the historical optimal solution and the global optimal solution of each particle.

[0113] 4. Repeat steps 2 and 3 until the optimization stopping criteria are met.

[0114] 5. Finally, find the globally optimal non-inferior solution set.

[0115] The multi-objective search algorithm based on the particle swarm algorithm can be the following process: the population initialization module randomly initializes the position x and velocity v of the particle, the fitness value calculation module calculates the individual fitness value according to the fitness value calculation formula, and the particle optimal update module updates the individual optimal particle according to the new particle position. The non-inferior solution set update module selects non-inferior solutions according to the new particle dominance relationship. The particle speed and position update module updates the particle speed and position according to the individual optimal particle position and the global particle position.

[0116] Fitness calculation: The particle fitness value refers to the formula of the multi-objective backpack model mentioned above. Each individual has two fitness values, namely value and volume. At the same time, the individual must meet the mass constraint.

[0117] Screening non-inferior solution set: The screening non-inferior solution set is mainly divided into the initial screening non-inferior solution set and the updated non-inferior solution set. The initial screening non-inferior solution set refers to the set of particles that are not dominated by other particles (i.e., there is no P of other particles) after the particle is initialized. x , R xWhen all particles in the non-inferior solution set are better than the particle), the particle is placed in the non-inferior solution set, and a particle is randomly selected from the non-inferior solution set as the group's best particle before the particle is updated. Updating the non-inferior solution set means that when the new particle is not dominated by other particles and particles in the current non-inferior solution set, the new particle is placed in the non-inferior solution set, and a particle is randomly selected from the non-inferior solution set as the group's best particle before each particle update.

[0118] Speed ​​update formula:

[0119] Position update formula:

[0120] Particle Optimization: Particle optimization includes individual optimal particles and group optimal particles. The update method of individual optimal particles is to select the dominant particle from the current new particle and the individual optimal particle. When both particles are not the dominant particle, a particle is randomly selected as the individual optimal particle. The group optimal particle is a particle randomly selected from the non-inferior solution set.

[0121] In this embodiment, the value, volume and mass of each type of item are listed in the following table:

[0122] Category I Category II Category 3 Category 4 Category 5 Value / 100 Yuan 10.5 11.8 10.8 12.4 14.5 15.7 18.6 17.9 22.7 22 20.9 25.5 27 27.5 28.9 32 5.3 6.2 6.8 6.4 Volume / L 0.2 0.25 0.3 0.3 0.3 0.35 0.37 0.32 0.4 0.38 0.5 0.45 0.6 0.45 0.5 0.6 0.1 0.15 0.2 0.2 Mass / kg 4.5 5.8 7.7 9.6 19.4 17 16.5 15.3 9.1 7.7 13.5 11.2 13.5 11.2 8.5 9.9 1.9 2.5 1.4 1.8

[0123] Select an item from each category and put it into the backpack so that the total value of the backpack is maximized, the volume is minimized, and the total mass of the backpack is less than 85kg. The parameters of the particle swarm algorithm are: the number of particles is 500, the number of iterations is 500, and the distribution of the non-inferior solution in the target space is as follows: Figure 4 shown.

[0124] By Figure 4 It can be seen that the non-inferior solutions searched by the multi-objective algorithm of this embodiment constitute the Pareto surface, and the search has achieved good results. The calculated non-inferior solution set is:

[0125]

[0126] Taking into account the value of goods, the volume occupied and the weight of goods, the total value 3 / total volume 3 / total weight 3 is the best combination. This combination selects the fourth item in the first category, the first item in the second category, the third item in the third category, the second item in the fourth category, and the first item in the fifth category. In summary, this method can be used in logistics planning to coordinate the items to be transported in order to achieve the best economic and social benefits.

[0127] See also Figure 5 , Figure 51 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The electronic device 50 includes a processor 51 and a memory 52 coupled to the processor 51; wherein the memory 52 is used to store a computer program, and the processor 51 is used to execute the computer program to implement the following method:

[0128] Obtain an outbound order; classify and combine the outbound orders according to the types of inventory materials and outbound data to obtain at least one sub-outbound order; sort according to the incoming batches of the same type of inventory based on the sub-outbound orders; wherein, during the sorting process, sorting is performed according to a pre-set sorting rule or a sorting rule in the outbound order; if the remaining number of items to be sorted in the current sub-outbound order is greater than or equal to the inventory number of the batch to be sorted, all the inventory of the batch to be sorted will be shipped out, and if there is a sorting demand that meets the conditions, all the inventory that meets the sorting conditions should also be sorted out; if the remaining number of items to be sorted in the current sub-outbound order is less than the inventory number of the batch to be sorted, a backpack algorithm is used to determine the inventory sorting combination; wherein, the total capacity of the backpack is the number of full boxes required for the sub-outbound order, the backpack capacity of the target material is the ratio of the volume of the target material to the total volume, and the backpack value of the target material is the ratio of the target material to the total number of boxes filled with the same type of materials.

[0129] It can be understood that the processor 51 is also used to execute computer programs, which can implement the method of any of the above embodiments.

[0130] See also Figure 6 , Figure 6 60 is a schematic diagram of a computer readable storage medium according to an embodiment of the present application. The computer readable storage medium 60 stores a computer program 61. When the computer program 61 is executed by a processor, the following method is implemented:

[0131] Obtain an outbound order; classify and combine the outbound orders according to the types of inventory materials and outbound data to obtain at least one sub-outbound order; sort according to the incoming batches of the same type of inventory based on the sub-outbound orders; wherein, during the sorting process, sorting is performed according to a pre-set sorting rule or a sorting rule in the outbound order; if the remaining number of items to be sorted in the current sub-outbound order is greater than or equal to the inventory number of the batch to be sorted, all the inventory of the batch to be sorted will be shipped out, and if there is a sorting demand that meets the conditions, all the inventory that meets the sorting conditions should also be sorted out; if the remaining number of items to be sorted in the current sub-outbound order is less than the inventory number of the batch to be sorted, a backpack algorithm is used to determine the inventory sorting combination; wherein, the total capacity of the backpack is the number of full boxes required for the sub-outbound order, the backpack capacity of the target material is the ratio of the volume of the target material to the total volume, and the backpack value of the target material is the ratio of the target material to the total number of boxes filled with the same type of materials.

[0132] It can be understood that when the computer program 61 is executed by a processor, it can also implement the method of any of the above embodiments.

[0133] In summary, the inventory sorting method provided by the present application calculates the optimal outbound sorting combination through the packaging conditions of materials in different inventories in the warehouse and the number of customer order requirements. It is possible to avoid unpacking as much as possible while ensuring that the number of materials outbound is sufficient, that is, to give priority to the packaging of whole boxes; if unpacking is required, a whole small package is shipped as much as possible instead of unpacking small packages. Such an outbound sorting scheme can facilitate warehouse pickers and picking machines to sort according to the calculation results of the warehouse management system, greatly improve the sorting efficiency, and avoid unfavorable inventory management problems such as inventory backlogs and unreasonable distribution of outbound orders. At the same time, through the optimized warehouse management system, the time-consuming problem of manual calculation can be reduced, which greatly improves the production and operation methods of the warehouse.

[0134] In the several embodiments provided in this application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only illustrative, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0135] If the integrated units in the above other embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk and other media that can store program codes.

[0136] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for inventory sorting, characterized in that: The method comprises: Get outbound orders; Classify and combine the outbound orders according to the types of inventory materials and outbound data to obtain at least one outbound sub-order; Based on the sub-outbound order, sorting is performed according to the incoming batches of the same type of inventory; wherein, during the sorting process, sorting is performed according to a pre-set sorting rule or according to the sorting rule in the outbound order; If the remaining quantity to be sorted in the current sub-outbound order is greater than or equal to the inventory quantity of the batch to be sorted, all the inventory of the batch to be sorted will be shipped out. If there is a sorting demand that meets the conditions, all the inventory that meets the sorting conditions should also be sorted out; If the remaining quantity to be sorted in the current sub-outbound order is less than the inventory quantity of the batch to be sorted, the backpack algorithm is used to determine the inventory sorting combination; wherein the total capacity of the backpack is the number of full boxes required by the sub-outbound order, the backpack capacity of the target material is the ratio of the volume of the target material to the total volume, and the backpack value of the target material is the ratio of the target material to the total number of boxes filled with the same type of materials; The sorting rules include: Prioritize the delivery of full packages according to inventory; a full package includes multiple small packages; Or, give priority to whole packages based on inventory, and if they do not meet order requirements, obtain the target number of small packages from the whole package; or, ship according to inventory in sorted order; Or, use exhaustive method to generate sorting rules; Or, prioritize full packages based on inventory. When the remaining quantity in the order is less than the quantity of a full package, directly sort one full package; Or, give priority to full packaging according to inventory. If the remaining quantity in the order is less than the quantity of a full package, the smallest package in the basic data will be shipped; Or, the whole package is produced according to the inventory and basic data. When the remaining quantity in the order is less than the quantity of the whole package, the target number of small packages is obtained from the whole package; Or, if the full package is shipped first based on the inventory, and the remaining quantity in the order is less than the full package quantity, an error is reported; When the knapsack algorithm is used to determine the inventory sorting combination, the particle swarm algorithm is used to determine the best sorting batch from multiple sorting batches; The method of using a particle swarm algorithm to determine the best sorting batch from multiple sorting batches includes: Initializing a first speed and a first position of each target sorting batch; Iteratively update the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch; Calculating the fitness value of each target sorting batch at the second position; Determining whether to update the historical optimal position of each target sorting batch and the historical optimal position of all target sorting batch groups according to the fitness; When the fitness meets the preset condition or the number of iterations reaches the maximum number of iterations, the target sorting batch corresponding to the historical optimal position is determined as the optimal sorting batch; The iterative updating of the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch includes: The second speed and the second position are obtained by using the following formula: in, represents the speed at the kth iteration, represents the speed at the k+1th iteration, k represents the number of iterations, w represents the inertia weight, c1 represents the individual learning factor, c2 represents the group learning factor, r1 and r2 are the disturbance coefficients, represents the historical optimal position of each target sorting batch after the kth iteration, The historical optimal position of all target sorting batch groups after the kth iteration, Represents the position of each target sorting batch after the kth iteration.

2. The method according to claim 1, characterized in that: Initializing the first speed and the first position of each target sorting batch includes: Obtaining an initialization range; wherein the initialization range is a preset range or the initialization range is between the maximum value and the minimum value of all sorting batches; Initialize a first speed and a first position of each target sorting batch within the initialization range.

3. The method according to claim 1, characterized in that Initializing the first speed and the first position of each target sorting batch includes: Initializing the first speed and the first position of each target sorting batch, and setting a non-inferior solution set, wherein the non-inferior solution set is used to store all non-inferior solutions of the global optimal solution found during the particle swarm algorithm operation; The iterative updating of the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch includes: Iteratively update the first speed and the first position of each target sorting batch to obtain the second speed and the second position corresponding to each target sorting batch, and generate a corresponding non-inferior solution set; The step of determining whether to update the historical optimal position of each target sorting batch and the historical optimal positions of all target sorting batch groups according to the fitness includes: Compare all non-inferior solutions and select the non-inferior solution set of the historical optimal position and the global optimal solution for each target sorting batch.

4. The method according to claim 1, characterized in that: If the number of packages to be sorted is still greater than 0 after the backpack is sorted, select a minimum number of packages from the remaining selectable inventory and put them into the sorting result.

5. An electronic device, characterized in that: The electronic device includes a processor and a memory coupled to the processor; The memory is used to store a computer program, and the processor is used to execute the computer program to implement the method according to any one of claims 1 to 4.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the method according to any one of claims 1 to 4.