Packing method and electronic devices

By combining genetic algorithms and greedy algorithms to optimize the placement order of items, the problems of insufficient packing efficiency and volume ratio in fast calculations are solved, and more efficient packing scheme generation is achieved.

CN117682151BActive Publication Date: 2026-04-03INVENTEC PUDONG TECH CORPOARTION +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-30
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot generate optimal packing solutions in rapid calculations, resulting in insufficient packing efficiency and volume utilization.

Method used

By combining genetic algorithms and greedy algorithms, the optimal packing scheme is generated by selecting the order of item placement and optimizing the placement data of the second subset using the greedy algorithm.

Benefits of technology

While reducing computation time, packing efficiency and volume ratio were improved, and packing scheme was optimized.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117682151B_ABST
    Figure CN117682151B_ABST
Patent Text Reader

Abstract

This invention provides a packing method comprising the following steps: Calculating a plurality of packing schemes using a genetic algorithm. Selecting a plurality of candidate packing schemes that include all the items from the packing schemes. In each candidate packing scheme, classifying at least one item with the highest placement priority into a first subset and classifying at least one item with the lowest placement priority into a second subset. In each candidate packing scheme, maintaining first placement data for the first subset and recalculating second placement data for the second subset using a greedy algorithm to generate updated second placement data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a packing method, and more particularly to a packing method for parcel packing and an electronic device. Background Technology

[0002] In some embodiments, packaging electronic products such as laptop computers and their accessories is one of the final steps in the manufacturing process before the laptop computer is shipped to the customer. An order typically contains multiple items, which are usually shipped in one (sometimes two or more) container. For example, an order might contain one laptop computer, a laptop bag, a mouse, an external keyboard, and a server.

[0003] Each item has its three-dimensional dimensions: width, height, and depth. The dimensions of the container also include three-dimensional data, such as width, height, and depth. The packing problem is to place all the items specified in an order into suitable container boxes, or, if they cannot fit into one container, into multiple boxes. Some prior techniques, while faster due to the use of approximate / optimization algorithms, may not produce optimal solutions.

[0004] Therefore, how to provide a bin packing method to calculate the optimal solution at a relatively fast computation speed is an important problem in this field. Summary of the Invention

[0005] In view of the shortcomings of the prior art described above, the purpose of this invention is to provide a packing method to solve the problem that the prior art cannot generate the optimal solution at a relatively fast computing speed.

[0006] This invention provides a packing method, comprising the following steps: Obtaining size data of a plurality of items; Calculating a plurality of packing schemes using a genetic algorithm based on the size data of the items; Selecting a plurality of candidate packing schemes that include all the items from the packing schemes; In each candidate packing scheme, classifying at least one item with the highest placement priority into a first subset, and classifying at least one item with the lowest placement priority into a second subset; In each candidate packing scheme, maintaining a first placement data of the first subset unchanged, and recalculating a second placement data of the second subset using a greedy algorithm to generate updated second placement data; Generating a plurality of updated candidate packing schemes based on the first placement data of the first subset and the updated second placement data of the second subset included in each candidate packing scheme; Outputting one of the updated candidate packing schemes as the target packing scheme.

[0007] This invention provides an electronic device. The electronic device includes memory and a processor. The memory stores a genetic algorithm and a greedy algorithm. The processor is electrically coupled to the memory. The processor performs the following steps: Acquire size data of a plurality of items. Calculate a plurality of packing schemes using the genetic algorithm based on the size data of the items. Select a plurality of candidate packing schemes that include all the items from the packing schemes. In each candidate packing scheme, classify at least one item with the highest placement priority into a first subset and classify at least one item with the lowest placement priority into a second subset. In each candidate packing scheme, maintain a first placement data of the first subset unchanged and recalculate a second placement data of the second subset using the greedy algorithm to generate updated second placement data. Generate a plurality of updated candidate packing schemes based on the first placement data of the first subset and the updated second placement data of the second subset included in each candidate packing scheme. Output one of the updated candidate packing schemes as the target packing scheme.

