Element generation method and device, computing equipment, storage medium and program product
Through image analysis and semantic generation models, the text and picture content in the design draft are extracted to generate elements with the same structure but different content. This solves the problem of low efficiency in copying design draft elements in the existing technology and realizes efficient and diversified element generation.
Patent Information
- Application Number
- CN202510880999.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-10-10
AI Technical Summary
Existing technologies make it difficult to achieve intelligent replication of design draft elements. Traditional methods are inefficient and the generated elements have a single content, which cannot automatically adapt to the contextual semantics, resulting in limited design efficiency and quality.
Through image analysis models and semantic generation models, the text and image content in the design draft are extracted, and elements with the same structure but different content are generated, which are then combined with a multimodal large model for differentiated expression.
It achieves the automatic generation of elements with differentiated content while maintaining the consistency of the design draft structure, improves design efficiency and diversity, and meets batch generation needs.
Smart Images

Figure CN120765788A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer technology, and in particular to an element generation method, apparatus, computing device, storage medium, and program product. Background Art
[0002] With the rapid development of digital design, the demand for reusing and batch-generating design drafts is growing. This is particularly true in fields like advertising and UI design, where designers often need to quickly generate large numbers of elements with a unified style but varying content. Traditional copying methods rely on manual adjustments or library replacement, which is inefficient and difficult to ensure diversity.
[0003] However, existing technologies struggle to achieve intelligent replication of design elements. Manually modifying content is time-consuming and labor-intensive, while methods based on fixed templates or resource libraries lack flexibility, resulting in single-content elements and an inability to automatically adapt to contextual semantics, limiting design efficiency and quality.
[0004] Therefore, there is an urgent need for an intelligent replication method that can automatically generate content with the same structure but different content. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide an element generation method. One or more embodiments of the present invention also relate to an element generation apparatus, a computing device, a computer-readable storage medium, and a computer program product to address technical deficiencies in the prior art.
[0006] According to a first aspect of an embodiment of the present invention, there is provided a method for generating an element, comprising:
[0007] In response to a selection operation on the element copy interface, obtaining a first element corresponding to the selection operation, and extracting a first text content and a first image content from the first element;
[0008] Inputting the first image content into an image analysis model to generate first text description information, and inputting the first text content and the first text description information into a semantic generation model to generate second text content and second text description information, wherein the second text content and the second text description information are used to describe a second element that has the same structure as the first element but different content;
[0009] The second text description information is input into the image generation model to generate second picture content, and the second picture content is combined with the second text content to generate a second element.
[0010] According to a second aspect of an embodiment of the present invention, there is provided an element generation device, comprising:
[0011] an extraction module configured to, in response to a selection operation on the element copy interface, obtain a first element corresponding to the selection operation, and extract the first text content and the first image content from the first element;
[0012] a generation module configured to input the first image content into an image analysis model to generate first text description information, and input the first text content and the first text description information into a semantic generation model to generate second text content and second text description information, wherein the second text content and the second text description information are used to describe a second element that has the same structure as the first element but different content;
[0013] The combination module is configured to input the second text description information into the image generation model to generate second image content, and combine the second image content with the second text content to generate a second element.
[0014] According to a third aspect of an embodiment of the present invention, there is provided a computing device, including:
[0015] memory and processor;
[0016] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned element generation method are implemented.
[0017] According to a fourth aspect of an embodiment of the present invention, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the above-mentioned element generation method are implemented.
[0018] According to a fifth aspect of an embodiment of the present invention, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned element generation method when executed by a processor.
[0019] One embodiment of the present invention implements a method of responding to a selection operation of an element copy interface, obtaining a first element corresponding to the selection operation, and extracting a first text content and a first image content from the first element; inputting the first image content into an image analysis model to generate first text description information, and inputting the first text content and the first text description information into a semantic generation model to generate second text content and second text description information, wherein the second text content and the second text description information are used to describe a second element having the same structure as the first element but different content; inputting the second text description information into an image generation model to generate a second image content, and combining the second image content with the second text content to generate a second element. By extracting the text content and image content of the first element, and then combining the semantic model to generate differentiated description information with the same structure but different content, the second element is finally generated. While maintaining the structural consistency of the first element, the second element with differentiated content is automatically generated, so that the elements generated in batches maintain a unified style and can naturally adapt to different application scenarios, effectively solving the current situation of lack of diversity in manual copying. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 is a flow chart of an element generation method provided by one embodiment of the present invention;
[0021] Figure 2 This is a process flow chart of a method for generating an element according to an embodiment of the present invention;
[0022] Figure 3 This is a schematic diagram of element replication generation provided by an embodiment of the present invention;
[0023] Figure 4 It is a structural schematic diagram of an element generation device provided by one embodiment of the present invention;
[0024] Figure 5 This is a structural block diagram of a computing device provided by one embodiment of the present invention. DETAILED DESCRIPTION
[0025] The following description sets forth numerous specific details to facilitate a thorough understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without departing from the scope of the present invention. Therefore, the present invention is not limited to the specific implementations disclosed below.
[0026] The terms used in one or more embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present invention. The singular forms "a", "the" and "the" used in one or more embodiments of the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in one or more embodiments of the present invention refers to and includes any or all possible combinations of one or more associated listed items.
[0027] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present invention, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of one or more embodiments of the present invention, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0028] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0029] First, the terms involved in one or more embodiments of the present invention are explained.
[0030] Design draft: During the product development process, the designer designs a visual draft for the product, which consists of a series of different components according to a customized layout.
[0031] Multimodal Large Language Model (MLLM): A multimodal large language model (MLLM) is a large language model that integrates data from multiple modalities (such as text, images, video, and audio), enabling cross-modal understanding, generation, and reasoning. By integrating information from diverse domains, such as vision and language, it significantly enhances the model's ability to understand complex scenarios.
[0032] Image generation models generally take a natural language description as input and output an image that matches the description. Diffusion models are a representative model in the field of image generation.
[0033] Smart Copy: For an element, retain its layout, color, and other attributes, and only replace its content, such as text, images, and icons. This will create several copies that are similar to the original element but have different content.
[0034] With the rapid development of artificial intelligence and machine learning technologies, image generation technology has gradually become a hot area of research and application. Image generation technology aims to automatically create visual content through algorithms, and its application scenarios cover a wide range of fields, from artistic creation and advertising design to virtual reality. In particular, in the field of multimodal data fusion, by combining text descriptions with image features, the quality and accuracy of generated images can be significantly improved. In recent years, deep learning methods, particularly generative adversarial networks (GANs) and diffusion models, have made breakthrough progress in the field of image generation, making it possible to generate high-resolution and richly detailed images. These technologies have not only greatly enriched the application scenarios of image generation, but also provided users with more personalized and diverse options.
[0035] Although existing image generation technologies have made significant progress, they still face some challenges in practical applications. Especially in the design draft editing scenario, how to efficiently copy and expand specific design elements to maintain consistency in layout and style remains an unresolved problem. Traditional methods often rely on manual operations or simple automated scripts, which are time-consuming and difficult to ensure consistency. In addition, current technologies have limited understanding and conversion capabilities for complex design elements and cannot fully understand the deep semantic information in the design draft, resulting in the generated content being visually or functionally different from the original design. Therefore, there is an urgent need for a new method that can intelligently parse design drafts, accurately extract and copy elements, and expand them based on text descriptions to improve the efficiency and intelligence of design work.
[0036] In response to the above problems, the present invention provides an element generation method. The present invention also relates to an element generation device, a computing device, a computer-readable storage medium, and a computer program product, which are described in detail one by one in the following embodiments.
[0037] See also Figure 1 , Figure 1 A flow chart of an element generation method provided according to an embodiment of the present invention is shown, which specifically includes the following steps.
[0038] Step 102: In response to a selection operation on the element copy interface, a first element corresponding to the selection operation is obtained, and first text content and first image content are extracted from the first element.
[0039] Among them, the element copy interface is used to provide an operating environment for users to select the elements to be copied; the first element is the basic element selected by the user on the interface; the first text content and the first picture content are the text information and image information contained in the first element respectively.
[0040] In actual application, the system first monitors the user's operation behavior in the element copy interface to identify whether there is a selection operation for a certain element. When it is detected that the user has performed a selection action, such as clicking, dragging, or confirming a selection through a shortcut key, the system locates the first element corresponding to the selection operation according to the selection operation, and uses the element as the object of subsequent processing. Subsequently, the system parses the first element and extracts the first text content and the first image content contained therein. For the extraction of text content, the system can identify the text area based on the page structure information (such as HTML tags, DOM tree nodes) and read the corresponding character data; for the extraction of image content, the system can load the corresponding image file or image data block by traversing the image resource reference address inside the element.
[0041] For the step of extracting the first text content and the first image content, one optional method is: obtain the data type of each component inside the element by parsing the front-end page structure definition language (such as HTML or XML), and then extract the text and image information separately according to the data type; another optional implementation method is: analyze the entire element screenshot through an image segmentation algorithm, automatically identify the text area and image area, and extract their contents separately.
[0042] In a specific embodiment of the present invention, a user selects an ad banner element in the element copy interface of a webpage editing tool. After the system detects the user's selection, it locates the first element corresponding to the ad banner and parses it. By analyzing the structural information of the element, the system identifies content such as the title text, description paragraph, and background image. The system then extracts the text data and image data of these components, forming the first text content and the first image content, which serve as the basic data for subsequently generating new elements.
[0043] Furthermore, obtaining the first element selected by the front end includes: determining the number of copies in response to the selection operation of the front end in the element copy interface; inputting the first text content and the first text description information into the semantic generation model to generate the second text content and the second text description information, including: inputting the first text content and the first text description information into the semantic generation model to generate the number of copies of the second text content and the number of copies of the second text description information.
[0044] Among them, the number of copies refers to the number of second elements to be generated in batches specified by the user through interactive operations (such as entering a numerical value or selecting an option) in the element copy interface; the semantic generation model is the core algorithm module that generates new text with the same structure but different content based on text content and image description information.
[0045] In actual use, the system continuously monitors user actions on the front-end interface to identify whether a selection action for a specific element has been triggered in the element duplication interface. Upon detecting this action, the system not only identifies the selected element as the first element but also further analyzes the user's interaction to extract the number of copies. This number can be obtained in various ways, such as by adjusting the value by the user clicking the "+" or "-" buttons, manually entering the content in the numeric box, or automatically matching recommended values from a preset template. The system then feeds the extracted first text content and first text description information as joint input to the semantic generation model. This model possesses multimodal understanding capabilities, analyzing the semantic structure of the original text based on the input information and incorporating visual features from the image description to generate multiple new text contents and corresponding description information with differentiated representations while maintaining the field layout. Specifically, based on the number of copies, the system instructs the semantic generation model to output a corresponding number of second text contents and second text description information. Each output follows the same semantic constraints but is differentiated in terms of vocabulary, sentence structure, and context.
[0046] For the step of inputting the first text content and the first text description information into the semantic generation model to generate multiple outputs, one optional method is: introducing a diversity sampling strategy in the model inference stage, for example, by adjusting the temperature parameter (temperature) to control the randomness of the language model output, thereby obtaining text results with different styles; another optional implementation method is: adopting a multi-path generation mechanism, that is, applying different types of semantic expansion instructions (such as promotional, educational, and emotional) to the same input to generate text content that meets the needs of different application scenarios.
[0047] In a specific embodiment of the present invention, a user selected a promotional banner element in the element copy interface of an advertising design platform and set the number of copies to "5". The system extracted the title text "Summer beach vacation, limited-time discount open" and the corresponding picture description "The beach under the sunset, the waves lapping the coast" in the banner. Subsequently, the system input this information into the semantic generation model and instructed it to generate 5 sets of new text content and description information. The model sequentially output five versions of the second text content, such as "Island style travel season, special offer countdown", "Cool and easy travel in the summer, limited-time discounts", etc., as well as corresponding second text description information, such as "Blue waters surround the coconut island", "Sunshine falls on the tropical beach", etc. Each set of content maintains the original structural logic, but has its own characteristics in semantic expression.
[0048] Based on this, the system can automatically generate multiple text contents and description information with consistent structure but different content according to the number of copies specified by the user, meeting the needs of batch design tasks while improving the diversity and adaptability of element generation.
[0049] Step 104: Input the first image content into the image analysis model to generate first text description information, and input the first text content and the first text description information into the semantic generation model to generate second text content and second text description information, wherein the second text content and the second text description information are used to describe a second element with the same structure as the first element but different content.
[0050] Among them, the image analysis model is used to convert the image content into text information describing its visual features; the semantic generation model is used to generate an output with consistent semantics but changed content based on the input text content and image description; the first text description information is a semantic interpretation of the first image content; the second text content and the second text description information respectively represent new text content whose structure inherits the first element but is adjusted at the semantic level.
[0051] In actual applications, the system first inputs the extracted first image content into an image analysis model. This model can be a deep learning-based image recognition network, such as a convolutional neural network combined with a visual transformer architecture. It can extract features from the input image and output a natural language description of the image content, i.e., the first text description information. This description may include semantic information such as the main object in the image, the background environment, the color style, and the composition features.
[0052] Subsequently, the system takes the first text content and the first text description information as joint input and feeds them into a pre-trained semantic generation model. This model can be a large-scale language model with multimodal fusion, which has the ability to understand the relationship between text and image descriptions. The model analyzes the overall semantic expression of the original element based on the input information, and generates new text content, namely the second text content, and the second text description information used to guide image generation. These two outputs maintain the same structural layout logic as the original elements, but have differentiated expressions in content, such as replacing key words, adjusting the tone and style, changing the scene setting, etc. to achieve content innovation.
[0053] For the step of inputting the first image content into the image analysis model to generate the first text description information, one optional method is: using a region-based target detection model to identify key objects and their attributes in the image, and splicing them into a coherent text description; another optional implementation method is: using an end-to-end image caption generation model to directly generate a natural language description without explicitly identifying individual objects.
[0054] In a specific embodiment of the present invention, the system receives a background image and title text from an advertising banner element. The image analysis model processes the background image, identifies the main subject of the image as a beach sunset scene, and outputs "a beach at sunset, waves lapping the sand, and the sky appears orange-red" as the first text description information. The semantic generation model receives this description and the original title text "Summer Vacation Specials," and after comprehensive analysis, outputs new text content "Limited-time island tour" and corresponding description information "Tropical island scenery, blue waters surrounded by coconut trees." These outputs will be used to subsequently construct new elements with the same structure but different content.
[0055] Furthermore, the first image content is input into the image analysis model to generate first text description information, including: constructing first prompt information containing image structure parsing instructions, wherein the image structure parsing instructions are used to indicate the output of a standardized description containing subject, background, category and style fields; inputting the first prompt information and the first image content into the image analysis model together to obtain a structured description result as the first text description information.
[0056] Image structure parsing instructions are specific operational instructions issued to the image analysis model, designed to guide the model to output descriptive information in a specific format. These descriptions should include four key fields: subject, background, category, and style. Subject refers to the main object or focal point in the image; background refers to the surrounding environment or scene behind the subject; category refers to the main type or classification of the image, such as landscape, people, or architecture; and style refers to the overall artistic style or visual effect of the image.
[0057] In practical applications, a detailed prompt must first be constructed based on the task requirements. This prompt should clearly indicate the desired output format and requirements, such as a detailed description of the subject, background, category, and style. The first image to be analyzed is obtained and prepared along with the constructed prompt. The system processes the image using the selected image analysis model. This process involves passing the image data and prompt information as parameters to the model. After receiving the input, the model begins its analysis, identifying the elements in the image and generating a structured description based on the prompt information. This description includes not only a description of the image subject but also its context, category, and overall artistic style. Regarding the step of constructing the first prompt information containing instructions for image structure analysis, one option is to explicitly define the desired output format directly in the prompt. Another option is to indirectly guide the model's understanding of the required format by providing example descriptions. Regardless of the approach, the ultimate goal is to ensure that the generated description accurately reflects the key information of the image.
[0058] In a specific embodiment of the present invention, there is a photograph showing a city night scene (first image content). The constructed prompt information may include "Please provide a detailed description of the image subject, background, category, and style." The system inputs this photo and the prompt information into a pre-trained image analysis model. The model analyzes the photo and recognizes that the subject is a towering skyscraper, the background is a bustling city night scene, the category is urban scenery, and the style tends to be modern urban. Based on this information, the model generates a structured descriptive text that comprehensively summarizes the core features of the photo.
[0059] Based on this, the system can accurately extract and describe key information from images, resulting in a deeper and more precise understanding of the image content. This structured description method can effectively improve the efficiency and accuracy of subsequent tasks, such as automatic annotation and search optimization, thereby providing users with a richer information retrieval and service experience. At the same time, this approach also enhances the ability to understand image content, helping to improve the quality of related applications.
[0060] Furthermore, before inputting the first text content and the first text description information into the semantic generation model to generate the second text content and the second text description information, it also includes: generating a semantic extension instruction based on the content characteristics of the first element, wherein the semantic extension instruction is used to instruct to maintain the original field structure and replace the differentiated content; accordingly, inputting the first text content and the first text description information into the semantic generation model to generate the second text content and the second text description information, including: constructing a second prompt information including the semantic extension instruction, the first text content and the first text description information; and inputting the second prompt information into the semantic generation model.
[0061] Among them, the semantic extension instruction refers to the instruction information used to guide the semantic generation model to replace or adjust the key semantic fields in the text while maintaining the original content structure; the second prompt information is the input instruction formed by integrating the semantic extension instruction, the first text content and the first text description information, which is used to guide the model to generate output with structural consistency but differentiated content.
[0062] In actual applications, before performing the semantic generation task, the system first analyzes the content features of the first element, including its text structure, keyword distribution, and its relationship with the image description. Based on these features, the system generates a semantic expansion instruction. This instruction explicitly requires that the subsequent generation process retain the original field structure, such as modular components such as the title, subtitle, and body, and introduce differentiated content expressions in each module, such as replacing keywords, adjusting sentence style, or changing context settings. The system then integrates the semantic expansion instruction with the extracted first text content and first text description information to construct a complete second prompt information. This prompt information organizes the three types of input data in a unified format, allowing it to be effectively parsed by the semantic generation model and used as a basis for generation. Once constructed, the system inputs the second prompt information into a pre-trained semantic generation model, which can be a large language model with multimodal understanding capabilities. Based on the constraints in the prompt information and the input content, the system generates second text content and second text description information that meet structural consistency requirements and have semantic diversity.
[0063] For the step of generating semantic extension instructions, one optional method is to select extension rules suitable for the current content type from a preset instruction library based on a template matching mechanism; another optional implementation method is to dynamically generate instructions through natural language processing technology, such as using keyword extraction and semantic clustering methods to identify the core features of the content, and then automatically generate an adaptive extension strategy.
[0064] In a specific embodiment of the present invention, the first element includes a promotional copy: "Summer beach vacation, limited-time offer open", and the corresponding picture description is "The beach under the sunset, the waves lapping the shore." After analyzing the structure of the copy, the system generates a semantic expansion instruction: "Keep the title + description structure unchanged, replace 'summer beach' with 'winter snow mountain', and replace 'limited-time offer' with 'New Year special'." The system then integrates the instruction with the original copy and description information into a second prompt information, and inputs it into the semantic generation model. Based on the prompt, the model generates new text content: "Winter snow mountain trip, New Year special offer online" and new description information: "Snow-covered mountains, sunlight shining through the pine forest."
[0065] Based on this, by introducing semantic extension instructions, the system can actively control the direction of change of text content during the generation process, ensuring diversified expression of content while maintaining structural consistency, thereby improving the flexibility and applicability of batch generation of elements.
[0066] Furthermore, a semantic extension instruction is generated based on the content features of the first element, including: analyzing the field structure of the first text description information to determine the field type to be retained; extracting the semantic type tag in the first text content; generating a semantic extension instruction containing constraints based on the field type and the semantic type tag, wherein the constraints include image constraints and text constraints, the image constraints are used to indicate the generation of a new description with the same category as the original but a different subject, and the text constraints are used to indicate the generation of a new text that conforms to the semantic type tag, field type and has differentiated content.
[0067] Among them, the field structure refers to the standardized semantic components contained in the first text description information, such as subject, background, category and style; the semantic type tag is used to characterize the subject area or expression style to which the first text content belongs, such as promotional, educational or emotional; the constraints include image constraints and text constraints, which are used to control the balance between the generated new description in terms of visual category consistency and text semantic diversity.
[0068] In practical applications, the system first performs a structured analysis of the first text description information, identifying the distribution of fields within it, such as whether it contains standard fields such as subject, background, category, and style, and based on this, determines which fields need to be retained in the subsequent generation process. The system then extracts semantic type tags from the first text content. These tags can be obtained through natural language processing techniques (such as keyword extraction, topic modeling, or syntactic analysis) to represent the core semantic features and expression intent of the original text.
[0069] Based on the identified field type and semantic type marker, the system generates a semantic expansion instruction with clear constraints. The image constraint in this instruction requires that the image description retain the original category, with only the main object being replaced, for example, replacing "beach" with "forest." The text constraint requires that the generated new text conform to the original field structure and be semantically consistent with the semantic type marker, while also achieving differentiated content expression, such as replacing the product name or discount method in promotional copy.
[0070] For the step of analyzing the field structure of the first text description information, one optional method is to use a regular matching mechanism to identify predefined field labels; another optional implementation method is to use an unsupervised learning method to automatically cluster similar semantic units and annotate their structural attributes.
[0071] In one specific embodiment of the present invention, the first text description is "A beach under the setting sun, waves lapping the shore." Analysis identifies the field structure as comprising the subject "beach," the background "waves," the category "natural scenery," and the style "romantic realism." Simultaneously, the first text content, "Summer beach vacation, limited-time offer available," is extracted and its semantic type is marked as "tourism promotion." Based on this information, the system generates semantic expansion instructions: "Keep the category as 'natural scenery,' replace the subject with 'snow-capped mountains,' and generate a new description; maintain the title + body structure for the text portion, and generate a differentiated representation around the theme of 'tourism promotion.'"
[0072] Based on this, through the joint analysis of field structure and semantic type tags, the system can accurately construct semantic extension instructions with dual constraints, introducing content diversity while ensuring semantic coherence, thereby improving the controllability and flexibility of the element generation process.
[0073] Step 106: Input the second text description information into the image generation model to generate second image content, and combine the second image content with the second text content to generate a second element.
[0074] Among them, the image generation model is used to generate picture content that matches the text description information; the second picture content is a new image generated based on the second text description information, which is adapted to the first element in visual style and structural layout; the second element is a complete interface element formed by the combination of the second text content and the second picture content.
[0075] In actual applications, the system inputs the second text description information output by the semantic generation model into the image generation model. The model can be a multimodal image generation system based on a diffusion mechanism or a generative adversarial network architecture, which can understand the input natural language description and generate image content that conforms to the description. During the generation process, the image generation model will refer to the visual style characteristics of the original element, such as color matching, composition ratio, lighting effects, etc., to ensure that the generated second image content is consistent with the first element in overall style, but the specific content presents different themes or scenes.
[0076] After the second image content is generated, the system combines it with the second text content to form a complete second element. This combination process includes aligning the layout structure of the text and image, adjusting the font style and image size to match the design specifications of the original element, and ensuring the visual harmony of the two. The combined second element can be directly used in subsequent interface display, editing, or export operations, and can be completed in batches without manual intervention.
[0077] For the step of inputting the second text description information into the image generation model to generate the second picture content, one optional method is: using a pre-trained text-to-image diffusion model to generate a high-quality image through gradual denoising; another optional implementation method is: using a conditional generative adversarial network, with the second text description information as conditional input, to guide the generation of image content that meets the description.
[0078] In one specific embodiment of the present invention, the system receives a second text description, "Tropical island scenery, turquoise waters surrounded by coconut trees," and inputs it into the image generation model. Based on this description, the model generates an image depicting the island scenery, including clear water, sandy beaches, and coconut trees. The system then combines this image with the second text content, "Limited-time island adventure," aligning the image and text and formatting them according to the layout of the original ad banner. Ultimately, the system generates an ad element with the same structure but completely new content.
[0079] Furthermore, the second text description information is input into the image generation model to generate the second image content, including: constructing an image generation instruction according to the field of the second text description information, wherein the image generation instruction contains dynamic control parameters, and the dynamic control parameters include specifying the generated image type according to the category field and the aesthetic features of the generated image according to the style field constraints; generating third prompt information based on the image generation instruction; and calling the image generation model based on the third prompt information to generate the second image content.
[0080] Among them, the image generation instruction is task guidance information constructed based on the structured field of the second text description information, which is used to control the output direction of the image generation model; the dynamic control parameter refers to a set of parameters extracted based on the category field and style field, which is used to adjust the generated image type and aesthetic characteristics; the third prompt information is input data formed by integrating the image generation instruction and the second text description information, which is used to drive the image generation model to perform specific tasks.
[0081] In practice, the system first parses the structured fields within the second text description, including semantic units such as subject, background, category, and style. Based on this information, it constructs image generation instructions, which include dynamic control parameters. Specifically, the category field specifies the basic type of generated image, such as landscape, figure, or abstract pattern; the style field constrains the visual aesthetic characteristics of the generated image, such as realism, watercolor, retro, or futuristic. Dynamic control parameters can be further refined into sub-items such as color preference, composition, and lighting effects to enhance the control precision of the generation process.
[0082] The system then merges the image generation instructions with the unstructured description in the second text description to generate a complete third prompt. This prompt not only contains the specific image generation requirements but also retains the linguistic style and details of the original description, ensuring that the generated result not only meets the structured constraints but also has the richness and expressiveness of natural language description.
[0083] Next, the system invokes an image generation model based on the third prompt. This model can be a multimodal image generation system based on a diffusion mechanism or a conditional generative adversarial network. It can understand the input prompt information and, combined with dynamic control parameters, generate a second image that meets the desired content. During the generation process, the model prioritizes satisfying the category and style constraints in the image generation instructions, while also reproducing as much detail as possible in the description, such as the positional relationship of specific objects and color matching.
[0084] For the step of constructing image generation instructions, one optional method is to directly map the structured fields to parameter labels supported by the model, such as "category = landscape, style = watercolor"; another optional implementation method is to automatically translate the structured fields into control vectors that the model can recognize through a pre-trained instruction converter, thereby achieving more flexible parameter configuration.
[0085] In a specific embodiment of the present invention, the second text description is "A lake beneath the snow-capped mountains, shrouded in morning mist, with a style leaning towards Nordic minimalism." After parsing the description, the system extracts the category field "Scenery" and the style field "Nordic Minimalism," and constructs an image generation instruction based on this: "Generate a landscape image, with a style limited to Nordic minimalism, using cool colors as the primary colors, simple composition, and an emphasis on natural lines." The system then merges this instruction with the original description to form a third prompt, which is input into the image generation model. Based on this prompt, the model generates a picture of a snowy lake. The overall picture is clean, with clear lines and predominantly blue and white colors, showcasing a typical Nordic aesthetic style.
[0086] Based on this, through structured analysis and dynamic parameter configuration of the second text description information, the system can accurately control the image type and aesthetic characteristics when generating images, thereby improving the controllability and consistency of the generated results, meeting diverse design needs while maintaining a unified style.
[0087] Furthermore, combining the second image content with the second text content to generate a second element includes: replacing the image area in the first element with the second image content; and replacing the corresponding text area in the first element with the second text content.
[0088] The second image content refers to the new image data that needs to be replaced, and the second text content refers to the new text information. The first element is the original design or document, which includes the image area and text area to be replaced.
[0089] In actual application, the position and size of the image area and text area in the first element are first identified. For the identification of the image area, the system can accurately locate the image to be replaced by parsing the object properties in the design file or using the selection tool in the graphic editing software. Once the position is determined, the system can replace it by directly overwriting the original image, or by deleting the old image, inserting a new image, and adjusting its size and position to match the original image size. For the text area, the system must first find the text box or specific mark in order to accurately locate the text paragraph. Next, use the text editing tool or programming interface to replace the original text information with the second text content, while ensuring that the consistency of the original text format is maintained, such as style features such as font, color, and size.
[0090] For the image replacement part of the step, one optional method is to modify the source file link directly in the design file to point to the new image resource. The advantage of this is that it can be updated quickly without having to readjust the layout. Another optional implementation method is to manually replace the image in the graphic editing software and fine-tune the position and size of the image as needed. This method is suitable for situations that require precise control. For the text replacement part, in addition to directly replacing the text content, you can also consider optimizing the text, such as checking for grammatical errors or improving reading fluency, but this is not a required step.
[0091] In one specific embodiment of the present invention, assume that there is a design draft for a product brochure as the first element, which contains an old product photo as the image area and a product description as the text area. To update the brochure's content, the system obtains a new product photo (the second image content) and the latest product description copy (the second text content). The system first locates the location of the old photo in the design draft and replaces it with the new photo, resizing it to fit the original photo frame. Next, the system locates the product description text box and replaces the original text with the latest copy, while maintaining the original font style.
[0092] Based on this, by precisely replacing the images and text in the first element, the system can effectively update the brochure's information, ensuring that the promotional material maintains the original design aesthetic while reflecting the latest product information. This operation not only improves the efficiency of information updates but also ensures the quality of visual presentation, meeting the high standards required for professional documentation and design works. The system can flexibly respond to diverse design needs, providing a simple and effective solution for maintaining and updating multimedia content.
[0093] Further, after generating the second element, further comprising: in response to the determination operation of the front end, determining an element design draft in the element replication interface; based on the element layout rule corresponding to the element replication interface, inserting the second element into the element design draft; displaying the element design draft containing the second element in the element replication interface and receiving user feedback; based on the user feedback, adjusting the second element in the element design draft.
[0094] Among them, the element design draft refers to a visual layout document used to show and edit the combination effect of multiple elements in the element replication interface; the element layout rule is a pre-set typesetting logic used to standardize the arrangement of elements in the design draft; the user feedback refers to the modification suggestion or confirmation information made by the user on the presentation effect of the second element in the design draft.
[0095] In actual application, after generating the second element, the system first monitors whether the front end triggers the determination operation, which is usually triggered by the user clicking the "Confirm" button, submitting the form or performing similar interactive behaviors. In response to this operation, the system loads and displays the current element design draft in the element replication interface as the basis for subsequent insertion and adjustment. Subsequently, the system inserts the newly generated second element into the specified position of the design draft according to the element layout rule associated with the element replication interface. The layout rule can include grid alignment mechanism, spacing control strategy, hierarchical management logic, etc. to ensure that the new element maintains visual consistency and structural coordination with the existing content.
[0096] After completing the insertion operation, the system renders the element design draft containing the second element in the element replication interface in real time and waits to receive user feedback. The user can directly edit the second element on the interface, such as dragging the position, adjusting the size, modifying the style, or parameterizing the settings through interactive controls (such as sliders, drop-down menus). The system continuously listens to the user's operation behavior, identifies its feedback content, and parses it into corresponding adjustment instructions. Based on user feedback, the system dynamically updates the second element in the design draft, including its content, layout or style attributes, thereby realizing the iterative optimization of the design draft.
[0097] For the step of adjusting the second element in the element design draft based on user feedback, one optional way is to capture the user's mouse drag trajectory and click behavior through event listening mechanism, and update the element's position and state in real time; another optional implementation way is to convert the user's input text feedback (such as "font too small", "background color not coordinated") into structured instructions, and call the style engine for automatic adjustment.
[0098] In a specific embodiment of the present invention, after the system generates a second element in the style of an advertising banner, the user clicks the "Confirm Add" button in the element copy interface to trigger the confirmation operation. The system loads the current advertising design draft and inserts the second element into the blank area on the right side of the design draft according to the preset grid layout rules. The design draft is then refreshed and the effect of the newly added element is displayed. After observation, the user finds that the title text of the element is too long, which affects the overall aesthetics, so the title content is shortened through the text editing box on the interface. After the system detects this modification, it immediately updates the text content of the second element and synchronously refreshes the display effect of the design draft, so that the adjusted advertising design draft is more in line with user expectations.
[0099] Based on this, by introducing a user feedback mechanism, the system can obtain users' interactive opinions in a timely manner after the second element is inserted into the design draft, and dynamically adjust the element expression accordingly, thereby improving the flexibility and user participation of the design process, and enhancing the accuracy and adaptability of the final output results.
[0100] Furthermore, after generating the second element, the method further includes: receiving feedback information from the front end; and adjusting the semantic generation model and the image generation model based on the feedback information.
[0101] Among them, feedback information refers to the adjustment opinions or modification instructions input or triggered by the user on the front-end interface regarding the presentation effect of the second element; the semantic generation model and image generation model are the core algorithm modules for generating text content and image content respectively, and their parameters can be dynamically optimized based on the feedback information.
[0102] In actual applications, after completing the generation of the second element and inserting it into the design draft, the system continuously monitors the interactive behavior of the front-end interface and receives feedback from users. This feedback information can be explicitly input text opinions (such as "the text is not attractive enough" or "the picture style does not match"), or it can be behavioral data implicitly extracted through user operations (such as modification, replacement or reformatting of element content). The system parses the received feedback information, identifies problem descriptions involving dimensions such as text expression, visual style, and structural adaptation, and constructs model adjustment instructions based on these problem descriptions.
[0103] Subsequently, the system adjusts the semantic generation model and the image generation model separately or jointly based on the content type of the feedback information. For feedback related to the quality of text expression, such as insufficient appeal of the copy or deviation of semantics from expectations, the system converts the feedback information into text generation optimization signals and adjusts the keyword selection strategy, sentence generation logic, or semantic constraints in the semantic generation model. For feedback related to visual expression, such as inconsistent image style or unclear subject features, the system updates the style control parameters, subject recognition weights, or composition guidance mechanism in the image generation model. These adjustments can be achieved by fine-tuning model parameters, updating prompt information construction rules, or reconstructing input constraints to improve the quality of subsequent generation results.
[0104] Regarding the step of adjusting the semantic generation model and the image generation model based on feedback information, one optional method is: using an online learning mechanism to convert user feedback into part of the training sample in real time and perform incremental training on the model; another optional implementation method is: converting the feedback content into model parameter adjustment instructions through a rule mapping mechanism, such as enhancing the generation tendency of a certain style or limiting the frequency of use of certain words.
[0105] In a specific embodiment of the present invention, after the system generates a set of promotional advertising elements, the user manually replaces one of the images on the front-end interface and modifies the title copy. The system analyzes the user's replacement behavior and identifies that the original generated image fails to meet the requirements in terms of subject expression. At the same time, it detects that the title modification mainly focuses on highlighting the discount information. Subsequently, the system interprets these behavioral feedbacks as model adjustment signals: on the one hand, it strengthens the subject recognition and style matching capabilities of the image generation model; on the other hand, it adjusts the keyword priority of the "promotion" semantic type in the semantic generation model. After the above adjustments, the elements generated in the next round have obvious improvements in visual subject consistency and copy marketing orientation.
[0106] Based on this, the system can dynamically optimize the semantic generation model and image generation model by receiving and analyzing user feedback, thereby improving the quality of subsequent generated elements and user satisfaction, making the generation process more adaptive and interactive.
[0107] An embodiment of the present invention realizes that by extracting the text content and image content of the first element, and then combining it with the semantic model to generate differentiated description information with the same structure but different content, the second element is finally generated. While maintaining the structural consistency of the first element, the second element with differentiated content is automatically generated, so that the elements generated in batches maintain a unified style and can naturally adapt to different application scenarios, effectively solving the current situation of lack of diversity in manual copying.
[0108] The following combined Figure 2, taking the application of the element generation method provided by the present invention in element intelligent replication as an example, the element generation method is further explained. Figure 2 A flowchart of a processing process of an element generation method provided by an embodiment of the present invention is shown, which specifically includes the following steps.
[0109] Step 202: The user selects a design draft element.
[0110] Specifically, the user selects a visual element in the design editing interface by clicking or touching the mouse, such as a graphic card, button, ad space, or other components that combine images and text. The system automatically identifies the sub-element structure contained in the element, including image areas, text areas, icons, and other replaceable content modules, and extracts its layout information (such as position, size, and hierarchical relationships) and style attributes (such as font color, background color, border style, etc.). At the same time, the system encapsulates this information as structured data for use in subsequent processes.
[0111] Step 204: Drag to select the number of copies.
[0112] Specifically, after selecting the target element, the user selects the number of copies to be generated by dragging. For example, when dragging horizontally on the canvas, the system determines the number of copies the user intends to make based on the drag distance or the number of stop points; or the system allows the user to manually enter a specific number through a pop-up number selection panel. The system will preview the arrangement of the copied elements in real time based on the user's operation behavior, including automatic adjustment of spacing, alignment, and maintaining the coordination of the overall layout. This process eliminates the need for users to manually create and adjust each element one by one, significantly improving design efficiency.
[0113] Step 206: Extract the content (text, image) in the element.
[0114] Specifically, the content of an element is extracted. Content elements include text and images. First, the information of the selected element is downloaded, and the text elements and image elements are filtered out.
[0115] Step 208: The multimodal large model generates a description of the image.
[0116] Specifically, during the copying process, a multimodal large model is used to describe and generate the image.
[0117] The specific format of the multimodal large model output is as follows:
[0118] {
[0119] "subject":""
[0120] "background":"",
[0121] "category":"",
[0122] "style":""
[0123] }
[0124] Among them, subject describes the main content of the image; background describes the background content of the image; category describes the category of the image, which can be photo, illustration, avatar, etc.; style describes the style of the image and may be empty. For example, it can be described as:
[0125] {
[0126] "subject":"a woman",
[0127] "background":"aplain backdrop",
[0128] "category":"illustration",
[0129] "style":null,
[0130] }
[0131] This indicates an image with a woman as the subject, a blank background, and an unstyled illustration.
[0132] Image generation models can take text as input and output an image that matches that description.
[0133] Step 210: The large language model generates text and image descriptions of the copied content.
[0134] Specifically, when an element is copied, the multimodal large model first generates a description of the image, and then combines it with other text to generate a similar description. Figure 3 As shown in (a), Figure 3 This is a schematic diagram of element replication generation provided by an embodiment of the present invention. The overall description of element (a) is:
[0135] {
[0136] "0":"a woman,aplain backdrop",
[0137] "1":"Sophia",
[0138] "2":"New series unveiled · City A",
[0139] "3":"1.283 million followers",
[0140] "4":"Follow"
[0141] }
[0142] The description of “a woman with a plain backdrop” is the description of Image 1. When two similar elements are copied, the large language model will generate a description similar to the following:
[0143] {
[0144] "0":"a man,a cityscape backdrop",
[0145] "1":"Michael",
[0146] "2":"Latest Release·City B",
[0147] "3":"980,000 followers",
[0148] "4":"Follow"
[0149] }
[0150] {
[0151] "0":"a couple,nature backdrop",
[0152] "1":"Emily&James",
[0153] "2":"Exciting Activities·City C",
[0154] "3":"756,000 followers",
[0155] "4":"Follow"
[0156] }
[0157] Step 212: The image generation model generates an image.
[0158] Specifically, the image generation model generates images 2 and 3 according to "0":"a man, a cityscape backdrop" and "0":"a couple, a nature backdrop".
[0159] Step 214: Combine and generate content to display the copy result.
[0160] Specifically, after completing image generation and text expansion, the system intelligently combines the newly generated image and text content according to the original element layout structure, ensuring that each copied element is highly consistent with the original element in terms of visual style, layout logic, and interaction consistency. After the combination is complete, the system inserts all copied elements into the designated location of the design draft in preview form, and supports users in making local fine-tuning, such as replacing a certain picture, modifying a certain text, or adjusting the overall color scheme. In addition, the system also provides a one-key export function, allowing users to directly export the final result as a design file or code snippet, facilitating integration into the actual development process. The entire process realizes the closed-loop automation of "selection - copy - generation - display". Referring to Figure 3 as shown in (a) before copying, comprising; Figure 3
[0161] Image 1: The circular area on the left side represents a user avatar or icon.
[0162] Sophia: The text on the right side above the image represents the username.
[0163] New series debut: The text below the username describes the content or activity information related to the user.
[0164] 128.3 million fans: The text in the upper right corner shows the number of fans of the user.
[0165] Follow: The button in the lower right corner prompts the user to click to follow.
[0166] Figure 3 (b) after copying, comprising;
[0167] Image 2: The circular area on the left side represents another user avatar or icon.
[0168] Michael: The text on the right side above the image represents the new username.
[0169] Latest release: The text below the username describes the content or activity information related to the new user.
[0170] 98 million fans: The text in the upper right corner shows the number of fans of the new user.
[0171] Follow: The button in the lower right corner prompts the user to click to follow.
[0172] Figure 3 (c) after copying, comprising;
[0173] Image 3: The circular area on the left side represents a third user avatar or icon.
[0174] Emily & James: The text located above the right side of the image indicates the new username, which is a combined name.
[0175] Wonderful Activities·City C: The text below the user name describes the content or activity information related to the new user.
[0176] 756,000 followers: The text in the upper right corner shows the number of followers of the new user.
[0177] Follow: A button located in the lower right corner, prompting users to click to follow.
[0178] By utilizing multimodal large models and image generation models, we can achieve intelligent replication of images in design draft elements, creating replica images that are consistent with the context but different.
[0179] Corresponding to the above method embodiment, the present invention also provides an element generation device embodiment, Figure 4 FIG. 1 shows a schematic structural diagram of an element generation device provided by an embodiment of the present invention. Figure 4 As shown, the device includes:
[0180] The extraction module 402 is configured to, in response to a selection operation on the element copy interface, obtain a first element corresponding to the selection operation, and extract the first text content and the first image content from the first element;
[0181] A generation module 404 is configured to input the first image content into an image analysis model to generate first text description information, and input the first text content and the first text description information into a semantic generation model to generate second text content and second text description information, wherein the second text content and the second text description information are used to describe a second element that has the same structure as the first element but different content;
[0182] The combining module 406 is configured to input the second text description information into the image generation model to generate second image content, and combine the second image content with the second text content to generate a second element.
[0183] Optionally, the generation module 404 is further configured to construct a first prompt information including an image structure parsing instruction, wherein the image structure parsing instruction is used to indicate the output of a standardized description including subject, background, category and style fields; the first prompt information and the first picture content are input into the image analysis model together to obtain a structured description result as the first text description information.
[0184] Optionally, the generation module 404 is further configured to generate semantic expansion instructions based on the content features of the first element, wherein the semantic expansion instructions are used to instruct to keep the original field structure and replace the differentiated content; construct second prompt information containing the semantic expansion instructions, the first text content and the first text description information; and input the second prompt information into the semantic generation model.
[0185] Optionally, the generation module 404 is further configured to analyze the field structure of the first text description information, determine the field type to be retained; extract semantic type markers in the first text content; and generate semantic expansion instructions containing constraint conditions according to the field type and the semantic type markers, wherein the constraint conditions include picture constraint conditions and text constraint conditions, the picture constraint conditions are used to instruct to generate new descriptions with the same original category but different subjects, and the text constraint conditions are used to instruct to generate new texts that meet the semantic type markers, the field type and content differentiation.
[0186] Optionally, the extraction module 402 is further configured to determine the number of copies in response to the selection operation of the front end on the element copy interface; and input the first text content and the first text description information into the semantic generation model to generate the number of second text contents and the number of second text description information.
[0187] Optionally, the combination module 406 is further configured to generate image generation instructions according to the field structure of the second text description information, wherein the image generation instructions contain dynamic control parameters, and the dynamic control parameters include generating picture types according to category fields and constraining aesthetic features of the generated pictures according to style fields; generate third prompt information based on the image generation instructions; and call the image generation model to generate second picture content based on the third prompt information.
[0188] Optionally, the combination module 406 is further configured to replace the second picture content in the picture area of the first element; and replace the second text content in the corresponding text area of the first element.
[0189] Optionally, the element generation apparatus further comprises a display module configured to determine an element design draft on the element copy interface in response to a determination operation of the front end; insert the second element into the element design draft based on the element layout rules corresponding to the element copy interface; display the element design draft containing the second element on the element copy interface and receive user feedback; and adjust the second element in the element design draft based on the user feedback.
[0190] Optionally, the element generation apparatus further comprises a feedback adjustment module configured to receive feedback information fed back by the front end; and adjust the semantic generation model and the image generation model based on the feedback information.
[0191] Applied to the element generation device, first, the extraction module 402 is responsible for obtaining the first element selected by the front end in the element copy interface, and extracting the first text content and the first image content therefrom. Next, the generation module 404 inputs the first image content into the image analysis model to generate the first text description information, and then combines the first text content and the first text description information, and uses the semantic generation model to generate the second text content and the second text description information with the same structure as the first element but different content. This process ensures that the newly generated second element has differentiated description information while maintaining the consistency of the original structure. Finally, the combination module 406 receives the second text description information and inputs it into the image generation model to generate the second image content, and then combines this image content with the second text content to finally synthesize the second element. In this way, the entire device can not only automatically generate elements of a unified style in batches, but can also naturally adapt to different application scenarios, effectively solving the limitation of lack of diversity in manual copying, so that the generated elements are both consistent and retain their own characteristics.
[0192] The above is a schematic diagram of an element generation device according to this embodiment. It should be noted that the technical solution of the element generation device and the technical solution of the element generation method described above are based on the same concept. For details not described in detail in the technical solution of the element generation device, please refer to the description of the technical solution of the element generation method described above.
[0193] Figure 5 1 shows a block diagram of a computing device 500 according to an embodiment of the present invention. Components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.
[0194] The computing device 500 also includes an access device 540 that enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 540 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, or a near field communication (NFC) interface.
[0195] In one embodiment of the present invention, the above components of the computing device 500 and Figure 5 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 5 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of the present invention. Those skilled in the art may add or replace other components as needed.
[0196] Computing device 500 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 500 may also be a mobile or stationary server.
[0197] The processor 520 is configured to execute the following computer program / instruction, which implements the steps of the above-mentioned element generation method when executed by the processor.
[0198] The various embodiments in the present application are described in a progressive manner, and the same or similar parts among the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the computer device embodiment is basically similar to the element generation method embodiment, and thus the description is relatively simple, and the relevant parts can be referred to the description of the element generation method embodiment.
[0199] An embodiment of the present application further provides a computer readable storage medium, which stores computer programs / instructions, and the computer programs / instructions are executed by a processor to realize the steps of the element generation method.
[0200] The various embodiments in the present application are described in a progressive manner, and the same or similar parts among the various embodiments can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, the computer readable storage medium embodiment is basically similar to the element generation method embodiment, and thus the description is relatively simple, and the relevant parts can be referred to the description of the element generation method embodiment.
[0201] An embodiment of the present application further provides a computer program product, which comprises computer programs / instructions, and the computer programs / instructions are executed by a processor to realize the steps of the element generation method.
[0202] The above is a schematic scheme of the computer program product of the embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the element generation method belong to the same concept, and the details of the technical scheme of the computer program product which are not described in detail can be referred to the description of the technical scheme of the element generation method.
[0203] The above describes a specific embodiment of the present application. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims can be performed in a different order than the order in which they are recited and still accomplish desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0204] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media does not include electric carrier signals and telecommunication signals.
[0205] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the embodiments of the present invention.
[0206] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0207] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. The alternative embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of the embodiments of the present invention. The present invention selects and describes these embodiments in detail to better explain the principles and practical applications of the embodiments of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for generating an element, characterized in that: include: In response to a selection operation on the element copy interface, obtaining a first element corresponding to the selection operation, and extracting first text content and first image content from the first element; Inputting the first image content into an image analysis model to generate first text description information, and inputting the first text content and the first text description information into a semantic generation model to generate second text content and second text description information, wherein the second text content and the second text description information are used to describe a second element that has the same structure as the first element but different content; The second text description information is input into an image generation model to generate second picture content, and the second picture content is combined with the second text content to generate the second element.
2. The method according to claim 1, characterized in that The step of inputting the first image content into the image analysis model to generate first text description information includes: Constructing first prompt information including an image structure parsing instruction, wherein the image structure parsing instruction is used to instruct output of a standardized description including subject, background, category, and style fields; The first prompt information and the first picture content are input into an image analysis model to obtain a structured description result as the first text description information.
3. The method according to claim 1, characterized in that In the step of inputting the first text content and the first text description information into the semantic generation model to generate the second text content and the second text description information correctly, the method further includes: generating a semantic expansion instruction based on the content feature of the first element, wherein the semantic expansion instruction is used to instruct to maintain the original field structure and replace the differentiated content; The step of inputting the first text content and the first text description information into the semantic generation model to generate the second text content and the second text description information includes: Constructing second prompt information including the semantic expansion instruction, the first text content and the first text description information; The second prompt information is input into a semantic generation model to generate second text content and second text description information.
4. The method according to claim 3, characterized in that The generating of the semantic expansion instruction based on the content feature of the first element includes: Analyzing the field structure of the first text description information to determine the field type to be retained; Extracting semantic type tags from the first text content; According to the field type and semantic type mark, a semantic expansion instruction containing constraint conditions is generated, wherein the constraint conditions include image constraint conditions and text constraint conditions, the image constraint conditions are used to indicate the generation of a new description that is the same as the original category but different in subject, and the text constraint conditions are used to indicate the generation of a new text that conforms to the semantic type mark, the field type and has differentiated content.
5. The method according to claim 1, wherein The obtaining of the first element selected by the front end includes: In response to a selection operation of the front end on the element copy interface, determining the copy quantity; The step of inputting the first text content and the first text description information into a semantic generation model to generate second text content and second text description information includes: The first text content and the first text description information are input into a semantic generation model to generate the number of copied second text contents and the number of copied second text description information.
6. The method according to claim 1, characterized in that The step of inputting the second text description information into the image generation model to generate the second image content includes: Constructing an image generation instruction according to the fields of the second text description information, wherein the image generation instruction includes dynamic control parameters, and the dynamic control parameters include specifying a generated image type according to the category field and constraining aesthetic features of the generated image according to the style field; generating third prompt information based on the image generation instruction; An image generation model is called based on the third prompt information to generate second image content.
7. The method according to claim 1, characterized in that The combining the second image content with the second text content to generate a second element includes: Replace the image area in the first element with the second image content; The second text content replaces the corresponding text area in the first element.
8. The method according to claim 1, characterized in that After generating the second element, the method further includes: In response to the determination operation of the front end, determining the element design draft on the element copy interface; Inserting the second element into the element design draft based on the element layout rule corresponding to the element copy interface; Displaying the element design draft including the second element on the element copy interface and receiving user feedback; Based on the user feedback, the second element in the element design draft is adjusted.
9. The method according to claim 1, characterized in that After generating the second element, the method further includes: Receiving feedback information from the front end; Based on the feedback information, the semantic generation model and the image generation model are adjusted.
10. An element generating device, characterized in that: include an extraction module configured to, in response to a selection operation on the element copy interface, obtain a first element corresponding to the selection operation, and extract first text content and first image content from the first element; a generation module configured to input the first image content into an image analysis model to generate first text description information, and input the first text content and the first text description information into a semantic generation model to generate second text content and second text description information, wherein the second text content and the second text description information are used to describe a second element that has the same structure as the first element but different content; The combination module is configured to input the second text description information into the image generation model to generate second picture content, and combine the second picture content with the second text content to generate the second element.
11. A computing device, characterized in that include: memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the element generation method according to any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, characterized in that It stores a computer program / instruction, which, when executed by a processor, implements the steps of the element generation method according to any one of claims 1 to 9.
13. A computer program product, characterized in that The method comprises a computer program / instruction, which, when executed by a processor, implements the steps of the element generation method according to any one of claims 1 to 9.
Citation Information
Cited By
Second-hand car copywriting generation method
CN122022915A