A method, system and storage medium for automatically checking drug application documents

Through automated form comparison methods, the inconsistency of forms in drug declaration documents is identified and analyzed, which solves the problem of large workload of manual inspection, improves the review efficiency and accuracy, and ensures the compliance of drug declaration documents.

CN112883701BActive Publication Date: 2025-01-07MINGDU ZHIYUN (ZHEJIANG) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110221496.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-07-28
Filing Date
2021-02-27
Publication Date
2025-01-07
Estimated Expiration
2041-02-27

AI Technical Summary

Technical Problem

Due to the high similarity, mutual reference and nesting of forms in drug declaration documents, the workload of artificial inspections is large, and errors are difficult to detect, which affects compliance and drug market progress.

Method used

By obtaining the cell coordinates and contents of the two tables in the file to be analyzed, identifying the cells that are consistent in the content, and performing comparison and analysis, considering the embedding of small tables into large tables, transpose rows and columns, and order disorders, finding out the coordinates and positions of inconsistent cells. , reduce the repetitive work of manual inspections.

Benefits of technology

It realizes rapid and accurate comparison of the table, discovers and locates inconsistent cells and content differences in related tables, reduces the number of results presented to users, and improves the review efficiency and accuracy of drug declaration documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112883701B_ABST
    Figure CN112883701B_ABST
Patent Text Reader

Abstract

The invention discloses an automatic inspection method, system and storage medium for drug application documents, including obtaining the coordinates and contents of each cell of two tables in the drug application document to be analyzed and identifying cells with consistent contents; when the first table has N more rows than the second table but the same number of columns or N more columns but the same number of rows, and N is less than a first preset value, obtaining additional columns or additional rows in the first table that are all inconsistent cells; after removing the M rows or M columns from the minimum table matrix of the first table, a transition table matrix is ​​formed, and the contents of each cell at the corresponding position of the transition table matrix and the minimum table matrix of the second table are compared in turn, and if they are different, they are supplemented and entered into an abnormal cell group; if the additional column or additional row is not located in the minimum table matrix of the first table, the coordinates and contents of all cells of the additional column or additional row are recorded, and supplemented and entered into the abnormal cell groups of the two tables. Finally, the number of abnormal data cell results presented to the user is reduced, so that the user can quickly check and find errors and abnormal tables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing and analysis, and in particular to an automatic checking method, system and storage medium for drug application documents. Background Art

[0002] In recent years, the state has tightened its supervision over pharmaceutical companies, and more and more regulations have been introduced, and the implementation has become increasingly strict. According to regulatory requirements, pharmaceutical companies need to submit a large number of documents when applying for new drugs, and all submitted documents must be authentic and compliant. If there are inconsistencies in the content of the document, the compliance of the entire product will not be met, and the company will be subject to compulsory measures such as rectification, and the listing of the drug will be seriously affected. Therefore, a special team will be set up within the company to be responsible for the review of all documents; if there are subsequent adjustments to the experimental methods or materials used, the previously approved documents must also be modified one by one, so the review of drug application documents is a very detailed and extremely important task.

[0003] In the work of processing drug application materials, it is often necessary to process a large number of documents, and there are a large number of tables in these documents. These tables have high similarity, mutual references, and nesting. At the same time, due to the large processing workload and other reasons, multiple users are often required to collaborate in document editing. For example, when pharmaceutical research and development institutions prepare to organize drug application materials, there are a large number of documents and a large number of tables in the documents. These tables have various situations such as high similarity, mutual references, and nesting. At the same time, since these related tables are manually organized by multiple people, there are often various errors such as inconsistent corresponding cell content, missing table rows and columns, and disordered table row and column order. However, due to the large number of tables and their distribution in a large number of different documents, this causes a huge workload for later manual inspections, and the above-mentioned errors are difficult to find, which ultimately directly leads to data errors and difficulty in meeting compliance requirements, which seriously delays the progress of drug application. Summary of the invention

[0004] In view of the deficiencies in the prior art, the present invention provides an automatic inspection method for drug application documents, comprising the following steps:

[0005] Obtain the coordinates and contents of each cell of the two tables in the drug application document to be analyzed, and identify cells with consistent contents;

[0006] When the first table has N more rows than the second table but the same number of columns, or N more columns than the second table but the same number of rows, and N is less than a first preset value, obtaining additional columns or additional rows in the first table that are all inconsistent cells;

[0007] If part or all of the additional columns or additional rows are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more rows than the minimum table matrix of the second table but the same number of columns, or M more columns than the second table but the same number of rows, and M is less than a second preset value, obtain the M rows or M columns with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M rows or M columns into the abnormal cell group, and the minimum table matrix is ​​the minimum rectangular table area containing all the consistent cells in the table;

[0008] After removing the M rows or M columns from the minimum table matrix of the first table, a transition table matrix is ​​formed, and the contents of each cell at the corresponding position of the transition table matrix and the minimum table matrix of the second table are compared in turn to see if they are the same. If they are different, they are supplemented and entered into the abnormal cell group;

[0009] If the additional column or row is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional column or row are recorded and added to the abnormal cell group of the two tables.

[0010] Preferably, the automatic inspection method of drug application documents specifically includes:

[0011] When the first table has N more rows than the second table but the same number of columns, and N is greater than a first preset value, no column comparison analysis is performed;

[0012] When N is not greater than a first preset value, obtaining an additional row containing all inconsistent cells in the first table;

[0013] If part or all of the additional rows are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more rows than the minimum table matrix of the second table, and M is less than a second preset value, obtain the M rows with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M rows into the abnormal cell group, and the minimum table matrix is ​​the minimum rectangular table area containing all the consistent cells in the table;

[0014] If the additional row is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional row are recorded and added to the abnormal cell group of the two tables.

[0015] Preferably, the automatic inspection method of drug application documents specifically includes:

[0016] When the first table has N more columns than the second table but the same number of rows, and N is greater than a first preset value, no column comparison analysis is performed;

[0017] When N is not greater than a first preset value, obtaining an additional column containing all inconsistent cells in the first table;

[0018] If part or all of the additional columns are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more columns than the minimum table matrix of the second table, and M is less than a second preset value, obtain the M columns with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M columns into the abnormal cell group, and the minimum table matrix is ​​the minimum rectangular table area containing all the consistent cells in the table;

[0019] If the additional column is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional column are recorded and added to the abnormal cell group of the two tables.

