Poster element layout optimization method and device, equipment and storage medium

By analyzing the interactive relationship between poster elements through graph neural networks and dynamically adjusting the difficulty window, the static course design and training stability issues of layout generation in poster design are solved, and a layout that conforms to design aesthetics and adapts to business needs is generated, which improves the rationality and diversity of layout generation.

CN120672910APending Publication Date: 2025-09-19PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510833171.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-19
Publication Date
2025-09-19

Smart Images

  • Figure CN120672910A_ABST
    Figure CN120672910A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence and image processing, and discloses a poster element layout optimization method, device and equipment and a storage medium, and the method comprises the steps: receiving original layout data containing a plurality of poster samples, and extracting the features of a plurality of poster elements in each poster sample; analyzing an interaction relationship among poster elements through a graph neural network, and calculating a layout difficulty score of each sample; obtaining the verification loss of the layout generation model in the previous step in the iteration process, and dynamically adjusting the difficulty window; selecting a target feature from the features of the poster elements according to the layout difficulty score and the difficulty window, inputting the target feature into a layout generation model for iteration, and generating an optimal layout scheme after an iteration termination condition is met; and rendering the optimal layout scheme into a visual poster. The method can be applied to the field of medical health old-age care and financial science and technology business, rationality and diversity of layout generation are remarkably improved, and meanwhile dependence on manual design experience is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence and image processing technology, and in particular to a poster element layout optimization method, device, equipment and storage medium. Background Art

[0002] In business areas such as healthcare, elderly care, and financial technology, poster design is a key form of visual communication for business promotion, and its layout quality plays a decisive role in the effectiveness of information transmission. Different business types, business scenarios, and target personnel require different design elements and schemes for posters. However, traditional layout design relies heavily on manual experience, which is not only inefficient and costly, but also difficult to achieve large-scale application. In recent years, layout generation methods based on deep learning have become a research hotspot. Among them, the curriculum learning strategy has shown significant advantages in improving model performance because it simulates the human progressive learning process. However, existing methods still have obvious problems in the layout generation process.

[0003] First, in static course design, most studies use a predefined fixed difficulty sequence, such as a linear transition from a grid layout to a free layout, but fail to dynamically adjust based on the model's actual learning state. This can lead to insufficient training of simple samples or premature introduction of complex samples, which can affect the efficiency of promotional poster design. For example, if the model is insufficiently trained on the layout of basic medical knowledge presentations, it will struggle to clearly convey complex health insurance information. Second, in coarse-grained difficulty assessment, existing methods typically evaluate sample difficulty based on a single metric, such as the number of elements or layout area, ignoring the combined impact of spatial relationships between elements (such as overlap and alignment constraints) and design principles (such as visual balance and hierarchy) on complexity. In poster design, if these factors are not fully considered, the advantages and risks of financial products may not be effectively presented. Finally, regarding training stability issues, traditional methods are prone to performance fluctuations or catastrophic forgetting when the model abruptly switches from a simple to a complex layout, especially when dealing with scenes containing irregular shapes or dense elements. For the insurance industry, if such issues arise during the poster generation process for promoting new fintech insurance products, important information may not be accurately conveyed, affecting market promotion effectiveness. Summary of the Invention

[0004] The purpose of the present invention is to provide a poster element layout optimization method, device, equipment and storage medium, aiming to solve the problems existing in the prior art that static course design cannot be dynamically adjusted, coarse-grained difficulty assessment ignores comprehensive complexity, and poor training stability leads to the inability to accurately convey important information.

[0005] In a first aspect, an embodiment of the present invention provides a method for optimizing the layout of poster elements, comprising:

[0006] receiving original layout data comprising a plurality of poster samples, and extracting features of a plurality of poster elements in each of the poster samples;

[0007] Analyzing the interaction between the poster elements through a graph neural network based on the features of the poster elements, and calculating the layout difficulty score of each sample according to the interaction relationship;

[0008] Obtaining the validation loss of the previous step of the layout generation model during the iteration process, and dynamically adjusting the difficulty window based on the validation loss;

[0009] Selecting target features from features of multiple poster elements according to the layout difficulty score of each sample and the difficulty window, and inputting the target features into the layout generation model for iteration, and generating an optimal layout solution after an iteration termination condition is met;

[0010] The optimal layout solution is rendered as a visual poster.

[0011] In a second aspect, an embodiment of the present invention further provides a poster element layout optimization device, comprising:

