Intelligent generation method, device, computer equipment and storage medium for packaging design

By applying intelligent generation methods of dual-stream network and attention mechanism in packaging design, the problems of inefficiency and high cost of traditional packaging design are solved, and efficient and low-cost packaging design result generation is achieved.

CN118690643BActive Publication Date: 2025-04-04SHENZHEN GOODYEAR PRINTING
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410784057.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2025-04-04
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

The traditional packaging design process is inefficient and costly, and designers need to spend a lot of time conceiving, drawing, making samples and adjusting designs.

Method used

The intelligent generation method of NLP technology and CNN technology based on dual-stream network is adopted, combined with attention mechanism, quickly analyze and extract design reference data, generate packaging design results, and reduce the time and cost of artificial design.

Benefits of technology

It improves the efficiency of packaging design, reduces the cost of artificial design, and realizes the intelligent generation of packaging design results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118690643B_ABST
    Figure CN118690643B_ABST
Patent Text Reader

Abstract

The present application relates to artificial intelligence technology, and discloses an intelligent generation method, computer equipment and storage medium for packaging design. It includes: obtaining design reference data for product packaging; processing text data and image data in the design reference data respectively based on a dual-stream network, and extracting relevant features to generate box design data; extracting shape features of each box surface from the box design data based on an attention mechanism, and extracting decorative features of each box surface from the design reference data, and sequentially generating decorative design data for each box surface; starting from the second box surface, adjusting the attention weight for the decorative design data of the previous box surface when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface; generating a packaging design result based on the box design data and the decorative design data. The present application also discloses a control device. The present application aims to improve the efficiency of product packaging design and reduce design costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to an intelligent generation method for packaging design, a control device, a computer device, and a computer-readable storage medium. Background Art

[0002] Packaging design refers to the process of designing the structure and decoration of the packaging container for the product after the product is produced. Packaging design must not only meet the functions of product protection, transportation and storage, but also take into account the needs of product promotion, sales and brand communication. The most common one that can comprehensively meet the above needs is the packaging box.

[0003] At present, the packaging design of product packaging boxes includes two parts: box body design and decoration design based on the box body. The packaging design of traditional packaging boxes is usually completed manually, that is, the designer designs and conceives according to factors such as product characteristics, market demand and customer requirements, and determines the structure, decoration and other elements of the packaging box. In this process, designers often need to spend a lot of time on conception, drawing, making samples and adjusting designs, and manual sample making and design modification require additional costs. This inevitably leads to inefficient packaging design and high costs.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide an intelligent generation method, control device, computer equipment and computer-readable storage medium for packaging design, aiming to improve the efficiency of product packaging design and reduce design costs.

[0006] To achieve the above objectives, the present application provides a method for intelligently generating packaging design, comprising the following steps:

[0007] Acquire design reference data of product packaging; wherein the design reference data includes at least one of a product picture and a packaging box draft drawing, and at least one of product introduction information and packaging design requirements;

[0008] Based on the dual-stream network NLP (Natural Language Processing) technology and CNN (Convolutional Neural Networks) technology, the text data and image data in the design reference data are processed respectively, and relevant features are extracted to generate box design data;

[0009] Based on the attention mechanism, the shape features of each box surface are extracted from the box body design data, and the decorative features of each box surface are extracted from the design reference data, and the decorative design data of each box surface is generated in sequence; wherein, starting from the second box surface, the attention weight for the decorative design data of the previous box surface is adjusted when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface;

[0010] Generate packaging design results based on the box design data and decoration design data.

[0011] Optionally, the intelligent generation method of packaging design further includes:

[0012] Generate decorative design data of the first box surface according to the shape characteristics and decorative characteristics of the first box surface;

[0013] Starting from the second box surface, the shape feature and the decoration feature of the current box surface are marked as the first feature and the second feature respectively, and the decoration design data of the previous box surface is marked as the third feature;

[0014] The decoration design data of the current box surface is generated according to the first feature, the second feature and the third feature.

[0015] Optionally, before the step of generating the decoration design data of the current box surface according to the first feature, the second feature and the third feature, the step further includes:

[0016] According to the similarity of the decoration features between the current box surface and the previous box surface, the attention weight of the third feature is adjusted;

[0017] Among them, the higher the similarity is, the smaller the attention weight of the adjusted third feature is.

[0018] Optionally, before the step of adjusting the attention weight of the third feature according to the similarity of the decorative features between the current box surface and the previous box surface, the step further includes:

[0019] Extracting the richness of design requirements from the text data based on semantic understanding;

[0020] According to the richness, adjusting the value of the inverse proportional factor between the similarity and the attention weight of the third feature;

[0021] The higher the richness, the smaller the value of the inverse proportional factor.

[0022] Optionally, the intelligent generation method of packaging design further includes:

[0023] Starting from the second box surface, after the decoration design data of the current box surface is generated, the continuity loss function is used to measure the smoothness between the decoration design data of the current box surface and the decoration design data of the previous box surface;

[0024] Detecting whether the smoothness meets preset requirements;

[0025] If not, the decoration design data of the current box surface is optimized so that the smoothness meets the preset requirements.

[0026] Optionally, the intelligent generation method of packaging design further includes:

[0027] Optimize the current box surface decoration design data in a preset manner;

[0028] The preset method includes at least one of the following:

[0029] Adjust the transition between colors or patterns;

[0030] Modify the density and position of decorative elements;

[0031] Redesigned the light and dark changes in the transition area:

[0032] Optimize edge treatment of decorative elements.

[0033] Optionally, the intelligent generation method of packaging design further includes:

[0034] When training the attention mechanism, the continuity loss function is added to the total loss function, and during the training process, minimizing the total loss function is used as one of the training objectives;

[0035] Among them, the model parameters are updated based on the back propagation algorithm to reduce the total loss function.

[0036] To achieve the above object, the present application also provides a control device, comprising:

[0037] An input module, used to obtain design reference data of product packaging; wherein the design reference data includes at least one of a product picture and a packaging box draft drawing, and at least one of product introduction information and packaging design requirements;

[0038] The first generation module is used to process the text data and image data in the design reference data respectively based on the NLP technology and CNN technology of the dual-stream network, and extract relevant features to generate the box design data;

[0039] The second generation module is used to extract the shape features of each box surface from the box body design data and the decorative features of each box surface from the design reference data based on the attention mechanism, and sequentially generate the decorative design data of each box surface; wherein, starting from the second box surface, the attention weight for the decorative design data of the previous box surface is adjusted when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface;

[0040] The output module is used to generate packaging design results based on the box design data and the decoration design data.

[0041] To achieve the above objectives, the present application also provides a computer device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the intelligent generation method for packaging design as described above.

[0042] To achieve the above objectives, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the intelligent generation method of packaging design as described above are implemented.

[0043] The intelligent generation method, control device, computer equipment and computer-readable storage medium of packaging design provided in the present application, based on a dual-stream network and an attention mechanism, construct and train an artificial intelligence model for integrated intelligent generation of packaging design for packaging boxes, which can quickly analyze and extract design reference data to achieve intelligent generation of packaging design results for product packaging boxes, eliminating a large amount of time required for packaging designers to conceive, draw, make packaging box samples and adjust the design, thereby improving the efficiency of product packaging design and reducing the cost of manual design. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic diagram of the steps of an intelligent generation method for packaging design in an embodiment of the present application;

[0045] Figure 2 A model architecture diagram of an intelligent generation method for packaging design in an embodiment of the present application;

[0046] Figure 3 This is a schematic diagram of a control device in an embodiment of the present application;

[0047] Figure 4 A schematic diagram of the internal structure of a computer device according to an embodiment of the present application.

[0048] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0049] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0050] In addition, if the descriptions of "first", "second", etc. are involved in this application, they are only used for descriptive purposes (such as for distinguishing the same or similar features), and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in this field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.

[0051] Reference Figure 1 In one embodiment, the intelligent generation method of packaging design includes:

[0052] Step S10, obtaining design reference data of product packaging; wherein the design reference data includes at least one of a product picture and a packaging box draft drawing, and at least one of product introduction information and packaging design requirements;

[0053] Step S20: Based on the NLP technology and CNN technology of the dual-stream network, the text data and image data in the design reference data are processed respectively, and relevant features are extracted to generate box design data;

[0054] Step S30: Based on the attention mechanism, the shape features of each box surface are extracted from the box body design data, and the decorative features of each box surface are extracted from the design reference data, and the decorative design data of each box surface is sequentially generated; wherein, starting from the second box surface, the attention weight for the decorative design data of the previous box surface is adjusted when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface;

[0055] Step S40: Generate a packaging design result based on the box body design data and the decoration design data.

[0056] In this embodiment, the execution terminal of the embodiment may be a computer device, or may be other equipment or devices (such as a control device) that controls the computer device.

[0057] Optional, see Figure 2 , based on the dual-stream network and attention mechanism, an artificial intelligence model for packaging design of integrated intelligent generation of packaging boxes is constructed and trained in advance to be applied in the intelligent generation method of packaging design.

[0058] As described in step S10, the model input is responsible for obtaining design reference data of the product to be packaged, wherein the design reference data includes at least one of a product picture and a packaging box draft drawing, and includes at least one of product introduction information and packaging design requirements.

[0059] Optionally, the product image can be a picture of the product's appearance, used to show the product's shape, color and other characteristics; the product introduction information can include a detailed description of the product's features, materials, functions, uses, target audience, etc.; the packaging box draft drawing can be a preliminary framework drawing of the packaging box drawn by the customer or designer; the packaging design requirements can be the specific design requirements and expectations put forward by the customer, such as brand logo, style preference, market positioning, etc.

[0060] Generally speaking, the design reference data input into the model can be in the form of text data and image data.

[0061] As described in step S20, the dual-stream network (i.e., dual-stream image-text combined network) is a deep learning model, which is usually composed of two independent streams, each of which is responsible for processing different types of input data. Optionally, the dual-stream network can be constructed using a FusionNet network.

[0062] Optionally, the dual-stream network is pre-trained and learns a first association relationship between relevant features of the design reference data and the box body design data, and based on the first association relationship, the dual-stream network has the ability to generate the box body design data based on the design reference data.

[0063] Optional, see Figure 2 ,The two-stream network includes NLP layer, CNN layer and fusion layer.

[0064] Among them, the NLP layer processes text data based on NLP technology, analyzes the semantic information of the text, and extracts relevant features (i.e., text features, or text feature vectors).

