A Method for Restoring Fragments of Ancient Chinese Characters Based on Self-Supervised Transfer Learning

By employing a two-stage self-supervised transfer learning approach, utilizing pre-training on rubbings and fine-tuning on transfer from rubbings, combined with an improved window masking strategy and a multi-scale loss function, the high data annotation cost and insufficient model generalization in the restoration of fragmented oracle bone characters were addressed. This approach enabled efficient and accurate restoration of ancient characters, thus promoting the development of oracle bone studies.

CN122115276APending Publication Date: 2026-05-29ANYANG NORMAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANYANG NORMAL UNIV
Filing Date
2026-02-04
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing technologies for restoring fragmented oracle bone characters suffer from problems such as high data annotation costs, cumbersome character selection, insufficient model generalization, and low restoration accuracy. In particular, background noise and texture interference in oracle bone images make restoration difficult, traditional methods cannot capture character structural features, and deep learning models are prone to overfitting.

Method used

A two-stage approach based on self-supervised transfer learning is adopted. First, the model is pre-trained on a complete rubbing dataset to learn the general structural features of ancient characters. Then, the pre-trained features are transferred to the task of restoring fragmented characters on rubbings through transfer learning. An improved shift window mask autoencoder Swin MAE Unet model is used, and a multi-scale fusion loss function and an unlabeled automatic mask generation strategy are designed. The transfer is fine-tuned by combining adaptive sample discrimination and dynamic loss function.

Benefits of technology

It achieves efficient and accurate restoration of ancient script fragments without manual annotation, reducing the labor intensity of manual restoration, improving restoration accuracy and model generalization ability, and is applicable to the digital protection of oracle bone script and other ancient scripts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122115276A_ABST
    Figure CN122115276A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on self-supervised transfer learning's ancient character expansion sheet residual character repair method, including " copybook pre-training-expansion sheet transfer fine-tuning " two stages, the first stage with the structure complete oracle bone script copybook as source data, construct the improved displacement window self-encoding Unet model for oracle bone script copybook repair, learn character general structure features by optimizing window mask strategy and multi-scale fusion loss function;The second stage migrates pre-training features to expansion sheet residual character repair task by transfer learning, designs unlabelled automatic mask generation strategy and hybrid data adaptive training mechanism, realize the unified modeling of complete and defective samples.The application does not need artificial screening sample and marking mask, can still maintain structural integrity on high defective proportion sample, and the repair precision is significantly better than existing method, provides efficient technical path for the digitization repair of oracle bone script and ancient character, such as gold script, small seal script.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the interdisciplinary fields of ancient script digitization processing, image restoration, and artificial intelligence. Specifically, it relates to a method for restoring fragmented characters on ancient script rubbings based on self-supervised transfer learning. It is applicable to the completion of missing strokes, structural restoration, and digital protection of oracle bone script rubbings, and can be extended to the restoration of other ancient scripts such as bronze script and seal script. Background Technology

[0002] Writing is a hallmark of civilization, carrying historical depth and cultural genes. Oracle bone script, a mature writing system inscribed on tortoise shells and animal bones during the Shang Dynasty, carries core historical information about Shang Dynasty politics, economy, and rituals. It is a key research object in the project to trace the origins of Chinese civilization, and the study and exploration of oracle bone script has profound historical and practical significance. To date, approximately 160,000 fragments of oracle bone script have been excavated, containing about 4,500 independent characters, of which only about 1,500 have been successfully deciphered. Buried underground for thousands of years, the oracle bone fragments have suffered severe pollution and corrosion. Combined with damage during excavation and transportation, the characters on the fragments have become blurred, and those at the edges of the fragments are incomplete and difficult to identify. These damaged characters do not possess the original appearance of oracle bone script, especially the blurred and incomplete characters, which severely hinder the visibility of the oracle bone script and seriously impede in-depth research on paleography and Shang Dynasty history, as well as cultural transmission. Therefore, achieving efficient and accurate restoration of fragmented characters from oracle bone script rubbings is of great significance for the digital preservation and academic research of ancient writing systems. However, oracle bone rubbings suffer from severe background noise and texture interference, such as calcination cracks, tortoise shell patterns, serrations, and physiological edges. These textures have different scales and shapes, and are visually very similar to oracle bone characters, not only interfering with the restoration of oracle bone characters but also increasing the risk of overfitting in the character restoration model. Furthermore, the strong irregularity and sparsity of oracle bone script affect restoration accuracy. The distribution of oracle bone characters is extremely irregular, with few intra-class samples, unbalanced inter-class samples, and frequent variant characters. The manual carving process results in significant randomness in character structure, and their positional information and geometric priors are unknown. These factors greatly hinder the discrimination of oracle bone script features and the constraint of the spatial integrity of characters.

