Packing method, device, electronic device and storage medium

Through the coding and population generation method based on cargo blocks and combined with multi-objective optimization, the problem of existing packing algorithms sacrificing balance when optimizing utilization is solved, achieving more efficient packing balance effect, meeting business needs and reducing packing Box cost.

CN118365227BActive Publication Date: 2024-11-01MIDEA GROUP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410422612.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2024-11-01
Estimated Expiration
2044-04-09

AI Technical Summary

Technical Problem

The existing packing algorithm sacrifices balance indicators when optimizing utilization, resulting in the packing solution being unable to meet business requirements, and the single-objective optimization method cannot provide satisfactory solutions and Pareto sets, affecting the balance effect of packing.

Method used

Using a cargo block-based encoding method combined with population generation method, through coding, combining, initializing, crossing and mutation, a multi-objective solution that takes into account the cost and balance of packing is generated, providing a wider set of candidate solutions and improving packing Balance effect.

Benefits of technology

Through multi-objective optimization methods, the balancing effect of packing is improved, a wider set of candidate solutions is provided, and a wider set of candidate solutions is met, which reduces container number and load imbalance, and improves packing efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118365227B_ABST
    Figure CN118365227B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computers, and provides a packing method, device, electronic device, and storage medium, the method comprising: encoding a plurality of goods to be packed to obtain a plurality of cargo blocks; any cargo block includes at least one cargo to be packed; combining a plurality of cargo blocks to obtain a cargo block combination of each cargo to be packed; initializing a population of the cargo block combination to obtain an initialized population, performing crossover and mutation on the population to obtain a new population; generating a packing scheme based on the new population and an external archive, and packing the goods to be packed based on the packing scheme; the external archive is used to store non-inferior solutions of the population. The present application can take into account both packing cost and balanced multi-objective solutions by combining a cargo block-based encoding method with a population generation method, and can provide a more widely distributed candidate solution set to improve the packing balance effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a packaging method, device, electronic device and storage medium. Background Art

[0002] The packing problem is an important issue in the field of logistics management. It requires determining the number of containers and the location and rotation of the goods inside them. Most optimization targets are based on container utilization. The classic packing model does not consider many real-world constraints, such as load balance. However, most algorithms and technologies sacrifice balance indicators when optimizing utilization indicators, and the final solution cannot meet business requirements.

[0003] Currently, the packing problem is modeled as a single-objective optimization problem and solved using a single-objective optimization method. However, the limitations of the single-objective optimization method are: (1) the hard constraint modeling method cannot provide a satisfactory solution; (2) the soft constraint method is difficult to determine the appropriate weight coefficient; (3) it cannot provide a Pareto set for decision makers to use. The limitations of the single-objective optimization method will affect the balance effect of the packing, and thus cannot meet business requirements. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the prior art. To this end, the present application proposes a packing method, which can take into account the multi-objective solution of packing cost and balance by combining the coding method based on cargo blocks with the population generation method, and can provide a candidate solution set with a wider distribution, thereby improving the balance effect of packing.

[0005] The application also proposes a packaging device, an electronic device and a storage medium.

[0006] According to the first aspect of the present application, the packing method includes:

[0007] Encoding a plurality of goods to be packed to obtain a plurality of goods blocks; any of the goods blocks includes at least one of the goods to be packed;

[0008] Combining a plurality of the cargo blocks to obtain a cargo block combination for each type of cargo to be packed;

[0009] Initializing a population of the cargo block combination to obtain an initialized population, and performing crossover and mutation on the population to obtain a new population;

[0010] A packing scheme is generated based on the new population and an external file, and the goods to be packed are packed based on the packing scheme; the external file is used to store non-inferior solutions of the population.

[0011] According to an embodiment of the present application, the combining of the plurality of cargo blocks to obtain a cargo block combination of each cargo to be packed includes:

[0012] Initialize a tree and set the root node of the tree to be empty;

[0013] Based on the rotation mode of the cargo block, each node of the tree is branched to obtain at least one intermediate node;

[0014] Generate the target cargo blocks of the intermediate nodes according to the generation order of the cargo blocks, so as to obtain a complete tree of each cargo to be packed;

[0015] The complete tree is traversed, and a cargo block combination is selected based on preset heuristic information to obtain a cargo block combination for each of the cargoes to be packed.

[0016] According to an embodiment of the present application, the combining of the plurality of cargo blocks to obtain a cargo block combination of each cargo to be packed includes:

[0017] Determine a minimum usage times model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, the number of times each of the goods blocks of each of the goods to be packed is selected, and information on whether each of the goods blocks of each of the goods to be packed is selected;

[0018] Determine a minimum block type model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, and information on whether each of the goods blocks of each of the goods to be packed is selected;

[0019] Based on the minimum usage times model or the minimum block type model, a cargo block combination of each of the cargoes to be packed is determined.

[0020] According to an embodiment of the present application, the step of initializing the population of the cargo block combination to obtain the initialized population includes:

[0021] randomly generating a first body of the cargo block combination based on a random method, and randomly generating a cargo order and a rotation method of the cargo in the first body;

[0022] Generate a second entity of the cargo block combination based on a heuristic method, randomly generate a rotation method of the cargo in the second entity, and generate a cargo order of the second entity according to a preset attribute value of a cargo indicator;

[0023] The first individual and the second individual are merged to obtain an initialized population.

[0024] According to an embodiment of the present application, generating a packing scheme based on the new population and external archives includes:

[0025] determining a maximized loading rate and a minimized equilibrium deviation rate for the new population;

[0026] evaluating the new population based on the maximized loading rate and the minimized equilibrium deviation rate;

[0027] Based on the evaluation results, updating the external file;

[0028] Based on a partial order neighborhood search strategy, a neighborhood search is performed on the new population to generate a next generation population; wherein the partial order target in the partial order neighborhood search strategy is that the maximum loading rate is greater than the minimum balance offset rate;

[0029] Iterate the next generation population to generate the packing solution.

[0030] According to one embodiment of the present application, determining the maximum loading rate and the minimum balance deviation rate of the new population includes:

[0031] Determining the maximum loading rate based on the information of each cargo block selected in the new population, the length, width and height of each cargo block, and the length, width and height of the container;

[0032] Determine the front-to-back relative offset of the cargo blocks in the new population based on the preset front-to-back offset weight of the cargo blocks in the new population and the total weight of the cargo to be packed;

[0033] Determine the left-right relative offset of the cargo blocks in the new population based on the preset left-right offset weight of the cargo blocks in the new population and the total weight of the cargo to be packed;

[0034] The minimized balance offset rate is determined based on the front-rear relative offset and the left-right relative offset.

[0035] According to one embodiment of the present application, before determining the maximum loading rate and the minimum balance deviation rate of the new population, the method further includes:

[0036] Decoding the new population to determine spatial location information of the goods to be packed in the new population;

[0037] Among them, the spatial position information is stored in a first position list and a second position list; the first position list is used to store the depth of the corner points of the goods to be packed, the vertical height of the corner points and the left distance of the corner points; the second position list is used to store the right distance of the corner points of the goods to be packed, the vertical height of the corner points and the depth of the corner points.

[0038] According to one embodiment of the present application, the method further includes:

[0039] Classifying the plurality of goods to be packed to obtain goods to be packed of the same type and goods to be packed of the same customer;

[0040] Generate multiple cargo clusters based on the same type of cargo to be packed or the same customer's cargo to be packed;

