A fixed format archive automatic registration method, device, medium and product

By using deep learning object detection models and image preprocessing techniques, the problem of inaccurate field area positioning in digital archive management has been solved, achieving high-precision field recognition and reliability of archive data, thereby improving the efficiency and accuracy of archive management.

CN122154637APending Publication Date: 2026-06-05BEIJING RONGANTE INTELLIGENT TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING RONGANTE INTELLIGENT TECH CO LTD
Filing Date
2026-02-10
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In the current technology for digital archival management, the optical character recognition process suffers from insufficient field area positioning accuracy, leading to positioning deviations, loss of key character information or recognition errors, and affecting the accuracy of archival record data.

Method used

Standardized images are generated using image preprocessing techniques, and multiple candidate bounding boxes are generated using a deep learning object detection model. The optimal bounding box is selected by confidence score, and a weighted fusion mechanism combining geometric and location priors is used to ensure the accuracy of field boundary positioning. Combined with protective cropping and format verification, field recognition results that conform to the specifications are generated.

Benefits of technology

It significantly improves the accuracy of field boundary positioning, ensures the integrity of character recognition and the accuracy of archival record data, and improves the efficiency and data quality of digital archival management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122154637A_ABST
    Figure CN122154637A_ABST
Patent Text Reader

Abstract

An automatic fixed format archive registration method, device, medium and product. In the method, an image preprocessing operation is performed on a digital image of an archive to be registered to obtain a standardized image; the standardized image is input into a field positioning model to obtain a plurality of candidate positioning boxes and confidence scores corresponding to a plurality of target field regions respectively; based on the confidence scores, the candidate positioning boxes are determined, and corresponding spatial position coordinates are obtained; a field sub-image is cropped from the standardized image according to the spatial position coordinates; optical character recognition processing is performed on the field sub-image to obtain preliminary recognized text; format verification and format conversion processing are performed on the preliminary recognized text to generate a field recognition result; and based on a field mapping relationship, structured registration data is generated. The technical scheme provided in the application guarantees the overall accuracy and reliability of the archive registration data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of intelligent archival processing technology, specifically to a method, equipment, medium, and product for automatic recording of fixed-format archives. Background Technology

[0002] In the field of digital archival management, to improve the efficiency of cataloging work, existing technologies typically employ optical character recognition (OCR) to automatically process fixed-format archival images. In a common automated workflow, the system first uses template matching or conventional object detection models to locate preset key fields such as file number, title, and date in the archival image. Then, it performs text recognition on the located areas and finally fills the recognized text content into the corresponding database fields.

[0003] However, existing technologies generally suffer from insufficient positioning accuracy when locating field areas. Because the digitized images of archives inevitably contain issues such as printing position offsets, paper misalignment, or scanning scaling distortions, conventional positioning methods struggle to accurately define the complete boundaries of each field. This positioning deviation can easily lead to incomplete field cropping, resulting in the loss or misidentification of critical character information, ultimately directly impacting the overall accuracy of the archival data. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a method, apparatus, medium, and product for automatically recording fixed-format archives.

[0005] The first aspect of this application provides a method for automatically recording fixed-format archives, employing the following technical solution: Perform image preprocessing on the digitized images of the archives to be cataloged to obtain standardized images; The standardized image is input into a preset field localization model to obtain multiple candidate localization boxes and confidence scores corresponding to multiple target field regions in the standardized image. Each target field region corresponds to multiple candidate localization boxes, and each candidate localization box corresponds to a confidence score. Based on the confidence score, the candidate bounding box with the highest confidence score in each target field region is determined, and the spatial coordinates corresponding to the candidate bounding box with the highest confidence score are obtained. Based on the spatial location coordinates, field sub-images corresponding to multiple target field regions are cropped from the standardized image; Perform optical character recognition processing on the field sub-image to obtain preliminary recognized text; Based on the preset field type attributes, the initially identified text is subjected to format verification and format conversion processing to generate field recognition results that conform to the preset bibliographic format specifications; Based on the preset field mapping relationship, the field recognition results are filled into the corresponding field positions of the structured catalog form to generate structured catalog data.

[0006] By adopting the above technical solution, multiple candidate positioning boxes are generated for each target field area, and the optimal box is selected based on the confidence score. This effectively overcomes positioning deviations caused by printing offset, paper skew, or scanning deformation. This method significantly improves the positioning accuracy of field boundaries, ensures complete subsequent cropping, avoids information loss, thereby improving the accuracy of optical character recognition and ultimately guaranteeing the overall accuracy and reliability of archival data.

[0007] Optionally, the step of inputting the standardized image into a preset field localization model to obtain multiple candidate localization boxes and confidence scores corresponding to each of the multiple target field regions in the standardized image includes: The standardized image is input into the feature extraction backbone network in the field localization model. The standardized image is then forward-computed through multiple convolutional and pooling layers of the feature extraction backbone network to generate a multi-scale feature map. The multi-scale feature map is input into the detection head network in the field localization model. The detection head network parses the multi-scale feature map at multiple preset anchor positions to generate a set of original prediction boxes and a set of original confidence scores corresponding to the anchor positions. The set of original predicted boxes is traversed, and the original confidence score corresponding to each original predicted box is compared with a preset confidence threshold. Original predicted boxes with a confidence score greater than the confidence threshold are selected as multiple candidate localization boxes, and the confidence scores corresponding to the multiple candidate localization boxes are retained.

[0008] By employing the above technical solutions, field features of different sizes and shapes in archival images can be effectively captured, enhancing the model's adaptability to scale and deformation. The detection head network performs parsing based on preset anchor points, improving the targeting and efficiency of localization. Filtering candidate boxes using a confidence threshold eliminates low-quality predictions, ensuring the reliability of the output localization boxes.

[0009] Optionally, the step of inputting the multi-scale feature map into the detection head network of the field localization model, and having the detection head network parse the multi-scale feature map at multiple preset anchor positions to generate an original set of predicted bounding boxes and an original set of confidence scores corresponding to the anchor positions, includes: The multi-scale feature maps are respectively input into the classification subnetwork and regression subnetwork connected in parallel in the detection head network; Based on the classification subnetwork, convolution calculation is performed on the multi-scale feature map to generate the field existence probability for each anchor point position, and the field existence probability is used as the original confidence score set; The regression subnetwork performs convolution calculations on the multi-scale feature map to generate bounding box offsets for each anchor point position, and calculates the original set of predicted boxes based on the bounding box offsets and the initial geometric coordinates of the anchor point positions.

[0010] By employing the above technical solution, the parallel classification and regression sub-networks in the detection head network achieve task decoupling and collaboration. The classification sub-network focuses on determining the existence of fields, ensuring the reliability of the screening; the regression sub-network calculates fine-grained bounding box offsets rather than directly predicting coordinates, achieving progressive and precise adjustment of the geometric position based on preset anchor points. This division of labor effectively improves the model's ability to capture changes in field position and scale, enhancing the adaptability of the localization box under different deformation conditions and the final localization accuracy.

