A method and system for generating folk Chinese character art works based on personalized handwriting forms

By collecting user handwriting, using the Stable Diffusion model and LoRA module to generate unique folk Chinese character art works, solving the problem of lack of personalization in the existing technology and realizing the unique artistic character generation of user handwriting style.

CN119379862BActive Publication Date: 2025-07-11SICHUAN FINE ARTS INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411477617.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-07-11
Estimated Expiration
2044-10-22

AI Technical Summary

Technical Problem

The existing art word generation methods cannot effectively achieve personalization, and lack the reflection of user handwriting style, resulting in the generated art word lacking uniqueness and personalization.

Method used

By collecting user's handwriting, using the Stable Diffusion model combined with the LoRA module, folk Chinese character art works with user handwriting style are generated in real time, including stroke recognition, style matching and texture rendering, supporting user selection and adjustment, and building a personalized handwriting library to improve matching accuracy.

Benefits of technology

The generated artistic characters are unique, retaining the user's handwriting style, improving the accuracy of personalized handwriting matching and the uniqueness of artistic characters, and meeting users' personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119379862B_ABST
    Figure CN119379862B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for generating folk Chinese character art works based on personalized handwriting forms. The method includes: displaying several folk Chinese character art font style templates for users to select; collecting the strokes input by the user through handwriting; based on the folk Chinese character art style template selected by the user, using artificial intelligence to generate in real time corresponding folk Chinese character art works with the writing style of the strokes input by the user; the writing style includes the shape of the written strokes and the positional relationship between the strokes; based on the framework structure and style form of the written strokes, generating a pre-trained folk Chinese character art font style through artificial intelligence technology. The present invention uses the user's handwritten strokes as the basis to generate folk Chinese character art style fonts, and through the form of artificial intelligence technology-assisted creation, creates folk Chinese character art works that not only carry the unique writing experience style of individuals but also are endowed with a strong visual style.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of art word generation, and particularly to a method and system for generating folk Chinese character art works based on personalized handwriting forms. Background Art

[0002] Folk Chinese character art fully demonstrates folk characteristics. Its creative subjects consist of the public such as farmers, laborers, and handicraftsmen. It is these amateur artists who give full play to their talents and enjoy their own works, creating countless simple folk Chinese character art works with distinct rural flavors using media such as wood carving, paper cutting, and oil painting.

[0003] Different from folk Chinese character art, existing art words are generally fixed fonts, that is, after inputting the content, the corresponding prefabricated art words can be directly called.

[0004] Chinese Patent Application CN202210832344.3 discloses an unsupervised general art word generation method. The method includes: constructing a general art word generation model, including an encoder, a first decoder, and a second decoder; optimizing the general art word generation model, and the optimization process includes a de-texturing stage, a font migration stage, and a texturing stage. In the de-texturing stage, the input image is a font reference image, and after passing through the encoder and the second decoder, the texture information carried by the font reference image is removed to obtain the corresponding mask image; in the font migration stage, the input images are a content image and the mask image obtained in the de-texturing stage, and after passing through the encoder and the first decoder, an image after font migration of the content image is obtained; in the texturing stage, the input images are the image obtained in the font migration stage and a texture reference image, and after passing through the encoder and the second decoder, a textured result image is obtained.

[0005] Although the above-mentioned prior art can generate corresponding art words according to requirements, the glyphs themselves are still pre-customized, and there are still deficiencies in terms of personalization. Summary of the Invention

[0006] The purpose of the present invention is to provide a method and system for generating folk Chinese character art works based on personalized handwriting forms, which can partially solve or alleviate the above deficiencies in the prior art, and can generate art words with the user's handwriting style in real time by collecting the user's handwriting.

[0007] To solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions:

[0008] In the first aspect of the present invention, there is provided a method for generating folk Chinese character art works based on personalized handwriting forms, including the steps of:

[0009] Showing several folk Chinese character art font style templates to the user for selection;

[0010] Collect the Chinese character strokes input by the user by handwriting, and based on the current stroke input, according to the folk Chinese character art font style template selected by the user, the artificial intelligence generates the corresponding folk Chinese character art works in real time; the folk Chinese character art works have the stroke writing style input by the user; the stroke writing style includes the shape of the written strokes and the positional relationship between the strokes.

[0011] As an improvement, the method further includes the steps of:

