Product packaging copy generation method and device based on cross-modal feature matching

Through cross-modal feature matching technology, product images and texts are combined to generate high-quality, creative product packaging copywriting, which solves the problem of poor copywriting quality in the existing technology and achieves innovative improvements in copywriting.

CN118210936BActive Publication Date: 2024-09-06北京衔远有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410323569.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-20
Publication Date
2024-09-06
Estimated Expiration
2044-03-20

AI Technical Summary

Technical Problem

The product packaging copy generated in the existing technology is of poor quality, lacks novelty and creativity, lacks semantic understanding, and ignores semantic coherence and emotional expression.

Method used

Using a method based on cross-modal feature matching, by obtaining product images and texts, automatically generate image descriptive text, extract keywords and image features, use the graph-generating graph model to generate product packaging copy, and combine similar images in the product promotion gallery to improve Copy relevance.

Benefits of technology

It improves the quality of copywriting, enhances the novelty and creativity of copywriting, and enhances the promotional effect of product packaging copywriting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118210936B
    Figure CN118210936B
Patent Text Reader

Abstract

The present disclosure provides a method and device for generating product packaging copy based on cross-modal feature matching. The method includes: based on the product image, generating a second product text describing the target product through an algorithm that automatically generates image descriptive text; extracting target keywords for promoting the target product from the first product text and the second product text; extracting cross-modal target features of the target keywords, and extracting cross-modal image features of each product promotion image in the product promotion gallery; determining the target promotion image corresponding to the target product from the product promotion gallery by calculating the similarity between the cross-modal target features and each cross-modal image feature; based on the target keywords and the target promotion image, generating product packaging copy for the target product using a graph-generated graph model. The above technical means are used to solve the problems of poor quality of copy generated in the prior art and lack of novelty and creativity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of copywriting generation, and in particular to a method and device for generating product packaging copywriting based on cross-modal feature matching. Background Art

[0002] Product packaging copy is common in product marketing and is used to introduce various parameters of the product to users. Currently, product packaging copy is either generated based on the text information of the user describing the product, or the text information of the user describing the product is configured on the image of the product provided by the user to form the product packaging copy. Generating product packaging copy directly based on the text information based on the user describing the product leads to poor copy quality due to insufficient semantic understanding and neglect of semantic coherence and emotional expression. Copy generated based on the image and text information of the product provided by the user lacks novelty and creativity. Summary of the invention

[0003] In view of this, the embodiments of the present disclosure provide a method, device, electronic device and computer-readable storage medium for generating product packaging copy based on cross-modal feature matching to solve the problems of poor quality and lack of novelty and creativity of the copy generated in the prior art.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for generating product packaging copy based on cross-modal feature matching is provided, comprising: obtaining a product image of a target product and a first product text describing the target product, and obtaining a product promotional gallery, wherein the product promotional gallery contains multiple product promotional images of different products; based on the product image, generating a second product text describing the target product by an algorithm for automatically generating image descriptive text; extracting target keywords for promoting the target product from the first product text and the second product text; extracting cross-modal target features of the target keywords, and extracting cross-modal image features of each product promotional image in the product promotional gallery; determining a target promotional image corresponding to the target product from the product promotional gallery by calculating the similarity between the cross-modal target features and each cross-modal image feature; and generating product packaging copy for the target product by using a graph-based graph model based on the target keywords and the target promotional image.

[0005] According to a second aspect of an embodiment of the present disclosure, there is provided a device for generating product packaging copy based on cross-modal feature matching, comprising: an acquisition module, configured to acquire a product image of a target product and a first product text describing the target product, and acquire a product promotional gallery, wherein the product promotional gallery contains multiple product promotional images of different products; a text generation module, configured to generate a second product text describing the target product based on the product image by an algorithm for automatically generating image descriptive text; a first extraction module, configured to extract target keywords for promoting the target product from the first product text and the second product text; a second extraction module, configured to extract cross-modal target features of the target keywords, and extract cross-modal image features of each product promotional image in the product promotional gallery; a determination module, configured to determine a target promotional image corresponding to the target product from the product promotional gallery by calculating the similarity between the cross-modal target features and each cross-modal image feature; and a copy generation module, configured to generate product packaging copy for the target product using a graph-based graph model based on the target keywords and the target promotional image.

