Civil Chinese character art work generation method and system based on personalized handwriting form
By collecting users' handwriting and using the Stable Diffusion model to generate folk Chinese character strokes with the LORA module, solve the problem of lack of personalization in existing technology, realize the unique personalized artistic character generation, and improve the accuracy of the generating effect.
Patent Information
- Application Number
- CN202411477617.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-22
AI Technical Summary
The existing art character generation technology cannot effectively realize the generation of folk Chinese character art works with personalized handwriting forms, resulting in defects in the personalization of the characters.
By collecting users' handwriting in a timely manner, artistic characters with user handwriting style are used to re -draw the user strokes with the Stable Diffusion model combined with the LORA module, generate folk Chinese character strokes, and generate in real time according to the user -style Chinese character style template selected by the user.
The unique folk Chinese character art works are generated in accordance with the user's personalized handwriting, which enhances the personalized characteristics of art characters and improves the accuracy of the generated image.
Smart Images

Figure CN119379862A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of artistic character generation, and in particular to a method and system for generating folk Chinese character artistic works based on personalized handwriting morphology. Background Art
[0002] Folk Chinese character art fully displays folk characteristics. Its main creators are farmers, laborers, craftsmen and other members of the public. It is these amateur artists who use their talents and appreciate their own works to create countless simple folk Chinese character art works with a distinct rural atmosphere using media such as wood carving, paper cutting and oil painting.
[0003] Different from folk Chinese character art, existing artistic characters generally have fixed fonts, that is, after entering the content, you can directly call the corresponding pre-made artistic characters.
[0004] Chinese patent application CN202210832344.3 discloses an unsupervised method for generating universal art characters. The method includes: constructing a universal art character generation model, including an encoder, a first decoder and a second decoder; optimizing the universal art character generation model, 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 the texture information of the font reference image is removed after passing through the encoder and the second decoder to obtain a corresponding mask image; in the font migration stage, the input image is a content image and a mask image obtained in the de-texturing stage, and the image after the content image is subjected to font migration after passing through the encoder and the first decoder; in the texturing stage, the input image is an image obtained in the font migration stage and a texture reference image, and the textured result image is obtained after passing through the encoder and the second decoder.
[0005] Although the above-mentioned prior art can generate corresponding artistic characters according to needs, the fonts themselves are still pre-customized and still lack in personalization. Summary of the invention
[0006] The purpose of the present invention is to provide a method and system for generating folk Chinese character artworks based on personalized handwriting forms, which partially solves or alleviates the above-mentioned deficiencies in the prior art and can generate artistic characters with the user's handwriting style in real time by collecting the user's handwriting.
[0007] In order to solve the above-mentioned technical problems, the present invention specifically adopts the following technical solutions: The first aspect of the present invention is to provide a method for generating folk Chinese character artworks based on personalized handwriting morphology, comprising the steps of: Displaying several folk Chinese character art font style templates to users for selection; The Chinese character strokes input by the user through handwriting are collected, 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 writing style input by the user; the stroke writing style includes the shape of the written strokes and the positional relationship between the strokes.
[0008] As an improvement, the method further comprises the steps of: When it is identified that the user is logging in for the first time, the user is prompted to take a handwriting test, and the user's personalized handwriting is identified according to the handwriting test result, and then entered into a pre-built handwriting library; and When the user inputs the Chinese character strokes by handwriting, the first personalized handwriting of the user is matched in the handwriting library according to the user information of the user, and stroke recognition is performed based on the first personalized handwriting, and corresponding strokes are generated 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 database, the user is prompted to take a handwriting test, and the second personalized handwriting of the user is identified according to the handwriting test result, and then entered into the pre-built handwriting database.
[0009] As an improvement, the method further includes the steps of: when the user inputs the Chinese character strokes by handwriting, prompting the user to select personalized handwriting, performing stroke recognition based on the selected personalized handwriting, and then generating corresponding strokes in real time based on the folk Chinese character art font style template selected by the user.
[0010] As an improvement, the method further includes the step of: when any user corresponds to at least two personalized handwritings, pre-stating the usage frequency of each personalized handwriting within a preset time period, and using the most frequently used personalized handwriting as the default personalized handwriting of the user.
[0011] As an improvement, the method further includes the step of converting the strokes into a similarly shaped image according to the shapes of the strokes, and the specific steps include: When the strokes input by the user form a complete radical or / and reach a first quantity threshold, predict the Chinese characters that the user may input based on the strokes input by the user and display them for the user to select; When the user selects the input Chinese character, the image is adjusted according to the meaning of the Chinese character selected by the user.
[0012] As an improvement, the steps of generating folk Chinese character artistic strokes include: The trajectory of the strokes input by the user is collected, and image texture rendering is performed on the trajectory based on the folk Chinese character art font style template selected by the user.
[0013] As a further improvement, the Stable Diffusion model is 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.
[0014] As an improvement, when the user does not select the input Chinese characters, when the input strokes reach a second quantity threshold, the color, thickness and / or the number of illustrations of the folk Chinese character art strokes are adjusted.
[0015] As an improvement, when the Chinese character strokes input by the user through handwriting are collected, a number of alternative folk Chinese character artistic strokes are generated for the user to choose; In response to the user's selection of the candidate folk Chinese character artistic strokes, the original folk Chinese character artistic strokes are replaced.
[0016] As an improvement, in response to the user's modification of the handwritten input Chinese character strokes, the original folk Chinese character art strokes are modified accordingly; the modification includes one or more of movement, scaling, and rotation.
[0017] As an improvement, when a user inputs a complete Chinese character, several candidate folk Chinese character art strokes are generated based on the strokes selected by the user from the corresponding folk Chinese character art works; in response to the user's selection of the candidate folk Chinese character art strokes, the corresponding strokes in the folk Chinese character art works are replaced.
[0018] When the user inputs a complete Chinese character, the corresponding folk Chinese character artwork is regenerated in response to the folk Chinese character art font style template reselected by the user; or, the corresponding folk Chinese character artwork is generated based on other folk Chinese character art font style templates for the user to select.
[0019] As an improvement, users can download the generated folk Chinese character artworks by scanning a QR code; or / and, display the generated folk Chinese character artworks.
[0020] The second aspect of the present invention is to provide a system for generating folk Chinese character artworks based on personalized handwriting morphology, comprising: The template display module is used to display several folk Chinese character art font style templates for users to choose from; 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.
[0021] As an improvement, the system further comprises: 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; 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.
[0022] 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.
[0023] 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.
[0024] 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.
[0025] 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 stroke style of the starting and ending strokes.
[0026] Since the handwriting of the user is adopted, each person's handwriting is different. Even if it is the same person, it is impossible to write two completely identical characters, so each artistic character created by the present invention is unique and has a strong user handwriting style.
[0027] In addition, as mentioned above, different people have different handwriting styles. Even for the same character, different people may write it differently. Moreover, even for the same person, they may write two completely different characters (for example, a user may have different handwriting styles or imitate the handwriting of others; also, multiple users may log in to the system through the same account and input the same character). In the present invention, as described above, corresponding strokes are generated in real time according to a single stroke during the user's writing process (and pictures can also be matched according to multiple strokes), and finally an artistic work is obtained. As a result, there may be a possibility of misjudgment during the generation of each stroke. To more accurately 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 database, enabling the determination of the user's personalized handwriting based on the database. Even when a user has multiple handwriting styles, the system can accurately find the current handwriting style being used, improving the matching accuracy of each artistic character and even each stroke. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] 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.
[0029] Figure 1 is a flowchart of Embodiment 1 of the present invention; Figure 2A is a user interface for presenting multiple Chinese character artistic styles to the user for selection in Embodiment 1 of the present invention; Figure 2B is a user interface for presenting multiple paper bottom shapes to the user for selection in Embodiment 1 of the present invention; Figure 2C is a user interface for presenting multiple auxiliary lines to the user for selection in Embodiment 1 of the present invention; Figure 2D is a user interface for entering the creation page (including the user writing area and the artistic character generation area) after the user selects the style, paper bottom shape, and auxiliary lines; Figure 2E and Figure 2F are respectively schematic diagrams of dynamically generating corresponding style artistic characters based on the character "Fu" written by the user when the user specifies different artistic styles but the same paper bottom shape and auxiliary lines; Figure 3This is a functional module diagram of a system for generating folk Chinese character artworks based on personalized handwriting morphology according to the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0031] Herein, suffixes such as "module", "component" or "unit" used to represent elements are only used to facilitate the description of the present invention, and have no specific meanings by themselves. Therefore, "module", "component" or "unit" can be used mixedly.
[0032] In this document, the terms "upper", "lower", "inner", "outer", "front", "back", "one end", "the other end" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0033] In this document, unless otherwise clearly specified and limited, the terms "installed", "provided with", "connected", etc. should be understood in a broad sense. For example, "connected" 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, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0034] Herein "and / or" includes any and all combinations of one or more of the associated listed items.
[0035] Herein, "plurality" means two or more than two, ie, it includes two, three, four, five, etc.
[0036] In this article, "handwriting" refers to the unique shape characteristics of each person's handwriting, that is, handwriting, also known as stroke writing style. Specifically, it includes not only the shape of the font, but also the shape of the strokes when writing and the positional relationship between the strokes, and even the font size, tilt, connected and omitted strokes, pen pressure and strength, etc.
[0037] Embodiment 1: Figure 1 As shown, the present invention provides a method for generating folk Chinese character artworks based on personalized handwriting morphology, which is used to collect user handwriting, that is, stroke writing style, and generate artistic characters with the user's handwriting style in real time according to the user's handwriting. Specifically, the method includes the steps of: S1 displays several folk Chinese character art font style templates to the user for selection.
[0038] In this step, different styles of folk Chinese art font style templates are displayed to the user through the style selection page. Different styles of folk Chinese art have different artistic shapes, especially in strokes. For example, some styles of folk Chinese art strokes are deformations of plant and animal images such as flowers, plants, insects, and fish, and some styles of folk Chinese art strokes are similar to paper cutting, see Figure 2A . Users can choose one of the styles of word art templates according to their preferences.
[0039] Of course, see Figure 2B and Figure 2C You can also filter the Chinese character related elements such as the base paper and wireframe in the template according to the font style, complexity, theme and other attributes to help users quickly find the right template and generate the writing interface and artistic font interface of the corresponding style. Figure 2D In addition, users can click on the template to preview and view the details and effects of folk Chinese character art. Figure 2B and Figure 2C The preview thumbnail is shown in the lower right corner.
[0040] S2 collects 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 the current stroke input, artificial intelligence generates corresponding folk Chinese character art works in real time.
[0041] In some embodiments, the aforementioned folk Chinese character artwork has a stroke writing style input by a user; and the stroke writing style includes the stroke shapes written by the user and the positional relationship between the strokes.
[0042] In this step, the user's handwriting is collected using a handwriting tablet, a touch screen, etc. The collection process is actually the user writing directly through a handwriting tablet, a touch screen, etc.
[0043] During the writing process, the system will analyze the structure of the strokes input by the user, such as extracting stroke features, including stroke shapes such as starting point, ending point, curvature, thickness, etc., as well as the positional relationship between strokes, such as the distance and angle between two strokes, etc.
[0044] 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 word template selected by the user. For example, the user selected an art word template of flowers, plants, insects and fish. When the system collects the stroke input by the user as a horizontal stroke, it obtains the length of the horizontal stroke and the upward angle, as well as the shape of the pen tip formed when starting and ending the stroke. Thus, the image texture is rendered using the stroke as a trajectory. It can be understood that the texture used for rendering is based on the art word template selected by the user.
[0045] In this embodiment, the Stable Diffusion model is combined with the LoRA module to redraw the user's strokes to form folk Chinese artistic strokes.
[0046] The Stable Diffusion model is the most advanced model in the Diffusion diffusion model. It uses a more stable, controllable and efficient method to generate high-quality images. There are significant improvements in the quality, speed and cost of generated images, so the model can directly generate images on consumer-grade graphics cards, up to at least 512*512 pixels. The latest version can generate controllable images at the level of 1024*1024 pixels, and the generation efficiency is 30 times higher than that of the previous Diffusion diffusion model.
[0047] 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.
[0048] 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.
[0049] In addition, when the Chinese character strokes input by the user are collected, several alternative folk Chinese character art strokes are generated by the model according to the stroke trajectories for the user to select. The model can make some fine-tuning of certain parameters, so as to generate a variety of folk Chinese character art strokes with the same style. There will be some minor differences in details among these folk Chinese character art strokes, but the overall major style is the same and only some minor styles are different. That is to say, under the large template of folk Chinese character art strokes of the same style, there are also different small templates, so that there will be many derivative small-style variants of folk Chinese character art strokes of the same style for the user to select.
[0050] If the user makes a selection among the alternative folk Chinese character art strokes, the system will replace the original folk Chinese character art stroke in response to the user's selection of the alternative folk Chinese character art stroke.
[0051] Furthermore, when the user selects the alternative folk Chinese character art stroke, the system will generate the folk Chinese character art stroke of the next stroke according to the small style of the alternative folk Chinese character art stroke selected by the user, so as to achieve the prediction of the user's preference.
[0052] Since the 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.
[0053] S3 converts the stroke into a matching picture with a similar shape according to the shape of the input stroke.
[0054] In this embodiment, some artistic character templates also include matching pictures, and the matching pictures are evolved according to the shape of the strokes. As Figure 2E and Figure 2F shown, for example, when the user writes the left radical of the character "福" (Fu), it can be replaced by the matching picture "peacock" in the artistic character template of flowers, birds, insects and fish.
[0055] The replacement between the matching picture and the stroke can be preset. For example, the left radical of each character "福" (Fu) is replaced by the matching picture "peacock". It can also be matched by the model according to the shape of the stroke written by the user. For example, a certain user writes the left radical of the character "福" (Fu) like the pattern of a peacock, so the left radical of this character "福" (Fu) is replaced by the peacock matching picture.
[0056] 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.
[0057] 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.
[0058] 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.
[0059] After the S4 user inputs a complete Chinese character, the generated folk Chinese character artwork is adjusted.
[0060] After the user inputs a complete Chinese character, the system will output a complete folk Chinese character artwork. The user can adjust the folk Chinese character artwork according to his or her preferences.
[0061] Adjustment includes two aspects: one is the adjustment of the overall style, the other is the adjustment of a single stroke.
[0062] For the adjustment of the overall style, after the system outputs the folk Chinese character artwork of the style selected by the user, it will still present folk Chinese character artworks of other styles for the user to choose. It is understandable that the folk Chinese character artworks of other styles also retain the handwriting style of the user (the retention here can be either complete retention or partial retention). Of course, in order to reduce system overhead, the corresponding folk Chinese character artwork can also be regenerated in response to the folk Chinese character art font style template reselected by the user.
[0063] Users can simply select the artistic text they like on the interface.
[0064] For the adjustment of a single stroke, the user clicks on the folk Chinese character art work output by the system, and 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.
[0065] In addition, users can modify the handwritten strokes by themselves, such as moving, scaling or rotating the strokes. It can be understood that the system responds to the user's modification of the handwritten Chinese character strokes and makes corresponding modifications to the original folk Chinese character art strokes; the modification includes one or more of moving, scaling and rotating.
[0066] S5 users can download the generated folk Chinese character artwork by scanning the QR code.
[0067] After the system generates folk Chinese character artworks, it can provide a QR code for users to scan and download. Of course, other forms of downloading methods are also possible, which are not limited in the present invention.
[0068] S6 displays the generated folk Chinese character artworks.
[0069] The system can be provided with a platform for displaying folk Chinese character artworks for users to appreciate. It is understandable that the platform can be network-connected, and folk Chinese character artworks generated by multiple users can be displayed in a centralized manner, so as to achieve better artistic and cultural exchange effects.
[0070] Embodiment 2: The present invention also provides another method for generating folk Chinese character artworks based on personalized handwriting morphology, which includes the steps in the above embodiment 1, except that the present embodiment also includes the steps: When it is recognized that the user is logging in for the first time, the user is prompted to take a handwriting test, and the personalized handwriting of the user is recognized according to the handwriting test result, and then entered into a pre-built handwriting library; When the user inputs Chinese character strokes by handwriting, the user's first personalized handwriting is matched in the handwriting library according to the user's user information, and stroke recognition is performed based on the first personalized handwriting, and corresponding strokes are generated in real time based on the folk Chinese character art font style template selected by the user.
[0071] In some embodiments, when a user registers and logs in for the first time, a certain amount of Chinese characters may be provided in advance for the user to write manually, so that personalized handwriting recognition can be performed based on these Chinese characters written manually by the user and entered into the handwriting library.
[0072] In other embodiments, when the user registers, the user will enter some basic information. Therefore, in order not to set up a separate Chinese character test, some of the information that needs to be entered by the user is directly changed to manual input, so that handwriting recognition is performed based on the user information manually entered 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, which reduces the power consumption of the system.
[0073] Of course, what is different from the user basic information entered in other existing software is that in order to minimize the input received by the user, most of the existing software uses the method of allowing the user to directly click or select to design the user basic information page; and in this embodiment, when setting the user basic information page, it is necessary to consider the angle of sufficiently obtaining the user's personalized handwriting to design the user basic information page, so that the user can enter more different Chinese characters, so that the personalized handwriting can be accurately obtained (specifically, the handwriting recognition technology is an existing technology and will not be repeated here). For example, let the user manually enter as many different strokes as possible. Of course, it is not possible to let the user manually enter all the information, which will reduce the user experience. Therefore, here is just to build an initial handwriting library. Of course, the handwriting library can be continuously updated and learned during the subsequent user use.
[0074] Furthermore, when the corresponding personalized handwriting is not matched in the handwriting database, the user is prompted to perform a handwriting test, and the second personalized handwriting of the user is identified according to the handwriting test result, and then entered into the pre-built handwriting database, 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 user's strokes are input to a certain number (and the number is sufficient to identify his handwriting, handwriting recognition is a prior art and will not be repeated here), the corresponding personalized handwriting is automatically matched from the database.
[0075] Of course, when the user inputs Chinese character strokes by handwriting, the user can be prompted to select personalized handwriting, and stroke recognition can be performed based on the selected personalized handwriting, and then corresponding strokes can be generated in real time based on the folk Chinese character art font style template selected by the user.
[0076] Preferably, when any user corresponds to at least two personalized handwritings, the usage frequency of each personalized handwriting within a preset time period is counted in advance, and the personalized handwriting with the highest usage frequency is used as the default personalized handwriting of the user.
[0077] Embodiment 3: Figure 3 As shown, the present invention also provides a system for generating folk Chinese character artworks based on personalized handwriting morphology, comprising: The template display module is used to display several folk Chinese character art font style templates for users to choose from; 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.
[0078] In some embodiments, the system further includes: a picture matching module for converting strokes into pictures of similar shapes according to the shapes of the input strokes; and an adjustment module for adjusting the generated folk Chinese character artwork after the user inputs a complete Chinese character.
[0079] In some embodiments, the system further comprises: a handwriting library construction module, which 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 the pre-constructed handwriting library; 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.
[0080] In other embodiments, 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.
[0081] In other embodiments, the handwriting matching module is further 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.
[0082] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0083] 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 invention, in essence, 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, a magnetic disk, or an optical disk), and includes a number of instructions for a computer terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0084] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A method for generating folk Chinese character artworks based on personalized handwriting morphology, characterized in that Includes steps: Displaying several folk Chinese character art font style templates to users for selection; Collect the Chinese character strokes input by the user through handwriting, and according to the folk Chinese character art font style template selected by the user, based on the current stroke input, artificial intelligence generates the corresponding folk Chinese character art works in real time; The folk Chinese character artwork has a stroke writing style input by a user; the stroke writing style includes the shapes of the written strokes and the positional relationship between the strokes.
2. The method for generating folk Chinese character artworks based on personalized handwriting morphology according to claim 1, characterized in that Also includes the steps: The strokes are converted into images with similar shapes according to the shapes of the input strokes, and the specific steps include: When the strokes input by the user form a complete radical or / and reach a first quantity threshold, predict the Chinese characters that the user may input based on the strokes input by the user and display them for the user to select; When the user selects the input Chinese character, the image is adjusted 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 a second number threshold, adjusting the color, thickness and / or number of illustrations of the folk Chinese character art strokes; Alternatively, the method further comprises the steps of: 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.
3. The method for generating folk Chinese character artworks based on personalized handwriting morphology according to claim 1, characterized in that Also includes the steps: When it is identified that the user is logging in for the first time, the user is prompted to take a handwriting test, and the personalized handwriting of the user is identified according to the handwriting test result, and then entered into a pre-built handwriting library; and When the user inputs the Chinese character strokes by handwriting, the first personalized handwriting of the user is matched in the handwriting library according to the user information of the user, and stroke recognition is performed based on the first personalized handwriting, and corresponding strokes are generated 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 database, the user is prompted to take a handwriting test, and the second personalized handwriting of the user is identified according to the handwriting test result, and then entered into the pre-built handwriting database.
4. The method for generating folk Chinese character artworks based on personalized handwriting morphology according to claim 3, characterized in that Also includes the steps: When the user inputs the Chinese character strokes by handwriting, the user is prompted to select personalized handwriting, and stroke recognition is performed according to the selected personalized handwriting, and then corresponding strokes are generated 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 personalized handwritings, the usage frequency of each personalized handwriting within a preset time period is counted in advance, and the personalized handwriting with the highest usage frequency is used as the default personalized handwriting of the user.
5. The method for generating folk Chinese character artworks based on personalized handwriting morphology according to claim 2, characterized in that: The Stable Diffusion model is combined with several LoRA modules to redraw the user's strokes to form folk Chinese art strokes; each folk Chinese art font style template corresponds to a LoRA module.
6. The method for generating folk Chinese character artworks based on personalized handwriting morphology according to claim 1, characterized in that Also includes the steps: When the Chinese character strokes input by the user through handwriting are collected, a number of candidate folk Chinese character artistic strokes are generated for the user to choose; In response to the user's selection of the candidate folk Chinese character artistic strokes, the original folk Chinese character artistic strokes are replaced.
7. The method for generating folk Chinese character artworks based on personalized handwriting morphology according to claim 1, characterized in that The step further includes: in response to the user's modification of the handwritten input Chinese character strokes, the original folk Chinese character art strokes are modified accordingly; the modification includes one or more of movement, scaling, and rotation.
8. The method for generating folk Chinese character artworks based on personalized handwriting morphology according to claim 1, characterized in that Also includes the steps: When a user inputs a complete Chinese character, a plurality of candidate folk Chinese character art strokes are generated 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 candidate folk Chinese character art strokes, the corresponding strokes in the folk Chinese character art works are replaced; When the user inputs a complete Chinese character, the corresponding folk Chinese character artwork is regenerated in response to the folk Chinese character art font style template reselected by the user; or, the corresponding folk Chinese character artwork is generated based on other folk Chinese character art font style templates for the user to select.
9. A method for generating folk Chinese character artworks based on personalized handwriting morphology according to any one of claims 1 to 8, characterized in that Also includes the steps: Users can download the generated folk Chinese character artworks by scanning the QR code; or / and display the generated folk Chinese character artworks.
10. A system for generating folk Chinese character artworks based on personalized handwriting morphology, characterized in that include: The template display module is used to display several folk Chinese character art font style templates for users to choose from; 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.
Citation Information
Patent Citations
Unsupervised universal wordart generation method
CN115345979A
Beautifying method for hand-written Chinese characters
CN101308578A
System and method for Chinese character retrieval through etymon based on computer network
CN101470749A
Method for generating individualized digital ink of Chinese characters
CN103488339A
Handwriting input processing method and terminal device
CN104007836A