Construction method and device of art font library, computer equipment and storage medium

By extracting the font shape outline and diffusion model of artistic fonts, the art font pictures are generated and the background removal process is carried out, and the problem of complex background generation and poor reusability of artistic fonts in the existing technology is solved, and efficient and accurate art font library construction is achieved. .

CN119397051APending Publication Date: 2025-02-07PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411518919.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing image generation method based on diffusion model is often accompanied by complex backgrounds or extra elements when generating artistic fonts, which is difficult to meet the marketing scenario needs of pure artistic font materials, and the generated artistic fonts have poor reusability.

Method used

By obtaining the artistic font style and commonly used characters in preset business scenarios, we build a white background font picture, use edge detection algorithm to extract the font shape outline, combine the diffusion model to generate artistic font pictures, and perform background removal processing to build an art font library.

Benefits of technology

It improves the reusability of artistic fonts, simplifies the image processing process, improves processing efficiency and font recognition accuracy, saves time and cost, and enhances the generation efficiency of artistic font library.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397051A_ABST
    Figure CN119397051A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence, and relates to an art font library construction method, which comprises the following steps: acquiring art font styles and common characters in a business scene; constructing a white background font picture based on each common character, and extracting a font shape contour of each common character by adopting an edge detection algorithm; based on each art font style, constructing an instruction text for guiding a preset diffusion model; combining the font shape contour set with the instruction text set to obtain an ordered pair set; processing each ordered pair in the ordered pair set by using a diffusion model to generate an art font picture set; and performing background removal processing on each art font picture in the art font picture set to obtain a target art font picture set, and constructing an art font library of the business scene based on the target art font picture set. The invention further provides an art font library construction device, computer equipment and a storage medium. According to the method, the reusability of art fonts can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method for constructing an artistic font library. Background Art

[0002] In the current digital marketing field, such as the marketing activities created by various business units, the design and application of artistic fonts play a vital role. Traditional artistic fonts are created by designers using professional skills and design software. The process is cumbersome and inefficient, and faces the problems of poor reusability and slow creation efficiency.

[0003] With the rapid development of artificial intelligence and deep learning technologies, especially the significant progress of diffusion models in the field of image generation, the industry has begun to explore the use of technologies such as extended models to automatically generate artistic fonts in order to improve the efficiency of artistic font creation.

[0004] However, the existing image generation methods based on the diffusion model often generate complex backgrounds or additional elements when generating artistic fonts. Even if artistic fonts are generated by the image generation method based on the diffusion model, it is difficult to apply them to marketing scenarios that require pure artistic font materials, and the generated artistic fonts have poor reusability. Summary of the invention

[0005] The purpose of the embodiments of the present application is to provide a method, device, computer equipment and storage medium for constructing an artistic font library, the main purpose of which is to improve the reusability of artistic fonts.

[0006] In order to solve the above technical problems, the present application embodiment provides a method for constructing an art font library, which adopts the following technical solution:

[0007] Obtain at least one artistic font style and at least one commonly used character in a preset business scenario;

[0008] Constructing a white background font image based on each of the commonly used characters, processing the white background font image using an edge detection algorithm, extracting the font shape outline of each of the commonly used characters, and obtaining a font shape outline set;

[0009] Based on each of the artistic font styles, constructing instruction texts for guiding a preset diffusion model to obtain an instruction text set;

[0010] Combining each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set;

[0011] Using the preset diffusion model to process each ordered pair in the ordered pair set, to generate an artistic font picture set;

[0012] Background removal is performed on each artistic font picture in the artistic font picture set to obtain a target artistic font picture set, and an artistic font library for the preset business scenario is constructed based on the target artistic font picture set.

[0013] Furthermore, the obtaining of at least one artistic font style in a preset business scenario includes:

[0014] Acquire historical design materials of the preset business scenario;

[0015] Performing cluster analysis on the historical design materials to obtain a set of commonly used artistic font styles for the preset business scenario;

[0016] At least one artistic font style is obtained from the commonly used artistic font style set.

[0017] Furthermore, the edge detection algorithm is used to process the white background font image, and the font shape outline of each commonly used character is extracted to obtain a font shape outline set, including:

[0018] An edge detection algorithm is used to extract an edge probability map of the white background font picture, and the edge probability map is subjected to image binarization processing to obtain a binary edge image;

[0019] Performing a connected domain analysis on the binary edge image to obtain a plurality of font connected domains, and matching each of the font connected domains using a preset font shape feature to obtain a font boundary box;

[0020] The font boundary box is extracted by a contour tracing algorithm to obtain the font shape contour of each of the commonly used characters, and all shape contours are collected to obtain the font shape contour set.

[0021] Furthermore, the performing image binarization processing on the edge probability map to obtain a binary edge image includes:

[0022] Calculating a histogram of the edge probability map, and determining a binarization threshold according to the histogram;

[0023] The edge probability map is subjected to image binarization processing according to the binarization threshold value to obtain the binarized edge image.

[0024] Furthermore, based on each of the artistic font styles, an instruction text for guiding a preset diffusion model is constructed to obtain an instruction text set, including:

[0025] Extracting multiple features of each artistic font style to obtain a style feature set;

[0026] According to a pre-constructed unique style mapping table, selecting unique features of each artistic font style from the style feature set;

[0027] The corresponding instruction text is written according to the unique feature, and all the instruction texts are collected to obtain the instruction text set.

[0028] Furthermore, the step of processing each ordered pair in the ordered pair set by using the preset diffusion model to generate an artistic font picture set includes:

