Advertisement picture batch generation method and device based on layer editing

By using a layer-based editing method to process and batch replace advertising images in layers, the problem of low efficiency in manual editing is solved, enabling the efficient generation of advertising images that meet the requirements and satisfying the needs of rapid iteration and large-scale deployment of internet advertising.

CN120912701BActive Publication Date: 2026-03-03GUANGZHOU DAYU DIGITAL TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511009325.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2026-03-03
Estimated Expiration
2045-07-22

AI Technical Summary

Technical Problem

Current technologies rely on manual editing for advertising image creation, which is inefficient, cannot quickly respond to the rapid iteration and large-scale deployment needs of internet advertising, and is prone to errors.

Method used

The system employs a layer-based editing approach to process input images in layers, constructing a layer tree. It receives user commands and rule parameters, and uses a layer editing system to achieve batch replacement and parallel rendering to generate advertising images.

Benefits of technology

It improves the efficiency of advertising image generation, meets the needs of rapid iteration and large-scale deployment of internet advertising, reduces human error, and ensures image quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912701B_ABST
    Figure CN120912701B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on layer editing's advertisement picture batch generation method and device, it is related to image processing technical field, the method includes: layered processing to input picture element generates the layer tree including identification, copy, background and foreground layer;Through visual interface, receive user instruction and edit layer data;Through rule configuration interface, receive parameter definition batch replacement rule and picture generation rule, the batch replacement rule includes text variable and picture material replacement logic, the picture generation rule includes format constraint, style rule and conflict checking rule;According to rule, preset material library variable data is mapped to the placeholder of edited layer data, generates target layer data;Based on picture generation rule, target data is rendered in parallel and is synthesized according to layer tree hierarchical relationship, obtains batch advertisement picture.The application greatly improves the generation speed of advertisement picture, solves the problem of low efficiency of manual editing advertisement material.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method and apparatus for batch generation of advertising images based on layer editing. Background Technology

[0002] In the realm of internet advertising, the creation of advertising creatives is a crucial step in the advertising delivery process. With the rapid development of internet advertising, advertisers need to quickly generate a large number of diverse and compliant advertising images for different channels, target audiences, and marketing campaigns. These images typically need to include elements such as brand logos, copy, background images, and foreground images (e.g., products, people), and must be personalized according to different scenarios. Therefore, the efficient and flexible generation of advertising images is essential to meeting the diverse needs of advertising delivery.

[0003] Currently, the creation of advertising images mainly relies on manual operation by optimization specialists. These specialists need to use image editing software (such as Photoshop) to edit each element of the image individually, including adjusting size, color, font, and font style, before batch generation. For example, when creating an advertising image, an optimization specialist needs to manually place the brand logo in the appropriate position, adjust the font and layout of the text, select a suitable background image, and place the product image in the foreground. For batch production of different versions of advertising images, optimization specialists need to repeat the above operations, modifying the content and style of each element one by one.

[0004] However, this method of manually editing images has significant limitations. First, manual operation is time-consuming, labor-intensive, and extremely inefficient. For example, creating 100 different versions of advertising images could take several hours, or even longer. Second, manual editing struggles to quickly respond to the time requirements of ad delivery, failing to meet the demands of rapid iteration and large-scale deployment in internet advertising. Furthermore, manual operation is prone to errors, such as typos in the text and misaligned elements, affecting the quality of the advertising images. Therefore, the low efficiency of manually editing advertising materials is a problem that urgently needs to be addressed. Summary of the Invention

[0005] The purpose of this application is to provide a method and apparatus for batch generation of advertising images based on layer editing, aiming to solve the technical problem of low efficiency in manual editing of advertising materials.

[0006] To achieve the above objectives, this application proposes a method for batch generation of advertising images based on layer editing, the method comprising:

[0007] The elements in the input image are processed into layers to obtain a layer tree that describes the layer hierarchy structure. The layer tree includes a label layer, a text layer, a background layer, and a foreground layer.

[0008] Receive user instructions input by the user through a visual editing interface, and edit at least one of the logo layer, the text layer, the background layer, and the foreground layer according to the user instructions to obtain the edited layer data;

[0009] The system receives rule parameters input by the user through the rule configuration interface, and defines batch replacement rules and raw image rules according to the rule parameters. The batch replacement rules include text variable replacement logic and image material replacement logic, and the raw image rules include format constraints, style rules and conflict detection rules.

[0010] Based on the batch replacement rules, the style rules, and the conflict verification rules, the variable data in the preset material library is mapped to the corresponding placeholders in the edited layer data to obtain the target layer data;

[0011] Based on the aforementioned image generation rules, the target layer data is rendered in parallel, and layer compositing is performed on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images.

[0012] In one embodiment, the step of performing layered processing on the elements in the input image to obtain a layer tree describing the layer hierarchy includes: identifying the brand logo area in the input image using an image recognition model based on a convolutional neural network, and assigning the brand logo area to a logo layer; performing text recognition and semantic analysis on the input image, and assigning the extracted text to a text layer based on the semantic analysis results; separating the background area and foreground object area in the input image using an image segmentation model based on a segmentation neural network, and assigning the background area to a background layer and the foreground object area to a foreground layer; determining the coverage relationship between the layers based on the type and position attributes of the logo layer, the text layer, the background layer, and the foreground layer, and constructing a layer tree describing the layer hierarchy based on the coverage relationship.

[0013] In one embodiment, the step of constructing a layer tree describing the layer hierarchy based on the overlay relationship includes: setting the bottom layer in the overlay relationship as the root node of the layer tree; assigning level index values ​​to other layers in the overlay relationship other than the root node according to the top-to-bottom overlay order of the layers in the overlay relationship; adding the other layers as child nodes or sibling nodes under the root node according to the level index values ​​to obtain tree structure data; and associating the tree structure data with the corresponding layer elements to obtain a layer tree describing the layer hierarchy.

[0014] In one embodiment, the image segmentation model is a pre-trained U-Net segmentation neural network model, which includes an encoder and a decoder. The step of separating the background region and the foreground object region in the input image using the image segmentation model based on the segmentation neural network, and assigning the background region to a background layer and the foreground object region to a foreground layer includes: extracting features from the input image using the encoder to obtain a multi-scale feature map; upsampling and skip connection feature fusion of the multi-scale feature map using the decoder to obtain a pixel-level segmentation mask; performing connected component analysis on the segmentation mask to identify the contour coordinates of closed regions belonging to the foreground object in the segmentation mask; cropping the foreground object region from the input image based on the contour coordinates of the closed regions and assigning the foreground object region to a foreground layer; inverting the segmentation mask to obtain a background region mask; extracting the background region from the input image based on the background region mask and assigning the background region to a background layer.

[0015] In one embodiment, the step of mapping variable data in a preset material library to corresponding placeholders in the edited layer data according to the batch replacement rules, the style rules, and the conflict verification rules to obtain target layer data includes: traversing the dynamic layers in the edited layer data and identifying placeholders in the dynamic layers; matching variable data corresponding to the placeholders from the preset material library according to the text-type variable replacement logic or image-type material replacement logic in the batch replacement rules, and filling the variable data into the position of the placeholders; when the variable data filling is completed, applying the style rules to the dynamic layers through a style rendering engine; when the style rules are applied, calculating the distance between the position coordinates of the elements in the dynamic layers and the canvas boundary or the preset safe area boundary through a boundary detection algorithm; when the distance is less than the preset safe area threshold, triggering a font scaling operation or a text wrapping operation defined in the conflict verification rules, until the distance of each element in the dynamic layers is greater than or equal to the preset safe area threshold, thereby obtaining the target layer data.

[0016] In one embodiment, the step of performing parallel rendering of the target layer data based on the raw image rules and performing layer compositing processing on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images includes: performing parallel rendering of the background layer, foreground layer, and text layer in the target layer data according to the style rules in the raw image rules; after rendering is completed, superimposing and compositing the background layer, the foreground layer, and the text layer according to the hierarchical relationship of the layer tree to generate an intermediate image; performing quality verification on the intermediate image to generate anomaly marker information; and using the intermediate image that passes the quality verification as the batch advertising images according to the anomaly marker information.