[0006] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.

[0007] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0008] Compared with the prior art, the disclosed embodiment has the following beneficial effects: obtaining a product image of a target product and a first product text describing the target product, and obtaining a product promotional gallery, wherein the product promotional gallery contains multiple product promotional images of different products; based on the product image, generating a second product text describing the target product by an algorithm that automatically generates image descriptive text; extracting target keywords for promoting the target product from the first product text and the second product text; extracting cross-modal target features of the target keywords, and extracting cross-modal image features of each product promotional image in the product promotional gallery; determining the target promotional image corresponding to the target product from the product promotional gallery by calculating the similarity between the cross-modal target features and each cross-modal image feature; based on the target keywords and the target promotional image, generating product packaging copy for the target product by using a graph-generated graph model. The above technical means can solve the problems of poor quality and lack of novelty and creativity of the copy generated in the prior art, thereby improving the copy quality and enhancing the novelty and creativity of the copy. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 is a flowchart of a method for generating product packaging copy based on cross-modal feature matching provided by an embodiment of the present disclosure;

[0011] Figure 2 It is a flowchart of a training method for a graph-generated graph model provided by an embodiment of the present disclosure;

[0012] Figure 3 It is a schematic diagram of the structure of a device for generating product packaging copy based on cross-modal feature matching provided by an embodiment of the present disclosure;

[0013] Figure 4 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0014] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details that hinder the description of the present disclosure.

[0015] A method and device for generating product packaging copy based on cross-modal feature matching according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0016] Figure 1 It is a flowchart of a method for generating product packaging copy based on cross-modal feature matching provided by an embodiment of the present disclosure. Figure 1 The method for generating product packaging copy based on cross-modal feature matching can be executed by a computer or a server, or by software on the computer or the server. Figure 1 As shown, the method for generating product packaging copy based on cross-modal feature matching includes:

[0017] S101, obtaining a product image of a target product and a first product text describing the target product, and obtaining a product promotion picture library, wherein the product promotion picture library contains a plurality of product promotion images of different products;

[0018] S102, based on the product image, generating a second product text describing the target product by using an algorithm for automatically generating image descriptive text;

[0019] S103, extracting target keywords for promoting the target product from the first product text and the second product text;

[0020] S104, extracting cross-modal target features of target keywords, and extracting cross-modal image features of each product promotion image in the product promotion image library;

[0021] S105, determining a target promotional image corresponding to the target product from the product promotional image library by calculating the similarity between the cross-modal target feature and each cross-modal image feature;

[0022] S106, based on the target keywords and the target promotional image, generate product packaging copy for the target product using the graph-to-graph model.

[0023] There can be multiple product images. The algorithm for automatically generating image descriptive text can be any of the Image caption tools. The first product text is the text that the user describes the target product, and the second product text is the text generated based on the product image. The first product text is a description of the various parameters of the target product, and the second product text includes the location of the product in the product image; the background description of the product image, such as color; the overall atmosphere presented by the image, such as festive elegance, fresh and natural style, retro nostalgic style, romantic fantasy style, and cool technology style.

[0024] You can use a large language model to extract target keywords. A large language model (LLM) is an artificial intelligence model trained with a large corpus that can understand and generate natural language text. Large language models can be BERT (Bidirectional Encoder Representations from Transformers), GPT (Generative Pre-trained Transformer), etc.

[0025] The product promotion gallery is built by collecting excellent product marketing pictures and design pictures on social media. Cross-modal target features and cross-modal image features can be extracted using algorithms for text-image modality alignment, such as clip. "CLIP" refers to "Contrastive Language-Image Pre-training", a technology developed by OpenAI for learning cross-modal embedding from natural language text to images.