[0029] For each ordered pair in the ordered pair set, the preset diffusion model is used to parse the instruction text of the ordered pair to extract artistic style features;

[0030] Iterate the ordered pair of font shape outline and artistic style feature according to a preset number of iterations;

[0031] When the preset number of iterations is reached, outputting the artistic font image corresponding to the ordered pair;

[0032] When each ordered pair in the ordered pair set generates a corresponding art font picture, all the art font pictures are collected to generate an art font picture set.

[0033] Furthermore, before performing background removal processing on each artistic font picture in the artistic font picture set, the method further includes:

[0034] Convert each artistic font picture in the artistic font picture set into a grayscale image;

[0035] Binarizing the grayscale image to generate a binary grayscale image;

[0036] Extracting the outline of the artistic font from the binary grayscale image;

[0037] Whether each artistic font picture in the artistic font picture set is qualified is judged according to the artistic font outline and the font shape outline.

[0038] In order to solve the above technical problems, the present application embodiment also provides a device for constructing an art font library, which adopts the following technical solution:

[0039] An acquisition module, used to acquire at least one artistic font style and at least one commonly used character in a preset business scenario;

[0040] An extraction module, configured to construct a white background font image based on each of the commonly used characters, process the white background font image using an edge detection algorithm, extract a font shape outline of each of the commonly used characters, and obtain a font shape outline set;

[0041] A generating module, used for constructing instruction texts for guiding a preset diffusion model based on each of the artistic font styles, to obtain an instruction text set;

[0042] A combining module, used for combining each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set;

[0043] A diffusion module, used for processing each ordered pair in the ordered pair set by using the preset diffusion model to generate an artistic font picture set;

[0044] A construction module is used to perform background removal processing on each art font picture in the art font picture set to obtain a target art font picture set, and to construct an art font library for the preset business scenario based on the target art font picture set.

[0045] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0046] Obtain at least one artistic font style and at least one commonly used character in a preset business scenario;

[0047] Constructing a white background font image based on each of the commonly used characters, processing the white background font image using an edge detection algorithm, extracting the font shape outline of each of the commonly used characters, and obtaining a font shape outline set;

[0048] Based on each of the artistic font styles, constructing instruction texts for guiding a preset diffusion model to obtain an instruction text set;

[0049] Combining each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set;

[0050] Using the preset diffusion model to process each ordered pair in the ordered pair set, to generate an artistic font picture set;

[0051] Background removal is performed on each artistic font picture in the artistic font picture set to obtain a target artistic font picture set, and an artistic font library for the preset business scenario is constructed based on the target artistic font picture set.

[0052] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0053] Obtain at least one artistic font style and at least one commonly used character in a preset business scenario;

[0054] Constructing a white background font image based on each of the commonly used characters, processing the white background font image using an edge detection algorithm, extracting the font shape outline of each of the commonly used characters, and obtaining a font shape outline set;

[0055] Based on each of the artistic font styles, constructing instruction texts for guiding a preset diffusion model to obtain an instruction text set;

[0056] Combining each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set;

[0057] Using the preset diffusion model to process each ordered pair in the ordered pair set, to generate an artistic font picture set;

[0058] Background removal is performed on each artistic font picture in the artistic font picture set to obtain a target artistic font picture set, and an artistic font library for the preset business scenario is constructed based on the target artistic font picture set.

[0059] Compared with the prior art, the embodiments of the present application have the following beneficial effects:

[0060] In this embodiment, the present application can accurately obtain the commonly used characters and artistic font styles corresponding to the preset business scenario by obtaining at least one commonly used character and at least one artistic font style in the preset business scenario, thereby improving the reusability of subsequently generated artistic fonts.

[0061] A white background font image is constructed based on each of the commonly used characters to provide a clear, interference-free environment for the font, so that the contrast between the font and the background is maximized, which can simplify the image processing process, improve processing efficiency and reduce false detection and missed detection; an edge detection algorithm is used to process the white background font image, and the font shape contour of each of the commonly used characters is extracted to obtain a font shape contour set, which can retain key information and reduce subsequent calculations, thereby improving processing efficiency and improving the accuracy of font recognition.

[0062] By constructing an instruction text set to guide the preset diffusion model, it is ensured that the model can accurately follow the preset style features when generating artistic fonts, so as to ensure that the model can generate more accurate and expected artistic fonts; and by constructing the instruction text set, the search space of subsequent models in generating artistic fonts can be reduced, thereby improving the efficiency of artistic font generation.

[0063] By combining each font shape outline with each instruction text, it is ensured that each shape outline can accurately match the corresponding style feature to avoid repeated matching, and the ordered pair input form is used to provide clear guidance for the subsequent artistic font generation process, thereby improving the generation efficiency of the subsequent model.

[0064] Using the preset diffusion model to process each ordered pair in the ordered pair set to generate an art font picture set can greatly save time and cost compared to traditional hand-drawing or software drawing, and improve the efficiency of subsequent art font library generation.

[0065] The target art font picture set is obtained by removing the background of each art font picture in the art font picture set and adding an Alpha channel and a transparent channel. An art font library for a preset business scenario is constructed based on the target art font picture set, which avoids complex backgrounds and additional elements associated with art fonts and improves the reusability of art fonts. BRIEF DESCRIPTION OF THE DRAWINGS

[0066] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0067] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0068] Figure 2 A flowchart of an embodiment of a method for constructing an art font library according to the present application;