[0017] In one embodiment, the step of performing quality verification on the intermediate image and generating anomaly marker information includes: calculating the feature point matching degree of the identifier pattern in the intermediate image using a feature point matching algorithm; if the feature point matching degree is lower than a preset integrity threshold, the identifier is determined to be incomplete, and an identifier anomaly marker is generated; performing text recognition on the text area in the intermediate image to obtain recognized text; comparing the recognized text with a preset correct word library character by character to locate the positions of differing characters, and generating a text anomaly marker; detecting the color values ​​of key elements in the intermediate image; if the color values ​​exceed a preset safety range, a color anomaly marker is generated; calculating the deviation rate between the actual coordinates of the elements in the intermediate image and the initial position coordinates recorded in the layer data; if the deviation rate exceeds a preset deviation threshold, the element is determined to be misaligned, and a position anomaly marker is generated; and combining the identifier anomaly marker, the text anomaly marker, the color anomaly marker, and the position anomaly marker to generate anomaly marker information.

[0018] In one embodiment, the step of editing at least one of the identifier layer, the text layer, the background layer, and the foreground layer according to the user instruction includes: when the user instruction is an element drag instruction, moving the layer element specified by the element drag instruction to the layer specified by the element drag instruction; when the user instruction is a layer categorization instruction, assigning the layer element specified by the layer categorization instruction to the layer type specified by the layer categorization instruction; when the user instruction is a color modification instruction, modifying the color channel value of the layer element specified by the color modification instruction using a pixel traversal algorithm; when the user instruction is a font attribute instruction, updating at least one of the font type, font size, bold, italic, and underline style attributes of the text layer by calling the font rendering interface according to the font attribute instruction; and when the user instruction is a size scaling instruction, adjusting the size parameters of the layer element specified by the size scaling instruction using a graphics scaling algorithm.

[0019] In one embodiment, the batch replacement rule includes text variable replacement logic and image material replacement logic, and the raw image rule includes format constraints, style rules, and conflict verification rules; the step of receiving rule parameters input by the user through the rule configuration interface and defining the batch replacement rule and raw image rule according to the rule parameters includes: when receiving a text variable file or table data uploaded by the user through the rule configuration interface, defining the text variable replacement logic in the batch replacement rule according to the text variable file or the table data; when receiving an image material library path or associated tagged image material library selected by the user through the rule configuration interface, defining the image material replacement logic in the batch replacement rule according to the image material library; when receiving a user through the rule configuration interface... When the image format parameters are set in the rule configuration interface, format constraints in the raw image rules are defined according to the image format parameters. The format constraints include the target size parameter, target resolution parameter, and target file format of the output image. When the layer style parameters set by the user through the rule configuration interface are received, style rules in the raw image rules are defined according to the layer style parameters. The style rules include layer stacking order rules, layer transparency thresholds, and element proportional scaling adaptation rules. When the conflict handling parameters set by the user through the rule configuration interface are received, conflict verification rules in the raw image rules are defined according to the conflict handling parameters. The conflict verification rules include the definition of the safe area range of element boundaries and the truncation or prompt logic when text exceeds the safe area.

[0020] Furthermore, to achieve the above objectives, this application also proposes a device for batch generation of advertising images based on layer editing, the device comprising:

[0021] The layering module is used to process the elements in the input image into layers to obtain a layer tree that describes the layer hierarchy structure. The layer tree includes an identifier layer, a text layer, a background layer, and a foreground layer.

[0022] The editing module is used to receive user instructions input by the user through a visual editing interface, and to edit at least one of the logo layer, the text layer, the background layer and the foreground layer according to the user instructions to obtain the edited layer data;

[0023] The rule definition module is used to receive rule parameters input by the user through the rule configuration interface, and define batch replacement rules and raw image rules according to the rule parameters. The batch replacement rules include text variable replacement logic and image material replacement logic, and the raw image rules include format constraints, style rules and conflict detection rules.

[0024] The batch replacement module is used to map variable data in the preset material library to the corresponding placeholders in the edited layer data according to the batch replacement rules, the style rules, and the conflict verification rules, so as to obtain the target layer data.

[0025] The compositing module is used to perform parallel rendering of the target layer data based on the raw image rules, and to perform layer compositing processing on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images.

[0026] Furthermore, to achieve the above objectives, this application also proposes a device for batch generation of advertising images based on layer editing. The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. The computer program is configured to implement the steps of the batch generation method for advertising images based on layer editing as described above.

[0027] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the layer-based batch generation method for advertising images as described above.

[0028] One or more technical solutions proposed in this application have at least the following technical effects:

[0029] First, the system processes the elements in the input image into layers, decomposing them into a label layer, text layer, background layer, and foreground layer, and constructs a layer tree describing the hierarchical relationship of these layers, providing a clear structural foundation for subsequent editing. Next, the system receives user commands through the visual editing interface, performs editing operations on each layer, updates layer data in real time, and displays the effects. Then, the system receives user-input rule parameters through the rule configuration interface, defining batch replacement rules and raw image rules, including text variable replacement, image material replacement, format constraints, style rules, and conflict checking rules. These rules provide clear guidance for batch generating advertising images, ensuring that the generated images meet design requirements. Afterward, based on these rules, the system maps variable data from the preset material library to placeholder positions in the edited layer data, completing dynamic content replacement, applying style rules for visual effects processing, and automatically adjusting layout issues through conflict checking rules to generate target layer data. This process enables rapid customization and optimization of advertising content, improving generation efficiency. Finally, the system performs parallel rendering of the target layer data based on the raw image rules and composites the layers according to the hierarchical relationship of the layer tree, generating batch advertising images. This application significantly improves the speed of generating advertising images, meets the needs of rapid iteration and large-scale deployment of internet advertising, and solves the problem of low efficiency in manually editing advertising materials. Attached Figure Description

[0030] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating an embodiment of the layer-edit-based batch generation method for advertising images in this application.

[0033] Figure 2 This is a schematic diagram illustrating the detailed editing functions provided in Embodiment 1 of the layer-based batch generation method for advertising images according to this application;

[0034] Figure 3 This is a flowchart illustrating Embodiment 2 of the method for batch generating advertising images based on layer editing in this application.

[0035] Figure 4 This is a schematic diagram of the core module division provided in Embodiment 2 of the method for batch generation of advertising images based on layer editing in this application;

[0036] Figure 5 This is a schematic diagram of the module interaction relationship provided in Embodiment 2 of the method for batch generation of advertising images based on layer editing in this application;

[0037] Figure 6 This is a schematic diagram of the module interaction process provided in Embodiment 2 of the method for batch generation of advertising images based on layer editing in this application;

[0038] Figure 7 This is a schematic diagram of the module structure of the batch advertising image generation device based on layer editing according to an embodiment of this application;

[0039] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the batch generation method of advertising images based on layer editing in the embodiments of this application.

[0040] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0041] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application. To better understand the technical solutions of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0042] It should be noted that the executing entity of this application embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or computer system capable of realizing the above functions. The following uses a computer system as an example to describe this embodiment and the subsequent embodiments.

[0043] Based on this, embodiments of this application provide a method for batch generation of advertising images based on layer editing, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the layer-based batch generation method for advertising images according to this application.

[0044] In this embodiment, the method for batch generating advertising images based on layer editing includes steps S10 to S50:

[0045] Step S10: Perform layer processing on the elements in the input image to obtain a layer tree describing the layer hierarchy structure. The layer tree includes an identifier layer, a text layer, a background layer, and a foreground layer.

[0046] It's important to note that layer hierarchy refers to the structure in image editing where layers are organized according to a specific order and hierarchical relationship. A layer tree is a visual representation of this hierarchy, displaying the relationships between layers in a tree-like structure, similar to a directory tree in a file system. The logo layer is specifically used to place brand identifiers (such as a company logo), usually located prominently in the image to display brand information. The text layer is used to place text content, such as advertising slogans, product descriptions, and promotional information. The background layer is the lowest layer of the image, providing the background for the entire advertisement, typically containing large areas of image content such as landscapes, textures, and gradients. The foreground layer is located above the background layer and is typically used to place the main visual elements of the advertisement, such as product images or people.

[0047] Understandably, firstly, the computer system analyzes the input image, detecting and separating elements such as logos, text, background, and foreground, categorizing them into corresponding layers. This is done to break down complex image content into independently operable components, facilitating subsequent editing and processing. Secondly, based on the visual hierarchy and functional relationships of these layers, the system constructs a hierarchical layer tree structure, clearly defining the overlapping and nesting order between layers.

[0048] Layered management technology is based on vector graphics engines (such as SVG parsers) + rasterized rendering:

[0049] 1) Parsing stage: Convert the imported images into JSON format layer description files;

[0050] 2) Editing stage: Through two-way data binding (such as the reactivity principle of Vue.js), when modifying layer properties (such as dragging to adjust coordinates), the JSON data is updated in real time and the preview is rendered synchronously;

