Semantic parsing and keyword-driven document consistency alignment method

By employing a multi-layer semantic parsing and keyword-driven document consistency comparison method, the efficiency and accuracy issues in project document consistency verification are resolved. This enables efficient and accurate identification of differences and detection of logical contradictions between documents, generating intuitive analysis reports to assist in project management.

CN119886103BActive Publication Date: 2025-11-25BEIJING BIG DATA CENT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411953722.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-11-25
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Existing technologies struggle to quickly and accurately identify potential differences and logical contradictions between complex documents during the entire project lifecycle management process, resulting in inefficient document consistency verification, especially when dealing with complex schemes and clauses, making it difficult to guarantee both efficiency and accuracy.

Method used

Employing a multi-layered semantic parsing and keyword-driven document consistency comparison method, this approach automatically identifies document differences and logical contradictions through directory parsing, semantic embedding, keyword capture, and multi-layered semantic comparison, generating structured reports and visualizations to assist in content review and optimization.

Benefits of technology

It significantly improves the efficiency and accuracy of document comparison at all stages of a project, accurately locates key content, deeply captures the semantic relationships between documents, automatically identifies subtle differences and logical contradictions, generates intuitive difference analysis reports, and supports rapid review and decision optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119886103B_ABST
    Figure CN119886103B_ABST
Patent Text Reader

Abstract

The application provides a semantic analysis and keyword-driven document consistency comparison method. First, the directory structure and weight model are constructed by analyzing the directory of the input document, and the key chapters are located and the content is extracted. Then, the pre-trained language model is used to generate semantic vectors, and combined with multi-layer semantic analysis technology, the keyword capture and similar semantic search of the document are carried out. Through multi-level semantic comparison at the word, sentence and paragraph levels, combined with semantic link tracking and intelligent adjustment mechanism, the differences between documents are accurately identified to ensure content consistency. Cosine similarity, Euclidean distance and other methods are used to match and verify the content, identify logical contradictions and information omissions, and finally output structured text. The application can effectively improve the accuracy and efficiency of document comparison and ensure the accuracy and consistency of document content.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of natural language processing and information retrieval, and specifically relates to a semantic analysis and keyword-driven document consistency comparison method. BACKGROUND

[0002] In the project life cycle management process, a large number of complex documents will be generated at different stages (such as project planning, procurement management, contract signing, project execution, and result acceptance). These documents are often large in content, complex in structure, and involve multiple aspects of information, and the consistency between them is crucial to the successful implementation of the project. However, the existing manual review and traditional text comparison methods have low efficiency, are prone to missing details, and are difficult to accurately identify potential differences and logical contradictions between documents, especially when dealing with complex schemes, clauses, and other key content, fast and accurate content comparison is particularly important.

[0003] Traditional comparison methods rely on simple keyword matching and manual checking, making it difficult to capture the association between deep semantic documents and unable to effectively handle complex sentence structures and semantic drift. This deficiency makes it difficult for existing systems to ensure efficiency and accuracy when dealing with large-scale text comparison and document consistency verification, affecting the smooth progress of the project. With the rapid development of natural language processing technology, semantic understanding-based comparison technology has gradually become the key to solving this problem. However, there is currently a lack of systems that integrate multi-layer semantic analysis, keyword-driven, and optimization strategies, and there is an urgent need for a solution that can achieve multi-level, intelligent comparison to address the complex document consistency challenges in various process scenarios. SUMMARY

[0004] The present application aims to provide a multi-layer semantic analysis and keyword-driven document consistency comparison method to improve the efficiency and accuracy of document comparison at various stages of the project. Through directory analysis, semantic embedding, keyword capture, and multi-level semantic comparison, document differences and logical contradictions are automatically identified, and structured reports and visual results are generated to assist content review and optimization.

[0005] The technical solution of the present application is as follows:

[0006] The semantic analysis and keyword-driven document consistency comparison method includes the following steps:

[0007] S1, intelligent analysis and weight allocation are performed through the document directory to accurately locate the key content;

[0008] S2, a pre-trained language model is applied to perform deep semantic analysis on the document to generate multi-dimensional semantic vectors, and then dimensionality reduction optimization is performed to continue semantic calculation;

[0009] S3, extract the core keywords of the document and assign weights, combine similar semantic search algorithms, optimize the keyword-driven semantic matching process, and identify potential differences between documents;

[0010] S4, through multi-level comparison algorithm, fine semantic comparison is carried out on different levels of content comparison;

[0011] S5, the context semantics of the document content are deeply modeled, logical contradictions and information omissions are detected, so as to ensure the semantic coherence and accuracy of the document in the whole process;

[0012] S6, combine intelligent prompts and visualization tools to generate difference analysis results.

[0013] Further, the step S1 includes the following contents:

[0014] S11, directory extraction and analysis: using text analysis algorithm to automatically identify the directory part in the document, extract chapter title, number, page number information, form a preliminary directory framework, convert the recognized directory framework into tree structure, and generate corresponding index table;