[0065] Among them, the CNN layer processes image data based on CNN technology and extracts relevant features of the image (i.e., image features, or image feature vectors) through operations such as convolution and pooling.

[0066] The fusion layer is used to fuse the image features extracted by the CNN layer and the text features extracted by the NLP layer. The design of the fusion layer can include simple feature association, weighted summation, splicing, or more complex fusion mechanisms (such as multi-layer perceptron or graph convolutional network fusion) to achieve the interaction and fusion of image and text data. Through the fusion layer, the two-stream network can combine image and text data to obtain a richer and more comprehensive information representation, thereby improving the performance of the model on multimodal tasks.

[0067] Optionally, the two-stream network uses NLP technology to process text data related to product introduction information, packaging design requirements, etc. A word embedding model can be used to convert text data into vector representation, such as using pre-trained word vector models such as Word2Vec, GloVe, or BERT. A recurrent neural network or a long short-term memory network is used to analyze the semantic information of the text and extract relevant text features.

[0068] Optionally, the two-stream network uses CNN technology to process image data such as product images and packaging box drafts. The CNN layer extracts visual features of the image, such as shape, pattern, color, etc., through convolutional layers and pooling layers. Pre-trained image processing models such as VGG, ResNet, or EfficientNet can also be used to extract high-level feature representations.

[0069] Optionally, the fusion layer is used to fuse the image features extracted by the CNN layer and the text features extracted by the NLP layer and generate corresponding prediction results.

[0070] Take the fusion layer as a multi-layer perceptron as an example:

[0071] The multilayer perceptron is divided into an input layer, an intermediate layer, and an output layer, wherein the intermediate layer is provided with multiple hidden layers.

[0072] In the input layer of the multi-layer perceptron, the image features obtained from the CNN layer and the text features obtained from the NLP layer are concatenated to form a comprehensive feature vector. This feature vector integrates the image and text information, providing more comprehensive data for subsequent processing.

[0073] Next, in each hidden layer of the middle layer of the multi-layer perceptron, neurons perform nonlinear transformations (such as using activation functions to introduce nonlinearity) and feature mapping on the integrated feature vector. The multiple hidden layers in the middle layer are divided into lower hidden layers and upper hidden layers. Among them, the lower hidden layer is responsible for extracting low-level features of input data such as images and texts, such as edges, textures, materials, etc. These features are usually more basic and specific and can be directly extracted from the original data; the upper hidden layer gradually extracts more abstract and complex features, such as shapes, object parts, etc. These features correspond to higher-level semantic information and can capture deeper structures and patterns of the data. Through this hierarchical feature extraction method, the model can learn multi-level representations.

[0074] After the feature vector is nonlinearly transformed in the middle layer, the last fully connected output layer maps the features of the middle layer to the final output space. This output layer is used to map the extracted features to feature representations related to box design, such as box size, design style, etc. Through this process, the multi-layer perceptron converts the comprehensive feature vector into a data representation suitable for box design, provides the necessary feature information for the final box design task, and forms box design data.

[0075] As described in step S30, the attention mechanism is intended to simulate the human attention mechanism and realize the ability to perform weighted processing on key information in the input data. The attention mechanism can be applied not only to process image data in deep learning, but also to process text data, that is, the attention mechanism can accept image and text input. By combining the attention mechanism for processing image and text data, the model can more comprehensively understand and optimize the correlation between image and text data, and realize more accurate and effective information processing and expression.

[0076] Optionally, the attention mechanism is pre-trained and learns a second association relationship between the design reference data, relevant features of the box design data and the decoration design data. Based on the second association relationship, the attention mechanism has the ability to generate decoration design data based on the design reference data and the box design data.

[0077] Optionally, in this artificial intelligence model, the attention mechanism simultaneously receives design reference data (including image data and text data) and box design data output by the dual-stream network.

[0078] First, the attention mechanism extracts the shape features (i.e., shape feature vectors) of each box surface from the box design data. These features may involve information such as the geometric shape and size of the box body, and are used to describe the basic structural properties of each box surface.

[0079] Among them, in the box design data, the geometric shape features can include the shape type of the box surface, such as rectangle, square, circle, etc., and the properties of the corners, such as side length, curvature of the corners, etc. These features can be extracted by analyzing the structural data of the box body to describe the overall shape characteristics of the box surface.

[0080] Among them, the dimensional features refer to the various dimensional parameters of the box surface, such as length, width, height, etc. Through the dimensional information in the box design data, the dimensional features of each box surface can be accurately extracted, which helps to determine the proportional relationship and appearance size of the box body.

[0081] At the same time, the attention mechanism extracts the decorative features (i.e., decorative feature vectors) of each box surface from the design reference data. These features can include design elements such as color, texture, and pattern, which are used to describe the decorative style and design concept of each box surface.

[0082] Among them, the attention mechanism can be used to extract the color features of each box surface from the design information. The model can focus on the distribution and matching of color information in the design reference data, thereby describing the color theme, tonality and matching method of the box surface.

[0083] Among them, the attention mechanism can capture the details and features of the texture on the box surface. The model can focus on the style, thickness, texture and other features of the texture on different box surfaces, and describe the texture style and overall visual effect of the box surface.