[0012] An input unit, configured to receive original layout data comprising a plurality of poster samples, and extract features of a plurality of poster elements in each of the poster samples;

[0013] a difficulty assessment unit, configured to analyze the interaction relationship between the poster elements through a graph neural network based on the features of the poster elements, and calculate a layout difficulty score for each sample according to the interaction relationship;

[0014] A course scheduling unit, configured to obtain the validation loss of the previous step of the layout generation model during the iteration process, and dynamically adjust the difficulty window according to the validation loss;

[0015] a training unit, configured to select target features from features of a plurality of poster elements according to the layout difficulty score of each sample and the difficulty window, input the target features into the layout generation model for iteration, and generate an optimal layout solution after an iteration termination condition is satisfied;

[0016] An output unit is used to render the optimal layout solution into a visual poster.

[0017] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the poster element layout optimization method described in the first aspect is implemented.

[0018] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the poster element layout optimization method described in the first aspect above.

[0019] An embodiment of the present invention provides a poster element layout optimization method, device, equipment and storage medium. The method extracts the features of poster elements, analyzes the interaction relationship between poster elements through a graph neural network, and calculates the layout difficulty score of each sample based on the interaction relationship, thereby converting the traditional rule-based or heuristic layout evaluation into data-driven interaction relationship quantification, and more accurately capturing complex design constraints; dynamically adjusts the difficulty window according to the verification loss, gives priority to samples that can be processed by the current layout generation model (the layout difficulty score is within the window), gradually expands the window to improve the generalization ability, avoids the model from falling into the local optimum too early, and improves the convergence speed and final performance through a training strategy from easy to difficult; combines the difficulty score to screen the target features and input them into the layout generation model, generates the optimal layout solution through iterative optimization, generates a layout that conforms to the design aesthetics and adapts to business needs (such as advertising click-through rate, user attention distribution), avoids generating layouts that violate design principles, significantly improves the rationality and diversity of layout generation, and reduces the dependence on manual design experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 2 is a schematic diagram of an application environment of the poster element layout optimization method provided in an embodiment of the present invention;

[0022] Figure 2 This is a flow chart of a poster element layout optimization method provided in an embodiment of the present invention;

[0023] Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S104;

[0024] Figure 4 is a structural diagram of a poster element layout optimization device provided in an embodiment of the present invention;

[0025] Figure 5 is a structural diagram of a computer device provided in an embodiment of the present invention;

[0026] Figure 62 is another structural diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0028] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0029] It should also be understood that the terms used in the present specification are for the purpose of describing particular embodiments only and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0030] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0031] The poster element layout optimization method provided by the embodiment of the present invention can be applied in the following situations: Figure 1 In an application environment, the client communicates with the program terminal through the network, and the program terminal can receive the original layout data containing multiple poster samples through the client, and extract the features of multiple poster elements in each poster sample; based on the features of the poster elements, the interaction relationship between the poster elements is analyzed through the graph neural network, and the layout difficulty score of each sample is calculated according to the interaction relationship; the verification loss of the previous step of the layout generation model in the iteration process is obtained, and the difficulty window is dynamically adjusted according to the verification loss; according to the layout difficulty score of each sample and the difficulty window, the target feature is selected from the features of multiple poster elements, and is input into the layout generation model for iteration, and after the iteration termination condition is met, the optimal layout plan is generated; the optimal layout plan is rendered as a visual poster, etc.

[0032] In the technical solution of the present invention, for financial business scenarios, especially insurance business, since insurance products usually contain complex terms and entities, insurance companies can provide users with accurate and easy-to-understand promotional information. In the medical, health and elderly care business scenario, by extracting the key element features in medical posters, such as the semantic importance and visual weight (such as font size, color contrast, etc.) of disease icons, insurance amounts, disclaimer texts, and hospital pictures, and analyzing the interaction between these poster elements through graph neural networks, for example, the "major disease list" needs to be strongly associated with the "compensation ratio", and then calculating the layout difficulty score of each sample based on these interaction relationships (for example, high difficulty corresponds to multiple terms and compliance constraints).

[0033] Next, the layout generation model obtains the validation loss of the previous step during the iteration process and dynamically adjusts the difficulty window based on the validation loss, automatically switching layout styles (for example, using gentle color blocks and large fonts for low-risk products, and adding warning red boxes and contrasting colors for high-risk products). Based on each sample's layout difficulty score and difficulty window, target features are selected from the features of multiple poster elements and input into the layout generation model for iteration. After the iteration termination conditions are met, the optimal layout solution is generated and rendered as a visual poster. This method significantly improves the rationality and diversity of layout generation while reducing reliance on manual design experience.