[0003] The core of oracle bone script character restoration lies in completing damaged areas and enhancing character recognizability. Currently, this mainly relies on manual reconstruction by paleographers, which is inefficient, highly subjective, and difficult to adapt to the needs of large-scale rubbing restoration. From an image perspective, restoration methods can be divided into two categories: traditional image processing and deep learning. Traditional methods include those based on partial differential equations, texture synthesis, and sparse representation. These methods utilize prior information to complete the image, and they are effective for completing small-area missing parts. However, oracle bone script images have random missing areas, complex textures, and a severe lack of prior information, especially semantic loss. Therefore, these methods are not suitable for restoring oracle bone script characters. Traditional digital image processing techniques such as filtering and interpolation rely solely on low-level pixel information and cannot capture the structural features of oracle bone script characters, easily leading to stroke distortion, structural errors, and even exacerbating character degradation. In recent years, deep learning has shown broad application prospects in areas such as image semantic restoration, emotion perception, pattern recognition, and feature classification. By training with massive amounts of data, the network model learns the distribution of the data, and even if the missing parts contain a lot of semantic information, the model can repair them using the learned prior information.

[0004] The direct application of deep learning methods to the restoration of fragmented ancient characters such as oracle bone inscriptions faces three core challenges: 1) The stroke structure and semantics of oracle bone inscriptions are closely related, and traditional random masking easily destroys key structural information; 2) Masking annotation of missing areas requires pixel-by-pixel operation, and the delicate lines and complex structures of oracle bone inscriptions make annotation difficult and time-consuming; 3) Training a dedicated oracle bone inscription restoration model requires a large number of samples, and training from scratch is prone to overfitting and makes it difficult to learn the general structural features of characters. Transfer learning techniques can reuse the general features of pre-trained models, reducing the data requirements and training costs for the target task. Oracle bone inscription rubbings, as a standard digital carrier, have the advantages of structural integrity, no noise interference, and sufficient data. They share underlying visual features such as line contours and spatial structures with real rubbings, making transfer learning reasonable. However, existing research has not fully utilized the feature correlation between rubbings and tracings, has not formed a mature two-stage framework of "rubbing pre-training - rubbing transfer fine-tuning," and lacks masking strategies and loss function designs adapted to the structural features of oracle bone inscriptions, resulting in insufficient restoration accuracy and generalization ability. Therefore, developing a two-stage method for restoring fragmented characters from oracle bone rubbings that requires no manual annotation, has strong generalizability, and high restoration accuracy has significant academic value and application prospects. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention provides a method for restoring fragmented characters from ancient rubbings based on self-supervised transfer learning. The aim is to overcome the shortcomings of existing ancient rubbings restoration techniques, such as high data annotation costs, cumbersome character selection, insufficient model generalization, and low restoration accuracy.