[0011] Optionally, determining the candidate bounding box with the highest confidence score in each target field region based on the confidence score, and obtaining the spatial coordinates corresponding to the candidate bounding box with the highest confidence score, includes: Based on the field category identifier associated with each of the candidate bounding boxes, the candidate bounding boxes and their corresponding confidence scores are respectively divided into multiple target field groups corresponding to the multiple target field regions; Traverse all the target field groups, and for each candidate positioning box in the target field group, determine the geometric fitness score and the position prior score respectively. The geometric fitness score represents the degree of matching between the geometric aspect ratio of the candidate positioning box and the preset aspect ratio range of the target field region, and the position prior score represents the degree of deviation between the center position of the candidate positioning box and the preset anchor point region of the target field region. For each candidate bounding box, a weighted fusion calculation is performed on the confidence score, the geometric fitness score, and the location prior score based on preset fusion weights to generate a comprehensive evaluation score; Within each target field group, the candidate location box with the highest comprehensive evaluation score is selected as the final location box, and the geometric data of the final location box is extracted as the spatial location coordinates.

[0012] By adopting the above technical solution, a multi-factor weighted fusion evaluation mechanism is constructed by comprehensively considering confidence level, geometric matching degree, and prior location information. This avoids geometric or location anomalies that may occur if the recognition confidence level is relied upon alone, ensuring that the final selected location box achieves optimal shape, position, and recognition reliability, thereby further improving the accuracy and robustness of field positioning under complex layout conditions.

[0013] Optionally, the step of cropping field sub-images corresponding to multiple target field regions from the standardized image based on the spatial location coordinates includes: For each target field region, the spatial location coordinates are parsed to obtain the upper left and lower right corner coordinates of the target field region in the standardized image; Based on the preset extended pixel values, subtraction is performed on the x-coordinate and y-coordinate of the top-left corner coordinate, and addition is performed on the x-coordinate and y-coordinate of the bottom-right corner coordinate, to determine the extended top-left corner coordinate and extended bottom-right corner coordinate of the extended cropping area. Based on the extended upper left corner coordinates and the extended lower right corner coordinates, image data within the extended cropping area is cropped from the standardized image, and the image data is used as the field sub-image of the target field region.

[0014] By employing the above technical solution, protective cropping of field boundaries is achieved. This effectively accommodates extremely subtle positioning deviations or scanning distortions, ensuring that the field sub-image fully contains the target character and its necessary surrounding context, avoiding damage to character strokes due to overly tight cropping. This provides a more reliable and complete input image for subsequent optical character recognition, thereby further guaranteeing the accuracy of the final text recognition result.

[0015] Optionally, the step of performing format verification and format conversion processing on the initially identified text according to preset field type attributes to generate field recognition results that conform to preset bibliographic format specifications includes: For any target field region among the multiple target field regions, extract a preset validation regular expression and a preset format conversion mapping table corresponding to any target field region from the preset field type attribute; Obtain the preliminary identified text corresponding to any of the target field regions, and perform format matching processing on the preliminary identified text according to the validation regular expression; When the initially identified text does not conform to the validation regular expression, character replacement and structural recombination are performed on the initially identified text based on the format conversion mapping table to generate converted text, and the validation regular expression is applied again to perform format matching processing on the converted text; The preliminary identified text or the converted text processed by format matching is determined as the field identification result corresponding to any of the target field regions.

[0016] By adopting the above technical solutions, automated formatting of the initially identified text was achieved. Regular expression validation accurately determines format compliance, while mapping table-driven character replacement and structural reorganization effectively correct common recognition errors. This process not only improves the consistency between the final output text of each field and the preset bibliographic format specifications, but also further compensates for potential deviations in the early recognition through rule-based post-processing, thereby enhancing the overall standardization and usability of the bibliographic data.

[0017] Optionally, the step of filling the field recognition results into the corresponding field positions of the structured cataloging form based on a preset field mapping relationship to generate structured cataloging data includes: Iterate through all the field recognition results and, based on the field mapping relationship, automatically fill each field recognition result into the corresponding field of the structured catalog form; Perform final data verification on the completed structured catalog form. The final data verification includes verifying the field data format and logical relationship between fields in the structured catalog form according to preset cataloging rules. When the final data verification passes, the structured catalog form is associated and bound with the storage path of the digitized image of the archive and the spatial location coordinates of the recognition result of each field, and the structured catalog data containing the associated binding is solidified and generated.

[0018] By adopting the above technical solutions, automated and accurate filling of recognition results is achieved, improving the efficiency of cataloging. Final data verification ensures that the data format of each field is compliant and logically consistent, effectively guaranteeing the overall quality and internal consistency of the cataloged data. The structured form, original image path, and field coordinates are associated, bound, and fixed in the output, giving the cataloging results complete traceability evidence.

[0019] A second aspect of this application provides an electronic device including a processor, a memory, a user interface, and a network interface, wherein the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any of the foregoing.

[0020] A third aspect of this application provides a computer-readable storage medium storing instructions that, when executed, perform the method described in any of the preceding descriptions.

[0021] A fourth aspect of this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the method as described in any of the preceding claims.

[0022] In summary, one or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: A detection network employing multi-scale feature extraction and task decoupling achieves high-precision field localization in deformed and offset images. A weighted filtering mechanism integrating geometric and positional priors ensures the robustness of the localization boxes. Protective cropping and rule-based post-processing guarantee the integrity of character recognition and the standardization of data format. Finally, automated filling, logical verification, and association binding generate high-quality, traceable, structured cataloging data. This solves problems such as inaccurate localization, recognition errors, and non-standardized data caused by page deformation, improving the efficiency, accuracy, and management depth of archival digitization. Attached Figure Description

[0023] Figure 1 This is a schematic diagram of the system architecture of an embodiment of the fixed-format archive automatic cataloging method of this application; Figure 2 This is a flowchart illustrating a fixed-format file automatic recording method disclosed in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of an electronic device disclosed in an embodiment of this application.

[0024] Explanation of reference numerals in the attached figures: 100, System architecture; 101, First terminal device; 102, Second terminal device; 103, Third terminal device; 104, Network; 105, Server; 301, Processor; 302, Communication bus; 303, User interface; 304, Network interface; 305, Memory. Detailed Implementation

[0025] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0026] In the description of the embodiments of this application, the words "for example" or "for instance" are used to indicate examples, illustrations, or explanations. Any embodiment or design that is described as "for example" or "for instance" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Rather, the use of the words "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0027] In the description of the embodiments of this application, the term "multiple" means two or more. For example, multiple systems means two or more systems, and multiple screen terminals means two or more screen terminals. Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0028] Figure 1 This is a schematic diagram of the system architecture of an embodiment of the fixed-format automatic cataloging method of this application.