[0041] Initializing the population of the cargo cluster to obtain an initialized target population, and performing crossover and mutation on the target population to obtain a new target population;

[0042] A target packing plan is generated based on the new target population and the external archive, and the goods to be packed are packed based on the target packing plan.

[0043] According to the second aspect of the present application, a box packing device includes:

[0044] A coding module, used for coding a plurality of goods to be packed to obtain a plurality of goods blocks; any of the goods blocks includes at least one of the goods to be packed;

[0045] A combination module, used for combining a plurality of the cargo blocks to obtain a cargo block combination for each of the cargoes to be packed;

[0046] A population initialization module is used to initialize the population of the cargo block combination to obtain an initialized population, and to perform crossover and mutation on the population to obtain a new population;

[0047] A packing module is used to generate a packing plan based on the new population and an external file, and pack the goods to be packed based on the packing plan; the external file is used to store non-inferior solutions of the population.

[0048] According to an electronic device of an embodiment of the third aspect of the present application, the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described packing methods is implemented.

[0049] According to the non-transitory computer-readable storage medium of the fourth aspect embodiment of the present application, a computer program is stored thereon, and when the computer program is executed by a processor, the packing method as described in any one of the above is implemented.

[0050] The above one or more technical solutions in the embodiments of the present application have at least one of the following technical effects:

[0051] By combining the cargo block-based coding method with the population generation method, a multi-objective solution that takes into account both packing cost and balance can be achieved, a more widely distributed candidate solution set can be provided, and the packing balance effect can be improved.

[0052] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. 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 paying creative work.

[0054] Figure 1 It is a schematic diagram of the process of the packing method provided in the embodiment of the present application;

[0055] Figure 2 It is a schematic diagram of a cargo component block provided in an embodiment of the present application;

[0056] Figure 3 It is a schematic diagram of a complete tree generation method provided in an embodiment of the present application;

[0057] Figure 4 It is a schematic diagram of a cargo block generation method provided in an embodiment of the present application;

[0058] Figure 5 It is a neighborhood search schematic diagram provided in an embodiment of the present application;

[0059] Figure 6 is a schematic diagram of chromosome decoding provided in the embodiments of the present application;

[0060] Figure 7 is a schematic diagram of space points and available space provided in an embodiment of the present application;

[0061] Figure 8 It is a schematic diagram of the process of rapid packing provided in an embodiment of the present application;

[0062] Fig. 9 is a schematic diagram of a placement location retrieval program provided in an embodiment of the present application;

[0063] Fig.10 is a schematic diagram of a cargo cluster provided in an embodiment of the present application;

[0064] Fig.11 It is a schematic diagram of the framework of the multi-objective genetic algorithm provided in the embodiment of the present application;

[0065] Fig.12 It is a structural schematic diagram of a packing system provided in an embodiment of the present application;

[0066] Fig.13 It is a module schematic diagram of a box packing device provided in an embodiment of the present application;

[0067] Fig.14 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0068] The following is a further detailed description of the implementation of the present application in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present application but cannot be used to limit the scope of the present application.

[0069] In the description of the embodiments of the present application, it should be noted that the terms "first", "second" and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.

[0070] In the embodiments of the present application, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0071] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiments of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0072] The packing algorithm that considers the center of gravity balance can provide a safe and compliant packing solution, reduce losses caused by fines and safety accidents, avoid the secondary loading and excessive stay of goods at the destination port, and thus reduce international logistics costs. In the air transportation scenario, the position of the center of gravity has an impact on flight safety and efficiency. Even a small deviation from the ideal center of mass can lead to a significant increase in fuel consumption. Therefore, the packing algorithm that considers the center of gravity balance is extremely important both from a safety and economic perspective.

[0073] The embodiments of the present application provide a multi-objective solution that takes into account the balance index for 3D-CLP (3D Container Loading Problem). The original container packing problem (3D-CLP) is to place these items into containers so that they can make the most efficient use of space given a group of items of different sizes and shapes and one or more containers of fixed size. The above technical solution is mainly for the single container case. Other similar topics include packing problems considering gravity distribution and packing problems considering axle weight constraints. At present, the methods for dealing with balance constraints mainly include hard constraint methods and soft constraint methods.

[0074] When the hard constraint method is used, the optimization algorithm only outputs solutions whose "center of gravity" is within a specific range. Using the center of gravity region method may not produce a feasible solution. The constraint range is too large, causing the center of gravity to deviate from the center of the set. This method has certain limitations in practical application. Usually, the packing rate indicator is sacrificed in order to find a packing solution that absolutely meets the constraints.

[0075] When using the soft constraint method, the balance violation is added to the objective function as a penalty term. However, this technology has two disadvantages: (1) the penalty coefficient needs to be determined when incorporating it into the objective function, and this step relies heavily on the decision maker's experience; (2) the packing scheme is relatively simple, and the decision maker has little choice.

[0076] In summary, a technology is needed that can take into account both cost and balance for multi-objective solutions and provide a more widely distributed set of candidate solutions.

[0077] The load balancing problem is modeled using a multi-objective form, aiming to minimize both the number of containers used and the load imbalance of the containers, and is usually solved using a meta-heuristic algorithm. However, there are not many multi-objective solutions to 3D-CLP, and the algorithms for solving multi-objective 3D-CLP are mainly based on particle swarm optimization and genetic algorithm frameworks, such as Kuo. The optimization framework of 3D-CLP usually also needs to embed a packing heuristic algorithm to quickly generate a packing solution. This application mainly improves the encoding and decoding strategy, block generation method, space management, objective function design, population generation method, and neighborhood search method.

[0078] Based on the above-mentioned problems, an embodiment of the present application proposes a packing method, specifically a multi-objective intelligent packing method that takes into account the center of gravity balance.

[0079] Figure 1 Schematic diagram of the packing method provided in the embodiment of the present application. Figure 1 , the present application embodiment provides a packing method, comprising:

[0080] Step 100, encoding a plurality of goods to be packed to obtain a plurality of goods blocks.

[0081] It should be noted that the heterogeneity of goods refers to the differences in size, shape, weight, etc. between goods. According to the degree of heterogeneity of goods, the packing problem can be divided into weak heterogeneity packing problem and strong heterogeneity packing problem. Among them, the weak heterogeneity packing problem refers to the relatively small differences between goods. In this case, the differences in size, shape, weight, etc. of the goods are not significant, which means that the goods can be replaced or adjusted relatively easily to make better use of the packing space. Therefore, when solving the packing problem with weak heterogeneity and a small number of goods, a direct encoding method can be used, that is, the attributes of each product (such as size, shape) are used as the input of the problem, and the algorithm is used to determine the best packing solution. Among them, the algorithm includes heuristic algorithms (such as first adaptation, best adaptation, descent adaptation, etc.) and meta-heuristic algorithms (such as genetic algorithms, simulated annealing algorithms, etc.).

[0082] The strong heterogeneity packing problem refers to the large differences between goods. In this case, there are large differences in the size, shape, weight, etc. of the goods, and more constraints and restrictions need to be considered. Therefore, when solving the strong heterogeneity packing problem, directly using the encoding method based on the attributes of the goods is inefficient, the decision dimension is too large, the algorithm runs for a long time, and it is difficult to obtain a satisfactory solution. In order to deal with this situation, the pre-generation block algorithm is adopted. Among them, the pre-generation block algorithm reduces the decision dimension and improves the efficiency of the algorithm by combining the goods into different blocks and corresponding to different rotation methods. Each block can be regarded as a whole without paying attention to the attributes of a single commodity. Then, the loading order and rotation method of the block are represented by chromosome encoding. Among them, any cargo block includes at least one cargo to be packed, and the rotation methods include length, width, height, length, height, width, length, height, height, width, length, width, height, length, width, height, length, width, height, width ...