[0026] Determine the target promotional images with similar styles to the target products from the product promotional image library, thereby increasing the relevance between the promotional images and product texts and improving the quality of generated illustrations. Product packaging copy is used for promotional marketing, etc.

[0027] According to the embodiment of the present application, a technical solution is provided to obtain a product image of a target product and a first product text describing the target product, and to obtain a product promotional gallery, wherein the product promotional gallery contains multiple product promotional images of different products; based on the product image, a second product text describing the target product is generated by an algorithm that automatically generates image descriptive text; target keywords for promoting the target product are extracted from the first product text and the second product text; cross-modal target features of the target keywords are extracted, and cross-modal image features of each product promotional image in the product promotional gallery are extracted; a target promotional image corresponding to the target product is determined from the product promotional gallery by calculating the similarity between the cross-modal target features and each cross-modal image feature; based on the target keywords and the target promotional images, a product packaging copy of the target product is generated using a graph-generated graph model. The above-mentioned technical means can solve the problems of poor quality of copy generated in the prior art and lack of novelty and creativity, thereby improving the quality of copy and enhancing the novelty and creativity of copy.

[0028] Furthermore, by calculating the similarity between the cross-modal target feature and each cross-modal image feature, a target promotional image corresponding to the target product is determined from the product promotional gallery, including: calculating the similarity between the cross-modal target feature and each cross-modal image feature; taking the product promotional image corresponding to the cross-modal image feature whose similarity with the cross-modal target feature is greater than a preset threshold as the target promotional image; or taking the product promotional images corresponding to a preset number of cross-modal image features with the highest similarity to the cross-modal target feature as the target promotional image.

[0029] The cosine similarity between the cross-modal target feature and each cross-modal image feature can be calculated, and multiple product promotion images with corresponding similarities greater than a preset threshold can be used as target promotional images, or multiple product promotion images with the highest corresponding similarities can be used as target promotional images.

[0030] Furthermore, based on the target keywords and the target promotional image, the image-generated graph model is used to generate product packaging copy for the target product, including: the image-generated graph model internally includes an edge detection network, a transformer network, a diffusion network and a multimodal generation network; the target keywords and the target promotional image are input into the image-generated graph model, and inside the image-generated graph model: the target promotional image is processed by the edge detection network to obtain a black-and-white edge map; the black-and-white edge map and the target keywords are processed respectively by the transformer network to obtain edge map features and keyword features; the edge map features and keyword features are processed by the diffusion network to obtain a product packaging image that conforms to the description of the first product text and the second product text; the first product text, the second product text and the product packaging image are processed by the multimodal generation network to obtain product packaging copy.

[0031] The edge detection network can use the Canny operator, which performs well in edge detection because it can effectively suppress noise and accurately locate edges. In an embodiment of the present application, the edge detection network processes the target promotional image to obtain a black and white edge map. The transformer network processes the black and white edge map to obtain edge map features, and the transformer network processes the target keyword to obtain keyword features. The keyword features are used as prompt words, and the diffusion network processes the edge map features based on the prompt words to obtain an image that conforms to the product packaging. The product packaging image conforms to some limitations of the keyword features and also conforms to the description content of the first product text and the second product text. The multimodal generation network can use BlenderBot, and the multimodal generation network integrates the first product text, the second product text and the product packaging image to obtain the product packaging copy.

[0032] Furthermore, based on the target keywords and the target promotional images, before using the graph-based model to generate the product packaging copy of the target product, the method also includes: constructing an encoding network, a feature processing network, and a decoding network corresponding to the encoding network; constructing an image processing branch using the encoding network, the feature processing network, and the decoding network; constructing a keyword processing branch using the encoding network, the feature processing network, and the attention network; and constructing a diffusion network using the image processing branch and the keyword processing branch.