[0015] S12, directory weighting model and content automatic positioning: through the directory weighting model, the weight of each chapter and subchapter is assigned, the weight is set according to the relevance of chapter title and the importance of chapter content, based on the directory weighting model, the high weight chapter content is extracted preferentially, and the local semantic vector matrix is generated;

[0016] S13, key chapter positioning and content segment division: according to the pre-defined keywords, the relevant chapters are quickly positioned from the directory framework, and the target chapter content is directly extracted according to the page number information in the directory framework, then the extracted chapter content is refined, and the content is divided into smaller semantic units.

[0017] Further, the step S2 includes the following contents:

[0018] S21, application of pre-trained language model: adopting pre-trained language model BERT to capture the context relationship and deep semantic information of the document, inputting the extracted content segment into the pre-trained language model, using the encoder part to process the document, and generating corresponding high-dimensional semantic vector;

[0019] S22, multi-dimensional semantic vector generation;

[0020] S23, dimension reduction and optimization: using dimension reduction technology to reduce the dimension of semantic vector, in the dimension reduction process, the feature dimension which has the greatest influence on semantic calculation is mainly reserved, and it is ensured that the vector after dimension reduction can still accurately reflect the semantic characteristics of the original document;

[0021] S24, semantic vector storage and management: store the generated semantic vector in a vector database that supports vector retrieval and similarity calculation, index the semantic vector in the vector database to enable efficient approximate nearest neighbor search.

[0022] Further, the step S3 includes the following steps:

[0023] S31, keyword extraction and weight assignment;

[0024] S311, keyword extraction: based on the generated semantic vector, use a pre-trained language model to analyze the text in depth and automatically identify the core keywords in the document, including the following steps: first, use the language model to analyze the context of the words and generate a vector reflecting the semantic relationship; then, combined with the word frequency information, filter out the words with high frequency and close relationship with the theme in the full text or key chapters; then, focus on the appearance position of these words; finally, combine the part of speech and semantic correlation to select the keywords that best represent the core content of the text;

[0025] S312, keyword weight assignment: according to the importance of keywords in the document, combined with their influence in different semantic levels, assign initial weights to each keyword, wherein if a keyword appears in multiple important paragraphs or is highly related to the key theme, its weight will be increased, and in the subsequent matching process, the keyword weight will be dynamically adjusted according to the matching effect and difference recognition result;

[0026] S32, similar semantic keyword search;

[0027] S321, similar semantic space construction: map the extracted keywords to the semantic space, use semantic embedding technology to generate semantic vector representation of the keywords, construct a multi-dimensional space containing the semantic vectors of the keywords, capture the potential semantic association between the keywords, and provide a basis for similar keyword search;

[0028] S322, similarity calculation and matching: calculate the similarity between the semantic vectors of the keywords to quantify the semantic proximity of the keywords, search for words or phrases similar to the target keywords in the compared documents, and identify similar semantic content in different expressions;

[0029] S323, dynamic semantic expansion and associative search: use word embedding and semantic network to expand the target keywords with synonyms, near synonyms and associated words, combine the use of keywords in the context, perform semantic associative search, capture related concepts and themes related to the keywords, and expand the matching range;

[0030] S33, keyword-driven semantic matching optimization;

[0031] S331, multi-level semantic comparison: multi-level comparison includes three levels of vocabulary, sentence, paragraph comparison:

[0032] Vocabulary level comparison: use word embedding to match and compare keywords semantically, quickly identify the consistency or difference of two documents at the level of terminology and concept.

[0033] Sentence level comparison: calculate the similarity between sentences through sentence embedding, judge whether the expression of the same topic sentence in two documents is consistent, and find the difference in expression and potential information loss.

[0034] Paragraph level comparison: compare the paragraph as a whole semantic unit, ensure that the document maintains logical consistency and theme coherence at the high-level semantic unit, and timely find information increase and theme deviation;

[0035] S332, difference identification and intelligent adjustment: according to the comparison result, automatically identify the difference of keyword matching degree, mark the inconsistent part before and after, generate intelligent prompt for the identified difference, point out the specific difference content and position, and dynamically adjust the weight and search strategy of keywords according to the comparison feedback;

[0036] S333, semantic link tracking: track the semantic trajectory of keywords in the document, record their use in different contexts and meaning changes, and through semantic link tracking, ensure that the meaning of keywords in different documents and different positions is consistent, and identify the existing semantic drift or logical contradiction;

[0037] S34, combined with similar semantic search algorithm;

[0038] S341, optimization of matching process: combine keyword extraction, weight allocation and similar semantic search algorithm to form an efficient keyword driven matching mechanism;

[0039] S342, identification of potential differences and optimization of verification process: compare the potential semantic differences between documents in depth through similar semantic search algorithm, find the content that cannot be identified by keyword matching only, classify the identified differences, and distinguish the types of terminology difference, expression difference and content loss, to provide basis for subsequent processing;

[0040] Extracted and matched keywords and similar semantic content will be used as the basis for the next multi-level semantic comparison.

