Intelligent clustering analysis method and system based on feature extraction
By calculating the title edit distance, text feature distance and visual feature distance of document pictures, combined with the multi-level clustering method, the problem of low accuracy in distinguishing the layout of document pictures in the existing technology is solved, and higher clustering accuracy and reliability.
Patent Information
- Application Number
- CN202411131739.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-08-19
AI Technical Summary
Existing intelligent clustering analysis methods based on feature extraction have low accuracy in distinguishing fine-grained layouts, causing document images of different categories to be clustered into the same cluster, reducing the accuracy and reliability of clustering.
By quantifying the title edit distance, text feature distance and visual feature distance of document images, a multi-level and multi-dimensional clustering method is used to cluster document images and generate clusters of clusters by combining text feature information and visual feature information. title to improve clustering accuracy.
It effectively improves the accuracy and reliability of document image clustering, can more accurately distinguish document images of different categories and formats, and improves the fine-grained differentiation ability of clustering.
Smart Images

Figure CN118658169B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of image clustering, and in particular to an intelligent clustering analysis method and system based on feature extraction. Background Art
[0002] In the work of document consulting data management, it is necessary to classify the massive documents of different companies. By clustering pictures of different types or different formats of the same type and generating cluster names, business personnel can quickly perform the next step of information extraction for pictures of specific types and formats based on the clustering results. Commonly used document data categories include bank receipts, accounting vouchers, weighing sheets, warehouse receipts, warehouse delivery sheets, invoices, etc., and the same category may correspond to multiple different formats of pictures.
[0003] The existing intelligent clustering analysis method based on feature extraction has the problem of low accuracy in fine-grained layout distinction. For example, some incoming and outgoing documents are exactly the same except for one word in the title, which may easily lead to document images of different categories being clustered into the same cluster. When the same document has multiple layouts, if the text feature vector is directly used for clustering, it is impossible to distinguish document images of different layouts of the same category, which may easily lead to document images of different layouts of the same category being clustered into the same cluster. All of the above situations reduce the accuracy and reliability of clustering. Summary of the invention
[0004] In order to overcome the defects and shortcomings of the prior art, the present application provides an intelligent clustering analysis method and system based on feature extraction, which improves the accuracy and reliability of document image clustering by quantifying the title editing distance, text feature distance and visual feature distance of document images.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] The present application provides an intelligent clustering analysis method based on feature extraction, comprising the following steps:
[0007] Collect document images and extract text feature information and visual feature information of the document images;
[0008] Calculate the title edit distance and text feature distance of the document image based on the text feature information;
[0009] Calculate the visual feature distance of the document image based on the visual feature information;
[0010] Cluster document images based on title edit distance, text feature distance, and visual feature distance;
[0011] Generate cluster titles for clusters based on the clustering results to complete document image clustering.
[0012] Optionally, the specific steps of calculating the text feature distance include:
[0013] Obtaining text feature information of the document image, where the text feature information includes text content information and character type information in the document image;
[0014] Divide document images into Regions, identify the character type of each region, and set the character type to null if the region does not contain characters;
[0015] The character type matching coefficient of the document image is calculated based on the character type recognition result and text feature information of the region. The character type matching coefficient calculation formula is:
[0016] ;
[0017] In the formula Indicates Document image number The probability of a character type appearing, Indicates Document image number The probability of a character type appearing, Indicates the number of character types. Indicates Document image number The character type of the region, Indicates Document image number The character type of the region, Indicates the number of regions, represents the indicator function, when and At the same time, ,otherwise , represents the first adjustment factor, Indicates the character type matching coefficient;
[0018] The text content matching coefficient in the document image is calculated based on the text feature information, and the text content matching coefficient and the character type matching coefficient are substituted into the text feature distance calculation formula to calculate the text feature distance. The text feature distance calculation formula is:
[0019] ;
[0020] In the formula Indicates the text content matching coefficient, Indicates the character type matching coefficient, represents the second adjustment factor, Represents the text feature distance.
[0021] Optionally, the calculation formula of the text content matching coefficient is:
[0022] ;
[0023] In the formula Indicates Document image and The edit distance of the text content in the document image, Indicates The length of the text content in the document image. Indicates The length of the text content in the document image. Indicates taking and The maximum value in Indicates the text content matching coefficient.
[0024] Optionally, the specific steps of calculating the visual feature distance include:
[0025] Obtain visual feature information, which includes size information and table information of the document image;
[0026] The size matching coefficient and table matching coefficient of the document image are calculated based on the visual feature information. The size matching coefficient calculation formula is:
[0027] ;
[0028] In the formula Indicates The width of the document image. Indicates The width of the document image. Indicates The height of the document image. Indicates The height of the document image. represents the size matching coefficient;
[0029] Substitute the size matching coefficient and the table matching coefficient into the visual feature distance calculation formula to calculate the visual feature distance. The visual feature distance calculation formula is:
[0030] ;
[0031] In the formula represents the size matching coefficient, represents the table matching coefficient, represents the third adjustment factor, Represents the visual feature distance.
[0032] Optionally, the calculation formula of the table matching coefficient is:
[0033] ;
[0034] In the formula Indicates The table area in the document image, Indicates The area of the document image, Indicates The table area in the document image, Indicates The area of the document image, Indicates The table intersection set of document images, Indicates The table intersection set of document images, express and The Hausdorff distance, Indicates The diagonal length of the document image, Indicates The diagonal length of the document image, Indicates taking and The maximum value in represents the fourth adjustment factor, Represents the table matching coefficient.
[0035] Optionally, the specific steps of clustering document images include:
[0036] Get title edit distance, text feature distance and visual feature distance;
[0037] Generate initial clusters based on text feature distances, cluster document images whose text feature distances are less than or equal to a preset text feature distance threshold into initial clusters, and obtain an initial cluster set;
[0038] The initial clusters are clustered according to the visual feature distance, and the document images in each initial cluster in the initial cluster set are traversed. If the visual feature distance of the document images in the same initial cluster is less than the preset visual feature distance threshold, no clustering is performed. Otherwise, the document images with a visual feature distance greater than or equal to the preset visual feature distance threshold are clustered to form new clusters, thereby obtaining a second cluster set;
[0039] The clusters in the second cluster set are clustered according to the title edit distance, and the document images in each cluster in the second cluster set are traversed. If the title edit distance of the document images in the same cluster is less than the preset title edit distance threshold, no cluster division is performed. Otherwise, the document images with a title edit distance greater than or equal to the preset title edit distance threshold are divided into new clusters to obtain the final clustering results.
[0040] Optionally, the specific step of generating cluster titles of clusters includes:
[0041] Extract the title text of all document images in each cluster in the clustering results;
[0042] Count the frequency of occurrence of different title texts in clusters;
[0043] The title text with the highest frequency of occurrence is used as the cluster title of the cluster.
[0044] It should be noted here that the first adjustment factor, the second adjustment factor, the third adjustment factor, the fourth adjustment factor, the preset text feature distance threshold, the preset visual feature distance threshold and the preset title edit distance threshold are determined as follows: 5,000 groups of document images are collected, the text feature information and visual feature information of the document images are extracted, and whether the document image clustering effect meets the work requirements is distinguished, and the title edit distance, text feature distance and visual feature distance of the document images are calculated based on the text feature information and visual feature information, and the calculated title edit distance, text feature distance, visual feature distance and distinction results are simultaneously imported into the fitting software, and the optimal first adjustment factor, the second adjustment factor, the third adjustment factor, the fourth adjustment factor, the preset text feature distance threshold, the preset visual feature distance threshold and the preset title edit distance threshold that meet the distinction accuracy of the distinction result are output.
[0045] This application also provides an intelligent clustering analysis system based on feature extraction, including:
[0046] A feature extraction module is used to collect document images and extract text feature information and visual feature information of the document images;
[0047] A text feature distance calculation module is used to calculate the title editing distance and text feature distance of the document image based on the text feature information;
[0048] A visual feature distance calculation module, used to calculate the visual feature distance of the document image based on the visual feature information;
[0049] The document image clustering module is used to cluster document images based on title edit distance, text feature distance and visual feature distance;
[0050] The cluster title generation module is used to generate cluster titles of clusters according to the clustering results to complete document image clustering;
[0051] The control module is used to control the operation of the feature extraction module, the text feature distance calculation module, the visual feature distance calculation module, the document image clustering module and the cluster title generation module.
[0052] An electronic device of the present application includes: a processor and a memory, wherein the memory stores a computer program that can be called by the processor, and the processor executes an intelligent clustering analysis method based on feature extraction by calling the computer program stored in the memory.
[0053] A computer-readable storage medium of the present application stores instructions, and when the instructions are executed on a computer, the computer is enabled to execute an intelligent clustering analysis method based on feature extraction.
[0054] Compared with the prior art, this application has the following advantages and beneficial effects:
[0055] This application first extracts the text feature information and visual feature information of the document image, then calculates the title editing distance, text feature distance and visual feature distance of the document image based on the text feature information and visual feature information, and finally clusters the document images by the title editing distance, text feature distance and visual feature distance. This can effectively solve the problem of fine-grained document image layout distinction and improve the accuracy and reliability of document image clustering. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0057] Figure 1 It is a schematic diagram of the overall process of the intelligent clustering analysis method based on feature extraction provided in the embodiment of the present application;
[0058] Figure 2 It is a schematic diagram of the process of clustering document images in the intelligent clustering analysis method based on feature extraction provided in an embodiment of the present application;
[0059] Figure 3 It is a structural diagram of the intelligent clustering analysis system based on feature extraction provided in an embodiment of the present application. DETAILED DESCRIPTION
[0060] The technical solution of the present application is described in detail below through the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present application and the specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations on the technical solution of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0061] Example 1
[0062] See also Figure 1 , Figure 1 1 is a schematic diagram of the overall process of the intelligent clustering analysis method based on feature extraction provided in an embodiment of the present application. This embodiment provides an intelligent clustering analysis method based on feature extraction, which specifically includes the following steps:
[0063] S1: Collect document images and extract text feature information and visual feature information of the document images;
[0064] Among them, the BERT model is used to extract text feature information from document images, and the ResNet50 model is used to extract visual feature information from document images.
[0065] S2: Calculate the title edit distance and text feature distance of the document image based on the text feature information;
[0066] By dividing the document image into multiple areas and identifying the character type of each area, the character type matching coefficient is calculated based on the distribution characteristics of different character types in the document image. The character type matching coefficient reflects the similarity of the document image in character type distribution. Furthermore, the overall text feature distance is calculated by combining the text content matching coefficient. The smaller the text feature distance, the higher the similarity of the document image in character type and text content. The specific steps of calculating the text feature distance include:
[0067] Obtaining text feature information of the document image, where the text feature information includes text content information and character type information in the document image;
[0068] Divide document images into Regions, identify the character type of each region, and set the character type to null if the region does not contain characters;
[0069] The character type matching coefficient of the document image is calculated based on the character type recognition result and text feature information of the region. The character type matching coefficient calculation formula is:
[0070] ;
[0071] In the formula Indicates Document image number The probability of a character type appearing, Indicates Document image number The probability of a character type appearing, Indicates the number of character types. Indicates Document image number The character type of the region, Indicates Document image number The character type of the region, Indicates the number of regions, represents the indicator function, when and At the same time, ,otherwise , represents the first adjustment factor, Indicates the character type matching coefficient;
[0072] The text content matching coefficient in the document image is calculated based on the text feature information, and the text content matching coefficient and the character type matching coefficient are substituted into the text feature distance calculation formula to calculate the text feature distance. The text feature distance calculation formula is:
[0073] ;
[0074] In the formula Indicates the text content matching coefficient, Indicates the character type matching coefficient, represents the second adjustment factor, Represents the text feature distance;
[0075] Edit distance is a method to measure string similarity. It measures string similarity by calculating the minimum number of operations required to convert one string into another. The operations include inserting, deleting, and replacing characters. The formula for calculating the text content matching coefficient is:
[0076] ;
[0077] In the formula Indicates Document image and The edit distance of the text content in the document image, Indicates The length of the text content in the document image. Indicates The length of the text content in the document image. Indicates taking and The maximum value in Indicates the text content matching coefficient.
[0078] S3: Calculate the visual feature distance of the document image based on the visual feature information;
[0079] The size matching coefficient and table matching coefficient of the document image calculated by visual feature information can quantify the similarity of the physical layout and structure of two documents. The size matching coefficient is obtained based on the width and height of the document image, reflecting the similarity of the document image in overall size. The table matching coefficient evaluates the similarity of the table layout and structure in the document image by analyzing the table information in the document image, and then obtains the visual feature distance of the document image by combining the size matching coefficient and the table matching coefficient. The visual feature distance quantifies the difference in visual features of the document image. The smaller the visual feature distance, the more similar the documents are in appearance and layout, which helps to cluster visually similar documents together in document clustering, ensuring that similar document images can be correctly identified and grouped. The specific steps for calculating the visual feature distance include:
[0080] Obtain visual feature information, which includes size information and table information of the document image;
[0081] The size matching coefficient and table matching coefficient of the document image are calculated based on the visual feature information. The size matching coefficient calculation formula is:
[0082] ;
[0083] In the formula Indicates The width of the document image. Indicates The width of the document image. Indicates The height of the document image. Indicates The height of the document image. represents the size matching coefficient;
[0084] Substitute the size matching coefficient and the table matching coefficient into the visual feature distance calculation formula to calculate the visual feature distance. The visual feature distance calculation formula is:
[0085] ;
[0086] In the formula represents the size matching coefficient, represents the table matching coefficient, represents the third adjustment factor, Indicates the visual feature distance;
[0087] In calculating the table matching coefficient, the table area ratio measures the relative proportion of the table content in the document by comparing the ratio of the table area to the total area of the document image. The Hausdorff distance of the table intersection evaluates the similarity of the table structure and position. The table matching coefficient comprehensively reflects the existence, size, position and structural differences of the table in the document image. The calculation formula of the table matching coefficient is:
[0088] ;
[0089] In the formula Indicates The table area in the document image, Indicates The area of the document image, Indicates The table area in the document image, Indicates The area of the document image, Indicates The table intersection set of document images, Indicates The table intersection set of document images, express and The Hausdorff distance, Indicates The diagonal length of the document image, Indicates The diagonal length of the document image, Indicates taking and The maximum value in represents the fourth adjustment factor, Represents the table matching coefficient.
[0090] S4: Cluster document images based on title edit distance, text feature distance, and visual feature distance;
[0091] Clustering document images through title edit distance, text feature distance and visual feature distance comprehensively utilizes the text content, visual appearance and title information of the document to determine the similarity of the document. The text feature distance evaluates the similarity of the text content and character type of the document and is used for preliminary clustering. The visual feature distance measures the physical layout and structural characteristics of the document to ensure that visually similar documents can be classified together. The title edit distance further subdivides the clusters by calculating the differences between titles, ensuring that the document images in the final clustering results are not only similar in content and appearance, but also in title consistency. Through the multi-level and multi-dimensional clustering process, different document images can be more accurately identified and classified, improving the accuracy of clustering. Please refer to Figure 2 , Figure 2 : is a schematic diagram of the process of clustering document images in the intelligent clustering analysis method based on feature extraction provided in an embodiment of the present application. The specific steps of clustering document images include:
[0092] Get title edit distance, text feature distance and visual feature distance;
[0093] Generate initial clusters based on text feature distances, cluster document images whose text feature distances are less than or equal to a preset text feature distance threshold into initial clusters, and obtain an initial cluster set;
[0094] The initial clusters are clustered according to the visual feature distance, and the document images in each initial cluster in the initial cluster set are traversed. If the visual feature distance of the document images in the same initial cluster is less than the preset visual feature distance threshold, no clustering is performed. Otherwise, the document images with a visual feature distance greater than or equal to the preset visual feature distance threshold are clustered to form new clusters, thereby obtaining a second cluster set;
[0095] The clusters in the second cluster set are clustered according to the title edit distance, and the document images in each cluster in the second cluster set are traversed. If the title edit distance of the document images in the same cluster is less than the preset title edit distance threshold, no cluster division is performed. Otherwise, the document images with a title edit distance greater than or equal to the preset title edit distance threshold are divided into new clusters to obtain the final clustering results.
[0096] S5: Generate cluster titles of clusters according to the clustering results, and complete document image clustering;
[0097] To ensure that the cluster title can represent the themes of most document images in the cluster, make the cluster title more general and representative, and more intuitively display the clustering effect, the title text with the highest frequency of occurrence is used as the cluster title of the cluster cluster. The specific steps for generating the cluster title of the cluster cluster include:
[0098] Extracting the title text of all document images in each cluster in the clustering result. The title text extraction process specifically includes: identifying the position of the text block and the text content of the text block in the document image based on the OCR technology, detecting the position of the title area based on the YOLO model, comparing the position of the title area with the position of the text block in the OCR recognition result, and extracting the text in the title area as the title text;
[0099] Count the frequency of occurrence of different title texts in clusters;
[0100] The title text with the highest frequency of occurrence is used as the cluster title of the cluster.
[0101] Example 2
[0102] See also Figure 3 , Figure 3 : is a schematic diagram of the structure of an intelligent clustering analysis system based on feature extraction provided in an embodiment of the present application. This embodiment provides an intelligent clustering analysis system based on feature extraction, including:
[0103] A feature extraction module is used to collect document images and extract text feature information and visual feature information of the document images;
[0104] A text feature distance calculation module is used to calculate the title editing distance and text feature distance of the document image based on the text feature information;
[0105] A visual feature distance calculation module, used to calculate the visual feature distance of the document image based on the visual feature information;
[0106] The document image clustering module is used to cluster document images based on title edit distance, text feature distance and visual feature distance;
[0107] The cluster title generation module is used to generate cluster titles of clusters according to the clustering results to complete document image clustering;
[0108] The control module is used to control the operation of the feature extraction module, the text feature distance calculation module, the visual feature distance calculation module, the document image clustering module and the cluster title generation module.
[0109] In this embodiment, the text feature distance calculation module is used to calculate the title edit distance and text feature distance of the document image according to the text feature information.
[0110] The specific steps for calculating text feature distance include:
[0111] Obtaining text feature information of the document image, where the text feature information includes text content information and character type information in the document image;
[0112] Divide document images into Regions, identify the character type of each region, and set the character type to null if the region does not contain characters;
[0113] The character type matching coefficient of the document image is calculated based on the character type recognition result and text feature information of the region. The character type matching coefficient calculation formula is:
[0114] ;
[0115] In the formula Indicates Document image number The probability of a character type appearing, Indicates Document image number The probability of a character type appearing, Indicates the number of character types. Indicates Document image number The character type of the region, Indicates Document image number The character type of the region, Indicates the number of regions, represents the indicator function, when and At the same time, ,otherwise , represents the first adjustment factor, Indicates the character type matching coefficient;
[0116] The text content matching coefficient in the document image is calculated based on the text feature information, and the text content matching coefficient and the character type matching coefficient are substituted into the text feature distance calculation formula to calculate the text feature distance. The text feature distance calculation formula is:
[0117] ;
[0118] In the formula Indicates the text content matching coefficient, Indicates the character type matching coefficient, represents the second adjustment factor, Represents the text feature distance;
[0119] The calculation formula for the text content matching coefficient is:
[0120] ;
[0121] In the formula Indicates Document image and The edit distance of the text content in the document image, Indicates The length of the text content in the document image. Indicates The length of the text content in the document image. Indicates taking and The maximum value in Indicates the text content matching coefficient.
[0122] In this embodiment, the visual feature distance calculation module is used to calculate the visual feature distance of the document image according to the visual feature information. The specific steps of calculating the visual feature distance include:
[0123] Obtain visual feature information, which includes size information and table information of the document image;
[0124] The size matching coefficient and table matching coefficient of the document image are calculated based on the visual feature information. The size matching coefficient calculation formula is:
[0125] ;
[0126] In the formula Indicates The width of the document image. Indicates The width of the document image. Indicates The height of the document image. Indicates The height of the document image. represents the size matching coefficient;
[0127] Substitute the size matching coefficient and the table matching coefficient into the visual feature distance calculation formula to calculate the visual feature distance. The visual feature distance calculation formula is:
[0128] ;
[0129] In the formula represents the size matching coefficient, represents the table matching coefficient, represents the third adjustment factor, Indicates the visual feature distance;
[0130] The calculation formula of the table matching coefficient is:
[0131] ;
[0132] In the formula Indicates The table area in the document image, Indicates The area of the document image, Indicates The table area in the document image, Indicates The area of the document image, Indicates The table intersection set of document images, Indicates The table intersection set of document images, express and The Hausdorff distance, Indicates The diagonal length of the document image, Indicates The diagonal length of the document image, Indicates taking and The maximum value in represents the fourth adjustment factor, Represents the table matching coefficient.
[0133] In this embodiment, the document image clustering module is used to cluster document images according to the title edit distance, text feature distance and visual feature distance. The specific steps of clustering document images include:
[0134] Get title edit distance, text feature distance and visual feature distance;
[0135] Generate initial clusters based on text feature distances, cluster document images whose text feature distances are less than or equal to a preset text feature distance threshold into initial clusters, and obtain an initial cluster set;
[0136] The initial clusters are clustered according to the visual feature distance, and the document images in each initial cluster in the initial cluster set are traversed. If the visual feature distance of the document images in the same initial cluster is less than the preset visual feature distance threshold, no clustering is performed. Otherwise, the document images with a visual feature distance greater than or equal to the preset visual feature distance threshold are clustered to form new clusters, thereby obtaining a second cluster set;
[0137] The clusters in the second cluster set are clustered according to the title edit distance, and the document images in each cluster in the second cluster set are traversed. If the title edit distance of the document images in the same cluster is less than the preset title edit distance threshold, no cluster division is performed. Otherwise, the document images with a title edit distance greater than or equal to the preset title edit distance threshold are divided into new clusters to obtain the final clustering results.
[0138] In this embodiment, the cluster title generation module is used to generate cluster titles of cluster clusters according to the clustering results to complete the document image clustering. The specific steps of generating cluster titles of cluster clusters include:
[0139] Extract the title text of all document images in each cluster in the clustering results;
[0140] Count the frequency of occurrence of different title texts in clusters;
[0141] The title text with the highest frequency of occurrence is used as the cluster title of the cluster.
[0142] For the above-mentioned parameters and steps for each unit module to implement corresponding functions in the feature extraction-based intelligent clustering analysis system of the present application, reference can be made to the parameters and steps in the embodiment of the feature extraction-based intelligent clustering analysis method above, and no further details will be given here.
[0143] Example 3
[0144] A computer-readable storage medium of an embodiment of the present application stores a computer program thereon, and when the computer program is executed by a processor, the above-mentioned intelligent clustering analysis method based on feature extraction is implemented. It should be noted that all computer programs of the intelligent clustering analysis method based on feature extraction are implemented using C language, wherein the control feature extraction module, the text feature distance calculation module, the visual feature distance calculation module, the document image clustering module, the cluster title generation module and the control module are all controlled by a remote server.
[0145] Example 4
[0146] This embodiment provides a computer-readable storage medium having a rewritable computer program stored thereon;
[0147] When the computer program runs on a computer device, the computer device is enabled to execute the above-mentioned intelligent clustering analysis method based on feature extraction.
[0148] For example, the computer readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
Claims
1. Intelligent clustering analysis method based on feature extraction, characterized in that: The steps include: Collect document images and extract text feature information and visual feature information of the document images; Calculate the title edit distance and text feature distance of the document image based on the text feature information; Calculate the visual feature distance of the document image based on the visual feature information; Cluster document images based on title edit distance, text feature distance, and visual feature distance; Generate cluster titles of clusters according to clustering results to complete document image clustering; The specific steps of calculating the text feature distance include: Obtaining text feature information of the document image, where the text feature information includes text content information and character type information in the document image; Divide document images into Regions, identify the character type of each region, and set the character type to null if the region does not contain characters; The character type matching coefficient of the document image is calculated based on the character type recognition result and text feature information of the region. The character type matching coefficient calculation formula is: ; In the formula Indicates Document image number The probability of a character type appearing, Indicates Document image number The probability of a character type appearing, Indicates the number of character types. Indicates Document image number The character type of the region, Indicates Document image number The character type of the region, Indicates the number of regions, represents the indicator function, when and At the same time, ,otherwise , represents the first adjustment factor, Indicates the character type matching coefficient; The text content matching coefficient in the document image is calculated based on the text feature information, and the text content matching coefficient and the character type matching coefficient are substituted into the text feature distance calculation formula to calculate the text feature distance. The text feature distance calculation formula is: ; In the formula Indicates the text content matching coefficient, Indicates the character type matching coefficient, represents the second adjustment factor, Represents the text feature distance; The calculation formula of the text content matching coefficient is: ; In the formula Indicates Document image and The edit distance of the text content in the document image, Indicates The length of the text content in the document image. Indicates The length of the text content in the document image. Indicates taking and The maximum value in Indicates the text content matching coefficient; The specific steps of calculating the visual feature distance include: Obtain visual feature information, which includes size information and table information of the document image; The size matching coefficient and table matching coefficient of the document image are calculated based on the visual feature information. The size matching coefficient calculation formula is: ; In the formula Indicates The width of the document image. Indicates The width of the document image. Indicates The height of the document image. Indicates The height of the document image. represents the size matching coefficient; Substitute the size matching coefficient and the table matching coefficient into the visual feature distance calculation formula to calculate the visual feature distance. The visual feature distance calculation formula is: ; In the formula represents the size matching coefficient, represents the table matching coefficient, represents the third adjustment factor, Indicates the visual feature distance; The calculation formula of the table matching coefficient is: ; In the formula Indicates The table area in the document image, Indicates The area of the document image, Indicates The table area in the document image, Indicates The area of the document image, Indicates The table intersection set of document images, Indicates The table intersection set of document images, express and The Hausdorff distance, Indicates The diagonal length of the document image, Indicates The diagonal length of the document image, Indicates taking and The maximum value in represents the fourth adjustment factor, Represents the table matching coefficient.
2. The intelligent clustering analysis method based on feature extraction according to claim 1 is characterized in that: The specific steps of clustering document images include: Get title edit distance, text feature distance and visual feature distance; Generate initial clusters based on text feature distances, cluster document images whose text feature distances are less than or equal to a preset text feature distance threshold into initial clusters, and obtain an initial cluster set; The initial clusters are clustered according to the visual feature distance, and the document images in each initial cluster in the initial cluster set are traversed. If the visual feature distance of the document images in the same initial cluster is less than the preset visual feature distance threshold, no clustering is performed. Otherwise, the document images with a visual feature distance greater than or equal to the preset visual feature distance threshold are clustered to form new clusters, thereby obtaining a second cluster set; The clusters in the second cluster set are clustered according to the title edit distance, and the document images in each cluster in the second cluster set are traversed. If the title edit distance of the document images in the same cluster is less than the preset title edit distance threshold, no cluster division is performed. Otherwise, the document images with a title edit distance greater than or equal to the preset title edit distance threshold are divided into new clusters to obtain the final clustering results.
3. The intelligent clustering analysis method based on feature extraction according to claim 1, characterized in that: The specific steps of generating cluster titles of clusters include: Extract the title text of all document images in each cluster in the clustering results; Count the frequency of occurrence of different title texts in clusters; The title text with the highest frequency of occurrence is used as the cluster title of the cluster.
4. An intelligent clustering analysis system based on feature extraction, which is implemented based on the intelligent clustering analysis method based on feature extraction according to any one of claims 1 to 3, characterized in that: The system comprises: A feature extraction module is used to collect document images and extract text feature information and visual feature information of the document images; A text feature distance calculation module is used to calculate the title editing distance and text feature distance of the document image based on the text feature information; A visual feature distance calculation module, used to calculate the visual feature distance of the document image based on the visual feature information; The document image clustering module is used to cluster document images based on title edit distance, text feature distance and visual feature distance; The cluster title generation module is used to generate cluster titles of clusters according to the clustering results to complete document image clustering; The control module is used to control the operation of the feature extraction module, the text feature distance calculation module, the visual feature distance calculation module, the document image clustering module and the cluster title generation module.
5. An electronic device, comprising: A processor and a memory, wherein the memory stores a computer program that can be called by the processor; characterized in that the processor executes the intelligent clustering analysis method based on feature extraction as described in any one of claims 1 to 3 by calling the computer program stored in the memory.
6. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer executes the intelligent clustering analysis method based on feature extraction as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Document processing method, device and equipment and computer readable storage medium
CN111782808A
Document information extraction for computer manipulation
US20220036063A1