[0033] The convolution layer, the maximum pooling layer and the batch normalization layer, the convolution layer and the upsampling layer can be connected in sequence to obtain the encoding network and the decoding network, wherein the network structure of the encoding network and the decoding network is the same, the encoding network is trained for encoding, and the decoding network is trained to complete the inverse operation decoding of encoding. The convolution layer, the residual unit, the global average pooling layer, and the fully connected layer are connected in sequence to obtain the feature processing network, wherein the feature processing network is trained to extract more feature information from the output of the encoding network.

[0034] Because the image processing branch needs to process the output of the keyword processing branch later, in order to make the output features of the image processing branch and the keyword processing branch consistent and convenient for subsequent processing, the image processing branch and the keyword processing branch use the same structure of encoding network and feature processing network. The encoding network, feature processing network and decoding network are connected in sequence to obtain the image processing branch, the encoding network, feature processing network and attention network are connected in sequence to obtain the keyword processing branch, and the image processing branch and the keyword processing branch are connected in parallel to obtain the diffusion network.

[0035] Furthermore, edge graph features and keyword features are processed by a diffusion network to obtain a product packaging image that conforms to the description of the first product text and the second product text, including: inputting edge graph features and keyword features into the diffusion network: processing edge graph features by the encoding network in the image processing branch to obtain image encoding features; processing keyword features by the encoding network and the feature processing network in the keyword processing branch in turn to obtain first keyword auxiliary features and second keyword auxiliary features respectively; and assigning the second keyword auxiliary features and the first keyword auxiliary features as weights to the feature processing network and the decoding network in the image processing branch by the attention network in the keyword processing branch, so that the feature processing network and the decoding network in the image processing branch process the image encoding features according to the weights to obtain the product packaging image.

[0036] The encoding network in the image processing branch processes the edge graph features to obtain image encoding features. In the keyword processing branch, the encoding network processes the keyword features to obtain the first keyword auxiliary features. The feature processing network processes the first keyword auxiliary features to obtain the second keyword auxiliary features.

[0037] Furthermore, the second keyword auxiliary feature and the first keyword auxiliary feature are respectively assigned as weights to the feature processing network and the decoding network in the image processing branch through the attention network in the keyword processing branch, so that the feature processing network and the decoding network in the image processing branch process the image coding features according to the weights to obtain the product packaging image, including: assigning the second keyword auxiliary feature as a weight to the feature processing network in the image processing branch through the attention network, so that the feature processing network in the image processing branch processes the image coding features according to the weights to obtain the image processing features; assigning the first keyword auxiliary feature as a weight to the decoding network in the image processing branch through the attention network, so that the decoding network in the image processing branch processes the image processing features according to the weights to obtain the product packaging image.

[0038] In the image processing branch, the feature processing network processes the image encoding features based on the second keyword auxiliary features to obtain image processing features, and the decoding network processes the image processing features based on the first keyword auxiliary features to obtain the product packaging image. The product packaging image can be regarded as the diffusion network adjusting the target promotional image based on the keyword features. Therefore, the product packaging image is relatively novel and creative.

[0039] Figure 2 is a flow chart of a training method for a graph-generated graph model provided by an embodiment of the present disclosure, such as Figure 2 As shown, the method includes:

[0040] S201, obtaining multiple sets of training data, wherein each set of training data includes multiple keywords and multiple promotional images;

[0041] S202, using the graph-based graph model to generate corresponding product packaging copy for each set of training data;

[0042] S203, determining the score of the product packaging copy corresponding to each group of training data, and determining the loss according to the score of the product packaging copy corresponding to each group of training data;

[0043] S204, optimizing the model parameters of the graph-generated graph model according to the loss to complete the training of the graph-generated graph model.

[0044] The product packaging copy corresponding to each set of training data can be posted on major media websites, and the score is determined by the number of clicks and likes of users. The more clicks and likes a user has, the higher the score. The higher the score, the smaller the loss. This training is a conventional reinforcement learning training, and the specific training process will not be repeated.

[0045] All the above-mentioned optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, and will not be described one by one here.

[0046] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.