[0069] Figure 3 is a structural schematic diagram of an embodiment of a device for constructing an art font library according to the present application;

[0070] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0071] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0072] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0073] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0074] like Figure 1 As shown, the system architecture 100 may include a terminal device 101, a network 102 and a server 103. The terminal device 101 may be a laptop 1011, a tablet computer 1012 or a mobile phone 1013. The network 102 is used to provide a medium for a communication link between the terminal device 101 and the server 103. The network 102 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0075] The user can use the terminal device 101 to interact with the server 103 through the network 102 to receive or send messages, etc. Various communication client applications can be installed on the terminal device 101, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0076] The terminal device 101 can be any electronic device with a display screen and supporting web browsing. In addition to a laptop computer 1011, a tablet computer 1012 or a mobile phone 1013, the terminal device 101 can also be an e-book reader, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 (Moving Picture Experts Group Audio Layer IV), a laptop computer, a desktop computer, etc.

[0077] The server 103 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal device 101 .

[0078] It should be noted that the method for constructing the art font library provided in the embodiment of the present application is generally executed by a server / terminal device, and accordingly, the device for constructing the art font library is generally arranged in the server / terminal device.

[0079] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0080] Continue to refer Figure 2 , shows a flow chart of an embodiment of a method for constructing an art font library according to the present application. The method for constructing an art font library comprises the following steps:

[0081] S201. Obtain at least one artistic font style and at least one commonly used character in a preset business scenario.

[0082] In this embodiment, the commonly used characters refer to commonly used characters in business scenarios. For example, in various marketing activity scenarios of Ping An Group, commonly used characters include "Ping", "An", "Ke", "Ji", "Pu", "Hui", "Jin", "Rong", etc.; the artistic font style refers to the artistic font style commonly used in preset scenarios, such as decorative style, handwriting style, retro style, modern minimalist style, brush style, creative deformation style, etc.; according to the preset business scenario, at least one commonly used character and at least one artistic style corresponding to the business scenario are obtained from the preset font library.

[0083] By analyzing artistic fonts, the artistic fonts are decoupled and represented as shapes, materials, and colors, wherein the shapes are controlled by outlines, and the attributes such as materials and colors are controlled by instructions; the instructions include descriptive text instructions, keyword instructions, and embedded vector instructions.

[0084] In one embodiment, obtaining at least one artistic font style in a preset business scenario includes:

[0085] Acquire historical design materials of the preset business scenario;

[0086] Performing cluster analysis on the historical design materials to obtain a set of commonly used artistic font styles for the preset business scenario;

[0087] At least one artistic font style is obtained from the commonly used artistic font style set.

[0088] In this embodiment, the historical design material refers to the artistic font style created or used in the preset business scenario; the clustering algorithm used in the cluster analysis is any one of a plurality of clustering algorithms such as K-means, hierarchical clustering, DBSCAN, etc.; all the historical design materials in the preset business scenario are obtained, the artistic font style of each historical design material is extracted, and all the artistic font styles are clustered; according to the similarity of the artistic font styles, all the artistic font styles are divided into several clusters, each cluster represents an artistic font style, and the artistic font styles of the same category are summarized into the same cluster to obtain a commonly used artistic font style set containing multiple categories of artistic font styles; according to a preset number of artistic font styles, at least one artistic font style is randomly selected from the commonly used artistic font style set.

[0089] In this embodiment, when the number of commonly used artistic font styles in the set is less than the preset number of artistic font styles, an artistic font style with a higher similarity can be selected from the artistic font style library as a commonly used artistic font style to meet the preset number requirement of artistic font styles.

[0090] Similarly, in this embodiment, a plurality of commonly used characters can be extracted and identified from historical design materials in a preset scenario to obtain a commonly used character set, and at least one commonly used character can be obtained from the preset font library based on the commonly used character set.

[0091] In this embodiment, by performing cluster analysis based on historical design materials of preset business scenarios, a set of commonly used artistic font styles in preset business scenarios can be quickly identified, thereby improving the accuracy and efficiency of obtaining artistic font styles.

[0092] In an implementable example A, for example, historical design materials of Ping An Group's marketing activities are obtained, and a set of commonly used characters in Ping An Group's marketing activities is identified from the historical design materials. Based on the commonly used character set, commonly used characters in Ping An Group's marketing activities are obtained from a font library containing multiple fonts, such as "Ping", "An", "Ke", "Ji", "An", "Xin", "Huan", "Kuan", "Xin", "Yong", "Wu", "You", "Double", "Zhong", "Li", "Yu", "Qing", "Jia", "Jie" and other approximately 5,000 commonly used characters. Cluster analysis is performed on all artistic font styles from the historical design materials to obtain a set of commonly used artistic font styles, and 10 artistic font styles, including decorative style, handwriting style, retro style, modern minimalist style, brush style, creative deformation style, etc., are obtained from the artistic font style set.

[0093] In this embodiment, by acquiring at least one commonly used character and at least one artistic font style in a preset business scenario, the commonly used characters and artistic font styles corresponding to the preset business scenario can be accurately acquired, thereby improving the reusability of subsequently generated artistic fonts.

[0094] S202: construct a white background font image based on each of the commonly used characters, use an edge detection algorithm to process the white background font image, extract the font shape outline of each of the commonly used characters, and obtain a font shape outline set.