[0020] Preferably, the method for automatically checking drug application documents further comprises the following steps:

[0021] Compare the structured data of each table in the declaration document pair by pair, obtain the coordinates and contents of the cells with consistent contents in the two tables, determine whether there is a correlation between the two tables, and perform subsequent analysis of abnormal cell groups for the two tables that have a correlation.

[0022] Preferably, the step of determining whether there is an association relationship between the two tables specifically includes the following steps:

[0023] Compare the structured data of the two tables pair by pair, and obtain the coordinates and contents of the cells with the same contents in the two tables;

[0024] The association status of the two tables is determined according to the number and / or distribution positions of cells with consistent contents.

[0025] Preferably, the step of determining the association status of the two tables according to the number and / or distribution position of cells with consistent content specifically includes:

[0026] Get the number of cells with consistent content in each table and their distribution positions in the table;

[0027] Obtaining the minimum table matrix of each table, wherein the minimum table matrix is ​​the minimum rectangular table area containing all cells with consistent contents in the table;

[0028] When the number of cells with consistent content is greater than a preset value, and / or twice the number of cells with consistent content is greater than a preset ratio of the sum of the number of cells contained in the two tables, and / or the number of cells with consistent content is greater than a preset ratio of the total number of cells in the smallest table matrix in which it is located, the two tables are judged to be an associated table pair with an associated relationship.

[0029] Preferably, the method for automatically checking drug application documents further comprises the following steps:

[0030] Compare the contents of cells with inconsistent contents in the abnormal cell group, and find and mark the inconsistent character sets in the cell contents.

[0031] Preferably, the first table and the second table are located in two different electronic documents.

[0032] The present invention also discloses an automatic inspection system for drug application documents, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above methods when executing the computer program.

[0033] The present invention also discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0034] The automatic inspection method of the drug application document disclosed in the present invention obtains the coordinates and contents of the cells in the first table and the second table to be analyzed respectively, identifies the cells with the same contents, and performs subsequent comparative analysis through the two table pairs, thereby greatly reducing the amount of calculation for comparative analysis. In the process of comparative analysis of the two tables, various situations such as the embedding of a small table into a large table, the transposition of the rows and columns of the table, the disorder of the order of the rows and columns of the table, the missing of the rows and columns inside and around the table, etc. are fully considered, and the inconsistent cell coordinates and positions between the two tables are found according to the states of each situation of the two tables. Finally, the abnormal result processing step can exclude the inconsistent cells generated by the disorder of the order of rows and columns and the missing of rows and columns, and screen out the truly abnormal table pairs and the inconsistent character sets in the inconsistent cells according to the real inconsistent cells found and the inconsistent character sets in the inconsistent cell contents, and finally reduce the number of results presented to the user, so as to facilitate the user to quickly check and find errors and abnormal tables. The comparative analysis of the two tables can be realized, and the cells and cell content differences of the associated tables that are inconsistent can be found and located. It is suitable for scenes where a large number of similar tables need to be processed, and the tables are nested and reused in many places, which can reduce a large amount of repetitive work of manually checking the consistency of the tables and avoid errors in the inconsistent contents of the corresponding cells of the associated tables.

[0035] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0037] Figure 1The figure is a flow chart of the method for automatically checking drug application documents disclosed in this embodiment.

[0038] Figure 2 This is a schematic diagram of a specific flow chart of step S21 disclosed in this embodiment.

[0039] Figure 3 This is a schematic diagram of the transformation of the table to be analyzed disclosed in this embodiment.

[0040] Figure 4 This is a schematic diagram of a specific flow of step S212 disclosed in this embodiment.

[0041] Figure 5 This is a schematic diagram of the specific flow of step S3 disclosed in this embodiment.

[0042] Figure 6 This is a schematic diagram of a specific flow chart of step S32 in state 1 disclosed in this embodiment.

[0043] Figure 7 This is a schematic diagram of a specific flow chart of step S32 disclosed in this embodiment in state two.

[0044] Figure 8 This is a schematic diagram of a specific flow chart of step S32 disclosed in this embodiment in state three-one.

[0045] Fig. 9 This is a specific flowchart of step S32 disclosed in this embodiment in another situation of state three.

[0046] Fig.10 This is a schematic diagram of a specific flow chart of step S32 disclosed in this embodiment in state 41.

[0047] Fig.11 This is a specific flowchart of step S32 disclosed in this embodiment in another situation of state 4. DETAILED DESCRIPTION

[0048] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] In the description of the present invention, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0050] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0051] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0052] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may include that the first and second features are in direct contact, or may include that the first and second features are not in direct contact but are in contact through another feature between them. Moreover, a first feature being "above", "above" and "above" a second feature includes that the first feature is directly above and obliquely above the second feature, or simply indicates that the first feature is higher in level than the second feature. A first feature being "below", "below" and "below" a second feature includes that the first feature is directly below and obliquely below the second feature, or simply indicates that the first feature is lower in level than the second feature.

[0053] Unless otherwise defined, the technical or scientific terms used herein shall have the common meanings understood by persons with ordinary skills in the field to which the present invention belongs. The words "first", "second" and similar words used in the patent application specification and claims of the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. Similarly, words such as "one" or "a" do not indicate a quantity limitation, but indicate the existence of at least one.

[0054] At present, various enterprises, such as pharmaceutical research and development institutions, have a large number of documents when preparing and organizing drug application materials, and there are a large number of tables in the documents. These tables generally have high similarities, mutual references, and nesting. Since these related tables are often manually organized by multiple people, it is inevitable that various errors will appear in these tables, such as inconsistent corresponding cell contents, missing rows and columns in tables, and disordered row and column order. In addition, since there are many tables and they are distributed in a large number of different documents, the workload of manual inspection in the later stage is extremely large, making it difficult to discover the above errors completely and quickly, resulting in data errors and difficulty in meeting material compliance requirements. In response to these technical issues, as shown in the attached Figure 1 As shown, this embodiment discloses a method for automatically checking drug application documents, which specifically includes:

[0055] Step S1, obtaining the coordinates and contents of each cell of two tables in the drug application document to be analyzed, and identifying cells with consistent contents.

[0056] Specifically, the coordinates and contents of each cell of two tables in the electronic document to be analyzed are obtained, and table structured data corresponding to the coordinates and contents of each table cell are generated respectively. The table structured data may include information such as the document to which the table belongs, the position of the table in the document, the coordinates of the cells in the table, and / or the contents of the cells. The first table and the second table may be located in different electronic documents or in the same electronic document.

