Online comparison auditing system and method based on structured document
By designing an online comparison audit system based on structured documents, the problem of the existing technology being difficult to accurately compare structured documents is solved, and the accurate identification and visual display of document changes is achieved, which meets the needs of auditing and other scenarios.
Patent Information
- Application Number
- CN202411738282.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-11
AI Technical Summary
When comparing documents in the prior art, it is difficult to effectively compare structured documents accurately, and cannot meet the needs of auditing and other scenarios.
Design a structured document online comparison audit system, including user-side module, document editing module, document storage module, document display module and document difference comparison module. By comparing the label structure and label content of the structured document, the differences between multiple versions of documents are calculated, and the different contents are visually displayed.
It realizes accurate audit of structured documents, can accurately identify changes in different versions, and display differences in visual way, meeting the needs of specific fields for document comparison.
Smart Images

Figure CN119598996A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an online comparative audit system and method based on structured documents. Background Art
[0002] With the rapid development of technology, the use of computers to edit documents has been widely used. In the process of editing documents, the content of the document will be constantly modified and iterated. Structured document comparison technology plays a vital role in many fields, including software development, version control, data synchronization, and legal and financial industries. The core of this technology is to identify, analyze and manage changes between documents to ensure the consistency, integrity and accuracy of the data.
[0003] At present, the industry has proposed a variety of methods for document comparison. The authorization publication number "CN107977342A" records "a document comparison method and device" to solve the problem of low convenience in document content comparison in the prior art. The authorization publication number "CN108268884B" records "a document comparison method and device" to accurately identify the differences between different documents.
[0004] However, the above methods all use the longest common string method to compare text content, and do not explain how to accurately compare documents with structures to meet the needs of scenarios such as auditing. Summary of the invention
[0005] The purpose of the invention provided by the present invention is to provide an online comparative audit system and method based on structured documents to solve the problems in the above-mentioned background technology.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: an online comparative audit system based on structured documents, comprising:
[0007] User-side module: used to facilitate users to operate and use documents through the system;
[0008] Document editing module: It can edit documents online in a visual way, parse and identify the structured data of documents, and set a unique ID for each structured unit;
[0009] Document storage module: used for storing and accurately querying documents;
[0010] Document display module: Visually display the document based on the returned results, and perform comparative rendering of the comparative data in the returned results;
[0011] Document difference comparison module: used to compare different versions of the same document, find out the differences and summarize the difference structures, and return the difference results to the document display module for difference display;
[0012] The document editing module includes an online editing module, a data parsing and identifying module, a content transmission module and a data structuring module, and the online editing module, the data parsing and identifying module, the content transmission module and the data structuring module are all bidirectionally connected by signals; the document display module includes a visual display module, a comparison and rendering module and a data transmission module, and the visual display module, the comparison and rendering module and the data transmission module are all bidirectionally connected by signals;
[0013] The output end of the online editing module in the document editing module is bidirectionally connected to the input end of the data transmission module in the document display module.
[0014] Furthermore, the document storage module includes a storage module and a precision query module, and the storage module and the precision query module are both bidirectionally signal-connected.
[0015] Furthermore, the document difference comparison module includes a document comparison module, a difference structure summary module and a save trigger module, and the document comparison module, the difference structure summary module and the save trigger module are all bidirectionally signal-connected.
[0016] Furthermore, the output terminal signal of the user terminal module is connected to the input terminal of the online editing module in the document editing module, and the output terminal signal of the user terminal module is connected to the input terminal of the data transmission module in the document display module.
[0017] Furthermore, the output end of the online editing module in the document editing module is bidirectionally connected to the input end of the precise query module in the document storage module, and the output end of the precise query module in the document storage module is bidirectionally connected to the input end of the save trigger module in the document difference comparison module.
[0018] Furthermore, the output end of the storage trigger module in the document difference comparison module is bidirectionally signal-connected to the input end of the data transmission module in the document display module.
[0019] An online comparative audit method based on structured documents includes the following steps:
[0020] Step 1: Compare the tag structure and tag content of structured documents;
[0021] Step 2: Calculate the differences between multiple versions of documents based on the structural data;
[0022] Step 3: Visualize the difference content based on the calculated document differences.
[0023] Furthermore, in step 1, each structured unit block in the same document has a unique ID. When the content in a structured unit in the document changes, the ID in the structured unit does not change. The structured document comparison result includes newly added data and deleted data.
[0024] Furthermore, in the step 2, the parts of the structural units with the same ID in the two versions are compared using a text similarity comparison algorithm for the text contents in the two units. If there are inconsistencies between the two parts of the text, the ID of the structural unit whose text content has changed is recorded, and the difference in the text changes is also recorded.
[0025] Furthermore, in the step three, comparative rendering is performed according to the comparative data in the returned result. For the deleted structural units, this part of the content is marked with a deleted color in the screen display area according to the returned ID set data. For the newly added structural units, this part of the content is marked with a newly added color in the screen display area according to the returned ID set data. For the changed content, the changed text part in the structural unit is displayed according to the ID.
[0026] The present invention provides an online comparative audit system and method based on structured documents.
[0027] Beneficial effects:
[0028] (1) The online comparative audit system and method based on structured documents calibrates the content of structured documents and can accurately audit the changes in documents in different versions.
[0029] (2) The online comparative audit system and method based on structured documents can display the changed parts of different versions of documents in a visual manner, which is convenient for users to view.
[0030] (3) The online comparison audit system and method based on structured documents can accurately compare the direct differences of structured documents to meet the needs of accurate comparison of documents in certain specific fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 It is a general system diagram of an online comparative audit system and method based on structured documents of the present invention;
[0032] Figure 2 A schematic diagram of a document editing module based on a structured document online comparison and auditing system and method of the present invention;
[0033] Figure 3A schematic diagram of a document storage module of a structured document online comparison and auditing system and method according to the present invention;
[0034] Figure 4 A schematic diagram of a document display module based on a structured document online comparison and auditing system and method of the present invention;
[0035] Figure 5 A schematic diagram of a document difference comparison module based on a structured document online comparison and auditing system and method of the present invention;
[0036] Figure 6 A flowchart of an online comparative audit system and method based on structured documents of the present invention;
[0037] Figure 7 A schematic diagram of the contents of Document_A of a structured document online comparison and auditing system and method according to the present invention;
[0038] Figure 8 A schematic diagram of the contents of Document_B of a structured document online comparison and auditing system and method according to the present invention;
[0039] Fig. 9 A schematic diagram of a comparison process of an online comparison audit system and method based on structured documents of the present invention;
[0040] Fig.10 This is an example effect diagram of document comparison based on the structured document online comparison and auditing system and method of the present invention.
[0041] In the figure: 1. User-side module; 2. Document editing module; 3. Document storage module; 4. Document display module; 5. Document difference comparison module. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0043] Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0044] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0045] See also Figure 1-10 The present invention provides a technical solution: an online comparative audit system based on structured documents, comprising:
[0046] User-side module 1: used to facilitate users to operate and use documents through the system;
[0047] Document Editing Module 2: Edit documents online in a visual way, parse and identify the structured data of the documents, and set a unique ID for each structured unit;
[0048] Document storage module 3: used for storage and accurate query of documents;
[0049] Document display module 4: Visually display the document according to the returned results, and perform comparative rendering on the comparative data in the returned results;
[0050] Document difference comparison module 5: used to compare different versions of the same document, find out the differences and summarize the difference structures, and return the difference results to the document display module 4 for difference display;
[0051] The document editing module 2 includes an online editing module, a data parsing and identifying module, a content transmission module and a data structuring module, and the online editing module, the data parsing and identifying module, the content transmission module and the data structuring module are all bidirectionally connected by signals. The document display module 4 includes a visual display module, a comparison and rendering module and a data transmission module, and the visual display module, the comparison and rendering module and the data transmission module are all bidirectionally connected by signals.
[0052] The output end of the online editing module in the document editing module 2 is bidirectionally signal-connected to the input end of the data transmission module in the document display module 4 .
[0053] Specifically, the document storage module 3 includes a storage module and a precision query module, and the storage module and the precision query module are both bidirectionally connected by signals.
[0054] Specifically, the document difference comparison module 5 includes a document comparison module, a difference structure summary module and a save trigger module, and the document comparison module, the difference structure summary module and the save trigger module are all bidirectionally signal-connected.
[0055] Specifically, the output terminal signal of the user terminal module 1 is connected to the input terminal of the online editing module in the document editing module 2 , and the output terminal signal of the user terminal module 1 is connected to the input terminal of the data transmission module in the document display module 4 .
[0056] Specifically, the output end of the online editing module in the document editing module 2 is bidirectionally connected to the input end of the precise query module in the document storage module 3, and the output end of the precise query module in the document storage module 3 is bidirectionally connected to the input end of the saving trigger module in the document difference comparison module 5.
[0057] Specifically, the output end of the storage trigger module in the document difference comparison module 5 is bidirectionally connected to the input end of the data transmission module in the document display module 4 .
[0058] An online comparative audit method based on structured documents includes the following steps:
[0059] Step 1: Compare the tag structure and tag content of structured documents;
[0060] Step 2: Calculate the differences between multiple versions of documents based on the structural data;
[0061] Step 3: Visualize the difference content based on the calculated document differences.
[0062] Specifically, in step 1, each structured unit block in the same document has a unique ID. When the content in a structured unit in the document changes, the ID in the structured unit does not change. The structured document comparison result includes newly added data and deleted data.
[0063] Specifically, in step 2, the parts of the structural units with the same ID in the two versions are compared using a text similarity comparison algorithm. If there are inconsistencies between the two parts of the text, the ID of the structural unit whose text content has changed is recorded, and the difference in the text changes is also recorded.
[0064] Specifically, in step three, comparative rendering is performed based on the comparative data in the returned results. For deleted structural units, this part of the content is marked with a deleted color in the screen display area according to the returned ID set data. For newly added structural units, this part of the content is marked with a newly added color in the screen display area according to the returned ID set data. For changed content, the changed text part in the structural unit is displayed according to the ID.
[0065] The present invention provides a system and method for online comparative auditing based on structured documents:
[0066] 1. The document storage module includes the following functions:
[0067] (1) Having the ability to store structured documents;
[0068] (2) It has the function of querying structured documents.
[0069] 2. The document editing module includes the following functions:
[0070] (1) It has the ability to edit structured documents online, allowing users to edit documents in a visual way. Different types of information in the document, such as title, table of contents, chapter title, article title, paragraph content, figure, table, etc., can be displayed and edited in different ways;
[0071] (2) It can parse and identify the structured data of the document and set a unique ID for each structured unit for identification;
[0072] (3) It is possible to transfer the content of each structural unit in the document to the document storage module for storage in a structured manner;
[0073] (4) The entire structured data of the document is stored in a tree structure.
[0074] 3. The document difference comparison module includes the following functions:
[0075] (1) For the same document, multiple versions can be stored after the user performs editing operations. The multiple versions of the document can be automatically saved by the system or actively triggered by the user;
[0076] a) For the same document, each structural unit block of the document has a unique ID. For example, the document title will have a unique ID when stored in the background.
[0077] b) When the content of a structural unit in a document changes, the ID in the structural unit does not change.
[0078] c) When a user deletes a structure in a document (such as a title), the attributes and ID of the structural unit will be deleted together, and the same applies to adding new ones.
[0079] d) When the user changes the content of the document, the module can automatically re-store a copy of the data in a small version according to the set time (such as 5 minutes), such as automatically generating document_1.
[0080] e) After the user changes the content of the document, the user can actively trigger the version generation behavior of the document according to his or her needs, such as actively generating document _A.
[0081] (2) It has the function of comparing different versions of the same document, finding the differences, summarizing the difference structures, and returning the difference results to the document display module for difference display;
[0082] a) It is possible to compare the structured data of two versions. First, the overall structure of the two versions is compared. The structural comparison results are divided into two categories:
[0083] i. Newly added data: If version A adds n structured units compared to version B, the IDs of the newly added structured units are returned;
[0084] ii. Deleting data: If version A has n fewer structural units than version B, the IDs of the reduced structural units are returned.
[0085] b) For the parts of the structural units with the same ID in the two versions, the text contents in the two units are compared using a text similarity comparison algorithm. If there are inconsistencies between the two parts of the text, the ID of the structural unit whose text content has changed is recorded, and the changed text content is also recorded.
[0086] c) It is capable of returning the IDs of newly added structural units, the IDs of deleted structural units, the IDs of structural units with changed text contents, and the text changes to the document display module.
[0087] 4. The document display module includes the following functions:
[0088] (1) Able to receive the comparison results and structured data of two versions of documents returned by the document difference comparison module;
[0089] (2) It is possible to visualize the document based on the two versions of the document in the returned results, and realize the function of displaying two documents simultaneously in the left and right areas of the same screen;
[0090] (3) It is capable of performing comparative rendering according to the comparative data in the returned results. For deleted structural units, the content is marked with a deleted color in the screen display area according to the returned ID data set. For newly added structural units, the content is marked with a newly added color in the screen display area according to the returned ID data set. For changed content, the changed text part in the structural unit is displayed according to the ID.
[0091] The example provides an implementation scenario for comparing two structured documents. The content of document A is as follows: Figure 7 As shown in the figure, the specific document comparison implementation process is as follows:
[0092] Step 1: Edit the user document and automatically save the document during the editing process_A document;
[0093] Step 2: The document editing module performs structured storage on the two versions of the document.
[0094] The structured data Data_A of document_A is as follows:
[0095]
[0096]
[0097] Step 2.1: The document structured editing module can parse and identify the document structured data, and set a unique ID for each structured unit for identification. For example, Document_A shown above, its structured data is subsequently referred to as Data_A. Each structured unit Block of the document has a unique blockId.
[0098] Step 2.2: The document structured editing module transfers the content of each structured unit to the document storage module to store the document in a structured manner;
[0099] Step 3: The user edits Document_B, so that entry 3 is added to Document_B. The content "This paragraph is used to illustrate the deletion function of the structured document" is deleted, and the content "This article is used to illustrate the modification function of the structured document" in Chapter 2 is modified to "This article is used to illustrate the document modification function". The modified Document_B is obtained.
[0100] Step 3.1: When the content of a structural unit in the document changes, the ID in the structural unit will not change, that is, the blockId in the Block whose structure has not changed in Data_A during the editing process will not change;
[0101] Step 3.2: When the user deletes the content "This paragraph is used to explain the deletion function of the structured document" in the document, the structured block with blockId "3a5c46f3-adb5-49b3-9757-aa9e61bcbbaa" in Data_A is deleted as a whole. The same is true for new additions. Since the user has added "3, new entry 3", Data_B has added a block with blockId "63f60531-1113-469d-b885-11399eaefe77" based on Data_A.
[0102] Step 3.3: The user modified the content of "This article is used to illustrate the structured document modification function" to "This article is used to illustrate the document modification function", and the content of blockId "51d6d1b4-76e8-4f06-9e94-8491ceb74bf7" in Data_B was also modified, but the blockId did not change;
[0103] Step 3.4: The user keeps document_B, and the document difference comparison module generates and saves the corresponding structured data Data_B.
[0104] The structured data Data_B of document_B is as follows:
[0105]
[0106]
[0107]
[0108] Step 4: The document difference comparison module compares Data_A and Data_B;
[0109] Step 4.1: First, compare the overall structures of the two versions. The structural comparison results are divided into:
[0110] i. Newly added data: Data_B adds one structured unit compared to Data_A, so the newly added structured unit "63f60531-1113-469d-b885-11399eaefe77" is returned;
[0111] ii. Delete data: If version Data_B has one less structural unit than version Data_A, the reduced structural unit "3a5c46f3-adb5-49b3-9757-aa9e61bcbbaa" is returned;
[0112] Step 4.2: For the part with the same blockId in Data_B compared to Data_A, use the text similarity comparison algorithm to compare the text content in the two units. It is found that the text content of "51d6d1b4-76e8-4f06-9e94-8491ceb74bf7" is different in Data_B and Data_A, and the comparison result is given.
[0113] Step 4.3: Return the above results to the document display module. The comparison process is as follows Fig. 9 As shown;
[0114] Step 5: The document display module receives the comparison results and structured data of the two versions of the document returned by the document difference comparison module. The data structure of the returned comparison results is as follows:
[0115]
[0116]
[0117] Step 5.1: The document can be visualized based on the two versions of the document in the returned results, so that the two documents can be displayed simultaneously in the left and right areas of the same screen;
[0118] Step 5.2: Compare the data in the returned results. For blockId in "delete", mark the content with the deleted color in the screen display area. For blockId in "add", mark the content with the added color in the screen display area. For blockId in "change", display the content according to the three standards of "delete", "add" and "change" in the result, as follows Fig.10 Shown
[0119] The above are only preferred embodiments of the present invention. It should be pointed out that a person skilled in the art can make several modifications and improvements without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. An online comparative audit system based on structured documents, characterized in that: include: User-side module (1): used to facilitate users to operate and use documents through the system; Document editing module (2): It edits documents online in a visual way, parses and identifies the structured data of the documents, and sets a unique ID for each structured unit; Document storage module (3): used for storing and accurately querying documents; Document display module (4): Visually display the document based on the returned results, and perform comparative rendering on the comparative data in the returned results; Document difference comparison module (5): used to compare different versions of the same document, find out the differences and summarize the difference structures, and return the difference results to the document display module (4) for difference display; The document editing module (2) comprises an online editing module, a data parsing and identifying module, a content transmission module and a data structuring module, wherein the online editing module, the data parsing and identifying module, the content transmission module and the data structuring module are all bidirectionally connected by signals, and the document display module (4) comprises a visual display module, a comparison and rendering module and a data transmission module, wherein the visual display module, the comparison and rendering module and the data transmission module are all bidirectionally connected by signals; The output end of the online editing module in the document editing module (2) is bidirectionally signal-connected to the input end of the data transmission module in the document display module (4).
2. The online comparative audit system based on structured documents according to claim 1 is characterized by: The document storage module (3) comprises a storage module and a precision query module, and the storage module and the precision query module are both bidirectionally signal-connected.
3. The online comparative audit system based on structured documents according to claim 1 is characterized by: The document difference comparison module (5) comprises a document comparison module, a difference structure summary module and a save trigger module, and the document comparison module, the difference structure summary module and the save trigger module are all bidirectionally signal-connected.
4. The structured document-based online comparative audit system according to claim 1, characterized in that: The output end signal of the user end module (1) is connected to the input end of the online editing module in the document editing module (2), and the output end signal of the user end module (1) is connected to the input end of the data transmission module in the document display module (4).
5. The online comparative audit system based on structured documents according to claim 1 is characterized by: The output end of the online editing module in the document editing module (2) is bidirectionally connected to the input end of the precision query module in the document storage module (3), and the output end of the precision query module in the document storage module (3) is bidirectionally connected to the input end of the storage trigger module in the document difference comparison module (5).
6. The structured document-based online comparative audit system according to claim 1, characterized in that: The output end of the storage trigger module in the document difference comparison module (5) is bidirectionally signal-connected to the input end of the data transmission module in the document display module (4).
7. An online comparative audit method based on structured documents, characterized in that: The following steps are involved: S1: Compare the tag structure and tag content of structured documents; S2: Calculate the differences between multiple versions of documents based on structural data; S3: Visually display the difference content based on the calculated document differences.
8. The method for online comparative auditing based on structured documents according to claim 6 is characterized by: In step S1, each structured unit block in the same document has a unique ID. When the content in a structured unit in the document changes, the ID in the structured unit does not change. The structured document comparison result includes newly added data and deleted data.
9. The online comparative audit method based on structured documents according to claim 6 is characterized by: In step S2, the parts of the structural units with the same ID in the two versions are compared using a text similarity comparison algorithm for the text contents in the two units. If there are inconsistencies between the two parts of the text, the ID of the structural unit whose text content has changed is recorded, and the difference in the text changes is also recorded.
10. The method for online comparative auditing based on structured documents according to claim 6, characterized in that: In the step S3, comparative rendering is performed according to the comparative data in the returned result. For the deleted structural units, this part of the content is marked with a deleted color in the screen display area according to the returned ID set data. For the newly added structural units, this part of the content is marked with a newly added color in the screen display area according to the returned ID set data. For the changed content, the changed text part in the structural unit is displayed according to the ID.
Citation Information
Patent Citations
Document comparison method and device
CN107977342A
A document comparison method and apparatus
CN108268884B