[0012] When it is recognized that the user logs in for the first time, prompt the user to conduct a handwriting test, identify the personalized handwriting of the user according to the handwriting test result, and then enter it into the pre-constructed handwriting library; and

[0013] When the user handwrites and inputs the Chinese character strokes, match the first personalized handwriting of the user in the handwriting library according to the user information of the user, perform stroke recognition based on the first personalized handwriting, and generate the corresponding strokes in real time based on the folk Chinese character art font style template selected by the user; and

[0014] When the corresponding personalized handwriting is not matched in the handwriting library, prompt the user to conduct a handwriting test, identify the second personalized handwriting of the user according to the handwriting test result, and then enter it into the pre-constructed handwriting library.

[0015] As an improvement, the method further includes the steps of: when the user handwrites and inputs the Chinese character strokes, prompt the user to select a personalized handwriting, perform stroke recognition according to the selected personalized handwriting, and then generate the corresponding strokes in real time based on the folk Chinese character art font style template selected by the user.

[0016] As an improvement, the method further includes the steps of: when any user corresponds to at least two personalized handwritings, pre-statistics the usage frequency of each personalized handwriting within a preset time period, and use the one with the highest usage frequency as the default personalized handwriting of the user.

[0017] As an improvement, the method further includes the step of converting the strokes into matching pictures with similar shapes according to the shape of the strokes, and the specific steps include:

[0018] When the strokes input by the user form a complete radical or / and reach the first quantity threshold, predict the Chinese characters that the user may input according to the strokes input by the user and display them for the user to select;

[0019] In the case where the user selects the input Chinese character, adjust the matching picture according to the meaning of the Chinese character selected by the user.

[0020] As an improvement, the steps of generating folk Chinese character art strokes include:

[0021] Collect the trajectory of the user's input strokes, and perform image texture rendering on the trajectory based on the folk Chinese character art font style template selected by the user.

[0022] As a further improvement, use the Stable Diffusion model combined with several LoRA modules to redraw the user's strokes to form folk Chinese character art strokes; each folk Chinese character art font style template corresponds to a LoRA module.

[0023] As an improvement, when the user does not select the input Chinese character, after the number of input strokes reaches the second quantity threshold, adjust the color, thickness, or / and the number of matching pictures of the folk Chinese character art strokes.

[0024] As an improvement, when the Chinese character strokes input by the user through handwriting are collected, generate several alternative folk Chinese character art strokes for the user to select;

[0025] In response to the user's selection of the alternative folk Chinese character art strokes, replace the original folk Chinese character art strokes.

[0026] As an improvement, in response to the user's modification of the handwritten Chinese character strokes, make corresponding modifications to the original folk Chinese character art strokes; the modifications include one or several of moving, scaling, and rotating.

[0027] As an improvement, when the user inputs a complete Chinese character, generate several alternative folk Chinese character art strokes according to the strokes selected by the user from the corresponding folk Chinese character art works; in response to the user's selection of the alternative folk Chinese character art strokes, replace the corresponding strokes in the folk Chinese character art works.

[0028] When the user inputs a complete Chinese character, in response to the user's re-selection of the folk Chinese character art font style template, regenerate the corresponding folk Chinese character art work; or, generate the corresponding folk Chinese character art work based on other folk Chinese character art font style templates for the user to select.

[0029] As an improvement, the user downloads the generated folk Chinese character art work by scanning a QR code; or / and, display the generated folk Chinese character art work.

[0030] The second aspect of the present invention lies in providing a system for generating folk Chinese character art works based on personalized handwriting forms, including:

[0031] A template display module for displaying several folk Chinese character art font style templates for the user to select;

[0032] A generation module is used to collect Chinese character strokes input by users through handwriting, and according to the folk Chinese character art font style template selected by the user and based on the current stroke input, artificial intelligence generates corresponding folk Chinese character art works in real time; the folk Chinese character art works have the stroke structure and writing style input by the user; the structure and writing style include the shape of the written strokes and the positional relationship between the strokes.

[0033] As an improvement, the system further comprises:

[0034] A handwriting library construction module is used to identify whether the current user is logging in for the first time, and when it is identified that the current user is logging in for the first time, prompt the user to take a handwriting test, and identify the user's personalized handwriting according to the handwriting test result, and then enter it into a pre-constructed handwriting library;