[0083] For example, the implementation steps of the pre-generation block algorithm are as follows:

[0084] (1) Generation of cargo blocks: A group of cargoes is combined according to their attributes to form several cargo blocks. These cargo blocks can be combined according to the similarity, size and other attributes of the cargoes, so that the differences between the cargoes in each cargo block are relatively small. The purpose is to transform the single cargo in the original problem into a larger cargo block, thereby reducing the complexity of the problem.

[0085] (2) Coding of cargo blocks: The generated cargo blocks are encoded, and each cargo block is regarded as a gene position of a chromosome. Based on this, the solution space of the problem changes from the original permutation and combination of a single cargo to the permutation and combination of cargo blocks, thereby reducing the size of the search space and the complexity of the problem.

[0086] (3) Representation of loading order and rotation mode: In the pre-generated block algorithm, the first layer of chromosomes represents the loading order of cargo blocks, and the gene bits represent the cargo block IDs; the second layer represents the rotation mode of cargo blocks. This design enables the algorithm to more effectively handle the order and rotation mode of cargo, thereby improving the packing efficiency.

[0087] Refer to Table 1, which shows the chromosome encoding information.

[0088] Table 1

[0089]

[0090] Refer to Table 1 and Figure 2 , the cargo types of the cargo I1-I5 to be packed are the same, the cargo types of the cargo I6-I7 to be packed are the same, and all the cargo (I1-I7) to be packed form four cargo blocks, namely cargo blocks b1-b4. Among them, the cargo I1-I4 to be packed form one block, the cargo I5 to be packed is a separate block, and the rotation mode of the cargo in cargo blocks b1 and cargo blocks b2 is the same, both r1; the cargo I6 to be packed and the cargo I7 to be packed are separate blocks, but the rotation modes are different, cargo block b3 corresponds to the rotation mode r1, and cargo block b4 corresponds to the rotation mode r2.

[0091] The pre-generated block algorithm reduces the dimensionality of the original problem by combining goods into blocks, encoding them and redefining the solution space, thereby significantly reducing the search time and improving the efficiency of the algorithm.

[0092] Step 200: combine the plurality of cargo blocks to obtain a cargo block combination for each type of cargo to be packed.

[0093] After encoding to obtain multiple cargo blocks, the multiple cargo blocks are combined to obtain a cargo block combination for each cargo to be packed. The cargo block combination method can be divided into a local method and a global method.

[0094] Local method: When generating a combination of cargo blocks, search the complete tree of each cargo to be packed one by one to obtain the cargo block combination of each cargo to be packed.

[0095] Global method: consider the cargo block combinations of all goods to be packed as a whole, instead of processing each type of goods to be packed separately. For example, the cargo block combination of each type of goods to be packed is determined through the minimum usage number model or the minimum block type model.

[0096] Step 300, initializing the population of the cargo block combination to obtain an initialized population, and performing crossover and mutation on the population to obtain a new population.

[0097] After encoding and combining the cargo to be packed to obtain the cargo block combination, the cargo block combination is initialized to obtain the initialized population. For example, two methods are used to initialize the population (the population size is P): random method and heuristic method. Among them, the proportion of random individuals is θ∈[0,1], and the number of random individuals is

[0098] (1) Random method: Randomly generate the order and rotation of goods.

[0099] (2) Heuristic method: randomly generate a rotation pattern and generate the order of goods according to the indicator attribute values ​​from large to small (small to large), such as volume, weight, total volume, total weight, length, width, height and quantity to arrange the items in descending order.

[0100] Specifically, a first individual of a cargo block combination is randomly generated based on a random method, and a cargo order and a rotation method of the first individual are randomly generated; a second individual of a cargo block combination is generated based on a heuristic method, and a rotation method of the second individual is randomly generated, and a cargo order of the second individual is generated according to the attribute values ​​of preset cargo indicators; the first individual and the second individual are merged to obtain an initialized population.

[0101] For example, determine the proportion and number of individuals generated by random methods, and then use random methods to generate the corresponding number of first individuals based on the proportion and number of random individuals. For the first individual, randomly generate the order and placement of the goods in the first individual according to the random method. Calculate the number of individuals that need to be generated by the heuristic method, and then use the heuristic method to generate the corresponding number of second individuals. For the second individual, generate the order and placement of the goods in the second individual according to the heuristic method. Finally, merge the individuals generated by random methods and heuristic methods into a population. It can be understood that in the packing problem, the population consists of multiple individuals, each of which represents a packing scheme for goods, where each individual is represented by a set of chromosomes, and the chromosomes are composed of genes.

[0102] By combining random methods and heuristic methods, population initialization is achieved, based on which a certain degree of diversity (individuals generated by random methods) and excellence (individuals generated by heuristic methods) can be introduced into the population, which helps to improve the search efficiency and convergence speed of the genetic algorithm.

[0103] Furthermore, the initialized population is subjected to crossover and mutation to obtain a new population. For example, a method of generating new child individuals based on the crossover operation is as follows: two parent individuals (packing schemes) are selected as the basis for the crossover. Two crossover points are randomly selected, and these points will be used to determine the crossover region. In the crossover region, the corresponding gene fragments of the two parent individuals are exchanged to generate two child individuals, wherein the genes of one child individual come from the first parent individual and remain unchanged outside the crossover region; the genes of the other child individual come from the second parent individual and remain unchanged outside the crossover region. Among them, the crossover operation adopts a two-point crossover method, and this process does not affect the rotation method.

[0104] The method of generating new sub-individuals based on mutation operation is: randomly select an individual (packing scheme) for mutation, and decide whether to perform mutation operation on the individual according to the mutation rate. If it is decided to perform mutation operation, the individual is modified according to the specific mutation method, and the modified individual becomes a new sub-individual. Optionally, the swap method is used for the loading order, and the random change rotation method is used for the rotation layer. Among them, the swap method is a mutation method. In the packing problem, the swap method can be understood as exchanging the positions of two goods, which means that in a packing scheme, the goods in two positions are selected and then their positions are exchanged. Through the swap method, the relative position of the goods can be changed, thereby introducing new combinations and layouts. The random change rotation method is a mutation method. By randomly selecting one or more goods and changing their rotation method (for example, horizontal or vertical placement), new combinations can be introduced, the current solution can be changed, and a better solution can be tried. This random change helps to avoid falling into the local optimal solution and promote the evolution of the algorithm to a better solution.

[0105] In a specific embodiment, assuming that the current population is Pop t , the population size is N 1 , the offspring generated by the current population is Chi t , the population size is N 1 . New Population Pop t+1 Generate: Pop t With Chi t Merge, sort by load rate first, if the load rates are the same, sort by balance index, and finally keep the top N 1 Individuals form a new population Pop t+1 .

[0106] Step 400: Generate a packing plan based on the new population and external files, and pack the goods to be packed based on the packing plan.