[0029] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0030] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as model training applications, video recognition applications, web browser applications, social platform software, etc.

[0031] Terminal devices 101, 102, and 103 can be either hardware or software. When terminal devices 101, 102, and 103 are hardware, they can be various electronic devices with displays, including but not limited to smartphones, tablets, e-book readers, MP3 (Moving Picture Experts Group Audio Layer III) players, MP4 (Moving Picture Experts Group Audio Layer IV) players, laptops, and desktop computers, etc. When terminal devices 101, 102, and 103 are software, they can be installed in the aforementioned electronic devices. They can be implemented as multiple software programs or software modules (e.g., multiple software programs or software modules used to provide distributed services) or as a single software program or software module. No specific limitations are imposed here.

[0032] This embodiment discloses a method for automatically recording fixed-format archives. Figure 2 This is a flowchart illustrating a fixed-format file automatic cataloging method disclosed in an embodiment of this application, as shown below. Figure 2 As shown, the method includes the following steps: S201. Perform image preprocessing on the digitized images of the archives to be cataloged to obtain standardized images; In this embodiment, step S201 aims to perform a series of preprocessing operations on the digitized image of the archive to be cataloged, in order to generate a standardized image with clear content and proper layout, providing reliable input for subsequent high-precision field positioning and OCR (Optical Character Recognition). This preprocessing operation may include several sub-steps. First, the system performs tilt correction. For example, Hough transform can be used to detect the main text lines or table borders in the image, thereby calculating the overall tilt angle of the image and performing rotation correction. As an alternative implementation, projection contour analysis of the image in the horizontal and vertical directions, or spectral features based on Fourier transform, can also be used to determine and correct the tilt.

[0033] Furthermore, to eliminate noise introduced during scanning and enhance image contrast, the system can subsequently perform denoising and enhancement processing. One specific implementation is to use Gaussian filtering to smooth the image and suppress random noise. As an alternative, for specific noise types, such as salt-and-pepper noise, a median filter can be used to achieve better denoising results; if it is necessary to better preserve the edge details of the characters while denoising, a bilateral filter can be used. Finally, to effectively address potential uneven illumination in the original image, the system can apply an adaptive binarization algorithm, dynamically setting thresholds based on the local brightness characteristics of different regions of the image, thereby converting the image into a standardized image with clear black and white contrast and sharp characters, laying a solid foundation for the accurate execution of subsequent steps.

[0034] S202. Input the standardized image into a preset field localization model to obtain multiple candidate localization boxes and confidence scores corresponding to multiple target field regions in the standardized image. Each target field region corresponds to multiple candidate localization boxes, and each candidate localization box corresponds to a confidence score.

[0035] In this embodiment, the core task of step S202 is to use a preset field localization model to intelligently analyze the standardized image in order to initially identify the possible locations of the target fields. The preset field localization model is preferably a deep learning object detection model, such as the widely used YOLOv8 model. This model needs to be pre-trained on a dataset containing a large number of labeled fixed-format archive images. The labeling information includes the category of the target fields such as document number and title, as well as their precise bounding box coordinates. When the standardized image is input into this trained model, the image data first flows through the model's feature extraction backbone network, such as a CNN (Convolutional Neural Network). This network, through forward computation of multiple convolutional and pooling layers, can extract multi-scale feature maps containing rich detailed information and high-level semantic information from the image.

[0036] Furthermore, these multi-scale feature maps are fed into the model's detection head network for parsing. The detection head network performs parallel computation at numerous preset anchor points in these feature maps, generating a large number of raw predictions for each location. Specifically, it simultaneously predicts the probability that a specific category of target field exists at that location, which is the confidence score; and a bounding box coordinate used to precisely define the field boundary. Due to this generation mechanism, the model outputs multiple raw predictions with similar locations and different scores for a single target field region (e.g., the "title" region). Finally, the system performs preliminary screening of all raw predictions using a preset confidence threshold (e.g., 0.3), retaining predictions with scores higher than the threshold, thereby obtaining multiple candidate bounding boxes and their corresponding confidence scores for each target field region in the standardized image.

[0037] Optionally, the step of inputting the standardized image into a preset field localization model to obtain multiple candidate localization boxes and confidence scores corresponding to multiple target field regions in the standardized image includes: inputting the standardized image into the feature extraction backbone network in the field localization model, performing forward computation on the standardized image through multiple convolutional and pooling layers of the feature extraction backbone network to generate a multi-scale feature map; inputting the multi-scale feature map into the detection head network in the field localization model, parsing the multi-scale feature map at multiple preset anchor positions through the detection head network to generate a set of original prediction boxes and a set of original confidence scores corresponding to the anchor positions; traversing the set of original prediction boxes, comparing the original confidence score corresponding to each original prediction box with a preset confidence threshold, and selecting original prediction boxes that are greater than the confidence threshold as multiple candidate localization boxes, and retaining the confidence scores corresponding to the multiple candidate localization boxes.

[0038] Specifically, the standardized image is input into the feature extraction backbone network within the field localization model. In this embodiment, the backbone network can be a deep convolutional neural network, such as the CSPDarknet architecture used in the YOLOv8 model, or other mature backbone networks like ResNet (Residual Network). When image data is fed forward through this backbone network, it passes through multiple convolutional and pooling layers sequentially. The convolutional layers are responsible for extracting local visual features (such as edges, corners, and textures) from the image, while the pooling layers are used to reduce the dimensionality of the feature maps and expand the receptive field. By outputting feature maps at different depths of the network, the system can generate a multi-scale feature map. The shallow feature map has a higher resolution and retains rich spatial detail information, making it suitable for detecting small-sized fields; the deep feature map has a lower resolution but stronger semantic information, making it suitable for detecting large-sized fields. This multi-scale design enables the model to effectively capture target field features of various sizes and shapes in archival images.

[0039] Furthermore, the multi-scale feature maps generated in the previous step are input into the detection head network in the field localization model. The core task of this detection head network is to parse these feature maps at preset anchor point locations to generate preliminary detection results. Anchor points are a predefined set of rectangular boxes with different sizes and aspect ratios, densely distributed at every spatial location of the feature maps as a benchmark reference for detection. The detection head network makes predictions for each anchor point. Specifically, based on the feature vector at the anchor point's location, it calculates two key pieces of information: first, the original confidence score, which represents the probability that the current anchor point box contains any category of target field; and second, the bounding box adjustment parameters, used to fine-tune the geometry of the anchor point to better fit the actual target field. By performing such calculations on all anchor points, the system generates a massive set of original predicted bounding boxes corresponding to these anchor point locations, along with a corresponding set of original confidence scores.