[0035] The handwriting matching module is used to match the first personalized handwriting of the user in the handwriting library according to the user information of the user when the user inputs the Chinese character strokes by handwriting, and perform stroke recognition based on the first personalized handwriting, and generate corresponding strokes in real time based on the folk Chinese character art font style template selected by the user; and when the corresponding personalized handwriting is not matched in the handwriting library, prompt the user to perform a handwriting test, and identify the second personalized handwriting of the user according to the handwriting test result, and then enter it into the pre-built handwriting library.

[0036] As an improvement, the handwriting matching module is also used to prompt the user to select personalized handwriting when the user inputs the Chinese character strokes by handwriting, and to perform stroke recognition based on the selected personalized handwriting, and then to generate corresponding strokes in real time based on the folk Chinese character art font style template selected by the user.

[0037] As an improvement, the handwriting matching module is also used to identify that any user corresponds to at least two personalized handwritings, pre-count the usage frequency of each personalized handwriting within a preset time period (for example, the last week or the last month, etc.), and use the most frequently used personalized handwriting as the default personalized handwriting of the user.

[0038] Beneficial effects: In the present invention, the handwriting strokes of the user are collected as trajectories, and the user's strokes are redrawn by using the Stable Diffusion model combined with the LoRA module to form folk Chinese character art strokes. Each stroke is set with a dedicated LoRA module externally plugged into the Stable Diffusion model, making the generated image more accurate.

[0039] When training the model, various styles of strokes are disassembled. The handwritten strokes and the corresponding folk Chinese character art strokes are used as the training set to train the model, so that the model can automatically draw the corresponding folk Chinese character art strokes according to the input handwritten strokes, and the model is required to retain the style of the original handwritten strokes, such as length, angle, radian, and the pen tip style of the starting and ending strokes, etc.

[0040] Since the user's handwriting method is adopted, everyone's handwriting will be different. Even for the same person, it is impossible to write two exactly the same characters. Therefore, each artistic character created by the present invention is unique and has a strong user handwriting style.

[0041] In addition, as mentioned above, different people have different handwriting. Even for the same character, different people's writing results are different. And even for the same person, it is possible to write two completely different characters (for example, a user may have different handwriting styles, or imitate other people's handwriting; another example is that multiple users may log in to the system through the same account and input the same character). In the present invention, as described above, because the corresponding strokes are generated in real time according to one stroke in the user's writing process (and pictures can also be matched according to multiple strokes), and finally an artistic work is obtained. Thus, there may be a possibility of misjudgment in the generation process of each stroke. If we want to more precisely correspond to the personalized strokes of each user, the system needs to have high data processing performance and speed to reduce the probability of misjudgment. The present invention pre-constructs a handwriting library, so that the personalized handwriting of the user can be determined according to the handwriting library. And even when the user has multiple handwriting styles, it can accurately find the current handwriting category used by the user, improving the matching accuracy of each artistic character and even each stroke. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to actual scale. Obviously, the following-described drawings are some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0043] Figure 1 It is a flowchart of Embodiment 1 of the present invention;

[0044] Figure 2A It is a user interface for presenting multiple Chinese character art styles to the user in Embodiment 1 of the present invention;

[0045] Figure 2BA user interface for presenting various paper bottom shapes to a user for selection according to an embodiment of the present invention;

[0046] Figure 2C A user interface for presenting various auxiliary lines to a user for selection according to an embodiment of the present invention;

[0047] Figure 2D A user interface for entering a creation page (including a user writing area and an artistic word generation area) after the user has selected a style, a paper bottom shape, and auxiliary lines;

[0048] Figure 2E and Figure 2F are respectively schematic diagrams of dynamically generating artistic words corresponding to the style based on the "Fu" character written by the user when the user specifies different artistic styles but the same paper bottom shape and auxiliary lines;

[0049] Figure 3 A functional module diagram of a folk Chinese character art work generation system based on personalized handwriting forms according to the present invention. Detailed implementation manners

[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some but not all of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0051] In this article, suffixes such as "module", "component", or "unit" used to represent elements are only for facilitating the description of the present invention and have no specific meaning in themselves. Therefore, "module", "component", or "unit" can be used interchangeably.

[0052] In this article, the orientation or positional relationship indicated by terms such as "upper", "lower", "inner", "outer", "front", "rear", "one end", "the other end", etc. is based on the orientation or positional relationship shown in the accompanying drawings, and is only for facilitating the description of the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be construed as a limitation of the present invention. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance.