[0034] For business areas such as healthcare, elderly care, and financial technology, poster design is crucial for the effective communication of insurance information. The present invention extracts the features of poster elements, analyzes the interactions between poster elements through a graph neural network, and calculates the layout difficulty score of each sample based on the interactions. This process transforms the traditional rule-based or heuristic layout evaluation into a data-driven interaction relationship quantification, thereby more accurately capturing complex design constraints. During the model training process, the difficulty window is dynamically adjusted according to the verification loss, and samples that can be processed by the current layout generation model (the layout difficulty score is within the window) are given priority. The window is gradually expanded to improve the generalization ability, avoid the model from falling into the local optimum too early, and improve the convergence speed and final performance through a training strategy from easy to difficult; the target features are screened in combination with the difficulty score and input into the layout generation model, and the optimal layout solution is generated through iterative optimization. The generated layout not only conforms to the design aesthetics, but also can adapt to business needs. For example, in the financial business scenario, low-risk products use gentle color blocks and large fonts, and high-risk products add warning red frames and contrasting colors. In the medical, health and elderly care business scenario, according to different publicity focuses and audience needs, the appropriate layout style is selected. The final generated layout can effectively avoid violating the design principles, significantly improve the rationality and diversity of layout generation, and reduce the dependence on manual design experience. Among them, the client can be, but is not limited to, various personal computers, laptops, smartphones, and tablets. The program end can be implemented with an independent server or a server cluster composed of multiple servers. The present invention is described in detail below through specific embodiments.

[0035] See also Figure 2 , Figure 2 A flowchart of a poster element layout optimization method provided by an embodiment of the present invention includes steps S101 to S105:

[0036] S101, receiving original layout data including a plurality of poster samples, and extracting features of a plurality of poster elements in each of the poster samples;

[0037] In this embodiment, this process requires accurate capture of basic information such as the position and size of each poster element. For example, in medical and health promotion posters in the insurance field, accurately extracting the features of elements such as medical icons and insurance clause text is crucial for subsequent analysis of the spatial relationship between elements and generating a layout that clearly conveys health protection information. Similarly, in the poster design of fintech insurance products, extracting the features of elements such as financial icons and interest rate data helps ensure that complex financial information can be presented in an intuitive and easy-to-understand manner. Through this step, the model can provide a rich data foundation for subsequent course learning strategies, thereby gradually optimizing the layout generation effect and solving problems such as static course design, coarse-grained difficulty assessment, and training stability that exist in traditional methods.

[0038] The step S101 includes the following steps S201 to S202:

[0039] S201, converting the original layout data into structured data;

[0040] S202: Extract visual features and semantic features of multiple poster elements in each poster sample from the structured data.

[0041] In this embodiment, step S201 first converts the original layout data into a structured data table containing element coordinates, hierarchical relationships, and content types, and establishes a standardized data pipeline; step S202 extracts key features based on this structured data through a multimodal analysis engine. Specifically, in terms of visual features, OpenCV is used to detect element size, color contrast (such as whether the font size of the disclaimer in a medical poster meets regulatory requirements), and spatial density (such as the visual proportion of the yield number of a financial product); in terms of semantic features, NLP technology is combined to identify medical term entities (such as the coverage of "malignant tumors") and financial product risk warning keywords (such as "floating income"), and element attributes (such as high-priority protection clauses or strong regulatory requirements) are annotated through a business rule library. This structured processing enables medical and health posters to automatically identify and highlight core protection information (such as increasing the visual weight of the compensation ratio for high-incidence diseases by 40%), and fintech posters can dynamically associate income data with risk warnings (ensuring that the spacing meets regulatory requirements), providing feature input that is both visually readable and business compliant for subsequent graph neural network analysis, significantly improving efficiency compared to traditional manual annotation.

[0042] S102. Analyzing the interaction between the poster elements using a graph neural network based on the features of the poster elements, and calculating a layout difficulty score for each sample based on the interaction relationship;

[0043] In this embodiment, step S102 of the automated layout generation process for poster design is a key step in improving the model's understanding of complex layout relationships. This step utilizes a graph neural network (GNN) to deeply analyze the interactions between poster elements and calculates a layout difficulty score for each example based on these interactions, providing an important basis for subsequent course learning strategies.