[0008] In summary, the electronic device and packing method in this case combine genetic algorithms and greedy algorithms to calculate the optimal solution while reducing computation time, thereby increasing the volume ratio, packing efficiency, and area ratio to optimize the packing scheme. Attached Figure Description

[0009] To make the above and other objects, features, advantages and embodiments of the present invention more apparent and understandable, the accompanying drawings are described below:

[0010] Figure 1 This is a schematic diagram of an electronic device illustrated according to some embodiments of this disclosure.

[0011] Figure 2A This is a flowchart illustrating a packing method based on some embodiments of this disclosure.

[0012] Figure 2B This is a flowchart of step S220 in the packing method shown in Figure 2A, which is illustrated according to some embodiments of this disclosure.

[0013] Figures 3A-3I are schematic diagrams illustrating the placement position, placement posture, and placement order of articles according to some embodiments of this disclosure.

[0014] Figure 4 These are schematic diagrams illustrating articles, containers, and packing schemes based on some embodiments of this disclosure.

[0015] Figure 5 This is a schematic diagram illustrating the placement order of items in a candidate packing scheme according to some embodiments of this disclosure.

[0016] Figure 6 This is a schematic diagram illustrating a first subset, a second subset, and an updated candidate packing scheme according to some embodiments of this disclosure.

[0017] Figure 7 These are schematic diagrams illustrating containers, paper-plastic structures, and supports based on some embodiments of this disclosure.

[0018] Component designation explanation

[0019] 100 Electronic devices 200 Packing method 110 processor 120 Memory 130 server 310,320,411,412,413,414,415,416 thing 410 Multiple items 422,424,426,428,432,732 container 430 Packing plan 510 First Subset 520 Second Subset 600 Updated candidate packaging scheme P1, P2, P3 Location 720 Paper Plastic 722,724 support S210,S220,S222,S224,S230,S240,S250,S260,S270 step Detailed Implementation

[0020] The following detailed description provides examples with reference to the accompanying drawings. However, the provided examples are not intended to limit the scope of this disclosure, and the description of the structural operation is not intended to limit the order of execution. Any structure resulting from the recombination of components and producing an apparatus with equivalent functionality is within the scope of this disclosure. Furthermore, the illustrations are for illustrative purposes only and are not drawn to scale. For ease of understanding, the same or similar components will be labeled with the same symbols in the following description.

[0021] Unless otherwise specified, the terms used throughout the specification and the scope of the patent application generally have their ordinary meaning in the context of the field, the content disclosed herein, and the specific content.

[0022] Furthermore, the terms "comprising," "including," "having," "containing," etc., used in this invention are all open-ended terms, meaning "including but not limited to." Additionally, the term "and / or" as used herein includes any one or more of the related listed items and all combinations thereof.

[0023] In this invention, when a component is referred to as "coupled," it can mean "electrically coupled," or it can be used to indicate that two or more components operate or interact with each other. Furthermore, although the terms "first," "second," etc., are used in this invention to describe different components, these terms are only used to distinguish components or operations described using the same technical terminology.

[0024] Please see Figure 1 , Figure 1 This is a schematic diagram illustrating an electronic device 100 according to some embodiments of this disclosure. The electronic device 100 may be implemented by a personal computer, server calculator, laptop computer, or other electronic device with computing capabilities. Figure 1 As shown, electronic device 100 includes processor 110 and memory 120. Processor 110 is electrically coupled to memory 120 and is used to fetch or execute instructions or data from memory 120.

[0025] The processor 110 may be a central processing unit, a microprocessor, a graphics processor, a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), or other hardware devices suitable for retrieving or executing instructions stored in memory.

[0026] Memory 120 may be implemented by an electrical, magnetic, optical memory device or other storage device for storing instructions or data. In some embodiments, memory 120 may be implemented by volatile memory or non-volatile memory. In some embodiments, memory 120 may be implemented by random access memory (RAM), dynamic random access memory (DRAM), magnetoresistive random access memory (MRAM), phase-change random access memory (PCRAM) or other storage devices.