[0095] In this embodiment, the white background font image refers to an image containing commonly used characters and having a white background; for each commonly used character, each character is rendered using a preset graphics library or a preset font rendering tool, each commonly used character is rendered into a separate white background image, and the white background image is saved in PNG format or JPEG format. In this embodiment, the white background image is saved in PNG format to obtain a white background font image corresponding to each commonly used character; a preprocessing operation is performed on the white background font image corresponding to each commonly used character to obtain a preprocessed white background font image, and a preset edge detection algorithm is used to extract the contour of the preprocessed white background font image to obtain a font shape contour of each commonly used character, thereby obtaining a font shape contour set of commonly used characters.

[0096] In one embodiment, the edge detection algorithm is used to process the white background font image, and the font shape outline of each commonly used character is extracted to obtain a font shape outline set, including:

[0097] An edge detection algorithm is used to extract an edge probability map of the white background font picture, and the edge probability map is subjected to image binarization processing to obtain a binary edge image;

[0098] Performing a connected domain analysis on the binary edge image to obtain a plurality of font connected domains, and matching each of the font connected domains using a preset font shape feature to obtain a font boundary box;

[0099] The font boundary box is extracted by a contour tracing algorithm to obtain the font shape contour of each of the commonly used characters, and all shape contours are collected to obtain the font shape contour set.

[0100] In this embodiment, the edge detection algorithm refers to the HED algorithm. Since the HED algorithm usually processes grayscale images, before using the edge detection algorithm to process the white background font image, it is necessary to perform a preprocessing operation on the white background font image, including performing a denoising operation (such as a Gaussian filter operation) on the white background font image to improve the accuracy of subsequent edge detection, performing a grayscale operation on the denoised image, converting the denoised image into a grayscale image, retaining the brightness information of the image and removing the color information; using the HED algorithm to detect the preprocessed white background font image to obtain an edge probability map, binarizing the edge probability map, and converting the edge probability map into a grayscale image. Each edge probability point of the edge probability map is compared with a preset edge threshold to obtain a binary edge image; the binary edge image may have multiple connected domains, and the connected domain related to the font shape is identified by performing connected domain analysis on the binary edge image, and then matching with each connected domain according to the preset font shape feature is performed to screen out the connected domain consistent with the preset font shape feature, and based on the screened font connected domain, the font bounding box of the font connected domain is extracted, and the font bounding box is analyzed by a preset contour tracking algorithm to extract the font shape contour of each commonly used character, and the font shape contours of all commonly used characters are collected to generate a font shape contour set.

[0101] In this embodiment, by extracting the edge probability map of the white background font image, the edge can be accurately extracted, thereby improving the accuracy of subsequent text recognition; and the image after edge detection is more concise than the original image, reducing the amount of calculation for subsequent processing and improving processing efficiency.

[0102] In another embodiment, performing image binarization processing on the edge probability map to obtain a binary edge image includes:

[0103] Calculating a histogram of the edge probability map, and determining a binarization threshold according to the histogram;

[0104] The edge probability map is subjected to image binarization processing according to the binarization threshold value to obtain the binarized edge image.

[0105] In this embodiment, the histogram refers to a bar graph used to display the probability distribution of a continuous variable; the value range is segmented according to each probability point of the edge probability graph to obtain multiple interval ranges, the number of values ​​in each interval is calculated, and a histogram is drawn, and a suitable binarization threshold is determined according to the histogram, the edge probability graph is binarized, each edge probability point of the edge probability graph is compared with the binarization threshold, probability points less than the binarization threshold are removed, and edge probability points greater than or equal to the binarization threshold are retained to obtain a binary edge image.

[0106] In this embodiment, a binarization threshold may be preset, and the binarization threshold may be adjusted according to specific requirements to balance the integrity and accuracy of the edge.

[0107] In this embodiment, by calculating the histogram and setting the binarization threshold according to the histogram, the accuracy of generating the binary edge image can be improved and information loss can be prevented; and by the threshold determination method of the histogram, multiple attempts and adjustments are avoided, thereby improving processing efficiency.

[0108] Continuing with the above-mentioned feasible example A, a white background font image is constructed for each of the approximately 5,000 commonly used characters obtained in the marketing activity scenarios of Ping An Group, the 5,000 white background font images are saved in PNG format, the 5,000 white background font images are preprocessed to obtain preprocessed white background images, and based on the 5,000 white background images containing commonly used characters, an edge detection algorithm is used to identify the font shape contours of the 5,000 white background images.

[0109] In this embodiment, a white background font image is constructed based on each of the commonly used characters to provide a clear, interference-free environment for the font, so that the contrast between the font and the background is maximized, which can simplify the image processing process, improve processing efficiency and reduce false detection and missed detection; the white background font image is processed using an edge detection algorithm to extract the font shape outline of each of the commonly used characters to obtain a font shape outline set, which can retain key information and reduce subsequent calculations, thereby improving processing efficiency and improving the accuracy of font recognition.

[0110] S203: Based on each of the artistic font styles, construct an instruction text for guiding a preset diffusion model to obtain an instruction text set.

[0111] In this embodiment, based on the style of each artistic font and the input requirements of the preset diffusion model, an instruction text corresponding to the input requirements and used to guide the preset diffusion model is constructed according to the input requirements to obtain an instruction text set.

[0112] In one embodiment, the instruction text for guiding the preset diffusion model is constructed based on each of the artistic font styles to obtain an instruction text set, including:

[0113] Extracting multiple features of each artistic font style to obtain a style feature set;

[0114] According to a pre-constructed unique style mapping table, selecting unique features of each artistic font style from the style feature set;

[0115] The corresponding instruction text is written according to the unique feature, and all the instruction texts are collected to obtain the instruction text set.