[0041] 5. The semantic analysis and keyword driven document consistency comparison method according to claim 4, wherein the step S4 comprises the following contents:

[0042] S41, semantic comparison at the lexical level: using the extracted keywords, directly matching at the lexical level in the two documents, identifying the same words and terms, calculating the semantic similarity between words using word embedding technology, identifying different word forms but similar semantics, expanding the matching range;

[0043] S42, semantic comparison at the sentence level: using the Sentence-BERT model, converting sentences into semantic vectors, capturing the overall semantic information of the sentence, calculating the semantic similarity of corresponding sentences in the two documents, identifying sentences with different expressions but the same meaning and sentences with differences;

[0044] S43, semantic comparison at the paragraph level: semantic embedding of paragraph content, obtaining the overall semantic representation of the paragraph, considering the context and logical structure, comparing the semantic vectors of the corresponding paragraphs, evaluating the consistency of the paragraph content, finding the information increase or decrease or logical inconsistency;

[0045] S44, comprehensive comparison and difference identification: integrate the comparison results at the lexical, sentence, and paragraph levels to form an overall evaluation of the consistency of the documents, and accurately locate the specific words, sentences, or paragraphs with differences according to the comparison results;

[0046] S45, comparison result optimization: according to the project requirements, different weights are given to the comparison results at different levels.

[0047] 6. The semantic analysis and keyword-driven document consistency comparison method according to claim 5, characterized in that the step S5 comprises the following contents:

[0048] S51, context semantic modeling and logical contradiction detection: using a pre-trained language model to globally model the semantic content of the document, capturing the semantic association and logical relationship between the content by embedding the semantics of paragraphs and chapters, and constructing the semantic network structure of the document;

[0049] Based on semantic modeling, natural language inference (NLI) technology and logical rules are applied to detect logical contradictions in the document and automatically mark the parts with contradictions to prompt users to review and correct;

[0050] S52, information omission detection and semantic coherence assurance: according to project management and document standards, establish a list of key information, use information extraction technology to extract core entities and events from the document, compare with the key information list, identify missing information, and prompt users for possible omissions;

[0051] By analyzing the semantic flow of the document, evaluating the coherence between paragraphs and chapters, calculating the semantic similarity and logical association of adjacent content, identifying topic mutations, content jumps or semantic fault problems, and providing modification suggestions for detected coherence problems.

[0052] 7. The semantic parsing and keyword-driven document front-back consistency comparison method according to claim 6, wherein the step S6 comprises the following steps:

[0053] S61, difference analysis report generation: all detected differences, logical contradictions and information omissions are summarized to generate a detailed difference analysis report, the difference analysis report is presented in a structured form, including consistent, partially consistent and inconsistent content, and the chapter, paragraph or sentence position where the difference is located, for each difference, a detailed description is provided, indicating the specific problem, the impact of the problem and the recommended solution, the difference analysis report also includes overall statistical data such as the number of differences, type distribution and severity;

[0054] S62, intelligent prompt and modification suggestion: for each detected problem, use semantic analysis and generative technology, refer to industry knowledge base and relevant standards, automatically generate simplified and compliant modification suggestions for the user, directly quote standard definitions for inconsistent terms, give logical coherent sentence structures and logical coherent content for logically incoherent parts, and continuously optimize the suggestions according to user feedback during the user review and selection of modification solutions;

[0055] S63, intuitive display of visual tools: intuitive display of comparison results using visual tools.

[0056] Compared with the prior art, the beneficial effects of the present application are:

[0057] 1. The present application significantly improves the efficiency and accuracy of document comparison at each stage of the project by introducing a semantic parsing and keyword-driven multi-level document comparison method. Intelligent analysis of the document directory can accurately locate key chapters, and combined with the multi-dimensional semantic vectors generated by the pre-trained language model, it can deeply capture the deep semantic association of the document. Through fine-grained semantic comparison at different levels such as vocabulary, sentence and paragraph, it can automatically identify subtle differences and potential problems between documents, including logical contradictions and information omissions. Contextual semantic analysis ensures the semantic coherence and accuracy of the document in the overall process. Finally, a difference analysis report is generated, combined with intelligent prompts and visual tools, users can intuitively understand the comparison results and quickly review and optimize the content. The present application is suitable for various scenarios such as project management, and can effectively improve the accuracy and efficiency of document comparison, and ensure the accuracy and consistency of document content. BRIEF DESCRIPTION OF DRAWINGS

[0058] Figure 1 Flowchart for Example 1 of the present application;

[0059] Figure 2 Flowchart for Step S2 of Example 1 of the present application;

[0060] Figure 3 Flowchart for Step S3 of Example 1 of the present application;

[0061] Figure 4 Flowchart for Step S4 of Example 1 of the present application. DETAILED DESCRIPTION

[0062] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0063] Example 1

[0064] As shown in the following figure, the semantic analysis and keyword-driven document front-back consistency comparison method includes the following steps: Figures 1-4

