Method and system for generating fonts with variable font structures
Through the methods of feature point extraction, weighting and stroke generation, the problems of fixation and writing differences in traditional font design are solved, and more accurate and personalized font generation is achieved to meet users' writing habits and historical needs.
Patent Information
- Application Number
- CN202411769946.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
There is a problem of fixation in traditional font design. Users cannot choose personalized fonts according to their needs. Moreover, the writing habits and history of different people lead to large differences in writing fonts in different people's hands, making it difficult to quickly and accurately adapt to users' writing habits and history.
Through three steps: feature point extraction, feature point weighting and stroke generation, Chinese character characters and historical writing data entered by the user are collected, stroke data and spatial data are analyzed, and target text is generated. The specific steps include: feature point extraction module, feature point weighting module and stroke generation module.
It improves the accuracy of the writing style and the user's satisfaction with the generated fonts, and can closely conform to the internal logic and rules of stroke combination and structure construction during the writing process of Chinese characters. The generated fonts are more in line with the user's writing habits and history.
Smart Images

Figure CN119648844A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of font generation, and in particular to a font generation method and system with variable glyph structure. Background Art
[0002] Traditional font design mainly relies on the subjective judgment and artistic creation of designers, which makes the style and shape of fonts fixed. Users cannot choose personalized fonts according to their needs. At the same time, due to the different writing habits and history of each person, even the same font will be different when written by different people. Therefore, in order to quickly and accurately generate fonts based on the user's writing habits and history, a font generation method and system with variable glyph structure is needed.
[0003] The main methods for automatic glyph generation at present include component spelling, stroke deformation, and series character generation. The component spelling method takes advantage of the fact that Chinese characters are composed of radicals and generates glyphs by splitting a small number of Chinese character components, but there are adaptability issues, and the size and position of the components need to be further adjusted in different fonts. The stroke deformation method includes computer-assisted methods and technologies based on statistical models and stroke contours. However, there are still limitations on the scale of stroke deformation, which requires further research. The series character generation method adapts to different application scenarios by creating a series of fonts with the same style but different stroke thicknesses, but it requires generating a series of fonts in advance, which may not be flexible enough and takes up more storage space. Summary of the invention
[0004] In view of the above-mentioned technical deficiencies, the object of the present invention is to provide a font generation method and system with variable glyph structure.
[0005] To solve the above technical problems, the present invention adopts the following technical solutions: The present invention provides a font generation method with variable glyph structure, comprising the following steps: Step 1, feature point extraction: When the user inputs the Chinese character to be generated, the stroke data of each node in each stroke of the target Chinese character is collected, the stroke data of each node in each stroke of the target Chinese character is analyzed to obtain the basic writing feature value of each node in each stroke of the target Chinese character, the spatial data of each node in each stroke of the target Chinese character is collected, and based on the basic writing feature value of each node in each stroke of the target Chinese character, the spatial data of each node in each stroke of the target Chinese character is analyzed to obtain the feature set of each key feature node of the target Chinese character.
[0006] Step 2: Feature point weighting: Collect the input history data of each historical stroke of the user, analyze the input history data of each historical stroke of the user based on the spatial feature set and stroke writing model of each key feature node of the target Chinese character, and obtain the feature set of each stroke of the target Chinese character.
[0007] Step 3, stroke generation: collect the historical writing style data of each historical text of the user, analyze the historical writing style data of each historical text of the user based on the feature set and writing style model of each stroke of the target Chinese character, obtain the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character, collect the spatial data of each stroke of the target Chinese character, analyze the spatial data of each stroke of the target Chinese character based on the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character and the text generation model, and generate the target text.
[0008] Preferably, the spatial data of each stroke of the target Chinese character is analyzed, and the specific analysis process is as follows: the spatial data of each stroke of the target Chinese character includes the average center of gravity distance corresponding to each writing scheme of the target Chinese character, the center of gravity distance corresponding to each stroke, and the writing style volatility; the average center of gravity distance corresponding to each writing scheme of the target Chinese character, the center of gravity distance corresponding to each stroke, and the writing style volatility are input into the text generation model to obtain the output results of each writing scheme of the target Chinese character, and the value of the output result The usage level, , , For the maximum usage level, the writing scheme with the highest usage level is selected to generate text, thereby obtaining the generation scheme of the target text.
[0009] On the other hand, the present invention provides a font generation system based on a variable glyph structure, comprising the following modules: a feature point extraction module, which is used to collect the stroke data of each node in each stroke of the target Chinese character when the user inputs the Chinese character to be generated, analyze the stroke data of each node in each stroke of the target Chinese character, obtain the basic writing feature value of each node in each stroke of the target Chinese character, collect the spatial data of each node in each stroke of the target Chinese character, and analyze the spatial data of each node in each stroke of the target Chinese character based on the basic writing feature value of each node in each stroke of the target Chinese character to obtain the feature set of each key feature node of the target Chinese character.
[0010] The feature point weighting module is used to collect the input historical data of each historical stroke of the user, analyze the input historical data of each historical stroke of the user based on the spatial feature set of each key feature node of the target Chinese character and the stroke writing model, and obtain the feature set of each stroke of the target Chinese character.
[0011] The stroke generation module is used to collect the historical writing style data of each historical text of the user, analyze the historical writing style data of each historical text of the user based on the feature set and writing style model of each stroke of the target Chinese character, obtain the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character, collect the spatial data of each stroke of the target Chinese character, analyze the spatial data of each stroke of the target Chinese character based on the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character and the text generation model, and generate the target text.
[0012] The beneficial effects of the present invention are as follows: 1. The present invention first extracts features from the nodes within each stroke of the target Chinese character, obtains basic writing feature values based on the data of each node of the stroke, and then analyzes and obtains the spatial feature set of each key node based on the spatial data of each node. Then, based on the user's historical writing records, weighted calculation is performed on the spatial feature set of each key node of each stroke to obtain the feature set of each stroke, and then the priority of the writing style corresponding to the feature set of the stroke is analyzed. Finally, the spatial data of each stroke of the target Chinese character is collected, and the font of the Chinese character is generated based on the text generation model. In the process of feature point extraction, the present invention increases the analysis of node spatial data, improves the effectiveness of the analysis results, thereby improving the accuracy of the writing style and increasing the user's satisfaction with the generated font.
[0013] 2. The present invention performs a spatial analysis on each node and carries out a comprehensive and detailed spatial dimension analysis for each node. In this process, by accurately collecting, organizing and deeply analyzing the rich spatial data contained in each node, the node's position relationship, relative distance, azimuth angle and other key spatial elements within the Chinese character writing framework are fully considered. This can effectively avoid errors and deviations caused by ignoring spatial factors in traditional analysis methods, greatly improve the accuracy of node weight analysis, and can closely fit the internal logic and rules of stroke combination and structure construction in the process of Chinese character writing, so that the analysis results are more in line with the actual structural characteristics of Chinese character writing and meet the needs of users. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0015] Figure 1 The present invention is a schematic flow chart of the steps for implementing the method.
[0016] Figure 2 It is a schematic diagram of the system structure connection of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 creative work are within the scope of protection of the present invention.
[0018] according to Figure 1 As shown, the present invention provides a font generation method with a variable glyph structure, comprising the following steps: Step 1, feature point extraction: when a user inputs a Chinese character to be generated, the stroke data of each node in each stroke of the target Chinese character is collected, the stroke data of each node in each stroke of the target Chinese character is analyzed to obtain a basic writing feature value of each node in each stroke of the target Chinese character, the spatial data of each node in each stroke of the target Chinese character is collected, and based on the basic writing feature value of each node in each stroke of the target Chinese character, the spatial data of each node in each stroke of the target Chinese character is analyzed to obtain a feature set of each key feature node of the target Chinese character.
[0019] In a specific embodiment, the stroke data of each node in each stroke of the target Chinese character is collected, and the specific collection process is as follows: the stroke data of each node in each stroke of the target Chinese character includes the curvature, curvature change rate, length from the starting stroke, length from the ending stroke, bending angle, length from the previous bending angle and length from the next bending angle of each node in each stroke of the target Chinese character, the target Chinese character is converted into an image, and the starting position, ending position and each turning point position of each stroke of the target Chinese character are obtained through image recognition technology, and the position, curvature, curvature change rate and bending angle of each node in each stroke of the target Chinese character are obtained at the same time, and the length from the starting stroke, length from the ending stroke, length from the previous bending angle and length from the next bending angle of each node in each stroke of the target Chinese character are obtained according to the starting position, ending position and each turning point position of each stroke of the target Chinese character and the position of each node.
[0020] It should be noted that if a node is a point on a line segment, the curvature, curvature change rate and inflection angle of the node are all zero.
[0021] In a specific embodiment, the stroke data of each node in each stroke of the target Chinese character is analyzed, and the specific analysis process is as follows: the stroke data of each node in each stroke of the target Chinese character includes the curvature, curvature change rate, length from the starting stroke, length from the ending stroke, corner angle, length from the previous corner and length from the next corner of each node in each stroke of the target Chinese character. The stroke data of each node in each stroke of the target Chinese character is normalized to obtain the basic writing feature value of each node in each stroke of the target Chinese character.
[0022] In a specific embodiment, spatial data of each node in each stroke of the target Chinese character is collected, and the specific collection process is as follows: each stroke of the target Chinese character is regarded as an independent straight line segment or curve segment. If the stroke is a straight line segment, the center of gravity is located at the midpoint of the stroke, thereby obtaining the center of gravity of each straight line stroke of the target Chinese character. For curved strokes, a numerical integration method is used to approximately calculate the position of the center of gravity, thereby obtaining the center of gravity of each curved stroke of the target Chinese character. The center of gravity of each stroke of the target Chinese character is weighted averaged to obtain the center of gravity of the target Chinese character. A two-dimensional rectangular coordinate system is established with the center of gravity of the target Chinese character as the coordinate origin, and a coordinate feature set corresponding to each node in each stroke of the target Chinese character is collected from the two-dimensional rectangular coordinate system.
[0023] It should be noted that the coordinate feature set corresponding to each node in each stroke of the target Chinese character includes but is not limited to the coordinates corresponding to each node in each stroke of the target Chinese character, the distance from the origin and the angle of the line connecting the node and the origin.
[0024] In a specific embodiment, the spatial data of each node in each stroke of the target Chinese character is analyzed, and the specific analysis process is as follows: the Spearman correlation coefficient of each type of numerical data in the coordinate feature set is calculated to obtain the correlation coefficient of each type of data to obtain the weight factor of each type of data, and the coordinate feature set corresponding to each node in each stroke of the target Chinese character, the feature set of each node with the same stroke, and the feature set of each text node are weighted to obtain the spatial feature value corresponding to each node in each stroke of the target Chinese character, the spatial feature value of each node with the same stroke, and the feature value of each text node.
[0025] The distances of the nodes in each stroke of the target Chinese character are subjected to the Pearson correlation coefficient to obtain the weight factors of the spatial feature values of the nodes with the same stroke corresponding to the nodes in each stroke of the target Chinese character, and the spatial feature values of the nodes with the same stroke of the target Chinese character are weightedly calculated to obtain the stroke spatial feature values of the nodes in the same stroke of the target Chinese character. According to the distance analysis process of the nodes in each stroke of the target Chinese character, the distances of the nodes in the target Chinese character are analyzed to obtain the text spatial feature values of the nodes in the same stroke of the target Chinese character. The text spatial feature values, stroke spatial feature values, writing feature values, maximum text spatial feature values, maximum stroke spatial feature values and maximum writing feature values of the nodes in each stroke of the target Chinese character are input into the quality assessment index calculation formula to obtain the quality assessment index of the nodes in each stroke of the target Chinese character. The nodes in each stroke of the target Chinese character are sorted in descending order according to the quality assessment index, and the nodes with a preset number of nodes before the sequence in each stroke of the target Chinese character are recorded as key nodes, thereby obtaining the feature set of each key feature node in each stroke of the target Chinese character.
[0026] It should be noted that the quality assessment index calculation formula is: ,in, is the quality evaluation index of the target node, , , , , and are the text space feature value, stroke space feature value, writing feature value, maximum text space feature value, maximum stroke space feature value and maximum writing feature value of the target node respectively. , and They are standard text space feature value, standard stroke space feature value and standard writing feature value respectively. , and are the weight factors of text space feature value, stroke space feature value and writing feature value respectively. , , , .
[0027] According to the analysis process of the quality evaluation index of the target node, the quality evaluation index of each node in each stroke of the target Chinese character is analyzed, and the standard text space feature value Set by staff, is the threshold of the text space feature value, the closer Indicates that the more important the position of the target text is in the text, the more important the standard parameter is. and Setup process and standard parameters The setup process is the same as 1, for example is 1.2 and is 1.6, the weight factor , and All are set by staff, e.g. is 0.3, is 0.2 and is 0.5.
[0028] Step 2: Feature point weighting: Collect the input history data of each historical stroke of the user, analyze the input history data of each historical stroke of the user based on the spatial feature set and stroke writing model of each key feature node of the target Chinese character, and obtain the feature set of each stroke of the target Chinese character.
[0029] In a specific embodiment, the input historical data of each historical stroke of the user is collected, and the specific collection process is as follows: the input historical data of each historical stroke of the user includes the average writing speed, writing speed change rate, average writing times and writing times change rate of each type of spatial feature set node, and the writing speed of the node is recorded when the user writes the text, so as to obtain the speed of each writing and the total writing times of each type of spatial feature set node, from which the fastest writing speed and the slowest writing speed of each type of spatial feature set node are obtained, and the sum of the fastest writing speed and the slowest writing speed of each type of spatial feature set node is divided by the difference between the fastest writing speed and the slowest writing speed to obtain the writing speed change rate, and at the same time, the total writing times of each type of spatial feature set node are classified by date to obtain the total writing times of each day of each type of spatial feature set node, from which the maximum total writing times and the minimum total writing times of each type of spatial feature set node are obtained, and the sum of the maximum total writing times and the minimum total writing times of each type of spatial feature set node is divided by the difference between the maximum total writing times and the minimum total writing times to obtain the writing times change rate.
[0030] In a specific embodiment, the input historical data of each historical stroke of the user is analyzed, and the specific analysis process is as follows: the average writing speed, writing speed change rate, average writing times and writing times change rate of each type of spatial feature set node are input into the stroke writing model, and the output results of each type of spatial feature set node are obtained, and the value of the output result is That is the node writing level, , , Write the rank for the maximum node.
[0031] The node writing priority index corresponding to the writing level of each type of node is obtained from the database, and the writing priority index of the spatial feature set of each key feature node in each stroke of the target Chinese character is obtained according to the spatial feature set of each key feature node. According to the writing priority index of each key feature node in each stroke of the target Chinese character, the spatial feature set of each key feature node in each stroke of the target Chinese character is weightedly calculated to obtain the feature set of each stroke of the target Chinese character.
[0032] In a specific embodiment, the stroke writing model expression is: ,in, For the The output of the class space feature set node, is the type of spatial feature set, , , , , and Respectively The average writing speed, writing speed change rate, average number of writing times and writing number change rate of the nodes in the class space feature set, , , and They are standard writing speed, standard speed change rate, standard writing times and standard writing times change rate. and are the weight factor of the node writing speed and the weight factor of the number of node writing times, , , , , , and Write the index of the first node, Node writing index, Node writing index and Node writing index.
[0033] It should be noted that the standard parameters , , , , , , and Setup process and standard parameters The setup process is the same as 1, for example 1.3 1.6 1.2 1.9, 0.6 1.13, is 1.14 and is 1.6, the weight factor and All are set by staff, e.g. is 0.37 and It is 0.43.
[0034] Step 3, stroke generation: collect the historical writing style data of each historical text of the user, analyze the historical writing style data of each historical text of the user based on the feature set and writing style model of each stroke of the target Chinese character, obtain the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character, collect the spatial data of each stroke of the target Chinese character, analyze the spatial data of each stroke of the target Chinese character based on the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character and the text generation model, and generate the target text.
[0035] In a specific embodiment, the collection of writing style history data of each historical text of the user, the specific collection process is as follows: the writing style history data of each historical text of the user includes the writing rate, writing volatility, writing stability index and writing volatility index of each writing style of each characteristic set stroke, the text image is collected when the user is writing, and the writing style of each stroke is obtained through image recognition technology, thereby obtaining the number of writing times of each writing style of each characteristic set stroke, and the total number of writing times of each characteristic set stroke is obtained by statistics, and the number of writing times of each writing style of each characteristic set stroke is divided by the total number of writing times to obtain the writing rate of each writing style, and at the same time, the image recognition technology is used to obtain the proportion of strokes of the same style of each writing style of each characteristic set stroke in a single text, thereby obtaining the maximum proportion and minimum proportion of strokes of the same style of each writing style of each characteristic set stroke. The sum of the maximum and minimum proportions of strokes of the same style in each writing style of each type of feature set strokes divided by the difference between the maximum and minimum proportions is equal to the writing stability index. Then, image recognition technology is used to identify the number of nodes with abnormal output styles in each stroke. The number of nodes with abnormal output styles in each stroke is divided by the total number of nodes to obtain the writing volatility of each stroke. In this way, the volatility of each writing of each writing style of each stroke in each type of feature set is obtained. The average value is calculated to obtain the writing volatility of each writing style of each stroke in each type of feature set. The maximum volatility and the minimum volatility are obtained from the volatility of each writing style of each stroke in each type of feature set. The sum of the maximum volatility and the minimum volatility of each writing style of each stroke in each type of feature set is divided by the difference between the maximum volatility and the minimum volatility to obtain the writing volatility index of each writing style of each stroke in each type of feature set.
[0036] In a specific embodiment, the writing style historical data of each historical text of the user is analyzed, and the specific analysis process is as follows: the writing rate, writing volatility, writing stability index and writing volatility index of each writing style of each type of feature set stroke are input into the writing style model, and the output results of each writing style of each type of feature set stroke are obtained. The value of the output result is the priority level, thereby obtaining the priority level of each writing style of each stroke of the target Chinese character.
[0037] In a specific embodiment, the writing style model expression is: ,in, For the Class feature set stroke The output result of writing style is is the type number of the feature set stroke, , , is the writing style number, , , , , and Respectively Class feature set stroke The writing rate, writing volatility, writing stability index and writing volatility index of each writing style are , , and They are the preset standard writing rate, standard writing volatility, standard writing stability index and standard writing volatility index. and is the preset weight factor of the number of strokes written and the weight factor of the stroke stability, , , , , , and They are the first style priority index, Style Priority Index, Style priority index and Style priority index.
[0038] It should be noted that the standard parameters , , , , , , and Setup process and standard parameters The setup process is the same as 1, for example 1.2 1.5, 1.23, 1.7 0.5, 1.1, is 1.2 and is 1.8, the weight factor and All are set by staff, e.g. is 0.42 and It is 0.58.
[0039] In a specific embodiment, the spatial data of each stroke of the target Chinese character is collected, and the specific collection process is as follows: the spatial data of each stroke of the target Chinese character includes the average center of gravity distance corresponding to each writing scheme of the target Chinese character, the center of gravity distance corresponding to each stroke, and the writing style fluctuation rate, a preview Chinese character image of each writing scheme of the target Chinese character is established, and a two-dimensional rectangular coordinate system is established with the center of gravity of each writing scheme of the target Chinese character as the coordinate origin, and the average center of gravity distance corresponding to each writing scheme of the target Chinese character and the center of gravity distance corresponding to each stroke are collected from the two-dimensional rectangular coordinate system, and at the same time, the proportion of each style stroke in each writing scheme of the target Chinese character is collected, and the maximum style stroke proportion and the minimum style stroke proportion in each writing scheme of the target Chinese character are obtained, and at the same time, the proportion of each style stroke in each writing scheme of the target Chinese character is continued to be averaged to obtain the average writing proportion of each writing scheme of the target Chinese character, and the difference between the maximum style stroke proportion and the average writing proportion of each writing scheme of the target Chinese character is divided by the difference between the maximum style stroke proportion and the minimum style stroke proportion to obtain the writing style fluctuation rate of each writing scheme of the target Chinese character.
[0040] In a specific embodiment, the spatial data of each stroke of the target Chinese character is analyzed, and the specific analysis process is as follows: the average center of gravity distance corresponding to each writing scheme of the target Chinese character, the center of gravity distance corresponding to each stroke, and the writing style fluctuation rate are input into the text generation model to obtain the output results of each writing scheme of the target Chinese character, and the value of the output result The usage level, , , For the maximum usage level, the writing scheme with the highest usage level is selected to generate text, thereby obtaining the generation scheme of the target text.
[0041] In a specific embodiment, the text generation model expression: ,in, For the The output of the writing scheme is is the number of the writing scheme, , , and Respectively The average center of gravity distance and writing style volatility of the writing schemes, For the Writing plan No. The distance between the centers of gravity of the strokes, is the stroke number, , , is the total number of strokes, The default standard writing style volatility, and They are the weight factor of the preset center of gravity and the weight factor of the volatility of the writing style, , , , , , and They are the first style priority index, Style Priority Index, Style priority index and Style priority index.
[0042] It should be noted that the standard parameters , , , and Setup process and standard parameters The setup process is the same as 1, for example 1.6 0.9, 1.9, For 2.1 and is 3.6, the weight factor and All are set by staff, e.g. is 0.42 and It is 0.58.
[0043] according to Figure 2 As shown, the present invention provides a font generation system based on variable glyph structure, comprising the following modules: a feature point extraction module, a feature point weighting module and a stroke generation module.
[0044] The feature point weighting module is connected to the feature point extraction module and the stroke generation module respectively.
[0045] The feature point extraction module is used to collect the stroke data of each node in each stroke of the target Chinese character when the user inputs the Chinese character to be generated, analyze the stroke data of each node in each stroke of the target Chinese character, obtain the basic writing feature value of each node in each stroke of the target Chinese character, collect the spatial data of each node in each stroke of the target Chinese character, analyze the spatial data of each node in each stroke of the target Chinese character based on the basic writing feature value of each node in each stroke of the target Chinese character, and obtain the feature set of each key feature node of the target Chinese character.
[0046] The feature point weighting module is used to collect the input historical data of each historical stroke of the user, analyze the input historical data of each historical stroke of the user based on the spatial feature set of each key feature node of the target Chinese character and the stroke writing model, and obtain the feature set of each stroke of the target Chinese character.
[0047] The stroke generation module is used to collect the historical writing style data of each historical text of the user, analyze the historical writing style data of each historical text of the user based on the feature set and writing style model of each stroke of the target Chinese character, obtain the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character, collect the spatial data of each stroke of the target Chinese character, analyze the spatial data of each stroke of the target Chinese character based on the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character and the text generation model, and generate the target text.
[0048] The above contents are merely examples and explanations of the concept of the present invention. Those skilled in the art may make various modifications or additions to the specific embodiments described or replace them in a similar manner. As long as they do not deviate from the concept of the invention or exceed the scope defined in this specification, they shall all fall within the protection scope of the present invention.
Claims
1. A method for generating a font with a variable glyph structure, characterized in that: The steps include: When the user inputs a Chinese character to be generated, the stroke data of each node in each stroke of the target Chinese character is collected, the stroke data of each node in each stroke of the target Chinese character is analyzed to obtain the basic writing feature value of each node in each stroke of the target Chinese character, the spatial data of each node in each stroke of the target Chinese character is collected, and based on the basic writing feature value of each node in each stroke of the target Chinese character, the spatial data of each node in each stroke of the target Chinese character is analyzed to obtain the feature set of each key feature node of the target Chinese character; Collect the input history data of each historical stroke of the user, analyze the input history data of each historical stroke of the user based on the spatial feature set of each key feature node of the target Chinese character and the stroke writing model, and obtain the feature set of each stroke of the target Chinese character; Collect the historical data of writing styles of each historical text of the user, analyze the historical data of writing styles of each historical text of the user based on the feature set of each stroke of the target Chinese character and the writing style model, obtain the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character, collect the spatial data of each stroke of the target Chinese character, analyze the spatial data of each stroke of the target Chinese character based on the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character and the text generation model, and generate the target text.
2. The method for generating a font with a variable glyph structure according to claim 1, characterized in that: The stroke data of each node in each stroke of the target Chinese character are analyzed, and the specific analysis process is as follows: The stroke data of each node in each stroke of the target Chinese character include the curvature, curvature change rate, length from the starting stroke, length from the ending stroke, corner angle, length from the previous corner and length from the next corner of each node in each stroke of the target Chinese character. The stroke data of each node in each stroke of the target Chinese character are normalized to obtain the basic writing feature value of each node in each stroke of the target Chinese character.
3. The method for generating a font with a variable glyph structure according to claim 2, characterized in that: The spatial data of each node in each stroke of the target Chinese character is analyzed, and the specific analysis process is as follows: Calculate the Spearman correlation coefficient of each type of numerical data in the coordinate feature set to obtain the correlation coefficient of each type of data to obtain the weight factor of each type of data, and perform weighted calculation on the coordinate feature set corresponding to each node in each stroke of the target Chinese character, the feature set of each node with the same stroke, and the feature set of each text node to obtain the spatial feature value corresponding to each node in each stroke of the target Chinese character, the spatial feature value of each node with the same stroke, and the feature value of each text node; The distances of the nodes in each stroke of the target Chinese character are subjected to the Pearson correlation coefficient to obtain the weight factors of the spatial feature values of the nodes with the same stroke corresponding to the nodes in each stroke of the target Chinese character, and the spatial feature values of the nodes with the same stroke of the target Chinese character are weightedly calculated to obtain the stroke spatial feature values of the nodes in the same stroke of the target Chinese character. According to the distance analysis process of the nodes in each stroke of the target Chinese character, the distances of the nodes in the target Chinese character are analyzed to obtain the text spatial feature values of the nodes in the same stroke of the target Chinese character. The text spatial feature values, stroke spatial feature values, writing feature values, maximum text spatial feature values, maximum stroke spatial feature values and maximum writing feature values of the nodes in each stroke of the target Chinese character are input into the quality assessment index calculation formula to obtain the quality assessment index of the nodes in each stroke of the target Chinese character. The nodes in each stroke of the target Chinese character are sorted in descending order according to the quality assessment index, and the nodes with a preset number of nodes before the sequence in each stroke of the target Chinese character are recorded as key nodes, thereby obtaining the feature set of each key feature node in each stroke of the target Chinese character.
4. The method for generating a font with a variable glyph structure according to claim 1, characterized in that: The input history data of each historical stroke of the user is analyzed, and the specific analysis process is as follows: The input historical data of each historical stroke of the user includes the average writing speed, writing speed change rate, average writing times and writing times change rate of various spatial feature set nodes. The average writing speed, writing speed change rate, average writing times and writing times change rate of various spatial feature set nodes are input into the stroke writing model to obtain the output results of various spatial feature set nodes, and the output results are numerical values. That is the node writing level, , , Write the rank for the largest node; The node writing priority index corresponding to the writing level of each type of node is obtained from the database, and the writing priority index of the spatial feature set of each key feature node in each stroke of the target Chinese character is obtained according to the spatial feature set of each key feature node. According to the writing priority index of each key feature node in each stroke of the target Chinese character, the spatial feature set of each key feature node in each stroke of the target Chinese character is weightedly calculated to obtain the feature set of each stroke of the target Chinese character.
5. The method for generating a font with a variable glyph structure according to claim 4, characterized in that: The stroke writing model expression is: ,in, For the The output of the class space feature set node, is the type of spatial feature set, , , , , and Respectively The average writing speed, writing speed change rate, average number of writing times and writing number change rate of the nodes in the class space feature set, , , and They are standard writing speed, standard speed change rate, standard writing times and standard writing times change rate. and are the weight factor of the node writing speed and the weight factor of the number of node writing times, , , , , , and Write the index of the first node, Node writing index, Node writing index and Node writing index.
6. The method for generating a font with a variable glyph structure according to claim 4, characterized in that: The writing style historical data of each historical text of the user is analyzed, and the specific analysis process is as follows: The writing style historical data of each historical text of the user includes the writing rate, writing fluctuation rate, writing stability index and writing volatility index of each writing style of each feature set stroke. The writing rate, writing fluctuation rate, writing stability index and writing volatility index of each writing style of each feature set stroke are input into the writing style model to obtain the output results of each writing style of each feature set stroke. The numerical value of the output result is the priority level, thereby obtaining the priority level of each writing style of each stroke of the target Chinese character.
7. The method for generating a font with a variable glyph structure according to claim 6, characterized in that: The writing style model expression is: ,in, For the Class feature set stroke The output result of writing style is is the type number of the feature set stroke, , , is the writing style number, , , , , and Respectively Class feature set stroke The writing rate, writing volatility, writing stability index and writing volatility index of each writing style are , , and They are the preset standard writing rate, standard writing volatility, standard writing stability index and standard writing volatility index. and is the preset weight factor of the number of strokes written and the weight factor of the stroke stability, , , , , , and They are the first style priority index, Style Priority Index, Style priority index and Style priority index.
8. The method for generating a font with a variable glyph structure according to claim 1, characterized in that: The spatial data of each stroke of the target Chinese character is analyzed, and the specific analysis process is as follows: The spatial data of each stroke of the target Chinese character includes the average center of gravity distance corresponding to each writing scheme of the target Chinese character, the center of gravity distance corresponding to each stroke, and the writing style fluctuation rate. The average center of gravity distance corresponding to each writing scheme of the target Chinese character, the center of gravity distance corresponding to each stroke, and the writing style fluctuation rate are input into the text generation model to obtain the output results of each writing scheme of the target Chinese character, and the numerical value of the output result The usage level, , , For the maximum usage level, the writing scheme with the highest usage level is selected to generate text, thereby obtaining the generation scheme of the target text.
9. The method for generating a font with a variable glyph structure according to claim 8, characterized in that: The text generation model expression: ,in, For the The output of the writing scheme is is the number of the writing scheme, , , and Respectively The average center of gravity distance and writing style volatility of the writing schemes, For the Writing plan No. The distance between the centers of gravity of the strokes, is the stroke number, , , is the total number of strokes, The default standard writing style volatility, and They are the weight factor of the preset center of gravity and the weight factor of the volatility of the writing style, , , , , , and They are the first style priority index, Style Priority Index, Style priority index and Style priority index.
10. A font generation system with a variable glyph structure using the font generation method with a variable glyph structure according to any one of claims 1 to 9, characterized in that: Includes the following modules: A feature point extraction module is used to collect the stroke data of each node in each stroke of the target Chinese character when the user inputs the Chinese character to be generated, analyze the stroke data of each node in each stroke of the target Chinese character, obtain the basic writing feature value of each node in each stroke of the target Chinese character, collect the spatial data of each node in each stroke of the target Chinese character, analyze the spatial data of each node in each stroke of the target Chinese character based on the basic writing feature value of each node in each stroke of the target Chinese character, and obtain the feature set of each key feature node of the target Chinese character; The feature point weighting module is used to collect the input history data of each historical stroke of the user, analyze the input history data of each historical stroke of the user based on the spatial feature set of each key feature node of the target Chinese character and the stroke writing model, and obtain the feature set of each stroke of the target Chinese character; The stroke generation module is used to collect the historical writing style data of each historical text of the user, analyze the historical writing style data of each historical text of the user based on the feature set and writing style model of each stroke of the target Chinese character, obtain the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character, collect the spatial data of each stroke of the target Chinese character, analyze the spatial data of each stroke of the target Chinese character based on the priority of each writing style corresponding to the feature set of each stroke of the target Chinese character and the text generation model, and generate the target text.