Automatic generation method of archive volume based on image recognition technology

By using image recognition technology to automatically generate judicial file catalogs, the problems of low efficiency and poor accuracy of manual data entry in existing technologies have been solved, and efficient and accurate electronic processing of files has been achieved.

CN121809419APending Publication Date: 2026-04-07南京通达海软件有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In the process of digitizing judicial records, existing technologies suffer from low efficiency and difficulty in ensuring data accuracy through manual data entry, while OCR technology cannot meet the needs of automatic recognition and reconstruction of double-column formatted catalogs.

Method used

By using image recognition technology and OCR services to recognize archive catalog images, merge text in the same cell, identify double-column catalogs and calculate the midline, generate an ascending-order catalog, and combine this with manual confirmation to achieve automated generation of volume catalogs.

Benefits of technology

It reduced the workload of data entry personnel, improved data entry efficiency and the accuracy of document information, and reduced labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121809419A_ABST
    Figure CN121809419A_ABST
Patent Text Reader

Abstract

The invention discloses a method for automatically generating a file volume based on an image recognition technology. The method comprises the following steps of: starting a provided OCR (Optical Character Recognition) service; selecting a directory picture, calling a picture recognition interface of the OCR service, transmitting the picture to the OCR service, and obtaining a text and a text coordinate; merging the texts of the same cell; removing a row which is not beginning with the number; judging whether the directory is a double-column directory; if the directory can be proved to be the double-column directory, calculating a middle line of the double-column directory; calculating to obtain all left column directories and right column directories; and splicing the left column catalog and the right column catalog to obtain a new group of data, and then performing ascending sorting on each row of the group of data based on the catalog serial number to generate the catalog. And if the catalogue cannot be proved to be a double-column catalogue, performing ascending sorting on each row of the group of data directly based on the catalogue serial number to generate the catalogue. According to the invention, the automatic generation of the file is realized, so that the workload of file entry personnel is reduced, the file entry efficiency is improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software technology, and in particular to a method for automatically generating archive catalogs based on image recognition technology. Background Technology

[0002] With the deepening of judicial informatization, the national court system is comprehensively promoting the digitization of paper archives. Currently, the digitization process faces the following technical challenges: 1. Low efficiency of manual data entry: The traditional method requires staff to manually enter the file information based on scanned copies of paper catalogs, which takes an average of 30-45 minutes per file.

[0003] 2. Data accuracy is difficult to guarantee: Different data entry personnel have different understandings of the directory format, resulting in an entry error rate as high as 5-8%.

[0004] While existing OCR technology can recognize text, it cannot meet the unique structured processing requirements of judicial archive catalogs, especially the automatic recognition and reorganization of two-column catalogs. Therefore, designing an algorithm to automatically generate catalogs is particularly important. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention provides a method for automatically generating file titles based on image recognition technology during the digitization of court paper files. This method utilizes image recognition technology to automate the generation of file titles, thereby reducing the workload of file entry personnel, lowering labor costs, and improving the efficiency and accuracy of file title information in the transcription of paper files to electronic files.

[0006] The objective of this invention is achieved through the following technical solutions.

[0007] A method for automatically generating archive catalogs based on image recognition technology, comprising the following steps: Step 1: Start the provided OCR service; Step 2: Select the image in the catalog, call the image recognition interface of the OCR service, send the image to the OCR service, and obtain the text and text coordinates; Step 3: Merge text within the same cell; Step 4: Remove rows that do not begin with a number; Step 5: Determine if it is a two-column directory; Step 6: If it can be proven that the directory is a two-column directory, calculate the two-column directory line; Step 7: Calculate all left and right column directories; Step 8: Combine the left and right columns of the directory obtained in Step 7 to get a new set of data. Then, sort each row of this set of data in ascending order based on the directory number to generate a directory.

[0008] Step 9: If it cannot be proven that the directory is a two-column directory, then directly sort each row of this set of data in ascending order based on the directory number to generate the directory.

[0009] The text refers to all the text within a region; the text coordinate data is calculated with the bottom left corner of the image as the origin, and the X and Y axes corresponding to the four corners of the text are calculated. The lines connecting the text coordinates form a quadrilateral region.

[0010] Step 3 specifically involves: judging based on the X and Y axes of the text coordinates: if the difference between the top-left Y-axis values ​​of two text segments is within 5 pixels, they are marked as text on the same line. For two text segments on the same line, the X-axis values ​​of the top-left coordinates are compared. The one with the smaller X-axis value is marked as text A, and the one with the larger X-axis value is marked as text B. If the difference between the top-right X-axis values ​​of text A and the top-left X-axis values ​​of text B is within 5 pixels, they are marked as text within the same cell. The two text segments are then merged to form text C. The coordinates of the four corners of text C are the top-left and bottom-left of text A, and the top-right and bottom-right of text B, respectively. Starting from the first text, the above calculations are performed on each text segment to form a new text segment and coordinates.