[0065] S1, intelligent analysis and weight distribution are performed through a document directory to realize accurate positioning of key content.

[0066] Through analysis of a document directory, construction of a directory structure and a weighting model, accurate positioning of key content is realized, thereby improving the efficiency and accuracy of comparison.

[0067] S11, directory extraction and analysis: a text analysis algorithm is used to automatically identify the directory part in the document, extract chapter titles, numbers, page numbers and other information, and form a preliminary directory framework. The identified directory information is converted into a tree structure to clearly represent the hierarchical relationship of chapters and subchapters. A corresponding index table is generated for quick positioning of specific content in the document.

[0068] S12, directory weighting model and content automatic positioning: weights are assigned to each chapter and subchapter, and the weights are set according to the relevance of chapter titles and the importance of chapter content. Important chapters are processed first to reduce waste of computing resources and improve overall document analysis efficiency. Based on the directory weighting model, high-weight chapter content is extracted first, and a local semantic vector matrix is generated to avoid processing irrelevant content, significantly improving the processing efficiency of large documents and avoiding unnecessary full-text scanning.

[0069] ​S13, Key Chapter Positioning and Content Segment Division: According to predefined keywords such as "construction content", "technical scheme", "implementation plan" and the like, the relevant chapters are quickly positioned from the directory structure, and the target chapter content is directly extracted according to the page code information in the directory, avoiding full-text scanning and saving time. The extracted chapter content is refined, and the content is divided into smaller semantic units (such as paragraphs, sentences), which prepares for subsequent semantic vector generation and multi-level semantic comparison.

[0070] S2, Apply pre-trained language model to perform deep semantic analysis on the document, generate multi-dimensional semantic vectors, and then continue to perform semantic calculation after dimension reduction optimization;

[0071] After successfully positioning and extracting the key content, enter the deep semantic analysis stage. This step aims to convert the document content into a high-dimensional semantic vector representation, capturing the deep semantic features of the document, providing a foundation for subsequent keyword-driven comparison and consistency verification.

[0072] S21, Application of Pre-trained Language Model: Pre-trained language model BERT is used to capture the context relationship and deep semantic information of the document through its semantic understanding ability. The extracted content segment is input into the pre-trained language model, and the encoder part of the model is used to process the document, generating corresponding high-dimensional semantic vectors (Embeddings). These vectors can effectively represent the semantic features of the document, supporting subsequent semantic calculation and matching.

[0073] S22, Multi-dimensional Semantic Vector Generation: In the process of generating semantic vectors, the model not only considers the information at the lexical level, but also captures multi-dimensional features such as sentence structure, context association, and semantic dependency. Through this deep semantic analysis, a comprehensive semantic representation of the document can be obtained. The bidirectional encoding mechanism of the pre-trained model allows it to consider the information before and after the document, enhancing the understanding ability of polysemous words and complex sentence patterns, ensuring the accuracy of the semantic vectors.

[0074] S23, Dimension Reduction and Optimization: High-dimensional semantic vectors can comprehensively represent the semantic information of the document, but they will bring a large computational overhead in actual calculation. To improve computational efficiency, dimension reduction technology (principal component analysis PCA) is used to reduce the dimension of the semantic vector. In the dimension reduction process, the most influential feature dimensions for semantic calculation are retained, ensuring that the reduced vectors can still accurately reflect the semantic features of the original document. Through dimension reduction, the dimension of the semantic vector is reduced, the complexity of subsequent semantic matching and similarity calculation is reduced, and the overall performance and response speed are improved.

[0075] S24, semantic vector storage and management: store the generated semantic vectors in an efficient vector database, supporting fast vector retrieval and similarity calculation. To speed up the vector matching process, index the semantic vectors (using FAISS vector retrieval technology) to enable efficient approximate nearest neighbor search. The generated multi-dimensional semantic vectors provide a data foundation for subsequent keyword extraction, similar semantic search, and multi-level semantic comparison, ensuring in-depth understanding of document content and accurate identification of potential differences between documents.

[0076] S3, extract core keywords from documents and assign weights, combine similar semantic search algorithms to optimize keyword-driven semantic matching processes, and identify potential differences between documents.

[0077] After completing the deep semantic analysis and multi-dimensional semantic vector generation of the document, enter the keyword extraction and similar semantic search stage. The core goal of this step is to automatically extract core keywords from the document, reasonably assign weights, combine similar semantic search algorithms, optimize keyword-driven semantic matching processes, and identify potential differences between documents.

[0078] S31, keyword extraction and weight assignment

[0079] S311, keyword extraction: based on the generated semantic vectors, use a pre-trained language model to deeply analyze the text and automatically identify core keywords in the document. The specific steps include: first, use the language model to analyze the context of the words and generate vectors reflecting semantic relationships; then, combined with word frequency information, filter out high-frequency words closely related to the theme in the full text or key chapters; next, focus on the appearance position of these words, such as title, abstract, and chapter beginning, etc. high-weight area; finally, combine word nature and semantic correlation, and finally select the keywords that best represent the core content of the text. Through this process, it is ensured that the extracted keywords accurately reflect the main ideas and themes of the document.