[0044] Specifically, a graph structure is first constructed based on the poster element features extracted in step S101, where each node represents a poster element and edges represent the interactions between elements, such as spatial proximity, visual hierarchy, or semantic relevance. For example, in a medical health poster in the insurance field, the interactions might include the positional relationship between a medical icon and the insurance clause text, or the association between health insurance information and the visual focal point.

[0045] Next, these interactions are modeled and analyzed using graph neural networks. GNNs can capture complex, nonlinear relationships between elements and identify combinations that may increase layout complexity, such as overlap, alignment constraints, or visual balance challenges. For example, in a poster design for a fintech insurance product, the placement of interest rate data and risk warning text can affect the readability and trustworthiness of the information, and this relationship is effectively captured by GNNs.

[0046] Finally, based on the analyzed interactions, a layout difficulty score is calculated for each sample. This score comprehensively considers multiple factors, including the number of elements, the complexity of spatial relationships, and the need for visual balance, providing a quantitative basis for dynamic adjustments to course learning strategies. This approach enables the model to more accurately identify simple and complex samples, avoiding the limitations of traditional methods of static course design and coarse-grained difficulty assessment. This allows for more professional and efficient layout designs in specific fields, such as insurance.

[0047] The step S102 includes the following steps S301 to S302:

[0048] S301, calculate the attention coefficient α according to the following formula ij :

[0049] α ij =softmax(LeakyRelu(a T [Wh i ||Wh j ]))

[0050] Among them, softmax is the normalized exponential function, a is the attention parameter vector, T is the transpose of the attention parameter vector, || represents the splicing operation, LeakyReLU is the activation function, W is the learnable weight matrix, and h j represents the hidden state of node j;

[0051] S302: Model the interaction between the poster elements using a multi-head attention mechanism according to the following formula:

[0052]

[0053] in, represents the hidden state of node i in the l+1th layer, σ is the sigmoid activation function, represents the hidden state of node j in layer l, W (l) is the learnable weight matrix of layer l.

[0054] In step S301, the attention coefficient α is calculated ijThis process uses a normalized exponential function (softmax) and an attention parameter vector a to capture the strength of the association between nodes through concatenation and activation functions. In the specific formula, W represents a learnable weight matrix that maps the hidden state of node j to the attention space. In the design of medical and health promotional posters in the insurance field, the model can accurately identify the visual association strength between medical icons and insurance clause text, thereby optimizing their layout and ensuring that key information such as health coverage is highlighted.

[0055] In step S302, the interaction relationship between poster elements is modeled through the multi-head attention mechanism. Multi-head attention allows the model to learn different relationships between elements from multiple subspaces at the same time, enhancing the model's expressive power. In the formula, Represents the hidden state of node i at layer l+1, updated via an activation function (such as ReLU) and a learnable weight matrix at layer l. In poster design for fintech insurance products, the model can simultaneously consider the complex relationships between multiple elements, such as interest rate data and risk warning text, generating a layout that is both professional and accessible, effectively conveying the core advantages of financial products.

[0056] Furthermore, the step S102 further includes the following step S303:

[0057] S303. Calculate the layout difficulty score of each sample according to the following formula:

[0058]

[0059] Among them, sigmoid is the activation function, q is the learnable projection vector, T represents the transpose of vector q, N represents the number of elements in the corresponding sample poster, and MEAN represents average pooling. Represents the hidden state of all nodes in each layer, and L represents the total number of layers.

[0060] In this embodiment, by calculating the layout difficulty score of each sample, a key indicator is provided for the dynamic adjustment of the course learning strategy.

[0061] Specifically, the learnable projection vector q is first nonlinearly transformed through an activation function (such as sigmoid) to enhance the expressive power of the model. The transpose T of the vector q is used to interact with the hidden state to capture the key features of the layout. N represents the number of poster elements in the corresponding sample, ensuring that the score calculation takes into account the influence of all poster elements. MEAN represents the average pooling operation, which is used to aggregate the hidden states of all nodes in each layer. Through average pooling, the model can comprehensively consider the feature representations of different layers (L represents the total number of layers) to avoid the bias of single-level information. In medical and health promotion posters in the insurance field, the model will comprehensively consider the interactive relationships between multiple elements such as medical icons and insurance clause texts at different levels (such as visual level and semantic level) to accurately evaluate the complexity of the layout.

[0062] S103. Obtain the verification loss of the previous step of the layout generation model during the iteration process, and dynamically adjust the difficulty window according to the verification loss;