[0006] The technical solution adopted in this invention is as follows: Firstly, this invention provides a method for restoring fragmented characters from ancient Chinese rubbings based on self-supervised transfer learning, comprising two stages: In the first stage, an improved shifted window mask autoencoder Swin MAE Unet model was constructed. The model was pre-trained using a dataset of ancient Chinese character rubbings with complete structure as the source data to learn the general structural features of ancient Chinese characters. In the second stage, the pre-trained features obtained in the first stage are transferred to the ancient Chinese rubbings fragment restoration task through transfer learning, and the model is fine-tuned using the ancient Chinese rubbings dataset.

[0007] Furthermore, the model employs an asymmetric design structure, including an encoder and a decoder, which are connected via a skip connection structure.

[0008] Furthermore, the model employs a character masking strategy during copy pre-training. This strategy includes stroke region extraction and differential masking ratios, with the overall masking ratio ρ being: , Where |S| is the number of stroke regions, N is the total number of image patches, and ρ s ρ represents the mask ratio of the stroke area. n This represents the mask ratio for non-stroke areas.

[0009] Furthermore, the model employs a multi-scale fusion loss function L during copy pre-training. total for: ; Where L pixel For weighted pixel MSE loss, ; L struct For structural Hausdorff loss, , Where Hausdorff distance d H Defined as: .

[0010] Furthermore, the image sizes of the rubbing data and the copy data are the same; both the rubbing dataset and the copy dataset include a training set, a validation set, and a test set; the training set and validation set in the copy dataset are both mixed samples containing complete samples and incomplete samples.

[0011] Furthermore, during the migration fine-tuning in the second stage, the mixed samples are preprocessed, including: automatic mask generation, adaptive sample differentiation, and data augmentation.

[0012] Furthermore, during the second stage of transfer fine-tuning, the dynamic loss function is automatically switched to adapt to different sample types. The loss function L used for the complete sample intact for: ; Loss function L used for incomplete samples defect for: ; Where H×W is the sample image size, P i,j To repair pixel values, I i,j α represents the original pixel value; β and α are coefficients.

[0013] Furthermore, the ancient scripts mentioned include any one of oracle bone script, bronze script, and seal script, with oracle bone script being the preferred option.

[0014] Secondly, the present invention provides a system for restoring fragments of ancient Chinese characters from rubbings, the system comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the character repair method described in the first aspect; A monitor is used to output and display relevant information.

[0015] Thirdly, the present invention provides a computer-readable medium storing computer program instructions that can be executed by a processor to implement the steps of the character repair method described in the first aspect.

[0016] Beneficial Effects: This invention presents a two-stage method for restoring fragmented ancient Chinese characters from rubbings based on self-supervised transfer learning. Through a two-stage framework of "pre-training of the rubbing and fine-tuning of the transfer learning," combined with an improved window masking strategy, a multi-scale fusion loss function, and an unlabeled automatic mask generation mechanism, it achieves self-supervised, efficient, and accurate restoration of fragmented ancient Chinese characters, reducing the labor intensity of manual restoration. By using computer-aided restoration of oracle bone characters, fragmented characters are restored to their original appearance, facilitating the identification and interpretation of oracle bone characters by researchers, further promoting the development of oracle bone studies. Furthermore, the proposed method can also be transferred to the restoration of other ancient texts, such as bronze inscriptions, epitaphs, and stele inscriptions. Attached Figure Description

[0017] Figure 1 This is the overall flowchart of the method for repairing damaged characters on rubbings according to the present invention.

[0018] Figure 2It is a schematic diagram of the facsimile of oracle bone inscriptions and real rubbings used in the repair method of the present invention; the figure shows the character "Zhen". The first one from the left is the facsimile, and the rest are the damaged conditions in the real rubbings.

[0019] Figure 3 It is a schematic diagram of the pre-training process of the facsimile, taking the character "An" as an example.

[0020] Figure 4 It is the architecture diagram of the shifted window auto-encoding Unet model (OBI-SMUnet) in the method of the present invention.

[0021] Figure 5 It is the structure diagram of the shifted window transformation module (Swin Transformer block) in the method of the present invention.

[0022] Figure 6 It is a schematic diagram of the repair of facsimile characters in the method of the present invention.