[0047] Figure 3 FIG. 1 is a schematic diagram of a device for generating product packaging copy based on cross-modal feature matching according to an embodiment of the present disclosure. Figure 3 As shown, the product packaging copy generation device based on cross-modal feature matching includes:

[0048] An acquisition module 301 is configured to acquire a product image of a target product and a first product text describing the target product, and acquire a product promotion picture library, wherein the product promotion picture library contains a plurality of product promotion images of different products;

[0049] A text generation module 302 is configured to generate a second product text describing the target product based on the product image by an algorithm for automatically generating image descriptive text;

[0050] The first extraction module 303 is configured to extract target keywords for promoting the target product from the first product text and the second product text;

[0051] The second extraction module 304 is configured to extract cross-modal target features of the target keyword and extract cross-modal image features of each product promotion image in the product promotion image library;

[0052] The determination module 305 is configured to determine the target promotional image corresponding to the target product from the product promotion image library by calculating the similarity between the cross-modal target feature and each cross-modal image feature;

[0053] The copy generation module 306 is configured to generate product packaging copy for the target product based on the target keywords and the target promotional image using the graph-to-graph model.

[0054] According to the embodiment of the present application, a technical solution is provided to obtain a product image of a target product and a first product text describing the target product, and to obtain a product promotional gallery, wherein the product promotional gallery contains multiple product promotional images of different products; based on the product image, a second product text describing the target product is generated by an algorithm that automatically generates image descriptive text; target keywords for promoting the target product are extracted from the first product text and the second product text; cross-modal target features of the target keywords are extracted, and cross-modal image features of each product promotional image in the product promotional gallery are extracted; a target promotional image corresponding to the target product is determined from the product promotional gallery by calculating the similarity between the cross-modal target features and each cross-modal image feature; based on the target keywords and the target promotional images, a product packaging copy of the target product is generated using a graph-generated graph model. The above-mentioned technical means can solve the problems of poor quality of copy generated in the prior art and lack of novelty and creativity, thereby improving the quality of copy and enhancing the novelty and creativity of copy.

[0055] In some embodiments, the determination module 305 is further configured to calculate the similarity between the cross-modal target feature and each cross-modal image feature; use as the target promotional image the product promotional image corresponding to the cross-modal image feature whose similarity with the cross-modal target feature is greater than a preset threshold; or use as the target promotional image the product promotional images corresponding to a preset number of cross-modal image features having the highest similarity with the cross-modal target feature.

[0056] In some embodiments, the copy generation module 306 is also configured to include an edge detection network, a transformer network, a diffusion network and a multimodal generation network inside the image-generated model; the target keywords and the target promotional image are input into the image-generated model, and inside the image-generated model: the target promotional image is processed by the edge detection network to obtain a black-and-white edge map; the black-and-white edge map and the target keyword are processed separately by the transformer network to obtain edge map features and keyword features; the edge map features and the keyword features are processed by the diffusion network to obtain a product packaging image that conforms to the description of the first product text and the second product text; the first product text, the second product text and the product packaging image are processed by the multimodal generation network to obtain the product packaging copy.

[0057] In some embodiments, the copy generation module 306 is further configured to construct an encoding network, a feature processing network, and a decoding network corresponding to the encoding network; construct an image processing branch using the encoding network, the feature processing network, and the decoding network; construct a keyword processing branch using the encoding network, the feature processing network, and the attention network; and construct a diffusion network using the image processing branch and the keyword processing branch.

[0058] In some embodiments, the copy generation module 306 is also configured to input edge map features and keyword features into the diffusion network: process the edge map features through the encoding network in the image processing branch to obtain image encoding features; process the keyword features through the encoding network and the feature processing network in the keyword processing branch in turn to obtain the first keyword auxiliary feature and the second keyword auxiliary feature respectively; through the attention network in the keyword processing branch, the second keyword auxiliary feature and the first keyword auxiliary feature are respectively assigned as weights to the feature processing network and the decoding network in the image processing branch, so that the feature processing network and the decoding network in the image processing branch process the image encoding features according to the weights to obtain the product packaging image.