[0040] Furthermore, the system needs to filter out candidates with high probability from the massive amount of raw predictions. To do this, the system iterates through the set of raw prediction boxes generated in the previous step and obtains the corresponding raw confidence score for each box. Then, the system compares this confidence score with a preset confidence threshold (for example, this threshold can be set empirically to 0.3, 0.5, or other suitable values). If the confidence score of an raw prediction box is greater than the threshold, it indicates that the prediction box has a high probability of correctly selecting a target field, and therefore it is determined to be a valid candidate box and retained for subsequent processing; conversely, if its confidence score is not greater than the threshold, it is considered that it likely corresponds to a background area or is a highly unreliable prediction and should be discarded. Through this initial screening based on confidence, the system can efficiently filter out the vast majority of invalid predictions, thereby concentrating computational resources on more valuable candidate boxes.

[0041] Optionally, the step of inputting the multi-scale feature map into the detection head network of the field localization model, and having the detection head network parse the multi-scale feature map at multiple preset anchor positions to generate an original set of predicted bounding boxes and an original set of confidence scores corresponding to the anchor positions, includes: inputting the multi-scale feature map into a classification sub-network and a regression sub-network connected in parallel in the detection head network; performing convolution calculations on the multi-scale feature map based on the classification sub-network to generate a field existence probability for each anchor position, and using the field existence probability as the original set of confidence scores; performing convolution calculations on the multi-scale feature map based on the regression sub-network to generate a bounding box offset for each anchor position, and calculating the original set of predicted bounding boxes based on the bounding box offset and the initial geometric coordinates of the anchor position.

[0042] As a more specific implementation of the above embodiment, the detection head network can be designed as a parallel structure, inputting the multi-scale feature map in parallel into a classification sub-network and a regression sub-network. Specifically, the main responsibility of the classification sub-network is to determine whether the target field exists at each anchor point. After the multi-scale feature map is input, the classification sub-network performs a series of convolutional calculations on it, such as further refining the features through several 3x3 convolutional layers, and finally mapping the feature dimension to the number of channels matching the number of categories (in this scenario, it can be a single field category) through a 1x1 convolutional layer. Finally, a sigmoid activation function is usually used to normalize the output value to between 0 and 1. This output value represents the probability that the model predicts the existence of a field at the current anchor point. This probability value is directly used as the original confidence score corresponding to the anchor point and is collected to form the original confidence score set.

[0043] Meanwhile, the regression subnetwork, working in parallel with the classification subnetwork, is responsible for accurately predicting the geometric boundaries of the target field. Similar to the classification subnetwork, when the multi-scale feature map is input, the regression subnetwork also performs a series of convolution calculations on it, but its final output is a set of bounding box offsets. Specifically, for each anchor point position, the regression subnetwork outputs four values, representing the x-coordinate offset, y-coordinate offset, and scaling factor of the predicted box's width and height. The system then uses these predicted offsets, combined with the initial geometric coordinates of the corresponding anchor point position itself (i.e., the center point coordinates, width, and height of the anchor box), to perform calculations using a pre-defined decoding function, thereby decoding the final original predicted box coordinates. For example, the center x-coordinate of the predicted box can be calculated by adding the x-direction offset (usually multiplied by the width of the anchor box as a scaling factor) to the center x-coordinate of the anchor box. By performing this operation on all anchor points, the system calculates the complete set of original predicted boxes.

[0044] S203. Based on the confidence score, determine the candidate location box with the highest confidence score in each target field region, and obtain the spatial location coordinates corresponding to the candidate location box with the highest confidence score; After obtaining the initial candidate bounding boxes, the system may generate multiple overlapping candidate predictions for the same target field. To extract a unique and optimal bounding box for each independent target field from these redundant candidates, this embodiment preferably employs an algorithm called Non-Maximum Suppression (NMS). The core idea of ​​this algorithm is to retain only the box with the highest confidence score among a set of overlapping candidate boxes that detect the same target, and suppress (i.e., delete) all other boxes that significantly overlap with it. Through this mechanism, the system can efficiently refine a dense set of candidate boxes into a sparse, precise, and mutually separated set of final bounding boxes, where each box is the best prediction for the target field region it represents.

[0045] Specifically, the execution process of the NMS algorithm can be described as follows: First, all candidate bounding boxes are grouped according to the predicted target field category (e.g., title, document number, etc.), and the candidate boxes within each group are sorted from highest to lowest confidence score. Then, the algorithm iteratively processes the candidate box with the highest score, selecting it as the baseline box and adding it to the final result list. Next, the IoU (Intersection over Union) between all other candidate boxes in the group and the baseline box is calculated—that is, the ratio of the intersection area to the union area of ​​the two boxes. If the IoU value between a candidate box and the baseline box is greater than a preset threshold (e.g., 0.5), the candidate box is considered redundant and suppressed. This process selects a new highest-scoring box from the remaining unsuppressed candidate boxes as the baseline, and repeats iteratively until all candidate boxes in the group have been processed. The boxes that are ultimately retained are the candidate bounding boxes with the highest confidence scores in each target field region. The system can then extract their spatial coordinates (e.g., the pixel coordinates of the top left and bottom right corners) for subsequent processing.

[0046] Optionally, determining the candidate bounding box with the highest confidence score in each target field region based on the confidence score, and obtaining the spatial coordinates corresponding to the candidate bounding box with the highest confidence score, includes: classifying the multiple candidate bounding boxes and their corresponding confidence scores into multiple target field groups corresponding to the multiple target field regions according to the field category identifiers associated with each of the multiple candidate bounding boxes; traversing all the target field groups, and for each candidate bounding box within the target field group, determining the geometric fitness score and the location prior score, wherein the geometric fitness score table The method of evaluating a candidate bounding box is to determine the degree of matching between its geometric aspect ratio and the preset aspect ratio range of the target field region. The prior location score represents the degree of deviation between the center position of the candidate bounding box and the preset anchor point region of the target field region. For each candidate bounding box, a weighted fusion calculation is performed on the confidence score, the geometric fitness score, and the prior location score based on a preset fusion weight to generate a comprehensive evaluation score. Within each target field group, the candidate bounding box with the highest comprehensive evaluation score is selected as the final bounding box, and the geometric data of the final bounding box is extracted as the spatial location coordinates.

[0047] Specifically, the system groups hundreds or thousands of candidate bounding boxes and their corresponding raw confidence scores based on the field category identifiers associated with each candidate bounding box (e.g., labels predicted by the model such as title, file number, and retention period). Each group corresponds to a unique target field region. For example, all candidate bounding boxes identified as titles and their scores are grouped into the title target field group, and so on, thus laying the foundation for subsequent targeted evaluation and screening.

[0048] Furthermore, to introduce structured prior knowledge to improve localization accuracy, the system needs to calculate additional evaluation dimensions for candidate bounding boxes within each group. Specifically, the system assigns a geometric fitness score and a location prior score to each candidate box. The geometric fitness score quantifies whether the shape of the candidate box conforms to common sense. For example, a reasonable aspect ratio range (e.g., 3:1 to 10:1) can be preset for the title field. After calculating the actual aspect ratio of the candidate box, if it falls within this preset range, it will receive a higher score (e.g., 1.0); if it deviates from this range, the score will decrease accordingly based on the degree of deviation. The location prior score is used to evaluate whether the location of the candidate box is reasonable. For example, the upper 1 / 3 of the archival image can be defined as the preset anchor point region for the title field. The system generates a location prior score by calculating the distance between the center point of the candidate box and this anchor point region; the closer the distance, the higher the score. These two scores can be specifically calculated using preset functions (e.g., Gaussian function or piecewise function), so that candidate boxes with shapes or locations that better conform to expectations receive higher evaluations.