[0053] In this text, unless otherwise clearly stipulated and defined, terms such as "installation", "equipped with", "connection", etc. shall be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, or an indirect connection through an intermediate medium, and can be the communication inside two components. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0054] In this text, "and / or" includes any and all combinations of one or more of the listed related items.

[0055] In this text, "a plurality of" means two or more, that is, it includes two, three, four, five, etc.

[0056] In this text, "handwriting" refers to the unique morphological characteristics of the characters written by each person, that is, handwriting, also known as stroke writing style. Specifically, it not only includes the form of the font, but also includes the stroke shape and the positional relationship between strokes during writing, and even includes the font size, inclination degree, connected and abbreviated strokes, pen pressure and strength, etc.

[0057] Embodiment 1: As Figure 1 shown, the present invention provides a method for generating folk Chinese character art works based on personalized handwriting morphology, which is used to collect the user's handwriting, that is, the stroke writing style, and generate artistic characters with the user's handwriting style in real time. Specifically, the method includes the steps:

[0058] S1 Show several folk Chinese character art font style templates to the user for selection.

[0059] In this step, different style folk Chinese character art font style templates are shown to the user through the style selection page. Different styles of folk Chinese character art have different artistic shapes, especially in terms of strokes. For example, the strokes of some styles of folk Chinese character art are deformations of animals and plants such as flowers, plants, insects, and fish, and the strokes of some styles of folk Chinese character art are similar to paper-cutting, see Figure 2A . The user selects an art font template of one of the styles according to their own preferences.

[0060] Of course, see Figure 2B and Figure 2C , it is also possible to screen the Chinese character-related elements such as the background paper and wireframe in the template according to attributes such as font style, complexity, theme, etc., to help the user quickly find a suitable template, generate a corresponding style writing interface and an interface for generating artistic characters, as Figure 2D shown. In addition, the user can also click on the template for preview to view the details and effects of the folk Chinese character art, see the preview thumbnail in the lower right corner of Figure 2B and Figure 2C .

[0061] S2 collects the Chinese character strokes input by the user by handwriting, and based on the current stroke input and the folk Chinese character art font style template selected by the user, the artificial intelligence generates corresponding folk Chinese character art works in real time.

[0062] In some embodiments, the above-mentioned folk Chinese character art works have the stroke writing style input by the user; and the stroke writing style includes the stroke shapes written by the user and the positional relationship between strokes, etc.

[0063] In this step, devices such as a graphics tablet and a touch screen are used to collect the user's handwriting. The actual process of collection is that the user directly writes through devices such as a graphics tablet and a touch screen.

[0064] During the user's writing process, the system will analyze the structure of the strokes input by the user. For example, it extracts stroke features, including stroke shapes such as starting points, ending points, curvatures, thicknesses, etc., and also includes the positional relationship between strokes, such as the distance and angle between two strokes, etc.

[0065] When generating folk Chinese character art strokes, the strokes input by the user are used as a framework, and the strokes are graphically rendered according to the style of the art font template selected by the user. For example, when the user selects an art font template of flowers, plants, insects, and fish, when the system collects that the stroke input by the user is a horizontal stroke, it obtains the length and upward angle of the horizontal stroke, and the shape formed by the pen tips at the starting and ending points. Thus, image texture rendering is performed along the trajectory of the stroke. It can be understood that the texture used for rendering is based on the art font template selected by the user.

[0066] In this embodiment, the Stable Diffusion model combined with the LoRA module is used to redraw the user's strokes to form folk Chinese character art strokes.

[0067] The Stable Diffusion model is the most advanced model in the Diffusion diffusion model. It uses more stable, controllable, and efficient methods to generate high-quality images. There are significant improvements in the quality, speed, and cost of generating images. Therefore, this model can directly generate images on consumer-grade graphics cards, reaching at least images of 512*512 pixels. The latest version can generate controllable images at the 1024*1024 pixel level, and the generation efficiency is also 30 times higher than that of previous Diffusion diffusion models.

[0068] In this implementation, the LoRA (Low-Rank Adaptation) module is used to fine-tune the Stable Diffusion model. This paper uses the open source large-scale generative pre-trained model Stable Diffusion as the basic model, and uses LoRA technology to fine-tune the model based on the prepared local data set. LoRA introduces a small number of trainable parameters to adapt the model to a specific data set, reduce computational overhead, and obtain multiple LoRA-specific generation models for different folk Chinese character art font style templates, such as the LoRA module for the folk Chinese character art of flowers, birds, insects and fish, and the LoRA module for the folk Chinese character art of paper-cutting. Each type of folk Chinese character art sets a dedicated LoRA module that is plugged into the Stable Diffusion model to make the generated image more accurate.