[0107] It should be noted that the external archive is used to store the non-inferior solutions of the population, where a non-inferior solution refers to a solution that cannot be solved by other solutions under all objectives or constraints at the same time in multi-objective optimization or multi-constraint optimization. In other words, for a given set of objective functions or constraints, a non-inferior solution is a solution that has no better solution than it under these functions or conditions.

[0108] After generating a new population, save the excellent individuals in the new population to the external archive as an alternative solution or reference solution. Update the external archive regularly to remove duplicate individuals or low-quality individuals to maintain the diversity and high-quality solutions in the archive. For example, assuming that the external archive is ES, the initial state is empty, and the maximum size N 2 ; External archive update: After each generation, the new population is merged with the external archive ES, and the maximum number of N is obtained by screening in the first layer through non-dominated sorting and crowding distance calculation. 2 solutions (if the first layer is more than N 2 solutions, only keep the first N 2 otherwise, keep all).

[0109] In each generation of evolution, the fitness of each individual can be evaluated according to the fitness function, and the appropriate evolutionary strategy (such as selection, crossover, mutation) can be selected to generate new individuals. At the same time, based on the excellent individuals saved in the external archives, an elite retention strategy can be introduced to ensure that the excellent solutions are preserved and passed on to the next generation. By continuously iterating the generation of new populations and maintaining external archives, the packing plan can be gradually optimized to find a better solution, thereby obtaining a packing plan. Finally, the goods to be packed are packed according to the packing plan.

[0110] The packing method provided in the embodiment of the present application encodes multiple goods to be packed to obtain multiple cargo blocks; any cargo block includes at least one cargo to be packed; multiple cargo blocks are combined to obtain a cargo block combination of each cargo to be packed; a population is initialized for the cargo block combination to obtain an initialized population, and the population is crossovered and mutated to obtain a new population; a packing plan is generated based on the new population and an external archive, and the goods to be packed are packed based on the packing plan; the external archive is used to store non-inferior solutions of the population. The embodiment of the present application can take into account the multi-objective solution of packing cost and balance by combining the encoding method based on the cargo block with the population generation method, and can provide a more widely distributed candidate solution set to improve the balance effect of packing.

[0111] Based on the above embodiment, the step of combining the plurality of cargo blocks to obtain a cargo block combination of each cargo to be packed includes:

[0112] Step 211, initialize the tree and set the root node of the tree to be empty;

[0113] Step 212, based on the rotation mode of the cargo block, branch each node of the tree to obtain at least one intermediate node;

[0114] Step 213, generating the target cargo block of the intermediate node according to the generation order of the cargo block, so as to obtain a complete tree of each cargo to be packed;

[0115] Step 214, traverse the complete tree, and select a cargo block combination based on preset heuristic information to obtain a cargo block combination for each of the cargoes to be packed.

[0116] The steps to generate a complete tree for each type of cargo to be packed include:

[0117] Step 1: Initialize the tree and set the root node of the tree to empty;

[0118] Step 2: According to the rotation mode of the cargo block, each node of the tree is branched to obtain at least one intermediate node. Each intermediate node after branching generates a complete feasible block (i.e., the target cargo block) according to the generation order of the cargo block, thereby obtaining a complete tree for each cargo to be packed, such as Figure 3 As shown, in Figure 3 In the figure, b1, b2 and b3 represent cargo blocks, and r1, r2 and r3 represent rotation methods. The cargo blocks are generated in the order from bottom to top, from left to right and from back to front, that is, each intermediate node after the branch generates a complete feasible block in the order from bottom to top, from left to right and from back to front.

[0119] Each time a branch generates a cargo block, the following conditions must be met:

[0120] a) The dimensions of the cargo block do not exceed the dimensions of the container;

[0121] b) Each cargo block must be a complete block, no gaps are allowed;

[0122] c) The quantity of goods in each generated cargo block is controlled within Among them, δ is the threshold coefficient of the cargo, which is used to control the amount of cargo in the cargo block, I max The maximum number of goods.

[0123] refer to Figure 4 After generating a complete tree of each cargo to be packed, traverse the complete tree and select a cargo block combination based on preset heuristic information to obtain a cargo block combination of each cargo to be packed. The heuristic information refers to preset heuristic rules, including the shallowest, deepest, least transformation, most transformation, and random selection.

[0124] For example, for the selection or non-selection of each node, a heuristic rule can be used for screening. For example, the shallowest, deepest, least transformation, most transformation or random selection rules can be used to select the optimal block combination. At the same time, all nodes in the complete tree are traversed for each cargo block combination of the cargo to be packed.

[0125] The embodiment of the present application adopts a local method to determine the block combination of each type of goods to be packed, which can consider the block combination of each type of goods in more detail, so that the problem can be solved more accurately. At the same time, in the local search process, the block combination of each type of goods is selected one by one according to the heuristic rules, so that the optimal block combination solution can be found more quickly. On the other hand, when dealing with large problems, the local method can decompose the problem into multiple small problems and solve each small problem, which can effectively reduce the search space and improve the efficiency of the algorithm.

[0126] Based on the above embodiment, the combining of the plurality of cargo blocks to obtain a cargo block combination of each cargo to be packed further includes:

[0127] Step 311, determining a minimum usage times model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, the number of times each of the goods blocks of the goods to be packed is selected, and information on whether each of the goods blocks of the goods to be packed is selected;

[0128] Step 312, determining a minimum block type model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, and information on whether each of the goods blocks of each of the goods to be packed is selected;

[0129] Step 313: Determine a cargo block combination for each type of cargo to be packed based on the minimum usage times model or the minimum block type model.

[0130] The embodiment of the present application considers the combination of each cargo block from a global perspective, constructs an optimization model based on the pre-generated block list, and then selects the optimal cargo block combination. The optimization model includes a minimum usage model and a minimum block type model.

[0131] Model 1: Minimum number of uses model:

[0132]

[0133] Model 2: Minimum Block Type Model:

[0134]

[0135] In the minimum number of use models and the minimum block type model, N is the number of types of goods to be packed; B iis the block list of the i-th cargo to be packed; c ij is the number of times the jth cargo block of the i-th cargo to be packed is selected; z ij is the number of goods in the jth cargo block of the i-th cargo to be packed; x ij It is the information whether the jth cargo block of the i-th cargo to be packed is selected. If it is selected, the value is 1, and if it is not selected, the value is 0. Among them, the constraints of the minimum number of uses model and the minimum block type model are both: the total number of goods corresponding to the cargo block combination is equal to the number of goods to be packed.

[0136] By solving the minimum usage times model or the minimum block type model through a solver or an accurate mathematical programming algorithm, a combination of cargo blocks for each cargo to be packed can be obtained.

[0137] The embodiment of the present application adopts a global method to determine the combination of cargo blocks for each cargo to be packed, and can optimize the block combination of all cargoes as a whole to find a better solution. At the same time, it can consider the size, quantity and other attributes of the cargo as a whole, so as to better control the size and quantity of the blocks and improve the packing efficiency. On the other hand, when dealing with complex problems, the global method can handle a larger problem scale and can more comprehensively consider the relationship between each cargo.

[0138] Based on the above embodiment, the step of generating a packing scheme based on the new population and the external archive includes:

[0139] Step 411, determining the maximum loading rate and the minimum balance deviation rate of the new population;

[0140] Step 412, evaluating the new population based on the maximized loading rate and the minimized balance deviation rate;

[0141] Step 413, updating the external file based on the evaluation result;

