File automatic scanning and digitization method and system based on image recognition

By improving image recognition algorithms and deep learning models, the problems of inaccurate archival boundary positioning, poor image preprocessing effects, and fragmented text and table data have been solved. High-definition image correction and highly correlated structured data generation have been achieved, improving the automation level and data quality of archival digitization.

CN121963218APending Publication Date: 2026-05-01LINYI MUNICIPAL MANAGEMENT SERVICE CENT
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
LINYI MUNICIPAL MANAGEMENT SERVICE CENT
Filing Date
2026-01-23
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies suffer from low accuracy in locating file boundaries, susceptibility to stains and creases, poor image preprocessing, lack of correlation between text and table data integration, and insufficient automation, resulting in digitization efficiency and data quality that fail to meet actual needs.

Method used

An improved Canny edge detection and weighted Hough transform composite algorithm is used for edge detection and contour extraction. Combined with adaptive light source adjustment and scanning parameter adjustment, image blur and exposure are corrected in real time. A deep learning model is used to identify multiple types of content, and a feature association mapping algorithm is used to integrate text and tabular data. An image comparison algorithm is used to verify consistency.

Benefits of technology

It achieves precise positioning of the physical boundaries of archives, high-definition image correction, and highly correlated structured data generation, improving the degree of automation and digitization efficiency, and ensuring the consistency of data quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121963218A_ABST
    Figure CN121963218A_ABST
Patent Text Reader

Abstract

The invention discloses an archive automatic scanning and digitization method and system based on image recognition, and the method comprises the steps: building an automatic scanning device to obtain an initial image of an archive, positioning the boundary of the archive through an improved Canny edge detection and weighted Hough transform composite algorithm, and marking stain creases; scanning area by area after adaptively adjusting scanning parameters, and correcting image problems in real time; a clear image is obtained through preprocessing and tilt correction; inputting a Transform architecture deep learning model to identify a text and a table, and integrating the text and the table into structured data through a feature association mapping algorithm; and associating and binding the data and the image, automatically filing, verifying the consistency through an image comparison algorithm, and then generating an index. The system comprises a scanning module, an image algorithm module, an intelligent identification module and the like, achieves the digitalization, automation and precision of archives, and improves the processing efficiency and data quality.
Need to check novelty before this filing date? Find Prior Art

Description

Image Recognition-Based Automated Scanning and Digitization Methods and Systems for Archives Technical Field

[0001] This invention belongs to the field of image recognition and archival digitization technology, specifically a method and system for automated scanning and digitization of archives based on image recognition. Background Technology

[0002] With the advancement of digital transformation in archives management in government, enterprises and other fields, the automated scanning and digital processing of paper archives has become a core requirement for improving the efficiency of archives access and reducing management costs. It is necessary to achieve standardized processing of the entire process from image acquisition and processing to data integration and archiving.

[0003] Existing technologies mostly use conventional scanning equipment in conjunction with basic image algorithms. They determine the scanning range through simple edge detection, recognize text content with the help of traditional OCR technology, process table data using basic extraction tools, and finally complete the archiving of documents manually or semi-automatically.

[0004] However, the existing solutions have obvious shortcomings: low boundary positioning accuracy, easily affected by document stains and creases; poor image preprocessing effect, and difficulty in effectively solving problems such as blurring and tilting; lack of correlation between text and table data integration, and low degree of structuring; insufficient automation, requiring a lot of manual intervention, and lacking a reliable consistency verification mechanism, resulting in digitization efficiency and data quality that cannot meet actual needs. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide an automated scanning and digitization method and system for archives based on image recognition to solve the technical problems in the prior art, such as low accuracy of archive boundary positioning and susceptibility to interference from stains and creases, poor image preprocessing effect leading to difficulty in eradicating blurring and tilting problems, lack of correlation and low degree of structure in the integration of text and table data, insufficient automation and reliance on manual intervention, lack of reliable consistency verification mechanism, and thus the difficulty in meeting the technical requirements of practical application in terms of digitization efficiency and data quality.

