Design material automatic generation method and device based on design draft
By introducing automatic generation methods for design materials in the design software, including text translation, picture filling and copy filling functions, the time and infringement risks of designers when making international design drafts are solved, and the efficiency and sense of realism of design materials are improved.
Patent Information
- Application Number
- CN202411849419.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-25
AI Technical Summary
When a designer produces an international design draft, he needs to spend a lot of time on text translation and picture filling, and the downloaded pictures may have the risk of infringement, which affects the design efficiency and sense of reality.
It provides an automatic generation method for design materials based on design drafts, including text translation, picture filling and copy filling functions. Through the intelligent generation panel, it automatically generates design materials according to the setting options, improves generation efficiency and enhances the sense of reality.
It significantly improves the generation efficiency of design materials, enhances the authenticity and user experience of design materials, and reduces the designer's operation time and infringement risks.
Smart Images

Figure CN119693504A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software design, and in particular to a method and device for automatically generating design materials based on a design draft. Background Art
[0002] When designers are working on international projects, they often need to produce design drafts in different languages. For example, they first design a Chinese version of the design draft, and then translate the Chinese design draft into English or a special foreign language version of the design draft. The text translation process consumes a lot of time, and it also takes a lot of time to replace the translated texts into the design drafts in each language one by one, in order to produce multiple versions of the design draft in different languages.
[0003] In order to make the image materials in the design draft look more exquisite and more in line with the real UI page, a large number of design elements need to be filled with specific image content. For example, for the medical digital product interface, a large number of medical pictures such as hospitals (such as doctor portraits) are filled in the design draft. For the design draft of the food delivery platform, a large number of food pictures need to be filled. The current implementation method is for designers to find free pictures on the Internet, download them, and then fill them into the corresponding layers of the design draft. Not only is the operation cumbersome and time-consuming, but the downloaded pictures may also face the risk of infringement.
[0004] In order to make the text in the design draft look more realistic (avoid a large amount of "abc", "123" and other text content) and enhance the comprehensibility of the design draft, a large amount of text needs to be simulated into relatively real content. For example, in the table of the design draft, one of the columns is the address or phone number, so that the address or phone number displayed in this column is relatively real. For another example, the text that matches the food picture is matched below it. The current method is for designers to manually enter the text content that looks relatively real one by one, which takes up more of the designer's collection and thinking time. And for designers, making the text look more realistic is not a design task that every designer must do. Symbols such as "abc" or "123" can be used instead of text content such as address or phone number.
[0005] To solve the above problems, the present invention develops a method and device for automatically generating design materials based on design drafts, so as to improve the generation efficiency of design materials and enhance the realism of design materials and user experience. Summary of the invention
[0006] In view of the above problems, a method and device for automatically generating design materials based on design drafts are proposed to improve the generation efficiency of design materials and enhance the realism of design materials and user experience.
[0007] According to one aspect of the present invention, a method for automatically generating design materials based on a design draft is provided, comprising:
[0008] Select a target element in the canvas page design, wherein the target element includes a text element and a layer element;
[0009] In response to the functional operation of the design material intelligent generation panel, the functional operation includes text translation, picture filling and copy filling;
[0010] Wherein, when the functional operation is text translation, the text of the text element is translated according to the setting options of the text translation;
[0011] When the functional operation is picture filling, at least one picture material is generated according to the setting options of picture filling or the picture description, and the picture material is filled into the layer element;
[0012] When the functional operation is text filling, the text content is generated according to the setting options of the text filling, and the text of the text element is replaced by the text content.
[0013] In an optional manner, the text translation setting options include at least one language option;
[0014] The setting options of the picture filling include travel, nature, people, animals, architecture, food and random content;
[0015] The setting options for the text filling include name, date, mobile phone number, address, email address and random content.
[0016] In an optional manner, translating the text of the text element according to the setting options of text translation further includes:
[0017] Select the target language according to the language setting options for text translation;
[0018] Segmenting the text of the text element to obtain multiple text sentences;
[0019] For any of the text sentences, calling at least one online translation service to translate the text sentence into the target language to obtain a plurality of translation texts; wherein the online translation services include Youdao Translation, Baidu Translation, Google Translation and Bing Translation;
[0020] Performing maximum character matching on the multiple translation texts to obtain a translation text with the highest similarity;
[0021] The translated texts with the highest similarity corresponding to each text sentence are merged to obtain the translated text of the text element.
[0022] In an optional manner, generating at least one picture material according to the setting options of the picture filling or the picture description further includes:
[0023] According to the setting options and / or picture description of the picture filling, call the picture generation service to obtain the picture material, and fill the picture material into the layer element; wherein the picture generation service is a Stable Diffusion service, and the Stable Diffusion service is set to only search for picture materials on a preset copyright-free picture website.
[0024] In an optional manner, generating the copy content according to the setting options of the copy filling further includes:
[0025] According to the setting options and / or the description of the copy filling, the text generation service is called to obtain the copy content; wherein the text generation service includes Wenxinyiyan, ChatGPT, Gemini and MetaAI;
[0026] When the text content is a name, mobile phone number, address or email address, desensitizing the text content to obtain a desensitized text;
[0027] The desensitized part in the desensitized copy is supplemented according to the copy replacement rule to obtain the text of the text element.
[0028] In an optional manner, the text replacement rule includes a name replacement rule, a mobile phone number replacement rule, an address replacement rule, and an email replacement rule;
[0029] The name replacement rule is as follows: randomly replace the desensitized surname with other surnames according to the Hundred Family Surnames, and replace the desensitized name with a noun word that has the same pronunciation as the name;
[0030] The mobile phone number replacement rule is: randomly generate a corresponding number of desensitized mobile phone numbers;
[0031] The address replacement rule is: randomly replace the desensitized city, district, and county with other cities, districts, and counties, and randomly generate a corresponding number of desensitized street numbers and building numbers;
[0032] The mailbox replacement rule is: the mailbox domain name remains unchanged, and a corresponding number of desensitized English letters are randomly generated.
[0033] In an optional manner, translating the text of the text element according to the setting options of text translation further includes:
[0034] According to multiple setting options for text translation, the texts of all text elements in the design draft are translated to obtain a set of translated design drafts of the design draft;
[0035] According to the translation design draft set, multiple translation design draft copies of the design draft are created in the canvas page.
[0036] In an optional manner, the method further includes:
[0037] After filling the layer element with the picture material, clearing the picture material of the layer element;
[0038] Fill the remaining generated picture materials into the layer elements of the emptied picture materials in sequence; or, generate at least one picture material again according to the setting options or picture description of the picture filling, and fill the regenerated picture material into the layer elements of the emptied picture materials;
[0039] as well as,
[0040] After replacing the text of the text element with the copy content, clearing the text of the text element;
[0041] The remaining generated copy content is sequentially filled into the text elements of the emptied text; or, at least the copy content is regenerated according to the setting options of the copy filling, and the regenerated copy content replaces the text elements of the emptied text.
[0042] In an optional manner, the method further includes:
[0043] The generated picture material and the corresponding picture filling setting options or picture description are stored in a picture material library, so as to retrieve the picture material from the picture material library according to the picture filling setting options or picture description;
[0044] The generated copy content and the corresponding setting options for copy filling are stored in a copy content library, so that the copy content can be retrieved from the copy content library according to the setting options for copy filling.
[0045] According to another aspect of the present application, there is provided a device for automatically generating design materials based on a design draft, comprising:
[0046] A target element selection module is used to select a target element in the canvas page design draft, wherein the target element includes a text element and a layer element;
[0047] A design material setting module, used to respond to the functional operations of the design material intelligent generation panel, the functional operations including text translation, picture filling and copy filling;
[0048] A text translation module, used for translating the text of the text element according to a setting option of text translation when the function operation is text translation;
[0049] A picture material filling module, for generating at least one picture material according to the setting options of picture filling or the picture description when the functional operation is picture filling, and filling the picture material into the layer element;
[0050] The copy content filling module is used to generate copy content according to the setting options of copy filling when the functional operation is copy filling, and replace the text of the text element with the copy content.
[0051] The solution provided by the above embodiment of the present invention selects a target element in a canvas page design draft, wherein the target element includes a text element and a layer element; in response to the functional operation of the design material intelligent generation panel, the functional operation includes text translation, picture filling and copy filling; wherein, when the functional operation is text translation, the text of the text element is translated according to the setting options of text translation; when the functional operation is picture filling, at least one picture material is generated according to the setting options of picture filling or picture description, and the picture material is filled into the layer element; when the functional operation is copy filling, copy content is generated according to the setting options of copy filling, and the copy content replaces the text of the text element. The present invention improves the generation efficiency of design materials and enhances the sense of reality and user experience of design materials.
[0052] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above description and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0054] Figure 1 A schematic diagram showing a flow chart of a method for automatically generating design materials based on a design draft according to an embodiment of the present invention;
[0055] Figure 2 A schematic diagram showing text translation settings and translation effects according to an embodiment of the present invention is shown;
[0056] Figure 3 A schematic diagram showing the picture filling settings and filling effects according to an embodiment of the present invention is shown;
[0057] Figure 4A schematic diagram of text filling settings according to an embodiment of the present invention is shown;
[0058] Figure 5 A schematic diagram showing the text filling effect of an embodiment of the present invention is shown;
[0059] Figure 6 A functional structure diagram of a method and device for automatically generating design materials based on a design draft according to an embodiment of the present invention is shown. DETAILED DESCRIPTION
[0060] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0061] Before implementing the embodiments of the present invention, the technical terms or custom terms involved below are uniformly explained here:
[0062] Container: Formerly known as "drawing board", it is an important design component of design software, such as iPhone container and A4 paper container. In this application, in addition to defining the scope of the interface like the drawing board in traditional design software, the container can also add layout grid, rounded corner filling and other attributes to it, and can also nest another container in the container.
[0063] Components: They allow the UI to be divided into independent, reusable parts. In practical applications, components are often organized into a nested tree structure.
[0064] Layers: are like images containing elements such as text or graphics, which are stacked together in order and combined to form the final effect of the page. Layers can accurately position elements on the page. In this application, text, shapes, pictures, etc. can be added to the layers, and layers can be nested in the layers.
[0065] Instance: An instance refers to a specific reference to a component. What the user drags from the component list or copies and pastes from a component is an "instance" rather than the component itself.
[0066] Design elements: In this application, referred to as elements, design elements include containers, components, layers, and instances.
[0067] The following is a detailed description of the method and device for automatically generating design materials based on a design draft proposed by the present invention through specific embodiments.
[0068] Embodiment 1:
[0069] Figure 1 FIG. 1 is a functional structure diagram of a method for automatically generating design materials based on a design draft according to an embodiment of the present invention. Specifically, Figure 1 As shown, the following steps are included:
[0070] Step S101, selecting a target element in a canvas page design draft, wherein the target element includes a text element and a layer element.
[0071] In this embodiment, the text element is used to display text information, which broadly covers various forms of text content, for example, descriptive text, titles, paragraphs, tables, design element names, labels, etc. in the design draft. Layer elements include layers, nested layers, and multiple layers with various layouts (such as grid layout, flow layout, etc.).
[0072] Step S102, responding to the functional operation of the design material intelligent generation panel, the functional operation includes text translation, picture filling and copy filling.
[0073] In this embodiment, for the text translation function, select the text layer to be translated, select text translation in the design material intelligent generation panel, set the translation option and replace the translated text content in the design draft to complete the design draft in other languages to create a multilingual international version of the design draft. For the picture filling function, select the picture element to be filled, set the filling option and add the generated picture material (such as background picture, icon or other image, etc.) to the picture element. For the copy filling function, select the text element to be filled, set the copy filling option and fill the generated copy content into the text element.
[0074] In an optional manner, the text translation setting options include at least one language option;
[0075] The setting options of the picture filling include travel, nature, people, animals, architecture, food and random content;
[0076] The setting options for the text filling include name, date, mobile phone number, address, email address and random content.
[0077] In this embodiment, Figure 2 As shown in the figure, the languages for text translation include English, Chinese, French, German, Spanish, etc. You can also enter the language in the input box. Figure 3 As shown in the figure, the options for picture filling include travel, nature, people, animals, architecture, food, and random content. You can also enter image generation requirements in the input box, for example, "generate 30 travel pictures with seaside". Figure 4As shown, the setting options for text filling include name, date, mobile phone number, address, email address and random content. You can also enter the copy generation requirements in the input box, for example, "Generate 50 names with different surnames."
[0078] Step S103: when the functional operation is text translation, the text of the text element is translated according to the setting options of the text translation.
[0079] In this embodiment, the text of the text element is translated according to the set text translation option, and the generated translation text replaces the text of the text element, or, as Figure 2 Create a copy of the design for the text element as shown.
[0080] In an optional manner, translating the text of the text element according to the setting options of text translation further includes:
[0081] Select the target language according to the language setting options for text translation;
[0082] Segmenting the text of the text element to obtain multiple text sentences;
[0083] For any of the text sentences, calling at least one online translation service to translate the text sentence into the target language to obtain a plurality of translation texts; wherein the online translation services include Youdao Translation, Baidu Translation, Google Translation and Bing Translation;
[0084] Performing maximum character matching on the multiple translation texts to obtain a translation text with the highest similarity;
[0085] The translated texts with the highest similarity corresponding to each text sentence are merged to obtain the translated text of the text element.
[0086] In this embodiment, for each text sentence, at least one online translation service is called for translation, and multiple translation results are matched for maximum characters. By comparing the similarity of character sequences, the translation text with the highest similarity is selected to further improve the accuracy of the translation.
[0087] For example, for the text sentence "This is a test text", three English translation texts are obtained after calling three online translation services:
[0088] Translate text A: This is a test text.
[0089] Translation text B: Here is a piece of testing text.
[0090] Translation text C: It is a segment of trial text.
[0091] A dynamic programming algorithm is used to calculate the longest common subsequence (LCS) between each pair of translated texts (AB, AC, BC). For example, for translated texts A and B, their LCS is "is a test text", where LCS does not have to be a continuous sequence of characters, but must be a sequence of characters that exists in both strings and is arranged in the same order. After calculating the LCS between all translated texts, the similarity of the translated texts is evaluated based on the length of the LCS, where the longer the LCS, the higher the similarity between the two translated texts at the character level. To determine which translated text is most similar to the other translated texts at the character level, the sum of the LCS lengths between each translated text and all other translated texts is calculated, and the translated text with the largest sum of LCS lengths is selected as the translated text with the highest similarity.
[0092] In an optional manner, translating the text of the text element according to the setting options of text translation further includes:
[0093] According to multiple setting options for text translation, the texts of all text elements in the design draft are translated to obtain a set of translated design drafts of the design draft;
[0094] According to the translation design draft set, multiple translation design draft copies of the design draft are created in the canvas page.
[0095] In this embodiment, for example, by selecting both the English and French translation options, an English design draft copy and a French design draft copy are simultaneously created in the canvas page, further improving the design efficiency of the international version of the design draft.
[0096] Step S104, when the functional operation is picture filling, at least one picture material is generated according to the setting options of picture filling or the picture description, and the picture material is filled into the layer element.
[0097] In this embodiment, Figure 3 As shown, the picture material (character type) is generated according to the set picture filling options, and the picture material is filled into the picture element (for a 2-column picture layout).
[0098] In an optional manner, generating at least one picture material according to the setting options of the picture filling or the picture description further includes:
[0099] According to the setting options and / or picture description of the picture filling, call the picture generation service to obtain the picture material, and fill the picture material into the layer element; wherein the picture generation service is a Stable Diffusion service, and the Stable Diffusion service is set to only search for picture materials on a preset copyright-free picture website.
[0100] In this embodiment, Stable Diffusion is a free open source model for text-to-image conversion, which supports functions such as text-to-image, image-to-image, image modification, and filling low-resolution images, that is, it can generate images based on the input text description. Before calling the Stable Diffusion service, it is necessary to set the image source configuration to ensure that it only searches and generates image materials from preset copyright-free image websites. In other words, when generating images, the Stable Diffusion service only refers to the image style and elements on the preset copyright-free image website, and the generated images themselves usually do not directly copy the specific images on these websites. Call the Stable Diffusion service according to the setting options and / or image description of the image filling, receive the image material returned by it, and fill it into the selected layer element.
[0101] In an optional manner, the method further includes:
[0102] After filling the layer element with the picture material, clearing the picture material of the layer element;
[0103] Fill the remaining generated picture materials into the layer elements of the emptied picture materials in sequence; or, generate at least one picture material again according to the setting options or picture description of the picture filling, and fill the regenerated picture material into the layer elements of the emptied picture materials;
[0104] as well as,
[0105] After replacing the text of the text element with the copy content, clearing the text of the text element;
[0106] The remaining generated copy content replaces the text elements of the emptied text in sequence; or, at least one copy content is generated again according to the setting options of the copy filling, and the regenerated copy content replaces the text elements of the emptied text.
[0107] In this embodiment, after deleting some image materials of the layer element (i.e., clearing the materials, but the layer element still exists) (e.g., 3 of the image materials do not meet the design requirements), the remaining generated image materials (e.g., 100 image materials may be generated, but only 20 image materials are used) are sequentially filled into the layer element of the emptied image materials. Alternatively, the image generation service is called again to generate image materials according to the last set image filling options or image descriptions, and the regenerated image materials are filled into the layer element of the emptied image materials. Similarly, after deleting the copy content of the text element (e.g., some names do not meet the design requirements, only the text content of the text element is cleared, but the text element is not deleted), the remaining generated copy content is sequentially filled into the text element of the emptied text; or, at least one copy content is generated again according to the setting options of the copy filling, and the regenerated copy content replaces the text element of the emptied text. Therefore, after filling the image materials and copy content, the designer can easily adjust the image materials in the design draft according to actual needs, thereby improving the design efficiency.
[0108] Step S105, when the functional operation is text filling, generating text content according to the setting options of the text filling, and replacing the text of the text element with the text content.
[0109] In this embodiment, Figure 4 , Figure 5 As shown, the copy content is generated according to the set copy filling options, and the copy content replaces the text of the text element (the name column in the table).
[0110] In an optional manner, generating the copy content according to the setting options of the copy filling further includes:
[0111] According to the setting options and / or the description of the copy filling, the text generation service is called to obtain the copy content; wherein the text generation service includes Wenxinyiyan, ChatGPT, Gemini and MetaAI;
[0112] When the text content is a name, mobile phone number, address or email address, desensitizing the text content to obtain a desensitized text;
[0113] The desensitized part in the desensitized copy is supplemented according to the copy replacement rule to obtain the text of the text element.
[0114] In this embodiment, when the text content is a name, mobile phone number, address or email address, the copy content generated by text generation services such as Wenxinyiyan, ChatGPT, Gemini and MetaAI may give some real names such as celebrities, personal mobile phone numbers published online, and corporate addresses or email addresses. It is necessary to further desensitize the generated copy content to avoid the risk of privacy leakage, and supplement the desensitized part of the desensitized copy according to the copy replacement rules, which not only protects privacy, but also maintains the integrity and readability of the copy. For example, the generated mobile phone number "13898341290" is desensitized and replaced with "138****1290", and then the desensitized part is supplemented by 4 random numbers to "13898321290".
[0115] In an optional manner, the text replacement rule includes a name replacement rule, a mobile phone number replacement rule, an address replacement rule, and an email replacement rule;
[0116] The name replacement rule is as follows: randomly replace the desensitized surname with other surnames according to the Hundred Family Surnames, and replace the desensitized name with a noun word that has the same pronunciation as the name;
[0117] The mobile phone number replacement rule is: randomly generate a corresponding number of desensitized mobile phone numbers;
[0118] The address replacement rule is: randomly replace the desensitized city, district, and county with other cities, districts, and counties, and randomly generate a corresponding number of desensitized street numbers and building numbers;
[0119] The mailbox replacement rule is: the mailbox domain name remains unchanged, and a corresponding number of desensitized English letters are randomly generated.
[0120] In this embodiment, the name replacement rule randomly replaces the desensitized surname with the rest of the surnames in the Hundred Family Surnames according to the Hundred Family Surnames database. At the same time, the desensitized name is replaced with a noun part of speech with the homophone according to the homophone. For example, "Zhang" in "Zhang Shan" (a fictitious name) is randomly replaced with "Li", and "Shan" is replaced with the homophone noun "Shan", and the replaced name "Li Shan" is obtained.
[0121] The mobile phone number replacement rule randomly generates a corresponding number of desensitized mobile phone numbers based on the mobile phone number format, and the numeric parts are randomly replaced with the desensitized numbers.
[0122] The address replacement rule randomly replaces the desensitized city, district, and county with the remaining cities, districts, and counties in the database according to the geographic information database. At the same time, a corresponding number of desensitized street numbers and building numbers are randomly generated to replace the original desensitized address information. For example, for the address "No. 123, Zhongguancun Street, Haidian District, Beijing, Floor 456", "Beijing" is randomly replaced with "Shanghai", "Haidian District" is replaced with "Changning District", "Zhongguancun Street" is replaced with "Xinhua Street", and new street numbers and building numbers are randomly generated, such as "No. 789, Floor 101", to obtain the replaced address "No. 789, Xinhua Street, Changning District, Shanghai, Floor 101". Or only replace the corresponding street name, street number, and building number to obtain the replaced address "No. 789, Floor 101, Yongding Road Street, Haidian District, Beijing".
[0123] The mailbox replacement rule is to keep the mailbox domain name unchanged, only desensitize the mailbox name, and randomly generate a corresponding number of desensitized English letters to replace the sensitive part of the original mailbox name. For example, if the mailbox is "zhangsan@163.com", the system keeps the domain name "163.com" unchanged, and randomly generates new English letters to replace the sensitive part of the mailbox name, such as replacing "zhangsan" with "ioddlsiuy", and the replaced mailbox is "ioddlsiuy@163.com".
[0124] In an optional manner, the method further includes:
[0125] The generated picture material and the corresponding picture filling setting options or picture description are stored in a picture material library, so as to retrieve the picture material from the picture material library according to the picture filling setting options or picture description;
[0126] The generated copy content and the corresponding setting options for copy filling are stored in a copy content library, so that the copy content can be retrieved from the copy content library according to the setting options for copy filling.
[0127] In this embodiment, by storing the generated picture materials and text content, design materials can be continuously accumulated, thereby realizing offline retrieval and reuse of the design materials.
[0128] The solution provided by the above embodiment of the present invention selects a target element in a canvas page design draft, wherein the target element includes a text element and a layer element; in response to the functional operation of the design material intelligent generation panel, the functional operation includes text translation, picture filling and copy filling; wherein, when the functional operation is text translation, the text of the text element is translated according to the setting options of text translation; when the functional operation is picture filling, at least one picture material is generated according to the setting options of picture filling or picture description, and the picture material is filled into the layer element; when the functional operation is copy filling, copy content is generated according to the setting options of copy filling, and the copy content replaces the text of the text element. The present invention improves the generation efficiency of design materials and enhances the sense of reality and user experience of design materials.
[0129] Embodiment 2:
[0130] Figure 6 The functional structure diagram of the method and device for automatically generating design materials based on a design draft according to an embodiment of the present invention is shown. Figure 6 As shown, the device comprises:
[0131] The target element selection module 601 is used to select a target element in the canvas page design draft, wherein the target element includes a text element and a layer element;
[0132] The design material setting module 602 is used to respond to the functional operation of the design material intelligent generation panel, and the functional operation includes text translation, picture filling and copy filling;
[0133] A text translation module 603, used for translating the text of the text element according to a setting option of text translation when the function operation is text translation;
[0134] Picture material filling module 604, used for generating at least one picture material according to the setting options of picture filling or picture description when the functional operation is picture filling, and filling the picture material into the layer element;
[0135] The copy content filling module 605 is used to generate copy content according to the setting options of copy filling when the functional operation is copy filling, and replace the text of the text element with the copy content.
[0136] In an optional manner, the text translation setting options include at least one language option;
[0137] The setting options of the picture filling include travel, nature, people, animals, architecture, food and random content;
[0138] The setting options for the text filling include name, date, mobile phone number, address, email address and random content.
[0139] In an optional manner, the text translation module 603 is further used to:
[0140] Select the target language according to the language setting options for text translation;
[0141] Segmenting the text of the text element to obtain multiple text sentences;
[0142] For any of the text sentences, calling at least one online translation service to translate the text sentence into the target language to obtain a plurality of translation texts; wherein the online translation services include Youdao Translation, Baidu Translation, Google Translation and Bing Translation;
[0143] Performing maximum character matching on the multiple translation texts to obtain a translation text with the highest similarity;
[0144] The translated texts with the highest similarity corresponding to each text sentence are merged to obtain the translated text of the text element.
[0145] In an optional manner, the picture material filling module 604 is further used to:
[0146] According to the setting options and / or picture description of the picture filling, call the picture generation service to obtain the picture material, and fill the picture material into the layer element; wherein the picture generation service is a Stable Diffusion service, and the Stable Diffusion service is set to only search for picture materials on a preset copyright-free picture website.
[0147] In an optional manner, the copy content filling module 605 is further used to:
[0148] According to the setting options and / or the description of the copy filling, the text generation service is called to obtain the copy content; wherein the text generation service includes Wenxinyiyan, ChatGPT, Gemini and MetaAI;
[0149] When the text content is a name, mobile phone number, address or email address, desensitizing the text content to obtain a desensitized text;
[0150] The desensitized part in the desensitized copy is supplemented according to the copy replacement rule to obtain the text of the text element.
[0151] In an optional manner, the text replacement rule includes a name replacement rule, a mobile phone number replacement rule, an address replacement rule, and an email replacement rule;
[0152] The name replacement rule is as follows: randomly replace the desensitized surname with other surnames according to the Hundred Family Surnames, and replace the desensitized name with a noun word that has the same pronunciation as the name;
[0153] The mobile phone number replacement rule is: randomly generate a corresponding number of desensitized mobile phone numbers;
[0154] The address replacement rule is: randomly replace the desensitized city, district, and county with other cities, districts, and counties, and randomly generate a corresponding number of desensitized street numbers and building numbers;
[0155] The mailbox replacement rule is: the mailbox domain name remains unchanged, and a corresponding number of desensitized English letters are randomly generated.
[0156] In an optional manner, the text translation module 603 is further used to:
[0157] According to multiple setting options for text translation, the texts of all text elements in the design draft are translated to obtain a set of translated design drafts of the design draft;
[0158] According to the translation design draft set, multiple translation design draft copies of the design draft are created in the canvas page.
[0159] In an optional manner, the system further includes a design material deletion module, which is further used to:
[0160] After filling the layer element with the picture material, clearing the picture material of the layer element;
[0161] Fill the remaining generated picture materials into the layer elements of the emptied picture materials in sequence; or, generate at least one picture material again according to the setting options or picture description of the picture filling, and fill the regenerated picture material into the layer elements of the emptied picture materials;
[0162] as well as,
[0163] After replacing the text of the text element with the copy content, clearing the text of the text element;
[0164] The remaining generated copy content is sequentially filled into the text elements of the emptied text; or, at least the copy content is regenerated according to the setting options of the copy filling, and the regenerated copy content replaces the text elements of the emptied text.
[0165] In an optional manner, the device further includes a design material storage module, which is further used to:
[0166] The generated picture material and the corresponding picture filling setting options or picture description are stored in a picture material library, so as to retrieve the picture material from the picture material library according to the picture filling setting options or picture description;
[0167] The generated copy content and the corresponding setting options for copy filling are stored in a copy content library, so that the copy content can be retrieved from the copy content library according to the setting options for copy filling.
[0168] The solution provided by the above embodiment of the present invention selects a target element in a canvas page design draft, wherein the target element includes a text element and a layer element; in response to the functional operation of the design material intelligent generation panel, the functional operation includes text translation, picture filling and copy filling; wherein, when the functional operation is text translation, the text of the text element is translated according to the setting options of text translation; when the functional operation is picture filling, at least one picture material is generated according to the setting options of picture filling or picture description, and the picture material is filled into the layer element; when the functional operation is copy filling, copy content is generated according to the setting options of copy filling, and the copy content replaces the text of the text element. The present invention improves the generation efficiency of design materials and enhances the sense of reality and user experience of design materials.
[0169] The algorithm or display provided herein is not inherently related to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of system. In addition, the embodiment of the present invention is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present invention described herein, and the description made to specific languages above is for disclosing the best mode of the present invention.
[0170] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0171] Similarly, it should be understood that in order to streamline the present invention and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, the various features of the embodiments of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed invention requires more features than the features explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0172] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or elements in the embodiments may be combined into one module or unit or element, and in addition they may be divided into a plurality of submodules or subunits or subelements. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0173] In addition, those skilled in the art will appreciate that, although some embodiments herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.
[0174] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all functions of some or all components according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for executing part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0175] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be understood as limitations on the order of execution.
Claims
1. A method for automatically generating design materials based on a design draft, characterized in that: include: Select a target element in the canvas page design, wherein the target element includes a text element and a layer element; In response to the functional operation of the design material intelligent generation panel, the functional operation includes text translation, picture filling and copy filling; Wherein, when the functional operation is text translation, the text of the text element is translated according to the setting options of the text translation; When the functional operation is picture filling, at least one picture material is generated according to the setting options of picture filling or the picture description, and the picture material is filled into the layer element; When the functional operation is text filling, the text content is generated according to the setting options of the text filling, and the text of the text element is replaced by the text content.
2. The method for automatically generating design materials based on a design draft according to claim 1, characterized in that: The text translation setting options include at least one language option; The setting options of the picture filling include travel, nature, people, animals, architecture, food and random content; The setting options for the text filling include name, date, mobile phone number, address, email address and random content.
3. The method for automatically generating design materials based on a design draft according to claim 2, characterized in that: The step of translating the text of the text element according to the setting options of text translation further comprises: Select the target language according to the language setting options for text translation; Segmenting the text of the text element to obtain multiple text sentences; For any of the text sentences, calling at least one online translation service to translate the text sentence into the target language to obtain a plurality of translation texts; wherein the online translation services include Youdao Translation, Baidu Translation, Google Translation and Bing Translation; Performing maximum character matching on the multiple translation texts to obtain a translation text with the highest similarity; The translated texts with the highest similarity corresponding to each text sentence are merged to obtain the translated text of the text element.
4. The method for automatically generating design materials based on a design draft according to claim 2, characterized in that: The generating at least one picture material according to the setting options of picture filling or the picture description further comprises: According to the setting options and / or picture description of the picture filling, call the picture generation service to obtain the picture material, and fill the picture material into the layer element; wherein the picture generation service is a Stable Diffusion service, and the Stable Diffusion service is set to only search for picture materials on a preset copyright-free picture website.
5. The method for automatically generating design materials based on a design draft according to claim 2, characterized in that: The step of generating the content of the copy according to the setting options of the copy filling further includes: According to the setting options and / or the description of the copy filling, the text generation service is called to obtain the copy content; wherein the text generation service includes Wenxinyiyan, ChatGPT, Gemini and MetaAI; When the text content is a name, mobile phone number, address or email address, desensitizing the text content to obtain a desensitized text; The desensitized part in the desensitized copy is supplemented according to the copy replacement rule to obtain the text of the text element.
6. The method for automatically generating design materials based on a design draft according to claim 5, characterized in that: The text replacement rules include name replacement rules, mobile phone number replacement rules, address replacement rules and email replacement rules; The name replacement rule is as follows: randomly replace the desensitized surname with other surnames according to the Hundred Family Surnames, and replace the desensitized name with a noun word that has the same pronunciation as the name; The mobile phone number replacement rule is: randomly generate a corresponding number of desensitized mobile phone numbers; The address replacement rule is: randomly replace the desensitized city, district, and county with other cities, districts, and counties, and randomly generate a corresponding number of desensitized street numbers and building numbers; The mailbox replacement rule is: the mailbox domain name remains unchanged, and a corresponding number of desensitized English letters are randomly generated.
7. The method for automatically generating design materials based on a design draft according to claim 1, characterized in that: The step of translating the text of the text element according to the setting options of text translation further comprises: According to multiple setting options for text translation, the texts of all text elements in the design draft are translated to obtain a set of translated design drafts of the design draft; According to the translation design draft set, multiple translation design draft copies of the design draft are created in the canvas page.
8. The method for automatically generating design materials based on a design draft according to claim 1, characterized in that: The method further comprises: After filling the layer element with the picture material, clearing the picture material of the layer element; Fill the remaining generated picture materials into the layer elements of the emptied picture materials in sequence; or, generate at least one picture material again according to the setting options or picture description of the picture filling, and fill the regenerated picture material into the layer elements of the emptied picture materials; as well as, After replacing the text of the text element with the copy content, clearing the text of the text element; The remaining generated copy content replaces the text elements of the emptied text in sequence; or, at least one copy content is generated again according to the setting options of the copy filling, and the regenerated copy content replaces the text elements of the emptied text.
9. The method for automatically generating design materials based on a design draft according to claim 1, characterized in that: The method further comprises: The generated picture material and the corresponding picture filling setting options or picture description are stored in a picture material library, so as to retrieve the picture material from the picture material library according to the picture filling setting options or picture description; The generated copy content and the corresponding setting options for copy filling are stored in a copy content library, so that the copy content can be retrieved from the copy content library according to the setting options for copy filling.
10. A device for automatically generating design materials based on a design draft, characterized in that: include: A target element selection module is used to select a target element in the canvas page design draft, wherein the target element includes a text element and a layer element; A design material setting module, used to respond to the functional operations of the design material intelligent generation panel, the functional operations including text translation, picture filling and copy filling; A text translation module, used for translating the text of the text element according to a setting option of text translation when the function operation is text translation; A picture material filling module, for generating at least one picture material according to the setting options of picture filling or the picture description when the functional operation is picture filling, and filling the picture material into the layer element; The copy content filling module is used to generate copy content according to the setting options of copy filling when the functional operation is copy filling, and replace the text of the text element with the copy content.