[0051] 3) Storage stage: Supports parsing / exporting .psd format (compatible with industry tools), retains layer information, and facilitates secondary editing later.

[0052] Step S20: Receive user instructions input by the user through the visual editing interface, and edit at least one of the logo layer, the text layer, the background layer, and the foreground layer according to the user instructions to obtain the edited layer data.

[0053] It's important to note that a visual editing interface refers to an interactive interface that provides users with an intuitive operating environment. It typically includes functional modules such as a toolbar, layer management area, and preview area. Users can edit and adjust image elements by clicking, dragging, and typing with the mouse. User commands refer to the operation commands entered by the user through the visual editing interface, used to guide the system to perform specific editing operations on the layers. These operations include adjusting the size, color, position, and transparency of elements in the layer; modifying the content, font, and style of text; replacing image elements in the layer; or deleting or merging layers.

[0054] Please refer to Figure 2 , Figure 2This diagram illustrates the detailed editing functions provided in Embodiment 1 of the layer-based batch advertising image generation method of this application. This module is a core component of the advertising image generation system (computer system), used for detailed editing operations on different elements in the image. Specifically, the size adjustment unit is responsible for modifying the size of layer elements to adapt to different advertising needs; the color modification unit allows users to change the color of layer elements to match the brand image or the theme of the marketing campaign; the font setting unit provides editing functions such as font type and font size to ensure the readability and attractiveness of the copy; the style definition unit includes setting font styles (such as bold, italic, underline, etc.) and applying special effects to layer elements; the batch replacement unit supports the automatic replacement of text variables and image materials by users through the rule configuration interface; and the element deletion unit allows users to remove unwanted elements from the layer, simplifying the design. These detailed units together constitute a powerful editing operation module, enabling users to flexibly and efficiently generate advertising images that meet their needs, solving the problem of low efficiency in manual editing of advertising materials.

[0055] How to implement multiple layer editing operations:

[0056] 1) Edit operation mapping:

[0057] Operations such as "resizing, changing color, and changing font" are converted into graphics rendering instructions, which is achieved through the following technologies:

[0058] - Resizing: Call the Canvas API (such as the scale() method) to scale the layer proportionally and update the size parameter in the JSON synchronously;

[0059] - Color modification: For PNG layers (including alpha channels), replace the specified color gamut using a pixel traversal algorithm (e.g., change the logo from red to blue); for text layers, directly modify the CSS color property;

[0060] - Font / Style Editing: Integrated font management system, supports uploading and previewing custom fonts, renders special fonts through web font loading technology (such as @font-face), and style modifications are synchronized to the canvas in real time.

[0061] 2) Batch operation optimization:

[0062] For "batch replacement" requirements, queued task scheduling is adopted:

[0063] - Create an operation instruction queue (e.g., [Replace text A → Change color → Scale]) and execute them in order of priority;

[0064] - For layers of the same type (such as a logo layer of 100 images), reuse rendering templates (such as pre-generated logo rendering functions) and reduce redundant calculations by calling them in batches, thereby improving efficiency.

[0065] As an example, the step of editing at least one of the logo layer, the text layer, the background layer, and the foreground layer according to the user instruction includes: when the user instruction is an element drag instruction, moving the layer element specified by the element drag instruction to the layer specified by the element drag instruction; when the user instruction is a layer categorization instruction, assigning the layer element specified by the layer categorization instruction to the layer type specified by the layer categorization instruction; when the user instruction is a color modification instruction, modifying the color channel value of the layer element specified by the color modification instruction using a pixel traversal algorithm; when the user instruction is a font attribute instruction, updating at least one of the font type, font size, bold, italic, and underline style attributes of the text layer by calling the font rendering interface according to the font attribute instruction; and when the user instruction is a size scaling instruction, adjusting the size parameters of the layer element specified by the size scaling instruction using a graphics scaling algorithm.

[0066] The element drag command is used to move an element from one layer to another, allowing users to select elements using the mouse or other interactive methods and drag them to the target location, thereby changing the element's layer hierarchy or position. The layer categorization command is used to assign elements from one layer to a specified layer type. The color modification command is used to modify the color of an element in a specific layer.

[0067] Pixel traversal algorithms are image processing techniques used to access each pixel in an image one by one and manipulate the pixel's color value. In color modification, this algorithm traverses all pixels of a specified layer element and modifies the color channel values ​​of each pixel according to user-defined color rules (such as replacing a specific color or adjusting color channel values), thereby changing the color.

[0068] Color channel values ​​refer to the color information of each pixel in an image, typically represented by the values ​​of three channels: Red (R), Green (G), and Blue (B). Font attribute commands are used to specify modifications to the font attributes of text in a text layer. The font rendering interface is a software programming interface used to render font data into a visual text image. Size scaling commands are used to specify adjustments to the size of a layer element.

[0069] Image scaling algorithms are image processing techniques used to enlarge or reduce the size of image or layer elements. These algorithms adjust the image size by calculating new pixel values ​​while preserving image quality and aspect ratio as much as possible. Common scaling algorithms include bilinear interpolation and bicubic interpolation, which resample pixels using mathematical formulas to achieve smooth resizing.

[0070] Step S30: Receive rule parameters input by the user through the rule configuration interface, and define batch replacement rules and raw image rules according to the rule parameters. The batch replacement rules include text variable replacement logic and image material replacement logic. The raw image rules include format constraints, style rules, and conflict verification rules.

[0071] It's important to note that the rule configuration interface is a user-interactive interface that allows users to input, upload, or set various rule parameters for batch generating ad images. It provides visual tools and forms to facilitate defining rules for text replacement, image replacement, output format, style adaptation, and conflict checking, thereby achieving flexible control over the ad image generation process. Rule parameters refer to the specific settings that users input, upload, or set in the rule configuration interface, including variables for text replacement, material paths for image replacement, output image format, resolution, size, style requirements, and conflict checking conditions. Batch replacement rules specify how to replace text content and image materials in ad images, such as replacing variables in the copy or changing the background image. Image generation rules define the format, style, and validation conditions of the generated images, such as setting the output image size, resolution, font style, and conflict blocking conditions to ensure that the generated images meet design requirements.

[0072] Text-based variable replacement logic refers to replacing variables (such as price, promotional text, etc.) in the copy with specific text content according to user-defined rules when generating batch advertising images. Image-based material replacement logic refers to replacing specific elements (such as logo, background image, etc.) in an image with other image materials according to user-defined rules. Format constraints refer to the requirements for the output image format defined in the image generation rules, including image size (e.g., 1080×1920 for mobile devices), resolution (e.g., 72dpi for web pages), file format (e.g., PNG / JPG), etc. Style rules define the visual style requirements for each layer element in the image, such as font size, color, transparency, layer stacking order (e.g., logo layer always on top, text layer transparency ≥80%), element adaptation rules (e.g., product images need to be scaled proportionally to the reserved area of ​​the background image), etc. Conflict validation rules are used to detect and handle style conflicts that may occur during the generation process, such as automatically adjusting or prompting the user when the text exceeds the safe area of ​​the background image, ensuring that the generated image conforms to design specifications and has no visual errors.

[0073] As an example, the batch replacement rule includes text variable replacement logic and image material replacement logic, and the raw image rule includes format constraints, style rules, and conflict verification rules; the step of receiving rule parameters input by the user through the rule configuration interface and defining the batch replacement rule and raw image rule according to the rule parameters includes: when receiving a text variable file or table data uploaded by the user through the rule configuration interface, defining the text variable replacement logic in the batch replacement rule according to the text variable file or the table data; when receiving an image material library path or associated tagged image material library selected by the user through the rule configuration interface, defining the image material replacement logic in the batch replacement rule according to the image material library; when receiving a user through the rule configuration interface... When the image format parameters are set in the rule configuration interface, format constraints in the raw image rules are defined according to the image format parameters. The format constraints include the target size parameter, target resolution parameter, and target file format of the output image. When the layer style parameters set by the user through the rule configuration interface are received, style rules in the raw image rules are defined according to the layer style parameters. The style rules include layer stacking order rules, layer transparency thresholds, and element proportional scaling adaptation rules. When the conflict handling parameters set by the user through the rule configuration interface are received, conflict verification rules in the raw image rules are defined according to the conflict handling parameters. The conflict verification rules include the definition of the safe area range of element boundaries and the truncation or prompt logic when text exceeds the safe area.