[0006] To achieve the above objectives, this invention discloses an automated scanning and digitization method for archives based on image recognition. The method includes the following steps: S1: Setting up an automated scanning device, placing the archive to be scanned on the automated scanning device, acquiring an initial image of the archive, performing edge detection and contour extraction on the initial image of the archive using an image recognition algorithm, automatically locating the physical boundaries of the archive, and simultaneously identifying and marking surface stains and creases of the archive; S2: Determining the scanning range based on the physical boundaries of the archive, and combining the marked surface stains and creases, the automated scanning device adaptively adjusts the brightness, color temperature, and illumination angle of the scanning light source, synchronously matching the scanning resolution and scanning speed parameters; S3: Controlling the automated scanning device to scan the archive area by area according to the scanning range, scanning resolution, and scanning speed parameters, acquiring a full-frame image of the archive, and collecting image data of the scanned area in real time during the scanning process, and correcting image blur in real time. S4: Preprocess the full-frame image of the archive by sequentially performing grayscale conversion, improved wavelet threshold denoising, crease repair, and contrast enhancement to obtain a clear archive image; identify the tilt angle of the clear archive image using a tilt detection algorithm, and automatically correct the image based on the tilt angle to obtain a corrected archive image; S5: Input the corrected archive image into a pre-trained deep learning recognition model to achieve multi-type content classification and recognition; perform word segmentation, semantic analysis, and format standardization on the recognized text, perform row and column positioning and data extraction on the table, and integrate them together to form structured data through a feature association mapping algorithm; S6: Associate and bind the structured data and the corrected archive image; automatically archive the digital archive according to the preset archive classification and naming specifications; simultaneously verify the consistency between the digital archive and the initial archive image using an image comparison algorithm, and generate a digital archive index after the verification is passed.

[0007] Furthermore, the automated scanning device includes an image acquisition module, a platform, and a light source adjustment module; the image acquisition module is used to acquire initial images and full-frame images of the archives; the platform is used to place the archives to be scanned and provide support; the light source adjustment module is used to adaptively adjust the brightness, color temperature, and illumination angle of the scanning light source.

[0008] Furthermore, the image recognition algorithm is a composite algorithm of the improved Canny edge detection algorithm and the weighted Hough transform; the improved Canny edge detection algorithm achieves edge detection through dynamic gradient thresholding, and its mathematical expression is: in, High threshold; Low threshold; The mean of the gradient magnitude of the initial image of the archive; The standard deviation of the gradient magnitude of the initial image in the archive; The gradient magnitude mean weighting coefficient; The standard deviation of the gradient magnitude is the weighting coefficient. The high and low threshold ratio coefficients are used; the weighted Hough transform optimizes contour extraction by introducing boundary confidence weight factors, and its mathematical expression is: in, The accumulated value in the Hough space; These are the coordinates of the edge points; For the set of edge points; Boundary confidence weighting factor; It is the Dirac function; The distance from the origin to the line; Let be the angle between the line and the x-axis; further, the improved wavelet threshold denoising uses an adaptive soft threshold function to optimize the denoising effect, the mathematical expression of which is: in, Let be the wavelet decomposition coefficients, representing the frequency coefficients at the a-th layer and the b-th position; For the denoised wavelet coefficients, represent the frequency coefficients at the a-th layer and b-th position after denoising; is the dynamic threshold for the wavelet decomposition of the a-th level; It is a conforming function.

[0009] Furthermore, the tilt detection algorithm uses a weighted projection method to calculate the tilt angle by weighting the projection of text lines. The mathematical expression is: in, The optimal correction angle; This represents the maximum tilt angle; Image width; For angle Projection value in the lower x-direction; For projection weights.

[0010] Furthermore, the deep learning recognition model adopts a Transformer-based architecture. The Transformer architecture includes an input layer, a block embedding layer, a positional encoding layer, a Transformer encoder group, a cross-task feature fusion module, and an output layer. The input layer receives the corrected archival image. The block embedding layer divides the corrected archival image into image blocks of a set size and transforms each image block into a fixed-dimensional feature vector through convolution. The positional encoding layer uses learnable positional encoding to add spatial location information to the feature vectors to capture spatial relationships within the image. The Transformer encoder group contains six cascaded Transformer encoders, each composed of a multi-head self-attention mechanism and a feedforward neural network, used to extract deep shared features of the image. These deep shared features support text and table features. The cross-task feature fusion module is located between the Transformer encoder group and the output layer, used to receive text features, table features, and deep shared features, and fuse the three types of features. The output layer is a multi-task output structure, including text recognition and table recognition branches, used to decode the fused features to complete multi-type content classification and recognition.

[0011] Furthermore, the feature association mapping algorithm integrates text and tabular data through keyword matching and location association, and its mathematical expression is: in, Let represent the correlation between the i-th text keyword and the j-th table field; It is a semantic similarity function; Keywords for the text; For table fields; It is a spatial distance function; and The image coordinates are for the keywords and the table fields, respectively.

[0012] Furthermore, the image comparison algorithm employs feature point matching and grayscale histogram fusion, and its mathematical expression is: in, To match the similarity after fusion; Match feature points with similarity; Similarity of grayscale histograms; This is the fusion coefficient.