[0057] By obtaining the coordinates and contents of each cell of the table, each table is processed into a data structure in which the cell coordinates and the cell contents correspond one to one. Specifically, existing tools and methods can be used to read tables in documents of various formats such as Word, Excel, PDF, etc., traverse each cell of the table, and form a string with the coordinates of all cells separated by spaces; the contents of all cells are also separated by spaces to form a string, and it is necessary to ensure that the coordinates of the cells correspond to the contents one to one. In some specific embodiments, due to the presence of merged cells in the table, when reading the coordinates of each cell of the table, it is necessary to ensure that the row coordinates of the cells in the same row are equal, and the column coordinates of the cells in the same column are equal. For the missing cell coordinates generated by the merged cells in this type of situation, they can be supplemented with empty content, or the cell content of the corresponding coordinates can be empty.

[0058] Specifically, each table can form the following data structure:

[0059] {

[0060] String fileId; / / The id of the document where the table is located

[0061] Integer location; / / The location of the table in the document

[0062] String coordinate; / / Coordinate information of all cells in the table

[0063] String content; / / Content information of all cells in the table

[0064] }

[0065] The fileId and location fields are used to indicate the document to which the table belongs and its position in the document, and are used to locate the table when presenting the table analysis and comparison results to the user. The coordinate and content fields are cell coordinates and content information, which are used for table association analysis and comparison analysis. The structured data of the table can be used directly for subsequent analysis, but when the number of tables is large, the structured data will take up a lot of memory; in order to avoid performing structured operations for each analysis, it is recommended to persist the table structured data. You can choose any relational or non-relational database, such as MySQL, SqlServer, Oracle, MongoDB, Elasticsearch, etc. to persist the table structured data. By extracting the table cell coordinates and content to form table structured data, ensure that the row and column coordinates of cells in the same row and column are consistent, in preparation for subsequent analysis.

[0066] Step S2, obtaining a minimum table matrix of the two tables, wherein the minimum table matrix is ​​a minimum rectangular table area containing cells with all the consistent contents in the table.

[0067] In some specific embodiments, the step further includes:

[0068] Step S21, compare the structured data of each table pair by pair, obtain the coordinates and contents of the cells with the same contents in the two tables, and determine whether the two tables have an association relationship. This step is used to filter out tables with associated contents for the next step of comparative analysis. Non-associated tables are treated as two completely different tables and no longer subjected to comparative analysis. That is, when two tables do not have an association relationship, they can be considered as normal different tables, and there is no need to present the difference between different tables without an association relationship to the user. Because the method disclosed in the present invention is used to identify to the user those cells whose contents should be the same in different documents or different tables of the same document but may have inconsistent contents due to human errors.

[0069] As attached Figure 2 As shown, the step S21 specifically includes:

[0070] Step S211 , comparing the two tables of structured data pair by pair, and obtaining the coordinates and contents of cells with consistent contents in the two tables.

[0071] Step S212, judging the association status of the two tables according to the number and / or distribution position of cells with the same content. Figure 4 As shown, the step S212 further includes:

[0072] Step S2121, obtaining the number of cells with consistent content in each table and their distribution positions in the table

[0073] Step S2122, obtaining the minimum table matrix of each table, wherein the minimum table matrix is ​​the minimum rectangular table area containing all cells with consistent contents in the table.

[0074] Specifically, taking the two tables A and B as examples, take the structured data of table A, and parse the coordinate and content fields into two linked lists, coordinateListA and contentListA respectively. The coordinates and contents of the corresponding index positions of the two linked lists correspond one to one. Similarly, take the structured data of table B and parse it to get coordinateListB and contentListB. Traverse the linked lists contentListA and contentListB to find the equal elements; find the corresponding coordinates in coordinateListA and coordinateListB according to the content elements respectively. The coordinates of the cells with the same content in tables A and B can form a dictionary sameCell, where the key value is the coordinates of the cells with the same content in table A, and the value is the coordinates of the cells with the same content in table B.

[0075] Convert tables A and B into matrices, as shown in the attached Figure 3 As shown, taking Form A as an example, Figure 3 The table shown is the original table matrix. The table matrix A is initialized as the original matrix according to the coordinates, and the initial value of each element is 0. According to the dictionary sameCell, the elements at the same cell coordinate position are rewritten as 1, and the coordinate of the lower right corner 1 is formed into a large matrix. Remove the rows and columns with all 0s on the top and left of the large matrix to obtain the minimum table matrix and the coordinates of the first element of the minimum table matrix. Specifically, the multiple cells surrounded by the dotted border constitute the large matrix, and the multiple cells filled with gray constitute the minimum table matrix. The minimum table matrix can be regarded as a small table embedded in the large table. The coordinates of each matrix start from 0. The coordinates of the first element [0, 0] of the minimum table matrix in the above figure are [2, 2] in the large matrix, that is, the coordinates of the first element of the minimum table matrix.

[0076] Step S2123, when the number of cells with consistent content is greater than a preset value, and / or twice the number of cells with consistent content is greater than a preset ratio of the sum of the number of cells contained in the two tables, and / or the number of cells with consistent content is greater than a preset ratio of the total number of cells in the minimum table matrix, the two tables are judged to be an associated table pair with an association.

[0077] Specifically, after obtaining the matrices of tables A and B, it is determined whether the two tables A and B are associated tables. The determination rule of the associated tables can be formulated based on experience and actual conditions. The preset determination rule in this embodiment can be:

[0078] The two tables must have at least n cells with the same content, that is, the number of 1s in the minimum table matrix is ​​greater than n.

[0079] The twice of the number of identical cells must be greater than m percent of the sum of the number of cells in the two tables.

[0080] The number of rows and columns of the minimum table matrix of Table A and Table B must be greater than 1, and the number of 1s must be greater than L percent of the total number of elements in the minimum table matrix.

[0081] Only when one or more of the above rules are met can they be associated tables with an associated relationship, otherwise they may be two unrelated tables. In this embodiment, the preferred recommended value of n is 3, the recommended value of m is 50, and the recommended value of L is 50. Of course, they can also be set separately according to the specific document situation.