[0074] Text variable files are user-uploaded files containing replaceable text content, typically used to store dynamic variables in advertising copy, such as prices, promotional phrases, and product names. These files can be simple text files (e.g., `.txt`) or more complex formats (e.g., `.json` or `.xml`), defining key-value pairs of variables used to replace placeholders in the text when generating images in batches. Tabular data refers to structured data uploaded by users through the rule configuration interface, usually stored in Excel or CSV format, containing text variables for replacement and their corresponding values, such as different language versions of the copy or prices for different products. Image format parameters refer to the specific requirements for the output image format set by the user in the rule configuration interface, including the image file format, resolution, size, and other possible format options (e.g., whether to compress, whether to include an alpha channel, etc.). Target size parameters refer to the width and height of the output image set by the user, usually in pixels. Target resolution parameters refer to the image sharpness, usually expressed in pixels per inch. Target file format refers to the file type of the generated image.

[0075] Layer style parameters refer to the parameters set by the user in the rule configuration interface to control the visual effects of layers, including font type, font size, color, transparency, layer stacking order, and element scaling ratio. Layer stacking order rules define the top-to-bottom overlapping order of layers in the final composite image; for example, a text layer may always be placed above a foreground layer. Layer transparency thresholds set the transparency range of layers; for example, the transparency of text should not be lower than 80%. Element scaling adaptation rules maintain the aspect ratio of elements when their size is adjusted to ensure visual effectiveness at different sizes. Conflict handling parameters handle style conflicts that may occur during the generation process. They define how to handle conflicts between elements (such as text exceeding the background safe area, element overlap, etc.), such as automatically adjusting element size and position or prompting the user for manual handling. Element boundary safe area definition defines the boundary range used to ensure elements are displayed reasonably within the image; for example, text needs to be displayed within the visible area of ​​the background image. Users can set a safe area range to prevent text from being cropped or exceeding the background boundary, thus ensuring the overall visual effect of the image.

[0076] First, the system receives text variable files or table data uploaded by users through the rule configuration interface. It parses the variables and their corresponding values, mapping this information to replacement logic. This identifies which placeholders in the copy need to be replaced with specific text content, thus defining the text variable replacement logic in the batch replacement rules. This is done to achieve dynamic copy generation and meet the needs of different advertising scenarios. Replacement logic is defined, such as "replace copy layer by [promotional phrase A, promotional phrase B]" or "batch replace foreground product images by [phone model 1, phone model 2]". It supports importing variables (such as price and product parameters) from Excel / CSV tables.

[0077] Secondly, the system receives the user-selected image resource library path or associated tagged image resource library. Based on the user-specified path or category tags, it determines which image elements need to be replaced and which new image resources to use. It defines the image resource replacement logic in the batch replacement rules, enabling ad images to quickly change visual elements according to different campaign needs. Upload / Associate Resource Libraries: These include folders storing different logos, copy templates, and background images, supporting tagging by type (e.g., tagging background images with "Summer Theme," "Promotional Atmosphere," etc.).

[0078] Next, the system receives the image format parameters set by the user, using these parameters as constraints to define format constraints in the image generation rules. This ensures that the generated images meet specific output requirements and are adaptable to different advertising platforms and display scenarios. Then, the system receives the layer style parameters set by the user, defining style rules in the image generation rules to control the visual effects and layout of layers, ensuring the aesthetics of the advertising images. Finally, the system receives the conflict handling parameters set by the user, defining conflict verification rules in the image generation rules (e.g., safe area range → setting the coordinate boundaries of the effective area within the canvas). These rules are used to detect and handle potential style conflicts during the generation process, ensuring that the images conform to design specifications and are free of visual errors.

[0079] Step S40: Based on the batch replacement rules, the style rules, and the conflict verification rules, map the variable data in the preset material library to the corresponding placeholders in the edited layer data to obtain the target layer data.

[0080] It's important to note that the preset material library refers to a pre-prepared set of resources containing various design elements, such as text content, images, and graphics, used to replace or fill specified positions during the advertising image generation process. Placeholders are blank spaces or markers reserved in the edited layer data for subsequent replacement; they are typically represented in a specific format (e.g., `{{variable name}}`) and used to identify the content to be replaced. Target layer data refers to the final layer data generated after batch replacement, style adjustments, and conflict checks.

[0081] As an example, the step of mapping variable data in the preset material library to corresponding placeholders in the edited layer data according to the batch replacement rules, the style rules, and the conflict verification rules to obtain target layer data includes: traversing the dynamic layers in the edited layer data and identifying placeholders in the dynamic layers; matching variable data corresponding to the placeholders from the preset material library according to the text-type variable replacement logic or image-type material replacement logic in the batch replacement rules, and filling the variable data into the position of the placeholders; when the variable data filling is completed, applying the style rules to the dynamic layers through the style rendering engine; when the style rules are applied, calculating the distance between the position coordinates of the elements in the dynamic layers and the canvas boundary or the preset safe area boundary through the boundary detection algorithm; when the distance is less than the preset safe area threshold, triggering the font scaling operation or text wrapping operation defined in the conflict verification rules, until the distance of each element in the dynamic layers is greater than or equal to the preset safe area threshold, to obtain the target layer data.

[0082] Dynamic layers refer to layers containing variable content (such as text or image elements) during the ad image generation process. The content of these layers needs to be replaced or updated according to user-defined rules to generate different ad versions. Variable data refers to the specific content stored in a preset material library used to replace placeholders; this can be text content (such as price, product name, promotional text) or image materials (such as different background images, logos), etc. A style rendering engine is a software tool or module used to perform visual effects processing on elements in layers according to user-defined style rules.

[0083] Boundary detection algorithms are methods for calculating the distance between elements in a layer and the canvas boundary or other preset boundaries. They analyze the element's coordinates and size to determine if the element exceeds a safe area or needs repositioning. The canvas boundary refers to the overall size range of the advertising image, i.e., the outermost boundary of the image. The preset safe area boundary is a defined safe area within the canvas to ensure that elements in the layer (such as text and images) are not cropped or exceed the visible range. The preset safe area threshold is the minimum distance that an element must maintain between itself and the boundary within the safe area.

[0084] First, the system examines each edited layer, locating dynamic layers and identifying pre-defined placeholders within them. Next, based on the batch replacement rules, the system retrieves variable data matching the placeholders from the pre-defined material library. This includes finding promotional text or image material paths, and then precisely filling these variable data into the placeholder positions. This dynamic content replacement is crucial for quickly generating diverse advertising content based on different advertising needs. Variable replacement: Iterates through dynamic layers such as text layers and product layers, replacing placeholders with variables from the material library (e.g., replacing {{PRICE}} with ¥2999).