[0069] When training the model, the strokes of various styles are disassembled. The handwritten strokes and the corresponding folk Chinese character art strokes are used as training sets to train the model, so that the model can automatically draw the corresponding folk Chinese character art strokes according to the input handwritten strokes, and the model is required to retain the style of the original handwritten strokes, such as length, angle, curvature, and the pen tip of the starting and ending strokes.

[0070] In addition, when the Chinese character strokes input by the user through handwriting are collected, the model is used to generate several candidate folk Chinese character art strokes for the user to choose according to the stroke trajectory. The model can make some fine adjustments to certain parameters to generate a variety of folk Chinese character art strokes with the same style. There will be some differences in details between these folk Chinese character art strokes, but the overall style is the same with only some minor style differences. In other words, under the same style of folk Chinese character art strokes large template, it also includes different small templates, so that the same style of folk Chinese character art strokes will also have many derived small style variants for users to choose.

[0071] If the user selects one of the candidate Chinese folk art strokes, the system will replace the original Chinese folk art strokes in response to the user's selection of the candidate Chinese folk art strokes.

[0072] Furthermore, when the user selects a backup folk Chinese character art stroke, the system will generate the folk Chinese character art stroke of the next stroke according to the minor style of the backup folk Chinese character art stroke selected by the user, thereby predicting the user's preference.

[0073] Since the handwriting is adopted, each person's handwriting is different. Even if it is the same person, it is impossible to write two completely identical characters. Therefore, each artistic character created by the present invention is unique.

[0074] S3 converts the strokes into images with similar shapes according to the shapes of the input strokes.

[0075] In this embodiment, some artistic word templates also include pictures, and the pictures are evolved according to the shapes of the strokes. Figure 2E and Figure 2F As shown, for example, when the user writes the left radical of the character "福", it can be replaced by a picture of "peacock" in the flower, bird, insect and fish art word template.

[0076] The replacement between the image and the strokes can be preset, for example, the left radical of each character "福" is replaced by the image "孔雀". Alternatively, the model can match the strokes according to the shape of the user's handwriting. For example, if a user writes the left radical of a character "福" in a way that looks like a peacock, the left radical of the character "福" is replaced by the image of a peacock.

[0077] In addition, in a style, the same radical may correspond to multiple pictures. Therefore, in order to make the picture more consistent with the meaning of the Chinese character input by the user, when the strokes input by the user constitute a complete radical or / and reach the first quantity threshold (for example, enough to predict the strokes required for at least one Chinese character; specifically, it can be predicted by pre-training a machine learning model), the Chinese character that the user may enter is predicted based on the strokes input by the user and displayed for the user to choose, and the picture is adjusted according to the meaning of the Chinese character selected by the user. For example, after the user enters the left radical of the word "Fu", the system recognizes the radical and replaces the radical with the default tree picture. At the same time, the system displays multiple Chinese characters containing the radical to the user for selection. For example, if the user chooses "Fu", the picture of the tree is obviously not appropriate, and the peacock contains the meaning of stability, peace, and peace, so the picture of the peacock is used to replace the picture of the tree. Of course, here only the picture of the peacock is generated, not the word "Fu" with the picture of the peacock. Of course, in other embodiments, the word "Fu" with a peacock picture can also be directly generated, and in the subsequent process, it can be adjusted according to the strokes input by the user.

[0078] Similarly, when the number of strokes written by the user reaches a certain number, such as a first number threshold, the system adjusts the image according to the number. A certain number means that there are more strokes, and some complex images may make the entire font bloated, so it needs to be adjusted to a simpler image.

[0079] Of course, the user may not choose to continue writing. When the strokes written by the user reach the second threshold, the system still cannot recognize it as a complete Chinese character, then the system considers the Chinese character to be relatively complex, so it needs to be adjusted from the two aspects of strokes and pictures to make the overall structure of the character more reasonable. For example, the thickness of the strokes can be reduced, the pictures can be adjusted to be more concise, or the number of pictures can be reduced directly.

[0080] After the user inputs a complete Chinese character, the generated folk Chinese character art work is adjusted.

[0081] After the user inputs a complete Chinese character, the system also outputs a complete folk Chinese character art work. The user can adjust the folk Chinese character art work according to their preferences.