[0059] In some embodiments, the copy generation module 306 is also configured to assign the second keyword auxiliary feature as a weight to the feature processing network in the image processing branch through the attention network, so that the feature processing network in the image processing branch processes the image encoding feature according to the weight to obtain the image processing feature; assign the first keyword auxiliary feature as a weight to the decoding network in the image processing branch through the attention network, so that the decoding network in the image processing branch processes the image processing feature according to the weight to obtain the product packaging image.

[0060] In some embodiments, the copy generation module 306 is further configured to obtain multiple groups of training data, wherein each group of training data contains multiple keywords and multiple promotional images; generate corresponding product packaging copy for each group of training data using the graph-based graph model; determine the score of the product packaging copy corresponding to each group of training data, and determine the loss based on the score of the product packaging copy corresponding to each group of training data; and optimize the model parameters of the graph-based graph model based on the loss to complete the training of the graph-based graph model.

[0061] It should be understood that the sequence numbers of the steps in the above embodiments do not imply a sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.

[0062] Figure 4 FIG. 4 is a schematic diagram of an electronic device 4 provided in an embodiment of the present disclosure. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and capable of running on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0063] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , which may include more or fewer components than those shown in the figure, or different components.

[0064] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0065] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, the electronic device 4 is equipped with a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. The memory 402 may also include both an internal storage unit of the electronic device 4 and an external storage device. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0066] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above-mentioned functional units and module divisions are used as examples for illustration. In practical applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. In the embodiment, each functional unit and module can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit, and the above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.

[0067] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the above-mentioned various method embodiment steps when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.

[0068] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure.

Claims

1. A method for generating product packaging copy based on cross-modal feature matching, characterized in that: include: Acquire a product image of a target product and a first product text describing the target product, and acquire a product promotion picture library, wherein the product promotion picture library contains a plurality of product promotion images of different products; Based on the product image, generating a second product text describing the target product by an algorithm for automatically generating image descriptive text; extracting target keywords for promoting the target product from the first product text and the second product text; Extracting cross-modal target features of the target keyword, and extracting cross-modal image features of each product promotion image in the product promotion gallery; Determining a target promotional image corresponding to the target product from the product promotional image library by calculating the similarity between the cross-modal target feature and each cross-modal image feature; Based on the target keywords and the target promotional image, using a graph-based graph model to generate product packaging copy for the target product; Wherein, based on the target keyword and the target promotional image, the product packaging copy of the target product is generated by using a graph-based graph model, including: the graph-based graph model internally includes an edge detection network, a transformer network, a diffusion network and a multimodal generation network; the target keyword and the target promotional image are input into the graph-based graph model, and within the graph-based graph model: the target promotional image is processed by the edge detection network to obtain a black-and-white edge map; the black-and-white edge map and the target keyword are processed by the transformer network respectively to obtain edge map features and keyword features; the edge map features and the keyword features are processed by the diffusion network to obtain a product packaging image that conforms to the description of the first product text and the second product text; the first product text, the second product text and the product packaging image are processed by the multimodal generation network to obtain the product packaging copy; Among them, based on the target keywords and the target promotional images, before using the graph-based graph model to generate the product packaging copy of the target product, the method also includes: constructing an encoding network, a feature processing network and a decoding network corresponding to the encoding network; using the encoding network, the feature processing network and the decoding network to construct an image processing branch; using the encoding network, the feature processing network and the attention network to construct a keyword processing branch; and using the image processing branch and the keyword processing branch to construct the diffusion network.

2. The method according to claim 1, characterized in that: Determining a target promotional image corresponding to the target product from the product promotional image library by calculating the similarity between the cross-modal target feature and each cross-modal image feature includes: Calculating the similarity between the cross-modal target feature and each cross-modal image feature; using a product promotion image corresponding to a cross-modal image feature whose similarity to the cross-modal target feature is greater than a preset threshold as the target promotion image; or The product promotion images corresponding to a preset number of cross-modal image features having the highest similarity to the cross-modal target feature are used as the target promotion images.