[0084] Among them, the attention mechanism can help the model extract the pattern features of each box surface from the design reference data. The model can focus on the type, layout, repetitiveness and other features of the pattern to describe the design style and uniqueness of the box surface pattern.

[0085] Combining decorative features such as color, texture, and pattern, the decorative style and design concept of each box surface can be described. By focusing on and emphasizing key design elements, the model can understand and extract the unique design style of the box surface, which helps to convey the concept and emotion that the packaging box design wants to express.

[0086] Alternatively, the attention mechanism can also generate the decorative features of the total box surface based on the design reference data according to the total box surface area and shape, and then divide the decorative features of the total box surface into decorative features corresponding to each box surface according to the layout of each box surface.

[0087] Optionally, after obtaining the shape features and decorative features corresponding to each box surface, the attention mechanism further generates the decorative design data corresponding to each box surface in sequence according to the shape features and decorative features corresponding to each box surface. And after generating the decorative design data corresponding to the first box surface based on the shape features and decorative features corresponding to the first box surface, starting from the second box surface, the attention mechanism can also adjust the attention weight for the decorative design data of the previous box surface when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface.

[0088] Among them, a lower similarity means that the current box surface needs to pay more attention to the decorative design of the previous box surface in order to maintain the unity of the decorative design styles between different box surfaces; and a higher similarity means that the current box surface can pay less attention to the decorative design of the previous box surface and pay more attention to other design elements, so as to maintain the unity of the decorative design style of the box surface while maximizing the diversity of the decorative designs of each box surface.

[0089] Optionally, when generating the decorative design data of the current box surface, the decorative design data of the previous box surface is used as one of the generating elements, and the similarity of the decorative features between the current box surface and the previous box surface is detected and compared with the preset similarity; wherein, if the similarity is lower than the preset similarity, in the process of generating the decorative design data of the current box surface, the attention weight corresponding to the decorative design data of the previous box surface is increased; if the similarity is higher than the preset similarity, in the process of generating the decorative design data of the current box surface, the attention weight corresponding to the decorative design data of the previous box surface is reduced; the value of the preset similarity can be 70%~90%, which can be optionally 70%.

[0090] Through this processing method, the attention mechanism can dynamically adjust the corresponding attention weights according to the similarity of the decorative features between the box surfaces, so that the decorative design data of each box surface not only takes into account the design features of the previous box surface, but also makes reasonable trade-offs based on the degree of similarity, thereby ensuring the consistency of the overall design style and the unity of the design style, while maximizing the diversity of the decorative designs of each box surface.

[0091] As described in step S40, in the model output, the final packaging design result is generated based on the box body design data and the decoration design data corresponding to each box surface.

[0092] According to the box body design data and the correlation between the decorative design data of each box surface, the box body design data and the decorative design data of each box surface are integrated together to form a unified packaging design style, that is, the decorative design data of each box surface is drawn onto each box surface in the box body design data to obtain the packaging design result of the product packaging box.

[0093] Optionally, the packaging design results can be output in the form of 3D graphics. Through 3D graphics, the three-dimensional structure and appearance characteristics of the packaging design can be clearly displayed, allowing users to more intuitively understand the overall effect of the product packaging box. In addition, in the 3D graphics, users can rotate, scale and move the model through interactive operations to browse and review the packaging design results more deeply, so as to better understand the design concepts and details.

[0094] In one embodiment, based on a dual-stream network and an attention mechanism, an artificial intelligence model for integrated intelligent generation of packaging design for packaging boxes is constructed and trained, which can quickly analyze and extract design reference data to achieve intelligent generation of packaging design results for product packaging boxes, thereby eliminating a large amount of time required for packaging designers to conceive, draw, make packaging box samples and adjust designs, thereby improving the efficiency of product packaging design and reducing the cost of manual design.

[0095] In one embodiment, based on the above embodiment, the intelligent generation method of packaging design further includes:

[0096] Generate decorative design data of the first box surface according to the shape characteristics and decorative characteristics of the first box surface;

[0097] Starting from the second box surface, the shape feature and the decoration feature of the current box surface are marked as the first feature and the second feature respectively, and the decoration design data of the previous box surface is marked as the third feature;

[0098] The decoration design data of the current box surface is generated according to the first feature, the second feature and the third feature.

[0099] In this embodiment, the attention mechanism generates decorative design data suitable for the first box surface based on the shape features and decorative features of the first box surface. At this stage, the attention mechanism will focus on and generate decorative design suitable for the box surface based on the shape features and decorative features of the box surface.

[0100] Starting from the second box surface, the attention mechanism will mark the shape features and decorative features of the current box surface as the first feature and the second feature, and mark the decorative design data of the previous box surface as the third feature. Then, based on these three features, the decorative design data of the current box surface is automatically generated. In this way, the attention mechanism can take into account the decorative design data of the previous box surface and maintain the consistency and coherence of the overall design.

[0101] In this way, through the transmission and marking of features between different box surfaces, the attention mechanism can more flexibly generate corresponding decorative design data based on the features of the front and back box surfaces, thereby ensuring that the design of each box surface is coordinated with the overall design style, ensuring the consistency of the overall packaging design, and unifying the design style of each box surface.

[0102] In one embodiment, based on the above embodiment, before the step of generating the decoration design data of the current box surface according to the first feature, the second feature and the third feature, it also includes:

[0103] According to the similarity of the decoration features between the current box surface and the previous box surface, the attention weight of the third feature is adjusted;

[0104] Among them, the higher the similarity is, the smaller the attention weight of the adjusted third feature is.

[0105] In this embodiment, starting from the second box surface, the step of adjusting the attention weight of the decoration design data of the previous box surface when generating the decoration design data of the current box surface according to the similarity of the decoration features between the current box surface and the previous box surface includes:

[0106] Starting from the second box surface, before generating the decoration design data of the current box surface, the attention mechanism calculates the similarity of the decoration features between the current box surface and the previous box surface. This similarity can measure the degree of consistency between the two.

[0107] Among them, various distance or similarity measurement methods can be used to calculate the similarity between two decoration design data, such as Euclidean distance, cosine similarity, Mahalanobis distance, etc.

[0108] Optionally, based on the calculated similarity, the attention mechanism will adjust the attention weight of the third feature accordingly. For example, if the decorative feature similarity between the current box surface and the previous box surface is high, it means that the decorative feature of the current box surface alone is sufficient to maintain the unity of the decorative design style with the previous box surface. Therefore, the attention weight of the third feature can be reduced, and more attention can be paid to other design elements (such as increasing the weight of the first feature accordingly) to maximize the richness or diversity of the decorative design while maintaining the unity of the decorative design style between the box surfaces; on the contrary, if the similarity is low, it means that the decorative feature of the current box surface alone is difficult to maintain the unity of the decorative design style with the previous box surface, then it is necessary to increase the attention weight of the third feature, and consider more of the decorative design data of the previous box surface to maintain the unity of the decorative design styles between different box surfaces.

[0109] Optionally, the similarity of the decorative features between the current box surface and the previous box surface has an inverse proportional relationship with the attention weight of the third feature associated with the current box surface. Based on the inverse proportional relationship, after knowing the similarity of the decorative features between the current box surface and the previous box surface, the attention weight of the third feature can be calculated. For example, if the inverse proportional factor (i.e., the proportional factor of the inverse proportional function) is 0.003, then when the similarity is 100%, the attention weight of the third feature is 0.003; when the similarity is 1%, the attention weight of the third feature is 0.3.

[0110] Optionally, when adjusting the attention weight corresponding to the third feature, if it is necessary to lower the attention weight corresponding to the third feature, the attention weight corresponding to the first feature can be adaptively increased (the attention weight corresponding to the second feature can remain unchanged or increase); if it is necessary to increase the attention weight corresponding to the third feature, the attention weight corresponding to the first feature can be adaptively lowered (the attention weight corresponding to the second feature can remain unchanged or increase).

[0111] In this way, a dynamic balance of attention weights for different features can be achieved.

[0112] In one embodiment, based on the above embodiment, before the step of adjusting the attention weight of the third feature according to the similarity of the decorative features between the current box surface and the previous box surface, the step further includes:

[0113] Extracting the richness of design requirements from the text data based on semantic understanding;

[0114] According to the richness, adjusting the value of the inverse proportional factor between the similarity and the attention weight of the third feature;

[0115] The higher the richness, the smaller the value of the inverse proportional factor.

[0116] In this embodiment, when processing text data, the richness information required for the design can be extracted from it through semantic understanding technology. This can be achieved through natural language processing technology and text mining methods to help understand the intentions and requirements behind the design.

[0117] Optionally, the amount and diversity of information contained in the design requirements described by text data can be used as indicators to measure richness. The amount of information refers to the amount of detailed and specific information contained in the design requirements, while diversity refers to the degree of diversity of different aspects or elements covered by the design requirements. On this basis, the richness of the design requirements can be quantified by using the corresponding richness assessment model based on semantic understanding.

[0118] First, the text data required by the design is processed and analyzed through semantic understanding technology. Semantic understanding can help the system understand the meaning of text data and identify the concepts, relationships and semantic information therein.

[0119] Extract key information, terms, requirements, constraints, etc. from the design requirements text. This can include using natural language processing techniques such as entity recognition, keyword extraction, topic modeling, etc.

[0120] The amount of information is measured by counting the number of unique terms, keyword frequency, information gain and other indicators in the design requirements. At the same time, the number and coverage of different topics, fields or aspects involved in the design requirements are analyzed to evaluate diversity.

[0121] Based on the above information, an evaluation model can be established to convert the amount and diversity of information into quantifiable indicators.

[0122] Optionally, the value of the inverse proportional factor between the similarity and the attention weight of the third feature can be dynamically adjusted according to the extracted richness. Generally, the higher the richness of the design requirements, the lower the requirement for the uniformity of the design styles of each box surface, and the more emphasis is placed on the performance of the diversity of the design styles. Therefore, a smaller inverse proportional factor can be selected at this time to further reduce the adjustment value of the attention weight corresponding to the third feature; the lower the richness of the design requirements, the higher the requirement for the uniformity of the design styles of each box surface, so a larger inverse proportional factor can be selected at this time to further increase the adjustment value of the attention weight corresponding to the third feature.

[0123] In this way, by dynamically adjusting the inverse proportional factor, it is possible to better adapt to the degree of attention paid to the unity of the design style under different richness requirements, thereby achieving better design effects.