[0013] An image recognition-based automated scanning and digitization system for archives includes: an automated scanning module, an image algorithm module, an intelligent recognition module, an archive management module, and a central control module. The automated scanning module comprises a platform, an image acquisition unit, and a light source adjustment unit. The platform holds and supports the archives to be scanned. The image acquisition unit acquires initial and full-frame images of the archives. The light source adjustment unit adaptively adjusts the brightness, color temperature, and illumination angle of the scanning light source. The image algorithm module performs image boundary localization, image feature marking, image preprocessing, image correction, and image consistency verification. The intelligent recognition module performs multi-type content recognition and structured data integration. The archive management module associates and binds structured data with corrected archive images, performs automated archiving, and generates digitized archive indexes, supporting custom archive classification and naming conventions. The central control module coordinates the collaborative work of all modules.

[0014] Compared with the prior art, the beneficial effects of the present invention are: (1) The present invention adopts an improved Canny edge detection and weighted Hough transform composite algorithm, and through dynamic gradient threshold and boundary confidence weight factor, it breaks through the limitations of traditional algorithms that are easily affected by stains and creases, and realizes the accurate positioning of the physical boundary of the archive; (2) The present invention adopts an improved wavelet threshold denoising algorithm and a weighted projection tilt detection algorithm. The former achieves accurate denoising through an adaptive soft threshold function, and the latter accurately calculates the tilt angle through text line weighted projection. Combined with operations such as crease repair and contrast enhancement, it solves the problems of image blurring, tilting and noise residue in the prior art, and outputs a high-definition corrected image.

[0015] (3) This invention constructs a multi-task deep learning model based on the Transformer architecture. Through block embedding, learnable position encoding and cross-task feature fusion modules, it accurately extracts text and table features at the same time. Then, it uses the feature association mapping algorithm to realize the semantic and positional association between keywords and table fields, solving the pain points of text and table data being separated and having low structure in traditional technology, and generating highly correlated structured data. Attached Figure Description

[0016] Figure 1 is a flowchart of the image recognition-based automated scanning and digitization method for archives provided by the present invention; Figure 2 is a structural diagram of the Transformer architecture model used in the image recognition-based automated scanning and digitization method for archives provided by the present invention; Figure 3 is a structural diagram of the system modules of the image recognition-based automated scanning and digitization system for archives provided by the present invention. Detailed Implementation

[0017] The technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Please refer to Figures 1, 2 and 3 for a detailed explanation of the technical solutions provided in the various embodiments of this application.

[0019] As shown in Figure 1, this application embodiment provides a method for automated scanning and digitization of archives based on image recognition. Specific steps include: S1: Setting up an automated scanning device, placing the archive to be scanned on the automated scanning device, acquiring an initial image of the archive, performing edge detection and contour extraction on the initial image of the archive using an image recognition algorithm, automatically locating the physical boundaries of the archive, and simultaneously identifying and marking surface stains and creases of the archive; the image recognition algorithm is a composite algorithm of an improved Canny edge detection algorithm and a weighted Hough transform; the improved Canny edge detection algorithm achieves edge detection through a dynamic gradient threshold, and its mathematical expression is: in, High threshold; Low threshold; The mean of the gradient magnitude of the initial image of the archive; The standard deviation of the gradient magnitude of the initial image in the archive; The gradient magnitude mean weighting coefficient; The standard deviation of the gradient magnitude is the weighting coefficient. The ratio coefficient between the high and low thresholds; the parameter settings in the Canny edge detection algorithm are as follows: , , , =85 and =30; The implementation steps are as follows: Gaussian filtering is applied to the initial image, with a Gaussian kernel size of 5×5 and a standard deviation σ=1.4, to remove image noise and retain edge information; the Sobel operator is used to calculate the gradient magnitude of the initial image in the x-direction (horizontal) and y-direction (vertical). and gradient magnitude gradient direction ; Mean value of gradient magnitude of initial image in statistical archives Standard deviation of gradient magnitude from the initial image of the archive Substitute into the formula to calculate the high threshold. With low threshold ,get and ; Set the gradient magnitude to be greater than The pixels are marked as strong edges, between and The pixels between them are marked as weak edges, and only the weak edges connected to the strong edges are retained to form a complete file boundary outline.

[0020] The weighted Hough transform optimizes contour extraction by introducing a boundary confidence weight factor, and its mathematical expression is: in, The accumulated value in the Hough space; These are the coordinates of the edge points; For the set of edge points; Boundary confidence weighting factor; It is the Dirac function; The distance from the origin to the line; The angle between the line and the x-axis; the parameters of the weighted Hough transform are set as follows: boundary confidence weight factor. Calculated based on pixel gradient magnitude normalization Where max(G) is the maximum gradient magnitude of the image; the line and Axis angle The search range is [-90°, 90°], with a search step size of 0.1°; the distance from the origin to the line is... The search range is [0, √ ],in, Image width; Image height; search step size 1 pixel.