[0080] S312, keyword weight assignment: according to the importance of keywords in the document, combined with their influence in different semantic levels (words, sentences, paragraphs), assign initial weights to each keyword. Consider the correlation between keywords and context, if a keyword appears in multiple important paragraphs or is highly related to the key theme, increase its weight. In the subsequent matching process, according to the matching effect and difference identification result, dynamically adjust the weight of the keyword to optimize the matching performance.

[0081] S32, similar semantic keyword search

[0082] S321, Similarity Semantic Space Construction: Map the extracted keywords into a semantic space, and use semantic embedding technology (Sentence-BERT) to generate semantic vector representations of the keywords. A multi-dimensional space containing keyword semantic vectors is constructed to capture the potential semantic associations between keywords, providing a foundation for similar keyword search.

[0083] S322, Similarity Calculation and Matching: Quantify the semantic proximity of keywords by calculating the similarity between their semantic vectors. In the compared documents, search for keywords or phrases similar to the target keywords in terms of semantics, and identify similar semantic content in different expressions.

[0084] S323, Dynamic Semantic Expansion and Associative Search: Use word embedding and semantic network (WordNet) to expand the target keywords with synonyms, near-synonyms, and associated words, enriching the keyword set. Perform semantic associative search based on the context in which the keywords are used, capturing related concepts and themes (e.g., "construction plan" leads to "construction progress", "construction schedule", etc.), and expanding the matching range.

[0085] S33, Keyword-driven Semantic Matching Optimization

[0086] S331, Multi-level Semantic Comparison: Multi-level comparison includes word, sentence, and paragraph level comparison:

[0087] Word-level comparison: Use word embedding to perform semantic matching and comparison of keywords, quickly identifying the consistency or differences between two documents in terms of terminology and concepts.

[0088] Sentence-level comparison: Calculate the similarity between sentences through sentence embedding to determine whether two documents express the same theme sentence consistently and discover differences in expression and potential information gaps.

[0089] Paragraph-level comparison: Compare paragraphs as a whole semantic unit to ensure that documents maintain logical consistency and theme coherence at a high-level semantic unit, and promptly identify information additions and theme shifts. The high-level semantic unit refers to an element in language processing and information retrieval that can represent the core meaning and content of a paragraph or utterance. High-level semantic units are often abstracted from specific words and sentence structures, capturing the deep meaning of the text. By treating a paragraph (or larger structure such as a chapter) as a whole, complete semantic carrier, high-level semantic units analyze all sentences, context associations, and theme contexts within a paragraph, rather than just individual words or sentences. By comparing paragraphs as a whole, the consistency, logical coherence, and theme shifts of the content in the document can be more comprehensively evaluated.

[0090] S332, difference identification and intelligent adjustment: according to the comparison result, the difference of keyword matching degree is automatically identified, and the part with inconsistency is marked. For the identified difference, intelligent prompt is generated to point out the specific difference content and position, which is convenient for user review. According to the comparison feedback, the weight and search strategy of keyword are dynamically adjusted. For example, for the keyword with low matching degree but high importance, its weight can be increased to strengthen its influence in the matching process.

[0091] S333, semantic link tracking: track the semantic trajectory of keywords in documents, record their use in different contexts and meaning changes. Through semantic link tracking, it is ensured that the meaning of keywords in different documents and different positions remains consistent, and semantic drift or logical contradiction is identified.

[0092] S34, combination with similar semantic search algorithm

[0093] S341, optimization of matching process: combine keyword extraction, weight allocation and similar semantic search algorithm to form an efficient keyword driven matching mechanism. Through optimization algorithm, the accuracy and speed of matching are improved, and the false matching and missing matching are reduced.

[0094] S342, identification of potential differences and optimization of verification process:

[0095] Use similar semantic search algorithm to deeply compare the potential semantic differences between documents and find the content that cannot be identified by surface keyword matching. Classify the identified differences, such as term difference, expression difference and content missing, to provide basis for subsequent processing.

[0096] Extract and match keywords and similar semantic content as the basis data for the next step of multi-level semantic comparison. Through accurate keyword matching and difference identification, the complexity of subsequent comparison is reduced, and the efficiency and effect of consistency verification are improved.

[0097] S4, through multi-level comparison algorithm, fine semantic comparison of content at different levels such as words, sentences and paragraphs is carried out to improve the verification precision of document consistency.

[0098] Fine semantic comparison of document content at different levels (words, sentences and paragraphs) is carried out to improve the verification precision of document consistency.

[0099] S41, semantic comparison at word level: use the keywords extracted in the previous step to perform direct matching at word level in two documents to identify the same words and terms. Use word embedding technology (Word2Vec) to calculate the semantic similarity between words to identify different word forms but similar semantic words to expand the matching range.