[0023] Figure 7 It is a schematic diagram of the repair of rubbings characters in the method of the present invention. Detailed implementation manners

[0024] Next, in combination with the attached drawings, taking oracle bone inscriptions as the representative of ancient characters, the technical solution of the present invention will be clearly and completely described in detail.

[0025] A two-stage method for repairing damaged oracle bone inscription rubbings based on self-supervised transfer learning includes two stages: In the first stage, an improved shifted window auto-encoding Unet model is constructed, and the facsimiles of oracle bone inscriptions with complete structures are used as source data for pre-training of the facsimiles to learn the general structural features of oracle bone inscription characters; In the second stage, through transfer learning, the pre-training features obtained in the first stage are transferred to the task of repairing damaged oracle bone inscription rubbings, and the model is fine-tuned by transfer using the oracle bone inscription rubbing dataset, and finally the task of repairing damaged oracle bone inscription rubbings is achieved.

[0026] The overall flowchart of the repair method is as Figure 1 shown, and is specifically divided into the following steps.

[0027] Step 1: Construct a dataset The data of facsimiles of oracle bone inscriptions and real rubbings are as Figure 2 shown. The dataset to be constructed is divided into a facsimile pre-training dataset and a rubbing transfer dataset, specifically as follows: Pre-training dataset for oracle bone inscriptions: Based on the digitization resources of standardized oracle bone inscription rubbings, a complete and noise-free single-channel grayscale image dataset is constructed. The image size is uniformly H×W, the characters are centered and aligned, the background is black (pixel value 0) and the characters are white (pixel value 255). It is divided into training set, validation set and test set in an 8:1:1 ratio, and includes common oracle bone inscription characters and variant characters to ensure data diversity.

[0028] Rubbings Migration Dataset: Oracle bone rubbings are digitally scanned, denoised, and standardized and cropped to construct a character dataset with a uniform size of H×W. The training set and validation set contain mixed samples of complete characters and incomplete characters.

[0029] Step 2: Pre-training based on the source task Self-supervised pre-training is performed using copy data as input to learn the general structural features of oracle bone characters. The copy pre-training process is illustrated in Figure 3. First, the original copy character image is marked with a mask. Then, the encoder only processes the image blocks that are not marked with a mask, while the decoder reconstructs the original character image from the latent representation, thus obtaining the repaired character.

[0030] Training methods include Figure 4 The Oracle BoneInscriptions Swin MAE Unet (OBl-SMUnet) architecture shown primarily involves an encoder and a decoder. The encoder on the left is responsible for feature downsampling and extraction, while the decoder on the right is responsible for feature upsampling and image inpainting. The two are connected via skip connections to preserve multi-scale details.

[0031] The encoder first segments the input image into non-overlapping blocks using image patch partitioning. Then, it transforms each block into a fixed-dimensional feature vector using linear embedding, obtaining an initial feature map. Next, it uses window embedding to perform local window partitioning on the initial feature map. Then, it uses the Swing Transformer Block to compute multi-head self-attention (W-MSA) within the local window, and enhances cross-window information interaction through SW-MSA to extract local and global features. Finally, it performs multi-stage feature extraction, downsampling the feature map three times using patch merging and the Swing Transformer Block, generating deep features at multiple scales, ultimately obtaining the encoded low-dimensional, high-semantic feature representation. For more information on the Swing Transformer, please refer to the following article: Liu, Ze, et al. “Swin Transformer: Hierarchical Vision Transformer Using Shifted Windows.” Proceedings of the IEEE / CVF International Conference on Computer Vision (ICCV) , 2021, pp. 9992–10002.

[0032] The decoder first utilizes patch expanding to restore the size of the feature map through upsampling, mapping low-resolution features back to high-resolution space. Then, a Swing TransformerBlock module is used to refine the features, enhancing the dependencies between features and improving detail representation. After three iterations, layer normalization is performed on the final high-resolution features, and then predictor projection is used to map the features back to the image pixel space, generating the final output image. The encoder and decoder preserve multi-scale detail information through skip connections.