[0021] The implementation steps are as follows: Extract the edge point set E, and form the edge point set E with the edge point coordinates (x, y) obtained from the improved Canny edge detection; for each edge point (x, y), traverse the search range of θ and calculate the corresponding... According to the boundary confidence weighting factor Update Hough space accumulation value Set a threshold for the accumulated value in Hough space, and use the lines corresponding to (ρ,θ) in Hough space with accumulated values ​​greater than the threshold as candidate lines for the archive outline. Obtain the rectangular outline of the archive's physical boundary through line fitting, and output the boundary coordinates. , ), ( , ), ( , )and( , ( ) represents the coordinates of the four vertices of the rectangle.

[0022] Based on the edge detection results, stains and creases are identified and marked according to the following rules: For stain identification, within the boundary contour, connected regions with gray values ​​below 50, gray range of 0-255, and area greater than 50² pixels are detected and marked as stains, and their bounding rectangle coordinates and area are recorded.

[0023] For crease recognition, it detects elongated connected regions with a length greater than 100 pixels, a width less than 10 pixels, and a linear gradient in grayscale value. It then uses Hough line detection to fit the crease direction and marks the start and end coordinates and tilt angle of the crease.

[0024] S2: Determine the scanning range based on the physical boundaries of the archive. Combined with the characteristics of stains and creases on the marked archive surface, the automated scanning device adaptively adjusts the brightness, color temperature, and illumination angle of the scanning light source, simultaneously matching the scanning resolution and scanning speed parameters. Calculate the width of the scanning range based on the physical boundary coordinates of the archive obtained in S1. ,high To avoid missing edge information, the scanning range is extended by 5 pixels outside the boundary, resulting in a final scanning range of ( -5, -5) to ( +5, +5).

[0025] The stains and creases marked by S1 are read, and the number, distribution density, length and tilt angle of the stains and creases are counted to determine the degree of pollution and damage of the archive. In this embodiment, it is divided into three levels: light, moderate and heavy.

[0026] The light source adjustment module is used to adaptively adjust the brightness, color temperature, and illumination angle of the scanning light source; the adaptive parameter settings are shown in Table 1.

[0027] Table 1 Adaptive Parameter Settings S3: Based on the scanning range, scanning resolution, and scanning speed parameters, control the automated scanning device to scan the archive area by area to acquire a full-frame image of the archive. During the scanning process, image data of the scanned area is collected in real time, and image blurring and exposure problems are corrected in real time. According to the scanning range and scanning resolution, the archive is divided into several non-overlapping scanning areas, with the area size set to 512×512 pixels and adjacent areas overlapping by 5 pixels to avoid stitching gaps. Each area is scanned in order from left to right and from top to bottom, and area image data is collected. The scanned image of each area is analyzed in real time to detect whether there is blur or exposure abnormality. If blur is detected, the scanning speed is adjusted and the area is rescanned. If exposure abnormality is detected, the light source brightness is adjusted and the area is rescanned. If there are no problems, the area image is stored in a temporary folder. After all areas are scanned, an image stitching algorithm based on feature point matching is used to stitch the area images into a complete full-frame image of the archive. The stitching error is less than or equal to 1 pixel, and the storage format is TIFF.

[0028] S4: Preprocess the full-frame image of the archive by sequentially performing grayscale conversion, improved wavelet threshold denoising, crease repair, and contrast enhancement operations to obtain a clear archive image; identify the tilt angle of the clear archive image using a tilt detection algorithm, and perform automatic image correction based on the tilt angle to obtain a corrected archive image; perform grayscale conversion on the full-frame image of the archive using a weighted average method, with grayscale value Gray = 0.299 × R + 0.587 × G + 0.114 × B, resulting in a single-channel grayscale image and reducing the amount of data.

[0029] An improved wavelet threshold denoising method is used to denoise grayscale images, removing Gaussian noise and salt-and-pepper noise introduced during the scanning process while preserving the details of the archive content.

[0030] Based on the crease features marked by S1, an image inpainting algorithm is used to fill in the pixel information of the crease area, eliminating the impact of creases on subsequent recognition. An adaptive histogram equalization (CLAHE) algorithm is used to enhance image contrast and improve the distinction between text, tables, and background. A weighted projection tilt detection algorithm is used to identify the image's tilt angle. Based on the tilt angle, a bilinear interpolation algorithm is used to perform rotation correction on the image, obtaining a horizontally aligned corrected image. The signal-to-noise ratio (SNR), contrast ratio (CR), and edge preservation index (EPI) of the corrected image are calculated. If SNR ≥ 40dB, CR ≥ 1.2, and EPI ≥ 0.9, the preprocessing is considered successful; otherwise, the preprocessing process is repeated.