[0116] In this embodiment, a preset feature extraction model (such as a convolutional neural model, a VGG network, a ResNET network, etc.) is used to extract multiple style features of each art font style, and a style feature set corresponding to each art font style is generated. According to a pre-constructed unique style mapping table, at least one unique feature corresponding to each art font style is determined from the style feature set. The pre-constructed unique style mapping table records the unique features corresponding to each art font style. For example, for a handwritten art font style, 1. the corresponding unique feature is that the font shape is natural and smooth, with a handwritten feel; 2. the line thickness varies, imitating the strength change during handwriting; 3. the color is light and elegant ink with a paper texture effect; according to the pre-constructed unique style mapping table, the above unique features are extracted from the handwritten art font style, and an instruction text of the handwritten art font style is written according to the unique features, such as a natural and smooth handwritten style font; rich line thickness changes, imitating handwriting strength; light and elegant ink with a paper texture effect; the unique features corresponding to each art font style are analyzed, and the corresponding instruction text is written according to the unique features corresponding to each art font style to obtain an instruction text set.

[0117] It is worth mentioning that the instruction text may include one unique feature or a combination of multiple unique features.

[0118] In this embodiment, by extracting the unique features of each artistic font style and constructing the corresponding instruction text based on the unique features, it can ensure that the subsequent model can accurately capture the uniqueness of each style when generating artistic fonts, thereby improving the accuracy of subsequent artistic font style generation; through the construction of instruction text, the diversity of artistic fonts can be improved.

[0119] In one embodiment, based on each of the artistic font styles, an embedded vector instruction or keyword instruction for guiding the preset diffusion model may also be constructed according to the input requirements of the preset diffusion model.

[0120] Continuing with the above-mentioned feasible example A, 10 artistic font styles, including decorative style, handwriting style, retro style, modern minimalist style, brush style, creative deformation style, etc., are obtained in the marketing activity scenario of Ping An Group based on historical design materials. For each determined artistic font style, the features of each artistic font style are extracted respectively through the feature extraction model, and a style feature set corresponding to each artistic font style is generated. Then, according to the unique style mapping table, at least one unique feature corresponding to each artistic font style is determined from the style feature set. Taking the handwritten artistic font style as an example, the unique feature of the handwritten artistic font style determined from the style feature set is 1, and the corresponding unique feature is that the font shape is natural and smooth, and has handwritten 1. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 2. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 2. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 2. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 2. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 2. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps: 1. The method comprises the following steps:

[0121] In this embodiment, by constructing an instruction text set for guiding the preset diffusion model, it is ensured that the model can accurately follow the preset style features when generating artistic fonts, so as to ensure that the model can generate more accurate and expected artistic fonts; and by constructing the instruction text set, the search space of subsequent models in generating artistic fonts can be reduced, thereby improving the generation efficiency of artistic fonts.

[0122] S204: Combine each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set.

[0123] In this embodiment, each font shape outline in the font shape outline set is traversed, and based on each font shape outline, it is combined with each instruction text in the instruction text set to generate an ordered pair, wherein the ordered pair is composed of a font shape outline and an instruction text, and all ordered pairs are summarized to obtain an ordered pair set.

[0124] Continuing with the above-mentioned feasible example A, 5,000 font shape outlines are combined with 30-50 instruction texts in pairs to generate 150,000-250,000 ordered pairs, and all the ordered pairs are summarized to obtain an ordered pair set.

[0125] In this embodiment, by combining each font shape outline with each instruction text, it is ensured that each shape outline can accurately match the corresponding style feature to avoid repeated matching, and the ordered pair input form is used to provide clear guidance for the subsequent artistic font generation process, thereby improving the generation efficiency of the subsequent model.

[0126] S205 : Using the preset diffusion model to process each ordered pair in the ordered pair set to generate an artistic font picture set.

[0127] In this embodiment, the preset diffusion model refers to the SDXL-scribble model. The SDXL-scribble (Stable Diffusion XL) model is part of the Diffusion extension framework, which is mainly used for text-to-image generation and has the characteristics of enhancing picture delicacy, optimizing composition and language comprehension ability.

[0128] Each ordered pair is processed using a preset diffusion model, and the font shape outline of the ordered pair is rendered or transformed according to the instruction text of the ordered pair to generate at least one art font picture, and all generated art font pictures are collected to generate an art font picture set.

[0129] In one embodiment, the using the preset diffusion model to process each ordered pair in the ordered pair set to generate an artistic font picture set includes:

[0130] For each ordered pair in the ordered pair set, the preset diffusion model is used to parse the instruction text of the ordered pair to extract artistic style features;

[0131] Iterate the ordered pair of font shape outline and artistic style feature according to a preset number of iterations;

[0132] When the preset number of iterations is reached, outputting the artistic font image corresponding to the ordered pair;

[0133] When each ordered pair in the ordered pair set generates a corresponding art font picture, all the art font pictures are collected to generate an art font picture set.

[0134] In this embodiment, each ordered pair is input into the SDXL-scribble model, and for each ordered pair in the ordered pair set, the font shape outline of the ordered pair is parsed and the style features of the instruction text are extracted, and iteration is performed according to the font shape outline and the style features according to a preset number of iterations. In each iteration, the font shape outline is rendered or transformed (such as color change, shape fine-tuning, etc.) according to the style features. When the specified preset number of iterations is reached, the model outputs the art font picture corresponding to the ordered pair, and each ordered pair in the ordered pair set is input into the SDXL-scribble model, and the art font style picture corresponding to the input ordered pair is output. When each ordered pair in the ordered pair set generates a corresponding art font picture, all the art font style pictures are collected to obtain an art font style picture set.