[0082] By analyzing the minimum table matrix of the two tables, we can fully consider the situation where some table contents are nested, that is, when a small table is embedded in the rest of the large table, only the embedded small table content has an association relationship with the other table. At this time, it is necessary to distinguish the area where the small table embedded in the table is located by obtaining the minimum table matrix, and then compare the embedded table area with other tables or nested areas in other tables to determine the mutual association relationship. In addition, under normal circumstances, human errors will only cause a small number of errors, that is, a small number of inconsistent cells are generated in the associated table. Therefore, when the number of inconsistent cells in the two tables being analyzed is too large, that is, the two tables are very different, they can be considered as normal unrelated different tables and do not need to be presented to the user.

[0083] Through the above steps, all structured tables are traversed to find the associated table pairs, their consistent cell coordinate dictionary sameCell, and the table matrix as the input parameters for the next comparative analysis. Table association analysis is performed by comparing the cell contents of each table, and the minimum table matrix formed by cells with consistent contents is established. The two tables are screened to see whether they are associated table pairs according to the preset custom criteria. Subsequent comparative analysis is only performed on associated table pairs, which greatly reduces the amount of calculation for comparative analysis.

[0084] Step S3, obtaining an abnormal cell group according to the difference between the minimum table matrices of the two tables and the positions in the corresponding tables, wherein the abnormal cell group includes but is not limited to the coordinates and contents of cells with inconsistent contents.

[0085] As attached Figure 5 As shown, the step S3 specifically includes:

[0086] S31, respectively obtaining the number of rows and the number of columns of the first table and the second table;

[0087] S32, when the difference in the number of rows or columns between the first table and the second table is less than a preset value, the abnormal cell group is obtained according to the difference between the minimum table matrices of the two tables and the position in the corresponding table, otherwise no subsequent difference analysis is performed.

[0088] In this embodiment, step S3 can be specifically divided into the following states for processing respectively:

[0089] In state 1, it is determined that the number of rows and columns of the minimum table matrices in the two tables of the associated table pair is the same.

[0090] In state 2, the minimum table matrix of one of the two tables judged to be an associated table pair has the same number of rows and columns as the minimum table matrix of the other table after transposition.

[0091] State three: the minimum table matrices in the two tables of the associated table pair differ by n in number of rows or n in number of columns, wherein n is less than a second preset value.

[0092] State four: the number of rows of the two tables judged to be an associated table pair differs by n, or the number of columns of the two tables differs by n, wherein n is less than a first preset value.

[0093] For state 1, the step is to obtain the abnormal cell group according to the difference between the minimum table matrices of the two tables and the position in the corresponding table, as shown in the attached Figure 6 As shown, specifically including:

[0094] Step S101 , when the number of rows and columns of the minimum table matrix of the first table is the same as the number of rows and columns of the minimum table matrix of the second table, traverse each cell of the minimum table matrix.

[0095] Step S102, compare whether the contents of the corresponding positions of the two minimum table matrices are equal, if they are equal, do not record the abnormal cell group, otherwise record the abnormal cell group. That is, if the cell contents of the corresponding positions of the two minimum table matrices are the same, do not record. That is, there are no abnormal cells with incorrect contents in the associated table pair.

[0096] Specifically, taking the associated table pair A and B in this embodiment as an example, when the number of rows and columns of the minimum table matrices of tables A and B are the same. Traverse each element of the minimum table matrix, compare whether the contents of the corresponding coordinates of the minimum table matrices of A and B are equal, record all unequal cell coordinates and contents in A and B respectively, and record the associated table pair at the same time to generate an abnormal cell group. The abnormal cell group can use a dictionary data structure DifTableCells, and the key value is an associated table pair, such as AB. The value value is a linked list formed by an array, and each element of the linked list is the coordinates and content of the inconsistent cells of the two tables, such as [A cell coordinates, A cell content, B cell coordinates, B cell content]. If the contents of the corresponding coordinates of the minimum table matrices of A and B are equal, the contents of tables A and B are consistent and no record is made.

[0097] For the situation in state 1, the step of filtering out the abnormal cell group on the associated table pair according to the distribution positions of the cells with inconsistent contents may specifically include the following steps:

[0098] S103, if the number of rows and the number of columns of the minimum table matrix of the first table are also the same, transposing the first table to form a first transposed table;

[0099] S104, comparing the minimum table matrix of the second table with the minimum table matrix of the first transposed table and identifying cells with inconsistent contents;

[0100] S105, if there are no cells with inconsistent contents, no subsequent difference analysis is performed, otherwise a second abnormal cell group is generated, the second abnormal cell group including but not limited to the coordinates and contents of cells with inconsistent contents between the first transposed table minimum table matrix and the second table minimum table matrix.

[0101] S106, comparing the number of inconsistent cells between the two minimum table matrices of the first and second tables with the number of inconsistent cells between the two minimum table matrices of the first transposed table and the second table;

[0102] S107, if the number of inconsistent cells between the two minimum table matrices of the first transposed table and the second table is small, obtain the inconsistent cell coordinates and contents between the two minimum table matrices of the first transposed table and the second table, and update the inconsistent cell coordinates and contents corresponding to the first and second tables in the abnormal cell group.

[0103] S108: If the number of inconsistent cells between the two minimum table matrices of the first transposed table and the second table is not less than the number of inconsistent cells between the two minimum table matrices of the first and second tables, then the abnormal cell group is not updated.

[0104] For example, in this embodiment, if the number of rows and columns of the minimum table matrices of A and B are equal, there is also the possibility that the contents of the two tables are consistent after transposition. After transposing a table, compare whether the elements of the corresponding coordinates are equal, and compare the number of cells with inconsistent contents obtained with the number of cells with inconsistent contents between the previous A and B tables. The smaller number is the correct comparison result. For example, in the transposed table C formed after the transposition of table A, traverse each cell in the minimum table matrix area of ​​transposed table C and table B, compare whether the elements or contents of the corresponding coordinates of the minimum table matrices of C and B are equal, and record all corresponding coordinates and contents of inconsistent cells in the minimum table matrices of C and B respectively, and record the associated table pair at the same time. If the number of inconsistent cells obtained after the analysis of the transposed table C formed after the transposition of table A and the minimum table matrix of table B is less than the number of inconsistent cells in the minimum table matrix of tables A and B obtained in the above steps. This indicates that the row content of table A may just correspond to the column content of table B, and the column content of table A may just correspond to the row content of table B. Only in this way can the transposed table have fewer cells with inconsistent content than the original table and the other table. By obtaining and screening the inconsistent cells before and after the transposition of two tables with the same number of rows and columns in the minimum table matrix, it is possible to effectively distinguish those tables that only swap the row and column content of the table. Such tables that only swap the row and column content can be considered as normal associated tables with the same content and do not need to be presented to the user.