[0031] The improved wavelet threshold denoising uses an adaptive soft threshold function to optimize the denoising effect, and its mathematical expression is: in, Let be the wavelet decomposition coefficients, representing the frequency coefficients at the a-th layer and the b-th position; For the denoised wavelet coefficients, represent the frequency coefficients at the a-th layer and b-th position after denoising; is the dynamic threshold for the wavelet decomposition of the a-th level; It is a conforming function.

[0032] The improved wavelet thresholding denoising parameters are set as follows: the wavelet basis function is selected as db4 wavelet, the decomposition level a=3, and the image is decomposed into 3 levels of wavelet decomposition; the dynamic threshold for each level is... Through formula Calculate, where N is the total number of pixels in the image.

[0033] The implementation steps are as follows: Perform 3-level db4 wavelet decomposition on the grayscale image to obtain 1 low-frequency approximation coefficient (LL3) and 3 high-frequency detail coefficients (LH3, HL3, HH3; LH2, HL2, HH2; LH1, HL1, HH1).

[0034] An adaptive soft thresholding function is used to process the high-frequency detail coefficients of each layer. The mathematical expression is as follows: When , ;when , .

[0035] The processed high-frequency coefficients and low-frequency coefficients are subjected to db4 wavelet inverse decomposition to obtain the denoised image.

[0036] The image restoration algorithm steps are as follows: Determine the circumscribed rectangular region R of the crease based on the coordinates of the starting and ending points of the crease marked by S1 and the tilt angle.

[0037] Within region R, based on the grayscale characteristics of the crease, the grayscale value of the crease pixel is lower than that of the surrounding pixels, generating a binary mask where the crease region is 1 and other regions are 0.

[0038] The Criminisi algorithm is used, and the pixels in the crease area are filled in by texture synthesis, using the non-crease pixels around the crease area as samples. The repair window size is set to 9×9 pixels.

[0039] The parameters of the adaptive histogram equalization (CLAHE) algorithm are set as follows: the block size of CLAHE is 8×8 pixels, the contrast limit parameter ClipLimit=2.0, and the interpolation method is bilinear interpolation. The image is divided into small blocks of 8×8 pixels, the histogram of each small block is cropped, histogram equalization is performed, and finally the small blocks are stitched together by bilinear interpolation to avoid block artifacts.

[0040] The tilt detection algorithm uses a weighted projection method to calculate the tilt angle by weighting the projection of text lines. The mathematical expression is: in, The optimal correction angle; This represents the maximum tilt angle; Image width; For angle Projection value in the lower x-direction; For projection weights.

[0041] The parameters of the weighted projection tilt detection algorithm are set as follows: maximum tilt angle. =±5°, projection weight Using a Gaussian weighting function, .

[0042] The implementation steps are as follows: For the preprocessed clear image, within the range of θ∈[−5°, 5°], traverse each angle with a step size of 0.1° and calculate the angle. Projection value in the lower x direction ,in This represents the gray value at position (x, y) after rotating the image by an angle θ.

[0043] Calculate the sum of the projection values ​​at each angle. The angle with the largest sum is selected as the optimal correction angle. .

[0044] according to The image is rotated and corrected using a bilinear interpolation algorithm with the rotation center being the image center. The blank areas at the edges of the corrected image are filled with black (grayscale value 0), and the blank areas are cropped to obtain the corrected file image.

[0045] S5: Input the corrected archive image into a pre-trained deep learning recognition model to achieve multi-type content classification and recognition; perform word segmentation, semantic analysis, and format standardization on the recognized text; perform row and column positioning and data extraction on the table; and integrate the data into structured data through a feature association mapping algorithm; load the pre-trained deep learning recognition model based on the Transformer architecture onto the computing terminal. The model file includes a network structure configuration file (.json), a training weight file (.pth), and a category mapping file (.txt); scale the corrected archive image to the model input size of 640×640 pixels, perform normalization processing, and use it as the model input data; the model performs inference on the input image and outputs text region coordinates, text content, table region coordinates, table row and column information, and cell data; perform word segmentation, semantic analysis, and format standardization on the recognized text; perform row and column positioning on the recognized table, extract the text data of each cell, and standardize the table format; use a feature association mapping algorithm to establish the association between text keywords and table fields, integrate text data and table data, and form structured data.

[0046] Calculate the text recognition accuracy and the table data extraction accuracy.