[0142] Step 414, based on the partial order neighborhood search strategy, performing a neighborhood search on the new population to generate a next generation population; wherein the partial order target in the partial order neighborhood search strategy is that the maximum loading rate is greater than the minimum balance offset rate;

[0143] Step 415, iterate the next generation population to generate the packing solution.

[0144] Based on the information of each cargo block selected in the new population, the length, width and height of each cargo block and the length, width and height of the container, the maximum loading rate is determined. The maximum loading rate means that in the packing problem, the utilization rate of each container should be maximized as much as possible, that is, in the packing process, the space of each container should be fully utilized to reduce the number of containers required and reduce costs.

[0145] The formula for maximizing the loading rate is:

[0146]

[0147] in, For cargo block i 1 is selected, such as the value is 1; and are the length, width and height of the cargo block respectively; L, W and H are the length, width and height of the container respectively, N 1 The total number of cargo blocks.

[0148] Based on the preset front and rear weight of the cargo block in the new population and the total weight of the cargo to be packed, the front and rear relative offset of the cargo block in the new population is determined; based on the preset left and right weight of the cargo block in the new population and the total weight of the cargo to be packed, the left and right relative offset of the cargo block in the new population is determined; based on the front and rear relative offset and the left and right relative offset, the minimized balance offset rate is determined. Among them, the balance offset rate refers to the balance problem caused by the uneven load distribution of the container during the loading process, and the minimized balance offset rate means that the items in the container are distributed as evenly as possible to avoid the situation where some containers are overloaded and some containers are underloaded, so as to ensure the stability and safety of loading.

[0149] The formula for minimizing the balance deviation rate is:

[0150] min r 2 +r 3 ;

[0151]

[0152]

[0153]

[0154]

[0155]

[0156] Among them, r 2 is the relative offset between front and rear, r 3 is the relative offset between the left and right sides; a is the front and rear offset weight, b is the left and right offset weight, and W is the total weight of the goods to be packed; x i is the horizontal coordinate of the center of gravity of the i-th cargo, y i is the vertical coordinate of the center of gravity of the i-th cargo, m i is the weight of the i-th cargo.

[0157] After determining the maximum loading rate and the minimum equilibrium deviation rate, the new population is evaluated based on the maximum loading rate and the minimum equilibrium deviation rate, and then the external archive is updated based on the evaluation results. For example, in a multi-objective optimization problem, a population stores multiple solutions (individuals). Population evaluation refers to the multi-objective evaluation of these solutions, such as calculating the maximum loading rate and the minimum equilibrium deviation rate for each solution, so as to retain a certain proportion of excellent individuals and ensure the quality of the population. Then, the new solution is compared with the external archive, and the non-inferior solution in the external archive is updated to ensure that the external archive contains the optimal solution.

[0158] Based on the partial order neighborhood search strategy, a neighborhood search is performed on the new population to generate the next generation population, and the next generation population is iterated to generate a packing solution. Among them, the partial order objective in the partial order neighborhood search strategy is to maximize the loading rate greater than minimizing the equilibrium deviation rate. It can be understood that in multi-objective optimization problems, the classic Pareto dominance relationship is used to compare the relative merits of solutions. However, there is an obvious partial order relationship between the loading rate indicator and the bias rate indicator, that is, one solution is better than another solution in loading rate, but worse than another solution in bias rate. Therefore, the classic Pareto dominance relationship is not sufficient to describe the relative merits of solutions. In order to solve this problem, it is necessary to define a lexicographic order objective function for comparison. Among them, the lexicographic order objective function (that is, the partial order objective): 3 :O 1 >O 2 , O 1 To maximize the loading rate, O 2 To minimize the balance deviation rate.

[0159] The neighborhood structure in the partial order neighborhood search strategy refers to a set of ways to define a solution space in which a specific operation can be used to get from one solution to another. In the optimization algorithm, the neighborhood structure is used to generate neighboring solutions so that the solution space can be explored during the search process and better solutions can be found.

[0160] The neighborhood search operation can change the solution by changing the rotation mode, exchanging positions or inserting, etc. The embodiment of the present application designs three neighborhood operations:

[0161] N1: Change the rotation mode of the rotation layer: by changing the rotation mode of the goods, that is, rotating the goods from horizontal to vertical, or from vertical to horizontal.

[0162] N2: Swap at the sequence layer: by exchanging the positions of the goods in the sequence, the positions of two adjacent goods are exchanged.

[0163] N3: Insertion at the sequence level: insert a new item into the sequence and place it at the specified position.

[0164] In one example, reference Figure 5 The neighborhood search process includes: assuming that the current solution is S, based on the current neighborhood index ind←1 in N ind Search in, if a better solution is found, then use the better solution to replace the current solution S. If no optimal solution is found, update the neighborhood index ind←ind+1, and determine whether the updated neighborhood index is greater than the set maximum value. If it is greater, output the current solution S; if it is less than or equal to, then in N ind Search again.

[0165] The embodiment of the present application comprehensively considers different optimization goals during the optimization process, which helps to find a more balanced and efficient solution. At the same time, the population is evaluated based on maximizing the loading rate and minimizing the balance offset rate, and the external archive is updated in time, so that the set of non-inferior solutions in the search process can be retained and tracked, which is conducive to maintaining diversity and avoiding premature convergence. By adopting a strategy in which the partial order target is to maximize the loading rate greater than the minimum balance offset rate, it is helpful to guide the search in the direction of a better packing solution. At the same time, the introduction of the partial order relationship can help screen out a better solution and improve the efficiency and quality of the search. By iteratively generating the next generation of populations and continuously optimizing, the packing solution can be gradually improved and gradually approach the optimal solution. This iterative optimization method helps to explore in depth in the search space and find a better solution. That is, by combining the solution of multi-objective optimization and partial order neighborhood search strategy, each advantage can be fully utilized in solving the packing problem, the search efficiency can be improved, and a better solution can be obtained, thereby providing a better solution for the packing problem in practical applications.

[0166] Based on the above embodiment, before determining the maximum loading rate and the minimum balance deviation rate of the new population, the method further includes:

[0167] Step 4110: Decode the new population to determine the spatial location information of the goods to be packed in the new population.

[0168] Among them, the spatial position information is stored in the first position list and the second position list; the first position list is used to store the depth of the corner points of the goods to be packed, the vertical height of the corner points and the left distance of the corner points; the second position list is used to store the right distance of the corner points of the goods to be packed, the vertical height of the corner points and the depth of the corner points.

[0169] It can be understood that in the loading problem, encoding and decoding refer to the process of converting individuals in the problem space (such as the loading plan in the cargo loading problem) into chromosome representations, and converting chromosomes back to individuals in the problem space. Among them, encoding is the process of converting individuals in the problem space into chromosomes, that is, converting the cargo loading plan into chromosome representations, and decoding is the process of converting chromosomes back to individuals in the problem space, that is, converting chromosome representations into cargo loading plans. For example, in the cargo loading problem, encoding can encode the loading order and rotation method into binary values ​​in the chromosome, while decoding can convert the binary values ​​in the chromosome back to the specific position and rotation method of the cargo.

[0170] After the cargo to be packed is coded, the loading order and rotation method of the cargo blocks are involved, but the spatial position of the cargo blocks cannot be characterized. If spatial information is missing, the feasibility of cargo loading cannot be calculated, and the loading rate and balance index cannot be calculated. Therefore, a loading method needs to be designed to convert the chromosome into a complete solution.