[0135] In this embodiment, each ordered pair is processed by a preset diffusion model, so that artistic font style pictures can be efficiently generated in batches. At the same time, by parsing the instruction text, the accuracy of generating artistic style font pictures can be improved.

[0136] In another embodiment, the preset number of iterations is adjusted, and the same ordered pair is input and different numbers of iterations are used, so that one ordered pair can generate different artistic font style pictures.

[0137] It is worth mentioning that data enhancement or multiple iterations can be performed on the ordered pairs to achieve the goal of generating different artistic font style images for an ordered pair.

[0138] Continuing with the above-mentioned feasible example A, 150,000 to 250,000 ordered pairs are generated and input into the SDXL-scribble model respectively. Based on each ordered pair, the SDXL-scribble model processes the ordered pair and iterates according to a preset number of iterations. During the iteration, the font shape outline is rendered according to the instruction text of the ordered pair. When the preset number of iterations is reached, an artistic font style picture corresponding to the ordered pair is generated. At this time, 150,000 to 250,000 artistic font style pictures are generated. When the requirement is to generate 10 pictures for an ordered pair, the preset number of iterations is modified, and the same ordered pair is used for processing with different numbers of iterations, and finally 1.5 million to 2.5 million artistic font style pictures are generated.

[0139] In this embodiment, each ordered pair in the ordered pair set is processed using the preset diffusion model to generate an art font picture set. Compared with traditional hand-drawing or software drawing, it can greatly save time and cost and improve the efficiency of subsequent art font library generation.

[0140] S206: Perform background removal processing on each artistic font picture in the artistic font picture set to obtain a target artistic font picture set, and construct an artistic font library for the preset business scenario based on the target artistic font picture set.

[0141] In one embodiment, before performing background removal processing on each artistic font picture in the artistic font picture set, the method further includes:

[0142] Convert each artistic font picture in the artistic font picture set into a grayscale image;

[0143] Binarizing the grayscale image to generate a binary grayscale image;

[0144] Extracting the outline of the artistic font from the binary grayscale image;

[0145] Whether each artistic font picture in the artistic font picture set is qualified is judged according to the artistic font outline and the font shape outline.

[0146] In another embodiment, judging whether each artistic font picture in the artistic font picture set is qualified according to the artistic font outline and the font shape outline includes:

[0147] Calculating the distance between the outline of the artistic font and the outline of the font shape and calculating the sum of the pixels of the outline of the font shape;

[0148] When the ratio of the sum of the pixels to the distance value is greater than a preset determination threshold, the artistic font image is determined to be qualified.

[0149] In this embodiment, each artistic font image is converted into a grayscale image, the grayscale image is binarized to generate a binarized grayscale image, and the artistic font outline of the binarized grayscale image is extracted. The binarization process and the method for extracting the artistic font outline are the same as the binarization process and the method for extracting the font shape outline recorded in the above step S202, and are not repeated here. The distance value between the artistic font outline and the font shape outline is calculated, and the sum of the pixels of the font shape outline is calculated. When the ratio of the sum of the pixels to the distance value is greater than a preset determination threshold (for example, 0.95), the artistic font image is judged to be qualified.

[0150] In this embodiment, when the ratio of the sum of the pixels to the distance value is less than or equal to a preset determination threshold (eg, 0.95), the artistic font image is determined to be unqualified and the artistic font image is deleted.

[0151] In this embodiment, when the art font picture is judged to be unqualified, if it is not deleted, all the unqualified pictures can be collected to obtain an unqualified art font picture set, and the parameters corresponding to each unqualified font picture (such as a preset number of iterations, etc.) are analyzed, and each parameter is adjusted until the generated art font picture is qualified.

[0152] In this embodiment, by extracting the artistic font outline of the artistic font image and performing a conformity check with the corresponding font shape outline, it is possible to accurately determine whether the generated artistic font maintains the basic shape and structure of the original font, thereby ensuring the accuracy of subsequent artistic font library construction.

[0153] In this embodiment, the art font picture set refers to qualified art font pictures. After obtaining the qualified art font picture set, the background of each art font picture in the art font picture set is proposed, and an Alpha channel and a transparent channel are added to each art font picture to obtain a target art font picture set. Based on the target art font picture set, an art font library for the preset business scenario is constructed.

[0154] Continuing with the above-mentioned feasible example A, the generated 1.5 million to 2.5 million art font style pictures are checked for qualification, unqualified pictures are eliminated, qualified pictures are saved in a preset picture database, and background removal is performed on each qualified art font picture in the preset picture database. At the same time, an alpha channel and a transparent channel are added to each art font picture to obtain a target art font picture set. Based on the target art font picture set, an art font library for Ping An Group's marketing scenario is constructed.

[0155] In this embodiment, the target art font picture set is obtained by removing the background of each art font picture in the art font picture set and adding an Alpha channel and a transparent channel. An art font library for a preset business scenario is constructed based on the target art font picture set, thereby avoiding complex backgrounds and additional elements associated with art fonts and improving the reusability of art fonts.

[0156] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0157] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0158] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0159] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0160] Further references Figure 3 , as a response to the above Figure 2 The present application provides an embodiment of a device for constructing an art font library. Figure 2 Corresponding to the method embodiment shown, the apparatus can be specifically applied to various computer devices.