[0047] The deep learning recognition model adopts a Transformer-based architecture. This architecture includes an input layer, a block embedding layer, a positional encoding layer, a Transformer encoder group, a cross-task feature fusion module, and an output layer, as shown in Figure 2. The input layer receives the correction archive image, which is a 640×640×1 grayscale image. The block embedding layer divides the input image into 16×16 pixel blocks and transforms each block into a 512-dimensional feature vector through a 3×3 convolution operation. The positional encoding layer uses learnable positional encoding to generate a 1600×512 positional encoding matrix, which is added to the block embedding feature vector to obtain a feature vector containing spatial location information. The Transformer encoder group consists of 6 cascaded Transformer encoders, each with the following parameters: Multi-head self-attention mechanism: number of heads = 8, dimension of each head = 64, dropout rate = 0.1; Feedforward neural network: hidden layer dimension = 2048, activation function is GELU, dropout rate = 0.1; Layer normalization: layer normalization (LayerNorm) is performed on the input and output to accelerate training convergence.

[0048] The cross-task feature fusion module receives text features, table features, and deep shared features, and fuses the three types of features using a weighted summation method. The fusion weights are learned through training, and the feature dimension after fusion is 512. The output layer adopts a multi-task output structure, which includes two branches: a text recognition branch, which uses a fully connected layer and a CTC (Connectionist Temporal Classification) decoding layer to output text content and text region coordinates.

[0049] Table recognition branch: Employs a fully connected layer and a bounding box regression layer to output the coordinates of the table area, the number of rows and columns, and the cell data.

[0050] The model training process is as follows: First, prepare the dataset by collecting images of corporate personnel files and labeling them in PASCALVOC format; randomly select some files from the training set as the validation set to monitor the training process; collect personnel file images that did not participate in the training as the test set to evaluate the model performance; set the ratio of training set: validation set: test set to 7:2:1.

[0051] The training parameters are set as follows: AdamW optimizer is used, learning rate = 1e-4, weight decay = 1e-5. =0.9, =0.999; The loss function used is the multi-task loss function. ,in For CTC loss in text recognition, The bounding box regression loss and classification loss are used for table recognition; the training batch size is 16, the number of training iterations is 100, and an early stopping strategy is used; during training, the input image is subjected to data augmentation operations such as random rotation, scaling, flipping, and Gaussian noise addition to improve the model's generalization ability.

[0052] During training, the weights of convolutional and fully connected layers are initialized using the Xavier normal distribution, while the weights of the positional encoding layer are randomly initialized. Training set images are input into the model in batches, the loss function value is calculated, and the model weights are updated through backpropagation. After each round of training, the text recognition accuracy and table recognition accuracy are calculated on the validation set, and the model weights with the best performance on the validation set are saved.

[0053] After model training, structured data is formed through the integration of data using a feature association mapping algorithm. This algorithm integrates text and tabular data through keyword matching and positional association; the mathematical expression is: in, Let represent the correlation between the i-th text keyword and the j-th table field; It is a semantic similarity function; Keywords for the text; For table fields; It is a spatial distance function; and The image coordinates are for the keywords and the table fields, respectively.

[0054] The specific implementation steps are as follows: Extract keywords from the standardized text using the TF-IDF algorithm to extract the Top 20 keywords; extract the column headers of the standardized table as table fields; calculate the semantic similarity between each keyword and a table field. Spatial distance Substitute the values ​​into a mathematical expression to calculate the correlation degree; set a correlation degree threshold. ,like ≥ Then it is believed ᵢ and Matching involves linking and integrating the text data corresponding to keywords with the data in the table fields.

[0055] The integrated data is organized in a preset format (JSON), including fields such as file number, name, gender, date of birth, education, date of employment, department, and position, forming structured data.

[0056] S6: Associate and bind the structured data and the corrected archive image; automatically archive the digital archive according to the preset archive classification and naming specifications; simultaneously verify the consistency between the digital archive and the initial archive image using an image comparison algorithm, and generate a digital archive index after the verification is passed.

[0057] Structured data is associated and bound to corresponding corrected archival images via archival numbers. Structured data is stored as JSON files, and corrected archival images are stored as TIFF files, with filenames in the format "archival number_structured data.json" and "archival number_corrected image.GIF". Following preset archival classification and naming conventions, the associated files are stored in a designated directory on the NAS storage server. Archival classification uses a three-level system of "year-department-archival type," and naming strictly adheres to the aforementioned filename format. An image comparison algorithm is used to verify the consistency between the digitized archive (corrected archival image) and the initial archival image, ensuring no content loss or tampering occurs during scanning and processing. After successful verification, the archiving management module generates a digitized archival index, including archival number, name, department, archiving time, storage path, and file size. The index data is stored in a MySQL database for fast retrieval. The system generates an archiving report containing information such as the number of archives, archiving success rate, and verification pass rate, providing feedback to operators. Simultaneously, the archiving results are synchronized to the enterprise's internal archival management system for data sharing.