[0027] Please see Figures 1 to 6 . Figure 2A This is a flowchart illustrating a packing method 200 according to some embodiments of this disclosure. Figure 2B The illustrations are based on some embodiments of this disclosure. Figure 2A The flowchart of step S220 in the packing method 200 shown. Figures 3A-3I This is a schematic diagram illustrating the placement position, placement posture, and placement order of articles 310 and 320 according to some embodiments of this disclosure.

[0028] Figure 4 This is a schematic diagram illustrating article 410, containers 422-428, and packing scheme 430 according to some embodiments of this disclosure. Figure 5 This is a schematic diagram illustrating the placement order of items 411-416 in a candidate packing scheme 530 according to some embodiments of this disclosure. Figure 6 The diagram illustrates a first subset 510, a second subset 520, and an updated candidate packing scheme 600 according to some embodiments of this disclosure.

[0029] Packing method 200 includes steps S210 to S270, and steps S210 to S270 can be executed by processor 110. Step S220 includes steps S222 and S224. Steps S222 and S224 can be executed by processor 110.

[0030] In step S210, the size data of a plurality of items is obtained. The size data of item 410 is stored in memory 120. In some embodiments, an order contains M items 410 (e.g., Figure 4 The six items shown are 411-416, where M can be any positive integer. In some embodiments, the three-dimensional dimension data of the aforementioned M items and order data are stored in a storage device (not shown) within server 130. Processor 110 is electrically / communicationally coupled to server 130, and processor 110 retrieves the three-dimensional dimension data of the M items from server 130.

[0031] In some embodiments, article 410 is an electronic product-related article. In other embodiments, article 410 is other articles to be packaged. Therefore, this case should not be limited thereto.

[0032] In step S220, based on the size data of the items, a plurality of packing schemes are calculated using a genetic algorithm. In some embodiments, the genetic algorithm is stored in memory 120, and the processor 110 retrieves the operation instructions of the genetic algorithm from memory 120. The processor 110 executes the operation instructions of the genetic algorithm to calculate multiple packing schemes based on the three-dimensional dimensions of items 411-416 and the three-dimensional dimensions of containers 422-428. In the initial setting of the genetic algorithm, multiple packing schemes are generated based on the items 411-416 to be packed in different placement orders and orientations and containers 422-428 of different sizes.

[0033] exist Figure 3A In the illustrated embodiment, items 310 and 320 correspond to Figure 4 Two of the six items shown are 411 to 416. Figure 3A Items 310 and 320 are placed starting from one corner (origin) of the container, which may correspond to... Figure 4 Any one of containers 422, 424, 426, and 428.

[0034] When item 310 has the first placement priority and is placed in the container at the origin in a placement posture. In the placeable positions, the origin is removed, and three new positions P1, P2, and P3 are added as placeable positions.

[0035] When item 320 has a second placement order, the placement position of item 320 can be one of positions P1, P2, and P3, and the placement posture of item 320 represents the horizontal and / or vertical rotation direction of item 320, such as... Figures 3A to 3H As shown. For example, in Figure 3A , Figure 3B as well as Figure 3C In one embodiment, the items 320 have the same placement position (e.g., position P1) but different placement postures. On the other hand, in Figure 3A , Figure 3D as well as Figure 3F The items 320 are placed at positions P1, P2 and P3 respectively, with different placement positions and the same placement posture.

[0036] In some embodiments, the placement location may be determined by the largest contact area between the item to be placed 320 and the largest item already placed (e.g., item 310). For example, in Figures 3A to 3H In the embodiments, Figure 3A The item 320 has the largest contact area with the largest item already placed (e.g., item 310), so the processor 110 selects position P1 as the placement position for item 320. In other embodiments, the placement position may be determined by the largest contact area between the item 320 to be placed and the container. Therefore, this invention is not limited to this.

[0037] In some embodiments, the processor 110 arranges containers 422-428 from smallest to largest or from largest to smallest based on the volume, three-dimensional dimensions, two-dimensional dimensions or other reference values ​​of the box, and selects the container with a volume greater than the total volume of all items 411-416.

[0038] In some embodiments, based on the dimensions of the aforementioned selected containers, the processor 110 encodes the placement order and orientation of items 411-416, and randomly generates multiple sets of chromosome codes containing placement order and orientation, and performs selection, crossover, and mutation operations on the chromosome codes. The chromosome code selection operation includes calculating the fitness value of each individual based on a fitness function, which can be represented by F1.

[0039] F1=A1R V + B1Rp+ C1Rs

[0040] The above R VRp represents the volume ratio of the items in the target packing scheme to the volume of a container. Rp is the packing completion ratio of the number of items in the target packing scheme relative to the total number of items (e.g., the number of items in a single order). For example, if an order has 5 items that need to be packed into the same container, but one set of chromosome codes (packing scheme) generated by the genetic algorithm can only hold 3 items, the packing completion ratio is 3 / 5. Rs is the area ratio of the sum of the contact areas of the items in the target packing scheme to the sum of the surface areas of the container. A1, B1, and C1 in the fitness function represent coefficients, which can be set with suitable values.

[0041] Therefore, based on the fitness function described above, the fitness value of each chromosome can be calculated, and during the selection of chromosome codes, chromosome codes with higher fitness values ​​have a higher probability of being selected.

[0042] Furthermore, the crossing over process involves the exchange of partial genes between two chromosomes to create a new chromosome. The mutation process involves the mutation of genes on each chromosome with a certain probability.

[0043] Thus, a multi-assembly box solution can be obtained, such as... Figure 4 One of the assembly box schemes shown is 430. Figure 4 The container 432 shown may correspond to one of containers 422, 424, 426 and 428.

[0044] In step S222, a primary item and a plurality of secondary items are distinguished among these items. Before calculating the packing scheme using the genetic algorithm, the processor 110 may designate the item with the largest single-sided area / largest volume among items 411-416 as the primary item, and the remaining items among items 411-416 as secondary items.

[0045] In step S224, the main item is designated as the first placement priority item in each packing scheme, and the packing scheme is obtained by calculating the main item and auxiliary items using the genetic algorithm. The processor 110 can set the placement priority of the main item as the first placement priority item, and then use the genetic algorithm to calculate the main item and these auxiliary items to generate these packing schemes, thereby reducing computing resources and achieving better results.

[0046] In the aforementioned genetic algorithm, if the number of items and containers is large, performing genetic operations on the initial chromosome group will require multiple iterations to produce a better solution. Therefore, this invention sets the number of iterations of the genetic algorithm to be less than a certain threshold (e.g., 20, 30, 50, or other values), and classifies items 411-416 according to the placement order of the generated packing scheme. Then, the optimal solution for the classified items is calculated using a greedy algorithm, thereby obtaining a better packing scheme in a shorter time. How the greedy algorithm is used to calculate the optimal solution for the classified items will be explained in detail in subsequent embodiments of this disclosure.

[0047] In step S230, a plurality of candidate packing schemes containing all the items are selected from the packing schemes. In the multiple packing schemes calculated by the aforementioned genetic algorithm, it is uncertain whether all items 411-416 can be packed into the container. Therefore, the processor selects a packing scheme containing all items from the multiple packing schemes generated in step S220 as a candidate packing scheme. In other words, the candidate packing scheme contains placement data for all items 411-416. For example, the processor 110 selects packing scheme 430, which contains all items 411-416, as one set of candidate packing schemes, such as... Figure 4 As shown.

[0048] In other embodiments, the multiple packing schemes generated in step S220 at a specific number of iterations can be selected as candidate packing schemes based on the fitness values ​​of each packing scheme, provided that all items 411~416 can be packed.

[0049] In step S240, in each of the candidate packing schemes, at least one item with the highest placement priority is classified into a first subset, and at least one item with the lowest placement priority is classified into a second subset. For example... Figure 5 As shown, if items 411 to 416 of packing scheme 430 have placement orders from 1 to 6 respectively, the N items with the first placement order (e.g., items 411 to 412) are classified into the first subset 510, and the (M-1) items with the last placement order (e.g., items 413 to 416) are classified into the second subset 520.

[0050] In step S250, in each of the candidate packing schemes, a first placement data of the first subset is kept unchanged, and a second placement data of the second subset is recalculated using a greedy algorithm to generate an updated second placement data. In some embodiments, the greedy algorithm may be stored in memory 120.

[0051] In packing scheme 430, processor 110 maintains the placement data of items 411-412 in the first subset 510, where the placement data of items 411-412 is represented by first placement data. The first placement data includes the placement position and placement order of items 411-412. While the first placement data of items 411-412 in the first subset 510 of container 432 remains unchanged, processor 110 recalculates the placement data of items 413-416 into container 432 using a greedy algorithm, where the placement data of items 413-416 is represented by second placement data. Thus, processor 110 generates updated second placement data for items 413-416.

[0052] In some embodiments, the greedy algorithm can be implemented using an exhaustive search method. The fitness function of the greedy algorithm can be represented by F2.

[0053] F2=A2R V + B2Rp+ C2Rs

[0054] The above R V Rp is the volume ratio of the items in the target packing scheme to the volume of a container. Rp represents the packing completion rate of the number of items in the target packing scheme relative to the total number of items (e.g., the number of items in a single order). Rs is the area ratio of the sum of the contact areas of the items in the target packing scheme to the sum of the surface areas of the container. A2, B2, and C2 in the fitness function represent coefficients, which can be set with suitable values. In some embodiments, the values ​​of coefficients A2, B2, and C2 in the fitness function F2 of the greedy algorithm differ from the values ​​of coefficients A1, B1, and C1 in the fitness function F1 of the genetic algorithm. In some embodiments, coefficient B2 is implemented as zero.

[0055] Thus, in the candidate bin packing scheme, the processor 110 calculates multiple fitness values ​​of the second subset 520 relative to the unchanged first subset 510 under multiple placement methods using the fitness function of a greedy algorithm. Furthermore, the processor 110 selects the candidate bin packing scheme with the highest fitness value from the multiple placement methods of the second subset 520 and sets it as the updated second placement data for the second subset.

[0056] In step S260, a plurality of updated candidate packing schemes are generated based on the first placement data of the first subset and the updated second placement data of the second subset included in each of the candidate packing schemes. The processor 110 generates an updated candidate packing scheme (e.g., updated packing scheme 600) based on the first placement data of the first subset (e.g., first subset 510) and the updated placement data of the second subset (e.g., second subset 520) of each of these candidate schemes.

[0057] In some embodiments, container 632 of the updated packing scheme 600 corresponds to container 432. In other embodiments, container 632 of the updated packing scheme may be reselected from containers 422, 424, 426, and 428 to be a smaller container capable of holding items 411-416. Therefore, this invention should not be limited thereto.

[0058] In step S270, one of the updated candidate packing schemes is output as the target packing scheme. In some embodiments, the processor 110 calculates the fitness values ​​of each candidate packing scheme in step S250, and the processor 110 may output the candidate packing scheme with the highest fitness value as the target packing scheme.

[0059] Figure 7 This is a schematic diagram illustrating container 732, paper-plastic 720, and supports 722 and 724 according to some embodiments of this disclosure. Container 732 corresponds to... Figure 6 The container 632 is used in some embodiments. In some embodiments, the paper-plastic 720 can be used to secure and protect important items within the package. Supports 722 and 724 can fill the empty space in the container 732 after the items are placed, thereby preventing the items inside the box from shaking or being damaged during package transportation.

[0060] In summary, the packing method 200 of the present invention combines a genetic algorithm and a greedy algorithm. First, the processor 110 uses a genetic algorithm to calculate multiple packing schemes for items 411-416 and containers 422, 424, 426, and 428, and selects a packing scheme that can accommodate all items 411-416 as a candidate packing scheme. The processor 110 groups the items 411-416 in the candidate packing schemes into a first subset 510 and a second subset 520 according to their placement order. While keeping the placement data of the first subset 510 unchanged, the processor uses a greedy algorithm to calculate and update the placement data in the second subset 510, thereby calculating the optimal solution while reducing computation time, thus increasing the volume ratio, packing efficiency, and area ratio to optimize the packing scheme.

[0061] Although the present invention has been disclosed above with reference to embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the art can make various modifications and refinements without departing from the spirit and scope of this disclosure. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A packing method, characterized in that, include: Obtain the dimensions of a multiple item; Based on the dimensions of the items, a plurality of packing schemes are calculated using a genetic algorithm; In the packing scheme, a plurality of candidate packing schemes that include all the items are selected; In each of the candidate packing schemes, at least one item with the highest placement priority is classified into a first subset, and at least one item with the lowest placement priority is classified into a second subset. In each of the candidate packing schemes, a first placement data of the first subset is kept unchanged, and a second placement data of the second subset is recalculated using a greedy algorithm to generate an updated second placement data; Based on the first placement data of the first subset and the updated second placement data of the second subset included in each of the candidate packing schemes, a plurality of updated candidate packing schemes are generated. as well as Output one of the updated candidate packing schemes as the target packing scheme.

2. The packing method according to claim 1, characterized in that, The method specifically includes: Using a genetic algorithm based on a first fitness function, calculate a complex number of packing schemes for a complex number of items; and The first placement data of the first subset of each candidate packing scheme remains unchanged, and the second placement data of the second subset of each candidate packing scheme is recalculated using a greedy algorithm based on a second fitness function to update the corresponding candidate packing scheme. The parameters of the second fitness function are different from the parameters of the first fitness function. This includes: calculating the fitness value corresponding to the updated candidate packing scheme based on the second fitness function; and outputting the candidate packing scheme corresponding to the highest fitness value as the target packing scheme. The first fitness function is represented by F1, and the second fitness function is represented by F2: F1 = A1RV + B1Rp + C1Rs, F2 = A2RV + B2Rp + C2Rs, Wherein, RV is the volume ratio of the volume of the item to the volume of the container in the target packing scheme, Rp is the packing completion ratio of the number of items in the target packing scheme relative to the total number of items, Rs is the area ratio of the contact area between the item and the container to the total surface area of ​​the container in the target packing scheme, A1, B1, and C1 are the parameters of the first adaptive function, and A2, B2, and C2 are the parameters of the second adaptive function.

3. The packing method according to claim 1, characterized in that, The first placement data includes the placement pose, placement order, and placement position of each item in the first subset, and the second placement data includes the placement pose, placement order, and placement position of each item in the second subset.

4. The packing method according to claim 1, characterized in that, The number of iterations of the gene algorithm is less than a threshold.

5. The packing method according to claim 1, characterized in that, include: The genetic algorithm is used to calculate a plurality of packing schemes for the item, and the fitness value of each packing scheme is calculated based on a first fitness function.

6. The packing method according to claim 5, characterized in that, The step of selecting a plurality of candidate packing schemes that include all the items in the packing scheme includes: Provided that all the items can be accommodated, based on the fitness values ​​of each of the packing schemes, a subset of the packing schemes with higher fitness values ​​are selected as the candidate packing schemes.

7. The packing method according to claim 1, characterized in that, The calculation of multiple packing schemes using genetic algorithms includes: Distinguish between a principal article and a plurality of accessory articles; and The main item is placed as the first item in each packing scheme, and the packing scheme is obtained by calculating the main item and the auxiliary items using the genetic algorithm.

8. An electronic device, characterized in that, include: One memory space is used to store a genetic algorithm and a greedy algorithm; as well as A processor, electrically coupled to the memory, is used to: Obtain the dimensions of a multiple item; Based on the size data of the item, the genetic algorithm is used to calculate a plurality of packing schemes; In the packing scheme, a plurality of candidate packing schemes that include all the items are selected; In each of the candidate packing schemes, at least one item with the highest placement priority is classified into a first subset, and at least one item with the lowest placement priority is classified into a second subset. In each of the candidate packing schemes, a first placement data of the first subset is kept unchanged, and a second placement data of the second subset is recalculated using the greedy algorithm to generate an updated second placement data; Based on the first placement data of the first subset and the updated second placement data of the second subset included in each of the candidate packing schemes, a plurality of updated candidate packing schemes are generated. as well as Output one of the updated candidate packing schemes as the target packing scheme.

Citation Information

Patent Citations

  • Three-dimensional space order consumable recommendation method and system

    CN113505930A

  • Cargo three-dimensional boxing method based on hybrid algorithm

    CN113762899A