[0100] S42, semantic comparison at sentence level: using models like Sentence-BERT, convert sentences into semantic vectors to capture the overall semantic information of the sentence. Calculate the semantic similarity of corresponding sentences in two documents, identify sentences with different expressions but the same meaning, and sentences with differences.

[0101] S43, semantic comparison at paragraph level: semantic embedding of paragraph content, obtaining the overall semantic representation of the paragraph, considering context and logical structure. Compare the semantic vectors of corresponding paragraphs to evaluate the consistency of paragraph content and find possible information increase or logical inconsistency.

[0102] S44, comprehensive comparison and difference identification: integrate the comparison results at word, sentence and paragraph levels to form an overall evaluation of document consistency. According to the comparison results, accurately locate the specific words, sentences or paragraphs with differences, and facilitate user review.

[0103] S45, comparison result optimization: according to project requirements, give different weights to comparison results at different levels. For example, important paragraph comparison can be given higher weight. Set a similarity threshold, when the comparison result is lower than the threshold, automatically mark as "possible inconsistency" or "need to review".

[0104] S5, deep modeling of the context semantics of the document content, detecting logical contradictions and information omissions, ensuring the semantic coherence and accuracy of the document in the overall process; after completing multi-level semantic comparison, further deep modeling of the context semantics of the document, reviewing the document content from a global perspective, detecting potential logical contradictions and information omissions, ensuring the semantic coherence and accuracy of the document.

[0105] S51, context semantic modeling and logical contradiction detection: use pre-trained language models (BERT, GPT series models) to model the global semantics of the document content. Through semantic embedding of paragraphs and chapters, capture the semantic association and logical relationship between content, and construct the semantic network structure of the document. This model can understand the theme, emotion and intention of the document, providing a basis for subsequent logical analysis.

[0106] Based on semantic modeling, apply natural language inference (NLI) technology and logical rules to detect possible logical contradictions in the document. For example, identify contradictory statements in the content before and after, inconsistencies between conditions and conclusions, and logical conflicts caused by antonyms or negative expressions. Automatically mark parts that may have contradictions for user review and correction.

[0107] S52, Information Missing Detection and Semantic Coherence Assurance: According to project management and document standards, a list of key information (such as important parameters, regulations, time nodes, etc.) is established. Using information extraction technology, core entities and events are extracted from the document and compared with the list to identify missing essential information (key entities, core data or parameters, necessary constraints, necessary process steps, etc.). The user is prompted for possible omissions to ensure the completeness and accuracy of the document.

[0108] By analyzing the semantic flow of the document, the coherence between paragraphs and chapters is evaluated. The semantic similarity and logical association of adjacent content are calculated to identify problems such as topic mutations, content jumps, or semantic discontinuities. For detected coherence problems, modification suggestions are provided to help users optimize the structure and content integration of the document, ensuring semantic coherence throughout the document.

[0109] S6, Generate Difference Analysis Report: To enable users to intuitively and efficiently understand the comparison results and make quick content review and decision optimization, a difference analysis report is generated in this step, combining intelligent prompts and visualization tools to comprehensively display the comparison results.

[0110] S61, Generation of Difference Analysis Report: All differences, logical contradictions and information omissions detected in the previous steps are summarized to generate a detailed difference analysis report. The difference analysis report is presented in a structured form, including consistent, partially consistent and inconsistent content, and clearly marking the chapter, paragraph or sentence location where the difference is located. For each difference, provide detailed description, point out specific problems, possible impact (such as impact on project progress, impact on project resource allocation, reduce the executability of the document corresponding work arrangement, increase communication and coordination cost, produce compliance and legal risk, etc.) and suggested solutions. The difference analysis report also includes overall statistical data such as the number of differences, type distribution and severity, helping users to understand the consistency of the document as a whole.

[0111] S62, Intelligent Tips and Modification Suggestions: For each detected problem, use semantic analysis and generative technology, refer to industry knowledge base and relevant standards, to automatically generate simplified and compliant modification suggestions for users. For inconsistent terms, directly quote standard definitions, and for logically inconsistent parts, provide logically coherent sentence structures and logically coherent content. During the user review and selection of modification solutions, the suggestions will be continuously optimized based on user feedback.

[0112] S63, intuitive display of visualization tools: to improve user experience, the comparison results are displayed intuitively by using visualization tools. By using a similarity heat map, the similarity of different parts of the document is presented in a color depth manner, which intuitively reflects the similarity and helps users quickly identify the area where the differences are concentrated. Through a relationship network diagram, the association between keywords and topics in the document is displayed to understand the logical structure and semantic association of the content. An interactive interface is provided, and users can directly view the highlighted difference content in the document view, click to obtain detailed information and modification suggestions. Filtering and sorting functions are also supported, and users can filter the differences they are interested in according to their needs to improve review efficiency.