[0058] The image comparison algorithm employs feature point matching and grayscale histogram fusion, and its mathematical expression is: in, To match the similarity after fusion; Match feature points with similarity; Similarity of grayscale histograms; This is the fusion coefficient.

[0059] The parameters for the image comparison algorithm are set as follows: fusion coefficient =0.7, the feature point matching similarity weight is 0.7, the grayscale histogram similarity weight is 0.3; the feature point matching uses the SIFT algorithm, the feature point detection threshold is 0.03, the matching threshold is 0.8; the number of bins in the grayscale histogram is 256.

[0060] The implementation steps are as follows: SIFT feature point detection is performed on both the initial and corrected archival images to extract the position, scale, orientation, and descriptors of the feature points; the KNN algorithm is used for feature point matching, retaining matching pairs with a matching distance less than a threshold; and the feature point matching similarity is calculated. =Number of matching pairs / Total number of feature points; Calculate the grayscale histograms of the two images respectively. and The similarity of gray-level histograms is calculated using Bhattacharyya distance. =exp(−d²), where d is the Bach distance; Substitute Calculate the similarity S after fusion; set a similarity threshold. =0.95. If S≥0.95, the digitized file is considered to be consistent with the initial image, and the verification passes; otherwise, the verification fails, and the system prompts the operator to rescan the file.

[0061] As shown in Figure 3, the system of the present invention includes an automated scanning module, an image algorithm module, an intelligent recognition module, an archive management module, and a central control module. The automated scanning module includes a platform, an image acquisition unit, and a light source adjustment unit. The platform is used to place the archives to be scanned and provide support. The image acquisition unit is used to acquire initial images and full-frame images of the archives. The light source adjustment unit is used to adaptively adjust the brightness, color temperature, and illumination angle of the scanning light source. The image algorithm module is used to perform image boundary positioning, image feature marking, image preprocessing, image correction, and image consistency verification. The intelligent recognition module is used to perform multi-type content recognition and structured data integration. The archive management module is used to associate and bind structured data with corrected archive images, automate archiving, and generate digital archive indexes, supporting custom archive classification and naming conventions. The central control module is used to coordinate the collaborative work of each module.

[0062] Under the coordination of the central control module, each module works collaboratively to achieve automated operation of the entire process of archive digitization. The specific collaborative process is as follows: After the central control module starts, it first performs initialization checks on each module and sends status query commands to the automated scanning module, image algorithm module, intelligent recognition module, and archive management module; after receiving the commands, each module returns its own working status and parameter configuration information.

[0063] The central control module verifies the status and parameters of each module. If all modules are in normal status and the parameter configurations are consistent, the initialization is complete and the system enters the ready state. If there is an abnormal module, the system issues an alarm prompt, and the operator troubleshoots the fault and then re-initializes.

[0064] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. An automated scanning and digitization method for archives based on image recognition, characterized in that, The method includes the following steps: S1: Setting up an automated scanning device, placing the archive to be scanned on the automated scanning device, acquiring an initial image of the archive, performing edge detection and contour extraction on the initial image of the archive using an image recognition algorithm, automatically locating the physical boundaries of the archive, and simultaneously identifying and marking surface stains and creases; S2: Determining the scanning range based on the physical boundaries of the archive, and combining the marked surface stains and creases, the automated scanning device adaptively adjusts the brightness, color temperature, and illumination angle of the scanning light source, synchronously matching the scanning resolution and scanning speed parameters; S3: Controlling the automated scanning device to scan the archive area by area according to the scanning range, scanning resolution, and scanning speed parameters, acquiring a full-frame image of the archive, acquiring image data of the scanned area in real time during the scanning process, and correcting image blur and exposure problems in real time; S4: Processing the full-frame image of the archive... Preprocessing is performed sequentially, including grayscale conversion, improved wavelet threshold denoising, crease repair, and contrast enhancement, to obtain a clear archival image. A tilt detection algorithm is used to identify the tilt angle of the clear archival image, and automatic image correction is performed based on this tilt angle to obtain a corrected archival image. S5: The corrected archival image is input into a pre-trained deep learning recognition model to achieve multi-type content classification and recognition. The recognized text is segmented, semantically analyzed, and formatted. The table is row and column located and data extracted. These are then integrated using a feature association mapping algorithm to form structured data. S6: The structured data and the corrected archival image are associated and bound. The digitized archives are automatically archived according to preset archive classification and naming standards. Simultaneously, an image comparison algorithm is used to verify the consistency between the digitized archives and the initial archive image. Upon successful verification, a digitized archive index is generated.