[0049] In a specific example, if the preset aspect ratio range of the title field is [8, 12], and the center is located at 10 within this range, and the actual aspect ratio of a candidate box is 9.5, then its geometric fitness score can be calculated using normalized distance, for example, 1 - |9.5 - 10| / (12 - 8) = 0.875. Similarly, if the preset anchor point region of the title field is the interval [0.1, 0.2] in the vertical direction of the image, and the center y-coordinate of a candidate box is 0.18, then its positional prior score can be calculated as 1 - |0.18 - 0.15| / 0.05 = 0.4, where 0.15 is the region center and 0.05 is the region half-width. By providing such specific and quantifiable calculation methods, the technical solution of the present invention can be further clarified.

[0050] After obtaining the original confidence score, geometric fitness score, and location prior score, the system needs to fuse them into a single, more discriminative comprehensive evaluation score. A preferred implementation is to perform a weighted fusion calculation: Comprehensive Evaluation Score = w1 × Confidence Score + w2 × Geometric Fitness Score + w3 × Location Prior Score. Here, w1, w2, and w3 are preset fusion weights, and their sum is usually 1. The specific values ​​of these weights can be flexibly configured according to the characteristics of different fields or the emphasis of the actual application scenario. For example, for fields with very fixed locations, the weight of w3 can be increased; while for fields with very regular shapes, the weight of w2 can be increased. This fusion mechanism can effectively balance the model's own recognition ability with the structured prior knowledge provided by human experience, thereby making a more comprehensive and robust evaluation of candidate bounding boxes.

[0051] Furthermore, after calculating a comprehensive evaluation score for all candidate bounding boxes within each target field group, the system performs the final selection decision. Within each individual target field group, the system performs a simple comparison, directly selecting the candidate bounding box with the highest comprehensive evaluation score and determining it as the final bounding box for that target field. Once the final bounding box is determined, the system extracts its geometric data, which explicitly defines the box's precise position and size in the image coordinate system. For example, this geometric data may specifically include a first horizontal coordinate value representing the position of the box's left edge; a first vertical coordinate value representing the position of its top edge; a second horizontal coordinate value representing the position of its right edge; and a second vertical coordinate value representing the position of its bottom edge. As an alternative implementation, this geometric data can also be represented by specifying an anchor point (e.g., the coordinates of the top-left corner vertex of the bounding box) and the width and height values ​​of the bounding box. Regardless of the form, this set of extracted geometric data constitutes the final spatial coordinates of the target field and is output for use in subsequent recognition or archiving processes.

[0052] S204. Based on the spatial location coordinates, crop out the field sub-images corresponding to the multiple target field regions from the standardized image; After accurately determining the final spatial coordinates of each target field, the system can perform image cropping to isolate the image region corresponding to each field from the complete standardized image. Specifically, the system iterates through each determined target field (e.g., title, file number) and its corresponding spatial coordinates, which define a rectangular boundary. Based on the coordinates of this rectangular boundary, the system locates and extracts a sub-matrix within the pixel matrix of the standardized image. The set of pixels within this sub-matrix constitutes the sub-image for that field. This operation is technically equivalent to slicing an image matrix and can be efficiently implemented using image processing libraries such as OpenCV, ultimately generating a smaller, more focused sub-image for each target field.

[0053] The core purpose of generating these independent field sub-images is to provide input data for subsequent text recognition processing. Each field sub-image contains only the text of its corresponding field and a small amount of adjacent background, greatly reducing interference from irrelevant information. A typical application scenario is to feed these cropped field sub-images one by one into an OCR engine, which is responsible for converting the pixel patterns in the image into an editable text string. To further improve the recognition accuracy, in some preferred embodiments, the system can also perform a series of preprocessing steps on the cropped field sub-images, such as performing grayscale conversion and binarization to enhance text contrast, or performing tilt correction to correct minor angular deviations in text lines, thereby optimizing the image quality input to the OCR engine.

[0054] Optionally, the step of cropping field sub-images corresponding to multiple target field regions from the standardized image based on the spatial location coordinates includes: for each target field region, parsing the spatial location coordinates to obtain the upper-left and lower-right corner coordinates of the target field region in the standardized image; performing subtraction on the x-coordinate and y-coordinate values ​​of the upper-left corner coordinate and addition on the x-coordinate and y-coordinate values ​​of the lower-right corner coordinate according to a preset extended pixel value to determine the extended upper-left and extended lower-right corner coordinates of the extended cropping region; cropping image data within the extended cropping region from the standardized image based on the extended upper-left and extended lower-right corner coordinates, and using the image data as the field sub-image of the target field region.

[0055] To further improve the robustness of subsequent processing, especially when dealing with situations where the model's predicted bounding boxes may be too compact, this application provides a cropping strategy with a safety margin. In this embodiment, before performing cropping, the system first needs to analyze the spatial coordinates of each target field region to obtain its specific boundary in the standardized image, for example, a rectangular region defined by the coordinates of the upper left corner (x_min, y_min) and the lower right corner (x_max, y_max). Then, the system adjusts the above coordinates according to a preset extended pixel value (e.g., a positive integer P). Specifically, the system performs subtraction on the x-coordinate (x_min) and y-coordinate (y_min) of the upper left corner coordinates to obtain the extended upper left corner coordinates (x_min-P, y_min-P); simultaneously, it performs addition on the x-coordinate (x_max) and y-coordinate (y_max) of the lower right corner coordinates to obtain the extended lower right corner coordinates (x_max+P, y_max+P). Through this calculation, the system determined an expanded cropping region that is larger than the original bounding box. Finally, based on the new expanded top-left and bottom-right corner coordinates, the system cropped the corresponding image data from the standardized image and used this data as the final sub-image of this target field region.

[0056] The aforementioned technique of introducing an extended cropping region aims to avoid information loss caused by the edges of the bounding box being too close to the text. In practical applications, the bounding boxes predicted by deep learning models can be very accurate, with edges that may be close to or even slightly cut off the strokes of the text. If cropped directly at this boundary, subsequent OCR processes may lead to recognition errors due to incomplete characters. By extending the bounding box outward by a certain pixel distance, the complete character outline can be effectively included, while retaining a certain background blank space as a buffer, thus forming a safety margin. The specific setting of this preset extended pixel value can be very flexible: in a simple implementation, it can be a fixed empirical value, such as 5 or 10 pixels; in a more adaptive implementation, it can also be a dynamically calculated value, for example, set as a specific percentage (such as 5%) of the original bounding box width or height; in some preferred embodiments, this extended value can even be differentiated according to the field type. Regardless of the method used, this step ultimately ensures that the field sub-image provided to the subsequent processing unit is informationally complete and lossless, laying a solid foundation for achieving high-precision text content recognition.