[0105] For state 2, as shown in the attached Figure 7 As shown, the steps of obtaining the abnormal cell group according to the difference between the minimum table matrices of the two tables and the position in the corresponding table specifically include:

[0106] S201 , when the number of rows and the number of columns of the minimum table matrix of the second table after transposition are equal to those of the minimum table matrix of the first table, the second table is transposed to form a second transposed table.

[0107] S202, comparing the contents of the corresponding positions of the two minimum table matrices of the second transposed table and the first table to see if they are equal, if they are equal, then the abnormal cell group is not recorded, otherwise, the abnormal cell group is recorded. Specifically, if there are cells with inconsistent contents in the two minimum table matrices of the second transposed table and the first table, then the coordinates and contents of the cells with inconsistent contents are recorded in the abnormal cell groups corresponding to the first and second tables.

[0108] Specifically, in this embodiment, when one of the minimum table matrices of A and B is transposed, the number of rows and columns of the two matrices is consistent. For this situation, after transposing a table, traverse each cell in the minimum table matrix, compare whether the cell content or element of the corresponding coordinates of the minimum table matrices of A and B are equal, record all unequal cell coordinates and contents in A and B respectively, and record the associated table pair at the same time, generate or enter the abnormal cell group, wherein the data format of the abnormal cell group can be parameterized in the above steps. If the comparison results are equal, the contents of tables A and B are consistent and no recording is performed. In this embodiment, when one of the minimum table matrices of A and B is transposed, the number of rows and columns of the two matrices is consistent, which indicates that the content of the small table nested in the A table and the small table nested in the B table is likely to be replaced by each other between the row content and the column content, and the conversion of the table row and column content is only a difference in the way of expression, which can be considered as a normal associated table with the same content, and does not need to be presented to the user. It is only necessary to compare one of the small tables with the other small table after transposition, find out the real inconsistent content cells and present them to the user.

[0109] For state three, when the minimum table matrix of the first table has N more rows than the minimum table matrix of the second table but the same number of columns, or has N more columns but the same number of rows, and N is less than a preset value, obtain the N rows or N columns with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the N rows or N columns into the abnormal cell group.

[0110] After removing the N rows or N columns from the minimum table matrix of the first table, a transition table matrix is ​​formed, and the contents of each cell at the corresponding position of the transition table matrix and the minimum table matrix of the second table are compared in turn to see if they are the same. If they are different, they are added to the abnormal cell group.

[0111] Specifically, if the number of rows in the minimum table matrix in the two tables in state three differs by n, as shown in the attached Figure 8 As shown, the steps of obtaining the abnormal cell group according to the difference between the minimum table matrices of the two tables and the position in the corresponding table specifically include:

[0112] Step S301, when the number of rows of the minimum table matrix of the first table in the associated table pair is N more than the minimum table matrix of the second table, and N is less than a second preset value, obtain N rows with the most inconsistent cells in the minimum table matrix of the first table, and record the coordinates and contents of each cell in these N rows;

[0113] Step S302, removing the N rows from the minimum table matrix of the first table to form a transition table matrix;

[0114] Step S303, compare in turn whether the cell contents at corresponding positions of the transition table matrix and the minimum table matrix of the second table are the same. If there are different cells, an abnormal cell group is generated or entered. The abnormal cell group includes but is not limited to associated table pairs, coordinates and contents of cells with inconsistent contents between the transition table matrix and the second table, and coordinates and contents of the N rows of cells.

[0115] In this embodiment, the value of n can be pre-set according to the actual use environment, and in this embodiment, n is 2 for example. Specifically, when the number of rows of the minimum table matrix of A and B differs by more than 2 rows, it is considered that the two tables A and B are not associated tables, and no comparative analysis is performed. The case where the minimum table matrix of A has one more row than the minimum table matrix of B is specifically described. Find the row with the most "0" in the minimum table matrix of A, which is the extra row, and record the coordinates and content of each cell element in the row. Remove the row in the minimum table matrix of A, move up the elements below the row, and form table A'. Compare whether the cell content or elements of the corresponding coordinates of the minimum table matrix of A' and the minimum table matrix of B are equal. If they are not equal, record all unequal cell coordinates and contents respectively, and record the associated table pair at the same time, generate or enter the abnormal cell group, wherein the abnormal cell group includes but is not limited to the associated table pair, the coordinates and contents of the cells whose contents are inconsistent with the transition table matrix and the second table, and the coordinates and contents of the extra N rows of cells. The situation of other difference rows can be compared and analyzed with reference to the above method.

[0116] For the difference in the number of columns of the minimum table matrix between the two tables in state three, as shown in the attached Fig. 9 As shown, the steps of obtaining the abnormal cell group according to the difference between the minimum table matrices of the two tables and the position in the corresponding table specifically include:

[0117] Step S401, when the number of columns of the minimum table matrix of the first table in the associated table pair is N more than the minimum table matrix of the second table, and N is less than a second preset value, obtain the N columns with the most inconsistent cells in the minimum table matrix of the first table, and record the coordinates and contents of each cell in these N columns;

[0118] Step S402, removing the N columns from the minimum table matrix of the first table to form a transition table matrix;

[0119] Step S403, compare in turn whether the cell contents at corresponding positions of the transition table matrix and the minimum table matrix of the second table are the same. If there are different cells, an abnormal cell group is generated or entered. The abnormal cell group includes but is not limited to associated table pairs, coordinates and contents of cells with inconsistent contents between the transition table matrix and the second table, and coordinates and contents of the N columns of cells.

