An advertisement creative visual element intelligent generation method and device
By constructing a combination of visual feature triplets and multi-head attention encoding, combined with deep separable convolution and feature decoupling self-knowledge distillation network, the shortcomings of existing intelligent advertising design systems in visual feature capture and generation are solved, and efficient and personalized advertising creative generation is achieved.
Patent Information
- Application Number
- CN202510034056.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Existing intelligent advertising design systems are unable to effectively capture the diverse visual features in advertising design materials. They have high computational complexity and redundant model parameters, making it difficult to achieve personalized customization and style transfer of advertising creativity. In addition, the generated visual elements lack logic and artistry.
By constructing a combination of visual feature triplets, combining multi-head attention encoding and bidirectional attention fusion, using deep separable convolution and feature decoupling self-knowledge distillation network, and performing neighborhood screening and reconstruction calculations based on the local linear embedding algorithm, creative visual elements for advertising are generated.
It improves the ability to capture and understand visual features in advertising design materials, reduces the computational complexity and storage overhead of the model, enhances the practicality and generalization ability of the system, and ensures the quality and innovation of the generated visual elements.
Smart Images

Figure CN119904272B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent generation of visual elements, and in particular to a method and device for intelligent generation of creative visual elements for advertisements. Background Art
[0002] With the rapid development of digital advertising, the design and generation of creative visual elements has become a critical step in advertising production. Traditional advertising visual element design relies primarily on the designer's experience and intuition, which is not only inefficient but also difficult to ensure consistent design quality and creative novelty.
[0003] Existing intelligent advertising design systems mainly use a single feature extraction method and a fixed model structure, which cannot effectively capture the diverse visual features in advertising design materials. In addition, the computational complexity is high when processing large-scale advertising materials, and the model parameters are redundant, which affects the practicality and promotion of the system. In addition, the existing methods have limited semantic understanding and feature representation capabilities of visual elements, making it difficult to accurately grasp the creative intent and visual effects of advertising design. In the process of processing the feature fusion and generation of advertising visual elements, existing technologies often ignore the correlation and hierarchical structure between features, resulting in the lack of logic and artistry in the generated visual elements. At the same time, due to the lack of effective feature decoupling and knowledge transfer mechanisms, it is difficult to achieve personalized customization and style transfer of advertising creativity, which limits the application scenarios and innovation space of intelligent advertising design systems. Summary of the Invention
[0004] The main purpose of the present invention is to provide a method and device for intelligently generating visual elements of advertising creativity. The present invention ensures the quality and innovation of the generated visual elements and improves the personalized customization capability of advertising creativity.
[0005] To achieve the above-mentioned object, the present invention provides a method for intelligently generating creative visual elements for advertisements, comprising the following steps:
[0006] Perform feature extraction and feature fusion on advertising design materials to obtain a triple combination of visual features;
[0007] Performing multi-head attention encoding and similarity calculation on the visual feature triple combination to obtain an element vector group;
[0008] Inputting the visual feature triple combination and the element vector group into a dual encoding framework for bidirectional attention fusion to obtain a multimodal feature group;
[0009] Performing depth-separable convolution processing and feature separation on the multimodal feature group to obtain a target feature group;
[0010] The target feature group is subjected to neighborhood screening and reconstruction calculation based on a locality preserving embedding algorithm to generate the visual element of the advertisement creative.
[0011] The application further provides an intelligent visual element generation device for advertisement creative.
[0012] The feature extraction module is configured to perform feature extraction and feature fusion on the advertisement design material to obtain a visual feature triple combination.
[0013] The calculation module is configured to perform multi-head attention encoding and similarity calculation on the visual feature triple combination to obtain an element vector group.
[0014] The attention fusion module is configured to input the visual feature triple combination and the element vector group into a double-encoding framework to perform bidirectional attention fusion and obtain a multi-modal feature group.
[0015] The feature separation module is configured to perform deep separable convolution processing and feature separation on the multi-modal feature group to obtain a target feature group.
[0016] The generation module is configured to perform neighborhood screening and reconstruction calculation on the target feature group based on a locality preserving embedding algorithm to generate the visual element of the advertisement creative.
[0017] The application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method according to any one of the above embodiments when executing the computer program.
[0018] The application further provides a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to implement the steps of the method according to any one of the above embodiments.
[0019] To sum up, the technical scheme provided by the application constructs an extraction mechanism of a visual feature triple combination, combines multi-head attention encoding and bidirectional attention fusion, effectively improves the capturing and understanding ability of visual features in advertisement design material, and enhances the expression ability of the model for semantic relationships of visual elements; the lightweight design of deep separable convolution and the time displacement module significantly reduces the computational complexity and storage overhead of the model, while maintaining the accuracy of feature extraction and improving the practicability of the system; the feature decoupling self-knowledge distillation network is introduced, the parameter compression and performance optimization of the model are realized through the separation of target features and non-target features and knowledge migration, and the generalization ability of the system is enhanced; the adaptive neighborhood selection and reconstruction mechanism based on the locality preserving embedding algorithm guarantees the quality and innovation of the generated visual elements and improves the personalized customization ability of advertisement creative. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1This is a schematic diagram of the steps of a method for intelligently generating creative visual elements for advertising according to one embodiment of the present invention;
[0021] Figure 2 This is a structural block diagram of an apparatus for intelligently generating creative visual elements for advertising according to an embodiment of the present invention;
[0022] Figure 3 It is a schematic block diagram of the structure of a computer device according to an embodiment of the present invention.
[0023] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0025] Reference Figure 1 This embodiment provides a method for intelligently generating creative visual elements for advertisements, comprising the following steps:
[0026] S1, extract and fuse features of the advertising design materials to obtain a triple combination of visual features;
[0027] The advertising design material is pixel-resized, converting the original material into a fixed-size RGB three-channel image to ensure consistency and computational efficiency in subsequent processing. Image processing and deep learning-based methods are used to extract color distribution, texture features, and edge features from the RGB three-channel image. Color distribution is calculated by calculating the distribution characteristics of pixels in RGB space and modeled using histogram analysis or the initial feature maps of a convolutional neural network. Texture features are extracted using local binary patterns (LBP), gray-level co-occurrence matrices (GLCMs), or mid-level features from a deep neural network to capture surface details. Edge features are extracted using Canny edge detection or gradient analysis based on convolutional features to identify significant boundaries within the image. This process generates a first feature matrix containing color, texture, and edge information, describing the fundamental visual characteristics of the image. This first feature matrix undergoes forward and backward feature transfer using the bidirectional feature propagation mechanism within the deep neural network. Forward feature transfer enhances global features by propagating features layer by layer, while backward feature transfer strengthens important local feature responses through a backpropagation mechanism. The bidirectional feature transfer mechanism helps fully integrate features from different dimensions, resulting in a second feature matrix with greater global expressiveness. Node correlations are calculated for feature nodes in the second feature matrix. This calculation is based on a specific similarity function or attention mechanism. By analyzing the relationships and importance distribution between feature nodes, an attention coefficient matrix is generated, clarifying the importance and relevance of different feature nodes in the overall feature space. The attention coefficient matrix is then used to perform weighted fusion on the second feature matrix to integrate multiple feature information. Weighted fusion assigns different weights to each feature node, retaining features with high relevance and importance, resulting in a third feature matrix. Node correlations are calculated for feature nodes in the third feature matrix. This calculation method relies on an optimized attention mechanism to generate node importance scores. Based on these node importance scores, feature nodes are screened and combined, retaining nodes with higher importance scores to reduce interference from redundant features. This screening process forms a set of candidate feature combinations. These candidate feature combinations are then classified into three categories: subject features, relationship features, and object features. Subject features represent the core visual elements in an image, relationship features describe the relationship between the subject and the background or other elements, and object features represent background information or auxiliary elements. Based on the classification results, candidate features are classified and combined using deep learning classification models or manually designed rules to ultimately form a complete visual feature triple combination.
[0028] S2, performs multi-head attention encoding and similarity calculation on the combination of visual feature triplets to obtain an element vector group;
[0029] Specifically, the initial S-BERT model is expanded into a target S-BERT model by adding a visual feature encoding layer with eight attention heads and a 512-dimensional hidden layer. Triplet combinations of visual features are input into the target S-BERT model. A set of 512×512 linear projection matrices are used to map the input features into a new feature space, resulting in a 1024-dimensional initial feature vector. This transformation enhances the expressive power of the features through linear projection and constructs a high-dimensional feature representation, the initial feature vector, based on this initial mapping. A query-key-value decomposition is performed on the initial feature vector using three independent 512×1024 linear transformation matrices to generate query, key, and value features. Query features represent the model's focus on important information in the input features, key features define relationships between features, and value features preserve the raw information of the input features for subsequent weighted computation. This decomposition mechanism is the core attention computation method in the Transformer and effectively captures the correlation between features. The attention distribution matrix is generated by performing a dot product operation on the query and key features and applying a scaling factor to the result to normalize the denominator. The dot product is used to calculate the similarity between two feature vectors, capturing the strength of the correlation between features. Scaling is also used to prevent gradient explosion and numerical instability in high-dimensional computations. The resulting attention distribution matrix directly reflects the relative importance of query features and key features. To process the attention distribution matrix, probabilistic normalization is applied to convert the values in the matrix into attention weight coefficients. These weight coefficients are normalized probability distributions, ensuring that the relative relationships between features can be quantified. Using these weight coefficients, a weighted combination of the value features is performed to aggregate the information most relevant to each query feature. Since the target S-BERT model contains eight attention heads, this operation is performed independently for each attention head, ensuring that the model can capture the diversity of input features from multiple perspectives. The output features of each attention head are concatenated into a unified multi-head feature representation. The multi-head feature representation is then subjected to dimensionality reduction using a 4096×1024-dimensional linear layer. This dimensionality reduction compresses the multi-head features into a more compact space through linear projection while preserving key information content. Layer Normalization is used for feature normalization. Layer Normalization effectively reduces the deviation problem between features by normalizing the features, improves the robustness of features and the convergence speed of model training, and finally generates an element vector group.
[0030] S3, the visual feature triple combination and element vector group are input into the dual encoding framework for bidirectional attention fusion to obtain a multimodal feature group;
[0031] It should be noted that the visual feature triples are input into the feature encoder of the dual-encoding framework, while the element vectors are also input into the element encoder of the dual-encoding framework. The feature encoder and element encoder each consist of a six-layer stack of Transformer encoders. This design allows for efficient feature extraction from both inputs in independent encoding paths. The feature encoder extracts global and local information from the visual feature triples, capturing hierarchical relationships within the features through a multi-head attention mechanism. It also embeds and serializes the multimodal input data for subsequent processing. The element encoder performs a similar process on the element vectors, modeling the interactions between elements through the Transformer self-attention mechanism, generating an element-encoded output with a high-dimensional embedding representation. The feature encoding output is linearly transformed and mapped to a new feature space, resulting in a feature query matrix. Similarly, the element encoding output is linearly transformed to generate an element-key-value matrix. This linear transformation operation maps the original output features to a feature space of the same dimensionality using a weight matrix, ensuring that the two matrices are matched and fused during subsequent interactions. The feature query matrix represents the query relationship, while the element-key-value matrix stores both key and value information to support subsequent attention computation. A matrix multiplication operation is performed on the feature query matrix and the element key matrix to calculate the cross-attention distribution. The cross-attention distribution captures the similarity between the feature query and the element key through a dot product operation and reflects the correlation structure between the two features at the matrix level. To optimize the attention calculation results, an activation function, such as softmax, is applied to the cross-attention distribution to convert the original cross-attention distribution into a probability distribution and generate cross-attention weights. These attention weights are then weighted summed over the element key matrix to obtain a cross-feature representation. The cross-feature representation is then input into eight self-attention layers. Each self-attention layer uses a multi-head attention mechanism to explore the internal relationships between features while enhancing the expressive power of features through layer-by-layer modeling. After eight layers of self-attention processing, self-attention features are generated. Self-attention features adaptively integrate high-level semantic information from visual features and element features to improve their discriminative power. The self-attention features are then subjected to dimensionality conversion and feature normalization. Linear projection is used to embed high-dimensional features into a low-dimensional space, reducing computational overhead while preserving key information. Feature normalization uses the Layer Normalization method to eliminate deviations between feature dimensions, improving feature stability and model convergence efficiency. After processing, a feature mapping matrix is obtained. This feature mapping matrix is then superimposed on the cross-feature representation using residual connections. Residual connections fuse the initial cross-feature representation with the multi-layer refined feature mapping matrix through direct summation, ensuring that original information is not lost in deep networks while introducing the richness of nonlinear changes.To avoid overfitting and improve the model's generalization, a dropout mechanism is introduced after feature stacking to randomly discard features. This mechanism temporarily blocks some features during each training session, prompting the model to learn more robust feature representations. The above steps ultimately generate a multimodal feature set.
[0032] S4, performing depth-wise separable convolution processing and feature separation on the multimodal feature group to obtain the target feature group;
[0033] Specifically, the multimodal feature group is input into the first Ghost module, which features a lightweight design and efficient feature extraction capabilities. Within the first Ghost module, a 3×3 depthwise separable convolution is used to extract the main branch features of the multimodal feature group, generating a main branch feature map. Depthwise separable convolution significantly reduces computational effort by decomposing traditional convolution into depthwise and pointwise convolutions, while preserving the integrity of feature representation. While the main branch is extracting features, the auxiliary branch of the Ghost module performs specialized sparse feature extraction on the multimodal feature group to generate a Ghost feature map. The Ghost feature map further compresses the feature representation through operations based on weight sharing and feature sparsity, enabling the model to efficiently learn latent information. After feature extraction from the main and auxiliary branches, the main branch feature map is input into the TSM module for temporal feature shifting. The TSM module generates a temporal shifted feature map by shifting 1 / 4 of the channel features forward by one time step, 1 / 4 of the channel features backward by one time step, and the remaining channel features unchanged. Through temporal shifting, the TSM module captures dynamic relationships between features. The temporal shift feature map is concatenated with the Ghost feature map to complete the feature output of the first Ghost module. This feature concatenation integrates the features extracted by the main and auxiliary branches, preserving the correlation between global and local features while enhancing the diversity and expressiveness of the features. The output features of the first Ghost module are sequentially passed to the second through fifth Ghost modules, each of which uses the same feature extraction architecture. These modules further process the input features through depthwise separable convolution and temporal shifting, generating the output features of the five Ghost modules. As the network progresses, the feature extraction capability of each module gradually increases, while providing a more refined decomposition and representation of the input features. After obtaining the output features of the five Ghost modules, these features are integrated at multiple scales through cross-layer feature fusion. By aligning and combining features at different levels, cross-layer feature fusion effectively captures information at different scales, resulting in a richer and more comprehensive feature representation. The fused multi-scale features are then input into the Feature Pyramid Network (FPN), completing the top-down feature transfer and lateral connection. The FPN achieves multi-scale feature fusion by progressively transferring high-level semantic information downward while combining feature representations at different scales. The features output by the FPN are represented as lightweight feature representations. The lightweight feature representations are separated into target and non-target features using a feature decoupling self-knowledge distillation network. The self-knowledge distillation network is a technique that transfers knowledge within the model itself, improving the model's learning capabilities while decoupling features. During the decoupling process, the network separates the lightweight feature representations into target and non-target features.Target features represent the key visual elements and semantic information of an ad creative, while non-target features represent background or auxiliary information. By decoupling, the model can focus more on generating the core elements required for ad creative, ultimately obtaining the target feature set.
[0034] The lightweight feature representation is input into the teacher network for feature extraction. As a high-performance model, the teacher network generates a feature map with rich semantic information and high resolution, namely the teacher feature map. The teacher feature map is then input into the feature decoupling module to decompose the target and non-target features. The feature decoupling module consists of three 1×1 convolutional layers and a channel-wise attention layer. The 1×1 convolutional layers reduce computational complexity and enhance the local expressiveness of features while preserving important relationships between channels. The channel-wise attention layer assigns weights to each channel in the feature map, enhancing the expressiveness of the target features and suppressing interference from non-target features. The output of this module separates the target features from the non-target features, representing the key visual elements of the ad creative and non-critical background or auxiliary information, respectively. The target features are measured using a target feature loss function to quantify the difference between the target features and the expected features. This target feature loss function uses a weighted combination of a cross-entropy loss and an L2 regularization term. The cross-entropy loss measures the performance of the target features in the classification task, while the L2 regularization term constrains the parameters of the target features to prevent overfitting. Non-target features are also measured using a non-target feature loss function, which combines a mean squared error (MSE) loss and an L1 regularization term. The MSE loss evaluates the reconstruction error of non-target features, while the L1 regularization term constrains the sparsity of non-target features, ensuring they do not interfere with target features during generation. To achieve efficient knowledge transfer, the lightweight feature representation is input into the student network for feature extraction. The student network serves as an optimization model, aiming to improve its own performance by mimicking the behavior of the teacher network. By applying a knowledge distillation loss function to the student feature graph, feature transfer from the teacher network to the student network is effectively achieved. The knowledge distillation loss function combines the Kullback-Leibler divergence to measure the difference between the teacher and student feature distributions, while the temperature coefficient enhances knowledge transfer by adjusting the smoothness of the distributions. The target feature loss, non-target feature loss, and knowledge distillation loss are weighted together to produce a total loss value, L. The student network's parameters are iteratively updated and optimized by comprehensively considering the accuracy of target features, the separability of non-target features, and the student network's effectiveness in learning the knowledge of the teacher network. During the optimization process, a gradient descent algorithm is used to minimize the total loss, gradually adjusting the student network's parameters to more closely match the teacher network's characteristic representation while achieving higher efficiency. Through the collaborative training of the teacher and student networks, combined with the efficient separation capabilities of the feature decoupling module and the joint optimization of multiple loss functions, the target feature set is ultimately generated.
[0035] S5, based on the local linear embedding algorithm, performs neighborhood screening and reconstruction calculations on the target feature group to generate advertising creative visual elements.
[0036] Cosine similarity is calculated for each eigenvector in the target feature set to quantify the similarity between eigenvectors and construct a feature distance matrix. Cosine similarity, by calculating the cosine of the angle between vectors, effectively reflects the relative relationship between feature points in high-dimensional space. Based on the generated feature distance matrix, a K-nearest neighbor search is performed for each feature point. The K closest feature points are selected to form an optimal neighborhood set, ensuring that the selected neighborhood accurately represents the local structure of the feature point. The feature points in the optimal neighborhood set are spatially centered. By subtracting the center coordinate of each feature point, the global offset in the feature distribution is eliminated, resulting in a centered feature matrix. Singular value decomposition is performed on the centered feature matrix to produce a local geometric structure matrix. Singular value decomposition extracts the main eigenmodes of the centered feature matrix, revealing the geometric distribution characteristics of the feature points in the local space. Based on the local geometric structure matrix, a reconstruction weight optimization objective function is constructed to determine the reconstruction weights of the feature points. This objective function maintains the local structure of the feature points, namely, by linearly combining the neighboring feature points to approximate the original feature points. To optimize this objective function, the Lagrange multiplier method is introduced to solve for the reconstruction weights and obtain a reconstruction weight matrix. The Lagrange multiplier method optimizes under constraints, ensuring that the reconstruction weights for each feature point both conform to the linear relationship of neighborhood features and satisfy the constraint that the weights sum to 1, ensuring good geometric consistency of the optimization results. The reconstruction weight matrix is multiplied by the target feature set to generate a low-dimensional feature representation. This low-dimensional feature representation is achieved using a locally linear embedding method, compressing the original high-dimensional features into a low-dimensional space while maintaining the local geometric relationships of the original features. Feature classification is performed on the low-dimensional feature representation to determine the visual element category label corresponding to each feature. The classification process combines support vector machines, decision trees, or deep learning models to assign labels to low-dimensional features based on the annotated categories in the training data, ensuring that the generated features have clear semantic meaning. Based on the visual element category labels, the low-dimensional feature representation is reorganized, reorganizing features of different categories into a new representation based on their category information. To convert the low-dimensional feature representation back to the original feature space, the generator module of a generative adversarial network is introduced. By learning the distribution of the original feature space, the generative adversarial network generator can map low-dimensional features back to high-dimensional feature representations consistent with the target feature set. The generator network is trained based on the distribution differences between real and generated features, ensuring that the generated features not only preserve the local structure of the target feature set but also maintain semantic consistency with the original data. Through this process of feature classification, recombination, and generation, the creative visual elements of the advertisement are obtained.
[0037] In one example, feature extraction and feature fusion are performed on advertising design materials to obtain a visual feature triple combination, including:
[0038] Adjust the pixel size of the advertising design material to obtain an RGB three-channel image, and extract color distribution, texture features, and edge features from the RGB three-channel image to obtain a first feature matrix;
[0039] Perform forward feature transfer and backward feature transfer on the first feature matrix to obtain a second feature matrix, and calculate the node correlation degree of the feature nodes in the second feature matrix to obtain an attention coefficient matrix;
[0040] The second feature matrix is weighted and fused based on the attention coefficient matrix to obtain the third feature matrix, and the correlation degree of the feature nodes in the third feature matrix is calculated to obtain the node importance score;
[0041] Feature nodes are screened and combined according to the node importance scores to obtain a candidate feature combination set, and the candidate feature combination set is classified and combined into subject features, relationship features and object features to obtain a visual feature triple combination.
[0042] In this example, the advertising design materials are pre-processed and the input material images are adjusted to a uniform pixel size, for example Assume that the original image size is , pixel size adjustment uses bilinear interpolation algorithm, through the formula Completed, including Represents the adjusted pixel value, is the original pixel value, is the interpolation weight. The adjusted image is unified into RGB three-channel representation, and each pixel is represented by The three values define the basis of the input features. Various feature extraction operations are performed on the adjusted RGB image to generate the first feature matrix The color distribution feature is calculated by calculating the histogram of RGB channels Extract, where For the The frequency of the color value, is the total number of pixels, is the Kronecker function. Texture features are extracted using the gray level co-occurrence matrix (GLCM) to calculate the gray level co-occurrence relationship between each pair of pixels. Assume that the gray level is , co-occurrence matrix The elements are defined as count ,in Represents the grayscale value of the pixel pair. For edge features, the Canny algorithm is used to calculate the gradient amplitude and direction ,in and The horizontal and vertical gradients calculated by the Sobel operator. After combining the above features, we can form , each element of which Represents pixels Multidimensional features. For the first feature matrix Perform forward feature transfer and backward feature transfer to generate the second feature matrix The forward feature transfer is achieved through convolution operation, using the formula ,in represents the convolution kernel weight, is the bias. The backward feature transfer adjusts the weight through the back propagation mechanism and bias , to enhance the significant information in the features. Calculate node correlation and construct attention coefficient matrix The attention coefficient is obtained by measuring the similarity of feature points, using the dot product attention mechanism, and the formula is ,in and query and key features respectively is the feature dimension, is the number of nodes. Used for Perform weighted fusion to generate the third feature matrix , the formula is .right The importance score of each node is calculated. Based on the weighted average attention weight calculation, the formula is ,in is the node connection weight. Filter the feature nodes according to the node importance score and select Nodes above the threshold form a candidate feature combination set. The candidate feature set is classified and combined into subject features, relationship features, and object features. Subject features represent the main visual elements of the image, such as the product or logo in the advertisement; relationship features describe the relative position or interaction between the subject and other elements, such as the contrast between the product and the background; object features include the characteristics of the background and auxiliary elements. Through the above process, a visual feature triple combination is finally formed. ,in represents the subject feature matrix, is the relationship feature matrix, is the object feature matrix.
[0043] In one example, multi-head attention encoding and similarity calculation are performed on the combination of visual feature triplets to obtain an element vector group, including:
[0044] Add 8 attention heads and a 512-dimensional hidden layer visual feature encoding layer to the initial S-BERT model to obtain the target S-BERT model;
[0045] The visual feature triples are combined and input into the target S-BERT model, and the feature space is mapped through a 512×512 linear projection matrix to obtain an initial 1024-dimensional feature vector.
[0046] Perform Query-Key-Value decomposition on the initial feature vector through three independent 512×1024-dimensional linear transformation matrices to obtain query features, key features, and value features;
[0047] Perform dot product operation on query features and key features, and normalize the denominator by the scaling factor to obtain the attention distribution matrix;
[0048] The attention distribution matrix is probability normalized to obtain the attention weight coefficient. The value features are weighted combined based on the attention weight coefficient, and the output features of the 8 attention heads are spliced to obtain the multi-head feature.
[0049] The multi-head features are reduced in dimensionality through a 4096×1024-dimensional linear layer, and Layer Normalization is used to normalize the features to obtain an element vector group.
[0050] In this example, a visual feature encoding layer is introduced into the initial S-BERT model. This layer contains 8 attention heads and a 512-dimensional hidden layer. Its purpose is to extend the feature processing capabilities of the model to multimodal data, especially the field of visual features. The addition of attention heads allows the model to focus on different feature patterns at the same time, while the 512-dimensional design of the hidden layer balances computational complexity and expression power to form the target S-BERT model. After the model expansion is completed, the combination of visual feature triplets is passed as input data to the target S-BERT model. This combination includes subject features, relationship features, and object features, each of which contains multidimensional feature descriptions, forming a high-dimensional data set. The model maps the input features through a 512×512-dimensional linear projection matrix, and the formula is ,in is the projected eigenvector, is the projection weight matrix, are input features, is the bias term. After this projection operation, the feature space is transformed from the original dimension into an initial feature vector of 1024 dimensions, which enhances the feature representation capability and provides a unified input format for the processing of the multi-head attention mechanism. dimensional linear transformation matrix, decomposing the initial feature vector into query features ( ), key features( ) and value characteristics This step defines how to model the relationships between features, where ,in 、 、 are the weights of the linear transformation matrix respectively. The query feature is used to characterize the importance of the target feature, the key feature represents the relative relationship between the features, and the value feature carries the information of the original feature. After the feature decomposition is completed, the attention distribution matrix is calculated by performing a dot product operation on the query feature and the key feature. The formula is: ,in represents the attention distribution matrix, is the dimension of the key feature. The dot product operation reflects the similarity between the query and the key, and the scaling factor It is used to prevent high-dimensional dot product values from being too large and affecting gradient stability. The attention distribution matrix is subjected to probability normalization operation, using the Softmax function, and the formula is: ,in For the Rank The attention weights of the columns, is the number of key features. This normalization step converts the attention distribution into a probability distribution so that the sum of the weights of each row is 1. The value features are weighted and combined using the attention weight coefficient, as follows: ,in is the weighted feature representation. Each attention head completes this process independently, and the output features of 8 attention heads are obtained. These output features are combined into multi-head features through splicing operations, and the formula is ,in is the concatenated multi-head feature, which integrates the different pattern information captured by multiple attention heads. To optimize the feature representation and reduce the dimension, the multi-head feature is reduced by a 4096×1024-dimensional linear layer. The formula is ,in is the feature representation after dimensionality reduction, and are the weight and bias of the dimensionality reduction layer respectively. Layer Normalization is used for normalization, and the formula is ,in and are the mean and variance of the features, and are trainable scale and offset parameters, is a smoothing term to prevent division by zero. After normalization, the element vector group is finally obtained as a high-quality expression of visual features.
[0051] In one example, the visual feature triple combination and the element vector group are input into the dual encoding framework for bidirectional attention fusion to obtain a multimodal feature group including:
[0052] The visual feature triples are input into the feature encoder in the dual encoding framework for six-layer Transformer encoding to obtain feature encoding output. At the same time, the element vector group is input into the element encoder in the dual encoding framework for six-layer Transformer encoding to obtain element encoding output.
[0053] Perform a linear transformation on the feature encoding output to obtain the feature query matrix. At the same time, perform a linear transformation on the element encoding output to obtain the element key value matrix.
[0054] Perform matrix multiplication on the feature query matrix and the element key value matrix to obtain the cross attention distribution, activate the cross attention distribution to obtain the cross attention weight, and perform weighted summation on the element key value matrix based on the cross attention weight to obtain the cross feature representation;
[0055] The cross feature representation is refined through eight self-attention layers to obtain self-attention features, and the self-attention features are dimensionally transformed and normalized to obtain a feature mapping matrix.
[0056] The feature mapping matrix is superimposed with the cross-feature representation through residual connection, and the features are randomly discarded through the dropout mechanism to obtain a multimodal feature group.
[0057] In this example, the visual feature triples are input into the feature encoder in the dual encoding framework. The visual feature triples include subject features (such as the core elements of the advertisement), relation features (such as the relative layout between visual elements), and object features (such as background information). These features are converted into high-dimensional feature vectors through embedding operations and represented as matrices. ,in is the number of eigenvectors, is the dimension of each vector. The feature encoder is composed of six layers of Transformer encoders. Each Transformer layer includes a multi-head attention mechanism and a feedforward neural network module. In each layer of Transformer encoder, the multi-head attention captures the global relationship between the input features through the query, key, and value mechanism. The formula is:
[0058] ;
[0059] in, 、 、 is a learnable weight matrix, is the dimension of each attention head. Through six layers of stacking, the feature encoder generates feature encoding output At the same time, the element vector group Input the element encoder in the dual encoding framework. The element vector group represents the characteristics of the individual elements in the advertisement, such as font, icon or color information, and is also processed by the six-layer Transformer encoder to generate the element encoding output. The feature encoder and element encoder share similar architectures, but are optimized for visual features and element features respectively. Perform linear transformation to generate feature query matrix ,in is the transformation weight of the query feature. Similarly, the element encoding output Perform linear transformation to generate key-value matrix and in are the transformation weights of key and value features respectively. With element key features Perform matrix multiplication to obtain cross attention distribution :
[0060] ;
[0061] in Represents the attention distribution between features and elements. According to the cross attention weight Element-valued matrix Perform weighted summation to generate cross-feature representation :
[0062] ;
[0063] in It is a representation that combines visual features and element features. Input eight layers of self-attention module. The self-attention module is based on the internal relationship of the input features and captures local and global information through a similar attention mechanism, thereby strengthening the feature representation. After eight layers of refinement, self-attention features are generated. . For self-attention features Perform dimension transformation and feature normalization. Dimension transformation is achieved through linear projection, and the formula is:
[0064] ;
[0065] in is the transformed feature representation, and are weights and biases. Normalization adopts Layer Normalization, and the formula is:
[0066] ;
[0067] wherein and are the mean and variance of the features, and are learnable parameters. In order to fuse the self-attention feature and the cross feature representation, the feature mapping matrix is superimposed with through a residual connection:
[0068] ;
[0069] In order to enhance the generalization ability of the model, the Dropout mechanism is used to randomly discard a part of the features, and the features are set to zero to prevent overfitting. The final output multi-modal feature group contains the deep fusion representation of the visual feature triplets and the element vector group.
[0070] In one example, the multi-modal feature group is processed by deep separable convolution and feature separation to obtain a target feature group, including:
[0071] The multi-modal feature group is input into the first Ghost module, and the multi-modal feature group is extracted by 3x3 deep separable convolution to obtain the main branch feature map, and the multi-modal feature group is extracted by the auxiliary branch to obtain the Ghost feature map;
[0072] The main branch feature map is input into the TSM module for time sequence feature displacement, and the TSM module displaces 1 / 4 of the channel features forward by one time step and 1 / 4 of the channel features backward by one time step, and the remaining channel features remain unchanged to obtain the time sequence displacement feature map;
[0073] The time sequence displacement feature map and the Ghost feature map are spliced to obtain the output feature of the first Ghost module;
[0074] The output feature of the first Ghost module is input into the second Ghost module to the fifth Ghost module in turn, and each Ghost module adopts the same feature extraction structure, and the features are processed by deep separable convolution and time sequence displacement operation to finally obtain the output features of the five Ghost modules;
[0075] The output features of the five Ghost modules are cross-layer feature fused to obtain multi-scale features, and the multi-scale features are input into the feature pyramid network, and the features are fused by top-down feature transmission and horizontal feature connection to obtain a lightweight feature representation.
[0076] The target features and non-target features of the lightweight feature representation are separated through the feature decoupling self-knowledge distillation network to obtain the target feature group.
[0077] In this example, the multimodal feature set Enter the first Ghost module, which consists of a main branch and an auxiliary branch. In the main branch, through a The depth-wise separable convolution operation extracts the main features of the input features, and its calculation formula is:
[0078] ;
[0079] DepthConv is a deep convolution operation that is performed on each channel separately. convolution, is the weight of the depth convolution, PointConv is the point convolution operation, through Convolution integrates channel information. is the weight of the point convolution. Depthwise separable convolution decouples the operations of spatial dimension and channel dimension, greatly reducing the amount of computation while extracting efficient main branch feature maps. In the auxiliary branch, Ghost feature maps are generated by sparse feature extraction , which is designed to approximate the main feature extraction process through a simple linear transformation. The calculation formula is:
[0080] ;
[0081] in It is the sparse transformation weight matrix of the auxiliary branch, which can efficiently generate redundant features and supplement the main branch features. The two branches of the first Ghost module output and . The main branch feature map Input the time series feature shift module (TSM) for time series processing. TSM simulates time dynamics by partially shifting the feature channel, which is defined as: The channel is shifted forward by one time step, and the other The channels are shifted back one time step, and the rest The channels remain unchanged. The mathematical expression of the bit shift operation is:
[0082] ;
[0083] in represents the time step, is the channel index, is the spatial position. Time series displacement feature map It captures the temporal dynamic information in multimodal features. Ghost feature map Perform the splicing operation to obtain the output features of the first Ghost module:
[0084] ;
[0085] The concatenation operation merges the two features along the channel dimension. The output features from the five Ghost modules are expressed as follows: In order to fuse multi-level feature information, the output features of the five Ghost modules are fused across layers. Cross-layer fusion is achieved through a feature pyramid network, which transmits high-level semantic information layer by layer from top to bottom, while integrating features of different scales through horizontal connections. The fusion calculation formula of the pyramid network is:
[0086] ;
[0087] in Represents the pyramid network Layer features, UpSample is the upsampling operation, Output features for the corresponding Ghost module. After feature pyramid fusion, the generated multi-scale features Contains rich spatial and semantic information. Multi-scale features The input features are decoupled from the knowledge distillation network to separate the target features from the non-target features. The teacher network generates high-quality target features. and non-target features , and use the knowledge distillation loss function to optimize the student network, the formula is:
[0088] ;
[0089] in and are the losses of target features and non-target features respectively, using cross entropy loss and mean square error loss, is the weight factor. After the optimization is completed, the output target feature group These are the core visual elements required for advertising creativity.
[0090] In one example, the lightweight feature representation is separated into target features and non-target features through feature decoupling from the knowledge distillation network, and the target feature group is obtained, including:
[0091] The lightweight feature representation is input into the teacher network for feature extraction to obtain the teacher feature map, and the teacher feature map is input into the feature decoupling module for target feature and non-target feature decomposition. The feature decoupling module contains three 1×1 convolutional layers and a channel attention layer to obtain target features and non-target features;
[0092] The target feature is measured by the target feature loss function to obtain the target feature loss value. The target feature loss function adopts a weighted combination of cross entropy loss and L2 regularization term.
[0093] The non-target features are measured by the non-target feature loss function to obtain the non-target feature loss value. The non-target feature loss function adopts a weighted combination of mean square error loss and L1 regularization term;
[0094] The lightweight feature representation is input into the student network for feature extraction to obtain the student feature graph, and the feature transfer of the student feature graph is measured by the knowledge distillation loss function to obtain the knowledge distillation loss value. The knowledge distillation loss function adopts the combination of Kullback-Leibler divergence and temperature coefficient.
[0095] The target feature loss value, non-target feature loss value and knowledge distillation loss value are weightedly combined to obtain the total loss value, and the student network parameters are optimized according to the total loss value L to obtain the target feature group.
[0096] In this example, the lightweight feature is represented by Input into the teacher network. As a high-performance model, the teacher network has stronger feature extraction capabilities and can Perform deep feature processing to generate teacher feature maps . The teacher characteristic map Input feature decoupling module, the design of this module includes three Convolutional layer and a channel attention layer. Each The convolution layer reduces the computational complexity by performing channel-by-channel convolution operations while extracting the local relationship of features. Its mathematical expression is:
[0097] ;
[0098] in It is The convolution weights of the layer, For the Layer input features, is the bias term, Is the convolution output. The feature map generated by the three-layer convolution operation It is then passed to the channel attention layer, which enhances the importance of the target feature by calculating the weight distribution of the feature channel. The channel attention mechanism formula is:
[0099] ;
[0100] in is the channel weight, is the weight matrix of the two-layer fully connected network, Represents the sigmoid function, which is used to generate normalized weights. , target features and non-target features Separated out:
[0101] ;
[0102] in Represents element-by-element multiplication. The target feature loss function is used to calculate the target feature. The target feature loss function combines the cross entropy loss and the L2 regularization term, and its formula is:
[0103] ;
[0104] in is the true label, is the predicted probability, is the sample size, is the weight associated with the target feature, is the regularization coefficient. The cross entropy term measures classification accuracy, and the L2 regularization term prevents overfitting. At the same time, non-target features are measured by mean square error loss and L1 regularization term. The non-target feature loss function formula is:
[0105] ;
[0106] in is the reference non-target feature, is the L1 regularization coefficient, and the L1 term is used to sparse non-target features. At the same time, the lightweight feature is represented as Input the student network, which is used as a lightweight model for performance optimization to generate a student feature map Through the knowledge distillation loss function and For feature transfer measurement, the knowledge distillation loss formula is:
[0107] ;
[0108] in is the temperature coefficient, KL is the Kullback-Leibler divergence, is the Softmax function. The temperature coefficient enhances the stability of feature matching by smoothing the probability distribution. , non-target feature loss value and knowledge distillation loss Weighted combination to get the total loss value :
[0109] ;
[0110] in Is the weighting coefficient. Using the total loss value Perform back propagation optimization on the student network, gradually adjust the parameters, and finally generate the target feature set .
[0111] In one example, neighborhood screening and reconstruction calculations are performed on the target feature group based on a local linear embedding algorithm to generate advertising creative visual elements, including:
[0112] Calculate the cosine similarity of the feature vectors in the target feature group to obtain the feature distance matrix, and perform a K-nearest neighbor search on each feature point based on the feature distance matrix to obtain the optimal neighborhood set;
[0113] The feature points in the optimal neighborhood set are centralized in spatial coordinates to obtain a centralized feature matrix, and the centralized feature matrix is subjected to singular value decomposition to obtain a local geometric structure matrix;
[0114] Based on the local geometric structure matrix, a reconstruction weight optimization objective function is constructed, and the weight coefficient of the reconstruction weight optimization objective function is solved by the Lagrange multiplier method to obtain the reconstruction weight matrix;
[0115] Perform matrix multiplication on the reconstructed weight matrix and the target feature group to obtain a low-dimensional feature representation, and perform feature classification on the low-dimensional feature representation to obtain the visual element category label;
[0116] The low-dimensional feature representation is reorganized according to the visual element category label, and the low-dimensional feature representation is reconstructed into the original feature space through the generator of the generative adversarial network to obtain the creative visual elements of the advertisement.
[0117] In this example, the cosine similarity is calculated for the feature vectors in the target feature group to generate a feature distance matrix. ,in is the number of feature points in the target feature group. The cosine similarity calculation formula is:
[0118] ;
[0119] By calculating the similarity between all feature vectors, we can get the feature distance matrix ,in Representing feature points and The relative distance of , for each feature point conduct Neighbor search, by selecting The smallest distance feature points form the optimal neighborhood set After obtaining the optimal neighborhood set, the feature points in each neighborhood set are centralized in spatial coordinates to remove the global offset in the feature point distribution. The centralization formula is:
[0120] ;
[0121] in is the centralized feature point, Is the characteristic mean of the neighborhood set. The centralized feature points are formed into a matrix , and perform singular value decomposition on it, the decomposition formula is:
[0122] ;
[0123] in and is an orthogonal matrix, is a diagonal matrix containing the singular values of the centered eigenvalue matrix. Matrix represents the local geometric structure matrix of feature points , which captures the main direction of the feature point distribution. Based on the local geometric structure matrix , construct the reconstruction weight optimization objective function to keep the local linear relationship of the feature points unchanged. The objective function formula is:
[0124] ;
[0125] in is the reconstruction weight matrix, is a feature point and its neighboring points The weight of . To optimize the objective function , the Lagrange multiplier method is introduced to integrate the constraints into part of the objective function, and the optimization formula is:
[0126] ;
[0127] right Find the partial derivative and set it to 0 to get the optimal solution , as the reconstruction weight matrix. The reconstruction weight matrix With target feature group Perform matrix multiplication to generate low-dimensional feature representation :
[0128]
[0129] in , represents the feature dimension after dimensionality reduction. Classify and generate visual element category labels , where each label Representing feature points The classification operation is completed based on support vector machines or deep learning classifiers. According to the visual element category label, the low-dimensional feature representation is reorganized and the features of the same category are merged into a new feature representation. The low-dimensional feature representation is reorganized by the generator of the Generative Adversarial Network (GAN). Reconstruct back to the original feature space to generate the creative visual elements of the advertisement. The GAN generator learns the mapping from low-dimensional space to high-dimensional feature space, and its reconstruction formula is:
[0130] ;
[0131] in is the generator network, It is the reconstructed high-dimensional feature representation. Through adversarial training, the generator can generate advertising creative visual elements that are similar to the original features but contain category information.
[0132] Reference Figure 2 This embodiment provides an intelligent device for generating creative visual elements for advertisements, including:
[0133] Feature extraction module 1, used to extract and fuse features of the advertising design material to obtain a triple combination of visual features;
[0134] Computation module 2 is used to perform multi-head attention encoding and similarity calculation on the combination of visual feature triplets to obtain an element vector group;
[0135] Attention fusion module 3 is used to input the visual feature triple combination and the element vector group into the dual encoding framework for bidirectional attention fusion to obtain a multimodal feature group;
[0136] Feature separation module 4, used to perform depth-separable convolution processing and feature separation on the multimodal feature group to obtain a target feature group;
[0137] The generation module 5 is used to perform neighborhood screening and reconstruction calculation on the target feature group based on the local linear embedding algorithm to generate advertising creative visual elements.
[0138] In this embodiment, for the specific implementation of each unit in the above device embodiment, please refer to the above method embodiment, which will not be repeated here.
[0139] Reference Figure 3 In an embodiment of the present invention, a computer device is also provided. The computer device may be a server, and its internal structure may be as follows: Figure 3 As shown. The computer device includes a processor, memory, display screen, input device, network interface and database connected via a system bus. The processor of the computer design is used to provide computing and control capabilities. The memory of the computer device 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 computer program in the non-volatile storage medium. The database of the computer device is used to store the corresponding data in this embodiment. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above method is implemented.
[0140] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device to which the solution of the present invention is applied.
[0141] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which implements the above-described method when executed by a processor. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0142] Those skilled in the art will appreciate that all or part of the processes in the above-described method embodiments can be implemented by instructing the relevant hardware using a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the above-described method embodiments. Any reference to memory, storage, database, or other media provided herein 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 various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct RAMbus dynamic RAM (DRDRAM), and RAMbus dynamic RAM.
[0143] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.
[0144] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for intelligently generating creative visual elements for advertising, characterized in that: The following steps are involved: Perform feature extraction and feature fusion on advertising design materials to obtain a triple combination of visual features; Performing multi-head attention encoding and similarity calculation on the visual feature triple combination to obtain an element vector group; The visual feature triple combination and the element vector group are input into a dual coding framework for bidirectional attention fusion to obtain a multimodal feature group; specifically comprising: inputting the visual feature triple combination into a feature encoder in a dual coding framework for six-layer Transformer encoding to obtain a feature encoding output, and at the same time, inputting the element vector group into an element encoder in the dual coding framework for six-layer Transformer encoding to obtain an element encoding output; performing a linear transformation on the feature encoding output to obtain a feature query matrix, and at the same time, performing a linear transformation on the element encoding output to obtain an element key-value matrix; the feature query The matrix is multiplied with the element key value matrix to obtain a cross attention distribution, and the cross attention distribution is activated to obtain a cross attention weight. The element key value matrix is weighted summed based on the cross attention weight to obtain a cross feature representation; the cross feature representation is feature refined through eight self-attention layers to obtain self-attention features, and the self-attention features are dimensionally transformed and feature normalized to obtain a feature mapping matrix; the feature mapping matrix is superimposed with the cross feature representation through a residual connection, and features are randomly discarded through a dropout mechanism to obtain a multimodal feature group; The multimodal feature group is subjected to depthwise separable convolution processing and feature separation to obtain a target feature group; specifically comprising: inputting the multimodal feature group into a first Ghost module, performing main branch feature extraction on the multimodal feature group through 3×3 depthwise separable convolution to obtain a main branch feature map, and performing auxiliary branch feature extraction on the multimodal feature group to obtain a Ghost feature map; inputting the main branch feature map into a TSM module for temporal feature shifting, wherein the TSM module shifts 1 / 4 of the channel features forward by one time step, and shifts 1 / 4 of the channel features backward by one time step, while the remaining channel features remain unchanged, to obtain a temporal shift feature map; and performing feature splicing on the temporal shift feature map and the Ghost feature map. Obtain the output features of the first Ghost module; input the output features of the first Ghost module into the second Ghost module to the fifth Ghost module in sequence, each Ghost module adopts the same feature extraction structure, and performs feature processing through depth-separable convolution and temporal shift operations, and finally obtains the output features of five Ghost modules; perform cross-layer feature fusion on the output features of the five Ghost modules to obtain multi-scale features, and input the multi-scale features into the feature pyramid network, perform feature fusion through top-down feature transfer and lateral feature connection to obtain a lightweight feature representation; separate the target features and non-target features of the lightweight feature representation through the feature decoupling self-knowledge distillation network to obtain a target feature group; Based on the local linear embedding algorithm, neighborhood screening and reconstruction calculation are performed on the target feature group to generate advertising creative visual elements.
2. The method for intelligently generating creative visual elements of advertising according to claim 1, characterized in that: The feature extraction and feature fusion of the advertising design material are performed to obtain a visual feature triple combination, including: Adjusting the pixel size of the advertising design material to obtain an RGB three-channel image, and extracting color distribution, texture features, and edge features from the RGB three-channel image to obtain a first feature matrix; Performing forward feature transfer and backward feature transfer on the first feature matrix to obtain a second feature matrix, and performing node correlation calculation on feature nodes in the second feature matrix to obtain an attention coefficient matrix; Performing weighted fusion on the second feature matrix based on the attention coefficient matrix to obtain a third feature matrix, and performing correlation calculation on feature nodes in the third feature matrix to obtain node importance scores; The feature nodes are screened and combined according to the node importance scores to obtain a candidate feature combination set, and the candidate feature combination set is classified and combined into subject features, relationship features and object features to obtain a visual feature triple combination.
3. The method for intelligently generating creative visual elements of advertising according to claim 2, characterized in that: The multi-head attention encoding and similarity calculation are performed on the visual feature triple combination to obtain an element vector group, including: Add 8 attention heads and a 512-dimensional hidden layer visual feature encoding layer to the initial S-BERT model to obtain the target S-BERT model; The visual feature triples are input into the target S-BERT model, and feature space mapping is performed through a 512×512 dimensional linear projection matrix to obtain a 1024-dimensional initial feature vector; Performing Query-Key-Value decomposition on the initial feature vector using three independent 512×1024-dimensional linear transformation matrices to obtain query features, key features, and value features; Performing a dot product operation on the query feature and the key feature, and normalizing the denominator by a scaling factor to obtain an attention distribution matrix; Probabilistically normalizing the attention distribution matrix to obtain an attention weight coefficient, weighting and combining the value features based on the attention weight coefficient, and concatenating the output features of the eight attention heads to obtain a multi-head feature; The multi-head features are reduced in dimension by a 4096×1024-dimensional linear layer, and are normalized by Layer Normalization to obtain an element vector group.
4. The method for intelligently generating creative visual elements of advertising according to claim 1, characterized in that: The lightweight feature representation is separated into target features and non-target features by the feature decoupling self-knowledge distillation network to obtain a target feature group, including: Inputting the lightweight feature representation into the teacher network for feature extraction to obtain a teacher feature map, and inputting the teacher feature map into the feature decoupling module for target feature and non-target feature decomposition, wherein the feature decoupling module includes three 1×1 convolutional layers and one channel attention layer to obtain target features and non-target features; The target feature is measured by a target feature loss function to obtain a target feature loss value, wherein the target feature loss function adopts a weighted combination of a cross entropy loss and an L2 regularization term; The non-target feature is measured by a non-target feature loss function to obtain a non-target feature loss value, wherein the non-target feature loss function adopts a weighted combination of mean square error loss and L1 regularization term; Inputting the lightweight feature representation into the student network for feature extraction to obtain a student feature graph, and performing feature transfer measurement on the student feature graph using a knowledge distillation loss function to obtain a knowledge distillation loss value, wherein the knowledge distillation loss function adopts a combination of Kullback-Leibler divergence and a temperature coefficient; The target feature loss value, the non-target feature loss value and the knowledge distillation loss value are weightedly combined to obtain a total loss value, and the student network is parameter optimized according to the total loss value L to obtain a target feature group.
5. The method for intelligently generating creative visual elements of advertisements according to claim 4, characterized in that: The method of performing neighborhood screening and reconstruction calculation on the target feature group based on the local linear embedding algorithm to generate the advertising creative visual elements includes: Calculating cosine similarity of the feature vectors in the target feature group to obtain a feature distance matrix, and performing a K-nearest neighbor search on each feature point according to the feature distance matrix to obtain an optimal neighborhood set; Performing spatial coordinate centering processing on the feature points in the optimal neighborhood set to obtain a centralized feature matrix, and performing singular value decomposition on the centralized feature matrix to obtain a local geometric structure matrix; Constructing a reconstruction weight optimization objective function based on the local geometric structure matrix, and solving the weight coefficient of the reconstruction weight optimization objective function by Lagrange multiplier method to obtain a reconstruction weight matrix; Performing a matrix multiplication operation on the reconstructed weight matrix and the target feature group to obtain a low-dimensional feature representation, and performing feature classification on the low-dimensional feature representation to obtain a visual element category label; The low-dimensional feature representation is reorganized according to the visual element category label, and the low-dimensional feature representation is reconstructed into the original feature space through a generator of a generative adversarial network to obtain an advertising creative visual element.
6. An intelligent device for generating creative visual elements for advertising, characterized in that: For implementing the steps of the method according to any one of claims 1 to 5, the apparatus comprises: Feature extraction module, used to extract and fuse features of advertising design materials to obtain a triple combination of visual features; A calculation module, configured to perform multi-head attention encoding and similarity calculation on the visual feature triple combination to obtain an element vector group; an attention fusion module, configured to input the visual feature triple combination and the element vector group into a dual encoding framework for bidirectional attention fusion to obtain a multimodal feature group; A feature separation module, configured to perform depth-separable convolution processing and feature separation on the multimodal feature group to obtain a target feature group; The generation module is used to perform neighborhood screening and reconstruction calculation on the target feature group based on a local linear embedding algorithm to generate advertising creative visual elements.
7. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: 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 having a computer program stored thereon, 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.
Citation Information
Patent Citations
Long-time sequence prediction method based on time domain decoupling enhancement
CN117972387A
Advertisement copywriting generation method based on multi-modal large model
CN118822629A