2. The automated scanning and digitization method for archives based on image recognition according to claim 1, characterized in that, The automated scanning device includes an image acquisition module, a platform, and a light source adjustment module; the image acquisition module is used to acquire initial images and full-frame images of the archives; the platform is used to place the archives to be scanned and provide support; the light source adjustment module is used to adaptively adjust the brightness, color temperature, and illumination angle of the scanning light source.

3. The automated scanning and digitization method for archives based on image recognition according to claim 1, characterized in that, The image recognition algorithm is a composite algorithm of the improved Canny edge detection algorithm and the weighted Hough transform; the improved Canny edge detection algorithm achieves edge detection through dynamic gradient thresholding, and its mathematical expression is: in, High threshold; Low threshold; The mean of the gradient magnitude of the initial image of the archive; The standard deviation of the gradient magnitude of the initial image in the archive; The gradient magnitude mean weighting coefficient; The standard deviation of the gradient magnitude is the weighting coefficient. The high and low threshold ratio coefficients are used; the weighted Hough transform optimizes contour extraction by introducing boundary confidence weight factors, and its mathematical expression is: in, The accumulated value in the Hough space; These are the coordinates of the edge points; For the set of edge points; Boundary confidence weighting factor; It is the Dirac function; The distance from the origin to the line; The angle between the line and the x-axis.

4. The automated scanning and digitization method for archives based on image recognition according to claim 1, characterized in that, The improved wavelet threshold denoising uses an adaptive soft threshold function to optimize the denoising effect, and its mathematical expression is: in, Let be the wavelet decomposition coefficients, representing the frequency coefficients at the a-th layer and the b-th position; For the denoised wavelet coefficients, represent the frequency coefficients at the a-th layer and b-th position after denoising; is the dynamic threshold for the wavelet decomposition of the a-th level; It is a conforming function.

5. The automated scanning and digitization method for archives based on image recognition according to claim 1, characterized in that, The tilt detection algorithm uses a weighted projection method to calculate the tilt angle by weighting the projection of text lines. The mathematical expression is: in, The optimal correction angle; This represents the maximum tilt angle. Image width; For angle Projection value in the lower x-direction; For projection weights.

6. The automated scanning and digitization method for archives based on image recognition according to claim 1, characterized in that, The deep learning recognition model adopts a Transformer-based architecture; the Transformer architecture includes an input layer, a block embedding layer, a positional encoding layer, a Transformer encoder group, a cross-task feature fusion module, and an output layer.

7. The automated scanning and digitization method for archives based on image recognition according to claim 6, characterized in that, The input layer receives the corrected archival image; the block embedding layer divides the corrected archival image into image blocks of a set size, and transforms each image block into a fixed-dimensional feature vector through convolution operations; the positional encoding layer uses learnable positional encoding to add spatial positional information to the feature vector to capture spatial correlations in the image; the Transformer encoder group contains six cascaded Transformer encoders, each consisting of a multi-head self-attention mechanism and a feedforward neural network, used to extract deep shared features of the image; these deep shared features provide support for text features and table features; The cross-task feature fusion module is located between the Transformer encoder group and the output layer. It is used to receive text features, table features and deep shared features, and fuse the three types of features. The output layer is a multi-task output structure, which includes a text recognition branch and a table recognition branch. It is used to decode the fused features to complete the classification and recognition of multiple types of content.

8. The automated scanning and digitization method for archives based on image recognition according to claim 1, characterized in that, The feature association mapping algorithm integrates text and tabular data through keyword matching and location association. The mathematical expression is: in, Let represent the correlation between the i-th text keyword and the j-th table field; It is a semantic similarity function; Keywords for the text; For table fields; It is a spatial distance function; and The image coordinates are for the keywords and the table fields, respectively.

9. The automated scanning and digitization method for archives based on image recognition according to claim 1, characterized in that, The image comparison algorithm employs feature point matching and grayscale histogram fusion, and its mathematical expression is: in, To match the similarity after fusion; Match feature points with similarity; Similarity of grayscale histograms; This is the fusion coefficient.

10. An automated document scanning and digitization system based on image recognition, characterized in that, The system comprises: an automated scanning module, an image algorithm module, an intelligent recognition module, an archive management module, and a central control module. The automated scanning module includes a platform, an image acquisition unit, and a light source adjustment unit. The platform is used to place and support the archives to be scanned. The image acquisition unit acquires initial and full-frame images of the archives. The light source adjustment unit adaptively adjusts the brightness, color temperature, and illumination angle of the scanning light source. The image algorithm module performs image boundary localization, image feature marking, image preprocessing, image correction, and image consistency verification. The intelligent recognition module performs multi-type content recognition and structured data integration. The archive management module associates and binds structured data with corrected archive images, performs automated archiving, and generates digitized archive indexes, supporting custom archive classification and naming conventions. The central control module coordinates the collaborative work of all modules.