[0085] Next, the system calls the style rendering engine to apply the user-defined style rules to the dynamic layers, ensuring that the replaced elements visually meet the design requirements. Style adaptation: The system calls the CSS style engine / graphics rendering library (such as Skia) to apply style rules such as font (such as Microsoft YaHei), color (#FF0000), and transparency (0.9) to each layer.

[0086] Subsequently, the system uses a boundary detection algorithm to precisely calculate the distance between the position coordinates of each element in the dynamic layer and the canvas boundary or the preset safe area boundary to check for layout conflicts. This step is to prevent elements from exceeding the visible range or being cropped, ensuring the integrity and visual effect of the advertisement image. Finally, if it is found that the distance of an element is less than the preset safe area threshold, the system will trigger the operation defined in the conflict verification rules, such as automatically adjusting the font size or wrapping the text, until the distance of all elements meets the safe area threshold requirements. Finally, it generates target layer data that conforms to design specifications and has no visual errors, ensuring that the advertisement image maintains a good visual effect under different sizes and layout requirements.

[0087] Step S50: Based on the raw image rules, the target layer data is rendered in parallel, and the target layer data is composited according to the hierarchical relationship of the layer tree to obtain batch advertising images.

[0088] It should be noted that batch advertising images refer to a set of advertising images that meet specific design requirements and are generated automatically by the system. They usually have different text, image elements, styles and layouts, but all follow the same layer structure and design specifications.

[0089] As an example, the steps of parallel rendering of the target layer data based on the raw image rules and layer compositing of the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images include: parallel rendering of the background layer, foreground layer, and text layer in the target layer data according to the style rules in the raw image rules; after rendering is completed, superimposing and compositing the background layer, the foreground layer, and the text layer according to the hierarchical relationship of the layer tree to generate an intermediate image; performing quality verification on the intermediate image and generating anomaly marker information; and using the intermediate image that passes the quality verification as the batch advertising images according to the anomaly marker information.

[0090] Intermediate images refer to images generated during the advertising image production process, after layer rendering and overlay compositing, but before final quality verification. Anomaly markers refer to records detected by the system during quality verification that do not conform to the raw image rules or have quality issues. These typically include the error type (such as typos in the text, misaligned elements, color overflow, etc.) and the specific location or content of the anomaly.

[0091] First, the system initiates multi-threaded processing or enables GPU acceleration to independently and in parallel render the background, foreground, and text layers in the target layer data. For the background layer, the system loads the background image data and applies blur or gradient effects according to style rules to enhance visual appeal and meet advertising design needs. For the foreground layer, the system performs image matting based on a segmentation neural network to separate foreground objects and overlays shadows or stroke styles according to style rules to highlight foreground elements and enhance visual depth. For the text layer, the system renders the text content based on the replaced variable data, font attributes, and style attributes contained in the target layer data, and applies path text or 3D flip effects to enhance the visual appeal of the text. Second, after all layers are rendered, the system, according to the layer tree hierarchy, uses a layer compositing algorithm to overlay and composite the background, foreground, and text layers in Z-axis (depth axis or axis perpendicular to the screen) order to generate an intermediate image, ensuring that the layer elements are combined in the correct order to form a complete advertising image. Finally, the system performs quality checks on the intermediate images, checking for issues such as typos in the text, misaligned elements, and color overflow, and generates anomaly markers. Based on these markers, the system selects the intermediate images that pass the quality check and outputs them as the final batch of advertising images, ensuring that each advertising image meets design specifications and quality requirements.

[0092] As an example, the step of performing quality verification on the intermediate image and generating anomaly marker information includes: calculating the feature point matching degree of the identifier pattern in the intermediate image using a feature point matching algorithm; if the feature point matching degree is lower than a preset integrity threshold, the identifier is determined to be incomplete, and an identifier anomaly marker is generated; performing text recognition on the text area in the intermediate image to obtain recognized text; comparing the recognized text with a preset correct word library character by character to locate the positions of differing characters and generate a text anomaly marker; detecting the color values ​​of key elements in the intermediate image; if the color values ​​exceed a preset safety range, a color anomaly marker is generated; calculating the deviation rate between the actual coordinates of the elements in the intermediate image and the initial position coordinates recorded in the layer data; if the deviation rate exceeds a preset deviation threshold, the element is determined to be misaligned, and a position anomaly marker is generated; and combining the identifier anomaly marker, the text anomaly marker, the color anomaly marker, and the position anomaly marker to generate anomaly marker information.

[0093] Feature point matching algorithms are computer vision techniques used to detect feature points (such as corner points and edge points) in an image and calculate their matching degree with a preset template or standard pattern. A logo pattern refers to a specific graphic or symbol in an image used for brand identification, such as a company logo. Feature point matching degree is a quantitative indicator calculated by the feature point matching algorithm, representing the degree of similarity between the logo pattern in the image and a preset standard pattern. A preset integrity threshold is a pre-set value used to determine whether the feature point matching degree of the logo pattern reaches an acceptable level of completeness. Logo anomaly markers are used to indicate problems with the logo pattern in the image, such as missing, distorted, or incomplete parts. A preset correct vocabulary is a vocabulary or text set containing correct copywriting content, used to verify the accuracy of the text in the copywriting area of ​​an advertising image. It typically contains standard text, keywords, and phrases for the advertising copy. Text anomaly markers are markers generated after text recognition in the copywriting area, when the recognized text is compared with the preset correct vocabulary.

[0094] Key elements refer to elements in an advertisement image that are crucial to visual effects and information delivery, such as copy, logo, and main product images. The preset safety range is a predefined numerical interval used to verify whether the color values ​​of key elements are within the allowed range. Color anomaly markers indicate color problems with the element, such as color deviation or color overflow. Initial position coordinates refer to the precise position coordinates of each layer element (including element type, position, and initial attributes) when the user uploads the original advertisement template image, after the system calls an image recognition algorithm (such as contour detection based on OpenCV) to parse the template. The preset deviation threshold is a pre-set value used to determine whether the deviation between the actual position coordinates and the initial position coordinates of an element is within an acceptable range. Position anomaly markers indicate that the element's position has been incorrect or deviated.

[0095] The system loads an intermediate image and a preset standard label pattern, and uses a feature point detection algorithm (such as SIFT or ORB) to extract key feature points from both. These feature points include information such as location, scale, and orientation. Then, the system calculates the similarity between the feature points of the intermediate image and the feature points of the standard pattern using descriptor matching (such as nearest neighbor matching), obtaining a matching score. If the matching score is lower than a preset integrity threshold, it indicates that the label pattern may be missing or deformed. The system determines that the label is incomplete and generates an anomaly marker. The system creates an anomaly record table, recording all detected anomaly markers according to a preset format. Each anomaly marker includes information such as anomaly type, specific location, and problem description. The system categorizes and sorts these markers according to the severity of the anomaly; for example, serious errors (such as missing labels) are marked as high priority, and minor deviations (such as minor color deviations) are marked as low priority.

[0096] Automatically perform quality checks: Compliance checks: check logo integrity and text typos (using text recognition + dictionary comparison); Visual checks: detect element misalignment (judged by coordinate error rate ≤0.5%) and color overflow (e.g., whether RGB values ​​exceed the safe range); Performance checks: compress output image size to ≤500KB (adapt to advertising platform restrictions).

[0097] Output results: Stored according to user rules (e.g., grouped by ad campaign name and delivery channel); generates a report including the number of images, time taken (accurate to the second), and exception records (e.g., details of failed replacement materials), and supports exporting to Excel / PDF.

[0098] This embodiment provides a method for batch generation of advertising images based on layer editing. First, the system performs layered processing on the elements in the input image, decomposing it into a label layer, text layer, background layer, and foreground layer, and constructs a layer tree describing the hierarchical relationship of these layers, providing a clear structural foundation for subsequent editing. Next, the system receives user input commands through a visual editing interface, performs editing operations on each layer, updates layer data in real time, and displays the effects. Subsequently, the system receives user-input rule parameters through a rule configuration interface, defining batch replacement rules and image generation rules, including text variable replacement, image material replacement, format constraints, style rules, and conflict checking rules. These rules provide clear guidance for batch generation of advertising images, ensuring that the generated images meet design requirements. Then, based on these rules, the system maps variable data from a preset material library to placeholder positions in the edited layer data, completing dynamic content replacement, applying style rules for visual effect processing, and automatically adjusting layout issues through conflict checking rules to generate target layer data. This process enables rapid customization and optimization of advertising content, improving generation efficiency. Finally, the system performs parallel rendering of the target layer data based on the raw image rules and composites the layers according to the hierarchical relationship of the layer tree to generate batch advertising images. This application significantly improves the speed of advertising image generation, meets the needs of rapid iteration and large-scale deployment of internet advertising, and solves the problem of low efficiency in manually editing advertising materials. Compared with existing technologies, this application reduces the production time of 100 images, which originally required several hours, to 10 minutes, greatly improving the production efficiency of advertising materials.

[0099] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 3 , Figure 3This is a flowchart illustrating the second embodiment of the layer-edit-based batch advertising image generation method of this application. Step S10 of the layer-edit-based batch advertising image generation method includes steps S11 to S14:

[0100] Step S11: Identify the brand logo area in the input image using an image recognition model based on a convolutional neural network, and assign the brand logo area to the logo layer.

[0101] It should be noted that the brand logo area refers to the part of the image that contains the brand logo. The brand logo is a key element in the brand visual identity system and usually has a unique graphic or text design.

[0102] Understandably, the system first converts the input image into a format suitable for CNN processing, typically a standardized grayscale or color image tensor. Then, the input image is fed into a pre-trained CNN model, which extracts local features from the image through convolutional layers. These convolutional layers capture features such as the shape, color, and texture of the brand logo. Next, the model reduces the spatial dimensionality of the features using pooling layers while preserving important features, improving the model's robustness and computational efficiency. Afterward, the model classifies and locates the extracted features through fully connected layers, outputting the precise coordinates of the brand logo region (such as the coordinates of the top-left and bottom-right corners of the bounding box). Finally, the system crops the brand logo region from the input image based on these coordinates and assigns it to a logo layer for subsequent editing and processing. In this way, the system can automatically identify and extract brand logos, avoiding the tedious process of manual annotation and improving processing efficiency and accuracy.

[0103] Step S12: Perform text recognition and semantic analysis on the input image, and assign the extracted text to the text layer based on the semantic analysis results.

[0104] It should be noted that semantic analysis results refer to information about the meaning, structure, and context of the extracted text content obtained through in-depth analysis. It is not just about identifying characters in the text, but also about understanding the text content, such as distinguishing between titles and body text, identifying keywords, and understanding the semantic logic of the text.

[0105] Understandably, the system first performs text recognition on the input image, using OCR technology (such as Tesseract) to scan the text areas and extract the text content. Next, the system performs semantic analysis on the extracted text, using natural language processing algorithms to analyze the text's structure and meaning, identifying different types of text content such as titles, body text, and keywords. Then, based on the results of the semantic analysis, the system assigns the extracted text to a copy layer, ensuring that the layout and format of the copy meet the requirements of the advertising design. For example, the title text is placed in a prominent position on the copy layer, while the body text is formatted according to paragraph structure.

[0106] Step S13: Separate the background region and the foreground object region in the input image using an image segmentation model based on a segmentation neural network, and assign the background region to the background layer and the foreground object region to the foreground layer.

[0107] It's important to note that image segmentation models based on segmentation neural networks are deep learning models specifically designed to segment images into multiple regions or objects. By learning pixel features, they can accurately identify and separate different parts of an image, such as background and foreground objects. These models typically use CNN architectures, such as U-Net and Mask R-CNN, which output classification labels for each pixel, achieving pixel-level segmentation. Background regions refer to the areas behind the main subject (foreground object) in an image, usually occupying a large portion of the image space. Foreground object regions refer to the objects or elements located in the main position of the image, typically the focus of the image, such as people or products.

[0108] As an example, the image segmentation model is a pre-trained U-Net segmentation neural network model, which includes an encoder and a decoder. The step of separating the background region and the foreground object region in the input image using the image segmentation model based on the segmentation neural network, and assigning the background region to a background layer and the foreground object region to a foreground layer includes: extracting features from the input image using the encoder to obtain a multi-scale feature map; upsampling and skip connection feature fusion of the multi-scale feature map using the decoder to obtain a pixel-level segmentation mask; performing connected component analysis on the segmentation mask to identify the contour coordinates of closed regions belonging to the foreground object in the segmentation mask; cropping the foreground object region from the input image based on the contour coordinates of the closed regions and assigning the foreground object region to a foreground layer; inverting the segmentation mask to obtain a background region mask; extracting the background region from the input image based on the background region mask and assigning the background region to a background layer.

[0109] The U-Net segmentation neural network model is a deep learning architecture commonly used for image segmentation. It consists of two parts: an encoder and a decoder. The encoder is a network structure composed of multiple convolutional and pooling layers, while the decoder is a network structure composed of multiple upsampling and convolutional layers.

[0110] Multi-scale feature maps refer to feature maps of different resolutions generated during the encoder stage through convolution and pooling operations. They contain multi-level information from local details to global semantics, providing rich contextual information for the decoder and helping to accurately locate and segment target objects during the segmentation process.

[0111] A segmentation mask is a two-dimensional array with the same resolution as the input image, where the value of each pixel represents the confidence or label of that pixel belonging to a specific category. In foreground-background segmentation tasks, the pixel values ​​in the segmentation mask are typically 0 or 1, representing the background and foreground, respectively.

[0112] Closed region contour coordinates refer to the set of coordinates of the outer contour of the foreground object obtained through connected component analysis in the segmentation mask. These coordinates define the boundary of the foreground object and are a closed polygon used to accurately locate and clip the foreground object region.

[0113] A background region mask is a mask obtained by inverting the foreground segmentation mask. It is complementary to the foreground segmentation mask and is used to identify background regions in an image. The pixel values ​​in the background region mask also represent the confidence level or label of the background region, used to extract the background region from the input image.

[0114] First, the input image is fed into the encoder of the U-Net model. The encoder extracts image features through multiple convolutional operations and gradually reduces the spatial dimension of the feature maps through pooling operations, generating a series of feature maps at different scales. These feature maps contain rich semantic information and detailed features. Next, these multi-scale feature maps are fed into the decoder. The decoder gradually restores the spatial resolution of the feature maps through upsampling operations and uses skip connections to fuse the feature maps from the encoder and decoder to enhance the detailed information of the segmentation result, ultimately generating a pixel-level segmentation mask. Each pixel value in the segmentation mask represents the probability that the pixel belongs to the foreground or background. Then, connected component analysis is performed on the generated segmentation mask. By finding continuous foreground pixel regions in the mask, the contour coordinates of closed regions belonging to the foreground object are identified. These coordinates define the boundaries of the foreground object. Based on these closed region contour coordinates, image cropping techniques are used to accurately crop the foreground object region from the input image and assign it to the foreground layer for subsequent editing and processing. Finally, the segmentation mask is inverted, and the foreground pixel values ​​are swapped to obtain the background region mask. Finally, based on the background region mask, the background region is extracted from the input image and assigned to the background layer, thus completing the separation of the background and foreground. This method enables precise segmentation of the foreground and background in the input image, providing a foundation for subsequent layer editing and compositing.

[0115] Step S14: Determine the overlay relationship between the layers based on the type and position attributes of the identifier layer, the text layer, the background layer, and the foreground layer, and construct a layer tree describing the layer hierarchy based on the overlay relationship.

[0116] It should be noted that the type attribute refers to the category of the layer, which determines the main function and content of the layer. The position attribute refers to the spatial position of the layer in the image, usually represented by coordinates (such as the coordinates of the top left corner) and dimensions (such as width and height), which determines the display position and range of the layer in the image.

[0117] Overlay relationship refers to the stacking order and mutual occlusion relationship between layers, describing the hierarchical relationship between layers, that is, which layers are located above or below other layers.

[0118] As an example, the step of constructing a layer tree describing the layer hierarchy based on the overlay relationship includes: setting the bottom layer in the overlay relationship as the root node of the layer tree; assigning level index values ​​to other layers in the overlay relationship other than the root node according to the top-to-bottom overlay order of the layers in the overlay relationship; adding the other layers as child nodes or sibling nodes under the root node according to the level index values ​​to obtain tree structure data; and associating the tree structure data with the corresponding layer elements to obtain a layer tree describing the layer hierarchy structure.

[0119] Layer overlap order refers to the arrangement of layers from bottom to top in image compositing. This determines the occlusion relationship between layers; layers below are covered by layers above, and vice versa. A layer index is a numerical value used to indicate the position of a layer in the hierarchical structure, distinguishing the hierarchical relationship between layers. Lower layer index values ​​indicate that the layer is closer to the background. A tree structure is a data structure used to describe the hierarchical relationship between layers. It typically represents the parent-child relationship between layers in a nested manner. In this structure, each layer can have multiple child layers, but each child layer can only have one parent layer.

[0120] First, the system identifies the bottommost layer in the input image, typically the background layer, and sets it as the root node of the layer tree. This is because the background layer is the foundation of all other layers, which are all overlaid upon it. Second, based on the layer overlap order, the system assigns layer index values ​​to all layers except the root node. Overlaid layers are assigned lower index values, while layers that overlap other layers are assigned higher index values, clearly defining the hierarchical relationships. Then, the system adds other layers under the root node based on their index values. The layer with the lowest index value becomes the root node's direct child, layers with the same index value become siblings, and layers with adjacent index values ​​and conforming to the overlap order establish parent-child relationships, constructing a tree-like data structure. This structure is stored in JSON format for easy access and manipulation of layer hierarchy. Finally, the system associates the tree-like data with the corresponding layer elements to form a complete layer tree. This facilitates layer editing and management, and provides clear hierarchical guidance for subsequent layer compositing.

[0121] This embodiment first identifies the brand logo area in the input image using a pre-trained CNN image recognition model and assigns it to the logo layer. This process reduces the time and workload of manually marking logo positions, improving recognition efficiency and accuracy. Next, the system performs text recognition and semantic analysis on the input image, extracting text content and assigning it to the text layer based on the semantic analysis results. This makes text extraction more accurate and better adaptable to different formats and styles of text content. Then, using an image segmentation model based on a segmentation neural network, the system separates the background and foreground object areas in the input image and assigns them to the background and foreground layers respectively. This operation allows the background and foreground objects to be edited independently, providing greater flexibility for subsequent image processing. Finally, the system determines the coverage relationship between layers based on their type and position attributes and constructs a layer tree describing the layer hierarchy. This provides a clear hierarchical framework for image synthesis and editing, making the management and operation of each layer more orderly, improving the overall efficiency and quality of image editing, and solving the problem of low efficiency in manual editing of advertising materials.

[0122] Please refer to Figure 4 , Figure 4 This diagram illustrates the core module division of the layer-based batch advertising image generation method according to Embodiment 2 of this application. It includes a layer management module, an editing operation module, a batch processing module, and a generation module. The layer management module is responsible for element layer processing, including layer creation, deletion, and element layering, ensuring that elements of the advertising image can be independently edited and managed. The editing operation module supports various editing operations on each layer, such as resizing, color modification, and font settings, enabling flexible editing of advertising materials. The batch processing module receives the user's batch replacement configuration and image generation rules. By configuring material replacement rules and image generation logic operations, it performs automated processing to achieve rapid generation of large batches of promotional images. Finally, the generation module outputs the batch-generated promotional images based on the editing and batch processing results, completing the final advertising image production. This module division reflects the complete workflow of the system from layer management to final generation. Through the collaborative work of each module, efficient and automated batch generation of advertising images is achieved.

[0123] Please refer to Figure 5 , Figure 5This diagram illustrates the module interaction relationships provided in Embodiment 2 of the layer-based batch image generation method for advertisements according to this application. First, the input layer receives the original image files, which are then sent to the layer management module of the processing layer. This module is responsible for layering the elements in the images, automatically or manually assigning them to different layers to create a layer tree structure. Next, the editing module allows users to edit each layer, such as resizing, modifying colors, and setting fonts, to meet personalized needs. Then, the batch processing module performs material replacement and image generation logic operations according to the user-defined batch replacement and image generation rules, preparing for the generation of a large number of images. Finally, the generation module outputs the final promotional image set based on the processing results, completing the entire batch generation process of advertisement images. This entire process embodies automated and intelligent processing from original image input to final advertisement image output, significantly improving the production efficiency of advertising materials.

[0124] Please refer to Figure 6 , Figure 6 This is a schematic diagram of the module interaction process provided in Embodiment 2 of the layer-based batch generation method for advertising images according to this application. Users upload materials and configure rules through the user interaction layer; the core processing layer receives these inputs and begins processing. The layer parsing module is responsible for identifying element layers and automatically or manually assigning different elements in the image (such as logos, text, background images, foreground images, etc.) to different layers. The rule engine module performs corresponding replacement and style adaptation operations according to the replacement logic and style rules configured by the user. The material library management module stores and manages various materials, such as logos, text templates, background images, etc., and supports version backtracking and popular material statistics. The batch rendering module uses multi-threading or GPU acceleration technology to process independent layers in parallel, achieving fast rendering. The quality verification module performs compliance, visual, and performance verification on the generated images to ensure that the output images meet the requirements. Finally, the output storage layer categorizes and stores the generated promotional image set and generates a report containing the number of images, time consumption, and anomaly records, supporting export to Excel or PDF format, and can also directly connect to the advertising platform to upload materials. The entire process embodies automated and intelligent processing from user input to final output, significantly improving the production efficiency of advertising materials and solving the inefficiency problem of traditional manual editing methods.

[0125] This application also provides a device for batch generating advertising images based on layer editing; please refer to [reference needed]. Figure 7 The layer-edit-based batch advertising image generation device includes:

[0126] The layering module 10 is used to perform layering processing on the elements in the input image to obtain a layer tree describing the layer hierarchy structure. The layer tree includes an identifier layer, a text layer, a background layer, and a foreground layer.

[0127] The editing module 20 is used to receive user instructions input by the user through a visual editing interface, and to edit at least one of the logo layer, the text layer, the background layer and the foreground layer according to the user instructions to obtain the edited layer data;

[0128] The rule definition module 30 is used to receive rule parameters input by the user through the rule configuration interface, and define batch replacement rules and raw image rules according to the rule parameters. The batch replacement rules include text variable replacement logic and image material replacement logic. The raw image rules include format constraints, style rules and conflict verification rules.

[0129] The batch replacement module 40 is used to map variable data in the preset material library to the corresponding placeholders in the edited layer data according to the batch replacement rules, the style rules and the conflict verification rules, so as to obtain the target layer data;

[0130] The compositing module 50 is used to perform parallel rendering of the target layer data based on the raw image rules, and to perform layer compositing processing on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images.

[0131] The layer-edit-based batch advertising image generation device provided in this application, employing the layer-edit-based batch advertising image generation method in the above embodiments, can solve the technical problem of low efficiency in manually editing advertising materials. Compared with the prior art, the beneficial effects of the layer-edit-based batch advertising image generation device provided in this application are the same as those of the layer-edit-based batch advertising image generation method provided in the above embodiments, and other technical features in the layer-edit-based batch advertising image generation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0132] This application provides a layer-edit-based batch advertising image generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the layer-edit-based batch advertising image generation method in Embodiment 1 above.

