RAG document knowledge standardization method, system and equipment and storage medium
By using multimodal parsing and multi-level similarity calculation, knowledge conflicts in enterprise operation and maintenance manuals are identified and resolved, and standardized knowledge data is generated. This solves the problems of inconsistency between text and graphics and deep semantic overlap in existing technologies, and improves the accuracy of knowledge management and the intelligent application capabilities of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies cannot effectively identify deep semantic overlap, structural process differences, and inconsistent graphic and textual expressions when processing enterprise multi-source operation and maintenance manuals. This results in duplicate and ununified knowledge fragments in the knowledge base, and there are defects in the processing of multimodal content.
It employs multimodal content parsing to break down documents into textual and image knowledge atoms, establishes semantic associations, identifies knowledge conflicts through multi-level similarity calculations, performs intelligent resolution based on preset resolution strategies, generates standardized knowledge data, establishes a traceability chain, and supports semantic indexing and image-text joint indexing.
It achieves deep decoupling and integrated understanding of text and image content, improves the accuracy and efficiency of knowledge retrieval, builds a high-quality unified knowledge base, and supports applications such as intelligent question answering and fault diagnosis.
Smart Images

Figure CN121787539A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the fields of knowledge management and data processing technology, and particularly to the field of standardized processing of knowledge in enterprise private domain manuals, specifically to a method, system, device and storage medium for standardized RAG document knowledge. Background Technology
[0002] Existing technologies suffer from the following major problems when processing multi-source enterprise operation and maintenance manuals: First, traditional knowledge processing methods generally rely on single-level similarity detection techniques, such as word-based matching based on hashing or TF-IDF. This method cannot comprehensively identify redundant and conflicting content, especially at the deep semantic level. For example, "check if the peer alarm is RLOS" and "check if the peer has RLOS alarms" have completely identical semantics despite different wording. Single word-based matching techniques cannot capture this overlap in deep meaning, resulting in a large number of duplicated and unintegrated knowledge fragments in the knowledge base. Second, existing methods have serious deficiencies when processing multimodal content. Enterprise manuals are often a mix of text and graphics, but traditional text processing or image processing systems often operate in isolation, making it difficult to detect inconsistencies between images and text. When flowcharts in the manual differ from the operational steps described in adjacent text, text analysis alone cannot detect this conflict; this disconnect between text and graphics severely limits the completeness of knowledge. Furthermore, existing technologies are inadequate in processing structured and process-oriented knowledge. In multiple versions of operation and maintenance manuals, the order of operation steps or parameter settings for the same knowledge may vary slightly. These minor structural differences often imply key knowledge conflicts or version update information. It is difficult to fully identify and classify these deep-seated structural differences by simply comparing keyword overlaps or text hash values.
[0003] In summary, existing technologies lack a comprehensive analysis mechanism that is multi-layered, multi-modal, and multi-faceted, and cannot effectively address the complex challenges such as differences in description methods, semantic overlap, structural and process differences, and inconsistencies in graphical and textual expressions found in multi-source manuals. Summary of the Invention
[0004] This disclosure provides a method, system, device, and storage medium for standardizing RAG document knowledge, in order to solve or alleviate one or more of the above-mentioned technical problems in the prior art.
[0005] According to one aspect of this disclosure, a method for standardizing RAG document knowledge is provided, comprising: Multimodal content parsing is performed on RAG documents, breaking down the document content into text knowledge atoms and image knowledge atoms, and establishing semantic relationships between text knowledge atoms and image knowledge atoms; The text knowledge atoms, image knowledge atoms, and their semantic relationships are transformed into structured knowledge data in a preset format. Multi-level similarity calculations are performed on structured knowledge data from multiple RAG documents to identify knowledge conflicts; Based on a preset resolution strategy, the identified knowledge conflicts are intelligently resolved to generate standardized knowledge data. The standardized knowledge data is stored in a knowledge base, and a traceability chain is established for each piece of standardized knowledge data. The knowledge base supports semantic indexing and graph-text combined indexing to provide retrieval support for downstream RAG systems.
[0006] In one possible implementation, multimodal content parsing is performed on the RAG document, decomposing the document content into text knowledge atoms and image knowledge atoms, and establishing semantic relationships between text knowledge atoms and image knowledge atoms, including: Identify text and image regions in RAG documents through layout analysis; The text region is extracted using OCR to generate text knowledge atoms containing text content, location, and formatting information; Feature extraction and content analysis are performed on the image region to generate image knowledge atoms containing visual features, content classification, and internal text; Based on spatial proximity, explicit references, implicit references, and parameter consistency, the correlation strength between text knowledge atoms and image knowledge atoms is calculated.
[0007] In one possible implementation, the structured knowledge data includes the content of each text knowledge atom and image knowledge atom, its position coordinates in the RAG document, the atom type, and its association with other knowledge atoms.
[0008] In one possible implementation, the multi-layered structure includes a lexical level, a semantic level, a structural level, and a visual level.
[0009] In one possible implementation, multi-level similarity calculations are performed on structured knowledge data from multiple RAG documents to identify knowledge conflicts, including: At the lexical level, text similarity is calculated based on hash similarity, Jaccard similarity, or TF-IDF weighted similarity. At the semantic level, semantic similarity is calculated by selecting sentence vectors, word vectors, or latent semantic analysis models based on the text length; At the structural level, based on the document structure type, the longest common subsequence algorithm, parameter matching algorithm, tree edit distance or edit distance are used to calculate structural similarity; At the visual level, image similarity is calculated through perceptual hashing, color histogram similarity, or SIFT feature matching.
[0010] In one possible implementation, the preset resolution strategy includes strategies based on version priority, source credibility, and content integrity.
[0011] In one possible implementation, based on a preset resolution strategy, the identified knowledge conflicts are intelligently resolved to generate standardized knowledge data, including: Identify conflict types, including complete duplicates, partial duplicates, numerical conflicts, operational conflicts, and version differences; For complete duplicates, intelligent resolution is performed based on a version priority strategy; For partial duplication, intelligent resolution is performed based on a content integrity strategy; For numerical conflicts, intelligent resolution is performed based on version priority strategy or source credibility strategy; For operational conflicts, intelligent resolution is performed based on content integrity or source credibility strategies; For version differences, intelligent resolution is performed based on a version priority strategy.
[0012] According to one aspect of this disclosure, a RAG document knowledge standardization system is provided, comprising: The parsing unit is used to perform multimodal content parsing on RAG documents, decompose the document content into text knowledge atoms and image knowledge atoms, and establish semantic relationships between text knowledge atoms and image knowledge atoms. The conversion unit is used to convert the text knowledge atoms, image knowledge atoms and their semantic relationships into structured knowledge data in a preset format; The identification unit is used to perform multi-level similarity calculations on structured knowledge data from multiple RAG documents in order to identify knowledge conflicts. The resolution unit is used to intelligently resolve the identified knowledge conflicts based on a preset resolution strategy and generate standardized knowledge data. The data storage unit is used to store the standardized knowledge data into the knowledge base and establish a traceability chain for each piece of standardized knowledge data. The knowledge base supports semantic indexing and graph-text combined indexing to provide retrieval support for the downstream RAG system.
[0013] According to one aspect of this disclosure, an electronic device is provided, comprising: Processor and memory; The memory is used to store computer programs, and the processor calls the computer programs stored in the memory to execute the RAG document knowledge standardization method described above.
[0014] According to one aspect of this disclosure, a computer-readable storage medium is provided, wherein a computer program is stored therein, which, when executed by a processor, enables the processor to perform the RAG document knowledge standardization method described in any of the preceding claims.
[0015] This disclosure has the following beneficial effects: Technological Advancement: The primary advancement of this disclosure lies in its pioneering realization of the concept of knowledge atomization. Traditional knowledge management treats images and text as isolated entities. This disclosure, however, achieves deep decoupling and integrated understanding of image and text content through semantic annotation of images and the establishment of deep connections with text. This method overcomes the difficulty in detecting inconsistencies between images and text in existing technologies, enabling the system to perform semantic-based intelligent retrieval and combination, greatly improving the accuracy and efficiency of knowledge retrieval.
[0016] System Integration Innovation: The innovation of this disclosure lies in the organic integration of a systematic solution and a multi-level analysis mechanism. By establishing a multi-level analysis and classification mechanism of "rapid conflict identification + deep conflict identification," it is possible to comprehensively detect knowledge conflicts that cannot be discovered by a single method. The organic integration of the four core modules into a unified system ensures the integrity and efficiency of the entire processing flow from original documents to a standardized knowledge base, which is significantly superior to the fragmented, single-functional solutions in existing technologies.
[0017] Enhanced Application Value: This publicly available standardized knowledge base significantly improves the accuracy and reliability of intelligent applications based on the RAG architecture, transforming knowledge management from traditional information storage into a core capability supporting intelligent decision-making and services. This system lays the technological foundation for enterprises to build high-quality private domain knowledge bases, supporting more accurate intelligent question answering, fault diagnosis, and other application scenarios.
[0018] Details of one or more embodiments of this application are set forth in the following drawings and description. Other features and advantages of this application will become apparent from the accompanying drawings. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit this disclosure. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0020] Figure 1 This is a flowchart of a RAG document knowledge standardization method in an exemplary embodiment; Figure 2 This is a schematic diagram of the system architecture of this exemplary embodiment; Figure 3 This is a flowchart of the multimodal content parsing and association method of this exemplary embodiment; Figure 4 This is a flowchart of the multi-source knowledge deduplication and conflict detection method of this exemplary embodiment; Figure 5 This is a block diagram of a RAG document knowledge standardization system according to an exemplary embodiment; Figure 6 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present invention. Detailed Implementation
[0021] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0022] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware units or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0023] The flowchart shown in the attached diagram is merely an illustrative example and does not necessarily include all steps. For example, some steps may be broken down, while others may be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.
[0024] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented, for example, in a sequence other than those illustrated or described herein.
[0025] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or device that includes a series of steps or sub-modules is not necessarily limited to those steps or sub-modules that are explicitly listed, but may include other steps or sub-modules that are not explicitly listed or that are inherent to such process, method, product, or device.
[0026] This disclosure is particularly applicable to solving the problem of unified management and efficient utilization of manual knowledge in complex scenarios such as multiple versions coexisting, mixed graphics and text, and knowledge conflicts in specific fields such as intelligent operation and maintenance of transmission / access networks.
[0027] This disclosure focuses on key technologies for improving the accuracy of large-scale model applications. It aims to build a standardized, automated knowledge processing system based on a Document for Retrieval-Augmented Generation (RAG) architecture, providing a high-quality, conflict-free, and traceable unified knowledge base for upper-layer intelligent applications. By deeply processing massive, dispersed, and heterogeneous internal enterprise operation and maintenance manuals, this system provides a high-quality preprocessing layer for large language models (LLMs), significantly improving the accuracy and reliability of RAG-based applications such as intelligent question answering and fault diagnosis.
[0028] This disclosure aims to address the problem that existing single-processing methods cannot handle the complexity of multi-source, multi-modal enterprise manuals, specifically the inability to effectively identify knowledge conflicts caused by deep semantic overlap, structural differences, and inconsistencies in text and graphics content. By constructing a multi-layered, multi-faceted intelligent processing system, it transforms scattered, heterogeneous, and conflicting manual knowledge into unified, structured, non-redundant, and traceable standardized knowledge, providing a high-quality knowledge base for downstream large-scale model applications.
[0029] Figure 1 This is a flowchart of a RAG document knowledge standardization method in an exemplary embodiment, such as... Figure 1 As shown, an exemplary embodiment of this disclosure provides a method for standardizing RAG document knowledge, including: Multimodal content parsing is performed on RAG documents, breaking down the document content into text knowledge atoms and image knowledge atoms, and establishing semantic relationships between text knowledge atoms and image knowledge atoms; The text knowledge atoms, image knowledge atoms, and their semantic relationships are transformed into structured knowledge data in a preset format. Multi-level similarity calculations are performed on structured knowledge data from multiple RAG documents to identify knowledge conflicts; Based on a preset resolution strategy, the identified knowledge conflicts are intelligently resolved to generate standardized knowledge data. The standardized knowledge data is stored in a knowledge base, and a traceability chain is established for each piece of standardized knowledge data. The knowledge base supports semantic indexing and graph-text combined indexing to provide retrieval support for downstream RAG systems.
[0030] This embodiment constructs a document knowledge standardization processing system based on the Retrieval Enhanced Generation (RAG) architecture, and adopts knowledge atomization processing and multi-level conflict resolution strategies.
[0031] The core technological innovation lies in the concept of knowledge atomization: the core innovation of this embodiment is to deconstruct the manual content into the smallest, independently existing "knowledge atoms." Each knowledge atom can be a text fragment or a visual element such as an image. Crucially, all visual elements are no longer simply image files, but are endowed with semantic annotations. For example, a product illustration is labeled "RLOS processing steps (operation) diagram," and a deep semantic association is established with the corresponding text knowledge atom. This deep decoupling and knowledge association between text and images enables machines to truly understand the inherent logic between them, achieving semantic-based integrated text-image retrieval and intelligent combination.
[0032] like Figure 2 The system architecture shown in this embodiment is based on a system consisting of four collaborative, sequential modules that form a complete processing pipeline: The multimodal content parsing and association module is responsible for decomposing the input graphic manual into processable text and image units and establishing spatial and semantic relationships between them. This module identifies text and image regions through layout analysis, uses OCR (Optical Character Recognition) technology and large-scale models for content extraction and feature analysis, and establishes the relationship between text and images.
[0033] The knowledge content structuring extraction module is responsible for transforming the parsed multimodal content into a structured, machine-readable format. This module converts unstructured knowledge atoms into a unified data format, including metadata information such as content, location, type, and relationships.
[0034] The multi-source knowledge deduplication and conflict detection module integrates information from multiple potential conflict sources through a multi-level similarity analysis mechanism. This module employs a strategy that combines a fast deduplication mechanism with deep conflict detection, performing comprehensive similarity evaluation at four levels: lexical, semantic, structural, and visual.
[0035] The intelligent conflict resolution strategy module provides multiple mechanisms to gradually resolve identified knowledge conflicts automatically or semi-automatically. This module uses strategies such as version priority, source credibility, and content integrity for intelligent resolution, and establishes a marking and tracing mechanism for conflicts that cannot be resolved automatically.
[0036] Specifically, multimodal content parsing is performed on RAG documents, breaking down the document content into text knowledge atoms and image knowledge atoms, and establishing semantic relationships between text knowledge atoms and image knowledge atoms, including: Identify text and image regions in RAG documents through layout analysis; The text region is extracted using OCR to generate text knowledge atoms containing text content, location, and formatting information; Feature extraction and content analysis are performed on the image region to generate image knowledge atoms containing visual features, content classification, and internal text; Based on spatial proximity, explicit references, implicit references, and parameter consistency, the correlation strength between text knowledge atoms and image knowledge atoms is calculated.
[0037] like Figure 3 As shown, the method in this embodiment is implemented through a multimodal content parsing-level association module. This module, as the system input processing layer, atomizes and associates the original document content. This includes: Page layout analysis and preprocessing stage: The system performs layout analysis on the input graphic manual, identifying text areas, image areas, and their precise coordinates on the page. It also identifies the cover page's weight, pre-checks and resolves potential version conflicts based on specific areas, and performs initial filtering based on document title or version number information.
[0038] For example, the weighting of the cover page of a manual includes: standardized documents, where the first page of all documents is the cover page. Content Feature Extraction: OCR technology is used to extract the text content of the page; key information elements are identified: document title (usually in the largest font and most prominent position), version number information (such as "V1.2", "Version 2.0", etc.), release / revision time, department or author information, product model or series information; Weight calculation formula: Weight = α × Version_Score + β × Time_Score + γ × Source_Score + δ × Completeness_Score; where, Version_Score: version freshness score (0-10 points, V.0-V.20, linear score); Time_Score: time relevance score (0-10 points, 2005-2025, linear score); Source_Score: source authority score (0-10 points, standards / specifications get 10 points, manuals get 8 points, experience documents get 5 points, others get 3 points, identified through title keywords); α, β, γ: weight coefficients for each item; α = 0.45 indicates that version differences are very important in technical documentation; β = 0.35 indicates that timeliness is critical, and new versions usually fix issues; γ = 0.20 indicates that the authority of the source is relatively less important.
[0039] Text knowledge atom decomposition stage: The system uses optical character recognition (OCR) technology to extract text content, preserving the original position and format information while extracting the text, and decomposing it into independent "text knowledge atoms". Each text knowledge atom contains metadata such as text content, position, font, and paragraph attributes.
[0040] Image knowledge atom decomposition stage: The system extracts features from the images in the manual and uses a large model to perform in-depth analysis of the image content. This analysis includes OCR extraction of text information from the images and classification and recognition of image content (flowcharts, equipment diagrams, schematic diagrams, tables, etc.). Each image is decomposed into "image knowledge atoms" containing visual feature vectors, content classification labels, and internal text information.
[0041] The image-text association establishment phase: This module establishes the association between text knowledge atoms and image knowledge atoms to achieve integrated image-text understanding. Specific rules include calculating the spatial distance between text blocks and image blocks to identify adjacent image-text relationships, identifying the title or descriptive text of images as a direct basis for image-text association, and establishing reference relationships between text paragraphs and adjacent images.
[0042] Spatial distance calculation mechanism: 1) Coordinate system establishment: Page coordinate system: The origin (0,0) is located at the top left corner of the page. The X-axis is positive to the right and the Y-axis is positive downward. Each knowledge atom has bounding box coordinates: (x1, y1, x2, y2).
[0043] 2) Distance calculation, example: center point of text box: text_center_x = (text_box.x1 + text_box.x2) / 2; text_center_y = (text_box.y1 + text_box.y2) / 2; Where text_box represents a text box object; .x1 represents the X coordinate of the top-left corner of the bounding box; .y1 represents the Y coordinate of the top-left corner of the bounding box; .x2 represents the X coordinate of the bottom-right corner of the bounding box; .y2 represents the Y coordinate of the bottom-right corner of the bounding box; text_center_x represents the X coordinate of the center of the text box; text_center_y represents the Y coordinate of the center of the text box; Similarly, calculate the image center point and the Euclidean distance between the text center and the image center.
[0044] 3) Layout Pattern Recognition: Recognize the layout patterns of text and images and assign initial weights: Top-bottom layout: Text below the image is explanatory text (weight 0.9); Left-right layout: Text next to the image is related description (weight 0.7); Enclosing layout: Text enclosing the image (weight 0.8); Judgment method: Calculate the pixel distance between text.y (a representative Y coordinate of the text box) and image.y (the corresponding Y coordinate of the image box).
[0045] Explanatory text recognition mechanism: Common explanatory text patterns: Figure X - X: Figure 1 - 1、 Figure 2 .3 Numbering pattern; as shown in the figure: reference description; see the figure below: directional description; flowchart, diagram: classification description; OCR enhancement processing: perform OCR recognition on the text inside the image, extract key identification text (button name, label, etc.) in the image, and establish the correspondence between the text inside the image and the description outside the image.
[0046] Establishing relationships between text paragraphs and image references: 1) Explicit referencing: This refers to a keyword-identifiable association. Keyword example: 'Figure\s (\d+[-._]\d+|\d+)', means " Figure 1 - 1, Figure 2 .3, Figure 3 ”; 'like. ?picture. The question mark (?) indicates "as shown in the figure below"; 'See. The question mark (?) indicates "see figure" or "see below figure". See also. 'Figure' indicates "see figure"; '(top|bottom|left|right)image' means "top image, bottom image, etc."; 'Flowchart|Schematic|Screenshot|Configuration Diagram' indicates an "image type reference".
[0047] 2) Implicit reference: that is, the association through semantic recognition: using word vectors to calculate the similarity between knowledge text atoms and image knowledge atoms.
[0048] 3) Parameter consistency check: Verify the consistency of the step order and parameters: Extract numerical parameters from the two types of knowledge atoms using regular expressions; Calculate the parameter overlap (derive a score based on the degree of overlap, 0 - 1).
[0049] Association strength weight allocation: Calculate the scores for the above sections and multiply them by the following thresholds to obtain the correlation score.
[0050] 'spatial_proximity': 0.25, representing "spatial proximity"; 'explicit_reference': 0.35, indicates "explicit reference"; 'semantic_relevance': 0.20, indicates "implicit reference"; 'parameter_consistency': 0.20, indicates "parameter consistency".
[0051] Finally, the association strength is determined, which is used to provide a basis for confidence when retrieving images from text. Strong correlation (score ≥ 0.8): Directly indicates the relationship, with a high degree of consistency between the text and the image; Moderate correlation (0.5 ≤ score < 0.8): Related supplementary relationship, corresponding to the text and image parts; Weak association (0.3 ≤ score < 0.5): Indirect correlation, background information; No correlation (score<0.3): No substantial relationship.
[0052] The score represents the total score.
[0053] Specifically, the structured knowledge data includes the content of each text knowledge atom and image knowledge atom, its position coordinates in the RAG document, atom type, and its association with other knowledge atoms.
[0054] Specifically, the multi-layered structure includes the lexical level, semantic level, structural level, and visual level.
[0055] Specifically, multi-level similarity calculations are performed on structured knowledge data from multiple RAG documents to identify knowledge conflicts, including: At the lexical level, text similarity is calculated based on hash similarity, Jaccard similarity, or TF-IDF (Term Frequency-Inverse Document Frequency) weighted similarity. At the semantic level, semantic similarity is calculated by selecting sentence vectors, word vectors, or latent semantic analysis models based on the text length; At the structural level, based on the document structure type, the longest common subsequence algorithm, parameter matching algorithm, tree edit distance or edit distance are used to calculate structural similarity; At the visual level, image similarity is calculated through perceptual hashing, color histogram similarity, or SIFT (Scale-Invariant Feature Transform) feature matching.
[0056] like Figure 4 As shown, the method in this embodiment is implemented through a multi-source knowledge deduplication and conflict detection module, which uses a multi-level and multi-dimensional analysis mechanism to comprehensively identify redundancy and conflicts in the knowledge base.
[0057] A fast deduplication mechanism is constructed based on feature hashing for efficient processing. For text content, after word segmentation and standardization, a hash fingerprint of the text is calculated to quickly detect completely or nearly completely duplicated text segments. For images, a perceptual hash is calculated to identify visually highly similar images.
[0058] The multi-level similarity calculation mechanism is the core technical solution of this invention, which comprehensively evaluates four levels. At the lexical level, it calculates the overlap of keywords and the matching degree of synonyms to identify knowledge fragments with similar expressions. At the semantic level, it calculates the semantic similarity of text based on TF-IDF vectors or more advanced vector embedding techniques, effectively solving the problem of "semantic overlap but different expressions." At the structural level, it compares the similarity of operation step sequences and parameter lists to identify subtle changes in operation processes or configuration information. At the visual level, it calculates the Euclidean distance of image feature vectors to quantify the similarity of image content and combines it with text similarity for a comprehensive judgment.
[0059] Vocabulary similarity calculation: 1) Fast hash detection (lowest cost, for coarse screening) Calculate the hash similarity between two documents. If the result is greater than 0.95, it means that the documents are almost identical. → Return the similarity directly without performing any more complex calculations.
[0060] 2) Basic vocabulary overlap (medium cost, fast filtering) J(A,B) = |A ∩ B| / |A ∪ B| Where: A: Keyword set of document 1; B: Keyword set of document 2; |A ∩ B|: Number of common keywords; |A ∪ B|: Total number of keywords; J(A, B): Represents the Jaccard similarity between set A and set B.
[0061] Calculate the Jaccard similarity (based on the overlap of word sets) between two documents. If the result is less than 0.1, it means that there are almost no shared words, so the similarity is returned directly without further calculation.
[0062] 3) TF-IDF weighted similarity (high cost, use only when necessary) TF(t,d) = count(t,d) / |d|; IDF(t,D) = log(|D| / |{d ∈ D : t ∈ d}|); TF-IDF(t,d,D) = TF(t,d) × IDF(t,D); Where: t: term; d: document; D: document collection; count(t, d): the number of occurrences of term t in document d; |d|: the total number of terms in document d; |D|: the total number of documents; TF(t, d) represents the frequency of term t in document d; IDF(t, D) represents the general importance (or discrimination ability) of term t in document collection D; TF-IDF(t, d, D) represents the comprehensive importance weight of term t for document d (in document collection D).
[0063] Only when the Jaccard similarity is greater than 0.3, the TF-IDF similarity is calculated. Through weighted combination: Final_sim = 0.3×Jaccard + 0.7×TF-IDF, the final similarity Final_sim is obtained.
[0064] Semantic similarity calculation: 1) Select a calculation strategy according to the document length, and calculate the average number of words avg_len of the two texts; 2) Short text (avg_len < 50): Use BERT (Bidirectional Encoder Representations from Transformers, bidirectional encoder representations from transformers) sentence vectors (high precision); 3) Medium text (50 < avg_len < 200): Use Word2Vec (word vector model) for calculation (balancing effect and efficiency); Long text (avg_len > 200): Use LSI (Latent Semantic Indexing, latent semantic indexing) for calculation after dimensionality reduction (high efficiency in processing large documents): LSI_Similarity(d1, d2) = cos(θ) = (d1' · d2') / (||d1'|| × ||d2'||); Where: d1', d2': the representations of the documents in the k-dimensional latent semantic space; d' = Σ^(-1)U^T×d_original; where, LSI_Similarity(d1, d2) represents the similarity between document d1 and document d2 in the latent semantic space after dimensionality reduction by the LSI model; cos(θ) represents the cosine value of the angle between two vectors (d1' and d2'); d' represents the low-dimensional vector of the document in the k-dimensional latent semantic space; U represents the word-topic matrix; Σ represents the singular value matrix; T represents the transpose of matrix U; d_original represents the original high-dimensional representation vector of the document.
[0065] Visual similarity calculation: 1) First layer: Perceptual hashing for quick screening Generate a perceptual hash (pHash) for the image, a 256-bit binary sequence representing the global visual features of the image.
[0066] In the formula, These represent the binary hash fingerprints generated after applying the perceptual hash algorithm to images I1 and I2, respectively. This represents two images calculated based on perceptual hash values. The fast similarity score between the two binary strings is calculated; Hamming represents the Hamming distance (the difference in the number of bits between the two binary strings), and L represents the hash length (e.g., 64 bits). If the result is less than 0.3, it means that the difference is too large and there is no need to continue the calculation.
[0067] 2) Second layer: Histogram similarity (medium precision) Convert the image into a color histogram (256 bins for each RGB channel). Compare the distribution of the histograms.
[0068] In the formula, Representing an image The color histogram similarity is calculated as follows: H1(i) and H2(i) are the frequencies of the two images in bin i (the histogram divides the entire color space into several discrete intervals called bins, and i indicates the frequency of traversing all these intervals). If both pHash and Hist_sim similarities are greater than 0.8, the images are considered to be highly similar, and the mean of the two is returned directly.
[0069] 3) Third layer: SIFT feature matching (high accuracy, high cost) Keypoint features are extracted using SIFT (Scale Invariant Feature Transform), and the ratio of matching points between the two images is calculated.
[0070] In the formula, Representing an image The structural similarity is calculated by SIFT feature matching; min(N_I1, N_I2) represents the smaller value among the total number of key points in the two images; Nmatches is the number of key points that are successfully matched between the two images, and NI1 and NI2 are the total number of key points in the two images, respectively.
[0071] 4) Calculate the overall score: In the formula, Representing an image The final visual similarity score; This represents a fast global structural similarity based on perceptual hashing. This represents the similarity of color distributions based on a color histogram. This represents the local detail structural similarity based on SIFT (Scale-Invariant Feature Transform) feature matching; pHash has the largest weight (0.4) because it can quickly reflect global differences. Histogram and SIFT each account for 0.3 to ensure a balance between color and local features.
[0072] Structural similarity calculation: 1) Detect document structure type: Regular expressions can be used to match number formats and step formats, etc.
[0073] If three or more of these patterns are found in the text, the text is determined to be a sequence of steps (such as operation steps or process description).
[0074] Using regular expressions: match parameter-value pairs like key=value or param:123.
[0075] If such a parameter pair appears 5 times or more in the text, the text is considered a parameter list.
[0076] Match headings, such as heading level 1, heading level 2, with a maximum of 6 levels supported.
[0077] If the number of headings is ≥3, the text is considered a hierarchical document.
[0078] 2) Step sequence: Using the LCS (Longest Common Subsequence) algorithm: ; In the formula: Represents a sequence of steps Similarity; This represents the larger of the two sequence lengths; S1=[s1,1,s1,2,…,s1,m]: The sequence of steps in document 1, with a length of m.
[0079] S2=[s2,1,s2,2,…,s2,n]: The sequence of steps in document 2, with a length of n.
[0080] LCS(S1,S2): The length of the longest common subsequence of the two sequences.
[0081] max(m,n): The larger of the two sequence lengths.
[0082] 3) Parameter list: Using a parameter matching algorithm: ; In the formula: Indicates parameter list Similarity; P1={(ki,vi)}: The set of parameters (key-value pairs) for document 1.
[0083] P2={(kj,vj)}: The set of parameters for document 2.
[0084] M(P1,P2): The set of matched parameters, i.e. parameter pairs with the same key and similar values.
[0085] |P1|, |P2|: Size of the parameter set.
[0086] |M(P1,P2)|: The number of successfully matched parameter pairs.
[0087] 4) Hierarchical structure: Using tree edit distance: ; In the formula: Representing hierarchical structure Similarity; T1 and T2 represent the tree structures obtained from document parsing, respectively.
[0088] TED(T1,T2): Tree edit distance, which is the minimum number of edit operations (insertion, deletion, and replacement of nodes) required to transform T1 into T2.
[0089] |T1∣,∣T2∣: The number of nodes in the tree.
[0090] 5) Mixed or unknown structures: Use edit distance: ; In the formula: Document Similarity; d1, d2: Original document text.
[0091] ED(d1,d2): Levenshtein Distance, which is the minimum number of operations (insertion, deletion, replacement) required to transform string d1 into d2. |d1|, |d2|: String length.
[0092] The conflict identification and classification mechanism sets a comprehensive similarity threshold. When the comprehensive similarity of two knowledge fragments exceeds this threshold, the system further analyzes and automatically classifies the conflict, including types such as complete duplication, partial duplication, numerical conflict, operational conflict, and version difference, providing accurate basis for subsequent intelligent resolution.
[0093] Specifically, the preset resolution strategies include strategies based on version priority, source credibility, and content integrity.
[0094] Specifically, based on a preset resolution strategy, the identified knowledge conflicts are intelligently resolved to generate standardized knowledge data, including: Identify conflict types, including complete duplicates, partial duplicates, numerical conflicts, operational conflicts, and version differences; For complete duplicates, intelligent resolution is performed based on a version priority strategy; For partial duplication, intelligent resolution is performed based on a content integrity strategy; For numerical conflicts, intelligent resolution is performed based on version priority strategy or source credibility strategy; For operational conflicts, intelligent resolution is performed based on content integrity or source credibility strategies; For version differences, intelligent resolution is performed based on a version priority strategy.
[0095] The method in this embodiment is implemented through an intelligent conflict resolution strategy module. This module uses a series of preset intelligent strategies to automatically or semi-automatically resolve identified knowledge conflicts, as shown in Table 1.
[0096] Table 1. Resolution Strategy Table:
[0097] Complete duplication: Text hash fingerprint: SHA256 values are completely identical; Perceptual hash value: pHash Hamming distance <= 2 (64-bit hash); Overall similarity score: ≥ 0.98; Complete duplication determination formula: Total_Similarity = 0.4 × Text_Hash_Sim + 0.3 × Semantic_Sim + 0.3 × Visual_Sim; where Text_Hash_Sim represents text hash similarity; Semantic_Sim represents semantic similarity; Visual_Sim represents visual similarity; when Total_Similarity (overall similarity) ≥ 0.98, it is determined as complete duplication. Duplicate documents imported after complete duplication are deleted.
[0098] Example: Document A: Check whether the peer alarm is RLOS (Receive Loss of Signal). If so, perform a line check.
[0099] Document B: Check whether the peer alarm is RLOS. If so, perform a line check.
[0100] Hash value: MD5 (Message-Digest Algorithm 5) is exactly the same; Processing: Retain the version with the updated timestamp and delete duplicates.
[0101] Partial duplication: The core information is the same: keyword overlap > 0.6; The description methods are different: different sentence structures but similar semantics; Information integrity difference: One version contains more details; Partial duplication judgment formula: Core_Info_Overlap = semantic similarity overlap; Semantic_Distance = structural similarity; It is determined as partial duplication when Core_Info_Overlap > 0.6 and 0.03 < Semantic_Distance < 0.3.
[0102] When partial duplication occurs, send the two knowledge data to the large model, merge complementary information, and select the version with more information.
[0103] Example: Document A: Check whether the peer alarm is RLOS; Document B: Check whether there is an RLOS alarm at the peer end; Keyword overlap: 4 / 5 = 0.8; Semantic similarity: 0.95; Processing: Select the more standard expression ("Check"), and mark synonymous expressions; Numeric conflict: Compare with the data of the parameters saved in 5.1.3; The difference rate > 0.05 (5%). Prefer the value of the latest version; When there is no difference in versions, official documents > internal manuals > user experience.
[0104] Example: Document A (2023-01): MTU = 1500; Document B (2024-03): MTU = 1400; Parameter name match: MTU (Maximum Transmission Unit); Numeric difference rate: (1500 - 1400) / 1500 = 6.67% > 5%; Processing: Adopt a timestamp priority strategy and select 1400 (updated version).
[0105] Operational conflict: Obtain the structural similarity calculation difference through the above steps, method_difference (structural similarity calculation difference) = 1; LCS(steps_A, steps_B) / max(len(steps_A), len(steps_B)); when method_difference>0.4, it is considered an operational conflict, where steps_A and steps_B represent the step sequences of documents A and B, LCS(steps_A, steps_B) represents the length of the longest common subsequence; len(steps_A) and len(steps_B) represent the lengths of sequences A and B; Let the larger model determine the most reasonable operation; Methods that include more verification steps are preferred, and this operation is recorded as requiring manual review.
[0106] Example: Document A: 1. Save configuration → 2. Soft reboot command → 3. Check status; Document B: 1. Hardware restart → 2. Check status; Target similarity: 0.95 (both are devices that have been restarted); Method LCS: 1 / 3 = 0.33, difference = 0.67 > 0.4; Handling: Retain method A (more complete), and label method B is suitable for emergency situations.
[0107] Version differences: The score is obtained by extracting the cover page using the method described in 5.1; documents with a higher overall score are retained, and records requiring review are kept when the score difference is less than 30%.
[0108] Example: Document A (2023-01): V.8; Document B (2024-06): V.10; Time priority: B update; Version priority: B update; Solution: Keep B.
[0109] A timestamp-based version priority strategy extracts information such as document creation time and revision time to establish version priority ranking rules. In the event of version conflicts, the latest version is usually retained first, as it represents the latest technical state or best practices.
[0110] The source credibility-based weighting strategy assigns different weights to documents from different sources (official manuals, internal user manuals, third-party materials) to establish a source credibility scoring mechanism. In the event of a conflict, the system prioritizes knowledge fragments from higher-credibility sources.
[0111] The selection strategy based on content integrity assesses the information completeness of knowledge fragments, including whether they contain complete operational steps, parameter ranges, or necessary contextual information. It also calculates the image-text matching degree, i.e., the consistency between the text description and the content of adjacent images. In case of conflict, the system prioritizes retaining knowledge fragments with more complete information and higher image-text matching degrees.
[0112] The conflict marking and tracing mechanism specially marks complex conflicts that cannot be automatically resolved by the above strategies, recording the decision-making process and basis for conflict resolution. The system establishes a knowledge traceability chain to support subsequent manual review and decision-making, ensuring that the integrity and traceability of knowledge are still guaranteed even if automatic processing fails.
[0113] The implementation of this embodiment also relies on a standardized knowledge storage and management module. This module stores the conflict-resolved text and image knowledge atoms into a unified standardized knowledge base. This knowledge base uses a structured data model to store the content, type, metadata, and relationships of knowledge atoms, and establishes a traceability chain to record the source, version, and resolution decision of the knowledge. The knowledge base simultaneously supports semantic indexing and combined text-image indexing, ensuring that downstream RAG applications can quickly and accurately access relevant knowledge. In dynamic update scenarios, the system supports incremental storage and real-time conflict detection, ensuring that the knowledge base always maintains high quality, consistency, and traceability.
[0114] Implementation Results: Unified Representation of Multimodal Knowledge: The text and image content in the original manual are deconstructed into unified knowledge atoms, and semantic connections between text and images are established, avoiding the problems of text-image fragmentation and difficulty in coordination in traditional methods, and realizing integrated text-image knowledge representation. Efficient Deduplication and Conflict Detection: Through multi-level similarity calculation mechanisms (lexical, semantic, structural, and visual), knowledge conflicts in complex scenarios such as semantic repetition, version differences, and parameter conflicts can be effectively identified. Intelligent Conflict Resolution and Knowledge Fusion: The system can automatically perform knowledge conflict resolution based on multiple factors such as version age, source credibility, and content completeness, reducing the workload of manual intervention. When encountering complex conflicts, combined with the semantic discrimination capabilities of large models, automatic merging and optimization of expression can be achieved to generate more complete and standardized knowledge content. Standardized Knowledge Base Construction and Source Traceability Guarantee: All processed knowledge atoms are stored in a unified standardized knowledge base, forming structured storage. The knowledge base retains a source traceability chain, recording the source, version number, and conflict resolution decision of each knowledge atom, ensuring the traceability and auditability of knowledge. It also supports dynamic incremental updates to ensure that the knowledge base remains consistent with the latest operation and maintenance documents.
[0115] In summary, this embodiment not only solves the problems of redundancy, conflict, and inconsistency between text and graphics in the knowledge integration process of multi-source, multi-modal enterprise operation and maintenance manuals, but also realizes the standardization, traceability, and efficient utilization of knowledge, providing a solid knowledge foundation for enterprise intelligent operation and maintenance and large-scale model-based applications.
[0116] Figure 5 This is a block diagram of a RAG document knowledge standardization system according to an exemplary embodiment, such as Figure 5 As shown, an exemplary embodiment of this disclosure provides a RAG document knowledge standardization system, including: The parsing unit is used to perform multimodal content parsing on RAG documents, decompose the document content into text knowledge atoms and image knowledge atoms, and establish semantic relationships between text knowledge atoms and image knowledge atoms. The conversion unit is used to convert the text knowledge atoms, image knowledge atoms and their semantic relationships into structured knowledge data in a preset format; The identification unit is used to perform multi-level similarity calculations on structured knowledge data from multiple RAG documents in order to identify knowledge conflicts. The resolution unit is used to intelligently resolve the identified knowledge conflicts based on a preset resolution strategy and generate standardized knowledge data. The data storage unit is used to store the standardized knowledge data into the knowledge base and establish a traceability chain for each piece of standardized knowledge data. The knowledge base supports semantic indexing and graph-text combined indexing to provide retrieval support for the downstream RAG system.
[0117] Figure 6 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of this invention. Figure 6 As shown, corresponding to the RAG document knowledge standardization method provided above, this disclosure also provides an electronic device. Since the embodiment of this device is similar to the above method embodiment, the description is relatively simple; relevant details can be found in the description of the above method embodiment section. The device described below is merely illustrative. This device may include: a processor 1, a memory 2, a communication bus (i.e., the aforementioned device bus), and a search engine. The processor 1 and memory 2 communicate with each other via the communication bus and communicate with external systems via a communication interface. The processor 1 can invoke logical instructions in the memory 2 to execute the RAG document knowledge standardization method.
[0118] Furthermore, the logical instructions in the aforementioned memory 2 can be implemented as software functional units and sold or used as independent products, and can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as memory chips, USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0119] On the other hand, this disclosure also provides a processor-readable storage medium storing a computer program 3, which, when executed by a processor 1, is implemented to perform the RAG document knowledge standardization method provided in the above embodiments.
[0120] The processor-readable storage medium can be any available medium or data storage device that the processor 1 can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).
[0121] The above are merely preferred embodiments of this disclosure. The scope of protection of this disclosure is not limited to the above embodiments. All technical solutions falling within the scope of this disclosure are protected. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of this disclosure should be considered within the scope of protection of this disclosure.
Claims
1. A method for standardizing RAG document knowledge, characterized in that, include: Multimodal content parsing is performed on RAG documents, breaking down the document content into text knowledge atoms and image knowledge atoms, and establishing semantic relationships between text knowledge atoms and image knowledge atoms; The text knowledge atoms, image knowledge atoms, and their semantic relationships are transformed into structured knowledge data in a preset format. Multi-level similarity calculations are performed on structured knowledge data from multiple RAG documents to identify knowledge conflicts; Based on a preset resolution strategy, the identified knowledge conflicts are intelligently resolved to generate standardized knowledge data. The standardized knowledge data is stored in a knowledge base, and a traceability chain is established for each piece of standardized knowledge data. The knowledge base supports semantic indexing and graph-text combined indexing to provide retrieval support for downstream RAG systems.
2. The RAG document knowledge standardization method according to claim 1, characterized in that, Multimodal content parsing is performed on RAG documents, breaking down the document content into text knowledge atoms and image knowledge atoms, and establishing semantic relationships between text knowledge atoms and image knowledge atoms, including: Identify text and image regions in RAG documents through layout analysis; The text region is extracted using OCR to generate text knowledge atoms containing text content, location, and formatting information; Feature extraction and content analysis are performed on the image region to generate image knowledge atoms containing visual features, content classification, and internal text; Based on spatial proximity, explicit references, implicit references, and parameter consistency, the correlation strength between text knowledge atoms and image knowledge atoms is calculated.
3. The RAG document knowledge standardization method according to claim 1, characterized in that, The structured knowledge data includes the content of each text knowledge atom and image knowledge atom, its position coordinates in the RAG document, atom type, and its association with other knowledge atoms.
4. The RAG document knowledge standardization method according to claim 1, characterized in that, The multi-layered approach includes the lexical level, semantic level, structural level, and visual level.
5. The RAG document knowledge standardization method according to claim 1 or 4, characterized in that, Multi-level similarity calculations are performed on structured knowledge data from multiple RAG documents to identify knowledge conflicts, including: At the lexical level, text similarity is calculated based on hash similarity, Jaccard similarity, or TF-IDF weighted similarity. At the semantic level, semantic similarity is calculated by selecting sentence vectors, word vectors, or latent semantic analysis models based on the text length; At the structural level, based on the document structure type, the longest common subsequence algorithm, parameter matching algorithm, tree edit distance or edit distance are used to calculate structural similarity; At the visual level, image similarity is calculated through perceptual hashing, color histogram similarity, or SIFT feature matching.
6. The RAG document knowledge standardization method according to claim 1, characterized in that, The preset resolution strategies include those based on version priority, source credibility, and content integrity.
7. The RAG document knowledge standardization method according to claim 1 or 6, characterized in that, Based on a pre-defined resolution strategy, the identified knowledge conflicts are intelligently resolved to generate standardized knowledge data, including: Identify conflict types, including complete duplicates, partial duplicates, numerical conflicts, operational conflicts, and version differences; For complete duplicates, intelligent resolution is performed based on a version priority strategy; For partial duplication, intelligent resolution is performed based on a content integrity strategy; For numerical conflicts, intelligent resolution is performed based on version priority strategy or source credibility strategy; For operational conflicts, intelligent resolution is performed based on content integrity or source credibility strategies; For version differences, intelligent resolution is performed based on a version priority strategy.
8. A RAG document knowledge standardization system, characterized in that, include: The parsing unit is used to perform multimodal content parsing on RAG documents, decompose the document content into text knowledge atoms and image knowledge atoms, and establish semantic relationships between text knowledge atoms and image knowledge atoms. The conversion unit is used to convert the text knowledge atoms, image knowledge atoms and their semantic relationships into structured knowledge data in a preset format; The identification unit is used to perform multi-level similarity calculations on structured knowledge data from multiple RAG documents in order to identify knowledge conflicts. The resolution unit is used to intelligently resolve the identified knowledge conflicts based on a preset resolution strategy and generate standardized knowledge data. The data storage unit is used to store the standardized knowledge data into the knowledge base and establish a traceability chain for each piece of standardized knowledge data. The knowledge base supports semantic indexing and graph-text combined indexing to provide retrieval support for the downstream RAG system.
9. An electronic device, characterized in that, include: Processor and memory; The memory is used to store computer programs, and the processor calls the computer programs stored in the memory to execute the RAG document knowledge standardization method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the processor to perform the RAG document knowledge standardization method according to any one of claims 1 to 7.