[0082] The adjustment includes two aspects. One is the adjustment of the overall style, and the other is the adjustment of a single stroke.

[0083] For the adjustment of the overall style, after the system outputs the folk Chinese character art work of the style selected by the user, it will still present folk Chinese character art works of other styles for the user to choose. It can be understood that the folk Chinese character art works of other styles also retain the user's handwriting style (here, the retention can be complete or partial). Of course, in order to reduce system overhead, it is also possible to regenerate the corresponding folk Chinese character art work in response to the user's re-selection of the folk Chinese character art font style template.

[0084] The user can select the art word they are satisfied with on the interface.

[0085] For the adjustment of a single stroke, the user clicks on the folk Chinese character art work output by the system. The selected folk Chinese character art stroke will use the model to regenerate several strokes of the same style, with only slight adjustments in details. The user clicks on the alternative folk Chinese character art strokes, and the system replaces the current folk Chinese character art stroke with the alternative folk Chinese character art stroke selected by the user.

[0086] In addition, the user can modify the handwritten strokes by themselves, such as moving, scaling, or rotating the strokes. It can be understood that the system modifies the original folk Chinese character art strokes in response to the user's modification of the handwritten input Chinese character strokes; the modification includes one or several of moving, scaling, and rotating.

[0087] S5 The user downloads the generated folk Chinese character art work by scanning the QR code.

[0088] After the system generates the folk Chinese character art work, it can provide a QR code for the user to scan and download. Of course, it can also be other forms of download methods, which are not limited in the present invention.

[0089] S6 Display the generated folk Chinese character art work.

[0090] The system can be set up with a platform for displaying folk Chinese character art works for users to appreciate. It can be understood that the platform can be network-connected to centrally display the folk Chinese character art works generated by multiple users, so as to achieve a better art and cultural exchange effect.

[0091] Embodiment 2: The present invention also provides another method for generating folk Chinese character art works based on personalized handwriting forms, which includes the steps in Embodiment 1 above. The difference is that this embodiment further includes the steps:

[0092] When it is recognized that the user logs in for the first time, prompt the user to perform a handwriting test, identify the personalized handwriting of the user according to the handwriting test result, and then record it in a pre-constructed handwriting library;

[0093] When the user handwrites Chinese character strokes, match the first personalized handwriting of the user in the handwriting library according to the user information of the user, perform stroke recognition based on the first personalized handwriting, and generate corresponding strokes in real time based on the folk Chinese character art font style template selected by the user.

[0094] In some embodiments, when the user registers and logs in for the first time, a certain amount of Chinese characters can be provided in advance for the user to write manually, so as to perform personalized handwriting recognition according to these Chinese characters written manually by the user and record them in the handwriting library.

[0095] In other embodiments, when the user inputs some basic information during the registration process, therefore, in order not to set up a separate Chinese character test, but directly change some of the information that needs to be input by the user to manual input, so as to perform handwriting recognition according to the user information input manually by the user. That is, the personalized handwriting of the user can be obtained when the user registers, so there is no need to perform a separate test, reducing the power consumption of the system.

[0096] Of course, at this time, different from the user basic information entered in other existing software, in order to minimize the input of the user as much as possible in the existing software, most of them use the method of directly clicking or selecting by the user to design the user basic information page; while in this embodiment, when setting the user basic information page, it is necessary to design the user basic information page from the perspective of obtaining the personalized handwriting of the user sufficiently, so that the user can input more different Chinese characters, so as to accurately obtain their personalized handwriting (specifically, the technology of handwriting recognition is the prior art and will not be elaborated here). For example, let the user manually input as many different strokes as possible. Of course, not all information can be input manually by the user, which will reduce the user experience. Therefore, only an initial handwriting library is constructed here. Of course, the handwriting library can be continuously updated and learned during the subsequent use of the user.

[0097] Further, when no corresponding personalized handwriting is matched in the handwriting library, the user is prompted to conduct a handwriting test, and the second personalized handwriting of the user is identified according to the result of the handwriting test, and then entered into the pre-constructed handwriting library, so that in the subsequent process, the corresponding personalized handwriting can be automatically matched according to the Chinese characters currently input by the user. For example, when the number of strokes input by the user reaches a certain number (i.e., the number sufficient to identify their handwriting, and handwriting recognition is a prior art and will not be elaborated here), the corresponding personalized handwriting is automatically matched from the database.