[0133] The following is for reference. Figure 8This document illustrates a structural schematic diagram of a layer-edit-based bulk advertising image generation device suitable for implementing embodiments of this application. The layer-edit-based bulk advertising image generation device in this application embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The illustrated layer-editing-based bulk advertising image generation device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0134] like Figure 8 As shown, the layer-editing-based bulk advertising image generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the layer-editing-based bulk advertising image generation device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, LCDs (Liquid Crystal Displays), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the layer-based advertising image batch generation device to communicate wirelessly or wiredly with other devices to exchange data. Although a layer-based advertising image batch generation device with various systems is shown in the figure, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems can be implemented alternatively.

[0135] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0136] The layer-edit-based batch advertising image generation device provided in this application, employing the layer-edit-based batch advertising image generation method in the above embodiments, can solve the technical problem of low efficiency in manually editing advertising materials. Compared with the prior art, the beneficial effects of the layer-edit-based batch advertising image generation device provided in this application are the same as those of the layer-edit-based batch advertising image generation method provided in the above embodiments, and other technical features in this layer-edit-based batch advertising image generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0137] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0138] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0139] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the layer-edit-based batch generation method for advertising images in the above embodiments.

[0140] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), EPROM (Erasable Programmable Read Only Memory or Flash Memory), optical fibers, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0141] The aforementioned computer-readable storage medium may be included in a layer-based advertising image batch generation device; or it may exist independently and not assembled into a layer-based advertising image batch generation device.