[0120] In this embodiment, the value of n can be pre-set according to the actual use environment. In this embodiment, n is 2 for example. Specifically, when the number of columns of the minimum table matrix of A and B differs by more than 2 columns, it is considered that the two tables A and B are not associated tables, and no comparative analysis is performed. The case where the minimum table matrix of A has one more column than the minimum table matrix of B is specifically described. Find the column with the most "0" in the minimum table matrix of A, which is the extra column, and record the coordinates and content of each cell element in the column. Remove the column in the minimum table matrix of A, shift the elements on the right side of the column to the left, and form table A'. Compare whether the cell content or elements of the corresponding coordinates of the minimum table matrix of A' and the minimum table matrix of B are equal. If they are not equal, record all unequal cell coordinates and contents respectively, and record the associated table pair at the same time, generate or enter the abnormal cell group, wherein the abnormal cell group includes but is not limited to the associated table pair, the coordinates and contents of the cells whose contents are inconsistent with the transition table matrix and the second table, and the coordinates and contents of the extra N columns of cells. The other phase difference situations can be compared and analyzed by referring to the above method.

[0121] In this embodiment, when the number of rows or columns of the minimum table matrices of Tables A and B differs by n rows or n columns. This means that the inconsistency of the cells in the rows or columns in the content of the small table nested in Table A and the small table nested in Table B is likely caused by human negligence during the specific table processing, which leads to disordered order of some rows and columns in the table and loss of rows and columns. Therefore, it is necessary to first exclude the inconsistent cells in the rows or columns in the nested tables caused by human errors, and then perform a comparison analysis of the corresponding cell contents to avoid the comparison of other cells being affected by these inconsistent cells in the entire row or column, so as to more accurately and quickly find the cells with inconsistent contents that may be caused by disordered order of rows and columns or loss of rows and columns, as well as other single inconsistent cells caused by input errors.

[0122] For the fourth state: the number of rows of the two tables judged as the associated table pair differs by n, or the number of columns differs by n, where n is less than a preset value. The automatic inspection method of the drug application document specifically includes the following steps:

[0123] Obtain the coordinates and contents of each cell in the two tables in the drug application document to be analyzed, and identify cells with consistent contents.

[0124] When the first table has N more rows than the second table but the same number of columns or N more columns but the same number of rows, and N is less than a first preset value, additional columns or additional rows in the first table that are all inconsistent cells are obtained.

[0125] If part or all of the additional columns or additional rows are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more rows than the minimum table matrix of the second table but the same number of columns, or M more columns but the same number of rows, and M is less than a second preset value, obtain the M rows or M columns with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M rows or M columns into the abnormal cell group, the minimum table matrix being the minimum rectangular table area containing all the cells that are consistent with the contents in the table.

[0126] After removing the M rows or M columns from the minimum table matrix of the first table, a transition table matrix is ​​formed, and the contents of each cell at the corresponding position of the transition table matrix and the minimum table matrix of the second table are compared in turn to see if they are the same. If they are different, they are added to the abnormal cell group.

[0127] If the additional column or row is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional column or row are recorded and added to the abnormal cell group of the two tables.

[0128] For one of the situations in state 4, the difference in the number of columns of the two tables in the associated table pair is n, where n is less than the preset value. Fig.10 As shown, the steps of obtaining the abnormal cell group according to the difference between the minimum table matrices of the two tables and the position in the corresponding table specifically include:

[0129] Step S501: when the first table has N more columns than the second table but the same number of rows, and N is greater than a first preset value, no column comparison analysis is performed.

[0130] Step S502: when N is not greater than a first preset value, obtaining an additional column in the first table that contains all inconsistent cells.

[0131] Step S503, if part or all of the additional columns are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more columns than the minimum table matrix of the second table, and M is less than a second preset value, obtain the M columns with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M columns into the abnormal cell group, the minimum table matrix being the minimum rectangular table area containing all the cells that are consistent with the contents in the table.

[0132] In other specific embodiments, when the number of columns of two tables differs by n columns, where n is not greater than R, the column positions of all inconsistent cells in the table with the larger number of columns are obtained, and if the column is partially or completely located in the minimum table matrix of the table, the steps of the aforementioned state three are followed.

[0133] Step S504: if the additional column is not located in the minimum table matrix of the first table, then all the cell coordinates and contents of the additional column are recorded and added to the abnormal cell group of the two tables.

[0134] Specifically, in this embodiment, since the minimum table matrix of the table is formed by removing inconsistent cells on all sides, the two tables may have different rows and columns on all sides. The first preset value can be specified according to the actual situation. In this embodiment, the first preset value is set to 2. For example, when the difference between Table A and B exceeds 2, it is considered that the two tables are not related tables and no comparative analysis is performed. Take the case where Table A has one more column than Table B as an example. Determine whether the extra column of A is the first column or the last column compared to B. If the extra column is no longer on both sides, it belongs to situation 3 and has been analyzed and processed. Determine whether the first column of Table A is all 0. If so, the first column is the extra column. If not, determine whether the last column is all 0. If so, the last column is the extra column. If otherwise, the extra column is not on both sides of the table, it belongs to state three and no comparative analysis is performed. After finding the extra column, if the associated table pair A and B already exists in DifTableCells, the value will be increased by the coordinates and content of the cells in this column; if the associated table pair A and B does not exist in DifTableCells, the associated table pair AB and the coordinates and content of the cells in this column will be added to the dictionary DifTableCells, where the coordinates and content of the corresponding cells in table B are empty.

[0135] For another situation of state 4, the number of rows of the two tables in the associated table pair differs by n, where n is less than a preset value. Fig.11 As shown, the steps of obtaining the abnormal cell group according to the difference between the minimum table matrices of the two tables and the position in the corresponding table specifically include:

[0136] Step S601: when the first table has N more rows than the second table but the same number of columns, and N is greater than a first preset value, no column comparison analysis is performed.

[0137] Step S602: when N is not greater than a first preset value, obtaining an additional row in the first table that contains all inconsistent cells.

[0138] Step S603, if part or all of the additional rows are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more rows than the minimum table matrix of the second table, and M is less than a second preset value, obtain the M rows with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M rows into the abnormal cell group, the minimum table matrix being the minimum rectangular table area containing all the cells that are consistent with the contents in the table.

[0139] In some other specific embodiments, when the number of rows of the two tables differs by n rows, where n is not greater than R, the row positions of all inconsistent cells in the table with more rows are obtained, and if the row is partially or completely located in the minimum table matrix of the table, the process is performed according to the steps of the aforementioned state three;

[0140] Step S604: If the additional row is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional row are recorded and added to the abnormal cell group of the two tables.

