Word art generation method and device and storage medium
By extracting features and constraining consistency in the artistic font generation scheme, the problems of inconsistent style and stability in the generation of artistic fonts in the existing technology are solved, and precise control and style consistency of artistic fonts are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-07
AI Technical Summary
Existing artistic font generation solutions struggle to precisely control font design details, resulting in a lack of stylistic consistency and stability in the font style of long texts.
By extracting features from font design examples, we obtain font structural and style features, generate target prompt word information, and input it into the image generation model. Combined with style and structural consistency constraints, we optimize the generation of artistic font images.
It improves the structural accuracy and stylistic consistency of artistic font images, ensuring the stability of the font style for long text artistic fonts.
Smart Images

Figure CN121809400A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, device and storage medium for generating artistic characters. Background Technology
[0002] Artistic fonts are decorative texts widely used in advertising, marketing posters, and other scenarios. With the rapid development of AI technology, image generation models have made significant progress in the field of artistic font generation. However, current artistic font generation solutions rely on generic prompts to drive image generation models, making it difficult to precisely control the details of font design. Ultimately, this results in artistic fonts that lack precise control over details and cannot guarantee stylistic consistency or the stability of font styles in long texts.
[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0004] The main purpose of this application is to provide a method, device and storage medium for generating artistic fonts, which solves the technical problems that the generated artistic fonts lack precise control over details and cannot guarantee the consistency of font style and the stability of font style in long texts.
[0005] To achieve the above objectives, this application proposes a method for generating artistic characters, the method comprising: Get font design samples; Feature extraction is performed on the font design example to obtain font structure features and font style features; Based on the font structure features and the font style features, target prompt word information is generated, wherein the target prompt word information includes each structural attribute in the font structure features and each style attribute in the font style features; The target prompt information is input into a preset image generation model to obtain an artistic word image.
[0006] In one embodiment, after inputting the target prompt information into a preset image generation model to obtain the artistic word image, the method further includes: The artistic font image is analyzed to obtain the analysis results; Based on the analysis results, the artistic font image is verified; If the verification result is a verification failure, then the font defect details are determined based on the verification result. Based on the font defect details, optimization prompts are generated and input into the image generation model to obtain the optimized artistic font image.
[0007] In one embodiment, generating optimized prompt word information based on the font defect details includes: Based on each defect type in the font defect details, generate corresponding reference prompt words; Based on the reference prompt word information corresponding to each defect type, the target prompt word information is adjusted to obtain the optimized prompt word information.
[0008] In one embodiment, when generating multiple optimized prompt words, the step of inputting the optimized prompt words into the image generation model to obtain the optimized artistic word image includes: Each of the optimized prompt words is input into the image generation model to obtain multiple candidate artistic word images; Each candidate artistic character image is matched with the font design example to obtain feature similarity; Based on the feature similarity, the optimized artistic character image is selected from each of the candidate artistic character images.
[0009] In one embodiment, the analysis results include the text in the artistic font image, the font structure features of the text, and the font style features; the step of verifying the artistic font image based on the analysis results includes: Perform typo verification on the text in the artistic font image; and / or, Verify whether the font structure features and font style features of each character in the analysis results are consistent; and / or, The font structure features and font style features of each character in the analysis results are verified against the font structure features and font style features corresponding to the font design sample.
[0010] In one embodiment, after verifying the artistic font image based on the analysis results, the method further includes: If the verification result is successful, the artistic font image will be pushed to the target user; If a user's modification instruction is received, the attribute information to be modified as indicated by the modification instruction is analyzed; Based on the attribute information to be modified, generate modification prompt information; The modified prompt information is input into the image generation model to obtain the modified artistic word image.
[0011] In one embodiment, the feature extraction of the font design sample to obtain font structure features and font style features includes: The font design sample is preprocessed; Structural and style attribute analyses are performed on the preprocessed font design sample to obtain the font structural features and font style features.
[0012] In one embodiment, generating target prompt word information based on the font structure features and the font style features includes: Based on the font structure features and font style features, combined with preset input format requirements, style and structure consistency constraints, and prompt word output format requirements, the target prompt word information is generated.
[0013] Furthermore, to achieve the above objectives, this application also proposes an artistic font generation device, which includes: The acquisition module is used to obtain font design samples; The feature extraction module is used to extract features from the font design sample to obtain font structure features and font style features; The prompt word generation module is used to generate target prompt word information based on the font structure features and the font style features, wherein the target prompt word information includes each structural attribute in the font structure features and each style attribute in the font style features; The artistic word generation module is used to input the target prompt word information into a preset image generation model to obtain an artistic word image.
[0014] In addition, to achieve the above objectives, this application also proposes an artistic character generation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the artistic character generation method as described above.
[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the artistic font generation method described above.
[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the artistic font generation method described above.
[0017] This application provides a method, device, and storage medium for generating artistic fonts. The method includes: acquiring a font design sample; extracting features from the font design sample to obtain font structure features and font style features; generating target prompt information based on the font structure features and font style features, wherein the target prompt information includes each structural attribute in the font structure features and each style attribute in the font style features; and inputting the target prompt information into a preset image generation model to obtain an artistic font image. By analyzing the font design sample, font structure features and font style features are extracted, and prompts are adaptively generated based on these features. This prompt information can impose dual constraints of structure and style on the image generation model, thereby improving the structural accuracy and style consistency of the artistic font image, and ensuring the stability of the font style of long text artistic fonts. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating an embodiment of the artistic font generation method of this application. Figure 2 One of the renderings of the artistic lettering image provided in an embodiment of this application; Figure 3 This is a second rendering of an artistic font image provided in an embodiment of this application; Figure 4 This is a flowchart illustrating Embodiment 2 of the artistic font generation method of this application; Figure 5 This is a flowchart illustrating Embodiment 3 of the artistic font generation method of this application; Figure 6 This is a schematic diagram of the module structure of the artistic character generation device according to an embodiment of this application; Figure 7 This is a schematic diagram of the device structure of the hardware operating environment involved in the artistic font generation method in this application embodiment.
[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] The main technical solution of this application embodiment is as follows: obtaining a font design sample; extracting features from the font design sample to obtain font structure features and font style features; generating target prompt word information based on the font structure features and the font style features, wherein the target prompt word information includes each structural attribute in the font structure features and each style attribute in the font style features; inputting the target prompt word information into a preset image generation model to obtain an artistic font image.
[0025] Existing AI font generation methods generally use neural network models to learn and generate new glyphs from a large number of font samples. While these methods speed up the font generation process, they lack precise control over font structure and style details, and the generated results are often random and inconsistent. Specifically, commonly used font generation techniques have the following shortcomings: they cannot effectively control structural attributes such as font weight and width, making it difficult to express rich textures and lighting effects; when generating multiple characters or long texts, the font styles are often inconsistent, resulting in poor overall visual coherence; and the generated artistic fonts have a monotonous style and lack flexible and diverse creative expression.
[0026] This application's embodiments decompose font design into two independent dimensions: structural attributes and style attributes. Detailed features of each dimension are classified and analyzed to achieve precise control over font weight, stroke shape, serif type, and other details. Furthermore, based on the analysis results of structure and style, adaptive prompt word templates are generated, enabling the model to generate artistic fonts that meet specific design requirements, significantly improving the guidance capability and flexibility of the prompt words. Moreover, style consistency constraints and correction techniques are introduced during image generation to ensure that the font style of multi-character or long text remains stable and consistent, avoiding visual distortion or style drift.
[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device, big data service platform, or artistic font generation system capable of realizing the above functions. The following description uses an artistic font generation system as an example to illustrate this embodiment and the subsequent embodiments.
[0028] Based on this, the embodiments of this application provide a method for generating artistic characters, referring to... Figure 1 , Figure 1This is a flowchart illustrating the first embodiment of the artistic font generation method of this application.
[0029] Step S11: Obtain a font design sample; It should be noted that font design examples refer to font application instances used for demonstration, analysis, and reference. In one embodiment, a font design example can be a single character, word, phrase, or complete design scheme, allowing the system to quickly understand the visual characteristics and application effects of the font, analyze and extract its structural and stylistic attributes, and provide a reference standard for artistic font generation. In one embodiment, designers can also input specific names of the font structure and style, such as specific tags like the Dunhuang color scheme.
[0030] Step S12: Extract features from the font design example to obtain font structure features and font style features; It should be noted that the font structural features refer to the basic shape and geometric structure features of the font during the design process, while the font style features refer to the artistic and visual expression features of the font.
[0031] It should be noted that the structural attributes in the font structural features include character weight, character width, stroke beginning and ending shapes, serif type, font symmetry, and compositional style. Among these, character weight affects the visual impact and readability of the font; for example, extra-bold and light character weights. Character width characterizes the compactness of the font; for example, narrow, regular, and wide fonts. Stroke beginning and ending shapes can be rounded or acute, affecting the font's individual expression. Serif type determines the font's traditional or modern feel, including sans-serif, pointed serif, and rounded serif. Symmetry determines the overall layout of the font according to the number of characters; for example, symmetrical arrangement. Compositional style determines the overall layout of the font and its background; for example, collage style and deconstruction style.
[0032] It should be noted that the style attributes in the font style features include characteristics such as the font's materiality, texture, color style, lighting effects, volume, and artistic style. Materiality includes textures such as glass, metal, and bubble. Textures include water ripples, honeycomb patterns, and stripes, adding detail to the surface of artistic lettering. Colors include neon, Morandi, Memphis, and Dunhuang color schemes, enhancing the font's color richness. Lighting effects include glowing effects, soft shadows, and highlight reflections, enhancing the font's three-dimensionality and visual impact. Volume includes embossed effects and a sense of expansion, used to enhance the font's spatial feel. Artistic styles include futuristic, retro, and cartoon styles, used to enhance the font's creative expression.
[0033] In one feasible implementation, feature extraction is performed on the font design sample to obtain font structure features and font style features, including: The font design sample is preprocessed; Structural and style attribute analyses are performed on the preprocessed font design sample to obtain the font structural features and font style features.
[0034] In this embodiment, the font design sample is preprocessed, including grayscale conversion, binarization, noise reduction, and skew correction. Grayscale conversion eliminates color interference and focuses on morphological features; binarization highlights stroke structure, facilitating contour and skeleton extraction; noise reduction uses algorithms such as median filtering or Gaussian filtering to remove noise; and skew correction detects and corrects text line angles to ensure the sample is in a horizontal and vertical position. Furthermore, structural analysis is performed on the preprocessed font design sample to obtain its corresponding font structural features, and style attribute analysis is performed to obtain its corresponding font style features.
[0035] Step S13: Generate target prompt word information based on the font structure features and the font style features, wherein the target prompt word information includes each structural attribute in the font structure features and each style attribute in the font style features; In this embodiment, based on the font structure features and font style features, combined with preset style and structure consistency constraints and prompt word output requirements, the target prompt word information is automatically generated. This ensures that the prompt word integrates the various structural attributes from the font structure features and the various style attributes from the font style features required by the user. For example, the style and structure consistency constraints can be set to: ensure that the font maintains consistent structure and style features during generation, even for long sentences or multi-character text. The prompt word output requirements can be set to: "Based on the above analysis, generate a complete Chinese prompt to guide the AI in generating the image font, integrating structural attributes, style attributes, and visual metaphors, and ensuring the description is vivid, creative, and conforms to visual language."
[0036] Step S14: Input the target prompt information into a preset image generation model to obtain an artistic word image.
[0037] In this embodiment, the target prompt information is input into a preset image generation model to generate artistic text, resulting in the artistic text image. For example, the target prompt information is a vaporwave-style Chinese font with a structure combining sharp angles and rounded serifs. The strokes have a liquefied, flowing feel and electric crackling, with an overall asymmetrical arrangement and a semi-transparent acrylic texture. The text reads "Skull Wizard Hat," without any additional text. The font surface is covered with water ripples and neon halos, and the colors are a mix of neon and candy wrapper hues. The font seems to float in the soft light of a golden hour, with a fantastical, flowing light and a warm, fairytale-like atmosphere. The background is an ethereal mist, without any solid colors or dark tones. Further, the target prompt information is input into the preset image generation model to obtain the artistic text image. (See reference...) Figure 2 , Figure 2 One of the renderings of an artistic lettering image provided in an embodiment of this application.
[0038] Furthermore, the target prompt information indicates that this is a rounded cartoon-style Chinese font with a robust weight. The strokes possess a liquefied, flowing quality reminiscent of amber resin, along with a subtle light refraction effect. It features a sans-serif design. The text reads "Master all the colors and don't miss a single moment," without any additional text. The font appears to be solidified from translucent amber resin, with a surface displaying delicate bubbles and resin flow patterns. The color scheme uses a gradient of amber gold and light pink, exuding a warm luster and iridescent reflection. The stroke edges have a slight tearing and electric sparkle effect, creating an overall dreamy, soft light and hazy halo, resulting in a sweet yet futuristic visual atmosphere. Further, the target prompt information is input into a preset image generation model to obtain an artistic font image. (See reference...) Figure 3 , Figure 3 This is a second rendering of an artistic lettering image provided in an embodiment of this application.
[0039] This embodiment, through the above-described scheme, includes: obtaining a font design example; extracting features from the font design example to obtain font structural features and font style features; generating target prompt word information based on the font structural features and font style features, wherein the target prompt word information includes each structural attribute in the font structural features and each style attribute in the font style features; and inputting the target prompt word information into a preset image generation model to obtain an artistic font image. By analyzing the font design example, extracting font structural features and font style features, and then adaptively generating prompt words based on the font structural features and font style features, this prompt word information can impose dual constraints of structure and style on the image generation model, thereby improving the structural accuracy and style consistency of the generated artistic font image, and ensuring the stability of the font style of long text artistic fonts.
[0040] In one feasible implementation, refer to Figure 4, Figure 4 This is a flowchart illustrating Embodiment 2 of the artistic font generation method of this application; after inputting the target prompt word information into a preset image generation model to obtain the artistic font image, it further includes: Step S21: Analyze the artistic font image to obtain the analysis results; Step S22: Verify the artistic font image based on the analysis results; In this embodiment, in order to improve the effect of artistic word generation, the initially generated artistic word image can be further verified and optimized. Optionally, image analysis can be performed on the artistic word image to obtain analysis results, wherein the analysis results include the text in the artistic word image, the font structure features of the text, and the font style features.
[0041] Furthermore, based on the analysis results, the system verifies whether there are any typos in the artistic font image, whether the style and structure of each character in the artistic font image are consistent, and whether the artistic font image matches the structure and style corresponding to the font design example.
[0042] Optionally, in a feasible embodiment, step S22: verifying the artistic font image based on the analysis results, including: Perform typo verification on the text in the artistic font image; and / or verify whether the font structure features and font style features of each character in the analysis result are consistent; and / or verify the font structure features and font style features of each character in the analysis result with the font structure features and font style features corresponding to the font design example.
[0043] In one embodiment, the text in the artistic font image is checked for typos to determine whether there are typos in the generated artistic font image.
[0044] In one embodiment, based on the font structure and style features corresponding to each character in the analysis results, the consistency of style and structure of each character in the artistic font image is verified. This ensures the consistency of font structure and style when generating long sentences or multi-character text, avoids distortion of font structure and style, and guarantees the coherence and readability of the overall design effect.
[0045] In one embodiment, the font structure features and font style features corresponding to each character in the analysis results are matched with the font structure features and font style features corresponding to the font design example to verify whether the artistic font image is consistent with the structure and style corresponding to the font design example, and to ensure that the font in the generated artistic font image meets the font style and font structure required by the user.
[0046] Step S23: If the verification result is a verification failure, then determine the font defect details based on the verification result; In this embodiment, if the verification result is a verification failure, it proves that the generated artistic font image may contain typos or style errors, or may not conform to the font style and structure required by the user. Based on the specific verification result, font defect details are determined. For example, if the verification result shows that the artistic font image contains typos, the defect type is determined to be a typo defect type, and then font defect details are generated based on the typo defect type and the typos in the artistic font image.
[0047] If the style or structure does not match the user's desired font style and structure, the defect type is determined to be a style or structural defect. The specific style or structural attribute corresponding to the verification failure is then identified. For example, if the user requires a bubble-like texture for the font, but the generated artistic font image has a metallic texture, this indicates a defect in the texture of the font style. Further, based on the defect type and the specific style or structural attribute corresponding to the verification failure, detailed font defect information is generated.
[0048] Step S24: Based on the font defect details, generate optimization prompt information and input the optimization prompt information into the image generation model to obtain the optimized artistic font image.
[0049] In this embodiment, the target prompt word information is adjusted based on the font defect details to obtain the optimized prompt word information. For example, if the font defect details indicate that the artistic font contains typos, the target prompt word information is adjusted based on the typos. Further, the optimized prompt word information is input into the image generation model to obtain the optimized artistic font image.
[0050] This embodiment analyzes the artistic font image to obtain analysis results; then, based on the analysis results, it verifies the artistic font image; if the verification fails, it determines the font defect details based on the verification results; then, based on the font defect details, it generates optimization prompt words and inputs the optimization prompt words into the image generation model to obtain an optimized artistic font image, effectively improving the structural accuracy and style consistency of the generated artistic font image, and ensuring the stability of the font style of long text artistic fonts.
[0051] In one feasible implementation, refer to Figure 5 , Figure 5 This is a flowchart illustrating Embodiment 3 of the artistic font generation method of this application; the step of generating optimized prompt information based on the font defect details includes: Step S31: Generate corresponding reference prompt word information based on each defect type in the font defect details information; Step S32: Adjust the target prompt word information according to the reference prompt word information corresponding to each defect type to obtain the optimized prompt word information.
[0052] In one embodiment, for each defect type in the font defect details, corresponding reference prompt information is generated according to a reference prompt template. Optionally, the reference prompt template includes information such as defect correction instructions and constraint requirements, which can avoid vague descriptions and ensure that the adjustment direction is clear. For example, if the defect type is a serif type error, and the specific defect is that the user needs a sans-serif font, but the font in the artistic font image is serif, the reference prompt template is set to: "Serif type is sans-serif; remove unnecessary serif decorations."
[0053] Furthermore, based on the reference prompt word information corresponding to each defect type, the target prompt word information is adjusted to obtain the optimized prompt word information. For example, the target prompt word is: "Mid-Autumn Festival Reunion Artistic Font, Bold Font Weight + Regular Font + Sharp Corner Start + Sans-serif + Left-Right Symmetry + Metallic Material + Neon Color Scheme + 3D Effect + Chinese Trend Style." The defect characteristic is the starting and ending stroke shape (the target is rounded corners, but it's actually sharp corners). The defect type is "Sharp Corner Becomes Rounded Corner," and the reference prompt word information is set to correct the starting and ending stroke shapes of "Mid-Autumn Festival Reunion" to rounded corners, ensuring consistent end-point shapes for all strokes.
[0054] This embodiment generates corresponding reference prompt words based on each defect type in the font defect details information; then, based on the reference prompt words for each defect type, the target prompt words are adjusted to obtain the optimized prompt words. By adjusting the target prompt words based on the reference prompt words for each defect type, optimized prompt words that better meet user needs are obtained. These optimized prompt words are then input into an image generation model to obtain an optimized artistic font image, effectively improving the structural accuracy and style consistency of the generated artistic font image, and ensuring the stability of the font style for long text artistic fonts.
[0055] In one feasible implementation, when generating multiple optimized prompt word messages, the step of inputting the optimized prompt word messages into the image generation model to obtain the optimized artistic word image includes: Step S41: Input the optimized prompt word information into the image generation model to obtain multiple candidate artistic word images; Step S42: Perform feature matching between each candidate artistic character image and the font design example to obtain feature similarity; Step S43: Based on the feature similarity, select the optimized artistic character image from each of the candidate artistic character images.
[0056] In this embodiment, each optimized prompt word is input into the image generation model to obtain a candidate artistic word image corresponding to each optimized prompt word. Then, the font structure features and style structure corresponding to each candidate artistic word image are analyzed. Feature matching is performed between the font structure features and style structure corresponding to each candidate artistic word image and the font structure features and style structure corresponding to the font design example to calculate feature similarity. For example, algorithms such as cosine similarity are used to calculate structural feature similarity and style feature similarity. The structural feature similarity and style feature similarity are then averaged to obtain the final feature similarity. Further, the candidate artistic word image with the highest feature similarity is selected as the optimized artistic word image.
[0057] This embodiment obtains multiple candidate artistic word images by inputting the optimized prompt word information into the image generation model; then, it performs feature matching between each candidate artistic word image and the font design example to obtain feature similarity; and finally, it selects the candidate artistic word image with the highest feature similarity as the optimized artistic word image, which effectively improves the structural accuracy and style consistency of the generated artistic word image, and ensures the stability of the font style of long text artistic words.
[0058] In one feasible implementation, after verifying the artistic font image based on the analysis results, the method further includes: Step S51: If the verification result is a successful verification result, the artistic font image is pushed to the target user. Step S52: If a user's modification instruction is received, analyze the attribute information to be modified indicated by the modification instruction; Step S53: Generate modification prompt information based on the attribute information to be modified; Step S54: Input the modified prompt information into the image generation model to obtain the modified artistic word image.
[0059] In this embodiment, if the verification result is successful, the artistic font image is directly pushed to the target user. If the user is not satisfied with the artistic font image, they can modify it. If a modification instruction from the user is received, the modification instruction indicates the attribute information to be modified. The attribute information to be modified includes structural attributes and / or style attributes, such as structural attributes like font weight and font width, and style attributes like texture, color style, and lighting effects. Based on the attribute information to be modified, modification prompts are then generated that the image generation model can recognize. Further, the modification prompts are input into the image generation model that generates the artistic font. The image generation model adjusts according to the prompts and finally outputs the modified artistic font image.
[0060] This embodiment pushes the successfully verified artistic font image to the user for review. If the user's modification instruction is received, the modified artistic font image is generated using an image generation model according to the user's modification instruction. This effectively improves the structural accuracy and style consistency of the generated artistic font image, and ensures the stability of the font style of long text artistic fonts.
[0061] In one feasible implementation, target prompt word information is generated based on the font structure features and the font style features, including: Step S61: Based on the font structure features and font style features, combined with preset input format requirements, style and structure consistency constraints, and prompt word output format requirements, generate the target prompt word information; In this embodiment, the font structural features and font style features are mapped according to preset input format requirements to construct multi-dimensional structural and style attributes. For example, the preset input format requirements are set as follows: decompose the font design from the perspectives of structural and style attributes, and generate a complete Chinese Prompt based on the analysis results for use in AI image generation.
[0062] [For structural attributes, please analyze from the following dimensions and provide specific values]: Font weight (e.g., regular, bold, ultra-fine, etc.); Character width (e.g., narrow, regular, wide); The shape of the beginning and ending strokes (e.g., rounded corners, pointed corners, etc.); Serif type (e.g., sans-serif, pointed serif, rounded serif, etc.); Symmetry (e.g., symmetrical, asymmetrical, etc.); Composition style (e.g., normal layout, collage, deconstruction style, etc.).
[0063] [Style attributes: Please analyze from the following dimensions and provide specific values]: Texture (e.g., bubbles, marshmallows, metal, stone, glass, wood, velvet, ceramic, plastic, fabric, acrylic, etc.); Textures (e.g., water ripples, honeycomb patterns, bark patterns, marble patterns, frosted patterns, stripes, checks, scale patterns, ripples, granular patterns, etc.); Colors (e.g., neon colors, holographic candy wrapper colors, Maron colors, Morandi colors, titanium colors, Memphis colors, Dunhuang colors, Matisse colors, etc.); Lighting and shadow effects (e.g., highlights, glows, neon, soft light, etc.); A sense of volume (e.g., three-dimensional, relief, expansion, carving, etc.); Artistic styles (e.g., cartoon, futuristic, retro, etc.); Visual metaphors (e.g., sculptures made of clouds, architectural structures like cotton candy, etc.).
[0064] In one embodiment, the multi-dimensional structural and style attributes, combined with preset style and structural consistency constraints and prompt output format requirements, are input into a preset large model to obtain the target prompt information. In a specific example, the [Consistency Constraints] are: ensuring that the font maintains consistent structural and stylistic features during generation, even for long sentences or multi-character text. The font style needs to have high style consistency, continuous scalability, and not be distorted by changes in characters. The [Output Format Requirements] are: based on the above analysis, generate a complete Chinese prompt to guide the AI in generating image fonts, integrating structural attributes, style attributes, and visual metaphors; the description should be vivid, creative, and conform to visual language.
[0065] This embodiment constructs multi-dimensional structural and style attributes based on the font structure and style features, according to preset input format requirements. Then, based on the multi-dimensional structural and style attributes, combined with preset style and structure consistency constraints and prompt word output format requirements, the target prompt word information is generated. The prompt word information can impose dual constraints of structure and style on the image generation model, thereby improving the structural accuracy and style consistency of the generated artistic font image, and ensuring the stability of the font style of long text artistic fonts.
[0066] It should be noted that the examples in the figure are only for understanding this application and do not constitute a limitation on the artistic font generation method of this application. Any simple transformations based on this technical concept are within the protection scope of this application.
[0067] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0068] This application also provides an artistic font generation device, please refer to... Figure 6 , Figure 6 This is a schematic diagram of the module structure of the artistic font generation device according to an embodiment of this application; the artistic font generation device includes: Module 71 is used to obtain font design samples; Feature extraction module 72 is used to extract features from the font design sample to obtain font structure features and font style features; The prompt word generation module 73 is used to generate target prompt word information based on the font structure features and the font style features, wherein the target prompt word information includes each structural attribute in the font structure features and each style attribute in the font style features; Artistic word generation module 74 is used to input the target prompt word information into a preset image generation model to obtain artistic word images.
[0069] The artistic font generation device also includes: The image analysis module is used to analyze the artistic font image and obtain the analysis results; The verification module is used to verify the artistic font image based on the analysis results; The determination module is used to determine font defect details based on the verification result if the verification result is a verification failure result; The optimization module is used to generate optimization prompts based on the font defect details and input the optimization prompts into the image generation model to obtain the optimized artistic font image.
[0070] The optimization module is also used for: Based on each defect type in the font defect details, generate corresponding reference prompt words; Based on the reference prompt word information corresponding to each defect type, the target prompt word information is adjusted to obtain the optimized prompt word information.
[0071] The optimization module is also used for: Each of the optimized prompt words is input into the image generation model to obtain multiple candidate artistic word images; Each candidate artistic character image is matched with the font design example to obtain feature similarity; Based on the feature similarity, the optimized artistic character image is selected from each of the candidate artistic character images.
[0072] The verification module is also used for: Perform typo verification on the text in the artistic font image; and / or, Verify whether the font structure features and font style features of each character in the analysis results are consistent; and / or, The font structure features and font style features of each character in the analysis results are verified against the font structure features and font style features corresponding to the font design sample.
[0073] The artistic font generation device also includes: The push module is used to push the artistic font image to the target user if the verification result is a successful verification result; The instruction analysis module is used to analyze the attribute information to be modified indicated by the modification instruction if a modification instruction is received from a user. The modification prompt word information generation module is used to generate modification prompt word information based on the attribute information to be modified; The artistic word image modification module is used to input the modification prompt information into the image generation model to obtain the modified artistic word image.
[0074] The feature extraction module 72 is also used for: The font design sample is preprocessed; Structural and style attribute analyses are performed on the preprocessed font design sample to obtain the font structural features and font style features.
[0075] The prompt word generation module 73 is also used for: Based on the font structure features and font style features, combined with preset input format requirements, style and structure consistency constraints, and prompt word output format requirements, the target prompt word information is generated.
[0076] The artistic character generation device provided in this application, employing the artistic character generation method described in the above embodiments, can solve the technical problems mentioned in the background section. Compared with the prior art, the beneficial effects of the artistic character generation device provided in this application are the same as those of the artistic character generation method provided in the above embodiments, and other technical features in the artistic character generation device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.
[0077] This application provides an artistic character generation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the artistic character generation method in Embodiment 1 above.
[0078] The following is for reference. Figure 7 , Figure 7 This is a schematic diagram of the hardware operating environment involved in the artistic word generation method in this application embodiment. The artistic word generation device in this application embodiment may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The illustrated word-generating device is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0079] like Figure 7 As shown, the artistic lettering generation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the artistic lettering generation device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the letter art generation device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows letter art generation devices with various systems, it should be understood that it is not required to implement or possess all of the systems shown. More or fewer systems may be implemented alternatively.
[0080] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0081] The artistic character generation device provided in this application, employing the artistic character generation method described in the above embodiments, can solve the technical problems mentioned in the background art. Compared with the prior art, the beneficial effects of the artistic character generation device provided in this application are the same as those of the artistic character generation method provided in the above embodiments, and other technical features of the artistic character generation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.
[0082] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0083] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
[0084] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the artistic word generation method in the above embodiments.
[0085] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0086] The aforementioned computer-readable storage medium may be included in the word art generation device; or it may exist independently and not be assembled into the word art generation device.
[0087] The aforementioned computer-readable storage medium carries one or more programs. When these programs are executed by the artistic font generation device, the artistic font generation device: acquires a font design sample; extracts features from the font design sample to obtain font structural features and font style features; generates target prompt word information based on the font structural features and font style features, wherein the target prompt word information includes each structural attribute in the font structural features and each style attribute in the font style features; and inputs the target prompt word information into a preset image generation model to obtain an artistic font image. By analyzing the font design sample, extracting font structural features and font style features, and then adaptively generating prompt words based on the font structural features and font style features, the prompt words can impose dual constraints of structure and style on the image generation model, thereby improving the structural accuracy and style consistency of the generated artistic font image, and ensuring the stability of the font style of long text artistic fonts.
[0088] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0089] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0090] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0091] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described artistic font generation method, and is able to solve the technical problems described in the background art. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the artistic font generation method provided in the above embodiments, and will not be repeated here.
[0092] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the artistic word generation method described above.
[0093] The computer program product provided in this application can solve the technical problems described in the background section. Compared with the prior art, the beneficial effects of the computer program product provided in the embodiments of this application are the same as the beneficial effects of the artistic font generation method provided in the above embodiments, and will not be repeated here.
[0094] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0095] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for generating artistic characters, characterized in that, include: Get font design samples; Feature extraction is performed on the font design example to obtain font structure features and font style features; Based on the font structure features and the font style features, target prompt word information is generated, wherein the target prompt word information includes each structural attribute in the font structure features and each style attribute in the font style features; The target prompt information is input into a preset image generation model to obtain an artistic word image.
2. The method for generating artistic characters as described in claim 1, characterized in that, After inputting the target prompt information into a preset image generation model to obtain the artistic word image, the process further includes: The artistic font image is analyzed to obtain the analysis results; Based on the analysis results, the artistic font image is verified; If the verification result is a verification failure, then the font defect details are determined based on the verification result. Based on the font defect details, optimization prompts are generated and input into the image generation model to obtain the optimized artistic font image.
3. The method for generating artistic characters as described in claim 2, characterized in that, The step of generating optimization prompt information based on the font defect details includes: Based on each defect type in the font defect details, generate corresponding reference prompt words; Based on the reference prompt word information corresponding to each defect type, the target prompt word information is adjusted to obtain the optimized prompt word information.
4. The method for generating artistic characters as described in claim 3, characterized in that, When generating multiple optimized prompt words, the step of inputting the optimized prompt words into the image generation model to obtain the optimized artistic word image includes: Each of the optimized prompt words is input into the image generation model to obtain multiple candidate artistic word images; Each candidate artistic character image is matched with the font design example to obtain feature similarity; Based on the feature similarity, the optimized artistic character image is selected from each of the candidate artistic character images.
5. The method for generating artistic characters as described in claim 2, characterized in that, The analysis results include the text in the artistic font image, the font structure features of the text, and the font style features; The step of verifying the artistic font image based on the analysis results includes: Perform typo verification on the text in the artistic font image; and / or, Verify whether the font structure features and font style features of each character in the analysis results are consistent; and / or, The font structure features and font style features of each character in the analysis results are verified against the font structure features and font style features corresponding to the font design sample.
6. The method for generating artistic characters as described in claim 2, characterized in that, After verifying the artistic font image based on the analysis results, the process further includes: If the verification result is successful, the artistic font image will be pushed to the target user; If a user's modification instruction is received, the attribute information to be modified as indicated by the modification instruction is analyzed; Based on the attribute information to be modified, generate modification prompt information; The modified prompt information is input into the image generation model to obtain the modified artistic word image.
7. The method for generating artistic characters as described in claim 1, characterized in that, The feature extraction of the font design example to obtain font structure features and font style features includes: The font design sample is preprocessed; Structural and style attribute analyses are performed on the preprocessed font design sample to obtain the font structural features and font style features.
8. The method for generating artistic characters as described in claim 1, characterized in that, The step of generating target prompt word information based on the font structure features and the font style features includes: Based on the font structure features and font style features, combined with preset input format requirements, style and structure consistency constraints, and prompt word output format requirements, the target prompt word information is generated.
9. An artistic font generation device, characterized in that, The artistic lettering generation device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the artistic lettering generation method as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the artistic font generation method as described in any one of claims 1 to 8.