[0142] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a layer-based advertising image batch generation device, cause the layer-based advertising image batch generation device to: perform layered processing on elements in an input image to obtain a layer tree describing the layer hierarchy, the layer tree including an identifier layer, a text layer, a background layer, and a foreground layer; receive user instructions input by a user through a visual editing interface, and edit at least one of the identifier layer, the text layer, the background layer, and the foreground layer according to the user instructions to obtain edited layer data; and receive user instructions via rules... The configuration interface inputs rule parameters, and defines batch replacement rules and raw image rules based on these parameters. The batch replacement rules include text variable replacement logic and image material replacement logic. The raw image rules include format constraints, style rules, and conflict verification rules. Based on the batch replacement rules, style rules, and conflict verification rules, variable data in the preset material library is mapped to corresponding placeholders in the edited layer data to obtain target layer data. The target layer data is then rendered in parallel based on the raw image rules, and layer compositing is performed on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images.

[0143] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0144] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0145] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0146] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., computer programs) for executing the above-described layer-based batch generation method for advertising images, thereby solving the technical problem of low efficiency in manually editing advertising materials. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the layer-based batch generation method for advertising images provided in the above embodiments, and will not be repeated here.

[0147] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the layer-based batch generation method for advertising images as described above.

[0148] The computer program product provided in this application can solve the technical problem of low efficiency in manually editing advertising materials. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the layer-based batch generation method for advertising images provided in the above embodiments, and will not be repeated here.

[0149] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for batch generating advertising images based on layer editing, characterized in that, The method includes: The elements in the input image are processed into layers to obtain a layer tree that describes the layer hierarchy structure. The layer tree includes a label layer, a text layer, a background layer, and a foreground layer. Receive user instructions input by the user through a visual editing interface, and edit at least one of the logo layer, the text layer, the background layer, and the foreground layer according to the user instructions to obtain the edited layer data; The system receives rule parameters input by the user through the rule configuration interface, and defines batch replacement rules and raw image rules according to the rule parameters. The batch replacement rules include text variable replacement logic and image material replacement logic, and the raw image rules include format constraints, style rules and conflict detection rules. Based on the batch replacement rules, the style rules, and the conflict verification rules, the variable data in the preset material library is mapped to the corresponding placeholders in the edited layer data to obtain the target layer data; Based on the aforementioned image rules, the target layer data is rendered in parallel, and layer compositing is performed on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images; The step of mapping variable data in the preset material library to corresponding placeholders in the edited layer data according to the batch replacement rules, the style rules, and the conflict verification rules to obtain the target layer data includes: Traverse the dynamic layers in the edited layer data and identify the placeholders in the dynamic layers; According to the text variable replacement logic or image material replacement logic in the batch replacement rules, match the variable data corresponding to the placeholder from the preset material library, and fill the variable data into the position of the placeholder; Once the variable data is populated, the style rules are applied to the dynamic layer via the style rendering engine; Once the style rules are applied, the distance between the position coordinates of the elements in the dynamic layer and the canvas boundary or the boundary of the preset safe area is calculated using a boundary detection algorithm. When the distance is less than the preset safe area threshold, the font scaling operation or text wrapping operation defined in the conflict verification rule is triggered until the distance of each element in the dynamic layer is greater than or equal to the preset safe area threshold, and the target layer data is obtained.