[0011] Specifically, step 4 involves removing lines whose first cell content is not a number from the new text and text coordinates generated in step 3, thus forming new text and text coordinates. Step 5 specifically involves extracting the content of the first line based on the new text and text coordinates generated in step 4, and determining whether it contains more than or equal to 4 cell texts and text coordinates.

[0012] Specifically, step 6 involves finding that if there are 4 or more cells, it proves that the directory is a two-column directory. The midline of the two-column directory is calculated. For each row of data, the top-left X-axis value X1 of the first cell and the top-right X-axis value X2 of the sixth cell are obtained. The midline of the current row is calculated by X1 + (X2 - X1) / 2, which is used to distinguish the left and right columns of the directory.

[0013] Step 7 is specifically based on the formula in step 6. Starting from the first row, perform the above calculation on each row to obtain all the left and right column directories.

[0014] Specifically, step 9 involves sorting each row of the data in ascending order based on the directory number if there are no more than or equal to 4 cells, and then generating a directory.

[0015] After the catalog is generated, it needs to be manually confirmed.

[0016] Compared to existing technologies, the advantages of this invention are as follows: In the process of digitizing court paper archives, this invention achieves automated generation of file titles, thereby reducing the workload of data entry personnel, improving data entry efficiency, and lowering labor costs. Automatic file title generation is achieved through image recognition technology. This invention improves the efficiency of transcribing paper archives into electronic archives and the accuracy of file title information. Attached Figure Description

[0017] Figure 1 This is a flowchart of the present invention. Detailed Implementation

[0018] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. Some terms used in the embodiments of the present invention will be explained below to facilitate understanding by those skilled in the art.

[0019] (1) Electronic Archives: refers to archival materials stored, managed and utilized in digital form, replacing traditional paper archives, and has the characteristics of high efficiency, security and easy retrieval.

[0020] (2) Image recognition (Optical Character Recognition, OCR): is a technology that converts text in an image (such as printed or handwritten text) into editable and searchable text data.

[0021] (3) Double-column table of contents: This is a table of contents layout for documents or books, which divides the table of contents entries into two parts, left and right. It is usually used in scenarios with a lot of content and where space needs to be saved. Based on the court scenario, the file table of contents entries are divided into serial number column, table of contents name column, and page number column. A complete entry will have three columns and be presented in table form. When there is a lot of content, the table of contents entries will be divided into two parts, left and right, that is, there will be six columns in a row.

[0022] like Figure 1 The steps for generating archive catalogs are described in the diagram.

[0023] Step 1: Activate the provided OCR service as a basic capability support.

[0024] Step 2: Select the catalog image, call the image recognition interface of the OCR service, send the image to the OCR service, and obtain the text and text coordinates. The text is all the text in a region; the text coordinate data is calculated with the bottom left corner of the image as the origin, and the X and Y axes corresponding to the four corners of the text are calculated. The lines connecting the text coordinates will form a quadrilateral region.

[0025] Step 3: Merge text within the same cell. Based on the X and Y axes of the text coordinates: If the difference between the top-left Y-axis values ​​of two text segments is within 5 pixels, they are marked as text on the same line. For two text segments on the same line, compare their top-left X-axis values; the one with the smaller X-axis value is marked as text A, and the one with the larger X-axis value is marked as text B. If the difference between the top-right X-axis values ​​of text A and the top-left X-axis values ​​of text B is within 5 pixels, they are marked as text within the same cell. Merge the two text segments to form text C. The coordinates of the four corners of text C are the top-left and bottom-left of text A, and the top-right and bottom-right of text B, respectively. Perform the above calculations for each text segment starting from the first text segment to form a new text segment and coordinates.

[0026] Step 4: Remove rows that do not start with a number. Based on the new text and text coordinates generated in Step 3, remove the rows where the first cell of each line of text does not contain a number, thus forming new text and text coordinates.

[0027] Step 5: Determine if it is a two-column directory. Based on the new text and text coordinates generated in Step 4, extract the content of the first row and determine if it has more than or equal to 4 cell texts and text coordinates.

