Character font generation method and device based on feature extraction, equipment and medium
By performing multi-scale wavelet decomposition and multi-level feature refinement on the text glyph dataset, and combining it with a multi-dimensional loss function to optimize the generation model, the problems of style richness and accuracy are solved, and the precise generation of text glyphs is achieved, which is suitable for text processing in the medical and financial fields.
Patent Information
- Application Number
- CN202510722345.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2025-09-16
AI Technical Summary
Existing technologies have difficulty ensuring both stylistic richness and accuracy when generating glyphs. Especially when faced with personalized case descriptions and complex medical terms, the generation model may suffer from problems such as lost stroke details or structural errors.
By performing multi-scale wavelet decomposition on the text glyph dataset, multi-level feature refinement and style consistency processing are carried out, and the generation model is optimized with a multi-dimensional loss function to ensure the accurate capture of stroke details and the coordination of the overall style.
It achieves the goal of ensuring overall style coordination while maintaining the fineness of local strokes, generating text glyphs with rich styles and accuracy, and improving the processing efficiency and readability of medical and financial texts.
Smart Images

Figure CN120655772A_ABST
Abstract
Claims
1. A method for generating character fonts based on feature extraction, characterized in that: include: Acquire a character font dataset, perform multi-scale wavelet decomposition on each character font in the character font dataset, and obtain initial font features; Performing multi-level feature refinement processing on the initial glyph features to obtain glyph refinement features; Performing style consistency processing on the glyph refinement features to obtain style consistency features; Determining a predicted glyph of the character glyph dataset according to the style consistency feature, and calculating a multidimensional loss function of the character glyph dataset based on the predicted glyph; Parameters of a pre-built glyph generation model are optimized according to the multi-dimensional loss function to obtain a target glyph generation model, and the target glyph generation model is used to generate glyphs.
2. The method for generating character glyphs based on feature extraction according to claim 1, wherein: The step of performing multi-scale wavelet decomposition on each character glyph in the character glyph dataset to obtain initial glyph features includes: Performing vector conversion on each character glyph in the character glyph dataset to obtain a glyph vector; Performing discrete wavelet transform on the glyph vector to obtain wavelet transform coefficients; Generating a one-dimensional feature vector for each of the character glyphs according to the wavelet transform coefficients; Perform feature mapping on the one-dimensional feature vector to obtain initial glyph features of each of the character glyphs.
3. The method for generating character glyphs based on feature extraction according to claim 1, wherein: The performing multi-level feature refinement processing on the initial glyph features to obtain glyph refinement features includes: Performing channel splitting on the initial glyph features to obtain split features; Performing dynamic convolution and normalization processing on the split features to obtain normalized features; Performing weighted fusion on the normalized features to obtain target features; The target features are calculated through multi-layer iteration to obtain the glyph refinement features.
4. The method for generating character glyphs based on feature extraction according to claim 1, wherein: The performing style consistency processing on the glyph refinement features to obtain style consistency features includes: Performing branch division on the glyph refinement features to obtain branch vectors; Performing a linear transformation on the branch vector to obtain a transformation vector; Vector activation processing is performed on the transformation vector to obtain a style consistency feature.
5. The method for generating character glyphs based on feature extraction according to claim 1, wherein: The calculating of the multi-dimensional loss function of the character glyph dataset based on the predicted glyph comprises: evaluating a persistent homology distance between the predicted glyph and a corresponding real glyph, and calculating a topology-aware loss based on the persistent homology distance; determining a style loss based on the style consistency features corresponding to the predicted glyph; evaluating an adversarial loss between the predicted glyph and the true glyph using a pre-built discriminator; Extracting semantic features of the predicted glyph and the real glyph, and determining a reconstruction loss based on the semantic features; A weighted sum is performed on the topology perception loss, the style loss, the adversarial loss, and the reconstruction loss to obtain a multidimensional loss function of the text glyph dataset.
6. The method for generating character fonts based on feature extraction according to claim 5, wherein: The evaluating the continuous homology distance between the predicted glyph and the corresponding real text glyph comprises: Binarizing the predicted glyph and the real glyph to obtain a binary glyph image; Constructing a topological structure of the predicted glyph and the real text glyph according to the binary glyph image; The continuous coherence distance is evaluated using a preset distance formula according to the topological structure.
7. The method for generating character glyphs based on feature extraction according to claim 1, wherein: Optimizing parameters of the pre-built glyph generation model according to the multi-dimensional loss function to obtain a target glyph generation model includes: Calculating parameter gradients of model parameters in the glyph generation model according to the multidimensional loss function; Performing parameter gradient descent processing on the model parameters based on the parameter gradient to obtain updated parameters; Determine an update loss value of the update parameter, and iteratively optimize the model parameter using the update loss value until the update loss value is less than a preset parameter threshold, thereby obtaining a target parameter; The target parameters are used to replace the model parameters to obtain a target glyph generation model.
8. A device for generating character fonts based on feature extraction, characterized in that: include: A wavelet decomposition module is used to obtain a character font dataset, perform multi-scale wavelet decomposition on each character font in the character font dataset, and obtain initial character font features; A feature refinement module, configured to perform multi-level feature refinement processing on the initial glyph features to obtain glyph refinement features; A style processing module, configured to perform style consistency processing on the glyph refinement features to obtain style consistency features; a loss calculation module, configured to determine a predicted glyph of the character glyph dataset according to the style consistency feature, and calculate a multidimensional loss function of the character glyph dataset based on the predicted glyph; A parameter optimization module is used to optimize the parameters of the pre-built glyph generation model according to the multi-dimensional loss function to obtain a target glyph generation model, and use the target glyph generation model to generate glyphs.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for generating character glyphs based on feature extraction according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for generating character glyphs based on feature extraction according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Word stock generation method and device, equipment and storage medium
CN122200672A