2. The method as described in claim 1, characterized in that, The step of performing layered processing on the elements in the input image to obtain a layer tree describing the layer hierarchy includes: The brand logo area in the input image is identified by an image recognition model based on a convolutional neural network, and the brand logo area is assigned to a logo layer. The input image is subjected to text recognition and semantic analysis, and the extracted text is assigned to the text layer based on the semantic analysis results; The background region and the foreground object region in the input image are separated by an image segmentation model based on a segmentation neural network, and the background region is assigned to a background layer and the foreground object region is assigned to a foreground layer. The overlapping relationships between the layers are determined based on the type and position attributes of the identifier layer, the text layer, the background layer, and the foreground layer, and a layer tree describing the layer hierarchy structure is constructed based on the overlapping relationships.

3. The method as described in claim 2, characterized in that, The step of constructing a layer tree describing the layer hierarchy based on the coverage relationship includes: Set the layer at the bottom of the layer hierarchy as the root node of the layer tree; Based on the top-to-bottom overlapping order of layers in the coverage relationship, assign a level index value to the other layers in the coverage relationship except the root node; Based on the hierarchical index value, the other layers are added as child nodes or sibling nodes under the root node to obtain tree structure data; The tree-structured data is associated with the corresponding layer elements to obtain a layer tree that describes the layer hierarchy.

4. The method as described in claim 2, characterized in that, The image segmentation model is a pre-trained U-Net segmentation neural network model, which includes an encoder and a decoder; The step of separating the background region and the foreground object region in the input image using an image segmentation model based on a segmentation neural network, and assigning the background region to a background layer and the foreground object region to a foreground layer includes: The encoder extracts features from the input image to obtain a multi-scale feature map; The decoder upsamples and fuses skip connection features in the multi-scale feature map to obtain a pixel-level segmentation mask. Perform connected component analysis on the segmentation mask to identify the contour coordinates of closed regions belonging to the foreground object in the segmentation mask; Based on the contour coordinates of the closed region, the foreground object region is cropped from the input image and assigned to the foreground layer; The segmentation mask is inverted to obtain the background region mask; The background region in the input image is extracted based on the background region mask, and the background region is assigned to the background layer.

5. The method as described in claim 1, characterized in that, The steps of performing parallel rendering of the target layer data based on the raw image rules, and performing layer compositing processing on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images include: The background layer, foreground layer, and text layer in the target layer data are rendered in parallel according to the style rules in the raw image rules. Once rendering is complete, the background layer, the foreground layer, and the text layer are superimposed and combined according to the hierarchical relationship of the layer tree to generate an intermediate image; The intermediate image is subjected to quality verification, and anomaly marker information is generated; Based on the anomaly marker information, the intermediate images that pass the quality verification are used as batch advertising images.

6. The method as described in claim 5, characterized in that, The step of performing quality verification on the intermediate image and generating anomaly marker information includes: The feature point matching algorithm is used to calculate the feature point matching degree of the logo pattern in the intermediate image. When the feature point matching degree is lower than the preset integrity threshold, it is determined that the logo is incomplete and an abnormal logo mark is generated. The text area in the intermediate image is subjected to text recognition to obtain the recognized text. The recognized text is then compared character by character with a preset correct word library to locate the position of the difference character and generate a text anomaly mark. The color values ​​of key elements in the intermediate image are detected, and a color anomaly marker is generated when the color values ​​exceed a preset safety range. Calculate the deviation rate between the actual coordinates of the elements in the intermediate image and the initial position coordinates recorded in the layer data. If the deviation rate exceeds a preset deviation threshold, it is determined that the element is misaligned and a position anomaly mark is generated. Anomaly marker information is generated by combining the aforementioned anomaly markers, text anomaly markers, color anomaly markers, and position anomaly markers.

7. The method as described in claim 1, characterized in that, The step of editing at least one of the logo layer, the text layer, the background layer, and the foreground layer according to the user instruction includes: When the user instruction is an element drag instruction, the layer element specified by the element drag instruction will be moved to the layer specified by the element drag instruction; When the user instruction is a layer categorization instruction, the layer element specified by the layer categorization instruction is assigned to the layer type specified by the layer categorization instruction; When the user instruction is a color modification instruction, the color channel values ​​of the layer element specified by the color modification instruction are modified by a pixel traversal algorithm. When the user instruction is a font attribute instruction, the font rendering interface is called according to the font attribute instruction to update at least one of the following attributes of the text layer: font type, font size, bold, italic, and underline style. When the user instruction is a size scaling instruction, the size parameters of the layer element specified by the size scaling instruction are adjusted by a graphics scaling algorithm.

8. The method according to any one of claims 1 to 7, characterized in that, The batch replacement rules include text variable replacement logic and image material replacement logic, and the raw image rules include format constraints, style rules, and conflict detection rules. The steps of receiving rule parameters input by the user through the rule configuration interface and defining batch replacement rules and raw image rules according to the rule parameters include: When a text variable file or table data uploaded by a user through the rule configuration interface is received, the text variable replacement logic in the batch replacement rule is defined according to the text variable file or table data. When the system receives a path to an image library or an associated tagged image library selected by the user through the rule configuration interface, the system defines the image replacement logic in the batch replacement rules based on the image library. When the image format parameters set by the user through the rule configuration interface are received, the format constraints in the image generation rules are defined according to the image format parameters. The format constraints include the target size parameter, target resolution parameter, and target file format of the output image. When the layer style parameters set by the user through the rule configuration interface are received, the style rules in the raw image rules are defined according to the layer style parameters. The style rules include layer stacking order rules, layer transparency thresholds, and element scaling adaptation rules. When the conflict handling parameters set by the user through the rule configuration interface are received, the conflict verification rules in the raw image rules are defined according to the conflict handling parameters. The conflict verification rules include the definition of the safe area range of element boundaries and the logic for truncation or prompting when text exceeds the safe area.

9. A device for batch generating advertising images based on layer editing, characterized in that, The device includes: The layering module is used to process the elements in the input image into layers to obtain a layer tree that describes the layer hierarchy structure. The layer tree includes an identifier layer, a text layer, a background layer, and a foreground layer. The editing module is used to receive user instructions input by the user through a visual editing interface, and to edit at least one of the logo layer, the text layer, the background layer and the foreground layer according to the user instructions to obtain the edited layer data; The rule definition module is used to receive rule parameters input by the user through the rule configuration interface, and define batch replacement rules and raw image rules according to the rule parameters. The batch replacement rules include text variable replacement logic and image material replacement logic, and the raw image rules include format constraints, style rules and conflict detection rules. The batch replacement module is used to map variable data from a preset material library to corresponding placeholders in the edited layer data according to the batch replacement rules, style rules, and conflict verification rules, thereby obtaining target layer data. The step of mapping variable data from a preset material library to corresponding placeholders in the edited layer data according to the batch replacement rules, style rules, and conflict verification rules to obtain target layer data includes: traversing the dynamic layers in the edited layer data and identifying placeholders in the dynamic layers; and, according to the text-type variable replacement logic or image-type material replacement logic in the batch replacement rules, selecting from the preset material library... The system matches the variable data corresponding to the placeholder in the library and fills the placeholder position with the variable data. After the variable data is filled, the style rules are applied to the dynamic layer through the style rendering engine. After the style rules are applied, the distance between the position coordinates of the elements in the dynamic layer and the canvas boundary or the boundary of the preset safe area is calculated by the boundary detection algorithm. When the distance is less than the preset safe area threshold, the font scaling operation or text wrapping operation defined in the conflict verification rule is triggered until the distance of each element in the dynamic layer is greater than or equal to the preset safe area threshold, and the target layer data is obtained. The compositing module is used to perform parallel rendering of the target layer data based on the raw image rules, and to perform layer compositing processing on the target layer data according to the hierarchical relationship of the layer tree to obtain batch advertising images.

Citation Information

Patent Citations

  • Method for dynamically generating picture

    CN110706313A

  • Self-adaptive intelligent banner advertisement picture generation method and self-adaptive intelligent banner advertisement picture generation system

    CN110889883A