[0171] refer to Figure 6 , using the first position list and the second position list to maintain the points in the space to determine the traversal order of the available points in the space. Among them, the first position list (DBL): all currently available corner points are arranged in the order of depth from large to small, vertical height from small to large, and left distance from small to large. The second position list (RBF): all currently available corner points are arranged in the order of right distance from small to large, vertical height from small to large, and depth from large to small. Figure 6 It includes the loading order of the items, the rotations of the items, the x-coordinates of the items, the y-coordinates of the items and the z-coordinates of the items.

[0172] The points in the first position list and the second position list correspond to available positions in space, such as Figure 7 As shown. Among them, the corresponding relationship between point and space is:

[0173] The space corresponding to the cargo side plane point (P1) is the available surface of the current cargo plane extended along the y-axis and does not overlap with the currently loaded cargo.

[0174] The space corresponding to the cargo front plane point (P2) is the available surface of the current cargo front plane extended along the positive direction of the x-axis and does not overlap with the currently loaded cargo.

[0175] The space corresponding to the plane point (P3) on the cargo is the available surface of the current cargo measurement plane extended along the positive direction of the z-axis, and does not overlap with the currently loaded cargo.

[0176] The embodiment of the present application manages the available points in the space in an orderly manner through two position lists, so that a suitable position can be quickly found when loading goods, thereby improving the efficiency and accuracy of packing.

[0177] Based on the above embodiments, reference Figure 8 , the embodiment of the present application proposes a fast packing method, comprising the following steps:

[0178] 1. Initialize the space list;

[0179] 2. The current cargo (gene position) ind←1, executes the placement location search program, and returns to the location point P;

[0180] 3. Determine whether the location point is empty;

[0181] 4. If the position point is empty, form a loading unit for the goods at the current gene position in the order from top to bottom, from left to right, and from back to front. Then, place the loading unit at position point P, update and sort the spatial point list, and update the loaded goods. After updating the loaded goods, continue to step 2;

[0182] 5. If the position point is not empty, update ind, ind←ind+1. Then determine whether the updated ind is greater than the chromosome length. If it is, output the packing solution; if it is less, execute step 2.

[0183] The fast packing algorithm proposed in the embodiment of the present application can realize fast decoding of chromosomes while taking into account the balance index. At the same time, by adopting a genetic algorithm for iterative search, the best cargo packing solution can be found, thereby maximizing the use of space and improving loading efficiency.

[0184] Based on the above embodiments, reference Fig. 9 , the embodiment of the present application proposes a placement location retrieval method, comprising the following steps:

[0185] 1. Obtain cargo attribute information;

[0186] 2. Generate list A for the current space layout;

[0187] 3. The current position point index is ind_a←1. Check whether it can be placed at the ind_a position. If it can be placed, exit; if not, execute step 4.

[0188] 4. Update the index, set ind_a←ind_a+1, and then determine whether the updated index ind_a is greater than the dimension of list A; if not, re-determine whether it can be placed at the ind_a position; if so, execute step 5;

[0189] 5. Generate list B for the current spatial layout. The current position point index is ind_b←1. Check whether it can be placed at the position ind_b. If it can be placed, determine the placement position as ind_b and exit. If it cannot be placed, execute step 6.

[0190] 6. Update the index, set ind_b←ind_b+1, and then determine whether the updated index ind_b is greater than the dimension of list B; if not, re-determine whether it can be placed at the ind_b position; if so, exit.

[0191] The embodiment of the present application dynamically generates list A and list B according to the cargo attribute information and the current spatial layout, and can flexibly perform location search according to the actual situation to adapt to different cargo and spatial layouts. At the same time, by gradually updating the index, the location point can be quickly searched and judged, thereby effectively determining the best placement location, saving search time and computing resources.

[0192] Based on the above embodiment, a cargo cluster-based encoding may also be used to generate a packing solution, including the following steps:

[0193] Step 500, classifying the plurality of goods to be packed to obtain goods to be packed of the same type and goods to be packed of the same customer;

[0194] Step 600, generating a plurality of cargo clusters according to the same type of cargo to be packed or cargo to be packed by the same customer;

[0195] Step 700, initializing the population of the cargo cluster to obtain an initialized target population, and performing crossover and mutation on the target population to obtain a new target population;

[0196] Step 800: Generate a target packing solution based on the new target population and external files, and pack the goods to be packed based on the target packing solution.

[0197] By classifying multiple goods to be packed according to the type of goods, we can obtain the same type of goods to be packed, and then generate multiple clusters of goods based on the same type of goods to be packed. For example, goods with the same physical properties (such as length, width, height, weight, etc.) are classified into the same cluster, where the goods in the cluster may belong to different customers, but they are exactly the same in properties. By classifying the same type of goods into one category, it helps to simplify the complexity of the problem and reduce the number of variables that need to be considered.

[0198] In addition, multiple goods to be packed can be classified according to customer type to obtain the goods to be packed of the same customer, and then multiple goods clusters can be generated based on the goods to be packed of the same customer. For example, different goods of the same customer can be classified into the same goods cluster, where the goods in the goods cluster may be of different types, but they come from the same customer. By processing the goods of the same customer together, it is helpful to better meet customer needs and improve customer satisfaction. At the same time, it helps to simplify the complexity of the problem and reduce the number of variables that need to be considered.

[0199] For example, refer to Fig.10 Although cargo I6 and cargo I1-I5 are not of the same type, their length, width, height and weight are the same. Therefore, cargo I1-I6 can be considered to belong to the same cargo cluster b1. Cargo I7-I10 are of the same type and have the same length, width, height and weight. Therefore, cargo I7-I10 can be considered to belong to the same cargo cluster b2. The rotation mode of cargo cluster b1 is r1, and the rotation mode of cargo cluster b2 is also r1.

[0200] Optionally, different shipments from the same customer can be consolidated into a shipment block for processing.

[0201] After generating multiple cargo clusters, the cargo cluster population is initialized to obtain the initialized target population, the target population is crossover and mutation is performed to obtain a new target population, and then a target packing scheme is generated based on the new target population and the external archive, and the cargo to be packed is packed based on the target packing scheme. It can be understood that the processing method of generating a packing scheme based on a cargo cluster is the same as the processing method of generating a packing scheme based on a combination of cargo blocks mentioned in the above embodiment. The difference between the two is that the coding method of the cargo to be packed is different, one is based on the coding of the cargo block, and the other is based on the coding of the cargo cluster.

[0202] The embodiment of the present application combines a cargo cluster-based coding method with a population generation method to provide a multi-objective solution that takes into account both packing cost and balance, and can provide a candidate solution set with a wider distribution, thereby improving the packing balance effect.

[0203] In order to further analyze and explain the packing method proposed in this application, refer to Figure 11-Figure 12 And the following examples.

[0204] The embodiment of the present application specifically proposes a multi-objective intelligent packing method considering center of gravity balance, including the following contents:

[0205] (1) The user enters the following information through the task input module on the front end:

[0206] Cargo information: length, width, height, quantity and placement restrictions of the cargo to be packed;

[0207] Container information: length, width, height and maximum load;

[0208] Weight bias index: maximum allowable front and rear weight bias and maximum allowable left and right weight bias.

[0209] (2) The front end transmits the user input information to the back end data loading module through the task input module, and then performs data verification and computing resource scheduling.