[0057] S205. Perform optical character recognition processing on the field sub-image to obtain preliminary recognized text; After obtaining high-quality sub-images of each target field, the system performs OCR processing on these images to convert the pixel information into computer-readable text strings. Specifically, the system iterates through all the sub-images generated in the previous step and sends them one by one as input to a pre-configured OCR engine. This OCR engine analyzes the stroke structure, character shape, and arrangement in each sub-image and outputs the recognized text. This result constitutes the initial recognized text for that field. For example, for the title field sub-image, the OCR engine might output the string "Approval for the Archive of Project XX". This process can be implemented by calling mature open-source OCR libraries (such as Tesseract) or integrating commercial cloud service APIs.

[0058] Furthermore, to ensure high recognition accuracy, the OCR engine in this embodiment preferably employs a deep learning-based model, such as a recognition architecture combining a Convolutional Recurrent Neural Network (CRNN) and Connectionist Temporal Classification (CTC). As an optional implementation, the system can select or train a specific OCR model based on the characteristics of the document to be processed. For example, if the processed documents are all Chinese handwriting, a recognition model specifically optimized for Chinese handwriting can be loaded; if a specific printed font is being processed, a model fine-tuned for that font can be used to achieve higher recognition accuracy than a general model. In addition, when calling the OCR engine, parameters such as the recognition language (e.g., Chinese, English) and layout analysis mode can be configured to further adapt to different application scenarios. The final output of this step is preliminary text data corresponding to each target field, laying the foundation for subsequent structured information extraction and data verification.

[0059] S206. Perform format verification and format conversion processing on the preliminarily identified text according to the preset field type attributes to generate field recognition results that conform to the preset bibliographic format specifications; To ensure that the data finally stored in the database has a high degree of standardization and consistency, the system does not directly adopt the preliminary recognition text obtained after optical character recognition. In this step, the system will perform a key post-processing process on these texts, namely format verification and format conversion. Specifically, the system will pre-define a field type attribute configuration table, in which specific data types, format requirements, and verification rules are associated with each target field (such as the writing date, document number, and confidentiality level). When processing the preliminary recognition text of a certain field, the system will first query its corresponding attributes from this configuration table. For example, the attributes of the writing date field may be defined as the date type, and its final format is required to be "YYYY-MM-DD". The system then uses the preset verification rules, such as using regular expressions (Regular Expression, RegEx), to determine whether the preliminary recognition text (such as December 1, 2025) conforms to a certain variant of the date format.

[0060] After completing the format verification, the system will perform corresponding conversion operations according to the verification results. If the preliminary recognition text does not conform to the target specification in format but is valid in content (for example, the recognition result is "December 1, 2025" or "2025.12.01"), the format conversion module will be activated to standardize it into the preset "2025-12-01" format. This conversion may involve the conversion of full-width to half-width characters, the mapping of Chinese numerals to Arabic numerals, and the unification of separators. In a preferred implementation, for some fields that may be mixed with irrelevant words (such as the recognized date: 2025-12-01), the system can also use extraction rules to only retain the core data part. If the preliminary recognition text fails the validity verification, the system can mark this field as recognition failure and generate an alarm message to prompt manual intervention. In a more advanced implementation, the system can even integrate the named entity recognition (Named Entity Recognition, NER) model in natural language processing (Natural Language Processing, NLP) to perform intelligent extraction and formatting on some texts with more flexible formats. Through this step, the system ensures that all the final output field recognition results strictly follow the preset catalog format specifications, greatly improving the usability and automation processing level of the data.

[0061] Optionally, the step of performing format validation and format conversion processing on the initially identified text according to preset field type attributes to generate a field identification result that conforms to preset bibliographic format specifications includes: for any target field region among the multiple target field regions, extracting a preset validation regular expression and a preset format conversion mapping table corresponding to the target field region from the preset field type attributes; obtaining the initially identified text corresponding to the target field region, and performing format matching processing on the initially identified text according to the validation regular expression; when the initially identified text does not conform to the validation regular expression, performing character replacement and structural reorganization on the initially identified text based on the format conversion mapping table to generate converted text, and applying the validation regular expression again to perform format matching processing on the converted text; and determining the initially identified text or the converted text that has passed the format matching processing as the field identification result corresponding to the target field region.

[0062] In a specific embodiment, the first step in the system's format validation and conversion process is preparation, namely, accurately extracting the validation and conversion rules corresponding to the target field area. The system maintains a configurable field type attribute library, which stores the specific technical attributes of various fields that may appear in archival records, such as the date of creation, document size, and security classification. When the processing flow points to any target field area, such as the date of creation, the system queries this attribute library and extracts two key configuration pieces of information: a preset validation regular expression and a preset format conversion mapping table. The validation regular expression defines the final valid format of the field data using a precise text pattern. For example, for the date of creation, the expression can be defined as requiring a four-digit year followed by a hyphen, then two months, then another hyphen, and finally two days.

[0063] After obtaining the exclusive rules for the target field, the system enters the preliminary matching stage. The system first obtains the preliminary recognition text corresponding to the target field area from optical character recognition or other sources. Suppose for the document date field, the obtained preliminary recognition text is "December 1st, 2025" in Chinese characters. At this time, the system will immediately call the verification regular expression extracted in the previous step and perform the first format matching process on this preliminary recognition text. The system will determine whether the structure and characters of this text exactly conform to the pattern defined by the regular expression. In this case, since the text contains Chinese characters and the separator is not a dash, it obviously does not conform to the preset format of four digits plus a dash. Therefore, the result of the initial format matching process is failure. If the obtained preliminary recognition text happens to be in the already conforming format like 2025-12-01, the initial matching will be successful, and the system will directly determine this text as the final field recognition result and end the processing flow for this field, thus improving the processing efficiency.

[0064] When the preliminary matching process fails, the system automatically enters the core conversion and restructuring stage, which corrects the text based on a preset format conversion mapping table. This mapping table is essentially a set of detailed conversion rule sets that can handle various non-standard text expressions. This process can include two levels: character replacement and structure restructuring. In terms of character replacement, the system will look up the replacement rules defined in the mapping table. For example, it will replace the Chinese numeral "二〇二五" in the preliminary recognition text with the Arabic numeral "2025", replace the Chinese characters "年" and "月" with the hyphen, and directly delete the Chinese character "日". After this round of replacement, the text "December 1st, 2025" generates the converted text 2025-12-1. In terms of structure restructuring, for some texts with incorrect order, such as the recognition result being 12-01-2025, the restructuring rules in the mapping table can define how to identify parts such as the day, month, and year, and rearrange them in the standard order of year, month, and day to generate the converted text with the correct structure.