3. The method according to claim 1, characterized in that: Processing the edge graph features and the keyword features through the diffusion network to obtain a product packaging image that conforms to the description of the first product text and the second product text includes: Input the edge graph features and the keyword features into the diffusion network: Processing the edge graph features through the coding network in the image processing branch to obtain image coding features; The keyword feature is processed by the encoding network and the feature processing network in the keyword processing branch in turn to obtain a first keyword auxiliary feature and a second keyword auxiliary feature respectively; The second keyword auxiliary feature and the first keyword auxiliary feature are respectively assigned as weights to the feature processing network and the decoding network in the image processing branch through the attention network in the keyword processing branch, so that the feature processing network and the decoding network in the image processing branch process the image coding features according to the weights to obtain a product packaging image.

4. The method according to claim 3, characterized in that: The second keyword auxiliary feature and the first keyword auxiliary feature are respectively assigned as weights to the feature processing network and the decoding network in the image processing branch through the attention network in the keyword processing branch, so that the feature processing network and the decoding network in the image processing branch process the image encoding features according to the weights to obtain a product packaging image, including: Allocating the second keyword auxiliary feature as a weight to the feature processing network in the image processing branch through the attention network, so that the feature processing network in the image processing branch processes the image coding feature according to the weight to obtain an image processing feature; The first keyword auxiliary feature is assigned as a weight to a decoding network in the image processing branch through the attention network, so that the decoding network in the image processing branch processes the image processing feature according to the weight to obtain a product packaging image.

5. The method according to claim 1, characterized in that: Before generating product packaging copy for the target product using a graph-based graph model based on the target keyword and the target promotional image, the method further includes: Acquire multiple sets of training data, where each set of training data includes multiple keywords and multiple promotional images; Generate corresponding product packaging copy for each set of training data using the graph-to-graph model; Determine the score of the product packaging copy corresponding to each set of training data, and determine the loss according to the score of the product packaging copy corresponding to each set of training data; The model parameters of the graph-generated graph model are optimized according to the loss to complete the training of the graph-generated graph model.

6. A device for generating product packaging copy based on cross-modal feature matching, characterized in that: include: an acquisition module, configured to acquire a product image of a target product and a first product text describing the target product, and acquire a product promotion picture library, wherein the product promotion picture library contains a plurality of product promotion images of different products; A text generation module is configured to generate a second product text describing the target product based on the product image by an algorithm for automatically generating image descriptive text; A first extraction module is configured to extract target keywords for promoting the target product from the first product text and the second product text; A second extraction module is configured to extract cross-modal target features of the target keyword and cross-modal image features of each product promotion image in the product promotion gallery; A determination module is configured to determine a target promotional image corresponding to the target product from the product promotion image library by calculating the similarity between the cross-modal target feature and each cross-modal image feature; A copywriting generation module is configured to generate product packaging copywriting for the target product using a graph-based graph model based on the target keyword and the target promotional image; The copywriting generation module is further configured such that the image-generated graph model includes an edge detection network, a transformer network, a diffusion network, and a multimodal generation network; the target keyword and the target promotional image are input into the image-generated graph model, and within the image-generated graph model: the target promotional image is processed by the edge detection network to obtain a black-and-white edge map; the black-and-white edge map and the target keyword are processed by the transformer network respectively to obtain edge map features and keyword features; the edge map features and the keyword features are processed by the diffusion network to obtain a product packaging image that conforms to the description of the first product text and the second product text; the first product text, the second product text, and the product packaging image are processed by the multimodal generation network to obtain the product packaging copywriting; The copywriting generation module is also configured to construct an encoding network, a feature processing network and a decoding network corresponding to the encoding network; construct an image processing branch using the encoding network, the feature processing network and the decoding network; construct a keyword processing branch using the encoding network, the feature processing network and the attention network; and construct the diffusion network using the image processing branch and the keyword processing branch.

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

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.