[0113] Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can modify the technical solutions described in the foregoing embodiments or make equivalent replacements for part of the technical features, and any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A semantic parsing and keyword-driven document consistency comparison method, characterized in that, Includes the following steps: S1. Intelligent parsing and weight allocation through document directory to achieve accurate positioning of key content; S2. Apply a pre-trained language model to perform deep semantic parsing on the document, generate multi-dimensional semantic vectors, and then perform dimensionality reduction optimization before continuing to perform semantic computation. S3. Extract core keywords from documents and assign weights, combine them with similar semantic search algorithms to optimize the keyword-driven semantic matching process and identify potential differences between documents; S31, Keyword Extraction and Weight Allocation; S32, Search for similar semantic keywords; S33, Keyword-driven semantic matching optimization; S331, Multi-level semantic comparison: Multi-level comparison includes three levels: vocabulary, sentence, and paragraph. Lexical-level comparison: Using word embeddings to perform semantic matching and comparison of keywords, quickly identify the consistency or difference between two documents at the terminology and concept level; Sentence-level comparison: By embedding sentences, the similarity between sentences is calculated to determine whether two documents are consistent in their descriptions of sentences on the same topic, and to discover differences in description and potential missing information; Paragraph-level comparison: Paragraphs are compared as a whole semantic unit to ensure that the document maintains logical consistency and thematic coherence at the high-level semantic unit level, and to promptly detect information additions or deletions and thematic shifts. S332, Difference Recognition and Intelligent Adjustment: Based on the comparison results, automatically identify differences in keyword matching degree, mark the parts that are inconsistent, generate intelligent prompts for the identified differences, point out the specific differences and locations, and dynamically adjust the keyword weights and search strategies based on the comparison feedback; S333, Semantic Link Tracking: Tracks the semantic trajectory of keywords in a document, records their usage and meaning changes in different contexts, and ensures that the meaning of keywords remains consistent in different documents and locations through semantic link tracking, and identifies semantic drift or logical contradictions. S34, combined with a similar semantic search algorithm; S341, Optimize the matching process: Organically combine keyword extraction, weight allocation and similar semantic search algorithm to form an efficient keyword-driven matching mechanism; S342, Optimization of the identification and verification process for potential differences: By using similar semantic search algorithms to deeply compare potential semantic differences between documents, we can discover content that cannot be identified by keyword matching alone. The identified differences are classified to distinguish between terminology differences, expression differences, and content missing types, providing a basis for subsequent processing. The extracted and matched keywords and similar semantic content will serve as the basis for the next step of multi-level semantic comparison. S4. Through multi-level comparison algorithms, perform refined semantic comparison of content at different levels; S5. Perform deep modeling of the contextual semantics of the document content to detect logical contradictions and information omissions, so as to ensure the semantic coherence and accuracy of the document in the overall process. S6. Combine intelligent prompts and visualization tools to generate difference analysis results.

2. The semantic parsing and keyword-driven document consistency comparison method according to claim 1, characterized in that: The specific steps of step S1 include the following: S11, Table of Contents Extraction and Parsing: Using a text parsing algorithm, the table of contents in the document is automatically identified, chapter titles, numbers, and page numbers are extracted to form a preliminary table of contents framework. The identified table of contents framework is then converted into a tree structure, and a corresponding index table is generated. S12, Table of Contents Weighting Model and Automatic Content Location: The table of contents weighting model assigns weights to each chapter and sub-chapter. The weights are set based on the relevance of the chapter titles and the importance of the chapter content. Based on the table of contents weighting model, the content of chapters with high weights is extracted first, and a local semantic vector matrix is ​​generated. S13, Key Chapter Location and Content Segment Division: Based on predefined keywords, quickly locate relevant chapters from the directory framework, and directly extract the content of the target chapters based on the page number information in the directory framework. Then, refine the extracted chapter content and divide the content into smaller semantic units.

3. The semantic parsing and keyword-driven document consistency comparison method according to claim 2, characterized in that: The specific steps of step S2 include the following: S21, Application of pre-trained language models: The pre-trained language model BERT is used to capture the contextual relationships and deep semantic information of documents. The extracted content fragments are input into the pre-trained language model, and its encoder part is used to process the documents to generate corresponding high-dimensional semantic vectors. S22, Multi-dimensional semantic vector generation; S23, Dimensionality Reduction and Optimization: Dimensionality reduction techniques are used to reduce the dimensionality of semantic vectors. During the dimensionality reduction process, the feature dimensions that have the greatest impact on semantic calculation are retained to ensure that the vectors after dimensionality reduction can still accurately reflect the semantic features of the original document. S24, Semantic Vector Storage and Management: The generated semantic vectors are stored in a vector database that supports vector retrieval and similarity calculation. The vector database indexes the semantic vectors to achieve efficient approximate nearest neighbor search.