[0063] In this embodiment, at each iteration of model training, the validation loss of the previous step is first obtained. Validation loss is a key metric for measuring model performance on the validation set, reflecting the model's mastery of the currently difficult samples. In the design of posters for healthcare promotions or fintech insurance products in the insurance sector, validation loss can be directly correlated to aspects such as the poster's clarity, layout, and visual appeal.

[0064] Furthermore, the difficulty window defines the range of sample difficulty that the model should be exposed to during the current training phase. If the validation loss is low, it indicates that the model has a good grasp of samples of the current difficulty level. In this case, the difficulty window can be appropriately widened to introduce more complex samples for training to further improve the model's generalization ability. Conversely, if the validation loss is high, it indicates that the model is having difficulty learning at the current difficulty level. In this case, the difficulty window should be narrowed to allow the model to focus on simpler samples and consolidate its basic knowledge.

[0065] By dynamically adjusting the difficulty window, we ensure that the layout generation model always faces appropriate challenges during training, avoiding local optima or training stagnation. This not only improves model training efficiency but also ensures that the resulting poster layouts better meet practical needs, such as clearly conveying complex health information or the core advantages of financial products in the insurance sector.

[0066] Wherein, the step S103 includes the following step S401:

[0067] S401, maintain the difficulty window according to the following formula

[0068]

[0069] in, represents the upper limit of the window at time t, η is the step coefficient, is the validation loss at the t-th iteration, is the verification loss of the t-1th iteration, clip means that the operation limits the update amplitude to the range of [-δ,δ], [-δ,δ] represents the set upper and lower limits of the update amplitude, represents the upper limit of the window at time t, where is the weight.

[0070] In this embodiment, η is a step size coefficient that controls the magnitude of each update to ensure that the adjustment process is neither too radical nor too conservative. and Represents the validation loss of the tth and t-1th iterations respectively. By comparing the current and previous validation losses, the model can perceive the progress and regression of the learning effect. The clip operation limits the update amplitude to the range of [-δ, δ] to prevent excessive fluctuations in the validation loss from causing excessive adjustments to the difficulty window, thereby maintaining the stability of the training process. It is used to balance the impact of historical validation loss and current validation loss on the upper limit of the window, ensuring that the adjustment strategy takes into account recent performance while not ignoring long-term trends.

[0071] In the design of medical and health posters or fintech insurance products in the insurance sector, when the model performs well on the validation set (low validation loss), the difficulty window can be appropriately expanded to include more poster examples containing complex elements (such as detailed layouts of medical icons and insurance clause text) or financial data to improve the model's generalization ability. Conversely, when the validation loss is high, the difficulty window can be narrowed to allow the model to focus on simpler examples, consolidate basic knowledge, and avoid excessive struggle with complex layouts.

[0072] S104. Select target features from the features of multiple poster elements according to the layout difficulty score of each sample and the difficulty window, and input them into the layout generation model for iteration. After the iteration termination condition is met, an optimal layout solution is generated.

[0073] In this example, after calculating the layout difficulty score and difficulty window for each sample, the features of multiple poster elements are screened. The difficulty window defines the difficulty range of samples to focus on during the current training phase, while the layout difficulty score quantitatively assesses the complexity of each sample. By combining these two, target features that are both relevant to the current learning phase and challenging can be selected.

[0074] Furthermore, the target features are input into the layout generation model for iterative training. During the iteration process, the model continuously adjusts and optimizes the layout strategy based on the input features to generate a more reasonable and aesthetically pleasing poster layout. At the same time, by continuously comparing the validation loss during the iteration process with the preset iteration termination conditions (such as reaching the maximum number of iterations or the validation loss no longer significantly decreasing), the model can determine when to stop iteration and output the current optimal layout solution.

[0075] In the design of healthcare posters or fintech insurance products in the insurance sector, the model might prioritize features containing complex medical icons and insurance clause text for iterative training based on the layout difficulty score and difficulty window, ensuring that the resulting poster clearly and accurately conveys health protection information. Conversely, in the design of fintech insurance product posters, the model might prioritize the layout optimization of key information such as interest rate data and risk warnings to attract the target audience's attention and enhance the product's market competitiveness.

[0076] Among them, such as Figure 3 As shown, step S104 includes the following steps S501 to S502:

[0077] S501, based on the layout difficulty score and the difficulty window, selecting, by a cyclic course scheduler, features of poster elements with difficult layout from features of multiple poster elements of the poster sample as target features;

[0078] S502: Input the target features into a layout generation model for training.