[0065] After generating the converted text, the system enters the final re-verification and result confirmation stage. The system reapplies the same regular expression extracted in the first step to perform a new round of format matching on the newly generated converted text. Taking the generated text 2025-12-1 as an example, although the numbers and separators are basically correct, the date portion is a single digit, which does not meet the two-digit format required by the regular expression, so this match may still fail. At this point, the format conversion module can further apply the zero-padding rule defined in the mapping table to add a zero before the single-digit month or date, thus perfecting the text to 2025-12-01. The system then performs the final format matching; at this point, the converted text fully conforms to the regular expression pattern, and the match is successful. Finally, the system determines this converted text, which has passed the re-verification, as the final field recognition result corresponding to the date field. If, after all preset conversion and recombination attempts, the text still fails the verification, the system can mark the field as failing recognition and generate a prompt message for manual review, thus forming a complete and robust automated processing loop.

[0066] S207. Based on the preset field mapping relationship, the field recognition results are filled into the corresponding field positions of the structured cataloging form to generate structured cataloging data.

[0067] In a specific embodiment, after the system completes the recognition and formatting of all target fields on the archival image, it enters the final data integration stage. The core of step 207 is to accurately fill the recognition results of the discrete fields generated in the previous steps into a structured electronic cataloging form template according to a preset field mapping relationship. This field mapping relationship is essentially a logical lookup table, establishing a unique correspondence between field types and specific field location identifiers in the form. For example, this mapping relationship can define that the recognition result of type "document date" should be filled into the field position with the identifier "document_date" in the form; the result of type "document font size" should be filled into the position with the identifier "doc_identifier".

[0068] Through the aforementioned filling process, the system automatically assembles a series of independent text strings (i.e., field recognition results) into a complete, standardized, structured cataloging data. This data can be presented in various forms, such as an Extensible Markup Language (XML) document following a specific pattern, where each field recognition result is placed within its corresponding XML tag. Alternatively, it can generate a record ready for insertion into a database, where each field recognition result is assigned to the corresponding column in the data table. The completion of this step marks the end of the fully automated conversion process from unstructured image information to structured, machine-readable, easily searchable, and usable archival data, greatly improving the efficiency and accuracy of archival digitization cataloging.

[0069] Optionally, the step of filling the field recognition results into the corresponding field positions of the structured cataloging form based on a preset field mapping relationship to generate structured cataloging data includes: traversing all the field recognition results and automatically filling each field recognition result into the corresponding field of the structured cataloging form according to the field mapping relationship; performing final data verification on the filled structured cataloging form, the final data verification including verifying the field data format and logical relationship between fields in the structured cataloging form according to preset cataloging rules; when the final data verification passes, associating and binding the structured cataloging form with the storage path of the digitized image of the archive and the spatial location coordinates of each field recognition result, and solidifying and generating the structured cataloging data containing the association and binding.

[0070] In a preferred embodiment, after the system completes the recognition and formatting of all target field regions in the archival image, an automatic fill procedure is initiated. The system first iterates through the set of all generated field recognition results. For each field recognition result in the set, the system performs an automatic fill operation based on a preset field mapping relationship. This field mapping relationship is a pre-configured logical lookup table that precisely binds the semantic type of each field, such as the date of creation or document size, to a specific field identifier in the structured cataloging form template. Based on this mapping, the system automatically fills in the specific field recognition text, such as 2025-12-1, into the input field in the cataloging form corresponding to the date of creation. This iteration and fill process continues until all recognized field results are accurately placed in their predetermined positions on the form, thus forming a preliminary complete electronic cataloging record.

[0071] Furthermore, after the initial data entry is complete, the system does not immediately solidify the data. Instead, it initiates a crucial final data verification process to ensure the internal consistency of the entire cataloging record and the correctness of the business logic. This final data verification is based on a set of preset cataloging rules, and its verification content mainly includes two levels. First, it confirms the data format of all fields in the form as an additional quality assurance layer. Second, and more importantly, it performs a deep verification of the logical relationships between fields. For example, the cataloging rules may stipulate that the value of the document issuance date field in the form must be later than or equal to the value of the document completion date field; another example is that the rule may be set so that when the value of the security classification field is secret or confidential, the confidentiality period field cannot be empty. The system will compare these logical rules one by one, and only when the filled form data fully meets all preset rules will the final data verification be declared successful.

[0072] Furthermore, the system will only perform the final association binding and solidification generation operation after the final data verification is successful. In this step, the system will strongly associate three types of crucial information: first, the structured cataloging form that has just passed verification; second, the unique storage path of the original digitized image of the archive on the server or storage system; and third, the spatial coordinates of each field's recognition result on the original image, i.e., the coordinates of its bounding box, recorded during the previous identification process. This binding establishes a traceable mapping relationship between the structured data and its original image source. Finally, the system solidifies this data package containing the complete form data and the aforementioned association binding information, generating the final structured cataloging data. Solidification can be achieved by inserting it as a complete record into the database, or by generating a standard format file such as XML containing all the information and archiving it in the archive management system, thus completing the entire automated cataloging process. If the final data verification fails, the system will mark the record as abnormal and submit it to the manual review queue to ensure data quality.

[0073] It should be noted that the above embodiments of the apparatus are only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0074] This embodiment also discloses an electronic device, as shown in the reference. Figure 3 The electronic device may include: at least one processor 301, at least one communication bus 302, user interface 303, network interface 304, and at least one memory 305.

[0075] The communication bus 302 is used to enable communication between these components.

[0076] The user interface 303 may include a display screen and a camera. Optionally, the user interface 303 may also include a standard wired interface and a wireless interface.

[0077] The network interface 304 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface).

[0078] The processor 301 may include one or more processing cores. The processor 301 connects to various parts of the server using various interfaces and lines, and performs various server functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in memory 305, and by calling data stored in memory 305. Optionally, the processor 301 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 301 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Graphics Processing Unit (GPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 301 and may be implemented as a separate chip.

[0079] The memory 305 may include random access memory (RAM) or read-only memory. Optionally, the memory 305 may include a non-transitory computer-readable storage medium. The memory 305 can be used to store instructions, programs, code, code sets, or instruction sets. The memory 305 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 305 may also be at least one storage device located remotely from the aforementioned processor 301. Figure 3 As shown, the memory 305, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an application program for an automatic cataloging method for fixed-format archives.

[0080] exist Figure 3 In the electronic device shown, the user interface 303 is mainly used to provide an input interface for the user and to obtain the user input data; while the processor 301 can be used to call an application program stored in the memory 305 that is a fixed-format archive automatic cataloging method. When executed by one or more processors 301, the electronic device executes one or more methods as described in the above embodiments.

[0081] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0082] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the shown or discussed mutual couplings or direct couplings or communication connections may be through some service interfaces; indirect couplings or communication connections between apparatuses or units may be electrical or other forms.