[0161] like Figure 3 As shown, the device 300 for constructing an art font library in this embodiment includes: an acquisition module 301, an extraction module 302, a generation module 303, a combination module 304, a diffusion module 305, and a construction module 306. Among them:

[0162] An acquisition module 301 is used to acquire at least one artistic font style and at least one commonly used character in a preset business scenario;

[0163] An extraction module 302 is used to construct a white background font image based on each of the commonly used characters, process the white background font image using an edge detection algorithm, extract the font shape outline of each of the commonly used characters, and obtain a font shape outline set;

[0164] A generating module 303 is used to construct an instruction text for guiding a preset diffusion model based on each of the artistic font styles, and obtain an instruction text set;

[0165] A combining module 304, configured to combine each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set;

[0166] A diffusion module 305 is used to process each ordered pair in the ordered pair set by using the preset diffusion model to generate an artistic font picture set;

[0167] The construction module 306 is used to perform background removal processing on each artistic font picture in the artistic font picture set to obtain a target artistic font picture set, and to construct an artistic font library for the preset business scenario based on the target artistic font picture set.

[0168] In this embodiment, the present application can accurately obtain the commonly used characters and artistic font styles corresponding to the preset business scenario by obtaining at least one commonly used character and at least one artistic font style in the preset business scenario, thereby improving the reusability of subsequently generated artistic fonts.

[0169] A white background font image is constructed based on each of the commonly used characters to provide a clear, interference-free environment for the font, so that the contrast between the font and the background is maximized, which can simplify the image processing process, improve processing efficiency and reduce false detection and missed detection; an edge detection algorithm is used to process the white background font image, and the font shape contour of each of the commonly used characters is extracted to obtain a font shape contour set, which can retain key information and reduce subsequent calculations, thereby improving processing efficiency and improving the accuracy of font recognition.

[0170] By constructing an instruction text set to guide the preset diffusion model, it is ensured that the model can accurately follow the preset style features when generating artistic fonts, so as to ensure that the model can generate more accurate and expected artistic fonts; and by constructing the instruction text set, the search space of subsequent models in generating artistic fonts can be reduced, thereby improving the efficiency of artistic font generation.

[0171] By combining each font shape outline with each instruction text, it is ensured that each shape outline can accurately match the corresponding style feature to avoid repeated matching, and the ordered pair input form is used to provide clear guidance for the subsequent artistic font generation process, thereby improving the generation efficiency of the subsequent model.

[0172] Using the preset diffusion model to process each ordered pair in the ordered pair set to generate an art font picture set can greatly save time and cost compared to traditional hand-drawing or software drawing, and improve the efficiency of subsequent art font library generation.

[0173] The target art font picture set is obtained by removing the background of each art font picture in the art font picture set and adding an Alpha channel and a transparent channel. An art font library for a preset business scenario is constructed based on the target art font picture set, which avoids complex backgrounds and additional elements associated with art fonts and improves the reusability of art fonts.

[0174] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0175] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 4 with a memory 41, a processor 42, and a network interface 43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0176] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0177] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the construction method of the art font library, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0178] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the method for constructing the art font library.

[0179] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0180] During the implementation of the electronic device of the present application, by acquiring at least one commonly used character and at least one artistic font style in a preset business scenario, the commonly used characters and artistic font styles corresponding to the preset business scenario can be accurately acquired, thereby improving the reusability of subsequently generated artistic fonts; a white background font image is constructed based on each of the commonly used characters to provide a clear and interference-free environment for the font, thereby maximizing the contrast between the font and the background, simplifying the image processing process, improving processing efficiency, and reducing false detections and missed detections; an edge detection algorithm is used to process the white background font image, and the font shape contour of each of the commonly used characters is extracted to obtain a font shape contour set, which can retain key information and reduce the amount of subsequent calculations, thereby improving processing efficiency and improving the accuracy of font recognition; by constructing an instruction text set for guiding a preset diffusion model, Ensure that the model can accurately follow the preset style features when generating artistic fonts, so as to ensure that the model can generate more accurate and expected artistic fonts; and by constructing an instruction text set, it can reduce the search space of subsequent models in generating artistic fonts, thereby improving the efficiency of artistic font generation; by combining each font shape outline with each instruction text, it is ensured that each shape outline can accurately match the corresponding style features to avoid repeated matching, and through the input form of ordered pairs, provide clear guidance for the subsequent artistic font generation process, thereby improving the generation efficiency of subsequent models; use the preset diffusion model to process each ordered pair in the ordered pair set to generate an artistic font picture set, which can greatly save time and cost compared with traditional hand-drawing or software drawing, and improve the efficiency of subsequent artistic font library generation.

[0181] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the method for constructing an art font library as described above.