4. The semantic parsing and keyword-driven document consistency comparison method according to claim 3, characterized in that: The specific steps of S31 and S32 include the following: S31, Keyword Extraction and Weight Allocation; S311, Keyword Extraction: Based on the generated semantic vectors, a pre-trained language model is used to deeply analyze the text and automatically identify the core keywords in the document. The specific steps include: First, the language model is used to perform contextual analysis on the words to generate vectors that reflect semantic relationships; then, combined with word frequency information, words that are high-frequency in the whole text or key chapters and closely related to the topic are selected; next, the occurrence position of these words is examined in detail; finally, the part of speech and semantic relevance are combined to select the keywords that best represent the core content of the text. S312, Keyword weight allocation: Based on the importance of keywords in the document and their influence at different semantic levels, an initial weight is assigned to each keyword. If a keyword appears in multiple important paragraphs or is highly relevant to the key topic, its weight is increased. In subsequent matching processes, the keyword weights are dynamically adjusted based on the matching results and the results of difference identification. S32, Search for similar semantic keywords; S321, Similarity Semantic Space Construction: The extracted keywords are mapped into the semantic space, semantic embedding technology is used to generate semantic vector representations of the keywords, a multi-dimensional space containing keyword semantic vectors is constructed, potential semantic associations between keywords are captured, and a foundation is provided for similar keyword search; S322, Similarity Calculation and Matching: By calculating the similarity between the semantic vectors of keywords, the semantic closeness of the keywords is quantified. In the document being compared, words or phrases that are semantically similar to the target keywords are searched, and similar semantic content under different expressions is identified. S323, Dynamic Semantic Expansion and Associative Search: Utilizes lexical embedding and semantic networks to expand target keywords with synonyms, near-synonyms, and related words. Combined with the usage of keywords in context, it performs semantic associative search to capture concepts and topics related to the keywords, thereby expanding the matching range.

5. The semantic parsing and keyword-driven document consistency comparison method according to claim 4, characterized in that: The specific steps of step S4 include the following: S41, Lexical-level semantic comparison: Using extracted keywords, perform direct lexical-level matching between two documents, identify identical words and terms, use word embedding technology to calculate semantic similarity between words, identify words with different forms but similar semantics, and expand the matching range; S42, Sentence-level semantic comparison: Using the Sentence-BERT model, sentences are transformed into semantic vectors to capture the overall semantic information of sentences, calculate the semantic similarity of corresponding sentences in two documents, and identify sentences with different expressions but the same meaning, as well as sentences with differences. S43, Semantic comparison at the paragraph level: Semantic embedding is performed on the paragraph content to obtain the overall semantic representation of the paragraph. Considering the context and logical structure, the semantic vectors of the corresponding paragraphs are compared to evaluate the consistency of the paragraph content and to find any information additions or deletions or logical inconsistencies. S44, Comprehensive Comparison and Difference Identification: The comparison results at the word, sentence, and paragraph levels are combined to form an overall assessment of document consistency. Based on the comparison results, the specific words, sentences, or paragraphs with differences are accurately located. S45, Comparison Result Optimization: Assign different weights to comparison results at different levels according to project requirements.

6. The semantic parsing and keyword-driven document consistency comparison method according to claim 5, characterized in that: The specific steps of step S5 include the following: S51, Contextual Semantic Modeling and Logical Contradiction Detection: Utilize a pre-trained language model to perform global semantic modeling of document content. By embedding semantics into paragraphs and chapters, capture the semantic associations and logical relationships between content, and construct the semantic network structure of the document. Based on semantic modeling, natural language reasoning techniques and logical rules are applied to detect logical contradictions in documents and automatically mark the contradictory parts to prompt users to review and correct them. S52, Information omission detection and semantic coherence assurance: Based on project management and document standards, establish a list of key information, use information extraction technology to extract core entities and events from documents, compare them with the list of key information, identify missing information, and prompt users with possible omissions. By analyzing the semantic flow of a document, the coherence between paragraphs and chapters is assessed, the semantic similarity and logical connection between adjacent content are calculated, and issues such as topic abrupt changes, content jumps, or semantic breaks are identified. Modification suggestions are provided for detected coherence issues.

7. The semantic parsing and keyword-driven document consistency comparison method according to claim 6, characterized in that: Step S6 specifically includes the following steps: S61, Generation of the Difference Analysis Report: Summarize all detected differences, logical contradictions, and information omissions to generate a detailed difference analysis report. The difference analysis report is presented in a structured form, including consistent, partially consistent, and inconsistent content, and marks the chapter, paragraph, or sentence position where the difference is located. For each difference, a detailed description is provided, indicating the specific problem, the impact of the problem, and suggested solutions. The difference analysis report also includes overall statistical data, such as the number of differences, type distribution, and severity. S62, Intelligent Prompts and Modification Suggestions: For each detected issue, using semantic analysis and generative technology, and referencing industry knowledge bases and relevant standards, it automatically generates simplified and compliant modification suggestions for users. For content with inconsistent terminology, it directly cites standard definitions. For logically incoherent parts, it provides logically coherent sentence structures and content. During the user's review and selection of modification solutions, it continuously optimizes suggestions based on user feedback. S63, Visualization tools provide an intuitive display of comparison results: Visualization tools are used to visually display the comparison results.

Citation Information

Patent Citations

  • Purchase file compliance checking system based on difference algorithm under AI large model

    CN118551760A

  • Standard chapter splitting method

    CN119067097A