[0079] In step S501, based on the layout difficulty score and the difficulty window, the cyclic course scheduler selects the layout-difficult poster element features from the multiple poster element features of the poster sample as the target feature. The layout difficulty score quantitatively evaluates the complexity of each sample, while the difficulty window defines the difficulty range that should be focused on in the current training phase. By combining the two, the scheduler can accurately identify difficult samples that are both suitable for the current learning stage and challenging. For example, in medical and health promotion posters in the insurance field, difficult samples containing complex medical icon layouts or insurance clause text arrangements are preferred to improve the model's ability to handle complex layouts.

[0080] In step S502, the selected target features are input into the layout generation model for training. These target features represent the layout challenges that the model needs to focus on in the current stage. Through targeted training, the model can gradually master the skills of handling complex layouts. The design of posters for fintech insurance products involves optimizing the layout of key information such as interest rate data and risk warnings to ensure that the final poster is both professional and easy to understand, effectively conveying the core advantages of the financial product.

[0081] The step S502 includes the following steps S601 to S604:

[0082] S601: Input the target feature into the encoder for encoding to obtain the poster element feature vector f i ;

[0083] S602. Obtain the attention weight according to the self-attention mechanism as follows:

[0084]

[0085] Among them, Q, K, V are the linear projections of the eigenvectors, is the scaling factor;

[0086] S603: The poster element feature vector f is converted into i Multiplying it with the attention weight, we get the weighted poster element feature vector: F i =fi+fi*Attention;

[0087] S604: Input the weighted poster element feature vector to the decoder, and predict the position and size information of the poster element based on the output at the previous moment according to the following formula:

[0088] p i =Decoder(F i ,p i-1 )

[0089] Among them, pi represents the position and size information of the i-th poster element, p i-1 is the predicted position and size information of the i-1th poster element.

[0090] In this embodiment, the encoder converts input features into representations in a high-dimensional space to better capture the complex relationships between elements. For example, in insurance-related healthcare posters, features of elements such as medical icons and insurance clause text are encoded into vectors, providing a foundation for subsequent processing.

[0091] Furthermore, the self-attention mechanism enables the model to focus on the correlations between different elements, thereby more accurately capturing key information in the layout. For example, in a poster for a fintech insurance product, the model can learn the visual correlation between interest rate data and risk warning text, optimizing their layout position.

[0092] By transforming the poster element feature vector f iCombined with weighted features (i.e., attention weights), this approach preserves the original information while incorporating the contextual relationships captured by the attention mechanism, enhancing the model's expressive power. Based on the weighted feature vector and the previous prediction, the decoder gradually generates the position and size information for the current element. In insurance poster design, the model can dynamically adjust the position and size of subsequent elements (such as insurance clause text) based on already laid out elements (such as medical icons), ensuring the rationality and aesthetics of the overall layout.

[0093] S105: Rendering the optimal layout solution into a visual poster.

[0094] In this example, automated layout ensures that key information (such as coverage and claims processing) in healthcare posters is presented in the appropriate location and size, enhancing the user reading experience. In the design of posters for fintech insurance products, multiple layout versions can be quickly generated, and the optimal solution can be selected through visual comparison, shortening the design cycle. A standardized rendering process ensures that posters for different insurance products maintain consistency in visual style and layout logic, strengthening the brand image.

[0095] It can be seen that in the above scheme, for complex insurance entities such as medical and fintech businesses, by extracting the features of poster elements, analyzing the interaction between poster elements through graph neural networks, and calculating the layout difficulty score of each sample based on the interaction relationship, the traditional rule-based or heuristic layout evaluation is transformed into data-driven interaction relationship quantification, which can more accurately capture complex design constraints; the difficulty window is dynamically adjusted according to the verification loss, and samples that can be processed by the current layout generation model are given priority (the layout difficulty score is within the window), and the window is gradually expanded to improve the generalization ability, so as to avoid the model falling into the local optimum too early, and the convergence speed and final performance are improved through the easy to difficult training strategy; the target features are screened by combining the difficulty score to input the layout generation model, and the optimal layout plan is generated through iterative optimization, generating a layout that conforms to the design aesthetics and adapts to business needs (such as advertising click-through rate, user attention distribution), avoiding the generation of layouts that violate design principles, significantly improving the rationality and diversity of layout generation, and reducing the dependence on manual design experience.

[0096] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0097] The embodiment of the present invention further provides a poster element layout optimization device, which corresponds to the poster element layout optimization method in the above embodiment. Figure 4As shown, the poster element layout optimization device 700 includes an input unit 701, a difficulty evaluation unit 702, a course scheduling unit 703, a training unit 704, and an output unit 705. The functional units are described in detail as follows:

[0098] The input unit 701 is configured to receive original layout data including a plurality of poster samples and extract features of a plurality of poster elements in each of the poster samples;

[0099] A difficulty assessment unit 702 is configured to analyze the interaction between the poster elements using a graph neural network based on the features of the poster elements, and calculate a layout difficulty score for each sample based on the interaction relationship;

[0100] The course scheduling unit 703 is used to obtain the verification loss of the previous step of the layout generation model in the iterative process, and dynamically adjust the difficulty window according to the verification loss;

[0101] A training unit 704 is configured to select target features from features of multiple poster elements based on the layout difficulty score of each sample and the difficulty window, and input the target features into the layout generation model for iteration, and generate an optimal layout solution after an iteration termination condition is met;

[0102] The output unit 705 is configured to render the optimal layout solution into a visual poster.

[0103] The present invention provides a poster element layout optimization device, which extracts the features of poster elements, analyzes the interaction between poster elements through a graph neural network, and calculates the layout difficulty score of each sample based on the interaction relationship, thereby converting the traditional rule-based or heuristic layout evaluation into data-driven interaction relationship quantification, and more accurately capturing complex design constraints; dynamically adjusts the difficulty window according to the verification loss, gives priority to samples that can be processed by the current layout generation model (the layout difficulty score is within the window), gradually expands the window to improve the generalization ability, avoids the model from falling into the local optimum too early, and improves the convergence speed and final performance through a training strategy from easy to difficult; combines the difficulty score to screen the target features and input them into the layout generation model, generates the optimal layout solution through iterative optimization, generates a layout that conforms to the design aesthetics and adapts to business needs (such as advertising click-through rate, user attention distribution), avoids generating layouts that violate design principles, significantly improves the rationality and diversity of layout generation, and reduces the dependence on manual design experience.

[0104] The specific definition of the poster element layout optimization device can be found in the definition of the poster element layout optimization method above and will not be repeated here. The various modules in the above-mentioned poster element layout optimization device can be implemented in whole or in part through software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor of the computer device in hardware form, or can be stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each of the above modules.

[0105] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the server side of a poster element layout optimization method.

[0106] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, memory, network interface, display screen, and input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of a poster element layout optimization method.

[0107] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:

[0108] receiving original layout data comprising a plurality of poster samples, and extracting features of a plurality of poster elements in each of the poster samples;

[0109] Analyzing the interaction between the poster elements through a graph neural network based on the features of the poster elements, and calculating the layout difficulty score of each sample according to the interaction relationship;

[0110] Obtaining the validation loss of the previous step of the layout generation model during the iteration process, and dynamically adjusting the difficulty window based on the validation loss;

[0111] Selecting target features from features of multiple poster elements according to the layout difficulty score of each sample and the difficulty window, and inputting the target features into the layout generation model for iteration, and generating an optimal layout solution after an iteration termination condition is met;

[0112] The optimal layout solution is rendered as a visual poster.

[0113] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0114] receiving original layout data comprising a plurality of poster samples, and extracting features of a plurality of poster elements in each of the poster samples;

[0115] Analyzing the interaction between the poster elements through a graph neural network based on the features of the poster elements, and calculating the layout difficulty score of each sample according to the interaction relationship;

[0116] Obtaining the validation loss of the previous step of the layout generation model during the iteration process, and dynamically adjusting the difficulty window based on the validation loss;

[0117] Selecting target features from features of multiple poster elements according to the layout difficulty score of each sample and the difficulty window, and inputting the target features into the layout generation model for iteration, and generating an optimal layout solution after an iteration termination condition is met;

[0118] The optimal layout solution is rendered as a visual poster.

[0119] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.

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

[0121] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0122] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A poster element layout optimization method, characterized in that: include: receiving original layout data comprising a plurality of poster samples, and extracting features of a plurality of poster elements in each of the poster samples; Analyzing the interaction between the poster elements through a graph neural network based on the features of the poster elements, and calculating the layout difficulty score of each sample according to the interaction relationship; Obtaining the validation loss of the previous step of the layout generation model during the iteration process, and dynamically adjusting the difficulty window based on the validation loss; Selecting target features from features of multiple poster elements according to the layout difficulty score of each sample and the difficulty window, and inputting the target features into the layout generation model for iteration, and generating an optimal layout solution after an iteration termination condition is met; The optimal layout solution is rendered as a visual poster.