[0033] The pre-training process specifically includes:

[0034] 2.1 Image Segmentation Following the Swin Transformer block segmentation strategy, the copy image is divided into 4×4 non-overlapping image blocks, each containing 16 pixels; each image block is mapped to a high-dimensional feature vector through linear projection. , Where P k For the firstk Image blocks, and For projection weights and biases, Let C be the feature vector of the k-th image patch; C is the dimension of the feature vector.

[0035] 2.2 Character Masking Strategy Stroke region extraction: The Canny edge detection algorithm is used to extract the stroke region of the copy and capture the edges of continuous strokes; Differentiated mask scaling: Applying a mask scaling ratio to stroke regions Non-stroke areas use mask ratio The overall mask ratio is: , where |S| is the number of stroke regions and N is the total number of image blocks.

[0036] Window Partitioning and Expansion: The 64×64 image patch grid is divided into 16×16 non-overlapping windows, each containing 4×4 patches. Window selection is performed using sparse sampling, and the top-left index of each selected window is expanded to include the indices of all image patches within that window, forming a complete set of image patches. Masked image patch set ; Spatial smoothness constraint: The initial mask matrix is ​​convolved using 3×3 average pooling and binarized with a threshold of 0.5 to ensure the spatial continuity of the mask region; Input feature sequence: The input feature sequence of the encoder is ,in This is a learnable mask token.

[0037] 2.3 Encoding The encoding uses a Swing Transformer backbone network, with a total of 8 stacked Swing Transformer modules. The Swing Transformer module structure is as follows: Figure 5 As shown, each module includes window multi-head self-attention (W-SMA), shift window multi-head self-attention (SW-MSA), and a feedforward network; the feature map resolution is gradually reduced and the channel dimension is increased through image block merging operations, and the final output feature map has a resolution of 4×4 and a channel dimension of 768.

[0038] The core Swing Transformer module, such as Figure 5As shown, the training process consists of two concatenated sub-modules: a fixed-window multi-head self-attention (W-MSA) sub-module and a shifted-window multi-head self-attention (SW-MSA) sub-module. For the fixed-window W-MSA sub-module, layer normalization is first used to normalize the channel dimensions of the input features to stabilize the training process and avoid gradient vanishing or exploding. Then, the W-MSA mechanism is used to divide the feature map into non-overlapping local windows, calculating multi-head self-attention only within each window. Finally, a multi-layer perceptron (MLP) is used to perform non-linear transformations and dimension mapping on the features. "+" indicates residual connections, preserving as many original features as possible and mitigating the gradient vanishing problem during training. For the multi-head self-attention submodule of the shifted window, which is completely symmetrical to the self-attention module of the fixed window, W-MSA is replaced with SW-MSA. By shifting, the originally non-adjacent windows overlap, thereby realizing cross-window information interaction.

[0039] The encoder is responsible for feature downsampling and extraction: the input image is processed sequentially through image patching and linear embedding to obtain an initial feature map; then, window embedding is used to perform local window partitioning on the initial feature map, and the Swing Transformer Block is used to calculate W-MSA and SW-MSA to extract local and global features; finally, multi-stage feature extraction is performed, and the feature map is downsampled three times consecutively using the Patch Merging + Swing Transformer Block to generate deep features at multiple scales, and finally outputs a feature map with a resolution of 4x4 and a channel dimension of 768.

[0040] 2.4 Decoding like Figure 4 As shown, the decoder stacks three layers of image patch expanding and two layers of SwinTransformer modules, then reconstructs the pixel values ​​of each image patch through layer normalization and linear projection, maps the encoder output features to the original image dimension, and finally stitches them together to form a complete image.