[0098] Of course, when the user handwrites Chinese character strokes, the user can also be prompted to select a personalized handwriting, and the strokes are recognized according to the selected personalized handwriting, and then the corresponding strokes are generated in real time based on the folk Chinese art font style template selected by the user.

[0099] Preferably, when any user corresponds to at least two personalized handwritings, the usage frequency of each personalized handwriting within a preset time period is pre-statistically calculated, and the personalized handwriting with the highest usage frequency is used as the default personalized handwriting of the user.

[0100] Embodiment 3: As Figure 3 shown, the present invention further provides a system for generating folk Chinese art works based on personalized handwriting forms, including:

[0101] A template display module for displaying a number of folk Chinese art font style templates for the user to select;

[0102] A generation module for collecting the Chinese character strokes input by the user through handwriting, and based on the folk Chinese art font style template selected by the user, an artificial intelligence generates the corresponding folk Chinese art work in real time; the folk Chinese art work has the stroke structure and writing style input by the user; the structure and writing style include the shape of the written strokes and the positional relationship between the strokes.

[0103] In some embodiments, the system further includes: a matching module for converting the strokes into matching pictures with similar shapes according to the shapes of the input strokes; an adjustment module for adjusting the generated folk Chinese art work after the user inputs a complete Chinese character.

[0104] In some embodiments, the system further includes: a handwriting library construction module for identifying whether the current user is logging in for the first time, and when it is identified that the current user is logging in for the first time, prompting the user to conduct a handwriting test, and identifying the personalized handwriting of the user according to the result of the handwriting test, and then entering it into the pre-constructed handwriting library;

[0105] A handwriting matching module, which is used to, when a user handwrites the Chinese character strokes, match the first personalized handwriting of the user in the handwriting library according to the user information of the user, perform stroke recognition based on the first personalized handwriting, and generate corresponding strokes in real time based on the folk Chinese art font style template selected by the user; and when no corresponding personalized handwriting is matched in the handwriting library, prompt the user to perform a handwriting test, identify the second personalized handwriting of the user according to the handwriting test result, and then enter it into a pre-constructed handwriting library.

[0106] In some other embodiments, the above handwriting matching module is further used to, when a user handwrites the Chinese character strokes, prompt the user to select a personalized handwriting, perform stroke recognition according to the selected personalized handwriting, and then generate corresponding strokes in real time based on the folk Chinese art font style template selected by the user.

[0107] In some other embodiments, the above handwriting matching module is further used to, when it is recognized that any user corresponds to at least two personalized handwritings, pre-statistically calculate the usage frequency of each personalized handwriting within a preset time period (for example, the most recent week or the most recent month, etc.), and use the one with the highest usage frequency as the default personalized handwriting of the user.

[0108] It should be noted that in this article, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including that element.

[0109] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that makes a contribution to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions to enable a computer terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

[0110] The embodiments of the present invention have been described above in conjunction with the accompanying drawings. However, the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative rather than restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit of the present invention and the scope protected by the claims. All of these are within the protection scope of the present invention.

Claims

1. A method for generating folk Chinese character art works based on personalized handwriting forms, characterized in that Including the steps: Showing several folk Chinese character art font style templates to the user for the user to select; Collecting the Chinese character strokes input by the user through handwriting, and based on the folk Chinese character art font style template selected by the user, and based on the current stroke input, the artificial intelligence generates the corresponding folk Chinese character art works in real time; Among them, the folk Chinese character art work has the stroke writing style input by the user; the stroke writing style includes the shape of the written stroke and the positional relationship between the strokes; It also includes the steps: Converting the strokes into matching pictures with similar shapes according to the shape of the input strokes, and its specific steps include: When the strokes input by the user form a complete radical or / and reach the first quantity threshold, predicting the Chinese characters that the user may input according to the strokes input by the user and showing them for the user to select; In the case where the user selects the input Chinese character, adjusting the matching pictures according to the meaning of the Chinese character selected by the user; In the case where the user does not select the input Chinese character, when the input strokes reach the second quantity threshold, adjusting the color, thickness or / and the quantity of the matching pictures of the folk Chinese character art strokes; Or, the method also includes the steps: collecting the trajectory of the strokes input by the user, and performing image texture rendering on the trajectory based on the folk Chinese character art font style template selected by the user.