[0124] For example, the richness is set to three levels: low, medium, and high; the inverse proportional factor corresponding to the low-level richness is 0.003, the inverse proportional factor corresponding to the medium-level richness is 0.002, and the inverse proportional factor corresponding to the high-level richness is 0.001.

[0125] In practical applications, by continuously optimizing and adjusting the numerical relationship between richness and inverse proportional factor, combined with feedback information of actual design requirements and effects, the system can gradually learn more suitable parameter settings, thereby improving the efficiency and accuracy of the design process.

[0126] In one embodiment, based on the above embodiment, the intelligent generation method of packaging design further includes:

[0127] Starting from the second box surface, after the decoration design data of the current box surface is generated, the continuity loss function is used to measure the smoothness between the decoration design data of the current box surface and the decoration design data of the previous box surface;

[0128] Detecting whether the smoothness meets preset requirements;

[0129] If not, the decoration design data of the current box surface is optimized so that the smoothness meets the preset requirements.

[0130] In this embodiment, starting from the second box surface, after generating the decoration design data of the current box surface, the attention mechanism uses the continuity loss function to measure the smoothness between the decoration design data of the current box surface and the decoration design data of the previous box surface. This continuity loss function can quantify the visual continuity and smooth transition of the decoration design. By comparing the decoration design data between the current box surface and the previous box surface, the model can evaluate the consistency and coherence between them.

[0131] First, the decoration design data is converted into a representation form suitable for calculating the continuity loss, such as converting the decoration design data into a tensor or vector form for numerical calculation. After being converted into a tensor or vector form, a feature extraction operation can be further performed for use in numerical calculation.

[0132] The continuity loss function is used to calculate the smoothness between the decoration design data of the current box surface and the decoration design data of the previous box surface. The continuity loss function can be a function of various forms for focusing on the consistency and smoothness between two continuous data sequences, such as mean square error or absolute error, etc., to measure the degree of difference between the two data sequences.

[0133] Optionally, the calculated smoothness is tested to determine whether the smoothness of the decorative design data between the current box surface and the previous box surface meets the preset requirements. For example, the smoothness is tested to determine whether it reaches a preset threshold, if so, it is determined to meet the preset requirements, if not, it is determined not to meet the preset requirements; wherein the preset threshold represents the expected level of smoothness or consistency of the data, which can be determined by relevant engineers according to actual conditions.

[0134] Optionally, when it is detected that the smoothness of the decoration design data between the current box surface and the previous box surface does not reach a preset threshold, the decoration design data of the current box surface is optimized so that the smoothness meets the preset requirement.

[0135] The intelligent generation method of packaging design also includes:

[0136] Optimize the current box surface decoration design data in a preset manner;

[0137] The preset method includes at least one of the following:

[0138] Adjust the transition between colors or patterns;

[0139] Modify the density and position of decorative elements;

[0140] Redesigned the light and dark changes in the transition area:

[0141] Optimize edge treatment of decorative elements.

[0142] Optionally, the smoothness and visual effect of the decorative design data can be optimized by adjusting the transition between colors or patterns, such as gradient, blending or fusion. For example, the transition between colors or patterns between box surfaces can be changed from abrupt change to smooth gradient (this can be achieved by adjusting the transition position, color value and gradient type (such as linear gradient, radial gradient, etc.) between colors).

[0143] Optionally, the density and position of the decorative elements can be adjusted to make their distribution on the box surface more uniform and reasonable to improve smoothness and visual balance. For example, an adaptive layout algorithm is used to intelligently adjust the position and density of the decorative elements according to the shape and size of the box surface to achieve the best smoothness and visual effect.

[0144] It should be noted that decorative elements refer to elements that constitute decorative patterns.

[0145] Optionally, the light and dark changes in the transition area can be redesigned to make the decorative design visually smoother and more unified. For example, a color gradient can be applied to the transition area, and the transition can be smoother by appropriately adjusting the starting and ending points, color, and transparency of the gradient; the transition area can be softened, retouched, or blurred to make the light and dark transition smoother and eliminate hard edges and discontinuities.

[0146] Optionally, the edges of decorative elements are optimized, such as smoothing, gradient or blurring, to improve the transition and integration effect between decorative elements. For example, the edges of decorative elements are slightly softened to reduce the abruptness of sharp edges and make the transition more natural and smooth; the saturation or brightness of the color is gradually reduced at the edge of the decorative element to achieve a smooth transition with the background or adjacent elements; the shape and details of the edge of the decorative element are adjusted to better blend with the surrounding environment; the transparency of the edge of the decorative element is adjusted to make it fade into the background or adjacent elements to avoid overly obvious edge boundaries; ensure that the color of the edge of the decorative element is coordinated with the color of the adjacent area or background to avoid unnatural color transitions.

[0147] In one embodiment, by optimizing the current box surface decoration design data so that its smoothness meets preset requirements, it can be ensured that the final generated overall packaging design result can maintain consistency and beauty in visual effects, thereby improving the quality and effect of the design.

[0148] In one embodiment, based on the above embodiment, the intelligent generation method of packaging design further includes:

[0149] When training the attention mechanism, the continuity loss function is added to the total loss function, and during the training process, minimizing the total loss function is used as one of the training objectives;

[0150] Among them, the model parameters are updated based on the back propagation algorithm to reduce the total loss function.

[0151] In this embodiment, when training the attention mechanism, adding the continuity loss function to the total loss function of the attention mechanism can help improve the performance and training effect of the model.