[0141] Specifically, in this embodiment, since the minimum table matrix of the table is formed by removing inconsistent cells on all sides, the two tables may have rows that differ in the outermost layers on all sides. The first preset value can be specified according to the actual situation. In this embodiment, the first preset value is set to 2. For example, when the difference between Table A and B exceeds 2, the two tables are considered not to be related tables, and no comparative analysis is performed. Take the case where Table A has one more row than Table B as an example. Determine whether the one extra row in A is the first row or the last row. If the extra row is no longer on both sides, it belongs to situation 3 and has been analyzed and processed. Determine whether the first row of Table A is all 0. If so, the first row is an extra row. If not, determine whether the last row is all 0. If so, the last row is an extra row. If otherwise, the extra row is not on both sides of the table, it belongs to state three and no comparative analysis is performed. After finding an extra row, if the associated table pair A and B already exist in DifTableCells, then add the coordinates and content of the cells in the row to value; if the associated table pair A and B does not exist in DifTableCells, then add the associated table pair AB and the coordinates and content of the cells in the row to the dictionary DifTableCells, where the coordinates and content of the corresponding cells in table B are empty. The dictionary DifTableCells obtained in the above steps can be used as the input parameter for the difference content processing in the following step S4.

[0142] The comparative analysis algorithm can consider the situations where a small table is embedded in a large table, the table rows and columns are transposed, the order of the table rows and columns is disordered, and the rows and columns inside and around the table are missing, and find out the inconsistent cell coordinates and positions of the associated table pairs.

[0143] The table comparison and analysis in the above step S3 fully considers the situations where a small table is embedded in a large table, the rows and columns of a table are transposed, the order of the rows and columns of a table is disordered, and the rows and columns inside and around the table are missing, and finds out the inconsistent cell coordinates and positions of the associated table pairs. It has stronger applicability and versatility to various types of tables, and can help users compare and analyze various types of tables.

[0144] In some specific embodiments, the method for automatically checking drug application documents further includes step S4, comparing the contents of cells with inconsistent contents in the abnormal cell group, and finding and marking inconsistent character sets in the cell contents.

[0145] Specifically, the above step S4 is used to screen the above-mentioned associated table pair according to the number of cells with inconsistent content, and at the same time compare the contents of the cells with inconsistent content, find and mark the inconsistent character sets in the cell content. Because under normal circumstances, human errors will only cause a small number of errors and generate a small number of inconsistent cells. When the number of inconsistent cells in the associated table pair is too large, the two tables are quite different, and can be considered as normal different tables and are not presented to the user. Except for this case, it can be considered as an abnormal table caused by various reasons, which needs to be presented to the user for inspection and processing. Because a human error may generate one or more relatively discrete inconsistent cells, or may cause the order of rows and columns to be disordered or rows and columns to be lost, thereby generating multiple inconsistent cells in rows or columns. Therefore, the number of cells obtained by subtracting the number of cells generated by the disorder of the order of rows and columns and the loss of rows and columns from the number of all inconsistent cells is defined as the number of cells that are actually inconsistent. When the number of actually inconsistent cells is less than or equal to M, the associated table pair is considered to be an abnormal table and needs to be presented to the user for processing; otherwise, it is considered to be a normal different table and is not presented to the user. In this embodiment, the preferred M value can be 3.

[0146] By traversing the abnormal cell group, that is, traversing the dictionary DifTableCells, first remove the inconsistent cells caused by missing rows and columns, that is, remove the array elements in the dictionary value list whose cell coordinates in table A are empty or the cell coordinates in table B are empty. Then remove the inconsistent cells caused by disordered row and column order. The inconsistent cell list after removing the inconsistent cells caused by missing rows and columns in the difference results of tables A and B is difCell, and the data structure is List<String[]> , where the array String[] is [A cell coordinates, A cell content, B cell coordinates, B cell content]. Take out all A cell coordinates in difCell, and use the method of converting the table to the minimum table matrix to convert it to the minimum table matrix difMA of the difference result. For this minimum table matrix, the coordinates with element values ​​of 1 represent the coordinates of inconsistent cells. The necessary and sufficient condition for the existence of two columns of disordered cells is that two columns in difMA have all 1 values, and after exchanging the column coordinates of the two columns of cells, the contents are equal to the corresponding cells in the B table. The necessary and sufficient condition for the existence of two rows of disordered cells is that two rows in difMA have all 1 values, and after exchanging the row coordinates of the two rows of cells, the contents are equal to the corresponding cells in the B table. If there are more than 2 columns or 2 rows of disordered cells, refer to the above conditions for expansion. It is recommended to consider the case of disordered cell order of 3 rows or 3 columns at most. Other cases are considered to be normal different tables and are not presented to the user. According to the above necessary and sufficient conditions, find out the cells with disordered row and column order, remove these cells from difCell, and the number of cells left is the number of real inconsistent cells. Remove the associated table pairs whose actual inconsistent cell numbers are greater than n from the dictionary DifTableCells, and the remaining results are the difference table pairs that need to be presented to the user.

[0147] Since the contents of two corresponding inconsistent cells may be very similar, it is difficult for users to quickly find the real inconsistency between the two cell contents. Therefore, it is necessary to compare and analyze the corresponding inconsistent cell contents of the difference table pair to identify the inconsistent character sets. The two cell contents can be regarded as two strings a and b. Find the longest common subsequence l of a and b. The character set after removing l from a and b is the inconsistent character set, which can be highlighted by adding labels before and after the characters.

[0148] The above step S4 filters the analysis results again according to the number of real inconsistent cells, and can exclude inconsistent cells caused by disordered row and column order and missing rows and columns, and the inconsistent character sets of the inconsistent cell contents are based on the real inconsistent cells found. The truly abnormal table pairs and the inconsistent character sets in the inconsistent cells are screened out to reduce the number of results presented to the user, which is convenient for the user to quickly check and find errors and abnormal tables. At the same time, the contents of the inconsistent cells are compared and analyzed, and the inconsistent character sets can be found and highlighted, which is convenient for the user to find abnormal contents of the table.

