Document difference quantification analysis method and apparatus
By performing standardized structured parsing, rule extraction, and semantic analysis on vehicle network documents, the problems of time-consuming and labor-intensive manual comparison and high false alarm rate have been solved, achieving efficient and accurate quantitative analysis of document differences.
Patent Information
- Application Number
- CN202611142928.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-30
- Publication Date
- 2026-11-06
AI Technical Summary
Existing technologies rely on manual comparison or semi-automated tools when upgrading and changing vehicle specification documents and business documents in the Internet of Vehicles business. This results in a large consumption of human resources and a high false alarm rate, and is affected by the diversity of text types and the limitations of algorithms.
By parsing the target document to generate standard structured data, extracting normative rules, and retrieving the most similar text fragments from the historical normative database, the differences are analyzed using a semantic analysis model, achieving fully automated comparison throughout the process and avoiding mismatches across types and misjudgments of unrelated content.
Significantly reduce human resource investment, improve the automation level of the comparison process, reduce false alarm rate, and improve the accuracy and reliability of difference analysis.
Smart Images

Figure CN123050397A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing technology, and in particular relates to a method and apparatus for quantitative analysis of document differences. Background Technology
[0002] In the face of version upgrades and changes to vehicle specification documents and business documents in the connected vehicle business, enterprises need to promptly recognize and adjust their strategies accordingly. Currently, this mainly relies on manual comparison or semi-automated tools such as document diffing (Diff) and version control to compare old and new specification documents. However, such methods not only consume a lot of human resources, but are also susceptible to the diversity of text types and the limitations of algorithms, resulting in a high false positive rate. Summary of the Invention
[0003] This application provides a document difference quantification analysis method and apparatus, which can efficiently and accurately quantify document differences.
[0004] In a first aspect, embodiments of this application provide a document difference quantification analysis method, the method comprising: The target document is parsed to obtain its standard structured data. Based on the standard structured data, extract at least one specification rule from the target document and determine the target type of each specification rule; Searching in the historical norm library corresponding to each target type yields the target text fragments of each norm rule. The target text fragments are the historical text fragments in the historical norm library that have the highest similarity to the norm rule. The historical norm library includes multiple historical text fragments under each target type. The at least one normative rule in the target document and the corresponding target text fragments are input into a preset semantic analysis model for analysis, and the difference analysis results between the normative rule in the target document and the corresponding target text fragments are obtained.
[0005] Secondly, embodiments of this application provide a document difference quantification analysis device, the device comprising: The parsing module is used to parse the target document to obtain the standard structured data of the target document; The classification module is used to extract at least one normative rule from the target document based on the standard structured data, and to determine the target type of each normative rule; The retrieval module is used to search in the historical norm library corresponding to each target type to obtain the target text fragment of each norm rule. The target text fragment is the historical text fragment in the historical norm library that has the highest similarity to the norm rule. The historical norm library includes multiple historical text fragments under the target type. The analysis module is used to input at least one normative rule and the corresponding target text fragments in the target document into a preset semantic analysis model for analysis, and to obtain the difference analysis results between each normative rule in the target document and the corresponding target text fragments.
[0006] Thirdly, embodiments of this application provide an electronic device, the device including: a processor and a memory storing computer program instructions; the processor, when executing the computer program instructions, implements the document difference quantification analysis method as described above.
[0007] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the document difference quantification analysis method as described above.
[0008] Fifthly, embodiments of this application provide a computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the document difference quantification analysis method as described in any of the above claims.
[0009] The document difference quantification analysis method and apparatus of this application firstly parses target documents of different formats, layouts, and presentation forms into standard structured data, stripping away document format, carrier, and layout differences and retaining only core content and logical structure. This achieves standardized and compatible processing of various vehicle specification documents and business documents in the Internet of Vehicles business, completely eliminating comparison bias caused by text type diversity. Secondly, it automatically extracts specification rules based on standard structured data, directly focusing on core content units in the document that have technical constraints and guidance, replacing the tedious manual screening of core content and significantly reducing human resource investment. Simultaneously, by determining the target type of the specification rules, it achieves the classification and sorting of the document's core content, laying the foundation for subsequent accurate retrieval and avoiding interference from meaningless decorative text, reducing the possibility of misjudgment due to irrelevant differences from the source. Finally, based on the target type of the specification rules, it performs targeted retrieval in the corresponding type's historical specification library. The search function replaces the manual review of historical documents, further enhancing the automation of the comparison process and saving human resources. It retrieves the target text fragment with the highest similarity, ensuring that the comparison objects in both old and new documents correspond to the same technical rules, avoiding mismatches between different types or unrelated content, effectively reducing false alarms caused by incorrect comparison objects, and improving the accuracy of difference comparison. Finally, a pre-set semantic analysis model analyzes the differences between the standard rules and the target text fragment at the semantic level, replacing the subjective judgment of manual comparison and achieving full automation of the difference analysis process. This completely frees up human resources from the core comparison stage, significantly saving human resources. It also overcomes the limitations of traditional character / literal difference algorithms, accurately distinguishing between meaningless differences that are literally different but semantically consistent and true technical differences that are literally similar but semantically changed, significantly reducing the false alarm rate of difference comparison and improving the reliability and accuracy of the difference analysis results. Attached Figure Description
[0010] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is a flowchart illustrating the document difference quantification analysis method provided in the embodiments of this application; Figure 2 This is a functional block diagram of the quantitative analysis platform provided in the embodiments of this application; Figure 3 This is a block diagram of a lightweight AI service architecture provided in an embodiment of this application; Figure 4 This is a flowchart illustrating the parsing algorithm provided in an embodiment of this application; Figure 5 This is a flowchart illustrating the difference quantification analysis module provided in an embodiment of this application; Figure 6 This is a structural block diagram of the document version management mechanism provided in the embodiments of this application; Figure 7 This is a schematic diagram of the document difference quantification analysis device provided in the embodiments of this application; Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0012] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.
[0013] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.
[0014] In the face of version upgrades and changes to vehicle specification documents and business documents in the connected vehicle business, enterprises need to promptly recognize and adjust their strategies accordingly. Currently, this mainly relies on manual comparison or semi-automated tools such as document diffing (Diff) and version control to compare old and new specification documents. However, such methods not only consume a lot of human resources, but are also susceptible to the diversity of text types and the limitations of algorithms, resulting in a high false positive rate.
[0015] The acquisition, storage, use, and processing of data in this application comply with relevant national laws and regulations. It should be noted that certain software, components, models, and other existing industry solutions may be mentioned in the embodiments of this application. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0016] To address the problems of the prior art, embodiments of this application provide a method and apparatus for quantitative analysis of document differences. The method for quantitative analysis of document differences provided in this application will be described first.
[0017] Figure 1 A flowchart illustrating a document difference quantification analysis method provided in one embodiment of this application is shown. Figure 1 As shown, a document difference quantification analysis method may include the following steps S101 to S104: S101. Parse the target document to obtain the standard structured data of the target document; S102. Based on standard structured data, extract at least one specification rule from the target document and determine the target type of each specification rule; S103. Search in the historical specification library corresponding to each target type to obtain the target text fragments of each specification rule. The target text fragments are the historical text fragments in the historical specification library that have the highest similarity to the specification rule. The historical specification library includes multiple historical text fragments under the target type. S104. Input at least one normative rule in the target document and the corresponding target text fragments into a preset semantic analysis model for analysis, and obtain the difference analysis results between each normative rule in the target document and the corresponding target text fragments.
[0018] The document difference quantification analysis method in this application firstly parses target documents with different formats, layouts, and presentation styles into standard structured data, stripping away document format, carrier, and layout differences and retaining only the core content and logical structure. This achieves standardized and compatible processing of various vehicle specification documents and business documents in the Internet of Vehicles (IoV) business, completely eliminating comparison bias caused by text type diversity. Secondly, it automatically extracts specification rules based on the standard structured data, directly focusing on core content units in the document that have technical constraints and guidance, replacing the tedious manual screening of core content and significantly reducing human resource investment. Simultaneously, by determining the target type of the specification rules, it achieves the classification and sorting of the document's core content, laying the foundation for subsequent accurate retrieval and avoiding interference from meaningless decorative text, reducing the possibility of misjudgment due to irrelevant differences from the source. Finally, based on the target type of the specification rules, it performs targeted retrieval in the corresponding type's historical specification database. This approach replaces the manual review of historical documents, further enhancing the automation of the comparison process and saving human resources. By retrieving the target text fragment with the highest similarity, it ensures that the comparison objects in both old and new documents correspond to the same technical rules, avoiding mismatches between different types or unrelated content. This effectively reduces false alarms caused by incorrect comparison objects and improves the accuracy of difference comparison. Finally, a pre-defined semantic analysis model analyzes the differences between the standard rules and the target text fragment at the semantic level, replacing the subjective judgment of manual comparison and achieving full automation of the difference analysis process. This completely frees up human resources from the core comparison stage, significantly saving human resources. Furthermore, it overcomes the limitations of traditional character / literal difference algorithms, accurately distinguishing between meaningless differences that are literally different but semantically consistent and true technical differences that are literally similar but semantically altered. This significantly reduces the false alarm rate of difference comparison and improves the reliability and accuracy of the difference analysis results.
[0019] In S101, the aforementioned target document may refer to the document for which differential quantitative analysis is performed. For example, it may be the vehicle specification document and / or business document in the Internet of Vehicles business.
[0020] In some embodiments of this application, the target document is parsed to obtain standard structured data of the target document. For example, the target document may be parsed and semantically extracted to obtain an object structure system of the target document; table objects in the object structure system are identified and structured table data is extracted; based on the object structure system and the structured table data, the target document is reorganized to obtain a chaptered document structure system; and the chaptered document structure system is segmented into blocks and words to generate standard structured data of the target document.
[0021] In S102, the aforementioned specifications and rules, for example, could be: "The vehicle speed data acquisition frequency should be ≥10Hz, and the data accuracy should be ±0.1km / h", "Vehicle-cloud interaction adopts the MQTT 3.1.1 protocol, the message format is JSON, and the character encoding is UTF-8", "Remote vehicle control command issuance process: 1. Terminal authentication → 2. Command validity verification → 3. Cloud forwarding → 4. Vehicle execution", and "User vehicle location data must be encrypted with AES-256 before transmission, and the encryption key is updated every 24 hours", etc.
[0022] For example, the target type, "the vehicle speed data acquisition frequency should be ≥10Hz, and the data accuracy should be ±0.1km / h" corresponds to the parameter definition clause type; "vehicle-cloud interaction adopts the MQTT 3.1.1 protocol, the message format is JSON, and the character encoding is UTF-8" corresponds to the interface protocol clause type; "remote vehicle control command issuance process: 1. Terminal authentication → 2. Command legality verification → 3. Cloud forwarding → 4. Vehicle execution" corresponds to the process specification clause type; "user vehicle location data must be encrypted with AES-256 before transmission, and the encryption key must be updated every 24 hours" corresponds to the compliance requirement clause type.
[0023] In some embodiments of this application, at least one normative rule is extracted from the target document based on standard structured data, and the target type of each normative rule is determined. Specifically, at least one normative rule is extracted from the target document based on standard structured data; each normative rule is imported into a preset clause type document and input into a preset semantic analysis model to determine the target type of each normative rule.
[0024] In S103, the target text fragment mentioned above can be the historical text fragment with the highest similarity to the specification rule in the historical specification library. The historical specification library may include multiple historical text fragments under the target type.
[0025] In some embodiments of this application, a search is performed in the historical normative library corresponding to each target type to obtain the target text fragments of each normative rule. Specifically, each normative rule may be sliced to obtain at least one piece of text content for each normative rule; the at least one piece of text content for each normative rule is vectorized to obtain the vector of each normative rule; the vector of each normative rule is used to search in the historical normative library corresponding to each target type, and the similarity between the vector of each normative rule and each historical text fragment in the historical normative library corresponding to the target type is calculated; the historical text fragment with the highest similarity is determined as the target text fragment of the normative rule.
[0026] The process involves slicing each specification rule to obtain at least one piece of text content for each specification rule; vectorizing the at least one piece of text content for each specification rule to obtain a vector for each specification rule; searching the historical specification library corresponding to each target type based on the vector of each specification rule, and calculating the similarity between the vector of each specification rule and each historical text fragment in the historical specification library corresponding to the target type; and determining the historical text fragment with the highest similarity as the target text fragment of the specification rule. For example, this can be achieved by finely slicing the document based on a text parsing algorithm, and vectorizing each piece of text content using a pre-trained language model BERT to convert it into a high-dimensional dense vector, such as: [0.123, -0.456, 0.789, 0.012, -0.345, 0.678, -0.901, 0.234, -0.567, 0.890, ...]. Subsequently, by fusing cosine similarity in semantic space and conventional keyword similarity, the text fragments with the highest similarity are extracted. Here, the contribution ratios of semantic similarity and keyword similarity are automatically adjusted according to different document types and business scenarios, achieving the optimal fusion effect through linear weighting. This enables rapid and accurate retrieval based on massive historical specification documents, precisely locating relevant historical versions and related clause fragments.
[0027] In S104, the aforementioned difference analysis results may include a difference report and a revision plan. The difference report can be an objective result carrier that systematically and structurally organizes and presents the differences between the target document's specification rules and the target text fragments in the historical specification library, accurately, comprehensively, and clearly demonstrating the specific differences between the old and new documents. The revision plan can be a targeted and implementable modification suggestion or implementation plan proposed for the enterprise based on the objective difference information in the difference report, combined with the actual application needs of the connected vehicle business, technical standard requirements, and the enterprise's strategic direction, capable of transforming the difference information into concrete action guidance.
[0028] In some embodiments of this application, at least one specification rule and its corresponding target text fragments in the target document are input into a preset semantic analysis model for analysis. The difference analysis results between the specification rule and the corresponding target text fragments in the target document are output and displayed. For example, at least one specification rule and its corresponding target text fragments in the target document may be input into a preset semantic analysis model for analysis, and the difference analysis results between the specification rule and the corresponding target text fragments in the target document may be directly output and displayed. Alternatively, at least one specification rule and its corresponding target text fragments in the target document may be input into a preset semantic analysis model for analysis, and the initial difference analysis results between the specification rule and the corresponding target text fragments in the target document may be output and displayed. In response to the user's confirmation operation of the initial difference analysis result input, the initial difference analysis result is determined as the difference analysis result of the target document. In response to the user's modification operation of the initial difference analysis result input, the initial difference analysis result is changed to obtain the difference analysis result of the target document.
[0029] In some embodiments, the above-described S101 may specifically include: The target document is parsed and semantically extracted to obtain its object structure system. Identify table objects in the object structure system and extract structured table data; Based on the object structure system and structured tabular data, the target document is reorganized to obtain a chapter-based document structure system; The chapter-based document structure is segmented and word-segmented to generate standard structured data for the target document.
[0030] In some embodiments of this application, document parsing and semantic extraction are performed on the target document to obtain the object structure system of the target document. For example, this can be done by identifying the document format of the target document, which includes either a structured document format or a static document format. If the document format is a structured document format, the target component file of the target document is extracted. Based on the target component file, a document object model is established with the document content object as the root node. The document object model includes the document content of the target component file. Target nodes are identified from the document object model, and element content and format information are extracted. Based on the element content and format information of the target document, the object structure system of the target document is constructed. If the document format is a static document format, text block localization is performed on the target document, text block position information is extracted, and a position mapping matrix is constructed. Font feature recognition is performed on the target document to construct the document hierarchy structure system of the target document. The target document is detected and identified to extract table and image information from the target document. It is determined whether the target document contains target structures and / or target symbols, and the document layout format of the target document is determined. Based on the text block position information, the position mapping matrix, the document hierarchy structure system, the table and image information, and the document layout format, the object structure system of the target document is constructed.
[0031] In some embodiments of this application, table objects in an object structure system are identified and structured table data is extracted. For example, the table structure system may be identified by header boundary recognition to determine the table objects in the object structure system; the table objects may be preprocessed by data cleaning to obtain reconstructed table objects; and the reconstructed table objects may be parsed and grouped to obtain structured table data.
[0032] In some embodiments of this application, the target document is reorganized based on the object structure system and structured table data to obtain a chapter-based document structure system. For example, the native document styles in the object structure system can be matched with a preset style template library to determine the title hierarchy of the target document, which includes multiple levels of titles. Based on the title hierarchy system, chapter numbers corresponding to each level are generated, and each chapter number matches the prefix of each level. Based on the title hierarchy system, the chapter numbers of each level, and a preset multi-dimensional parameter configuration interface, the target document is filtered and reorganized to obtain a chapter-based document structure system.
[0033] In some embodiments of this application, the chapter-based document structure is segmented and word-segmented to generate standard structured data of the target document. For example, a word segmenter can be used to segment the chapter-based document structure and perform semantic word segmentation to generate standard structured data of the target document's chapter name-text / table JSON.
[0034] In this embodiment, the target document is parsed and standardized structured data is obtained through document parsing and semantic extraction, structured extraction of table objects, document reorganization, and block segmentation. Specifically, document parsing and semantic extraction can isolate the differences in the format of the target document, unifying different formats and presentation forms into a unified object structure system, thus achieving format-independent parsing of various vehicle specification documents and business documents in the Internet of Vehicles (IoV) business. Furthermore, structured extraction of table objects enables the structured decomposition and standardized extraction of a large amount of technical parameters, process specifications, and other content existing in table form in IoV specification documents, transforming unstructured table format data into machine-readable parsing. The system first generates structured data; then, by reorganizing the target document according to the technical logic of the vehicle networking specification document, it reconstructs the document's chapter hierarchy system, transforming the flat object structure into a hierarchical structure. Simultaneously, for special chapters containing multi-level nested tables, it achieves the linkage splitting and mapping between table data and chapter structure. Finally, by segmenting and generating standard structured data, it can logically segment the document according to the chapter hierarchy, and accurately segment each block of content, transforming the natural language document content into a standardized data form that is machine-recognizable and computable. This overcomes the limitations of diverse formats, complex structures, and inconsistent content levels in vehicle networking specification documents and business documents, enabling differentiated quantitative analysis of diverse text types.
[0035] In some embodiments, the above-described document parsing and semantic extraction of the target document to obtain the object structure system of the target document may specifically include: Identify the document format of the target document, which may include either structured document format or static document format; When the document format is a structured document format, extract the target component file of the target document; based on the target component file, establish a document object model with the document content object as the root node, and the document object model includes the document content of the target component file; identify the target node from the document object model and extract the element content and format information; based on the element content and format information of the target document, construct the object structure system of the target document; When the document format is static, the system performs text block location on the target document, extracts text block position information, and constructs a position mapping matrix; it performs font feature recognition on the target document and constructs the document hierarchy structure; it detects and recognizes the target document and extracts table and image information; it determines whether the target document contains target structures and / or target symbols and determines the document layout format; and it constructs the object structure system of the target document based on the text block position information, position mapping matrix, document hierarchy structure, table and image information, and document layout format.
[0036] The document formats mentioned above can include either structured document formats or static document formats. Structured document format refers to Word format, and static document format refers to PDF format.
[0037] The aforementioned target component files, exemplarily, include a document content carrier file, a style definition file, and a font information file.
[0038] In some embodiments of this application, the target component files of the target document are extracted. For example, the target document may be decompressed by calling a decompression engine to extract the target component files, including the main document content carrier document.xml file, the style definition file style.xml, and the font information file fontTable.xml, etc.
[0039] In some embodiments of this application, a document object model is established based on the target component file, with the document content object as the root node. The document object model includes the document content of the target component file. Target nodes are identified from the document object model, and element content and format information are extracted. Based on the element content and format information of the target document, an object structure system of the target document is constructed. For example, a document object model (DOM) can be established based on the document.xml file, with the Document object as the root node of the document tree. The document content is then subjected to syntactic analysis and semantic recognition using an XML parser. Specifically, the identification... <w:p>Paragraph nodes are used to extract paragraph-level formatting attributes (alignment, indentation, etc.) and identify... <w:r>The text execution node extracts character-level formatting information (font, font size, etc.) from the text fragment and recognizes it.
[0040]
[0041] <spans>and <size>Tags determine the size and style of the font (such as bold) to identify elements such as headings and body text, thus completing the construction of the document's hierarchical structure.
[0042] In some embodiments of this application, the target document is detected and identified, and table and image information in the target document is extracted; it is determined whether the target document contains target structures and / or target symbols, and the document layout format of the target document is determined; based on text block position information, position mapping matrix, document hierarchy system, table and image information, and document layout format, the object structure system of the target document is constructed. For example, table detection algorithms and OCR recognition algorithms can be used to extract table and image information, ensuring the integrity processing of documents with mixed text and images. In addition, based on the horizontal coordinate distribution characteristics of different text blocks in the same line of text, the spacing statistics method is used to determine whether there is an obvious column structure and column separator in the document, so as to automatically adapt to the layout format of single-column and multi-column PDF documents.
[0043] In this embodiment, by differentiating between structured and static document design and extracting multi-dimensional information such as content, format, location, tables, and images in layers, a standardized document object structure system is constructed. This effectively improves the universality, accuracy, and completeness of document parsing, realizes the automated and structured transformation of document information, reduces processing costs, and fully covers both text and non-text information, laying a data foundation for subsequent processing.
[0044] In some embodiments, the above-mentioned identification of table objects in the object structure system and extraction of structured table data may specifically include: Perform header boundary identification on the object structure system to determine the table objects within the object structure system; Perform data cleaning and preprocessing on the table object to obtain a reconstructed table object; The reconstructed table objects are parsed and grouped to obtain structured table data.
[0045] In some embodiments of this application, header boundary identification is performed on the object structure system to determine the table objects in the object structure system. For example, header boundary identification can be performed based on text matching and column type inference (such as numbers and dates).
[0046] The aforementioned data cleaning and preprocessing may include at least one of the following: label cleaning, special character escaping, whitespace filtering, newline character normalization, and text encoding standardization.
[0047] In some embodiments of this application, the table object is preprocessed with data cleaning to obtain a reconstructed table object. For example, this can be achieved by preprocessing cell data, including cleaning HTML tags, escaping special characters, filtering redundant whitespace characters, and normalizing line breaks, and using Unicode standardization technology to ensure text encoding consistency, thereby completing the hierarchical table text reconstruction.
[0048] In some embodiments of this application, the reconstructed table object is parsed and grouped to obtain structured table data. For example, it can be based on a leading column value similarity detection algorithm, using column span (colspan / rowspan) parsing and duplicate detection based on the first N columns of data to perform column-by-column grouping of complex table structures, and finally output structured table data in JSON format.
[0049] In this embodiment, table objects are located by identifying the table header boundaries. After data cleaning and preprocessing to reconstruct the table, structured table data is obtained by parsing and grouping. This effectively improves the accuracy of table recognition and data quality, realizes the automated, standardized, and structured transformation of table data, reduces processing costs, and provides standardized support for subsequent data applications.
[0050] In some embodiments, the above-mentioned reorganization of the target document based on the object structure system and structured table data to obtain a chapter-based document structure system may specifically include: The document's native styles in the object structure system are matched with the preset style template library to determine the target document's heading hierarchy system, which includes multiple levels of headings. Based on the title hierarchy, generate chapter numbers corresponding to each level, and match each chapter number with the prefix of each level; Based on the title hierarchy, chapter numbers at each level, and preset multi-dimensional parameter configuration interfaces, the target document is filtered and reorganized to obtain a chapter-based document structure system.
[0051] In some embodiments of this application, the native document styles in the object structure system are matched with a preset style template library to determine the heading hierarchy of the target document. For example, a heading recognition mechanism based on style mapping rules can be used to match the native document styles with a predefined style template library ['heading 1', 'heading 2', 'heading 3'...] to construct a multi-level heading classification system, i.e., a heading hierarchy system.
[0052] In some embodiments of this application, chapter numbers corresponding to each level are generated according to the title hierarchy. For example, chapter numbers can be generated according to a multi-level title classification system. At the same time, prefix matching verification is performed using regular expressions to avoid duplicate generation and conflict issues.
[0053] In some embodiments of this application, the target document is filtered and reorganized based on the title hierarchy, chapter numbers at each level, and a preset multi-dimensional parameter configuration interface to obtain a chapter-based document structure. For example, a flexible parameter configuration interface can be provided (configuration parameter types: - chapter depth control (maxDepth) - content type filtering (contentTypeFilter) - style matching threshold (styleMatchingThreshold) - custom filter conditions (customFilterRules)) to support refined chapter filtering and processing. For special chapters with multi-level nested tables, the data in the first column of the table is used as the grouping basis, a unique identifier is extracted, cells are merged according to the similarity of the first column values, and the table data is grouped accordingly. Each group corresponds to a sub-chapter data, thus realizing the splitting of the table structure.
[0054] In this embodiment, based on the object structure system and structured table data, the heading hierarchy system is determined by matching the original document style with the preset style template library, the corresponding chapter number is automatically generated, and the target document is screened and reorganized by combining a multi-dimensional parameter configuration interface to construct a chapter-based document structure system. This effectively standardizes the document's logical hierarchy and numbering format, improves the flexibility and completeness of document reorganization, realizes automated and standardized document chapter-based reconstruction, and reduces processing costs.
[0055] In some embodiments, the above-described S104 may specifically include: Input at least one normative rule in the target document and the corresponding target text fragments into a preset semantic analysis model for analysis, and output and display the initial difference analysis results between each normative rule in the target document and the corresponding target text fragments; In response to the user's confirmation of the initial difference analysis results, the initial difference analysis results are determined as the difference analysis results of the target document; In response to user modifications to the initial difference analysis results, the initial difference analysis results are changed to obtain the difference analysis results for the target document.
[0056] In some embodiments of this application, at least one specification rule and its corresponding target text fragments in the target document are input into a preset semantic analysis model for analysis. The initial difference analysis results between the specification rules and their corresponding target text fragments in the target document are output and displayed. For example, this can be achieved by connecting multiple execution nodes in series and parallel to automate the comparison between existing specifications and retrieved historical specifications. Difference analysis prompts are constructed, and combined with the specification documents and related chapter information obtained from knowledge retrieval, deep semantic analysis is performed through the semantic analysis model in the AI service node to accurately identify substantial differences between specifications. Subsequently, the structured initial difference analysis results (including difference reports and revision suggestions) are stored in a database and displayed on a webpage.
[0057] In this embodiment, at least one specification rule and the corresponding target text fragments in the target document are input into a preset semantic analysis model for analysis, and a workflow node for manual review is added. If the analysis results meet the requirements, the content of the historical document or the existing document is changed according to the revision plan; otherwise, it is manually modified, thereby significantly improving the revision accuracy and reducing compliance risks.
[0058] As one implementation of this application, in order to achieve fine-grained document version control, after S104 above, the method may further include: Obtain the sequence of user actions on the target document at different time points; A version backtracking tree for the target document is constructed based on the user's action sequence. The version backtracking tree supports sequential replay of historical snapshots to restore the historical state of the target document.
[0059] The aforementioned version backtracking tree refers to a tree-shaped data structure with the current version of the target document as the root node and the historical versions of the document as child nodes, constructed according to the version release time or iteration order. It has the ability to perform hierarchical association and difference tracing. It can be used to organize and manage the full version data of vehicle network specification documents and / or business documents, realize fast backtracking, difference tracing and historical association analysis between any versions, and is the core data foundation supporting the retrieval of historical specification library and the comparison of new and old versions.
[0060] In some embodiments of this application, a version backtracking tree of the target document is constructed based on the user operation sequence. For example, this can be done by using the initial version of the target document as the root node, with each user commit operation on the current document automatically generating a new version node as a child node of the current node. Users can create branches on any historical node, forming a tree-like version structure that supports multi-line parallel evolution to accurately restore any historical state. By saving a complete document snapshot, during the backtracking of the target document, the most recent snapshot version on the path to the target version can be located, and all operations from that snapshot to the target version can be replayed sequentially, thus accurately restoring the historical state of the target document.
[0061] In some embodiments of this application, the nearest common ancestor node of the branches to be merged can be located through a backtracking tree. Then, starting from this ancestor node, the operation change sequence of each branch is calculated and generated using a differential algorithm along the commit history paths of the two target branches. An intelligent conflict resolution mechanism based on operation transformation theory is introduced. By analyzing the operation semantics and contextual dependencies in the two change sequences, potential conflict points such as concurrent modification conflicts and deletion / modification conflicts are identified. Conflicts are resolved and branch merging is completed based on semantic understanding and row correspondence.
[0062] In this embodiment, a version backtracking tree is constructed based on the user operation sequence of multiple operations on the target document at different time points, which supports the update cancellation and historical state restoration of any node, and realizes fine-grained document version control.
[0063] In some embodiments, the above method can be applied to a differential quantification analysis platform, wherein the service architecture of the differential quantification analysis platform responsively processes the data stream and controls the data stream with backpressure.
[0064] The service architecture of the aforementioned differential quantification analysis platform can be a lightweight artificial intelligence (AI) service architecture, which is built on the open-source Spring AI framework.
[0065] In some embodiments of this application, the service architecture of the differential quantification analysis platform responsively processes the data stream and controls the data stream with back pressure. For example, the application programming interface (API) is based on the reactive programming paradigm, directly returns the Flux data stream, and introduces a back pressure buffer for back pressure control.
[0066] In this embodiment, since the method of this application can be applied to the differential quantification analysis platform, the service architecture of the differential quantification analysis platform responsively processes the data flow and controls the data flow under back pressure, which can effectively adjust the data production and consumption rate and avoid the risk of downstream system overload and memory overflow.
[0067] In some embodiments of this application, the aforementioned differential quantification analysis platform may further include a parallel scheduler and an elastic thread pool. Specifically, a dedicated parallel scheduler is designated for computationally intensive tasks to achieve physical isolation of the task execution environment, ensuring that critical computational tasks are not interfered with by I / O blocking and maximizing the utilization of CPU resources. An elastic thread pool is configured for blocking I / O operations, dynamically adjusting the number of threads according to the load to efficiently handle blocking operations such as database access and network requests, preventing core thread pool resources from being occupied for extended periods and becoming stagnant.
[0068] In some embodiments, the above-described differential quantification analysis platform may further include multiple artificial intelligence service nodes, and the above method further includes: Obtain the health status of each AI service node, which includes at least one of response latency and availability; Based on the health status of each AI service node, a target AI service node is determined. The target AI service node is the AI service node with the minimum response latency and / or the maximum availability. The target AI service node is used to input at least one normative rule in the target document and the corresponding target text fragments into a preset semantic analysis model for analysis, and obtain the difference analysis results between each normative rule in the target document and the corresponding target text fragments.
[0069] The aforementioned artificial intelligence service node can refer to the smallest functional unit deployed in a distributed service architecture, possessing independent artificial intelligence computing capabilities and capable of providing specific AI services to the outside world. It is the core carrier that carries the AI-related computing tasks such as semantic analysis, differential quantification, and rule extraction in this application.
[0070] The aforementioned health status may include at least one of response latency and availability. Response latency refers to the total time elapsed from when an AI service node receives an external service call request to when it completes the corresponding AI computation task and returns the processing result. It primarily measures the node's service processing speed and real-time performance, measured in milliseconds (ms). Availability refers to the percentage of time within a preset statistical period during which an AI service node can normally receive and process service call requests and return valid processing results. It primarily measures the node's service continuity and fault tolerance, with a value ranging from 0% to 100%.
[0071] In some embodiments of this application, the health status of each AI service node is obtained, for example, by continuously and proactively monitoring the health status of each AI service node, such as response latency and availability, through a responsive health indicator component.
[0072] The aforementioned target AI service node can be the AI service node with the minimum response latency and / or the maximum availability.
[0073] In some embodiments of this application, the target AI service node is determined based on the health status of each AI service node. For example, the AI service node can be intelligently selected to handle the request based on the real-time collected health status using a dynamic routing strategy.
[0074] In this embodiment, a responsive health indicator component continuously and proactively monitors the health status of each AI service node, including response latency and availability. This not only provides real-time data for intelligent scheduling but also integrates timeout control and intelligent retry strategies, enhancing the framework's tolerance for transient anomalies. Based on the real-time collected health indicators, a dynamic routing strategy is then used to intelligently select AI service nodes to handle requests, effectively achieving load balancing, avoiding faulty nodes, and thus maximizing the overall service availability and efficiency.
[0075] To facilitate understanding of the document difference quantification analysis method in the embodiments of this application, the actual application process of this document difference quantification analysis method is described as follows: The document difference quantification analysis method provided in this application, such as Figure 2 As shown, a lightweight AI service architecture is implemented based on the open-source Spring AI, combining a self-developed text parsing algorithm, a differential quantification analysis module, and a document version management mechanism based on operation backtracking trees to provide an integrated intelligent differential quantification analysis platform. The following technical points are adopted: 1. Lightweight AI service architecture: The lightweight AI service architecture is built on the open-source Spring AI framework, achieving intelligent scheduling of AI service nodes through reactive streaming processing, thread pools, and stability enhancement strategies. The core implementation comprises four key technologies: reactive streaming processing, thread pool optimization, stability enhancement components, and intelligent scheduling. Figure 3 As shown, efficient streaming processing and resource management significantly improve the system's throughput, response speed, and fault tolerance.
[0076] 1.1 Responsive streaming processing: The core API is based on the reactive programming paradigm, directly returning Flux data streams and introducing a backpressure buffer for backpressure control, effectively regulating the data production and consumption rates to avoid downstream system overload and memory overflow risks.
[0077] 1.2 Thread Pool Scheduling and Isolation: A dedicated parallel scheduler is specified for computationally intensive tasks to achieve physical isolation of the task execution environment, ensuring that critical computing tasks are not affected by I / O blocking and maximizing the utilization of CPU resources. An elastic thread pool is configured for blocking I / O operations, which dynamically adjusts the number of threads according to the load, efficiently handling blocking operations such as database access and network requests, and preventing core thread pool resources from being occupied for a long time and becoming stagnant.
[0078] 1.3 Stability Enhancement Mechanism: The integration of timeout control and intelligent retry strategies enhances the framework's tolerance to transient anomalies. Through a responsive health metric component, the framework continuously and proactively monitors the health status of each AI service node, including response latency and availability, providing real-time data for intelligent scheduling.
[0079] 1.4 Intelligent Service Scheduling: Based on real-time collected health metrics, a dynamic routing strategy is used to intelligently select AI service nodes to handle requests, effectively achieving load balancing, avoiding faulty nodes, and thus maximizing the availability and efficiency of the overall service.
[0080] 2. Text parsing algorithm: The text parsing algorithm implements a complete parsing and transformation process from the original document (equivalent to the target document mentioned above) to a structured knowledge representation, such as... Figure 4 As shown, the core comprises four key technological components.
[0081] 2.1 Step S401: Document parsing and semantic extraction: It supports vehicle specification documents in docx and pdf formats and performs document parsing and processing based on text characteristics.
[0082] ① If the document is in docx format, the decompression engine is first used to decompress the target document, extracting the core component files, including the main document content carrier file document.xml, the style definition file style.xml, and the font information file fontTable.xml, etc. Then, a Document Object Model (DOM) is built based on the core document.xml file, with the Document object as the root node of the document tree. An XML parser is then used to perform syntactic analysis and semantic recognition on the document content. Specifically, it recognizes… <w:p>Paragraph nodes are used to extract paragraph-level formatting attributes (alignment, indentation, etc.) and identify... <w:r> The text execution node extracts character-level formatting information (font, font size, etc.) from the text fragment and recognizes it.< / w:r> < / w:p> < / size> < / spans> Table elements are used to construct a complete table object model by parsing table attributes. Based on element-level parsing, a multi-level nested object structure is built: Document->Body->Paragraph / Table-Run / Cell, providing a standardized data interface for subsequent applications. In some embodiments of this application, text block localization is performed on the target document, extracting text block position information and constructing a position mapping matrix. For example, this can be achieved by establishing a coordinate geometry-based text block localization algorithm, dynamically setting the column threshold (column_threshold) and line spacing threshold (line_spacing_threshold) to extract text block position information, constructing a text block position mapping matrix, and achieving accurate text region segmentation. In some embodiments of this application, font feature recognition is performed on the target document to construct a document hierarchy structure. For example, this can be achieved at the font feature recognition level by recognizing…
[0083] <spans>and <size>Tags determine font size and style (e.g., bold) to identify elements such as titles and body text, thus constructing the document's hierarchical structure. Finally, by applying table detection and OCR recognition algorithms from the open-source Camelot library, table and image information is extracted, ensuring the integrity of documents with mixed text and images. Additionally, based on the horizontal coordinate distribution characteristics of different text blocks within the same line of text, a spacing statistical method is used to determine whether there are obvious column structures and column separators in the document, automatically adapting to single-column and multi-column PDF document layout formats.
[0084] 2.2 Step S402: Intelligent structuring of tables: An innovative multi-level header recognition algorithm is designed to automatically identify multi-level headers and extract structured data. First, header boundary recognition is performed based on text matching and column type inference (e.g., numbers, dates). Cell data preprocessing, including HTML tag cleaning, special character escaping, redundant whitespace filtering, and line break normalization, cleans the text content. Unicode standardization technology ensures consistent text encoding. This completes the hierarchical table text reconstruction. Subsequently, based on a leading column value similarity detection algorithm, column span (colspan / rowspan) parsing and duplicate detection based on the first N columns are used to group complex table structures by column, finally outputting structured table data in JSON format.
[0085] 2.3 Step S403: Dynamic document reorganization: A style-mapping-based title recognition mechanism is employed. It matches predefined style templates ['heading1', 'heading 2', 'heading 3'…] with the document's native styles to construct a multi-level title classification system and generate chapter numbers accordingly. Simultaneously, regular expressions are used for prefix matching verification to avoid duplicate number generation and conflicts. A flexible parameter configuration interface is provided (configuration parameter types: - Chapter depth control (maxDepth) - Content type filtering (contentTypeFilter) - Style matching threshold (styleMatchingThreshold) - Custom filtering conditions (customFilterRules)) to support fine-grained chapter filtering and processing. Finally, for special chapters with multi-level nested tables, the first column of the table data is used as the grouping basis. A unique identifier is extracted, and cells are merged according to the similarity of the first column values. This grouping is then used to group the table data, with each group corresponding to a sub-chapter, thus achieving table structure splitting.
[0086] 2.4 Step S404 Knowledge Representation Optimization: Finally, a word segmenter is used to achieve document segmentation and semantic word segmentation, generating a standard structured output of chapter name-text / table JSON.
[0087] 3. Difference Quantification Analysis Module: The difference quantification analysis module provides a difference quantification analysis method that intelligently generates difference analysis results and structured improvement suggestions. Based on a process-oriented pipeline architecture and a parallel iterative processing mode, it constructs a closed-loop process for intelligent comparison and analysis of standardized documents, such as... Figure 5 As shown, the core comprises three main functional modules: 3.1 Step S501: Standardized Text Intelligent Extraction and Classification: The system extracts specification clauses from target version business documents in parallel, supporting batch import of multi-source data and dynamic configuration of specification document parsing strategies. Imported predefined clause type documents are processed in blocks according to clause type, and then AI semantic analysis is performed in batches in parallel to classify the specification clauses by type, and group the specification clauses based on the classification results.
[0088] 3.2 Step S502: Precise Knowledge Retrieval The document is finely segmented based on a text parsing algorithm. Each text segment is vectorized using the pre-trained language model BERT to form a high-dimensional dense vector, such as [0.123, -0.456, 0.789, 0.012, -0.345, 0.678, -0.901, 0.234, -0.567, 0.890, ...]. Subsequently, the text segment with the highest similarity is extracted by fusing cosine similarity in semantic space and conventional keyword similarity. Here, the contribution ratio of semantic similarity and keyword similarity is automatically adjusted according to different document types and business scenarios, achieving optimal fusion through linear weighting. This enables rapid and accurate retrieval based on massive amounts of historical and standardized documents, precisely locating relevant historical versions and related clauses.
[0089] 3.3 Step S503AI Intelligent Difference Analysis: An end-to-end workflow is constructed: [Standard clause input -> Historical standard retrieval -> AI semantic analysis -> Analysis result storage -> Manual result review -> Document modification]. Multiple execution nodes are connected in series and parallel to automate the comparison between existing standards and retrieved historical standards. Difference analysis prompts are constructed, and combined with standard documents and related chapter information obtained from knowledge retrieval, deep semantic analysis is performed through the AI semantic analysis node to accurately identify substantial differences between standards. The resulting structured difference report and revision suggestions are then stored in a database and displayed on a webpage. Simultaneously, a manual review workflow node is added. If the analysis results meet the requirements, the content of historical or existing documents is modified according to the revision plan, thereby significantly improving the accuracy of revisions and reducing compliance risks.
[0090] 4. Document version management mechanism: A version backtracking tree is constructed based on user operation sequences of multiple actions performed on a target document at different time points, enabling fine-grained document version control. Based on the discrepancy analysis results, document revision schemes are automatically generated, supporting update undoing and historical state restoration at any node, achieving batch automated updates of historical documents. Figure 6 As shown, the core comprises three main functional modules: 4.1 Branch Management: It supports parallel editing and historical version derivation. With the initial version as the root node, each commit operation by the user to the current document automatically generates a new version node, which becomes a child node of the current node. Users can create branches on any historical node, forming a tree-like version structure, supporting multi-line parallel evolution.
[0091] Version 4.2 Retrospective: Accurately restore any historical state. The system automatically saves a complete document snapshot. When backtracking, locate the most recent snapshot version on the path of the target version, and replay all operations from that snapshot to the target version in sequence to accurately restore the document's historical state.
[0092] 4.3 Branch Merging: The nearest common ancestor node of the branches to be merged is located by backtracking the tree. Then, starting from the ancestor node, the operation change sequence of each branch is calculated and generated by the differential algorithm along the commit history path of the two target branches.
[0093] The system introduces an intelligent conflict resolution mechanism based on operation transformation theory. By analyzing the operation semantics and contextual dependencies in two change sequences, it identifies potential conflict points such as concurrent modification conflicts and deletion / modification conflicts. Based on semantic understanding and row correspondence, it resolves conflicts and completes branch merging.
[0094] This application embodiment enables real-time differential analysis and processing of vehicle specification document version upgrades and changes within the context of the Internet of Vehicles (IoV), effectively improving the maintenance efficiency and quality of specification documents and reducing enterprise compliance risks. To this end, a complete method for intelligent analysis and differential quantification of multi-source specification documents is implemented. First, a lightweight concurrent architecture is implemented based on the open-source Spring AI framework to ensure real-time response capabilities in scenarios with thousands of QPS. Then, a multi-source heterogeneous knowledge base is built based on a self-developed text parsing algorithm, supporting the parsing of specification documents in various formats, and enabling real-time document updates through an online content management interface. Finally, an integrated intelligent differential quantification analysis platform is created through the implementation of the differential quantification analysis method and the document version management mechanism.
[0095] Based on the document difference quantification analysis method provided in the above embodiments, this application also provides specific implementation methods of the document difference quantification analysis device. Please refer to the following embodiments.
[0096] like Figure 7 As shown, the document difference quantification analysis device 700 provided in this application embodiment may include the following modules: parsing module 701, classification module 702, retrieval module 703, and analysis module 704.
[0097] Parsing module 701 is used to parse the target document to obtain the standard structured data of the target document; The classification module 702 is used to extract at least one normative rule from the target document based on standard structured data, and to determine the target type of each normative rule; The retrieval module 703 is used to search in the historical specification library corresponding to each target type to obtain the target text fragments of each specification rule. The target text fragments are the historical text fragments in the historical specification library that have the highest similarity to the specification rules. The historical specification library includes multiple historical text fragments under the target type. Analysis module 704 is used to input at least one normative rule in the target document and the corresponding target text fragments into a preset semantic analysis model for analysis, and to obtain the difference analysis results between each normative rule in the target document and the corresponding target text fragments.
[0098] The document difference quantification analysis device in this application embodiment firstly parses target documents with different formats, layouts, and presentation forms into standard structured data, stripping away document format, carrier, and layout differences and retaining only the core content and logical structure. This achieves standardized and compatible processing of various vehicle specification documents and business documents in the Internet of Vehicles business, completely eliminating comparison biases caused by text type diversity. Then, it automatically extracts specification rules based on the standard structured data, directly focusing on core content units in the document that have technical constraints and guidance, replacing the tedious manual screening of core content and significantly reducing human resource investment. Simultaneously, by determining the target type of the specification rules, it achieves the classification and sorting of the document's core content, laying the foundation for subsequent accurate retrieval and avoiding interference from meaningless decorative text, reducing the possibility of misjudgment due to irrelevant differences from the source. Finally, based on the target type of the specification rules, it performs targeted retrieval in the corresponding type's historical specification database. This approach replaces the manual review of historical documents, further enhancing the automation of the comparison process and saving human resources. By retrieving the target text fragment with the highest similarity, it ensures that the comparison objects in both old and new documents correspond to the same technical rules, avoiding mismatches between different types or unrelated content. This effectively reduces false alarms caused by incorrect comparison objects and improves the accuracy of difference comparison. Finally, a pre-defined semantic analysis model analyzes the differences between the standard rules and the target text fragment at the semantic level, replacing the subjective judgment of manual comparison and achieving full automation of the difference analysis process. This completely frees up human resources from the core comparison stage, significantly saving human resources. Furthermore, it overcomes the limitations of traditional character / literal difference algorithms, accurately distinguishing between meaningless differences that are literally different but semantically consistent and true technical differences that are literally similar but semantically altered. This significantly reduces the false alarm rate of difference comparison and improves the reliability and accuracy of the difference analysis results.
[0099] In some embodiments, the parsing module 701 described above may specifically include: The parsing unit is used to perform document parsing and semantic extraction on the target document to obtain the object structure system of the target document; The identification unit is used to identify table objects in the object structure system and extract structured table data; The reorganization unit is used to reorganize the target document based on the object structure system and structured tabular data to obtain a chapter-based document structure system; The generation unit is used to segment and word the chapter-based document structure to generate standard structured data for the target document.
[0100] In some embodiments, the above-mentioned parsing unit may specifically include: The identification subunit is used to identify the document format of the target document, which includes either structured document format or static document format. The first parsing subunit is used to extract the target component file of the target document when the document format is a structured document format; based on the target component file, a document object model is established with the document content object as the root node, and the document object model includes the document content of the target component file; target nodes are identified from the document object model and element content and format information are extracted; based on the element content and format information of the target document, the object structure system of the target document is constructed. The second parsing subunit is used to: locate text blocks in the target document, extract text block position information and construct a position mapping matrix, when the document format is static; identify font features in the target document and construct the document hierarchy structure; detect and identify the target document and extract table and image information; determine whether the target document contains target structures and / or target symbols and determine the document layout format; and construct the object structure system of the target document based on text block position information, position mapping matrix, document hierarchy structure, table and image information, and document layout format.
[0101] In some embodiments, the identification unit may specifically include: Determine sub-units to identify the header boundaries of the object structure system and identify table objects within the object structure system; The first processing subunit is used to perform data cleaning and preprocessing on the table object to obtain a reconstructed table object; The second processing subunit is used to parse and group the reconstructed table objects to obtain structured table data.
[0102] In some embodiments, the above-mentioned recombination unit may specifically include: The matching sub-unit is used to match the native document styles in the object structure system with the preset style template library to determine the heading hierarchy of the target document, which includes multiple levels of headings; Generate sub-units to generate chapter numbers corresponding to each level according to the heading hierarchy, with each chapter number matching the prefix of each level; The reorganization subunit is used to filter and reorganize the target document based on the heading hierarchy, chapter numbers at each level, and preset multi-dimensional parameter configuration interfaces to obtain a chapter-based document structure system.
[0103] In some embodiments, the analysis module 704 described above may specifically include: The analysis unit is used to input at least one normative rule in the target document and the corresponding target text fragments into a preset semantic analysis model for analysis, and output and display the initial difference analysis results between each normative rule in the target document and the corresponding target text fragments; The determination unit is used to determine the initial difference analysis result as the difference analysis result of the target document in response to the user's confirmation operation on the initial difference analysis result input. The change unit is used to respond to the user's modification operation on the initial difference analysis results input, modify the initial difference analysis results, and obtain the difference analysis results of the target document.
[0104] As one implementation of this application, in order to achieve fine-grained document version control, the above-mentioned device 700 may further include: The first acquisition module is used to acquire the user operation sequence of multiple operations performed by the user on the target document at different time points; The build module is used to construct a version backtracking tree for the target document based on the user's operation sequence. The version backtracking tree supports sequential replay of historical snapshots to restore the historical state of the target document.
[0105] In some embodiments, the above-described device 700 can be applied to a differential quantification analysis platform, the service architecture of which responsively processes data streams and controls data streams under back pressure.
[0106] In some embodiments, the above-mentioned differential quantification analysis platform may further include multiple artificial intelligence service nodes, and the above-mentioned device 700 may further include: The second acquisition module is used to acquire the health status of each artificial intelligence service node, and the health status includes at least one of response latency and availability. The determination module is used to determine the target AI service node based on the health status of each AI service node. The target AI service node is the AI service node with the minimum response latency and / or the maximum availability. The target AI service node is used to input at least one normative rule in the target document and the corresponding target text fragments into a preset semantic analysis model for analysis, and obtain the difference analysis results between each normative rule in the target document and the corresponding target text fragments.
[0107] Figure 8 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.
[0108] Electronic devices may include a processor 801 and a memory 802 storing computer program instructions.
[0109] Specifically, the processor 801 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0110] Memory 802 may include mass storage for data or instructions. For example, and not limitingly, memory 802 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 802 may include removable or non-removable (or fixed) media. Where appropriate, memory 802 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 802 is non-volatile solid-state memory.
[0111] In a particular embodiment, memory 802 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Thus, generally, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this disclosure.
[0112] The processor 801 reads and executes computer program instructions stored in the memory 802 to implement any of the document difference quantification analysis methods in the above embodiments.
[0113] In one example, the electronic device may also include a communication interface 803 and a bus 810. For example, Figure 8 As shown, the processor 801, memory 802, and communication interface 803 are connected through bus 810 and complete communication with each other.
[0114] The communication interface 803 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0115] Bus 810 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 810 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.
[0116] The electronic device can perform the document difference quantification analysis method in the embodiments of this application, thereby achieving a combination of Figure 1 and Figure 7 The document difference quantification analysis method and apparatus are described.
[0117] Furthermore, in conjunction with the document difference quantification analysis method in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the document difference quantification analysis methods in the above embodiments.
[0118] This application also provides a computer program product, including a computer program that, when executed by a processor, implements any of the document difference quantification analysis methods described in the above embodiments.
[0119] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0120] The functional blocks shown in the above-described structural diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0121] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0122] The aspects of this disclosure have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0123] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.< / size> < / spans> Table elements are used to construct a complete table object model by parsing table attributes. Based on element-level parsing, a multi-level nested object structure is built: Document->Body->Paragraph / Table-Run / Cell, providing a standardized data interface for subsequent applications. ② If the document is in PDF format, deep layout reconstruction technology is used to extract and process text, tables, and other content. First, a text block positioning algorithm based on coordinate geometry is established. By dynamically setting the column threshold (column_threshold) and line spacing threshold (line_spacing_threshold), the position information of text blocks is extracted, and a text block position mapping matrix is constructed to achieve accurate segmentation of text regions. At the font feature recognition level, by recognizing… < / w:r> < / w:p>
Claims
1. A method for quantitative analysis of document differences, characterized in that, The method includes: The target document is parsed to obtain its standard structured data. Based on the standard structured data, extract at least one specification rule from the target document and determine the target type of each specification rule; Searching in the historical norm library corresponding to each target type yields the target text fragments of each norm rule. The target text fragments are the historical text fragments in the historical norm library that have the highest similarity to the norm rule. The historical norm library includes multiple historical text fragments under each target type. The at least one normative rule in the target document and the corresponding target text fragments are input into a preset semantic analysis model for analysis, and the difference analysis results between the normative rule in the target document and the corresponding target text fragments are obtained.
2. The method according to claim 1, characterized in that, The process of parsing the target document to obtain its standard structured data includes: The target document is parsed and semantically extracted to obtain the object structure system of the target document; The table objects in the object structure system are identified, and structured table data is extracted. Based on the object structure system and the structured table data, the target document is reorganized to obtain a chapter-based document structure system; The chapter-based document structure is segmented and word-segmented to generate standard structured data for the target document.
3. The method according to claim 2, characterized in that, The step of parsing and semantic extraction of the target document to obtain the object structure system of the target document includes: Identify the document format of the target document, wherein the document format includes either a structured document format or a static document format; When the document format is the structured document format, extract the target component file of the target document; based on the target component file, establish a document object model with the document content object as the root node, the document object model including the document content of the target component file; identify target nodes from the document object model and extract element content and format information; based on the element content and format information of the target document, construct the object structure system of the target document; When the document format is the static document format, the target document is used to locate text blocks, extract text block position information, and construct a position mapping matrix; the target document is used to identify font features and construct a document hierarchy structure; the target document is used to detect and identify, and extract table and image information; it is determined whether the target document contains target structures and / or target symbols, and the document layout format is determined; based on the text block position information, the position mapping matrix, the document hierarchy structure, the table and image information, and the document layout format, the object structure system of the target document is constructed.
4. The method according to claim 2, characterized in that, The process of identifying table objects in the object structure system and extracting structured table data includes: Perform header boundary identification on the object structure system to determine the table objects in the object structure system; The table object is preprocessed by data cleaning to obtain a reconstructed table object; The reconstructed table object is parsed and grouped to obtain structured table data.
5. The method according to claim 2, characterized in that, The process of reorganizing the target document based on the object structure system and the structured table data to obtain a chapter-based document structure system includes: The native document styles in the object structure system are matched with the preset style template library to determine the title hierarchy of the target document, which includes multiple levels of titles. Based on the title hierarchy, generate chapter numbers corresponding to each level, and each chapter number matches the prefix of each level; Based on the title hierarchy, the chapter numbers of each level, and the preset multi-dimensional parameter configuration interface, the target document is filtered and reorganized to obtain a chapter-based document structure system.
6. The method according to claim 1, characterized in that, The step of inputting at least one normative rule and the corresponding target text fragments in the target document into a preset semantic analysis model for analysis, and obtaining the difference analysis results between each normative rule in the target document and the corresponding target text fragments, includes: The at least one normative rule in the target document and the corresponding target text fragments are input into a preset semantic analysis model for analysis, and the initial difference analysis results between the normative rule in the target document and the corresponding target text fragments are output and displayed. In response to the user's confirmation of the initial difference analysis result, the initial difference analysis result is determined as the difference analysis result of the target document; In response to the user's modification operation on the initial difference analysis result input, the initial difference analysis result is changed to obtain the difference analysis result of the target document.
7. The method according to claim 1, characterized in that, After inputting at least one normative rule and the corresponding target text fragments from the target document into a preset semantic analysis model for analysis to obtain the difference analysis results between each normative rule and the corresponding target text fragments in the target document, the method further includes: Obtain the user operation sequence of multiple operations performed by the user on the target document at different time points; A version backtracking tree for the target document is constructed based on the user operation sequence. The version backtracking tree supports sequential replay of historical snapshots to restore the historical state of the target document.
8. The method according to claim 1, characterized in that, The method is applied to a differential quantification analysis platform, whose service architecture responsively processes the data stream and controls the data stream with backpressure.
9. The method according to claim 8, characterized in that, The difference quantification analysis platform also includes multiple artificial intelligence service nodes, and the method further includes: Obtain the health status of each of the AI service nodes, wherein the health status includes at least one of response latency and availability; Based on the health status of each AI service node, a target AI service node is determined. The target AI service node is the AI service node with the minimum response latency and / or the maximum availability. The target AI service node is used to input at least one normative rule in the target document and the corresponding target text fragments into a preset semantic analysis model for analysis, so as to obtain the difference analysis results between each normative rule in the target document and the corresponding target text fragments.
10. A document difference quantification analysis device, characterized in that, The device includes: The parsing module is used to parse the target document to obtain the standard structured data of the target document; The classification module is used to extract at least one normative rule from the target document based on the standard structured data, and to determine the target type of each normative rule; The retrieval module is used to search in the historical norm library corresponding to each target type to obtain the target text fragment of each norm rule. The target text fragment is the historical text fragment in the historical norm library that has the highest similarity to the norm rule. The historical norm library includes multiple historical text fragments under the target type. The analysis module is used to input at least one normative rule and the corresponding target text fragments in the target document into a preset semantic analysis model for analysis, and to obtain the difference analysis results between each normative rule in the target document and the corresponding target text fragments.