2. The poster element layout optimization method according to claim 1, characterized in that: The step of analyzing the interaction relationship between the poster elements in the original layout data through a graph neural network based on the features of the poster elements, and calculating the layout difficulty score of each sample according to the interaction relationship, includes: Calculate the attention coefficient α according to the following formula ij : α ij =softmax(LeakyReLU(a T [Wh i ||Wh j ])) Among them, softmax is the normalized exponential function, a is the attention parameter vector, T is the transpose of the attention parameter vector, || represents the splicing operation, LeakyReLU is the activation function, W is the learnable weight matrix, and h j represents the hidden state of node j; The interaction between the poster elements is modeled using a multi-head attention mechanism according to the following formula: in, represents the hidden state of node i in the l+1th layer, σ is the sigmoid activation function, represents the hidden state of node j in layer l, W (l) is the learnable weight matrix of layer l.

3. The poster element layout optimization method according to claim 2, characterized in that: The method further includes analyzing the interaction relationship between the poster elements in the original layout data through a graph neural network based on the features of the poster elements, and calculating the layout difficulty score of each sample according to the interaction relationship. The layout difficulty score of each sample is calculated according to the following formula: Among them, sigmoid is the activation function, q is the learnable projection vector, T represents the transpose of vector q, N represents the number of elements in the corresponding sample poster, and MEAN represents average pooling. Represents the hidden state of all nodes in each layer, and L represents the total number of layers.

4. The poster element layout optimization method according to claim 3, characterized in that: The obtaining of the verification loss of the previous step of the layout generation model in the iterative process and dynamically adjusting the difficulty window according to the verification loss includes: Maintain the difficulty window as follows in, represents the upper limit of the window at time t, η is the step coefficient, is the validation loss at the t-th iteration, is the verification loss of the t-1th iteration, clip means that the operation limits the update amplitude to the range of [-δ,δ], [-δ,δ] represents the set upper and lower limits of the update amplitude, represents the upper limit of the window at time t, where is the weight.

5. The poster element layout optimization method according to claim 1, characterized in that: The step of selecting target features from features of multiple poster elements according to the layout difficulty score of each sample and the difficulty window and inputting the target features into the layout generation model for iteration, and generating an optimal layout solution after an iteration termination condition is satisfied, includes: Based on the layout difficulty score and the difficulty window, selecting, by a recurring course scheduler, features of poster elements with difficult layouts from features of a plurality of poster elements of the poster sample as target features; The target features are input into the layout generation model for training.

6. The poster element layout optimization method according to claim 5, characterized in that: Inputting the target features into the layout generation model for training includes: The target feature is input into the encoder for encoding to obtain the poster element feature vector f i ; According to the self-attention mechanism, the attention weight is obtained as follows: Among them, Q, K, V are the linear projections of the eigenvectors, is the scaling factor; The poster element feature vector f is calculated as follows: i Multiplying it with the attention weight, we get the weighted poster element feature vector: F i =fi+fi*Attention; The weighted poster element feature vector is input to the decoder, and the position and size information of the poster element is predicted based on the output at the previous moment according to the following formula: p i =Decoder(F i ,p i-1 ) Among them, p i Indicates the position and size information of the i-th poster element, p i-1 is the predicted position and size information of the i-1th poster element.

7. The poster element layout optimization method according to claim 1, characterized in that: The extracting features of the plurality of poster elements in each poster sample includes: Converting the original layout data into structured data; The visual features and semantic features of the plurality of poster elements in each of the poster samples are extracted from the structured data.

8. A poster element layout optimization device, characterized in that: include: An input unit, configured to receive original layout data comprising a plurality of poster samples, and extract features of a plurality of poster elements in each of the poster samples; a difficulty assessment unit, configured to analyze the interaction relationship between the poster elements through a graph neural network based on the features of the poster elements, and calculate a layout difficulty score for each sample according to the interaction relationship; A course scheduling unit, configured to obtain the validation loss of the previous step of the layout generation model during the iteration process, and dynamically adjust the difficulty window according to the validation loss; a training unit, configured to select target features from features of a plurality of poster elements according to the layout difficulty score of each sample and the difficulty window, input the target features into the layout generation model for iteration, and generate an optimal layout solution after an iteration termination condition is satisfied; An output unit is used to render the optimal layout solution into a visual poster.

9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the poster element layout optimization method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, causes the processor to perform the poster element layout optimization method according to any one of claims 1 to 7.