[0152] The total loss function consists of two parts, one is the loss function of the attention mechanism, and the other is the continuity loss function. The total loss function c is defined as follows:

[0153] c=a+λ*b;

[0154] Among them, a is the attention mechanism loss function; b is the continuity loss function; λ is a hyperparameter that weighs the importance between a and b, which is used to adjust the relative importance of the two parts of the loss function in training.

[0155] During the training process, minimizing the total loss function is taken as one of the training objectives, and the model parameters are updated through the back-propagation algorithm to reduce the total loss function. In each round of training, the model parameters are updated by calculating the total loss function, so that the model can be effectively trained and optimized in terms of attention mechanism and continuity.

[0156] Optionally, based on the back-propagation algorithm, the gradients of the attention mechanism loss function and the continuity loss function with respect to the model parameters are calculated respectively. Using the calculated gradient information, the gradient descent method or other optimization algorithms can be used to update the model parameters to reduce the total loss function. The specific method for updating the parameters can be stochastic gradient descent, momentum optimization (Momentum), AdaGrad, Adam, etc. Repeat the above steps, calculate the gradient of the total loss function and update the model parameters in each round of training until the training stop condition is reached (such as the model reaches the maximum number of iterations or converges to a certain degree).

[0157] In practical applications, the implementation of the backpropagation algorithm can be simplified with the help of automatic differentiation functions and optimizers provided by deep learning frameworks (such as TensorFlow, PyTorch, etc.). These frameworks can help efficiently calculate gradients, update model parameters, and provide tuning tools and functions to accelerate the model training process.

[0158] By combining the continuity loss function with the attention mechanism loss function, the model can be better guided to learn a more continuous and smooth attention distribution during training, thereby improving the performance of the model on sequence data. Adjusting the hyperparameter λ can balance the relative importance of the two parts of the loss function, so that the model can better adapt to the specific task requirements, that is, it can better unify and maintain the decorative design style of each box surface, thereby improving the overall quality and aesthetics of the decorative design.

[0159] In addition, refer to Figure 3 In an embodiment of the present application, a control device Z10 is further provided, comprising:

[0160] An input module Z11 is used to obtain design reference data of product packaging; wherein the design reference data includes at least one of a product picture and a packaging box draft drawing, and at least one of product introduction information and packaging design requirements;

[0161] The first generation module Z12 is used to process the text data and image data in the design reference data respectively based on the NLP technology and CNN technology of the dual-stream network, and extract relevant features to generate box design data;

[0162] The second generation module Z13 is used to extract the shape features of each box surface from the box body design data and the decorative features of each box surface from the design reference data based on the attention mechanism, and sequentially generate the decorative design data of each box surface; wherein, starting from the second box surface, the attention weight for the decorative design data of the previous box surface is adjusted when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface;

[0163] The output module Z14 is used to generate a packaging design result based on the box body design data and the decoration design data.

[0164] Optionally, the control device Z10 may be a virtual control device (such as a virtual machine) or a physical device (such as a physical device other than a computer device that can execute the corresponding method).

[0165] In addition, a computer device is also provided in an embodiment of the present application. The internal architecture of the computer device can be as follows: Figure 4 As shown, it includes a processor, a memory, a communication interface and an input interface connected by a system bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database is used to store data called by the computer program. The communication interface is used to communicate data with an external terminal. The input interface is used to receive a signal input by an external device. When the computer program is executed by the processor, an intelligent generation method for packaging design as described in the above embodiment is implemented.

[0166] Those skilled in the art will understand that Figure 4The structure shown in the figure is only a block diagram of a part of the structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. For example, in some optional embodiments, the computer device may also include an output interface (not shown in the figure), and the output interface is also connected to the system bus and is used to output corresponding signals to the peripheral device.

[0167] In addition, the present application also proposes a computer-readable storage medium, the computer-readable storage medium including a computer program, and the computer program, when executed by a processor, implements the steps of the intelligent generation method of packaging design as described in the above embodiment. It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0168] In summary, the intelligent generation method of packaging design, control device, computer equipment and computer-readable storage medium provided in the embodiments of the present application, based on a dual-stream network and an attention mechanism, construct and train an artificial intelligence model for integrated intelligent generation of packaging design for packaging boxes, which can quickly analyze and extract design reference data to achieve intelligent generation of packaging design results for product packaging boxes, eliminating a large amount of time required for packaging designers to conceive, draw, make packaging box samples and adjust the design, thereby improving the efficiency of product packaging design and reducing the cost of manual design.

[0169] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0170] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.

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

Claims