[0028] Step 6: If there are 4 or more cells, it can be proven that the directory is a two-column directory. Calculate the midline of the two-column directory. For each row of data, get the top left X-axis value X1 of the first cell and the top right X-axis value X2 of the sixth cell. Calculate the midline of the current row by X1+(X2-X1) / 2, which is used to distinguish the left and right columns of the directory. Step 7: Based on the formula in Step 6, perform the above calculations on each row starting from the first row to obtain all the left and right column directories.

[0029] Step 8: Combine the left and right columns of the directory obtained in Step 7 to get a new set of data. Then, sort each row of this set of data in ascending order based on the directory number to generate a directory.

[0030] Step 9: Based on Step 5, if there are no more than 4 cells, sort each row of this set of data in ascending order based on the directory number to generate a directory.

[0031] Step 10: Manually verify the generated directory.

[0032] This invention includes the following key points: 1. Image Recognition (OCR) Service: Deploy and start the OCR service as a basic capability support; 2. Category Recognition: Call the OCR service interface to recognize the category image and obtain the text and its corresponding coordinates; 3. Table of Contents Generation: Generate a table of contents list based on text and text coordinates; 4. Confirm the catalog: Show the generated catalog results to relevant personnel for confirmation.

Claims

1. A method for automatically generating archive catalogs based on image recognition technology, characterized by the following steps: include: Step 1: Start the provided OCR service; Step 2: Select the image in the catalog, call the image recognition interface of the OCR service, send the image to the OCR service, and obtain the text and text coordinates; Step 3: Merge text within the same cell; Step 4: Remove rows that do not begin with a number; Step 5: Determine if it is a two-column directory; Step 6: If it can be proven that the directory is a two-column directory, calculate the two-column directory line; Step 7: Calculate all left and right column directories; Step 8: Concatenate the left and right columns of the directory obtained in Step 7 to obtain a new set of data. Then, sort each row of this set of data in ascending order based on the directory number to generate a directory. Step 9: If it cannot be proven that the directory is a two-column directory, then directly sort each row of this set of data in ascending order based on the directory number to generate the directory.

2. The method for automatically generating archive catalogs based on image recognition technology according to claim 1, characterized in that... The text refers to all the text within a region; the text coordinate data is calculated with the bottom left corner of the image as the origin, and the X and Y axes corresponding to the four corners of the text are calculated. The lines connecting the text coordinates form a quadrilateral region.

3. The method for automatically generating archive catalogs based on image recognition technology according to claim 1 or 2, characterized in that... Step 3 specifically involves: judging based on the X and Y axes of the text coordinates: if the difference between the top-left Y-axis values ​​of two text segments is within 5 pixels, they are marked as text on the same line. For two text segments on the same line, the X-axis values ​​of the top-left coordinates are compared. The one with the smaller X-axis value is marked as text A, and the one with the larger X-axis value is marked as text B. If the difference between the top-right X-axis values ​​of text A and the top-left X-axis values ​​of text B is within 5 pixels, they are marked as text within the same cell. The two text segments are then merged to form text C. The coordinates of the four corners of text C are the top-left and bottom-left of text A, and the top-right and bottom-right of text B, respectively. Starting from the first text, the above calculations are performed on each text segment to form a new text segment and coordinates.

4. The method for automatically generating archive catalogs based on image recognition technology according to claim 3, characterized in that... Step 4 specifically involves removing lines whose first cell content is not a number from each line of text, based on the new text and text coordinates generated in step 3, to form new text and text coordinates.

5. The method for automatically generating archive catalogs based on image recognition technology according to claim 4, characterized in that... Step 5 specifically involves extracting the content of the first line based on the new text and text coordinates generated in step 4, and determining whether it contains more than or equal to 4 cell texts and text coordinates.

6. The method for automatically generating archive catalogs based on image recognition technology according to claim 5, characterized in that... Specifically, step 6 involves finding that if there are 4 or more cells, it proves that the directory is a two-column directory. The midline of the two-column directory is calculated. For each row of data, the top-left X-axis value X1 of the first cell and the top-right X-axis value X2 of the sixth cell are obtained. The midline of the current row is calculated by X1 + (X2 - X1) / 2, which is used to distinguish the left and right columns of the directory.

7. The method for automatically generating archive catalogs based on image recognition technology according to claim 6, characterized in that... Step 7 is specifically based on the formula in step 6. Starting from the first row, perform the above calculation on each row to obtain all the left and right column directories.

8. The method for automatically generating archive catalogs based on image recognition technology according to claim 7, characterized in that... Specifically, step 9 involves sorting each row of the data in ascending order based on the directory number if there are no more than or equal to 4 cells, and then generating a directory.

9. The method for automatically generating archive catalogs based on image recognition technology according to claim 8, characterized in that... The generated catalog requires manual verification.