[0041] The decoder is responsible for feature upsampling and image inpainting. Using patch expanding, it restores the size of the feature map through upsampling, mapping low-resolution features back to high-resolution space. Then, a Swing Transformer Block is used to refine the features, enhance the dependencies between features, and improve detail representation. After three iterations, layer normalization is performed on the final high-resolution features, and then predictor projection maps the features back to the image pixel space, generating the final output image. The encoder and decoder preserve multi-scale detail information through skip connections.

[0042] 2.5 Calculation of Multi-Scale Fusion Loss Function 2.5.1 Weighted Pixel MSE Loss: Calculate the loss for the mask region and the weights for the loss in the stroke region. , Where |M| represents the number of image patches being masked, and p is the size of the image patch. and Representing positions respectively The original and restored pixel values ​​at the location. Stroke weight. Defined as .

[0043] 2.5.2 Structural Hausdorff Loss: The Hausdorff distance is used to measure the difference in stroke skeleton between the original and repaired mask regions: for each original mask region and the repaired area Extract the binarized stroke skeletons of each. and Two sets of points and The Hausdorff distance d between H Defined as: .

[0044] The structural loss is normalized using the image patch size p, limiting the value to the interval [0,1]. The structural Hausdorff loss is as follows: .

[0045] 2.5.3 Total Loss Function:

[0046] λ is determined through cross-validation.

[0047] The results of the copy restoration are as follows Figure 6 As shown in the image, the first row of four characters is the original image, the second row is the mask image, and the third row is the restored image.

[0048] Step 3: Fine-tuning the relocation of the rubbing (target task) Load the encoder weights of the pre-trained model from step 2 and perform transfer fine-tuning on the stenography dataset, specifically including the following processing.

[0049] 3.1 Hybrid Data Processing Automatic mask generation: The rubbing character image is converted into a single-channel grayscale image and normalized; Gaussian filtering is used for noise reduction, and Otsu automatic thresholding is used to distinguish the foreground (characters) from the background; after morphological dilation and erosion optimization, a mask M is generated (1 represents the missing area, 0 represents the complete area), and the missing ratio is calculated. ; Adaptive sample discrimination: Sampling is performed on the training set, and the median of the missing proportion is used as the adaptive threshold T. defect Samples below this threshold are considered complete samples, while those above are considered incomplete samples. The distinction is made dynamically during the training process. Data augmentation: Full samples are simulated with small-angle rotation (±10°), translation (±5 pixels), and random incompleteness (occlusion of 10%~20% of the area); incomplete samples are only subjected to slight Gaussian blur and small-amplitude affine transformation to preserve real damage features.

[0050] 3.2 Transfer Learning Process A two-stage strategy of "freezing the core team and then thawing and fine-tuning" is adopted: Phase 1 (Freeze the backbone, first 50 iterations): Freeze all parameters of the Swing encoder, only unfreeze the decoder and output projection layer, and use the learning rate η to fine-tune the decoder to adapt to the rubbing character features. Phase 2 (Full Unfreeze, 50-400 Iterations): Unfreeze all encoder parameters and fine-tune them using the same learning rate to adapt the encoder's feature extraction capabilities to the texture and structure of the rubbing.

[0051] 3.3 Dynamic Loss Function Automatically switches to adapt to different sample types; For the complete sample: Global MSE loss is used to learn the standard character structure. , in To repair pixel values; For incomplete samples: a fusion loss is used, combining weighted pixel MSE loss and structural Hausdorff loss. , Where α and β are coefficients.

[0052] Step 4: Restoration of Fragments of Oracle Bone Inscriptions After processing the oracle bone rubbing image to be restored according to the preprocessing procedure in step 3.1, it is input into the finely tuned improved shift window mask autoencoder Swin MAE Unet model, and the restored complete oracle bone image is output. The restoration result is as follows. Figure 7 As shown, the first row of the image contains the original images of four different oracle bone script characters that have been damaged, and the second row contains images of the restored versions.