1. An intelligent generation method for packaging design, characterized in that: include: Acquire design reference data of product packaging; wherein the design reference data includes at least one of a product picture and a packaging box draft drawing, and at least one of product introduction information and packaging design requirements; Based on the NLP technology and CNN technology of the dual-stream network, the text data and image data in the design reference data are processed respectively, and relevant features are extracted to generate box design data; wherein, the image features extracted by the CNN layer and the text features extracted by the NLP layer are fused together by using the fusion layer of the dual-stream network; the fusion layer is a multi-layer perceptron, which is divided into an input layer, an intermediate layer and an output layer, wherein a plurality of hidden layers are arranged in the intermediate layer; in the input layer of the multi-layer perceptron, the image features obtained from the CNN layer and the text features obtained from the NLP layer are spliced ​​to form a comprehensive feature vector; in each hidden layer of the intermediate layer of the multi-layer perceptron, the neurons perform nonlinear transformation and feature mapping on the comprehensive feature vector; after the intermediate layer performs nonlinear transformation on the feature vector, the last fully connected output layer maps the features of the intermediate layer to the final output space, so as to map the extracted features to feature representations related to the box design; through this process, the multi-layer perceptron converts the comprehensive feature vector into a data representation suitable for the box design, thereby forming the box design data; Based on the attention mechanism, the shape features of each box surface are extracted from the box body design data, and the decorative features of each box surface are extracted from the design reference data, and the decorative design data of each box surface is generated in sequence; wherein, starting from the second box surface, the attention weight for the decorative design data of the previous box surface is adjusted when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface; Generate packaging design results based on the box design data and decoration design data.

2. The intelligent generation method of packaging design according to claim 1, characterized in that: The intelligent generation method of packaging design also includes: Generate decorative design data of the first box surface according to the shape characteristics and decorative characteristics of the first box surface; Starting from the second box surface, the shape feature and the decoration feature of the current box surface are marked as the first feature and the second feature respectively, and the decoration design data of the previous box surface is marked as the third feature; The decoration design data of the current box surface is generated according to the first feature, the second feature and the third feature.

3. The intelligent generation method of packaging design according to claim 2, characterized in that: Before the step of generating the decoration design data of the current box surface according to the first feature, the second feature and the third feature, the step further includes: According to the similarity of the decoration features between the current box surface and the previous box surface, the attention weight of the third feature is adjusted; Among them, the higher the similarity is, the smaller the attention weight of the adjusted third feature is.

4. The intelligent generation method of packaging design according to claim 3, characterized in that: Before the step of adjusting the attention weight of the third feature according to the similarity of the decorative features between the current box surface and the previous box surface, the method further includes: Extracting the richness of design requirements from the text data based on semantic understanding; According to the richness, adjusting the value of the inverse proportional factor between the similarity and the attention weight of the third feature; The higher the richness, the smaller the value of the inverse proportional factor.

5. The intelligent generation method of packaging design according to claim 1, characterized in that: The intelligent generation method of packaging design also includes: Starting from the second box surface, after the decoration design data of the current box surface is generated, the continuity loss function is used to measure the smoothness between the decoration design data of the current box surface and the decoration design data of the previous box surface; Detecting whether the smoothness meets preset requirements; If not, the decoration design data of the current box surface is optimized so that the smoothness meets the preset requirements.

6. The intelligent generation method of packaging design according to claim 5, characterized in that: The intelligent generation method of packaging design also includes: Optimize the current box surface decoration design data in a preset manner; The preset method includes at least one of the following: Adjust the transition between colors or patterns; Modify the density and position of decorative elements; Redesigned the light and dark changes in the transition area: Optimize edge treatment of decorative elements.

7. The intelligent generation method of packaging design according to claim 5 or 6, characterized in that: The intelligent generation method of packaging design also includes: When training the attention mechanism, the continuity loss function is added to the total loss function, and during the training process, minimizing the total loss function is used as one of the training objectives; Among them, the model parameters are updated based on the back propagation algorithm to reduce the total loss function.

8. A control device, characterized in that: include: An input module, used to obtain design reference data of product packaging; wherein the design reference data includes at least one of a product picture and a packaging box draft drawing, and at least one of product introduction information and packaging design requirements; The first generation module is used to process the text data and image data in the design reference data respectively based on the NLP technology and CNN technology of the dual-stream network, and extract relevant features to generate box design data; wherein, the image features extracted by the CNN layer and the text features extracted by the NLP layer are fused together by using the fusion layer of the dual-stream network; the fusion layer is a multi-layer perceptron, which is divided into an input layer, an intermediate layer and an output layer, wherein a plurality of hidden layers are arranged in the intermediate layer; in the input layer of the multi-layer perceptron, the image features obtained from the CNN layer and the text features obtained from the NLP layer are spliced ​​to form a comprehensive feature vector; in each hidden layer of the intermediate layer of the multi-layer perceptron, the neuron performs nonlinear transformation and feature mapping on the comprehensive feature vector; after the intermediate layer performs nonlinear transformation on the feature vector, the last fully connected output layer maps the features of the intermediate layer to the final output space, so as to map the extracted features to feature representations related to the box design; through this process, the multi-layer perceptron converts the comprehensive feature vector into a data representation suitable for the box design, thereby forming the box design data; The second generation module is used to extract the shape features of each box surface from the box body design data and the decorative features of each box surface from the design reference data based on the attention mechanism, and sequentially generate the decorative design data of each box surface; wherein, starting from the second box surface, the attention weight for the decorative design data of the previous box surface is adjusted when generating the decorative design data of the current box surface according to the similarity of the decorative features between the current box surface and the previous box surface; The output module is used to generate packaging design results based on the box design data and the decoration design data.

9. A computer device, characterized in that: The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps of the intelligent generation method for packaging design as described in any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the intelligent generation method for packaging design according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Packaging graph automatic generation method and device, medium and equipment

    CN116611131A

  • Multi-modal pre-training model training method and device and storage medium

    CN117875395A