[0083] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0084] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory 305 and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned memory 305 includes various media capable of storing program code, such as a USB flash drive, external hard drive, magnetic disk, or optical disk.

[0085] The foregoing description is merely an exemplary embodiment of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Other embodiments of this disclosure will be readily apparent to those skilled in the art upon consideration of the disclosure in this specification. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described in this disclosure. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.

Claims

1. A method for automatically cataloging fixed-format archives, characterized in that, Applied to a server, the method includes: Perform image preprocessing on the digitized images of the archives to be cataloged to obtain standardized images; The standardized image is input into a preset field localization model to obtain multiple candidate localization boxes and confidence scores corresponding to multiple target field regions in the standardized image. Each target field region corresponds to multiple candidate localization boxes, and each candidate localization box corresponds to a confidence score. Based on the confidence score, determine the candidate bounding box with the highest confidence score in each target field region, and obtain the spatial coordinates corresponding to the candidate bounding box with the highest confidence score; Based on the spatial location coordinates, field sub-images corresponding to multiple target field regions are cropped from the standardized image; Perform optical character recognition processing on the field sub-image to obtain preliminary recognized text; Based on the preset field type attributes, the initially identified text is subjected to format verification and format conversion processing to generate field recognition results that conform to the preset bibliographic format specifications; Based on the preset field mapping relationship, the field recognition results are filled into the corresponding field positions of the structured catalog form to generate structured catalog data.

2. The method according to claim 1, characterized in that, The step of inputting the standardized image into a preset field localization model to obtain multiple candidate localization boxes and confidence scores corresponding to each of the multiple target field regions in the standardized image includes: The standardized image is input into the feature extraction backbone network in the field localization model. The standardized image is then forward-computed through multiple convolutional and pooling layers of the feature extraction backbone network to generate a multi-scale feature map. The multi-scale feature map is input into the detection head network in the field localization model. The detection head network parses the multi-scale feature map at multiple preset anchor positions to generate a set of original prediction boxes and a set of original confidence scores corresponding to the anchor positions. The set of original predicted boxes is traversed, and the original confidence score corresponding to each original predicted box is compared with a preset confidence threshold. Original predicted boxes with a confidence score greater than the confidence threshold are selected as multiple candidate localization boxes, and the confidence scores corresponding to the multiple candidate localization boxes are retained.

3. The method according to claim 2, characterized in that, The step of inputting the multi-scale feature map into the detection head network of the field localization model, and having the detection head network parse the multi-scale feature map at multiple preset anchor positions to generate an original set of predicted bounding boxes and an original set of confidence scores corresponding to the anchor positions, includes: The multi-scale feature maps are respectively input into the classification subnetwork and regression subnetwork connected in parallel in the detection head network; Based on the classification subnetwork, convolution calculation is performed on the multi-scale feature map to generate the field existence probability for each anchor point position, and the field existence probability is used as the original confidence score set; The regression subnetwork performs convolution calculations on the multi-scale feature map to generate bounding box offsets for each anchor point position, and calculates the original set of predicted boxes based on the bounding box offsets and the initial geometric coordinates of the anchor point positions.

4. The method according to claim 1, characterized in that, The step of determining the candidate bounding box with the highest confidence score in each target field region based on the confidence score, and obtaining the spatial coordinates corresponding to the candidate bounding box with the highest confidence score, includes: Based on the field category identifier associated with each of the candidate bounding boxes, the candidate bounding boxes and their corresponding confidence scores are respectively divided into multiple target field groups corresponding to the multiple target field regions; Traverse all the target field groups, and for each candidate positioning box in the target field group, determine the geometric fitness score and the position prior score respectively. The geometric fitness score represents the degree of matching between the geometric aspect ratio of the candidate positioning box and the preset aspect ratio range of the target field region, and the position prior score represents the degree of deviation between the center position of the candidate positioning box and the preset anchor point region of the target field region. For each candidate bounding box, a weighted fusion calculation is performed on the confidence score, the geometric fitness score, and the location prior score based on preset fusion weights to generate a comprehensive evaluation score; Within each target field group, the candidate location box with the highest comprehensive evaluation score is selected as the final location box, and the geometric data of the final location box is extracted as the spatial location coordinates.

5. The method according to claim 1, characterized in that, The step of cropping field sub-images corresponding to multiple target field regions from the standardized image based on the spatial location coordinates includes: For each target field region, the spatial location coordinates are parsed to obtain the upper left and lower right corner coordinates of the target field region in the standardized image; Based on the preset extended pixel values, subtraction is performed on the x-coordinate and y-coordinate of the top-left corner coordinate, and addition is performed on the x-coordinate and y-coordinate of the bottom-right corner coordinate, to determine the extended top-left corner coordinate and extended bottom-right corner coordinate of the extended cropping area. Based on the extended upper left corner coordinates and the extended lower right corner coordinates, image data within the extended cropping area is cropped from the standardized image, and the image data is used as the field sub-image of the target field region.

6. The method according to claim 1, characterized in that, The step of performing format validation and format conversion processing on the initially identified text according to preset field type attributes to generate field recognition results that conform to preset bibliographic format specifications includes: For any target field region among the multiple target field regions, extract a preset validation regular expression and a preset format conversion mapping table corresponding to any target field region from the preset field type attribute; Obtain the preliminary identified text corresponding to any of the target field regions, and perform format matching processing on the preliminary identified text according to the validation regular expression; When the initially identified text does not conform to the validation regular expression, character replacement and structural recombination are performed on the initially identified text based on the format conversion mapping table to generate converted text, and the validation regular expression is applied again to perform format matching processing on the converted text; The preliminary identified text or the converted text processed by format matching is determined as the field identification result corresponding to any of the target field regions.

7. The method according to claim 1, characterized in that, The process of filling the field recognition results into the corresponding field positions of the structured bibliographic data form based on the preset field mapping relationship to generate structured bibliographic data includes: Iterate through all the field recognition results and, based on the field mapping relationship, automatically fill each field recognition result into the corresponding field of the structured catalog form; Perform final data verification on the completed structured catalog form. The final data verification includes verifying the field data format and logical relationship between fields in the structured catalog form according to preset cataloging rules. When the final data verification passes, the structured catalog form is associated and bound with the storage path of the digitized image of the archive and the spatial location coordinates of the recognition result of each field, and the structured catalog data containing the associated binding is solidified and generated.

8. An electronic device, characterized in that, The device includes a processor, a memory, a user interface, and a network interface. The memory is used to store instructions. The user interface and the network interface are both used to communicate with other devices. The processor is used to execute the instructions stored in the memory to cause the electronic device to perform the method as described in any one of claims 1-7.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed, perform the method as described in any one of claims 1-7.

10. A computer program product, characterized in that, When the computer program product is run on an electronic device, it causes the electronic device to perform the method as described in any one of claims 1-7.