[0053] The above presents a two-stage method for restoring fragmented characters from oracle bone rubbings based on self-supervised transfer learning. Addressing the technical pain points of high data annotation costs, cumbersome character selection, and insufficient model generalization in existing oracle bone restoration methods, this patent proposes a two-stage technical solution: "pre-training of rubbings – fine-tuning of rubbing transfer." The first stage uses structurally complete oracle bone rubbings as source data to construct an improved shift-window autoencoder Unet model for oracle bone rubbing restoration. By optimizing the window masking strategy and multi-scale fusion loss function, it learns the general structural features of characters. The second stage transfers the pre-trained features to the rubbing fragment restoration task through transfer learning, designing an unlabeled automatic mask generation strategy and a hybrid data adaptive training mechanism to achieve unified modeling of complete and incomplete samples. This invention eliminates the need for manual sample selection and mask annotation, maintains structural integrity even on samples with a high proportion of incompleteness, and achieves significantly higher restoration accuracy than existing methods, providing an efficient technical path for the digital restoration of oracle bone inscriptions, bronze inscriptions, seal script, and other ancient scripts.

Claims

1. A method for restoring fragmented characters from ancient Chinese rubbings based on self-supervised transfer learning, characterized in that, It includes two stages. In the first stage, an improved shifted window mask autoencoder Swin MAE Unet model was constructed. The model was pre-trained using a dataset of ancient Chinese character rubbings with complete structure as the source data to learn the general structural features of ancient Chinese characters. In the second stage, the pre-trained features obtained in the first stage are transferred to the ancient Chinese rubbings fragment restoration task through transfer learning, and the model is fine-tuned using the ancient Chinese rubbings dataset.

2. The method for restoring fragmented characters from ancient script rubbings according to claim 1, characterized in that, The model adopts an asymmetric design structure, including an encoder and a decoder, which are connected by a skip connection structure.

3. The method for restoring fragmented characters from ancient script rubbings according to claim 1, characterized in that, The character masking strategy employed by the model during copy pre-training includes stroke region extraction and differential masking, with an overall masking ratio ρ as follows: , Where |S| is the number of stroke regions, N is the total number of image patches, and ρ s ρ represents the mask ratio of the stroke area. n This represents the mask ratio for non-stroke areas.

4. The method for restoring fragmented characters from ancient script rubbings according to claim 1, characterized in that, The model employs a multi-scale fusion loss function L during pre-training of the model. total for: , Where L pixel For weighted pixel MSE loss, ; L struct For structural Hausdorff loss, , The Hausdorff distance is defined as: 。 5. The method for restoring fragmented characters from ancient script rubbings according to claim 1, characterized in that, The image sizes of the rubbings and the copy data are the same; both the copy dataset and the rubbing dataset include a training set, a validation set, and a test set; the training set and validation set in the rubbing dataset are mixed samples containing complete samples and incomplete samples.

6. The method for restoring fragmented characters from ancient script rubbings according to claim 5, characterized in that, During migration fine-tuning, mixed samples are preprocessed, including automatic mask generation, adaptive sample differentiation, and data augmentation.

7. The method for restoring fragmented characters from ancient script rubbings according to claim 5, characterized in that, During transfer learning fine-tuning, the dynamic loss function is automatically switched to adapt to different sample types; The loss function L used for the complete sample intact for: ; Loss function L used for incomplete samples defect for: ; Where HxW is the sample image size, P i,j To repair pixel values, I i,j α represents the original pixel value; β and α are coefficients.

8. The method for restoring fragmented characters from ancient script rubbings according to any one of claims 1-7, characterized in that, The ancient scripts mentioned include any one of the following: oracle bone script, bronze script, and seal script.

9. A system for restoring fragments of ancient Chinese characters from rubbings, the system comprising: At least one processor; and a memory communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7; A monitor is used to output and display relevant information.

10. A computer-readable medium, characterized in that, It stores computer program instructions that can be executed by a processor to implement the steps of the method as described in any one of claims 1 to 7.