[0210] (3) The data verification results and resource scheduling results are transmitted to the data processing module, which performs dimension reduction processing on the problem, and then processes the cargo blocks after dimension reduction through the model building module. Finally, the packing plan is determined through the algorithm configuration and execution module. The packing plan is output to the packing plan display module at the front end for display.

[0211] Before the backend generates a packing plan, it needs to define parameters, including population size, maximum number of iterations, external archive size, crossover probability, loading order variation probability, and placement variation probability. Optionally, to improve the algorithm calculation efficiency, Fig.10 The partially ordered neighborhood search in targets only new solutions in the first Pareto front in the external archive.

[0212] 3.1) Multi-objective modeling, including:

[0213] O 1 :

[0214] O 2 :minr 2 +r 3 ;

[0215] Among them, the partial order target is: 3 :O 1 >O 2 .

[0216] The constraints are: cargo does not overlap, cargo does not overload, cargo does not exceed the container boundaries, cargo is fully supported, and no gaps are allowed between adjacent cargoes.

[0217] 3.2) Problem Dimensionality Reduction: Users can choose whether to pre-generate blocks based on the characteristics of the goods to be packed. For problems with a small number of goods, they can be directly encoded. For problems with a large number of goods, the pre-generation block algorithm is used to reduce the dimension.

[0218] 3.3) Population initialization: To ensure the quality of the initial population, the proportion of random individuals θ∈[0,1] should not be too large.

[0219] 3.4) Execute the multi-objective genetic algorithm: Execute the multi-objective genetic algorithm and write the results to the database. The front end displays the solution in the external archive. If the problem dimension reduction operation is performed, the cargo block needs to be parsed into cargo.

[0220] After obtaining the user input weight index, the algorithm of the embodiment of the present application first converts the single-box loading model into a multi-objective packing model with a loading rate preference. The original problem is reduced in dimension through the pre-generation block algorithm, thereby greatly reducing the search time. In addition, the embodiment of the present application provides a variety of pre-generation block methods, thereby improving the diversity of the population and preventing the algorithm from falling into a local optimum too early. In order to further improve the accuracy of the algorithm, the offspring gives priority to solutions with high loading rates, and provides a partial order neighborhood search strategy. Based on this, the embodiment of the present application can provide a multi-objective solution set that meets the preferences and effectively balances diversity and convergence.

[0221] Based on the above embodiments, the present application provides a packaging device, including:

[0222] The encoding module 1301 is used to encode a plurality of goods to be packed to obtain a plurality of goods blocks; any of the goods blocks includes at least one of the goods to be packed;

[0223] A combination module 1302 is used to combine the multiple cargo blocks to obtain a cargo block combination of each cargo to be packed;

[0224] A population initialization module 1303 is used to initialize the population of the cargo block combination to obtain an initialized population, and perform crossover and mutation on the population to obtain a new population;

[0225] The packing module 1304 is used to generate a packing plan based on the new population and an external file, and pack the goods to be packed based on the packing plan; the external file is used to store non-inferior solutions of the population.

[0226] The packing device provided in the embodiment of the present application encodes multiple goods to be packed to obtain multiple cargo blocks; any cargo block includes at least one cargo to be packed; multiple cargo blocks are combined to obtain a cargo block combination of each cargo to be packed; a population is initialized for the cargo block combination to obtain an initialized population, and the population is crossovered and mutated to obtain a new population; a packing plan is generated based on the new population and an external archive, and the goods to be packed are packed based on the packing plan; the external archive is used to store non-inferior solutions of the population. The embodiment of the present application can take into account the multi-objective solution of packing cost and balance by combining the encoding method based on the cargo block with the population generation method, and can provide a more widely distributed candidate solution set to improve the balance effect of packing.

[0227] In one embodiment, the combining module 1302 is further configured to:

[0228] Initialize a tree and set the root node of the tree to be empty;

[0229] Based on the rotation mode of the cargo block, each node of the tree is branched to obtain at least one intermediate node;

[0230] Generate the target cargo blocks of the intermediate nodes according to the generation order of the cargo blocks, so as to obtain a complete tree of each cargo to be packed;

[0231] The complete tree is traversed, and a cargo block combination is selected based on preset heuristic information to obtain a cargo block combination for each of the cargoes to be packed.

[0232] In one embodiment, the combining module 1302 is further configured to:

[0233] Determine a minimum usage times model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, the number of times each of the goods blocks of each of the goods to be packed is selected, and information on whether each of the goods blocks of each of the goods to be packed is selected;

[0234] Determine a minimum block type model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, and information on whether each of the goods blocks of each of the goods to be packed is selected;

[0235] Based on the minimum usage times model or the minimum block type model, a cargo block combination of each of the cargoes to be packed is determined.

[0236] In one embodiment, the population initialization module 1303 is further used to:

[0237] randomly generating a first body of the cargo block combination based on a random method, and randomly generating a cargo order and a rotation method of the cargo in the first body;

[0238] Generate a second entity of the cargo block combination based on a heuristic method, randomly generate a rotation method of the cargo in the second entity, and generate a cargo order of the second entity according to a preset attribute value of a cargo indicator;

[0239] The first individual and the second individual are merged to obtain an initialized population.

[0240] In one embodiment, the boxing module 1304 is further configured to:

[0241] determining a maximized loading rate and a minimized equilibrium deviation rate for the new population;

[0242] evaluating the new population based on the maximized loading rate and the minimized equilibrium deviation rate;

[0243] Based on the evaluation results, updating the external file;

[0244] Based on a partial order neighborhood search strategy, a neighborhood search is performed on the new population to generate a next generation population; wherein the partial order target in the partial order neighborhood search strategy is that the maximum loading rate is greater than the minimum balance offset rate;

[0245] Iterate the next generation population to generate the packing solution.

[0246] In one embodiment, the boxing module 1304 is further configured to:

[0247] Determining the maximum loading rate based on the information of each cargo block selected in the new population, the length, width and height of each cargo block, and the length, width and height of the container;

[0248] Determine the front-to-back relative offset of the cargo blocks in the new population based on the preset front-to-back offset weight of the cargo blocks in the new population and the total weight of the cargo to be packed;

[0249] Determine the left-right relative offset of the cargo blocks in the new population based on the preset left-right offset weight of the cargo blocks in the new population and the total weight of the cargo to be packed;

[0250] The minimized balance offset rate is determined based on the front-rear relative offset and the left-right relative offset.

[0251] In one embodiment, the boxing module 1304 is further configured to:

[0252] Decoding the new population to determine spatial location information of the goods to be packed in the new population;

[0253] Among them, the spatial position information is stored in a first position list and a second position list; the first position list is used to store the depth of the corner points of the goods to be packed, the vertical height of the corner points and the left distance of the corner points; the second position list is used to store the right distance of the corner points of the goods to be packed, the vertical height of the corner points and the depth of the corner points.

[0254] In one embodiment, the boxing module 1304 is further configured to:

[0255] Classifying the plurality of goods to be packed to obtain goods to be packed of the same type and goods to be packed of the same customer;

[0256] Generate multiple cargo clusters based on the same type of cargo to be packed or the same customer's cargo to be packed;

[0257] Initializing the population of the cargo cluster to obtain an initialized target population, and performing crossover and mutation on the target population to obtain a new target population;

[0258] A target packing plan is generated based on the new target population and the external archive, and the goods to be packed are packed based on the target packing plan.