2. The method for generating a folk Chinese character art work based on personalized handwriting forms according to claim 1, wherein It also includes the steps: When it is recognized that the user logs in for the first time, prompting the user to perform a handwriting test, identifying the personalized handwriting of the user according to the handwriting test result, and then entering it into the pre-constructed handwriting library; And When the user handwrites the Chinese character strokes, matching the first personalized handwriting of the user in the handwriting library according to the user information of the user, performing stroke recognition based on the first personalized handwriting, and generating the corresponding strokes in real time based on the folk Chinese character art font style template selected by the user; And When no corresponding personalized handwriting is matched in the handwriting library, prompting the user to perform a handwriting test, identifying the second personalized handwriting of the user according to the handwriting test result, and then entering it into the pre-constructed handwriting library.

3. The method for generating a folk Chinese character art work based on personalized handwriting forms according to claim 2, wherein It also includes the steps: When the user handwrites the Chinese character strokes, prompting the user to select personalized handwriting, performing stroke recognition according to the selected personalized handwriting, and then generating the corresponding strokes in real time based on the folk Chinese character art font style template selected by the user; or / and, When any user corresponds to at least two kinds of personalized handwriting, pre-statistical the usage frequency of each kind of personalized handwriting within a preset time period, and taking the one with the highest usage frequency as the default personalized handwriting of the user.

4. A method for generating folk Chinese character art works based on personalized handwriting forms according to claim 1, characterized in that: Using the Stable Diffusion model combined with several LoRA modules to redraw the user strokes to form folk Chinese character art strokes; each folk Chinese character art font style template corresponds to a LoRA module.

5. A method for generating a folk Chinese character art work based on personalized handwriting forms according to claim 1, characterized in that It also includes the steps: When collecting the Chinese character strokes input by the user through handwriting, generating several alternative folk Chinese character art strokes for the user to select; Responding to the user's selection of the alternative folk Chinese character art strokes, replacing the original folk Chinese character art strokes.

6. A method for generating a folk Chinese character art work based on personalized handwriting forms according to claim 1, characterized in that It further includes the steps of: in response to the user's modification of the handwritten Chinese character strokes, making corresponding modifications to the original folk Chinese character art strokes; the modifications include one or several of moving, scaling, and rotating.

7. A method for generating folk Chinese character art works based on personalized handwriting forms according to claim 1, characterized in that It further includes the steps of: When the user inputs a complete Chinese character, generating a number of alternative folk Chinese character art strokes according to the strokes selected by the user from the corresponding folk Chinese character art works; in response to the user's selection of the alternative folk Chinese character art strokes, replacing the corresponding strokes in the folk Chinese character art works. When the user inputs a complete Chinese character, in response to the user's re-selection of the folk Chinese character art font style template, regenerating the corresponding folk Chinese character art work; or, generating the corresponding folk Chinese character art work based on other folk Chinese character art font style templates for the user to select.

8. A method for generating a folk Chinese character art work based on personalized handwriting forms according to any one of claims 1 to 7, characterized in that It further includes the steps of: The user downloads the generated folk Chinese character art work by scanning the QR code; or / and, displays the generated folk Chinese character art work.

9. A folk Chinese character art work generation system based on personalized handwriting forms, characterized in that It includes: A template display module for displaying a number of folk Chinese character art font style templates for the user to select. A generation module for collecting the Chinese character strokes input by the user by handwriting, and based on the folk Chinese character art font style template selected by the user, using artificial intelligence to real-time generate the corresponding folk Chinese character art work; the folk Chinese character art work has the stroke structure and writing style input by the user; the structure and writing style include the shape of the written strokes and the positional relationship between the strokes. Converting the strokes into illustrations with similar shapes according to the shape of the input strokes, and the specific steps include: When the strokes input by the user form a complete radical or / and reach the first quantity threshold, predicting the Chinese characters that the user may input according to the input strokes and displaying them for the user to select. In the case where the user selects the input Chinese character, adjusting the illustration according to the meaning of the selected Chinese character. In the case where the user does not select the input Chinese character, when the input strokes reach the second quantity threshold, adjusting the color, thickness of the folk Chinese character art strokes or / and the quantity of the illustrations. Or, it further includes: collecting the trajectory of the input strokes of the user, and performing image texture rendering on the trajectory based on the folk Chinese character art font style template selected by the user.

Citation Information

Patent Citations

  • Unsupervised universal wordart generation method

    CN115345979A

  • Beautifying method for hand-written Chinese characters

    CN101308578A

  • Handwriting input processing method and terminal device

    CN104007836A