[0149] The automatic inspection method of the drug application document disclosed in the present invention obtains the coordinates and contents of the cells in the first table and the second table to be analyzed respectively, identifies the cells with the same contents, and performs subsequent comparative analysis through the two table pairs, thereby greatly reducing the amount of calculation for comparative analysis. In the process of comparative analysis of the two tables, various situations such as the embedding of a small table into a large table, the transposition of the rows and columns of the table, the disorder of the order of the rows and columns of the table, the missing of the rows and columns inside and around the table, etc. are fully considered, and the inconsistent cell coordinates and positions between the two tables are found according to the states of each situation of the two tables. Finally, the abnormal result processing step can exclude the inconsistent cells generated by the disorder of the order of rows and columns and the missing of rows and columns, and screen out the truly abnormal table pairs and the inconsistent character sets in the inconsistent cells according to the real inconsistent cells found and the inconsistent character sets in the inconsistent cell contents, thereby finally reducing the number of results presented to the user, and facilitating the user to quickly find errors and abnormal tables. The comparative analysis of the two tables can be realized, and the cells and cell content differences of the associated tables that are inconsistent can be found and located. It is suitable for scenes where a large number of similar tables need to be processed, and the tables are nested and reused in multiple places, which can reduce a large amount of repetitive work of manually checking the consistency of the tables and avoid errors in the inconsistent contents of the corresponding cells of the associated tables.

[0150] The present invention also provides an automatic verification system for drug declaration documents, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor implements the various steps of the automatic verification method for drug declaration documents as described in the above embodiments.

[0151] The automatic inspection system for drug application documents may include, but is not limited to, a processor and a memory. Those skilled in the art will appreciate that the schematic diagram is merely an example of the automatic inspection system for drug application documents, and does not constitute a limitation on the automatic inspection system for drug application documents, and may include more or fewer components than shown in the diagram, or a combination of certain components, or different components, for example, the automatic inspection system for drug application documents may also include input and output devices, network access devices, buses, etc.

[0152] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the automatic inspection system equipment of the drug application document, and uses various interfaces and lines to connect the various parts of the automatic inspection system equipment of the entire drug application document.

[0153] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the automatic inspection system device of the drug application document by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application required for a function, etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0154] If the automatic inspection system for drug application documents is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned automatic inspection method embodiments of each drug application document can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practices in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practices, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0155] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

[0156] In conclusion, the above is only a preferred embodiment of the present invention, and all equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the patent of the present invention.

Claims

1. A method for automatically checking drug application documents, characterized in that: The steps include: Obtain the coordinates and contents of each cell of the two tables in the drug application document to be analyzed, and identify cells with consistent contents; When the first table has N more rows than the second table but the same number of columns or N more columns than the second table but the same number of rows, and N is less than a first preset value, obtaining additional columns or additional rows in the first table that are all inconsistent cells; If part or all of the additional columns or additional rows are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more rows than the minimum table matrix of the second table but the same number of columns, or M more columns than the second table but the same number of rows, and M is less than a second preset value, obtain the M rows or M columns with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M rows or M columns into the abnormal cell group, and the minimum table matrix is ​​the minimum rectangular table area containing all the consistent cells in the table; After removing the M rows or M columns from the minimum table matrix of the first table, a transition table matrix is ​​formed, and the contents of each cell at the corresponding position of the transition table matrix and the minimum table matrix of the second table are compared in turn to see if they are the same. If they are different, they are supplemented and entered into the abnormal cell group; If the additional column or additional row is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional column or additional row are recorded and added to the abnormal cell group of the two tables.

2. The automatic inspection method for drug application documents according to claim 1 is characterized in that: Specifically include: When the first table has N more rows than the second table but the same number of columns, and N is greater than a first preset value, no comparative analysis is performed; When N is not greater than a first preset value, obtaining an additional row containing all inconsistent cells in the first table; If part or all of the additional rows are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more rows than the minimum table matrix of the second table, and M is less than a second preset value, obtain the M rows with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M rows into the abnormal cell group, and the minimum table matrix is ​​the minimum rectangular table area containing all the consistent cells in the table; If the additional row is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional row are recorded and added to the abnormal cell group of the two tables.

3. The automatic inspection method for drug application documents according to claim 1 is characterized in that: Specifically include: When the first table has N more columns than the second table but the same number of rows, and N is greater than a first preset value, no comparative analysis is performed; When N is not greater than a first preset value, obtaining an additional column containing all inconsistent cells in the first table; If part or all of the additional columns are located in the minimum table matrix of the first table, then when the minimum table matrix of the first table has M more columns than the minimum table matrix of the second table, and M is less than a second preset value, obtain the M columns with the most inconsistent cells in the minimum table matrix of the first table, and enter each cell in the M columns into the abnormal cell group, and the minimum table matrix is ​​the minimum rectangular table area containing all the consistent cells in the table; If the additional column is not located in the minimum table matrix of the first table, all the cell coordinates and contents of the additional column are recorded and added to the abnormal cell group of the two tables.

4. The automatic inspection method for drug application documents according to claim 3 is characterized in that: The following steps are also included: Compare the structured data of each table in the declaration document pair by pair, obtain the coordinates and contents of the cells with consistent contents in the two tables, determine whether there is a correlation between the two tables, and perform subsequent analysis of abnormal cell groups for the two tables that have a correlation.

5. The automatic inspection method for drug application documents according to claim 4 is characterized in that: The step of determining whether there is an association relationship between the two tables specifically includes the following steps: Compare the structured data of the two tables pair by pair, and obtain the coordinates and contents of the cells with the same contents in the two tables; The association status of the two tables is determined according to the number and / or distribution positions of cells with consistent contents.

6. The automatic inspection method for drug application documents according to claim 5 is characterized in that: The step of determining the association status of the two tables according to the number and / or distribution position of cells with consistent contents specifically includes: Get the number of cells with consistent content in each table and their distribution positions in the table; Obtaining the minimum table matrix of each table, wherein the minimum table matrix is ​​the minimum rectangular table area containing all cells with consistent contents in the table; When the number of cells with consistent content is greater than a preset value, and / or twice the number of cells with consistent content is greater than a preset ratio of the sum of the number of cells contained in the two tables, and / or the number of cells with consistent content is greater than a preset ratio of the total number of cells in the smallest table matrix in which it is located, the two tables are judged to be an associated table pair with an associated relationship.

7. The automatic inspection method for drug application documents according to claim 6 is characterized in that: The following steps are also included: Compare the contents of cells with inconsistent contents in the abnormal cell group, and find and mark the inconsistent character sets in the cell contents.

8. The method for automatically checking drug application documents according to any one of claims 1 to 7, characterized in that: The first table and the second table are located in two different electronic documents.

9. An automatic inspection system for drug application documents, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Comparison method and device of file differences

    CN108446394A

  • Data association analysis method and system for drug document

    CN111353004A