[0259] Fig.14 An example of a physical structure diagram of an electronic device is shown in FIG. Fig.14 As shown, the electronic device may include: a processor 1410, a communication interface 1420, a memory 1430 and a communication bus 1440, wherein the processor 1410, the communication interface 1420, and the memory 1430 communicate with each other through the communication bus 1440. The processor 1410 may call the logic instructions in the memory 1430 to execute the following method:

[0260] Encoding a plurality of goods to be packed to obtain a plurality of goods blocks; any of the goods blocks includes at least one of the goods to be packed;

[0261] Combining a plurality of the cargo blocks to obtain a cargo block combination for each type of cargo to be packed;

[0262] Initializing a population of the cargo block combination to obtain an initialized population, and performing crossover and mutation on the population to obtain a new population;

[0263] A packing scheme is generated based on the new population and an external file, and the goods to be packed are packed based on the packing scheme; the external file is used to store non-inferior solutions of the population.

[0264] In addition, the logic instructions in the above-mentioned memory 1430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

[0265] On the other hand, the embodiments of the present application further provide a non-transitory computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the packing method provided in the above embodiments is implemented, for example, including:

[0266] Encoding a plurality of goods to be packed to obtain a plurality of goods blocks; any of the goods blocks includes at least one of the goods to be packed;

[0267] Combining a plurality of the cargo blocks to obtain a cargo block combination for each type of cargo to be packed;

[0268] Initializing a population of the cargo block combination to obtain an initialized population, and performing crossover and mutation on the population to obtain a new population;

[0269] A packing scheme is generated based on the new population and an external file, and the goods to be packed are packed based on the packing scheme; the external file is used to store non-inferior solutions of the population.

[0270] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0271] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0272] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

[0273] The above implementation modes are only used to illustrate the present application, but not to limit the present application. Although the present application is described in detail with reference to the embodiments, a person skilled in the art should understand that various combinations, modifications or equivalent substitutions of the technical solutions of the present application do not depart from the spirit and scope of the technical solutions of the present application, and should be included in the scope of the claims of the present application.

Claims

1. A packing method, characterized in that: include: Encoding a plurality of goods to be packed to obtain a plurality of goods blocks; any of the goods blocks includes at least one of the goods to be packed; Combining a plurality of the cargo blocks to obtain a cargo block combination for each type of cargo to be packed; Initializing a population of the cargo block combination to obtain an initialized population, and performing crossover and mutation on the population to obtain a new population; Generate a packing plan based on the new population and the external archive, and pack the goods to be packed based on the packing plan; The external archive is used to store non-inferior solutions of the population; The generating of a packing scheme based on the new population and the external archive comprises: determining a maximized loading rate and a minimized equilibrium deviation rate for the new population; evaluating the new population based on the maximized loading rate and the minimized equilibrium deviation rate; Based on the evaluation results, updating the external file; Based on a partial order neighborhood search strategy, a neighborhood search is performed on the new population to generate a next generation population; wherein the partial order target in the partial order neighborhood search strategy is that the maximum loading rate is greater than the minimum balance offset rate; Iterate the next generation population to generate the packing solution.

2. The packing method according to claim 1, characterized in that: The combining of the plurality of cargo blocks to obtain a cargo block combination of each cargo to be packed includes: Initialize a tree and set the root node of the tree to be empty; Based on the rotation mode of the cargo block, each node of the tree is branched to obtain at least one intermediate node; Generate the target cargo blocks of the intermediate nodes according to the generation order of the cargo blocks, so as to obtain a complete tree of each cargo to be packed; The complete tree is traversed, and a cargo block combination is selected based on preset heuristic information to obtain a cargo block combination for each of the cargoes to be packed.

3. The packing method according to claim 1, characterized in that: The combining of the plurality of cargo blocks to obtain a cargo block combination of each cargo to be packed includes: Determine a minimum usage times model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, the number of times each of the goods blocks of each of the goods to be packed is selected, and information on whether each of the goods blocks of each of the goods to be packed is selected; Determine a minimum block type model based on the number of types of the goods to be packed, the block list of each of the goods to be packed, and information on whether each of the goods blocks of each of the goods to be packed is selected; Based on the minimum usage times model or the minimum block type model, a cargo block combination of each of the cargoes to be packed is determined.

4. The packing method according to claim 1, characterized in that: The step of initializing the population of the cargo block combination to obtain the initialized population includes: randomly generating a first body of the cargo block combination based on a random method, and randomly generating a cargo order and a rotation method of the cargo in the first body; Generate a second entity of the cargo block combination based on a heuristic method, randomly generate a rotation method of the cargo in the second entity, and generate a cargo order of the second entity according to a preset attribute value of a cargo indicator; The first individual and the second individual are merged to obtain an initialized population.

5. The packing method according to claim 1, characterized in that: Determining the maximum loading rate and the minimum equilibrium deviation rate of the new population includes: Determining the maximum loading rate based on the information of each cargo block selected in the new population, the length, width and height of each cargo block, and the length, width and height of the container; Determine the front-to-back relative offset of the cargo blocks in the new population based on the preset front-to-back offset weight of the cargo blocks in the new population and the total weight of the cargo to be packed; Determine the left-right relative offset of the cargo blocks in the new population based on the preset left-right offset weight of the cargo blocks in the new population and the total weight of the cargo to be packed; The minimized balance offset rate is determined based on the front-rear relative offset and the left-right relative offset.

6. The packing method according to claim 1, characterized in that: Before determining the maximum loading rate and the minimum balance deviation rate of the new population, the method further includes: Decoding the new population to determine spatial location information of the goods to be packed in the new population; Among them, the spatial position information is stored in a first position list and a second position list; the first position list is used to store the depth of the corner points of the goods to be packed, the vertical height of the corner points and the left distance of the corner points; the second position list is used to store the right distance of the corner points of the goods to be packed, the vertical height of the corner points and the depth of the corner points.

7. The packing method according to claim 1, characterized in that: The method further comprises: Classifying the plurality of goods to be packed to obtain goods to be packed of the same type and goods to be packed of the same customer; Generate multiple cargo clusters based on the same type of cargo to be packed or the same customer's cargo to be packed; Initializing the population of the cargo cluster to obtain an initialized target population, and performing crossover and mutation on the target population to obtain a new target population; A target packing plan is generated based on the new target population and the external archive, and the goods to be packed are packed based on the target packing plan.

8. A packing device, characterized in that: include: A coding module, used for coding a plurality of goods to be packed to obtain a plurality of goods blocks; any of the goods blocks includes at least one of the goods to be packed; A combination module, used for combining a plurality of the cargo blocks to obtain a cargo block combination for each of the cargoes to be packed; A population initialization module is used to initialize the population of the cargo block combination to obtain an initialized population, and to perform crossover and mutation on the population to obtain a new population; A packing module, used for generating a packing scheme based on the new population and an external archive, and packing the goods to be packed based on the packing scheme; the external archive is used for storing non-inferior solutions of the population; The packing module is further used to determine the maximum loading rate and the minimum balance deviation rate of the new population; evaluate the new population based on the maximum loading rate and the minimum balance deviation rate; and update the external archive based on the evaluation result; Based on the partial order neighborhood search strategy, a neighborhood search is performed on the new population to generate the next generation population; wherein the partial order target in the partial order neighborhood search strategy is that the maximization loading rate is greater than the minimization balance deviation rate; and the next generation population is iterated to generate the packing solution.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the box packing method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the box packing method according to any one of claims 1 to 7 is implemented.