A packaging graphics automatic generation method and system
By using genetic algorithms and simulation models in packaging design, high-quality packaging graphics are automatically generated, which solves the problems of strong design dependence and long cycle in the existing technology, and achieves efficient and fast packaging design.
Patent Information
- Application Number
- CN202410647765.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2044-05-23
AI Technical Summary
The existing technology relies on manual design in the process of product packaging design, resulting in uneven designer levels, long design cycles, difficult to quickly occupy the market, and there is a risk of merchant losses caused by improper design.
A packaging graphic automatic generation method is adopted to filter out packaged products similar to the products to be packaged through outline parameters, size parameters and weight parameters. The packaging scheme is evolved and screened using genetic algorithms, and the fitness value is calculated to select the optimal packaging scheme, and a packaging simulation model is constructed to output the packaging diagram.
It improves the efficiency and quality of packaging design, reduces the dependence on designer level, shortens the design cycle, reduces the risk of merchant losses, and can quickly generate high-quality packaging graphics.
Smart Images

Figure CN118468369B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of packaging graphic generation, and in particular to a packaging graphic automatic generation method and system. Background Art
[0002] Product packaging plays an extremely important role in modern business. Its importance is reflected in the following aspects: 1) Protecting products: The most basic function of packaging is to protect products from damage, deterioration or contamination. Good packaging can maintain the integrity and quality of products during transportation, storage and sales, ensuring that products can reach consumers safely; 2) Attracting consumers: Product packaging is the first impression of the product, which can attract consumers' attention and arouse their desire to buy. Attractive packaging design can help products stand out in a highly competitive market and increase sales.
[0003] However, at present, in the process of product packaging design, manual design is mainly done by designers, which has high requirements on the level of designers. However, the level of designers in the market is uneven. There is a problem that improper design by designers may cause adverse effects on the sales of goods to merchants or even major losses. In addition, the design cycle of designers is long, which is not conducive to merchants to quickly occupy the market. Therefore, there is an urgent need for a method to efficiently generate high-quality product packaging graphics to solve the above problems. Summary of the invention
[0004] The object of the present invention is to provide a method and system for automatically generating packaging graphics to solve the problems raised in the above background technology.
[0005] To achieve the above object, the present invention provides the following technical solutions:
[0006] A packaging graphics automatic generation method comprises the following steps:
[0007] S1, using contour parameters, size parameters and weight parameters as constraints, screening out packaged products similar to the product to be packaged, and obtaining a packaging solution for the packaged product, the packaging solution including packaging contour parameters, packaging size parameters and packaging material parameters;
[0008] S2, after multiple evolutions of the packaging scheme in step S1 using the crossover operation of the genetic algorithm, constraints are introduced to screen out packaging schemes that meet the product packaging requirements, and use them as the initial population;
[0009] S3, based on the crossover operation of the genetic algorithm, the packaging solutions in the population are evolved, and the packaging solutions that do not meet the product packaging requirements after evolution are eliminated based on the constraint conditions, and the fitness values of the remaining packaging solutions in the population are calculated. The better the packaging solution, the greater the fitness value, and the fitness value is used to reflect the material cost, aesthetic appearance and structural stability factors of the packaging solution;
[0010] S4, when the maximum value of the fitness value calculated in step S3 is greater than the adaptation threshold, obtain the packaging scheme corresponding to the fitness value and use it as the optimal packaging scheme, and when the maximum value of the fitness value calculated in step S3 is not greater than the adaptation threshold, sort the fitness values from large to small, select the packaging schemes at the top of the sorting column as the new population in a certain proportion, and repeat step S3 until the number of iterations is reached;
[0011] S5, based on the packaging contour parameters, packaging size parameters, and packaging material parameters of the optimal packaging solution, builds a packaging simulation model and outputs packaging graphics.
[0012] Furthermore, with the contour parameters, size parameters and weight parameters as constraints, the packaged products similar to the product to be packaged are screened out, and the packaging solution of the packaged products is obtained. The specific logic of the packaging solution including the packaging contour parameters, packaging size parameters and packaging material parameters is as follows:
[0013] S11, obtaining a product to be packaged, and obtaining a packaged product of the same type as the product to be packaged from a database;
[0014] S12, comparing the contour parameters, size parameters and weight parameters of the product to be packaged and the packaged product to determine the contour parameter similarity, size parameter similarity and weight parameter deviation value of the product to be packaged and the packaged product. When any one of the following conditions is satisfied: the contour parameter similarity is greater than a similarity threshold, the size parameter similarity is greater than a similarity threshold, and the weight parameter deviation value is less than a deviation threshold, the packaged product is determined to be similar to the product to be packaged;
[0015] S13, obtaining a packaging solution for a packaged product similar to the product to be packaged, wherein the packaging solution includes packaging contour parameters, packaging size parameters, and packaging material parameters.
[0016] Furthermore, after the packaging scheme in step S1 is evolved multiple times using the crossover operation of the genetic algorithm, constraints are introduced to screen out the packaging scheme that meets the product packaging requirements, and the specific logic of using it as the initial population is as follows:
[0017] S21, using a crossover operation of a genetic algorithm to evolve the packaging scheme in step S1 multiple times to obtain multiple different packaging schemes, and establishing a packaging simulation model based on the packaging schemes;
[0018] S22, constructing a product simulation model based on the contour parameters, size parameters and weight parameters of the product to be packaged, and conducting simulation experiments on the packaging simulation model and the product simulation model, with the constraints that the product simulation model can be accommodated in the packaging simulation model and the bearing load of the packaging simulation model is greater than the weight of the product simulation model, screening out packaging solutions that meet the product packaging requirements and using them as the initial population.
[0019] Furthermore, the calculation method of the fitness value is as follows:
[0020] S31, constructing a packaged simulation model based on the packaging solution in step S1, and scoring the contour aesthetics of the packaged simulation model to generate corresponding contour aesthetic parameters, constructing a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, and generating contour aesthetic evaluation coefficients of the remaining packaging solutions in step S3 according to the contour aesthetic parameters, and the more beautiful the packaging simulation model to be evaluated is, the greater the contour aesthetic evaluation coefficient is, and the weight of the contour aesthetic parameter in the calculation of the contour aesthetic evaluation coefficient is determined by the similarity between the packaged simulation model and the packaging simulation model to be evaluated;
[0021] S32, constructing a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, and obtaining structural stability parameters of the packaging simulation model to be evaluated, the structural stability parameters including the height of the center of gravity, the overall height, the tensile strain, the compressive strain, the maximum load bearing and the number of stacks without tilting, and generating a structural stability evaluation coefficient for each of the remaining packaging solutions in step S3 according to the structural stability parameters, and the more stable the structure of the packaging simulation model to be evaluated, the greater the structural stability evaluation coefficient;
[0022] S33, based on the packaging material parameter, the packaging outline parameter and the packaging size parameter, obtaining the material cost of each remaining packaging solution in step S3, extracting the maximum material cost among all the remaining solutions, and scaling it to form a material cost evaluation coefficient with a value of 1, and scaling the material costs in other remaining packaging solutions according to the same scaling ratio to generate corresponding material cost evaluation coefficients;
[0023] S34, combining the outline aesthetic evaluation coefficient, the structural stability evaluation coefficient and the material cost evaluation coefficient to generate a fitness value for evaluating the advantages and disadvantages of the remaining packaging solutions, and the calculation formula is as follows:
[0024] SYZ i =λ1*MG i +λ2*JG i +λ3*CN i
[0025] Among them, SYZ i MG i , JG i , CNi They represent the fitness value, contour aesthetic evaluation coefficient, structural stability evaluation coefficient, and material cost evaluation coefficient of the i-th remaining packaging solution, respectively. i represents the number of different remaining packaging solutions, and i = 1, 2, 3, ..., m. m represents the total number of remaining packaging solutions, and m∈N + , λ1, λ2, and λ3 are all preset proportional coefficients, and λ1+λ2+λ3=1, and 0<λ1<λ3<λ2<1.
[0026] Furthermore, the step S31 includes the following steps:
[0027] S311, randomly inviting multiple evaluators to score the contour aesthetics of each packaged simulation model constructed by the packaging solution in step S1 from 0 to 1 and then calculate the average value to generate a corresponding contour aesthetics parameter, and the closer the score is to 1, the better the evaluator believes the contour aesthetics of the packaged simulation model is;
[0028] S312, construct a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, calculate the contour similarity of the packaging model to be evaluated and each packaged simulation model, and sort the contour similarities from large to small, select the contour similarities at the top of the sorting column in a certain proportion or number as the intermediate weights, and scale each intermediate weight proportionally with the cumulative value equal to 1 as a constraint to generate each evaluation weight, multiply each evaluation weight by the corresponding contour aesthetic parameter, and then accumulate them to generate the contour aesthetic evaluation coefficient of each remaining packaging solution in step S3.
[0029] Further, the step S32 includes the following steps:
[0030] S321, performing a simulation experiment on the packaging simulation model to be tested based on the simulation software to obtain the structural stability parameters of the packaging simulation model to be evaluated, the structural stability parameters including the center of gravity height, the overall height, the tensile strain, the compressive strain, the maximum load and the number of stacks without tilting, and taking the ratio of the center of gravity height to the overall height as the center of gravity height ratio;
[0031] S322, extracting the maximum value of the center of gravity height ratio in all the packaging simulation models to be evaluated, and scaling it to form a center of gravity height ratio parameter with a value of 1, scaling the center of gravity height ratios in other packaging simulation models to be evaluated according to the same scaling ratio to generate corresponding center of gravity height ratio parameters, and similarly calculating the tensile strain parameter, the compressive strain parameter, the maximum bearing load parameter, and the number of stacking without tilting parameter;
[0032] S323, the center of gravity height ratio parameter, the tensile strain parameter, the compressive strain parameter, the maximum load parameter, and the number of stacking without tilting parameter are accumulated and averaged to obtain the structural stability evaluation coefficient of each remaining packaging solution in step S3.
[0033] A packaging graphic automatic generation system, used to execute the above packaging graphic automatic generation method, comprising:
[0034] The packaging solution screening module is used to screen out packaged products similar to the product to be packaged based on the contour parameters, size parameters and weight parameters, and obtain the packaging solution of the packaged product, the packaging solution including the packaging contour parameters, packaging size parameters and packaging material parameters;
[0035] An initial population generation module is used to use a crossover operation of a genetic algorithm to perform multiple evolutions on the packaging solutions in step S1, introduce constraints to screen out packaging solutions that meet product packaging requirements, and use them as the initial population;
[0036] The fitness value calculation module is used to evolve the packaging solutions in the population based on the crossover operation of the genetic algorithm, eliminate the packaging solutions that do not meet the product packaging requirements after evolution based on the constraint conditions, and calculate the fitness values of the remaining packaging solutions in the population. The better the packaging solution, the greater the fitness value, and the fitness value is used to reflect the material cost, aesthetic appearance and structural stability factors of the packaging solution;
[0037] An iterative judgment module is used to obtain the packaging scheme corresponding to the fitness value and use it as the optimal packaging scheme when the maximum fitness value calculated in step S3 is greater than the adaptation threshold, and to sort the fitness values from large to small when the maximum fitness value calculated in step S3 is not greater than the adaptation threshold, select the packaging scheme at the top of the sorting column as the new population in a certain proportion, and repeat step S3 until the number of iterations is reached;
[0038] The packaging graphics output module is used to build a packaging simulation model and output packaging graphics based on the packaging contour parameters, packaging size parameters, and packaging material parameters of the optimal packaging solution.
[0039] Compared with the prior art, the present invention has the following beneficial effects:
[0040] The packaging graphics automatic generation method and system of the present invention first screen out packaged products that are similar to the products to be packaged, and then evolve and screen the packaging solutions of the packaged products to screen out packaging solutions that meet the product packaging requirements as the initial population. Compared with the initial population that randomly generates packaging solution parameters, it is more targeted and improves the efficiency of subsequently finding the optimal packaging solution. It also comprehensively considers material cost, outline beauty and structural stability factors to generate the fitness value of the packaging solution, which is convenient for finding a high-quality optimal packaging solution, thereby achieving the effect of efficiently generating high-quality packaging graphics. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1It is a schematic diagram of the process of the method for automatically generating packaging graphics in the present invention;
[0042] Figure 2 This is a module unit diagram of the packaging graphics automatic generation system in the present invention. DETAILED DESCRIPTION
[0043] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific embodiments.
[0044] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the present invention should be understood by people with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0045] Embodiment 1:
[0046] See also Figure 1 The present invention provides a packaging graphics automatic generation method, comprising the following steps:
[0047] S1, using contour parameters, size parameters and weight parameters as constraints, screen out packaged products similar to the product to be packaged, and obtain a packaging solution for the packaged product, the packaging solution including packaging contour parameters, packaging size parameters and packaging material parameters, including the following steps:
[0048] S11, obtaining a product to be packaged, and obtaining a packaged product of the same type as the product to be packaged from a database;
[0049] S12, comparing the contour parameters, size parameters and weight parameters of the product to be packaged and the packaged product to determine the contour parameter similarity, size parameter similarity and weight parameter deviation value of the product to be packaged and the packaged product. When any one of the following conditions is satisfied: the contour parameter similarity is greater than the similarity threshold, the size parameter similarity is greater than the similarity threshold, and the weight parameter deviation value is less than the deviation threshold, then it is determined that the packaged product and the product to be packaged are similar. The contour parameter similarity, size parameter similarity and weight parameter deviation value are obtained as follows:
[0050] S121, scanning the actual physical models of the product to be packaged and the packaged product with a 3D scanner to obtain the 3D model data thereof, importing the scanned 3D model into the modeling software, and using the analysis tool of the modeling software to compare the contour parameters of the two products to obtain the similarity of the contour parameters of the two products, the contour parameters including parameters such as curvature, edge and shape, when the similarity of the contour parameters of the product to be packaged and the packaged product is higher than a similarity threshold, it can be determined that the product to be packaged and the packaged product are similar, and the similarity threshold can be 80%, 90%, 95%, etc., which is not limited here;
[0051] S122, using a 3D scanner to obtain 3D model data of the product to be packaged and the packaged product, importing the 3D model data into the dimension measurement software, using the measurement tools provided by the software to measure the dimension parameters of the product, such as length, width, and height, and using the built-in software of the dimension measurement software to quantitatively or qualitatively analyze the measurement results to obtain the similarity of the dimension parameters of the two products. When the similarity of the dimension parameters of the product to be packaged and the packaged product is higher than a similarity threshold, it can be determined that the product to be packaged and the packaged product are similar. The similarity threshold can be 80%, 90%, 95%, etc., which is not limited here;
[0052] S123, calculating the relative error of the weight parameters of the product to be packaged and the packaged product and taking it as the weight parameter deviation value. When the weight parameter deviation value of the product to be packaged and the packaged product is less than the deviation threshold, it can be determined that the product to be packaged and the packaged product are similar. The deviation threshold can be 5%, 10%, 15%, etc., which is not limited here.
[0053] S13, obtaining a packaging solution for a packaged product similar to the product to be packaged, the packaging solution including packaging contour parameters, packaging size parameters, and packaging material parameters;
[0054] It should be noted that the packaging contour parameters and packaging size parameters in the packaging solution can be obtained through existing image processing software, and the packaging material parameters in the packaging solution can be represented by physical parameters such as density, thickness, strength, stiffness and ductility of the packaging material.
[0055] S2, after multiple evolutions of the packaging solutions in step S1 using the crossover operation of the genetic algorithm, a constraint condition is introduced to screen out a packaging solution that meets the product packaging requirements, and the solution is used as the initial population. Through the settings of step S1 and step S2, the packaged products similar to the products to be packaged are first screened out, and then the packaging solutions of the packaged products are evolved and screened to screen out a packaging solution that meets the product packaging requirements as the initial population. Compared with the initial population of randomly generated packaging solution parameters, the solution is more targeted and improves the efficiency of finding the optimal packaging solution later. Step S2 includes the following steps:
[0056] S21, using a crossover operation of a genetic algorithm to evolve the packaging scheme in step S1 multiple times to obtain multiple different packaging schemes, and establishing a packaging simulation model based on the packaging schemes;
[0057] It should be noted that when the crossover operation of the genetic algorithm is used to evolve the packaging scheme in step S1, the packaging scheme is taken as a group of chromosomes, and the packaging contour parameters, packaging size parameters, and packaging material parameters in the packaging scheme are taken as three genomes on the chromosomes. The crossover operation is a conventional operation of the genetic algorithm, which is a prior art and will not be described in detail here.
[0058] As an implementation mode, the number of times the packaging scheme is evolved in step S2 may be 10 times, 20 times, 30 times, etc., which is specifically determined by those skilled in the art according to the number of packaging schemes obtained in step S1 and is not limited here;
[0059] It should be noted that the packaging simulation model can be constructed by inputting the packaging contour parameters, packaging size parameters and packaging material parameters in the packaging solution into SolidWorks. This is a prior art and will not be described in detail here.
[0060] S22, constructing a product simulation model based on the contour parameters, size parameters and weight parameters of the product to be packaged, and conducting simulation experiments on the packaging simulation model and the product simulation model, with the constraints that the product simulation model can be accommodated in the packaging simulation model and the bearing load of the packaging simulation model is greater than the weight of the product simulation model, screening out packaging solutions that meet the product packaging requirements and using them as the initial population;
[0061] It should be noted that the product simulation model can be constructed by inputting the contour parameters, size parameters and weight parameters of the product to be packaged in SolidWorks. The simulation experiments on the packaging simulation model and the product simulation model are also carried out in the SolidWorks workspace. The simulation is performed by using the simulation function of SolidWorks to determine whether the product simulation model can be accommodated in the packaging simulation model and whether the load-bearing capacity of the packaging simulation model is greater than the weight of the product simulation model.
[0062] S3, based on the crossover operation of the genetic algorithm, the packaging solutions in the population are evolved, and the packaging solutions that do not meet the product packaging requirements after evolution are eliminated based on the constraint conditions, and the fitness values of the remaining packaging solutions in the population are calculated. The better the packaging solution, the greater the fitness value, and the fitness value is used to reflect the material cost, aesthetic appearance and structural stability factors of the packaging solution;
[0063] It should be noted that the crossover operation is the same as the above step S21, and the constraint condition is the same as the above step S22, which will not be described in detail here;
[0064] The calculation method of the fitness value is as follows:
[0065] S31, based on the packaging solution in step S1, a packaged simulation model is constructed, and the contour aesthetics of the packaged simulation model is scored to generate corresponding contour aesthetic parameters, based on the remaining packaging solutions in step S3, a packaging simulation model to be evaluated is constructed, and contour aesthetic evaluation coefficients of the remaining packaging solutions in step S3 are generated according to the contour aesthetic parameters, and the more beautiful the packaging simulation model to be evaluated is, the greater the contour aesthetic evaluation coefficient is, and the weight of the contour aesthetic parameter in the calculation of the contour aesthetic evaluation coefficient is determined by the similarity between the packaged simulation model and the packaging simulation model to be evaluated, including the following steps:
[0066] S311, randomly inviting multiple evaluators to score the contour aesthetics of each packaged simulation model constructed by the packaging solution in step S1 from 0 to 1 and then calculate the average value to generate a corresponding contour aesthetics parameter, and the closer the score is to 1, the better the evaluator believes the contour aesthetics of the packaged simulation model is;
[0067] It should be noted that the reviewers include but are not limited to merchants, users, passers-by and relevant experts, and the number of reviewers shall not be less than 50;
[0068] S312, constructing a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, calculating the contour similarity between the packaging model to be evaluated and each packaged simulation model, and sorting the contour similarities from large to small, selecting contour similarities at the top of the sorting column according to a certain proportion or number as intermediate weights, scaling each intermediate weight in proportion with a constraint that the accumulated value is equal to 1 to generate each evaluation weight, multiplying each evaluation weight by the corresponding contour aesthetic parameter, and then accumulating the sum to generate the contour aesthetic evaluation coefficient of each remaining packaging solution in step S3;
[0069] It should be noted that the first 10%, 20%, 30% of the contour similarities can be selected as the intermediate weights, or the first 3, 5, 8 contour similarities can be selected as the intermediate weights, and there is no limitation here;
[0070] S32, constructing a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, and obtaining structural stability parameters of the packaging simulation model to be evaluated, the structural stability parameters including the height of the center of gravity, the overall height, the tensile strain, the compressive strain, the maximum load bearing and the number of stacks without tilting, and generating a structural stability evaluation coefficient for each of the remaining packaging solutions in step S3 according to the structural stability parameters, and the more stable the structure of the packaging simulation model to be evaluated, the greater the structural stability evaluation coefficient, including the following steps:
[0071] S321, performing a simulation experiment on the packaging simulation model to be tested based on the simulation software to obtain the structural stability parameters of the packaging simulation model to be evaluated, the structural stability parameters including the center of gravity height, the overall height, the tensile strain, the compressive strain, the maximum load and the number of stacks without tilting, and taking the ratio of the center of gravity height to the overall height as the center of gravity height ratio;
[0072] It should be noted that the center of gravity height, overall height, tensile strain, compressive strain, maximum load and number of stacks without tilting of the packaging model to be evaluated can be obtained through the simulation function software of SolidWorks. This is a prior art and will not be elaborated here.
[0073] S322, extracting the maximum value of the center of gravity height ratio in all the packaging simulation models to be evaluated, and scaling it to form a center of gravity height ratio parameter with a value of 1, scaling the center of gravity height ratios in other packaging simulation models to be evaluated according to the same scaling ratio to generate corresponding center of gravity height ratio parameters, and similarly calculating the tensile strain parameter, the compressive strain parameter, the maximum bearing load parameter, and the number of stacking without tilting parameter;
[0074] S323, accumulating the center of gravity height ratio parameter, the tensile strain parameter, the compressive strain parameter, the maximum load parameter, and the number of stacking without tilting parameter to obtain the structural stability evaluation coefficient of each remaining packaging solution in step S3;
[0075] S33, based on the packaging material parameter, the packaging outline parameter and the packaging size parameter, obtaining the material cost of each remaining packaging solution in step S3, extracting the maximum material cost among all the remaining solutions, and scaling it to form a material cost evaluation coefficient with a value of 1, and scaling the material costs in other remaining packaging solutions according to the same scaling ratio to generate corresponding material cost evaluation coefficients;
[0076] The material cost is obtained by: obtaining the required material type according to the packaging material parameters of the remaining packaging solutions in step S3, and obtaining the actual usage of various required material types according to the packaging contour parameters and packaging size parameters of the remaining packaging solutions in step S3, and multiplying the actual usage of various required material types by the corresponding prices and then accumulating them to obtain the material cost of the remaining packaging solutions;
[0077] It should be noted that the SolidWorks software can be used to construct the packaging simulation model to be evaluated of the remaining packaging solutions in step S3, and then the built-in measurement function of the SolidWorks software can be used to obtain the packaging volume and surface area data of the packaging simulation model to be evaluated, thereby obtaining the actual amount of various required material types in the remaining packaging solutions. This is the prior art and will not be elaborated here.
[0078] S34, combining the outline aesthetic evaluation coefficient, the structural stability evaluation coefficient and the material cost evaluation coefficient to generate a fitness value for evaluating the advantages and disadvantages of the remaining packaging solutions, and the calculation formula is as follows:
[0079] SYZ i =λ1*MG i +λ2*JG i +λ3*CN i
[0080] It should be noted that SYZ i MG i , JG i , CN i They represent the fitness value, contour aesthetic evaluation coefficient, structural stability evaluation coefficient, and material cost evaluation coefficient of the i-th remaining packaging solution, respectively. i represents the number of different remaining packaging solutions, and i = 1, 2, 3, ..., m. m represents the total number of remaining packaging solutions, and m∈N + ;
[0081] It should be noted that λ1, λ2, and λ3 are all preset proportional coefficients, and λ1 represents the contour aesthetic evaluation coefficient MG i At the fitness value SYZ i The weight in the calculation, λ2 represents the structural stability evaluation coefficient JG i At the fitness value SYZ i The weight in the calculation, λ3 represents the material cost evaluation coefficient CN i At the fitness value SYZ i The weights in the calculation, and λ1+λ2+λ3=1, because the importance of structural stability is greater than the importance of material cost and aesthetics, and the importance of material cost is greater than the influence of aesthetics, let 0<λ1<λ3<λ2<1, the specific values of λ1, λ2, λ3 are generally determined by those skilled in the art according to actual conditions;
[0082] As an implementation mode, the value range of λ1 is 0.1-0.2, the value range of λ2 is 0.5-0.7, and the value range of λ3 is 0.2-0.3;
[0083] It should be noted that the fitness value SYZ i According to the contour beauty evaluation coefficient MG i , structural stability evaluation coefficient JG i , Material cost evaluation coefficient CN i The three influencing factors are composed together, which comprehensively considers the aesthetics, structural stability and material cost of the packaging solution, so as to achieve the effect of comprehensive evaluation of the performance of the packaging solution, and the outline aesthetic evaluation coefficient MG i , structural stability evaluation coefficient JG i, Material cost evaluation coefficient CN i The larger the value, the better the overall performance of the packaging solution. i The bigger it is.
[0084] S4, when the maximum value of the fitness value calculated in step S3 is greater than the adaptation threshold, obtain the packaging scheme corresponding to the fitness value and use it as the optimal packaging scheme, and when the maximum value of the fitness value calculated in step S3 is not greater than the adaptation threshold, sort the fitness values from large to small, select the packaging schemes at the top of the sorting column as the new population in a certain proportion, and repeat step S3 until the number of iterations is reached;
[0085] As an implementation method, packaging solutions with fitness values in the top 40%, 50%, 60%, etc. can be selected as new populations, the number of iterations can be selected as 500, 1000, 2000, etc., and the adaptation threshold can be 0.8, 0.85, 0.9, etc. The specific setting is made by the staff according to the actual situation and is not restricted here.
[0086] S5, based on the packaging contour parameters, packaging size parameters, and packaging material parameters of the optimal packaging solution, build a packaging simulation model and output packaging graphics;
[0087] It should be noted that the packaging simulation model can be constructed by inputting the packaging contour parameters, packaging size parameters, and packaging material parameters of the optimal packaging solution in SolidWorks, and then a drawing can be created in SolidWorks, and the view of the packaging simulation model can be placed on the drawing to add annotations, dimensions, labels, etc., and then the drawing can be exported to a common CAD format or image format to generate packaging graphics.
[0088] Embodiment 2:
[0089] See also Figure 2 The present invention provides a packaging graphic automatic generation system, which is used to execute the packaging graphic automatic generation method in the above-mentioned embodiment 1, comprising:
[0090] The packaging solution screening module is used to screen out packaged products similar to the product to be packaged based on the contour parameters, size parameters and weight parameters, and obtain the packaging solution of the packaged product, the packaging solution including the packaging contour parameters, packaging size parameters and packaging material parameters;
[0091] An initial population generation module is used to use a crossover operation of a genetic algorithm to perform multiple evolutions on the packaging solutions in step S1, introduce constraints to screen out packaging solutions that meet product packaging requirements, and use them as the initial population;
[0092] The fitness value calculation module is used to evolve the packaging solutions in the population based on the crossover operation of the genetic algorithm, eliminate the packaging solutions that do not meet the product packaging requirements after evolution based on the constraint conditions, and calculate the fitness values of the remaining packaging solutions in the population. The better the packaging solution, the greater the fitness value, and the fitness value is used to reflect the material cost, aesthetic appearance and structural stability factors of the packaging solution;
[0093] An iterative judgment module is used to obtain the packaging scheme corresponding to the fitness value and use it as the optimal packaging scheme when the maximum fitness value calculated in step S3 is greater than the adaptation threshold, and to sort the fitness values from large to small when the maximum fitness value calculated in step S3 is not greater than the adaptation threshold, select the packaging scheme at the top of the sorting column as the new population in a certain proportion, and repeat step S3 until the number of iterations is reached;
[0094] The packaging graphics output module is used to build a packaging simulation model and output packaging graphics based on the packaging contour parameters, packaging size parameters, and packaging material parameters of the optimal packaging solution.
[0095] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0096] The above embodiments may be implemented in whole or in part by software, hardware, firmware or any other combination thereof. When implemented by software, the above embodiments may be implemented in whole or in part in the form of a computer program product. Those skilled in the art may appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software methods depends on the specific application and design constraints of the technical solution.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0098] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. A method for automatically generating packaging graphics, characterized in that: The steps include: S1, using contour parameters, size parameters and weight parameters as constraints, screening out packaged products similar to the product to be packaged, and obtaining a packaging solution for the packaged product, the packaging solution including packaging contour parameters, packaging size parameters and packaging material parameters; S2, after multiple evolutions of the packaging scheme in step S1 using the crossover operation of the genetic algorithm, constraints are introduced to screen out packaging schemes that meet the product packaging requirements, and use them as the initial population; S3, based on the crossover operation of the genetic algorithm, the packaging solutions in the population are evolved, and the packaging solutions that do not meet the product packaging requirements after evolution are eliminated based on the constraint conditions, and the fitness values of the remaining packaging solutions in the population are calculated. The better the packaging solution, the greater the fitness value, and the fitness value is used to reflect the material cost, aesthetic appearance and structural stability factors of the packaging solution; S4, when the maximum value of the fitness value calculated in step S3 is greater than the adaptation threshold, obtain the packaging scheme corresponding to the fitness value and use it as the optimal packaging scheme, and when the maximum value of the fitness value calculated in step S3 is not greater than the adaptation threshold, sort the fitness values from large to small, select the packaging schemes at the top of the sorting column as the new population in a certain proportion, and repeat step S3 until the number of iterations is reached; S5, based on the packaging contour parameters, packaging size parameters, and packaging material parameters of the optimal packaging solution, build a packaging simulation model and output packaging graphics; After the packaging scheme in step S1 is evolved multiple times using the crossover operation of the genetic algorithm, constraints are introduced to screen out the packaging scheme that meets the product packaging requirements and use it as the initial population. The specific logic is as follows: S21, using a crossover operation of a genetic algorithm to evolve the packaging scheme in step S1 multiple times to obtain multiple different packaging schemes, and establishing a packaging simulation model based on the packaging schemes; S22, constructing a product simulation model based on the contour parameters, size parameters and weight parameters of the product to be packaged, and conducting simulation experiments on the packaging simulation model and the product simulation model, with the constraints that the product simulation model can be accommodated in the packaging simulation model and the bearing load of the packaging simulation model is greater than the weight of the product simulation model, screening out packaging solutions that meet the product packaging requirements and using them as the initial population; The fitness value is calculated as follows: S31, constructing a packaged simulation model based on the packaging solution in step S1, and scoring the contour aesthetics of the packaged simulation model to generate corresponding contour aesthetic parameters, constructing a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, and generating contour aesthetic evaluation coefficients of the remaining packaging solutions in step S3 according to the contour aesthetic parameters, and the more beautiful the packaging simulation model to be evaluated is, the greater the contour aesthetic evaluation coefficient is, and the weight of the contour aesthetic parameter in the calculation of the contour aesthetic evaluation coefficient is determined by the similarity between the packaged simulation model and the packaging simulation model to be evaluated; S32, constructing a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, and obtaining structural stability parameters of the packaging simulation model to be evaluated, the structural stability parameters including the height of the center of gravity, the overall height, the tensile strain, the compressive strain, the maximum load bearing and the number of stacks without tilting, and generating a structural stability evaluation coefficient for each of the remaining packaging solutions in step S3 according to the structural stability parameters, and the more stable the structure of the packaging simulation model to be evaluated, the greater the structural stability evaluation coefficient; S33, based on the packaging material parameter, the packaging outline parameter and the packaging size parameter, obtaining the material cost of each remaining packaging solution in step S3, extracting the maximum material cost among all the remaining solutions, and scaling it to form a material cost evaluation coefficient with a value of 1, and scaling the material costs in other remaining packaging solutions according to the same scaling ratio to generate corresponding material cost evaluation coefficients; S34, combining the outline aesthetic evaluation coefficient, the structural stability evaluation coefficient and the material cost evaluation coefficient to generate a fitness value for evaluating the advantages and disadvantages of the remaining packaging solutions, and the calculation formula is as follows: SYZ i =λ1*MG i +λ2*JG i +λ3*CN i Among them, SYZ i MG i , JG i , CN i They represent the fitness value, contour aesthetic evaluation coefficient, structural stability evaluation coefficient, and material cost evaluation coefficient of the i-th remaining packaging solution, respectively. i represents the number of different remaining packaging solutions, and i = 1, 2, 3, ..., m. m represents the total number of remaining packaging solutions, and m∈N + , λ1, λ2, and λ3 are all preset proportional coefficients, and λ1+λ2+λ3=1, and 0<λ1<λ3<λ2<1.
2. The method for automatically generating packaging graphics according to claim 1, characterized in that: Using contour parameters, size parameters, and weight parameters as constraints, filter out packaged products that are similar to the product to be packaged, and obtain the packaging solution for the packaged product. The packaging solution includes the packaging contour parameters, packaging size parameters, and packaging material parameters. The specific logic is as follows: S11, obtaining a product to be packaged, and obtaining a packaged product of the same type as the product to be packaged from a database; S12, comparing the contour parameters, size parameters and weight parameters of the product to be packaged and the packaged product to determine the contour parameter similarity, size parameter similarity and weight parameter deviation value of the product to be packaged and the packaged product. When any one of the following conditions is satisfied: the contour parameter similarity is greater than a similarity threshold, the size parameter similarity is greater than a similarity threshold, and the weight parameter deviation value is less than a deviation threshold, the packaged product is determined to be similar to the product to be packaged; S13, obtaining a packaging solution for a packaged product similar to the product to be packaged, wherein the packaging solution includes packaging contour parameters, packaging size parameters, and packaging material parameters.
3. The method for automatically generating packaging graphics according to claim 1, characterized in that: The step S31 comprises the following steps: S311, randomly inviting multiple evaluators to score the contour aesthetics of each packaged simulation model constructed by the packaging solution in step S1 from 0 to 1 and then calculate the average value to generate a corresponding contour aesthetics parameter, and the closer the score is to 1, the better the evaluator believes the contour aesthetics of the packaged simulation model is; S312, construct a packaging simulation model to be evaluated based on the remaining packaging solutions in step S3, calculate the contour similarity of the packaging model to be evaluated and each packaged simulation model, and sort the contour similarities from large to small, select the contour similarities at the top of the sorting column in a certain proportion or number as the intermediate weights, and scale each intermediate weight proportionally with the cumulative value equal to 1 as a constraint to generate each evaluation weight, multiply each evaluation weight by the corresponding contour aesthetic parameter, and then accumulate them to generate the contour aesthetic evaluation coefficient of each remaining packaging solution in step S3.
4. The method for automatically generating packaging graphics according to claim 1, characterized in that: The step S32 comprises the following steps: S321, performing a simulation experiment on the packaging simulation model to be tested based on the simulation software to obtain the structural stability parameters of the packaging simulation model to be evaluated, the structural stability parameters including the center of gravity height, the overall height, the tensile strain, the compressive strain, the maximum load and the number of stacks without tilting, and taking the ratio of the center of gravity height to the overall height as the center of gravity height ratio; S322, extracting the maximum value of the center of gravity height ratio in all the packaging simulation models to be evaluated, and scaling it to form a center of gravity height ratio parameter with a value of 1, scaling the center of gravity height ratios in other packaging simulation models to be evaluated according to the same scaling ratio to generate corresponding center of gravity height ratio parameters, and similarly calculating the tensile strain parameter, the compressive strain parameter, the maximum bearing load parameter, and the number of stacks without tilting parameter; S323, the center of gravity height ratio parameter, the tensile strain parameter, the compressive strain parameter, the maximum load parameter, and the number of stacking without tilting parameter are accumulated and averaged to obtain the structural stability evaluation coefficient of each remaining packaging solution in step S3.
5. A packaging graphic automatic generation system, used to execute the packaging graphic automatic generation method according to any one of claims 1 to 4, characterized in that: include: The packaging solution screening module is used to screen out packaged products similar to the product to be packaged based on the contour parameters, size parameters and weight parameters, and obtain the packaging solution of the packaged product, the packaging solution including the packaging contour parameters, packaging size parameters and packaging material parameters; An initial population generation module is used to use a crossover operation of a genetic algorithm to perform multiple evolutions on the packaging solutions in step S1, introduce constraints to screen out packaging solutions that meet product packaging requirements, and use them as the initial population; The fitness value calculation module is used to evolve the packaging solutions in the population based on the crossover operation of the genetic algorithm, eliminate the packaging solutions that do not meet the product packaging requirements after evolution based on the constraint conditions, and calculate the fitness values of the remaining packaging solutions in the population. The better the packaging solution, the greater the fitness value, and the fitness value is used to reflect the material cost, aesthetic appearance and structural stability factors of the packaging solution; An iterative judgment module is used to obtain the packaging scheme corresponding to the fitness value and use it as the optimal packaging scheme when the maximum fitness value calculated in step S3 is greater than the adaptation threshold, and to sort the fitness values from large to small when the maximum fitness value calculated in step S3 is not greater than the adaptation threshold, select the packaging scheme at the top of the sorting column as the new population in a certain proportion, and repeat step S3 until the number of iterations is reached; The packaging graphics output module is used to build a packaging simulation model and output packaging graphics based on the packaging contour parameters, packaging size parameters, and packaging material parameters of the optimal packaging solution.
Citation Information
Patent Citations
Pattern design method based on shape grammar and neural network
CN112435310A
Subresolution auxiliary graph layout optimization method based on improved genetic algorithm
CN117195815A