[0182] In the implementation process of the computer-readable storage medium of the present application, by acquiring at least one commonly used character and at least one artistic font style in a preset business scenario, it is possible to accurately acquire the commonly used characters and artistic font styles corresponding to the preset business scenario, thereby improving the reusability of subsequently generated artistic fonts; constructing a white background font image based on each of the commonly used characters to provide a clear, interference-free environment for the font, thereby maximizing the contrast between the font and the background, simplifying the image processing process, improving processing efficiency, and reducing false detections and missed detections; using an edge detection algorithm to process the white background font image, extracting the font shape contour of each of the commonly used characters, and obtaining a font shape contour set, which can retain key information and reduce the amount of subsequent calculations, thereby improving processing efficiency and improving the accuracy of font recognition; by constructing an instruction document for guiding a preset diffusion model This set ensures that the model can accurately follow the preset style features when generating artistic fonts, so as to ensure that the model can generate more accurate and expected artistic fonts; and by constructing an instruction text set, it can reduce the search space of subsequent models in generating artistic fonts, thereby improving the efficiency of artistic font generation; by combining each font shape outline with each instruction text, it is ensured that each shape outline can accurately match the corresponding style features to avoid repeated matching, and through the input form of ordered pairs, clear guidance is provided for the subsequent artistic font generation process, thereby improving the generation efficiency of subsequent models; the preset diffusion model is used to process each ordered pair in the ordered pair set to generate an artistic font picture set, which can greatly save time and cost compared with traditional hand-drawing or software drawing, and improve the efficiency of subsequent artistic font library generation.

[0183] The non-Company software tools or components appearing in the embodiments of this application are merely examples and do not represent actual use.

[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0185] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A method for constructing an art font library, characterized in that: The steps include: Obtain at least one artistic font style and at least one commonly used character in a preset business scenario; Constructing a white background font image based on each of the commonly used characters, processing the white background font image using an edge detection algorithm, extracting the font shape outline of each of the commonly used characters, and obtaining a font shape outline set; Based on each of the artistic font styles, constructing instruction texts for guiding a preset diffusion model to obtain an instruction text set; Combining each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set; Using the preset diffusion model to process each ordered pair in the ordered pair set, to generate an artistic font picture set; Background removal is performed on each artistic font picture in the artistic font picture set to obtain a target artistic font picture set, and an artistic font library for the preset business scenario is constructed based on the target artistic font picture set.

2. The method for constructing an artistic font library according to claim 1, characterized in that: The obtaining of at least one artistic font style in a preset business scenario includes: Acquire historical design materials of the preset business scenario; Performing cluster analysis on the historical design materials to obtain a set of commonly used artistic font styles for the preset business scenario; At least one artistic font style is obtained from the commonly used artistic font style set.

3. The method for constructing an artistic font library according to claim 1, characterized in that: The edge detection algorithm is used to process the white background font image, and the font shape outline of each commonly used character is extracted to obtain a font shape outline set, including: An edge detection algorithm is used to extract an edge probability map of the white background font picture, and the edge probability map is subjected to image binarization processing to obtain a binary edge image; Performing a connected domain analysis on the binary edge image to obtain a plurality of font connected domains, and matching each of the font connected domains using a preset font shape feature to obtain a font boundary box; The font boundary box is extracted by a contour tracing algorithm to obtain the font shape contour of each of the commonly used characters, and all shape contours are collected to obtain the font shape contour set.

4. The method for constructing an artistic font library according to claim 3, characterized in that: The step of performing image binarization processing on the edge probability map to obtain a binarized edge image includes: Calculating a histogram of the edge probability map, and determining a binarization threshold according to the histogram; The edge probability map is subjected to image binarization processing according to the binarization threshold value to obtain the binarized edge image.

5. The method for constructing an artistic font library according to claim 1, characterized in that: The method of constructing an instruction text for guiding a preset diffusion model based on each of the artistic font styles to obtain an instruction text set includes: Extracting multiple features of each artistic font style to obtain a style feature set; According to a pre-constructed unique style mapping table, selecting unique features of each artistic font style from the style feature set; The corresponding instruction text is written according to the unique feature, and all the instruction texts are collected to obtain the instruction text set.

6. The method for constructing an artistic font library according to claim 1, wherein: The using the preset diffusion model to process each ordered pair in the ordered pair set to generate an artistic font picture set includes: For each ordered pair in the ordered pair set, the preset diffusion model is used to parse the instruction text of the ordered pair to extract artistic style features; Iterate the ordered pair of font shape outline and artistic style feature according to a preset number of iterations; When the preset number of iterations is reached, outputting the artistic font image corresponding to the ordered pair; When each ordered pair in the ordered pair set generates a corresponding art font picture, all the art font pictures are collected to generate an art font picture set.

7. The method for constructing an artistic font library according to claim 1, characterized in that: Before performing background removal processing on each artistic font picture in the artistic font picture set, the method further includes: Convert each artistic font picture in the artistic font picture set into a grayscale image; Binarizing the grayscale image to generate a binary grayscale image; Extracting the outline of the artistic font from the binary grayscale image; Whether each artistic font picture in the artistic font picture set is qualified is judged according to the artistic font outline and the font shape outline.

8. A device for constructing an art font library, characterized in that: The device comprises: An acquisition module, used to acquire at least one artistic font style and at least one commonly used character in a preset business scenario; An extraction module, configured to construct a white background font image based on each of the commonly used characters, process the white background font image using an edge detection algorithm, extract a font shape outline of each of the commonly used characters, and obtain a font shape outline set; A generating module, used for constructing instruction texts for guiding a preset diffusion model based on each of the artistic font styles, to obtain an instruction text set; A combining module, used for combining each font shape outline of the font shape outline set with each instruction text of the instruction text set to obtain an ordered pair set; A diffusion module, used for processing each ordered pair in the ordered pair set by using the preset diffusion model to generate an artistic font picture set; A construction module is used to perform background removal processing on each art font picture in the art font picture set to obtain a target art font picture set, and to construct an art font library for the preset business scenario based on the target art font picture set.

9. A computer device, characterized in that: The computer device comprises: 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 so that the at least one processor can execute the method for constructing an art font library as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for constructing an art font library according to any one of claims 1 to 7 is implemented.