Intelligent data management method and system for electronic archives based on large model
By normalizing the format of electronic archive files and parsing them page by page, and combining this with a large language model for semantic extraction and knowledge extraction, a knowledge graph with page-level traceability tags is generated. This solves the problems of low efficiency, insufficient semantic understanding, and fragmented knowledge in existing electronic archive management technologies, and achieves efficient and traceable data governance and cross-document querying.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NINGBO BAYI GRP CO LTD
- Filing Date
- 2026-04-01
- Publication Date
- 2026-07-21
AI Technical Summary
Existing electronic record management methods rely on manual annotation and keyword matching, which are difficult to handle massive amounts of unstructured data and lack deep semantic understanding. This results in low structuring of record data, fragmented knowledge, inability to achieve complex cross-document queries and semantic retrieval, and a lack of verifiability of semantic extraction results.
By acquiring the original electronic archive files, performing format normalization processing, generating standard files to be processed, performing page-by-page parsing and coordinate mapping, using a large language model for semantic extraction and knowledge extraction, and constructing an electronic archive knowledge graph with page-level traceability tags.
It achieves efficient data governance, reduces the cost of manual intervention, improves processing efficiency, enables deep semantic parsing, constructs a unified knowledge graph, and enhances data traceability and cross-document query capabilities.
Smart Images

Figure CN121960701B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to an intelligent data governance method and system for electronic archives based on a large model. Background Technology
[0002] Existing electronic record management and governance methods primarily rely on manual annotation, rule matching, or keyword-based retrieval. Typical processing flows include document entry, format recognition, manual classification, and metadata entry. While these methods are adequate for small-scale data processing, they become inefficient, costly, and time-consuming when dealing with massive amounts of unstructured and semantically complex archival data. Furthermore, traditional algorithms, which rely mainly on keywords or fixed rules for matching, lack the ability to understand the contextual logic and implicit semantics of the text. This results in low-structure archival data that is difficult to directly convert into standardized fields, severely hindering the in-depth utilization and sharing of the data.
[0003] With advancements in machine learning and natural language processing technologies, some systems have begun to incorporate classification models, named entity recognition (NER), and optical character recognition (OCR) techniques, which have improved the automation level of document parsing and field extraction to some extent. However, these methods typically rely on shallow semantic features and fixed templates, making it difficult to achieve deep semantic understanding across domains, contextual logic recognition, and complex entity relationship extraction. Furthermore, existing models lack a unified modeling capability for the semantic hierarchy of documents, making it difficult to establish semantic connections between documents, leading to knowledge fragmentation and an inability to effectively support complex cross-document queries and semantic retrieval needs.
[0004] More critically, existing technologies, when introducing large models for archival governance, have not yet established a standardized prompt mechanism, resulting in poor stability of semantic extraction results. Furthermore, most systems do not retain traceability information such as page numbers or location mappings during information extraction, making the entity and relation extraction results lack verifiability and making it difficult to trace the extracted results back to the original document. In summary, there is currently a lack of an intelligent data governance mechanism for electronic archives that spans the entire process of archival access, parsing, and knowledge generation, and possesses high traceability and systematic knowledge representation capabilities. Summary of the Invention
[0005] This application aims to at least partially address one of the technical problems in the related art. To this end, one objective of this application is to propose a method and system for intelligent data governance of electronic archives based on a large-scale model.
[0006] One aspect of this application provides a method for intelligent data governance of electronic archives based on a large model, comprising: Step 1: Obtain the original electronic archive file, identify its file type and perform format normalization processing to generate a standard file to be processed containing the original layout information; Step 2: Perform page-by-page parsing and coordinate mapping on the standard file to be processed to generate a page-level structured data object containing the page text content and the corresponding original position coordinates; Step 3: Input the page-level structured data object into the preset archive metadata prompt template, use the large language model to perform semantic extraction, and generate an archive metadata set containing file attributes and content block information; Step 4: Based on the pre-built archival knowledge ontology, input the page-level structured data object into the entity relation prompt template, use the large language model to extract knowledge, and generate a set of semantic triples containing entities, relations and evidence page numbers; Step 5: Based on the data association rules, perform entity alignment and fusion on the set of archival metadata and the set of semantic triples, and construct and output an electronic archival knowledge graph with page-level traceability tags.
[0007] Preferably, the specific process of generating a standard file to be processed containing the original layout information includes: detecting the header information of the original electronic archive file; if the original electronic archive file is a streaming document, converting it into a PDF file with a fixed layout as the standard file to be processed; if the original electronic archive file is an image document, calling an optical character recognition engine to perform text recognition on it, retaining the coordinate information of the recognized text blocks in the original image, and encapsulating the recognition result into the standard file to be processed.
[0008] Preferably, the page-level structured data object adopts a hierarchical JSON data structure, which includes at least: a status field for identifying the parsing status of the standard file to be processed; a page number index field for marking the physical page number of the currently processed content in the standard file to be processed; and a text unit list for storing all text fragments within the physical page number and their corresponding two-dimensional coordinate positions in reading order. The page-level structured data object serves as the sole content input source for the large language model in subsequent steps, ensuring that all subsequently generated knowledge data can be traced back to the two-dimensional coordinate positions.
[0009] Preferably, the archive metadata prompt template includes system instructions and user instructions; the system instructions define the role of the large language model and the output specifications of the archive metadata set; the user instructions embed the text content in the page-level structured data object; the generation of the archive metadata set specifically includes: the large language model extracting file-level metadata from the page-level structured data object according to the system instructions; the large language model identifying natural semantic paragraphs in the page-level structured data object, assigning a unique logical block number to each semantic paragraph, and generating corresponding block metadata; and combining the file-level metadata with the block metadata to form the archive metadata set.
[0010] Preferably, the block metadata includes at least the logical block number, the start and end page range of the logical block in the standard file to be processed, the core summary, and the topic tags; the start and end page range is used to establish an index from knowledge points to physical pages in the electronic archive knowledge graph.
[0011] Preferably, the specific process of generating the semantic triple set containing entities, relations, and evidence page numbers includes: loading the archival knowledge ontology, which defines entity type constraints and legal relation types between entities; injecting the content of the page-level structured data object and the archival knowledge ontology into the entity relation prompt template; the large language model identifying entity mentions in the text according to the entity relation prompt template and determining the relationship between entities according to the legal relation types; assigning a globally unique identifier to each identified entity and merging different textual representations of the same entity into the mention list under the globally unique identifier; and constructing a quadruple structure containing subject, relation, object, and source page number to form the semantic triple set.
[0012] Preferably, the source page number is directly inherited from the page number index field in the page-level structured data object, and is used as source evidence to verify the authenticity of the semantic triple.
[0013] Preferably, constructing and outputting an electronic archive knowledge graph with page-level traceability tags specifically includes: mapping the core fields in the archive metadata set to document attribute nodes in the graph; parsing the semantic triple set, creating entity nodes based on the globally unique identifier, and creating connecting edges based on the relationship; using the evidence page number in the semantic triple set and the start and end page number range in the archive metadata set as traceability attributes, and attaching them to the corresponding entity nodes and document attribute nodes respectively; and outputting serialized data containing the document attribute nodes, entity nodes, connecting edges, and traceability attributes as the electronic archive knowledge graph.
[0014] This application also provides an intelligent data governance system for electronic archives based on a large model, used to perform the method described above, the system comprising data processing units connected in sequence: The file access and normalization unit is used to receive original electronic archive files, identify their file types and perform format normalization processing to generate standard files to be processed containing original layout information. The page-by-page structured parsing unit is used to perform page-by-page parsing and coordinate mapping on the standard file to be processed, generating a page-level structured data object containing the page text content and the corresponding original position coordinates. The semantic extraction unit is used to input the page-level structured data object into a preset archive metadata prompt template, perform semantic extraction using a large language model, and generate an archive metadata set containing file attributes and content block information. The entity relationship intelligent extraction unit is used to input the page-level structured data object into the entity relationship prompt template based on the pre-built archive knowledge ontology, and use the large language model to extract knowledge to generate a set of semantic triples containing entities, relationships and evidence page numbers. The knowledge graph fusion and generation unit is used to perform entity alignment and fusion of the archive metadata set and the semantic triple set according to data association rules, and to construct and output an electronic archive knowledge graph with page-level traceability tags.
[0015] This application also provides a computer program stored thereon, the computer program being adapted for loading by a processor to execute the steps in the large-model-based intelligent data governance method for electronic archives.
[0016] This application provides an intelligent data governance method and system for electronic archives based on a large model. It acquires the original electronic archive files and performs format normalization to generate standard files to be processed. Subsequently, it performs page-by-page parsing and coordinate mapping to form page-level structured data objects. Using a large language model, it performs semantic extraction and knowledge extraction to generate a set of archive metadata and a set of semantic triples. Finally, based on data association rules, it performs entity alignment and fusion to construct and output an electronic archive knowledge graph with page-level traceability tags. This automates efficient data governance, reducing manual intervention costs, improving processing efficiency, achieving deep semantic parsing, constructing a unified knowledge graph, and enhancing traceability capabilities. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of a method for intelligent data governance of electronic archives based on a large model, according to an exemplary embodiment of this application. Figure 2 This is a schematic diagram of an intelligent data governance system for electronic archives based on a large model, according to an exemplary embodiment of this application. Figure 3 This is a schematic diagram of a computer-readable storage medium structure provided in one embodiment of this application. Detailed Implementation
[0018] To better understand this application, various aspects of this application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are merely illustrative of exemplary embodiments of this application and are not intended to limit the scope of this application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0019] In the accompanying drawings, the size, dimensions, and shapes of the elements have been slightly adjusted for ease of illustration. The drawings are for illustrative purposes only and are not strictly to scale. As used herein, the terms “approximately,” “about,” and similar terms are used to indicate approximation, not degree, and are intended to illustrate inherent deviations in measured or calculated values that will be recognized by one of ordinary skill in the art. Furthermore, the order in which the steps are described in this application does not necessarily indicate the order in which these steps occur in actual operation, unless otherwise expressly defined or deduced from the context.
[0020] It should also be understood that expressions such as "comprising," "including," "having," "containing," and / or "comprising" are open-ended rather than closed-ended expressions in this specification, indicating the presence of the stated features, elements, and / or components, but not excluding the presence of one or more other features, elements, components, and / or combinations thereof. Furthermore, when expressions such as "at least one of..." appear after a list of listed features, they modify the entire list of features, not just individual elements in the list. Additionally, when describing embodiments of this application, the word "may" is used to mean "one or more embodiments of this application." And the term "exemplary" is intended to refer to examples or illustrations.
[0021] Unless otherwise specified, all terms used herein (including engineering and technical terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that, unless expressly stated herein, terms defined in common dictionaries shall be interpreted as having the meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or overly formalized meaning.
[0022] It should be noted that, where there is no conflict, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0023] Example 1 like Figure 1 As shown, the technical solutions in this application are clearly and completely described. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0024] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0025] In traditional electronic records management, the reliance on manual annotation and keyword-based retrieval mechanisms results in significant deficiencies in the structured processing of archival data. Specifically, the lack of a unified modeling capability for the semantic hierarchy of archives leads to the inability to retain the original document's location mapping information in entity and relation extraction results, making the semantic extraction process lack verifiability. Furthermore, the absence of a standardized prompt word mechanism in existing technologies results in insufficient output stability of large models in archival governance, hindering the formation of semantic connections between archives and causing severe knowledge fragmentation. Consequently, when processing massive amounts of unstructured data, the system cannot effectively support complex cross-document query needs, fundamentally restricting the in-depth utilization and sharing capabilities of archival data.
[0026] For example, when processing historical document digitization projects in archives, the original archives include scanned PDF files and image-format documents, requiring metadata extraction and knowledge association. Specifically, when extracting entity relationships from multiple administrative documents spanning multiple years, traditional methods can only identify isolated entities matching keywords, failing to establish a logical association between the "project approval" entity and the "fund disbursement" entity, and the extraction results do not record the evidence page numbers. Consequently, when subsequently querying "the entire approval record of a certain project," the system cannot trace back to the specific location in the original document for verification, forcing users to manually check hundreds of pages of documents to confirm the accuracy of the relationships. Furthermore, due to the lack of page-level coordinate mapping, similar entities in different documents are treated in a fragmented manner, resulting in a discrete knowledge system and directly affecting the integrity of cross-document semantic retrieval.
[0027] If the aforementioned problems are not addressed, archival knowledge representation will remain fragmented for a long time, and the lack of verifiability of entity relationships will prevent the system from establishing a reliable traceability chain. Specifically, the knowledge graph construction process, lacking location coordinate associations, leads to a disconnect between the extracted results and the physical location of the original documents, resulting in a continuous decrease in the accuracy of complex cross-document queries. Furthermore, the insufficient stability of semantic extraction will exacerbate the uncontrollability of data governance, making it difficult to achieve standardized transformation and in-depth utilization of archival data, ultimately restricting the functional expansion of electronic archival systems in cross-domain scenarios.
[0028] In response, this application proposes an intelligent data governance method for electronic archives based on a large model. Obtain the original electronic archive files, identify their file types and perform format normalization processing to generate standard files to be processed containing the original layout information; Perform page-by-page parsing and coordinate mapping on the standard file to be processed, and generate a page-level structured data object containing the page text content and the corresponding original position coordinates; The page-level structured data object is input into a preset archive metadata prompt template, and semantic extraction is performed using a large language model to generate an archive metadata set containing file attributes and content block information. Based on a pre-built archival knowledge ontology, page-level structured data objects are input into an entity relation prompt template. A large language model is used for knowledge extraction to generate a set of semantic triples containing entities, relations, and evidence page numbers. Based on data association rules, entity alignment and fusion are performed on the set of archival metadata and the set of semantic triples to construct and output an electronic archival knowledge graph with page-level traceability tags.
[0029] For ease of understanding, the following explains some key terms in this embodiment: Large models typically refer to artificial intelligence models with a large number of parameters and complex structures. Trained on massive amounts of data, they exhibit powerful learning, generalization, and natural language understanding and generation capabilities. In this application, large models are primarily used to perform tasks such as semantic extraction and knowledge extraction.
[0030] Electronic records refer to various information records formed, processed, transmitted, and stored in a digital environment, and their forms can include text, images, audio, or video. This application primarily focuses on electronic records in text and image formats, aiming to conduct intelligent data governance on them.
[0031] Format normalization refers to converting original electronic archive files of different formats into a unified, standardized file format to facilitate subsequent automated processing. This process aims to eliminate processing barriers caused by differences in file formats and preserve as much of the original document's layout information as possible.
[0032] Page-level structured data objects refer to data structures generated after parsing a standard file that has undergone format normalization page by page, containing the text content of each page and its corresponding coordinates within the original page. These data objects aim to provide refined and traceable input for subsequent semantic analysis and knowledge extraction.
[0033] An archive metadata prompt template is a pre-designed structured text input used to guide a large language model in extracting archive metadata. This template typically contains instructions for the large language model and the text content to be processed, ensuring that the large language model can extract the required file attributes and content chunking information according to preset specifications and objectives.
[0034] Large language models, short for large-scale language models, are a specific implementation of large models, particularly adept at handling Natural Language Understanding (NLU) and Natural Language Generation (NLG) tasks. In this application, large language models are utilized for deep semantic analysis, information extraction, and knowledge construction.
[0035] An archival knowledge ontology refers to a knowledge system that provides a formalized and structured description of knowledge in a specific archival domain. This ontology defines the entity types, attributes, and relationships between entities within the domain, providing semantic constraints and a structural framework for knowledge extraction and knowledge graph construction.
[0036] An entity-relation prompt template is a pre-designed structured text input used to guide a large language model in extracting entities and relations. This template typically contains instructions for the large language model, the text content to be processed, and entity and relation types defined in the archival knowledge ontology, guiding the large language model to identify entities in the text and determine the semantic relationships between them.
[0037] Semantic triples are a basic form of knowledge representation, typically composed of three parts: "subject-relation-object," used to express specific semantic relationships between entities. In this application, semantic triples also include evidence page numbers to enhance their traceability.
[0038] Data association rules refer to a set of predefined rules used to guide entity alignment and information fusion between different datasets. These rules ensure that data from different extraction processes can be accurately associated to form a unified knowledge representation.
[0039] An electronic archives knowledge graph is a knowledge base that represents knowledge in the field of electronic archives in the form of a graph. It uses nodes to represent entities, edges to represent relationships between entities, and includes page-level traceability tags, thus providing a systematic and traceable way to represent archival knowledge.
[0040] This application proposes an intelligent data governance method for electronic archives based on a large model, which aims to solve the problems of low efficiency, insufficient semantic understanding and fragmented knowledge in traditional electronic archives governance, and pays special attention to improving the traceability of data processing and the systematization of knowledge representation.
[0041] Specifically, this method first acquires the original electronic archive files and performs file type identification and format normalization, thereby generating a standard file to be processed containing the original layout information. In practice, the original electronic archive files may exist in various formats, such as plain text files, image files, or various office documents. File type identification can be performed by checking file extensions or by manual specification. Format normalization converts these different file formats into a unified intermediate format that is easy for subsequent processing. For example, all files can be converted to a unified text format, or image files can be converted to another image format using a simple image conversion tool. This step aims to provide a unified input basis for subsequent automated processing.
[0042] Furthermore, the aforementioned standard file to be processed undergoes page-by-page parsing and coordinate mapping to generate a page-level structured data object containing the page text content and its corresponding original position coordinates. In one implementation, a rule-based text parser can be used to extract the text content page by page and assign a simple page number and line number to each text segment as its position information. For example, for a multi-page text file, the parser can read page by page, then extract the text line by line, and record position information such as "page X, line Y". In another implementation, image processing techniques can be used to segment each page, identify text regions, and record the bounding box coordinates of each text region. However, this method may only provide coarse-grained position information, such as the coordinates of the entire text block, rather than the precise coordinates of each character or word.
[0043] Subsequently, the aforementioned page-level structured data object is input into a pre-defined archive metadata prompt template, and semantic extraction is performed using a large language model, thereby generating an archive metadata set containing file attributes and content chunking information. In one implementation, the archive metadata prompt template can be a simple text string containing general instructions for the large language model, such as "Please extract the title, author, and date of the following document." After receiving this template and the text content from the page-level structured data object, the large language model attempts to identify and extract the corresponding information from the text. Content chunking information can be achieved by the large language model performing simple paragraph division of the text, for example, using consecutive blank lines as paragraph separators and assigning a sequential number to each paragraph.
[0044] Building upon this, based on a pre-constructed archival knowledge ontology, the aforementioned page-level structured data objects are input into an entity relation prompt template. A large language model is then used for knowledge extraction, generating a set of semantic triples containing entities, relations, and evidence page numbers. In one implementation, the archival knowledge ontology can be a simple list of entity types, such as "person," "organization," and "location." The entity relation prompt template can be a general question, such as "Please identify all persons and organizations from the following text and explain the relationships between them." Upon receiving this template and the text content, the large language model attempts to identify entities in the text and determines whether a relationship exists between entities based on their context, such as "Person A works in Organization B." Evidence page numbers can simply be recorded as the page number where the entity or relation first appears.
[0045] Finally, based on data association rules, the aforementioned archival metadata set and semantic triple set are aligned and fused to construct and output an electronic archival knowledge graph with page-level source tags. In one implementation, the data association rules can be simple matching rules; for example, if the "title" in the archival metadata set exactly matches the name of an entity in the semantic triple set, they are considered the same entity. The fusion process can merge these matching entities and add their attributes and relationships to the knowledge graph. The output of the knowledge graph can be a simple list containing the basic attributes of the documents, the identified entities, and the relationships between them, along with page number information.
[0046] The following example will provide a more detailed explanation of the above technical solution: Suppose there exists an electronic archive file named "Project A Report," originally in scanned image format. This file contains multiple pages and includes information such as project background, participants, timelines, and deliverables.
[0047] First, in step 1, the system acquires the scanned image file of the "Project A Report". By analyzing the file extension, the system identifies it as an image document. Then, the system performs format normalization on the image file. Specifically, the system can call a basic image processing module to convert the scanned image into a standardized image format, such as PNG, ensuring sufficient image clarity for subsequent text recognition while preserving the original image's layout information. This generates a standard file to be processed containing the original layout information.
[0048] Next, in step 2, the system performs page-by-page parsing and coordinate mapping on the aforementioned standard file to be processed. The system can utilize a basic text recognition tool to perform text recognition on each page image, extracting all text content on the page. While extracting the text, the tool records the approximate position of each recognized text block on the current page; for example, it records the start and end line numbers of each text paragraph, or the approximate Y-axis coordinate of each text line on the page. This generates a page-level structured data object containing the page text content and its corresponding original position coordinates. For example, for a page of "Project A Report," this data object might contain the text "This report was written by user A," and record its position as "Page 1, Line 5."
[0049] Subsequently, in step 3, the system inputs the aforementioned page-level structured data object into a pre-defined archive metadata prompt template. This template may contain a general instruction, such as "Please extract the document's title, author, creation date, and main content summary from the following text." Upon receiving this template and the text content from the page-level structured data object, the large language model, based on its understanding of natural language, identifies "Project A Report" as the title and "User A" as the author from the text, and attempts to summarize the core content of the report as a summary. Simultaneously, the large language model divides the report content into different logical blocks based on the natural paragraph structure of the text, such as "Project Background," "Personnel Composition," and "Results Display," assigning each logical block a simple sequential number. This generates an archive metadata set containing file attributes and content block information.
[0050] Building upon this, in step 4, the system inputs the aforementioned page-level structured data objects into an entity relationship prompt template based on a pre-built archival knowledge ontology. This archival knowledge ontology may define entity types such as "person," "organization," and "project," as well as relationship types such as "participation" and "responsibility." The entity relationship prompt template may contain an instruction, such as "Please identify all person, organization, and project entities from the following text and find the participation or responsibility relationships between them." After receiving this template, the text content in the page-level structured data objects, and the definitions of the knowledge ontology, the large language model will identify "User A" (person entity) and "Project A" (project entity) from the text of "Project A Report." The large language model further analyzes the text context and determines that there is a "participation" relationship between "User A" and "Project A." Simultaneously, the system records the page number where these entities and relationships first appear; for example, the "participation" relationship between "User A" and "Project A" appears on "page number 1." This generates a set of semantic triples containing entities, relationships, and evidence page numbers, such as (User A, Participation, Project A, Page Number 1).
[0051] Finally, in step 5, the system performs entity alignment and fusion of the aforementioned archival metadata set and semantic triple set according to data association rules. Data association rules may stipulate that if the "author" in the archival metadata matches the "person" entity name in the semantic triple, they are considered the same entity. The system uses the metadata such as the title, author, and abstract of "Project A Report" as document attribute nodes, and entities such as "User A" and "Project A" as entity nodes. Then, the system uses the relationship "User A participates in Project A" as a connection edge. Simultaneously, the system uses the page number information recorded in the archival metadata (e.g., the page number range corresponding to the abstract) and the evidence page number in the semantic triple (e.g., evidence page number 1 of "User A participates in Project A") as source tags, associating them with the corresponding document attribute nodes and entity nodes, respectively. Thus, an electronic archival knowledge graph with page-level source tags is constructed and output.
[0052] Based on the above examples, the technical concept of this application demonstrates a significant technical contribution. Traditional existing electronic record management methods, such as those relying on manual annotation or keyword-based retrieval, require a significant amount of manpower for text input and metadata filling when processing scanned image files like "Project A Report," resulting in low efficiency and a high risk of errors. Even with the introduction of basic OCR technology, it often only extracts plain text, failing to preserve original layout information and accurate coordinate mapping. In contrast, this application, through the format normalization process in step 1, can uniformly process original records of different formats and effectively preserve original layout information, laying the foundation for subsequent refined analysis.
[0053] Furthermore, existing technologies, when performing text parsing, typically only extract text content, lacking a record of the precise location of the text within the original document. This makes it impossible to trace the extracted information back to its specific location within the original document during subsequent information extraction. This application, through page-by-page parsing and coordinate mapping in step 2, generates corresponding original location coordinates for each text content fragment, such as "page number 1, line number 5," enabling all subsequently extracted knowledge data to have page-level traceability. For example, in the above example, when the entity "User A" is extracted, it can be clearly known that it is mentioned at "page number 1, line number 5" in "Project A Report," which greatly enhances the verifiability and reliability of the extraction results.
[0054] Furthermore, traditional methods for metadata extraction and knowledge extraction often rely on fixed rules or shallow semantic analysis, making it difficult to handle complex and ever-changing archival semantics. For example, for content chunks and entity relationships in "Project A Report," traditional methods may require pre-setting numerous rule templates and struggle to adapt to new archival types or domain knowledge. This application, through steps 3 and 4, utilizes a large language model combined with pre-set archival metadata and entity relationship hint templates to achieve deep semantic extraction and knowledge extraction. Leveraging its powerful semantic understanding capabilities, the large language model can accurately identify file attributes, content chunks, entities, and their complex relationships from unstructured text, such as identifying the "participation" relationship between "User A" and "Project A," significantly improving the depth and breadth of archival data structuring.
[0055] Finally, existing technologies often store metadata and knowledge extraction results as independent, fragmented information, making it difficult to form a unified and systematic knowledge representation. This application, through the data association rules in step 5, performs entity alignment and fusion of the archive metadata set and the semantic triple set, and constructs an electronic archive knowledge graph with page-level traceability tags. In the example above, by fusing the metadata of "Project A Report" with the extracted entities and relationships, and attaching page-level traceability tags, a complete knowledge graph is formed. This knowledge graph not only includes the basic attributes of the document but also the entity relationships within the document, and all knowledge points can be traced back to the specific page number of the original document. Therefore, this application provides a systematic knowledge representation method that can effectively support complex cross-document queries and deep knowledge utilization, overcoming the problem of knowledge fragmentation in existing technologies.
[0056] In some of the solutions described above in this application, a standard file to be processed containing the original layout information is proposed for format normalization. However, in its implementation, if the processing procedure is not specified to preserve the original layout information such as coordinate positions, the subsequent knowledge extraction results will lack verifiability and backtracking ability, affecting the accuracy and reliability of electronic archives governance. Therefore, this application further proposes that the specific process of generating the standard file to be processed containing the original layout information in step 1 includes: detecting the header information of the original electronic archive file; if the original electronic archive file is a streaming document, converting it into a fixed-format PDF file as the standard file to be processed; if the original electronic archive file is an image document, calling an optical character recognition engine to perform text recognition, preserving the coordinate information of the recognized text blocks in the original image, and encapsulating the recognition result into the standard file to be processed.
[0057] Specifically, detecting the header information of the original electronic archive file refers to identifying key information such as the file type, encoding format, and version by reading specific byte sequences or metadata at the beginning of the file. For example, the file's "magic number" can be read; for instance, the header of a PDF file typically begins with "%PDF," while a DOCX file begins with "PK." Alternatively, file type identification interfaces provided by the operating system or third-party library functions can be used to parse the header information. This detection process forms the basis for subsequent differentiated processing for different file types.
[0058] If the original electronic archive file is a streaming document, it is converted into a fixed-format PDF file as the standard file to be processed. Streaming documents, such as Word documents (.doc, .docx), HTML files (.html), and plain text files (.txt), dynamically adjust their content layout according to the display environment (such as screen size and font settings), and do not have a fixed page structure. Converting them to fixed-format PDF files ensures that the visual presentation and content layout of the document remain consistent in different environments, thus providing a stable foundation for subsequent page-by-page parsing and coordinate mapping. This conversion can be achieved in various ways. For example, the document can be "printed" as a PDF file using the virtual printer function built into the operating system, or a professional document processing library (such as Apache POI, LibreOffice headless mode, Adobe PDFLibrary, etc.) can be used for programmatic conversion.
[0059] If the original electronic document is an image-based document, an optical character recognition (OCR) engine is invoked to perform text recognition, preserving the coordinate information of the recognized text blocks within the original image, and the recognition result is encapsulated into the standard file to be processed. Image-based documents, such as scanned copies (.jpg, .png, .tiff), image-format PDFs, etc., store their content in pixel form and do not directly contain editable text information. Calling an optical character recognition (OCR) engine, such as Tesseract, ABBYYFineReader SDK, or various cloud-based OCR services, can extract editable text content from the image. During the recognition process, the OCR engine not only recognizes the text but also outputs the precise two-dimensional coordinates of each recognized text block (or character) in the original image (such as the pixel coordinates of the top left and bottom right corners). This coordinate information is crucial for subsequent knowledge tracing. The encapsulation of the recognition result can be achieved by embedding the OCR text and its coordinate information into a searchable PDF file, or by organizing it into a structured data format, such as JSON or XML, which includes page numbers, text content, and corresponding coordinate information.
[0060] The proposed solution employs a refined format normalization process in step 1 on the original electronic archive file. This ensures that regardless of whether the original file is a streaming document or an image-based document, a standard file with a fixed layout and containing the original page layout information can be generated. Specifically, by detecting the file header information, the system can intelligently determine the file type and adopt targeted processing strategies accordingly. For streaming documents, they are converted into fixed-format PDF files, eliminating layout uncertainty and laying the foundation for subsequent accurate parsing. For image-based documents, text is extracted using OCR technology, and crucially, the coordinate information of text blocks within the original image is preserved. This processing method allows any extraction and analysis of text content in subsequent steps to trace its specific physical location within the original document, thus solving the problem in traditional methods where format normalization leads to the loss of original page layout information, affecting the verifiability and backtracking capabilities of knowledge extraction results. This precise preservation of the original layout information, in close coordination with the page-by-page parsing and coordinate mapping, semantic extraction, and knowledge extraction steps in the aforementioned intelligent data governance method for electronic archives based on large models, together constructs a highly traceable knowledge graph.
[0061] As a specific implementation method, when detecting the header information of the original electronic archive file, file signature recognition technology can be used. For example, by reading the first few bytes of the file and comparing them with a preset file type signature database, the file type can be quickly and accurately determined. If the original electronic archive file is detected as a Microsoft Word document (streaming document), the content can be converted to PDF format by calling the Microsoft Office automation interface or using open-source libraries such as Apache POI, ensuring that the converted PDF file maintains the layout of the original document. If the original electronic archive file is detected as a scanned image (image document), Baidu Smart Cloud OCR service or Tencent Cloud OCR service can be called to perform text recognition on the image and obtain the bounding box coordinates of each recognized text region. Subsequently, these recognized text contents and their corresponding coordinate information are organized into a JSON format data structure according to page number order, which serves as the standard file to be processed. For example, a JSON structure could contain a `pages` array, where each element represents a page, and contains a `page_number` field and a `text_blocks` array, where each `text_blocks` element contains a `text_content` and a `bounding_box` (e.g., `[x1, y1, x2, y2]`) field.
[0062] Through the aforementioned technical solution, this application effectively solves the problem of lost original layout information in the initial stage of intelligent data governance of electronic archives, namely during file format normalization. By adopting differentiated and refined processing strategies for different types of original electronic archive files, especially by preserving the coordinate information of text blocks when performing OCR recognition on image-type documents, and by converting streaming documents into PDF files with a fixed layout, it ensures that the layout structure and content location information of the original documents are completely preserved during the generation of standard files to be processed. This provides a solid and traceable foundation for subsequent generation of page-level structured data objects, semantic extraction from large language models, and knowledge extraction, greatly improving the accuracy, reliability, and verifiability of subsequent knowledge extraction results. This effectively supports the construction of electronic archive knowledge graphs and solves the technical problem of lack of traceability in knowledge extraction results and its impact on the accuracy of data governance in traditional methods.
[0063] In some of the solutions described above in this application, a page-level structured data object is generated in step 2 to store the page text content and the corresponding original position coordinates. However, in its implementation, if there is no standardized data structure, subsequent processing may not be able to ensure that the knowledge data can be traced back to the original position coordinates, affecting verifiability and accuracy.
[0064] To address this, this application further proposes that in step 2, the page-level structured data object adopts a hierarchical JSON data structure, which includes at least: a status field for identifying the parsing status of the standard file to be processed; a page number index field for marking the physical page number of the currently processed content in the standard file to be processed; and a text unit list for storing all text fragments within the physical page number and their corresponding two-dimensional coordinate positions in reading order. The page-level structured data object serves as the sole content input source for the large language model in subsequent steps, ensuring that all subsequently generated knowledge data can be traced back to the two-dimensional coordinate positions.
[0065] The page-level structured data objects employ a hierarchical JSON data structure. JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write, and also easy for machines to parse and generate. Using a hierarchical JSON data structure means that data is organized in nested key-value pairs, clearly representing information at different levels, such as documents, pages, text blocks, and characters, thereby enabling fine-grained description and management of complex document content. This structure effectively supports modular data storage and flexible expansion, facilitating subsequent data processing and querying. Besides JSON, other data formats with hierarchical representation capabilities, such as XML (Extensible Markup Language) or YAML (YAML Ain't Markup Language), can also be used.
[0066] The status field is used to identify the parsing status of the standard file to be processed. This status field is an identifier indicating the progress or result of the parsing process represented by the current page-level structured data object. It can reflect information such as whether the parsing was successful, whether errors exist, or whether a specific processing stage has been completed. Through this field, the system can monitor the integrity and validity of data processing, promptly detect and handle anomalies, and ensure data quality. The status field can be a boolean value (e.g., `"parsed": true / false`), an enumeration type (e.g., `"status": "pending", "processing", "completed", "error"`), or an integer code, each code corresponding to a specific parsing status.
[0067] The page number index field is used to mark the physical page number of the currently processed content in the standard file to be processed. This page number index field is a unique identifier used to accurately indicate the original document page associated with the page-level structured data object. It ensures a direct mapping from structured data to the physical location of the original document and is a key element in achieving data traceability. Through this field, any information extracted from the structured data can be traced back to its specific page number in the original document. The page number index field can be an integer value that directly corresponds to the document's page number (e.g., `"page_index": 1`). In some cases, it can also be a string containing a page number range (e.g., `"page_index": "1-3"`) or a more complex page number representation (e.g., `"page_index": "i"` for Roman numerals) to accommodate different document page numbering conventions.
[0068] The text unit list is used to store all text fragments within the physical page number and their corresponding two-dimensional coordinate positions in reading order. This text unit list is an ordered collection containing all identifiable text content on the page, arranged according to the logical order of human reading. Each text fragment includes not only its text content but also its precise two-dimensional coordinate position information on the original page (e.g., the coordinates of the top-left and bottom-right corners of the bounding box). This preserves not only the text content but also its spatial layout information within the original page, which is crucial for understanding context, reconstructing the layout, or creating visualizations. The text unit list can consist of a series of dictionaries or objects, each dictionary representing a text fragment and containing key-value pairs such as `"text"` (text content) and `"bbox"` (bounding box coordinates, such as `[x1, y1, x2, y2]`). Alternatively, a finer-grained structure can be used, such as storing each character or word as a unit and its respective coordinates.
[0069] The page-level structured data object serves as the sole content input source for the Large Language Model (LLM) in subsequent steps, ensuring that all generated knowledge data can be traced back to the two-dimensional coordinate positions. Setting the page-level structured data object as the sole content input source for the Large Language Model (LLM) means that all input information for LLM during semantic extraction and knowledge extraction originates from this standardized and structured data. This unified input mechanism guarantees that the data processed by LLM has a consistent format and complete traceability information. In this way, all knowledge data generated by LLM (such as metadata, entities, relations, etc.) can be directly traced back to their specific location in the original document through the page index and two-dimensional coordinate positions contained in the page-level structured data object, thereby greatly enhancing the verifiability and reliability of the knowledge. This can be achieved by passing the entire page-level structured data object (or a specific part, such as the text content in a list of text cells) as the model's `prompt` or `input` parameter when calling the Large Language Model API. In terms of system design, it is possible to mandate that all modules interacting with the large language model must use this structured data as their content input, and retain or reference the original page number and coordinate information in the model output.
[0070] Specifically, upon receiving the standard file to be processed generated in step 1, the system parses it page by page. During parsing, it not only extracts the text content of the page but also precisely captures the two-dimensional coordinate position of each text fragment on the page. This information is then encapsulated in a hierarchical JSON data structure, forming a page-level structured data object. Within this JSON structure, the status field updates the parsing progress and results in real time, ensuring the integrity of the data flow; the page number index field provides a clear physical page number identifier for each page content, establishing a direct link from numerical information to the physical location of the original document; most importantly, the text unit list organizes all text fragments on the page in reading order and attaches its precise two-dimensional coordinate position to each fragment. This design allows the layout information and text content of the original document to be preserved completely and orderly. In subsequent steps 3 and 4, when the large language model needs to perform semantic extraction or knowledge extraction, it will directly and exclusively use this page-level structured data object containing rich structural and positional information as its content input source. This means that while understanding the text content, the large language model also "perceives" the original positional information of the text. Therefore, regardless of whether the archival metadata, entities, or relations extracted by the large language model are included, all the generated knowledge data naturally carries the page number index and two-dimensional coordinate location information of the original text. This mechanism ensures a clear and verifiable traceability path from the final knowledge graph to the specific text fragments in the original electronic archival files. In this way, this solution not only solves the problem of difficult knowledge data backtracking in traditional methods, but also provides high-quality, highly traceable input for the large language model, significantly improving the accuracy and reliability of archival data governance.
[0071] As a specific implementation, assume a standard file to be processed is a multi-page PDF document. In step 2, the system processes the PDF file page by page. For each page, such as page 5, the system first sets its parsing status to "parsed" and records the page number as 5. Next, the system identifies all text blocks on the page, such as headings, paragraphs, table cells, etc. For each identified text block, the system extracts its text content and calculates its precise bounding box coordinates on the PDF page (e.g., top-left x1, y1 and bottom-right x2, y2). This text content and coordinate information are organized into a list of text cells according to their reading order on the page (e.g., from top to bottom, from left to right).
[0072] In the subsequent step 3, when the large language model needs to extract archival metadata from this page-level structured data object, it receives the complete JSON structure described above as input. Based on its internal logic, the large language model can identify "Archival Management Regulations" as a document title and include it as part of the document-level metadata. Simultaneously, it can also identify "Article 1: Strengthening Electronic Archives Management..." as a semantic paragraph and generate chunked metadata for it, such as core summaries and topic tags. Since the large language model's input includes the original `page_index` and `bbox` information, both the extracted document title and paragraph summary can be directly associated with their specific location on page 5 of the original PDF document. For example, the metadata could contain "Title: Archival Management Regulations (Page: 5, Coordinates: [100, 50, 300, 70])".
[0073] Through the aforementioned technical solution, this application effectively solves the problem of difficulty in tracing knowledge data back to its original location coordinates during the intelligent data governance of electronic archives by introducing a standardized hierarchical JSON data structure to construct page-level structured data objects. This addresses the issue of verifiability and accuracy being affected by the difficulty in tracing knowledge data back to its original location coordinates. Specifically, the introduction of the status field enables the system to clearly track and manage the parsing status of files, ensuring the integrity and reliability of data processing. The page number index field provides a precise physical page number identifier for each processed content, establishing a direct mapping from structured data to the original document. The text unit list not only preserves the text content but, more importantly, stores the two-dimensional coordinate position of each text fragment, thus completely preserving the layout and spatial arrangement of the original document. Using this page-level structured data object as the sole content input source for the large language model ensures that all archival metadata and semantic triples generated by the large language model can directly inherit and be associated with the page number and precise coordinate position of the original document. This design greatly enhances the traceability, verifiability, and accuracy of knowledge data, allowing users to easily trace any knowledge point in the knowledge graph back to its specific source in the original electronic archives, thereby improving the efficiency and quality of electronic archive data governance.
[0074] In some of the solutions mentioned above in this application, an archive metadata hint template is proposed to guide the semantic extraction of large language models. However, in its implementation, the lack of standardized instruction definitions may lead to unstable extraction results, making it impossible to effectively identify natural semantic paragraphs and generate a structured metadata set.
[0075] In response, this application further proposes that in step 3, the archive metadata prompt template includes system instructions and user instructions; the system instructions define the role of the large language model and the output specifications of the archive metadata set; the user instructions embed the text content in the page-level structured data object; generating the archive metadata set specifically includes: the large language model extracting file-level metadata from the page-level structured data object according to the system instructions; the large language model identifying natural semantic paragraphs in the page-level structured data object, assigning a unique logical block number to each semantic paragraph, and generating corresponding block metadata; and combining the file-level metadata and block metadata to form the archive metadata set.
[0076] The archive metadata prompt template includes system instructions and user instructions, designed to provide the large language model with clear and structured input to ensure the accuracy and consistency of semantic extraction. The system instructions clarify the large language model's role in this task and the format requirements of its output. For example, the large language model can be defined as "a professional archive metadata extraction assistant," and the output can be specified as structured data conforming to a specific JSON Schema, or defined as a collection of metadata tags in XML format. The user instructions carry the actual text content to be processed, i.e., the text content in the page-level structured data object. Their purpose is to provide the large language model with the raw corpus for semantic analysis. For example, the entire text content in the page-level structured data object can be directly used as the input for the user instructions, or the text content can be encapsulated in specific tags (such as `...`).<document_text> `...`< / document_text> In `), as part of user instructions.
[0077] When generating the archive metadata set, the large language model extracts file-level metadata from the page-level structured data object according to the system instructions. File-level metadata typically refers to the global attributes of the archive, such as file title, author, creation date, and security classification. The large language model can identify and extract relevant information from the text content of the page-level structured data object based on the predefined metadata fields and their semantic descriptions in the system instructions. For example, if the system instructions explicitly require extracting "file title" and "author," the large language model will search for phrases or sentences in the text that best match these semantics. Simultaneously, the large language model identifies natural semantic paragraphs in the page-level structured data object, dividing continuous text content into logical units with independent semantics. This is achieved through the large language model's ability to understand text context, combined with linguistic features such as punctuation, paragraph structure, and thematic variations. For example, the model can identify different semantic blocks in a document, such as introduction, background, methods, results, and discussion. A unique logical block number is assigned to each identified semantic paragraph, providing a stable and referable identifier for these logical units, facilitating subsequent management and traceability. This number can be an automatically generated sequence of incrementing integers or a globally unique identifier (UUID). Generating corresponding chunk metadata provides finer-grained descriptive information for each logical block. For example, a large language model can generate a brief summary, extract keywords, or label the topic for each logical block based on system instructions. Finally, the file-level metadata and the chunk metadata are combined to form the archive metadata set. This set constructs a complete and hierarchical metadata system, containing both overall archive information and detailed descriptions of its internal logical parts. This combination can employ a nested data structure, for example, using file-level metadata as a top-level attribute and chunk metadata as a list or array of its subordinate attributes.
[0078] This application's solution introduces a structured archival metadata prompt template, clearly dividing the input of the large language model into system instructions and user instructions, thus providing the large language model with clear task boundaries and output specifications. The introduction of system instructions enables the model to accurately understand its role and expected output format, effectively avoiding the instability of semantic extraction results caused by ambiguous instructions. Based on this, the large language model can accurately extract file-level metadata from page-level structured data objects according to system instructions, ensuring the accurate capture of the overall attributes of the archives. Furthermore, through deep semantic understanding of the text content in page-level structured data objects by the large language model, it can identify natural semantic paragraphs with independent meaning and assign a unique logical block number to each paragraph, thereby generating corresponding block metadata. This hierarchical metadata generation method not only improves the granularity of metadata, enabling more refined management and utilization of archival content, but also constructs a complete and structured archival metadata set by combining file-level metadata with block metadata. This process effectively solves the problem that traditional methods struggle to identify textual context logic and implicit semantics, enabling archival data to be transformed from an unstructured state into highly structured metadata, laying a solid foundation for subsequent knowledge graph construction and in-depth utilization.
[0079] As a specific implementation method, when processing an electronic archive file, the system first generates a page-level structured data object containing text content and coordinate information according to step 2. Then, it constructs an archive metadata prompt template. The system instruction part of this template can be set as: "You are a professional archive metadata extraction robot. Please extract the title, author, and creation date of the archive from the provided text, and segment the text content, generating a brief summary and three keywords for each segment. Please output in JSON format, containing a `file_metadata` object and a `content_blocks` array." The user instruction part directly embeds all the text content extracted from the page-level structured data object. After receiving this prompt template, the large language model first identifies and extracts file-level metadata such as the file title (e.g., "Feasibility Study Report on Project XX"), author (e.g., "Zhang San"), and creation date (e.g., "2023-01-15") from the text content of the user instruction, based on the system instruction. Simultaneously, the model analyzes the semantic structure of the text, dividing the text content into multiple natural semantic paragraphs, such as "Project Background," "Technical Solution," and "Economic Benefit Analysis." For each identified semantic segment, the model assigns a unique logical block number (e.g., starting from 1 and incrementing), and generates a brief summary and three keywords for that segment according to system instructions, forming the corresponding block metadata. Finally, the system combines the extracted file-level metadata with all block metadata to form a hierarchical and rich collection of archive metadata. For example, in the JSON output, the `file_metadata` field contains information such as title and author, while the `content_blocks` field is an array, with each element representing a logical block number, summary, and keywords.
[0080] Through the above technical solutions, this application effectively addresses the problems of unstable semantic extraction results, difficulty in identifying natural semantic paragraphs, and inability to generate structured metadata sets in traditional archival governance. The standardized definition of system instructions ensures the consistency and predictability of the large language model output, significantly improving the stability of metadata extraction. Simultaneously, by identifying natural semantic paragraphs and assigning logical block numbers to page-level structured data objects, fine-grained segmentation of archival content is achieved, enabling metadata to be managed and utilized in a more granular manner. Ultimately, the combination of file-level metadata and segmented metadata constructs a complete and hierarchical archival metadata set, greatly improving the structuring and usability of archival data, and providing a high-quality data foundation for subsequent knowledge graph construction and intelligent retrieval.
[0081] In some of the solutions mentioned above in this application, chunked metadata is proposed to identify semantic paragraphs and generate archival metadata sets. However, in this process, the lack of specific start and end page ranges makes it impossible to establish an accurate index from knowledge points to physical pages in the electronic archival knowledge graph, affecting the traceability and in-depth utilization of the data.
[0082] In response, this application further proposes that the block metadata should include at least the logical block number, the start and end page range of the logical block in the standard file to be processed, the core summary, and the topic tags; the start and end page range is used to establish an index from knowledge points to physical pages in the electronic archive knowledge graph.
[0083] Chunk metadata refers to the descriptive information attached to each logical block after the content of an electronic document is logically divided into blocks. This information aims to provide a structured representation of specific semantic segments in the original document, facilitating subsequent knowledge extraction, retrieval, and management. It can be achieved by using Natural Language Processing (NLP) technology during the document parsing phase to identify semantic units such as chapters, paragraphs, and lists, and generating corresponding metadata for each unit; or by using predefined document structure templates combined with keyword matching or regular expressions to divide the document content into different logical blocks and generate corresponding metadata for each logical block. The logical block number is an identifier used to uniquely identify the semantic segment corresponding to each chunk of metadata, ensuring that each identified semantic unit has a unique reference throughout the data governance process. It can use an incrementing integer sequence as the logical block number, for example, starting from 1 and assigning a number to each identified logical block sequentially; or it can use a composite encoding method combining the document ID and the block sequence number, such as "DocID_BlockSeq," to ensure uniqueness across document scenarios. The start and end page number range in the standard pending file refers to the physical location information of the logical block corresponding to the segmented metadata within the original standard pending file, specifically the page numbers where the logical block begins and ends. This information is crucial for knowledge tracing, as it associates abstract knowledge points with the specific physical location of the original document. During document parsing, when a logical block is identified, it records the page numbers of the first and last characters of that logical block, forming a page number range; or it records the start and end page numbers of the logical block and combines this with in-page coordinate information to provide more precise positioning capabilities. The core summary is a highly condensed and summarized text description of the logical block content corresponding to the segmented metadata, aiming to provide a concise overview of the main content or theme of the logical block, facilitating quick understanding and retrieval by users. It can be automatically generated from the text content of the logical block using a large language model; or it can be generated by using keyword extraction technology to identify the most representative keywords or phrases from the logical block and combine them into a core summary. Topic tags are keywords or phrases used to classify or summarize logical blocks corresponding to segmented metadata. They describe the topic content of the logical blocks and facilitate knowledge organization, classification, and topic-based retrieval. They can map logical block content to corresponding tags using a predefined thesaurus and a text classification model; or they can automatically discover potential topics and generate tags from logical block content using unsupervised learning methods, such as Latent Dirichlet Allocation (LDA). In electronic archive knowledge graphs, establishing an index from knowledge points to physical pages refers to associating knowledge entities or attributes in the knowledge graph with the specific page number locations of the original electronic archives during the construction of the knowledge graph.This indexing mechanism allows users to directly trace the source of a knowledge point in the original document when querying the knowledge graph, thereby verifying the authenticity and completeness of the information. It can store the start and end page range as metadata attributes of entity nodes or attribute nodes in the knowledge graph; or it can create special "source relationships" or "positional relationships" in the knowledge graph to connect knowledge points with nodes representing page numbers.
[0084] This application, when generating the archive metadata set, performs semantic extraction on page-level structured data objects to identify natural semantic paragraphs and assign them unique logical block numbers. Based on this, it further clarifies the specific information contained in the block metadata. The block metadata not only includes logical block numbers used to uniquely identify semantic paragraphs, but also specifically introduces the start and end page ranges, core summaries, and topic tags of the logical block within the standard file to be processed. The introduction of start and end page ranges allows the knowledge points of each semantic paragraph to be accurately mapped to the physical page positions of the original electronic archive. Specifically, after the large language model identifies natural semantic paragraphs from the page-level structured data objects and assigns logical block numbers according to system instructions, it further analyzes the text content of the semantic paragraphs, extracts their core essence to form core summaries, and generates topic tags according to a preset classification system or automatically identified by the model. More importantly, while identifying semantic paragraphs, the system accurately calculates the start and end page ranges of the original standard file to be processed that the semantic paragraph spans based on the text fragments stored in the page-level structured data objects and their corresponding two-dimensional coordinate positions. All this information constitutes the block metadata. In this way, when constructing an electronic archival knowledge graph, the start and end page ranges in these segmented metadata can be used as key traceability attributes, associating them with knowledge points (such as entity nodes or document attribute nodes) in the graph. For example, when a knowledge point about a specific event exists in the graph, users can quickly locate the specific page in the original archive describing that event through its associated start and end page range, thus achieving precise indexing from knowledge point to physical page. This not only enhances the reliability and verifiability of information in the knowledge graph but also provides users with a seamless jump from abstract knowledge to specific original texts, greatly improving the value of in-depth utilization of archival data.
[0085] As a specific implementation method, when performing intelligent data governance on a multi-page contract document, the system first acquires the contract document and performs format normalization processing to generate a standard file to be processed, such as a PDF file. Next, it performs page-by-page parsing and coordinate mapping on the PDF file, generating a page-level structured data object containing the page text content and its corresponding original position coordinates. Then, it inputs this page-level structured data object into a pre-defined archive metadata prompt template and uses a large language model for semantic extraction. During this process, the large language model identifies natural semantic paragraphs in the contract document, such as clauses, appendix descriptions, and party information. For example, it identifies the "payment clause" as a semantic paragraph and assigns it a logical block number, such as "BLK001". Simultaneously, the large language model determines the start and end page range of the "payment clause" in the original PDF file based on its text content and coordinate information within the page-level structured data object, for example, from page 5 to page 6. Furthermore, the model summarizes the content of the "Payment Terms," generating a core summary, such as "The payment method, amount, and time are agreed upon," and assigns it topic tags, such as "financial" and "contract terms." This information—the logical block number "BLK001," the page range "5-6," the core summary "The payment method, amount, and time are agreed upon," and the topic tags "financial" and "contract terms"—together constitutes the block metadata of the "Payment Terms." When the electronic archive knowledge graph is finally constructed, the "Payment Terms" is treated as a knowledge point, and its corresponding entity node or document attribute node will be directly associated with the page range "5-6." This means that when a user queries information related to "Payment Terms" in the knowledge graph, they can immediately know that the information originates from pages 5 to 6 of the original contract document, thus achieving precise indexing and tracing of knowledge points to physical pages.
[0086] Through the above technical solution, this application adds start and end page ranges, core summaries, and topic tags to the segmented metadata of each semantic segment when generating the archival metadata set. The introduction of start and end page ranges enables the creation of a precise index between each knowledge point and the physical page of the original electronic archive when constructing the electronic archival knowledge graph. This solves the problems of poor correlation between knowledge points and the original document location and difficulty in tracing the source in traditional methods, significantly improving the verifiability and reliability of archival data. Users can directly locate the specific source of the original document based on the information in the knowledge graph, thereby enhancing the ability to deeply utilize the data and increasing users' trust in the authenticity of the information. At the same time, the addition of core summaries and topic tags further enriches the semantic information of the segmented metadata, contributing to more efficient knowledge organization, retrieval, and understanding.
[0087] In some of the solutions mentioned above in this application, a set of semantic triples is proposed for knowledge extraction. However, in this process, entity mentions may be scattered and lack a unified identifier, resulting in inconsistent extraction results. Furthermore, the lack of direct source page numbers makes it difficult to verify and trace back to the original document.
[0088] In response, this application further proposes a specific process for generating a semantic triple set containing entities, relations, and evidence page numbers, including: loading an archival knowledge ontology, which defines entity type constraints and legal relation types between entities; injecting the content of page-level structured data objects and the archival knowledge ontology into an entity relation hint template; using a large language model to identify entity mentions in the text based on the entity relation hint template, and determining the relationship between entities based on the legal relation types; assigning a globally unique identifier to each identified entity, and merging different textual representations of the same entity into the mention list under the globally unique identifier; and constructing a quadruple structure containing subject, relation, object, and source page number to form a semantic triple set.
[0089] Loading the knowledge ontology refers to importing a pre-constructed, formalized knowledge representation into the system. This ontology defines concepts, entities, attributes, and relationships within a specific domain, enabling subsequent knowledge extraction to proceed based on these pre-defined semantic frameworks. For example, the ontology can be stored in standard formats such as OWL (Web Ontology Language) or RDF (Resource Description Framework) and loaded via an ontology parser or API interface; alternatively, the ontology can be stored in a database as structured data (such as JSON or XML) and loaded via query operations. The ontology defines entity type constraints and legal relationship types between entities. Entity type constraints specify the identifiable entity categories within a specific domain, such as "person," "organization," "event," and "location." Legal relationship types define the permissible semantic relationships between these entity categories, such as "holding a position," "participating," "located in," and "occurring in." These definitions provide clear boundaries and guidance for knowledge extraction from the large language model, ensuring the standardization and consistency of the extraction results. The process of injecting the content of page-level structured data objects and archival knowledge ontology into an entity relation prompt template involves integrating the text content to be processed (from the page-level structured data objects) and the knowledge structure (entity types, relation types) defined in the ontology into a pre-defined prompt template, forming input that the large language model can understand. For example, the prompt template may include an instruction section that explicitly requires the large language model to identify which types of entities and relations, and provides a list of entities and relations defined in the ontology as a reference. Simultaneously, the text content from the page-level structured data objects is embedded as the corpus to be analyzed into the user instruction section of the prompt template. Based on the entity relation prompt template, the large language model identifies entity references in the text. That is, after receiving the prompt template with injected data and ontology information, the large language model uses its natural language understanding capabilities to identify text fragments that match the entity types defined in the ontology. For example, if the ontology defines a "person" entity type, the large language model will identify person names in the text, such as "Zhang San" and "Li Si." Furthermore, the large language model determines the relationships between entities based on the legal relation types defined in the ontology. That is, after identifying entity mentions, the large language model further analyzes the contextual semantics between these entity mentions and determines whether a specific relationship exists between them based on the legal relation types defined in the ontology. For example, if the ontology defines the "employed at" relation, the large language model will determine whether there is a relationship of "Zhang San is employed at a certain company" between "Zhang San" and "a certain company".Each identified entity is assigned a globally unique identifier, a string or number used to uniquely identify each entity in the system. This aims to address the issue of the same entity appearing in different forms in different texts, ensuring that each logical entity has a unique identity in the knowledge graph. For example, a unique string can be generated using the UUID (Universally Unique Identifier) algorithm, or an identifier can be generated using a hash algorithm based on entity attributes (such as name and type). Different textual representations of the same entity are merged into a mention list under this globally unique identifier. That is, when the large language model identifies multiple text fragments (mentions) pointing to the same logical entity, such as "Zhang San," "Xiao Zhang," and "He" all referring to the same person, the system will associate these different textual representations with the same globally unique identifier for that entity, forming a mention list. This helps eliminate the diversity of entity representations and improves the accuracy and consistency of the knowledge graph. A four-tuple structure containing subject, relation, object, and source page number is constructed to form a semantic triple set. The four-tuple structure is the basic unit for representing knowledge in the knowledge graph, usually composed of (subject, relation, object, source). Subject and object are entities, and relations are semantic connections that link them. The source page number refers to the specific page number position of the knowledge point in the original document. For example, a quadruple could be ("Zhang San", "employed at", "company", "page number: 5"). This structure clearly represents the extracted knowledge and provides direct evidence of its origin.
[0090] This application's solution introduces an archival knowledge ontology, providing a clear semantic framework and constraints for knowledge extraction by a large language model. First, the system loads a pre-constructed archival knowledge ontology, which not only defines entity types within the domain but also clarifies the allowed types of legal relationships between these entities. These definitions set standards and boundaries for subsequent knowledge extraction, avoiding arbitrariness and inconsistency in the extraction results. Based on this, the system injects the content of page-level structured data objects, generated after format normalization and page-by-page parsing, along with the loaded archival knowledge ontology, into a pre-defined entity relationship hint template. The page-level structured data objects provide text content with precise location coordinates, while the archival knowledge ontology provides the semantic rules required for extraction. Upon receiving this carefully constructed hint template, the large language model can accurately identify entity mentions in the text based on the entity types defined in the ontology. Subsequently, the model further utilizes the legal relationship types defined in the ontology to analyze the contextual semantics between these entity mentions, thereby determining and extracting the specific relationships between entities. To address the issues of scattered entity mentions and inconsistent identification, this solution assigns a globally unique identifier to each identified logical entity. Furthermore, if the same logical entity appears in different forms in the text, these different textual representations are all merged into the mention list under the entity's globally unique identifier. This mechanism ensures that each entity in the knowledge graph has a unique identity and aggregates all its related textual mentions, greatly improving the accuracy and consistency of knowledge. Finally, the extracted knowledge is constructed using a four-tuple structure containing subject, relation, object, and source page number, forming a set of semantic triples. The source page number directly inherits from the page number index field in the page-level structured data object, providing direct physical traceability evidence for each extracted knowledge point. This design allows each semantic triple in the knowledge graph to accurately trace back to the specific page number of the original document, thus solving the problem of lack of verifiability in traditional knowledge extraction. Through the above synergistic effect, this solution not only utilizes the powerful semantic understanding capabilities of large language models for efficient knowledge extraction, but also ensures the standardization, consistency, and verifiability of the extraction results through ontology constraints, unique identifiers, and page-level traceability mechanisms, significantly improving the quality and reliability of electronic archival data governance.
[0091] As a specific implementation method, assume that the archival knowledge ontology defines three entity types: "Person," "Organization," and "Project," and three legal relationship types: "Employed," "Participated," and "Responsible." When the system receives a page-level structured data object containing text content, such as: "Zhang San participated in Project A in 2023. This project was managed by Li Si, and Project A belongs to Company B," the system will inject this text content and the definitions of the archival knowledge ontology into an entity relationship prompt template. This template can contain instructions such as "Please identify the Person, Organization, and Project entities from the following text, and extract the Employed, Participated, and Responsible relationships, outputting them in the form of a quadruple (Subject, Relationship, Object, Source Page Number)." Upon receiving this prompt, the large language model will identify entity mentions such as "Zhang San" (Person), "Project A" (Project), "Li Si" (Person), and "Company B" (Organization). Next, the model determines and extracts relationships between entities based on the legal relationship types defined in the ontology. For example, it identifies a "participation" relationship between "Zhang San" and "Project A," a "responsibility" relationship between "Li Si" and "Project A," and a "belonging to" relationship between "Project A" and "Company B" (if the "belonging to" relationship is defined in the ontology). Simultaneously with entity identification and relationship determination, the system assigns a globally unique identifier to each identified logical entity. For example, "Zhang San" is assigned `GUID_Person_001`, "Project A" is assigned `GUID_Project_001`, "Li Si" is assigned `GUID_Person_002`, and "Company B" is assigned `GUID_Organization_001`. If "Xiao Zhang" refers to "Zhang San" in subsequent text entries, mentions of "Xiao Zhang" will also be grouped under `GUID_Person_001`. Finally, the system constructs a four-tuple structure containing the subject, relationship, object, and source page number. For example, if the above text is located on page 5 of the original document, it might generate quadruples in the following semantic triple set: (`GUID_Person_001`, `participate`, `GUID_Project_001`, `page number: 5`); (`GUID_Person_002`, `responsible for`, `GUID_Project_001`, `page number: 5`); (`GUID_Project_001`, `belong to`, `GUID_Organization_001`, `page number: 5`). These quadruples together constitute the semantic triple set, where each knowledge point has a precise page-level source tag.
[0092] Through the above technical solutions, this application effectively solves the technical problems of scattered entity mentions, inconsistent extraction results, and lack of verifiable source evidence in traditional knowledge extraction. Specifically, by loading the archival knowledge ontology and defining entity type constraints and legal relation types, it provides clear semantic boundaries and standards for knowledge extraction from large language models, thereby ensuring the standardization and consistency of extraction results and avoiding semantic deviations caused by the model's arbitrary interpretation. Assigning a globally unique identifier to each identified entity and merging different textual representations of the same entity fundamentally solves the problems of inconsistent entity identification and knowledge fragmentation, making entity management in the knowledge graph more accurate and efficient. More importantly, constructing a four-tuple structure containing the source page number directly links the extracted knowledge points to the physical page number of the original document, providing strong source evidence. This not only enhances the credibility and verifiability of the extraction results but also allows users to easily trace back to the original context for verification, greatly improving the quality and practicality of the electronic archival knowledge graph. By combining the page-level structured data objects generated in the aforementioned scheme, this scheme can utilize their precise page number index field to provide high-precision page-level traceability tags for semantic triples. This ensures both the richness of knowledge semantics and the traceability of its physical location, laying a solid foundation for the in-depth utilization and intelligent governance of electronic archives.
[0093] In some of the solutions mentioned above in this application, a method for generating a set of semantic triples is proposed. However, in this process, the source of the evidence page number may not be directly inherited from the page-level structured data object, resulting in a lack of reliable traceability evidence when verifying the authenticity of the semantic triples.
[0094] In response, this application further proposes that the source page number be directly inherited from the page number index field in the page-level structured data object, which can be used as traceability evidence to verify the authenticity of semantic triples.
[0095] The source page number refers to the page number information used in the generated semantic triple to identify the physical location of the extracted information in the original electronic archive file. This page number information can be a single page number value, such as an integer, or a structure representing a page number range, such as an array or string containing a start and end page number. Its core function is to provide a clear original document location for the knowledge extraction results, thereby facilitating subsequent traceability, verification, and auditing. The page number index field in the page-level structured data object refers to a specific data field used to uniquely identify the physical page number of each page in the structured data generated after page-by-page parsing and coordinate mapping of the original electronic archive file. This field directly reflects the page order of the original document and is the original physical address identifier of the page content. For example, this field can be represented as a key-value pair in a JSON data structure, such as `"page_index": 5`, or as an attribute in an XML structure, such as `...` <page index="5">The direct inheritance refers to the fact that when constructing semantic triples, the value of the source page number is directly obtained and assigned from the page number index field in the page-level structured data object without any intermediate processing, conversion, or manual intervention. This direct assignment operation, for example, is represented in program code as `semantic_triplet.source_page = page_structured_data.page_index_field`, ensuring a high degree of consistency and accuracy between the source page number and the original page number index field, effectively avoiding errors that may be introduced during information transmission. The source evidence for verifying the authenticity of semantic triples refers to the source page number serving as a traceable credential that can prove the exact location and context of the entities and relations extracted from the semantic triples in the original electronic document. This is crucial for ensuring the accuracy, credibility, and auditability of the constructed electronic document knowledge graph. For example, users can directly jump to the corresponding page in the original document by clicking on the source page number displayed in the knowledge graph, thereby intuitively viewing the original text context of the entities and relations for manual verification.
[0096] This application's solution ensures a close connection between the knowledge extraction results and the original document by directly associating the source page number in the semantic triple with the page number index field in the page-level structured data object. After performing page-by-page parsing and coordinate mapping on the standard file to be processed, generating a page-level structured data object containing the page text content and the corresponding original position coordinates, this object contains a precise page number index field. When the large language model extracts knowledge from the content of the page-level structured data object based on the entity relation hint template, identifies entity mentions in the text, and determines the relationships between entities, any entity or relation extracted must originate from the specific text content in the page-level structured data object. At this time, when constructing a quadruple structure containing subject, relation, object, and source page number, the source page number is directly inherited from the page number index field of the page-level structured data object corresponding to the specific text content. This direct inheritance mechanism ensures that each semantic triple naturally carries its precise physical location information in the original document, so that when the semantic triple set is formed, its internal source information is highly reliable and easily verifiable. This works effectively with the method for generating semantic triple sets, resulting in sets that not only contain rich semantic information but also possess strong traceability, laying a solid foundation for the subsequent construction of electronic archive knowledge graphs with page-level traceability tags.
[0097] As a specific implementation, assume that when processing an electronic document, the system has generated page-level structured data objects. For example, for the third page of the document, its corresponding page-level structured data object may contain a key-value pair `"page_index": 3`, indicating that the object corresponds to the third page of the original document. When the large language model identifies an entity (e.g., "Contract Number: XYZ123") or a relationship (e.g., "Party A and Party B signed a contract") from this page-level structured data object, when constructing the corresponding semantic triples (e.g., (Contract, Number, XYZ123) or (Party A, Signed, Party B)), the source page number of the triple will be directly assigned the value `3`. This means that no matter how the semantic triple is subsequently used or integrated into the knowledge graph, it always carries the page number information "3", clearly indicating its origin in the original document.
[0098] The above technical solution effectively solves the problem that when generating semantic triple sets, the source of the evidence page number may not be directly inherited from the page-level structured data object, resulting in a lack of reliable traceability evidence when verifying the authenticity of semantic triples. This solution ensures that the source page number is directly inherited from the page number index field in the page-level structured data object, enabling each knowledge extraction result to be accurately traced to its physical page number in the original electronic archive file. This not only greatly enhances the verifiability and credibility of semantic triples, avoiding errors and inconsistencies that may be introduced by manual processing or complex transformations, but also provides a solid traceability foundation for the subsequent construction of the electronic archive knowledge graph. Users or systems can quickly locate specific pages in the original document based on these precise page-level traceability tags for information verification and validation, thereby significantly improving the accuracy, reliability, and auditing capabilities of archival data governance, making the information in the knowledge graph more authoritative and practical.
[0099] In some of the solutions mentioned above in this application, knowledge graphs are proposed to integrate archival data. However, in this process, without a specific page-level traceability mechanism, the extracted knowledge points may lack traceable evidence, which leads to a decrease in the credibility of the knowledge graph and an inability to effectively verify the authenticity of entities and relationships, thereby exacerbating the problem of knowledge fragmentation.
[0100] In response, this application further proposes that the specific process of constructing and outputting an electronic archival knowledge graph with page-level traceability tags in step 5 includes: mapping the core fields in the archival metadata set to document attribute nodes in the graph; parsing the semantic triple set, creating entity nodes based on globally unique identifiers, and creating connection edges based on relationships; using the evidence page numbers in the semantic triple set and the start and end page number ranges in the archival metadata set as traceability attributes, and attaching them to the corresponding entity nodes and document attribute nodes respectively; and outputting serialized data containing document attribute nodes, entity nodes, connection edges, and traceability attributes as the electronic archival knowledge graph.
[0101] The process of mapping core fields from the archival metadata set to document attribute nodes in the knowledge graph aims to structure the metadata extracted from the original electronic archives, which describes the overall characteristics of the documents, into specific node types within the knowledge graph. These nodes represent the archival documents themselves and carry their key attribute information, forming the foundation for high-level abstraction and representation of documents in the knowledge graph. This mapping can be implemented through predefined mapping rules or configuration files, explicitly specifying which fields in the archival metadata set should be extracted and converted into attributes of document attribute nodes, or directly used as independent document attribute nodes. Furthermore, ontology tools can be used to match and instantiate fields in the archival metadata set with attributes of predefined document classes in the knowledge graph ontology, thereby automatically generating document attribute nodes and their corresponding attribute values.
[0102] The core of knowledge graph construction lies in parsing the set of semantic triples, creating entity nodes based on globally unique identifiers, and establishing connecting edges based on relations. It transforms structured semantic information extracted from text into nodes and edges in the graph. Globally unique identifiers ensure the uniqueness and consistency of entities in the graph, avoiding entity duplication or confusion, while relations clarify the semantic connections between entities. In practice, the set of semantic triples can be traversed. For each subject and object in a triple, it first checks if an entity node based on its globally unique identifier already exists in the knowledge graph; if not, a new entity node is created and assigned the identifier. Then, based on the relation type in the triple, a directed connecting edge is created between the subject and object entity nodes. Alternatively, the semantic triples can be directly imported using the API or query language of a graph database, allowing the graph database system to automatically handle node creation and relation connection, and utilize its built-in indexing mechanism to manage globally unique identifiers.
[0103] Using the evidence page number from the semantic triple set and the start-end page number range from the archive metadata set as tracing attributes, and attaching them to the corresponding entity node and document attribute node respectively, is a key step in achieving page-level tracing. It associates entities and document attributes in the knowledge graph with the physical location of the original electronic archive, providing direct evidence for the authenticity and verifiability of knowledge. The evidence page number points to the specific source of the entity or relation, while the start-end page number range indicates the text range covered by the document attribute. When creating an entity node, the evidence page number associated with that entity in the semantic triple set can be used as an attribute of that entity node. Similarly, when creating a document attribute node, the corresponding start-end page number range from the archive metadata set can be used as an attribute of that document attribute node. Alternatively, instead of directly using it as a node attribute, special "tracing relationships" or "tracing nodes" can be created to connect entity nodes with nodes representing page numbers through these relationships.
[0104] Outputting serialized data containing document attribute nodes, entity nodes, connection edges, and source attributes as an electronic archival knowledge graph involves converting the constructed in-memory knowledge graph structure into a persistent format that can be stored, transmitted, and consumed by other systems. Serialized data ensures the integrity and interoperability of the knowledge graph, enabling it to be imported into graph databases, knowledge management systems, or used for further analysis and applications. This serialization can employ common graph data formats, such as RDF XML or Turtle formats, or JSON-LD formats, which effectively represent nodes, edges, and attributes. It can also be serialized into graph database-specific import formats, such as CSV files, or the export function of a graph database client can be used to directly generate graph data files suitable for backup or migration.
[0105] This application's solution addresses the issue of reduced knowledge point credibility caused by the lack of a page-level tracing mechanism during the construction and output of an electronic archival knowledge graph. Specifically, it first maps and transforms core fields from the archival metadata set into document attribute nodes in the knowledge graph. These nodes represent the original electronic archival file itself, carrying its macro-level attributes and providing a document-level entry point for subsequent knowledge association. Next, the system parses the semantic triple set, which contains entities, relationships, and their corresponding page numbers in the original document extracted from the archival text. Based on this, using globally unique identifiers as a benchmark, entity nodes representing specific concepts or things are created, and connections are established between these entity nodes according to the relationships defined in the triples, thus constructing a semantic network of the archival content. Crucially, to achieve page-level tracing, this solution uses the page numbers recorded in the semantic triple set as tracing attributes, attaching them to the corresponding entity nodes, allowing each entity node to directly trace its specific page number position in the original document. Simultaneously, the start and end page number ranges contained in the archival metadata set are used as traceability attributes and attached to the corresponding document attribute nodes, thereby establishing a correlation between the overall attributes of the document and its physical page number range in the original file. In this way, each knowledge point in the knowledge graph carries a clear page-level traceability tag, greatly enhancing the credibility and verifiability of the knowledge graph. Finally, the complete graph structure, including these document attribute nodes, entity nodes, connecting edges, and all traceability attributes, is output as serialized data, forming an electronic archival knowledge graph that is both semantically rich and highly traceable. This construction method allows any information in the knowledge graph to be traced back to the specific page number of the original archive, effectively solving the problems of knowledge fragmentation and insufficient credibility, and providing a solid foundation for the in-depth utilization and sharing of archival data.
[0106] For example, when constructing an electronic archive knowledge graph, the following steps can be followed. Assume we have already obtained the archive metadata set and semantic triple set through the aforementioned steps. First, for the archive metadata set, for example, it contains a core field "Document Title" as "2023 Annual Financial Report," and "Creation Date" as "2023-12-31," and the report's "Starting and Ending Page Number Range" is "1-100." The system will use information such as "2023 Annual Financial Report" and "2023-12-31" as attributes of the document attribute node "Annual Financial Report," and simultaneously use the starting and ending page number range "1-100" as a traceability attribute of this document attribute node, for example, named `pageRange`. Second, for the semantic triple set, assume it contains a triple of ("Company A," "Investment," "Project X," Evidence Page Number: [15, 16]), where "Company A" and "Project X" both have unique globally unique identifiers. The system first checks if an entity node with the globally unique identifier "Company A" exists in the knowledge graph. If not, a new entity node "Company A" is created. Similarly, an entity node is created for "Project X". Then, a connection edge of type "Investment" is created between entity nodes "Company A" and "Project X". Simultaneously, the evidence page number "[15, 16]" from the triple is used as a traceability attribute for entity nodes "Company A" and / or "Project X", for example, named `evidencePages`, or as an attribute of the "Investment" connection edge. Finally, once all document attribute nodes, entity nodes, connections, and their corresponding traceability attributes are constructed, the system can serialize the entire knowledge graph structure. For example, it can be exported as a JSON-LD file. In this JSON-LD file, each node and edge will contain its semantic information and explicit page-level traceability attributes. For example, the JSON representation of the entity node "Company A" will contain `"evidencePages": [15, 16]`, while the JSON representation of the document attribute node "Annual Financial Report" will contain `"pageRange": "1-100"`. Such serialized data can be imported into a graph database for storage and retrieval, or consumed by other applications, thereby enabling in-depth utilization and efficient traceability of archival knowledge.
[0107] Through the above technical solutions, this application effectively addresses the problems of lack of traceable evidence for knowledge points, reduced credibility of knowledge graphs, and fragmented knowledge when constructing electronic archival knowledge graphs. Specifically, it maps core fields in the archival metadata set to document attribute nodes in the graph, enabling a structured presentation of the macro-level information of the archives; it parses the semantic triple set and creates entity nodes and connecting edges, constructing a semantic association network of archival content. More importantly, by using the evidence page numbers in the semantic triple set and the start and end page number ranges in the archival metadata set as traceability attributes, and attaching them to the corresponding entity nodes and document attribute nodes respectively, it ensures that every entity, relation, and document attribute in the knowledge graph can be directly traced back to the specific page number position of the original electronic archive. This page-level traceability mechanism greatly improves the reliability and verifiability of information in the knowledge graph, allowing users to quickly locate evidence in the original document based on the traceability information, thereby enhancing trust in the extracted knowledge. Furthermore, this knowledge graph with page-level traceability tags not only facilitates knowledge integration and sharing, but also provides a solid foundation for subsequent knowledge verification, conflict resolution, and evidence-based intelligent question answering, effectively avoiding knowledge fragmentation and promoting the in-depth utilization of archival data.
[0108] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
[0109] Example 2 This embodiment is built upon embodiment 1, and the parts that are the same as in embodiment 1 will not be described in detail here. Figure 2 As shown, this application provides an intelligent data governance system for electronic archives based on a large model.
[0110] The system, used to implement the large-model-based intelligent data governance method for electronic archives, includes data processing units connected in sequence: The file access and normalization unit is used to acquire the original electronic archive files, identify their file types and perform format normalization processing to generate a standard file to be processed containing the original layout information. The page-by-page structured parsing unit is used to perform page-by-page parsing and coordinate mapping on the standard file to be processed, generating a page-level structured data object containing the page text content and the corresponding original position coordinates. The semantic extraction unit is used to input the page-level structured data object into a preset archive metadata prompt template, perform semantic extraction using a large language model, and generate an archive metadata set containing file attributes and content block information. The entity relationship intelligent extraction unit is used to input the page-level structured data object into the entity relationship prompt template based on the pre-built archive knowledge ontology, and use the large language model to extract knowledge to generate a set of semantic triples containing entities, relationships and evidence page numbers. The knowledge graph fusion and generation unit is used to perform entity alignment and fusion of the archive metadata set and the semantic triple set according to data association rules, and to construct and output an electronic archive knowledge graph with page-level traceability tags.
[0111] Example 3 Figure 3 This is a schematic diagram of a computer-readable storage medium structure provided in one embodiment of this application. Figure 3 The diagram illustrates a computer-readable storage medium 600 according to one embodiment of this application. The computer-readable storage medium 600 stores computer-readable instructions. When executed by a processor, the computer-readable instructions can perform the large-scale electronic archive intelligent data governance method according to an embodiment of this application, as described with reference to the above figures. The storage medium 600 includes, but is not limited to, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and cache memory. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
[0112] Furthermore, according to the embodiments of this application, the process described in the above-referenced flowchart can be implemented as a computer software program. For example, this application provides a non-transitory machine-readable storage medium storing machine-readable instructions that can be executed by a processor to perform instructions corresponding to the method steps provided in this application. For example: acquiring the original electronic archive file, identifying its file type and performing format normalization processing to generate a standard file to be processed containing the original page layout information; performing page-by-page parsing and coordinate mapping on the standard file to generate a page-level structured data object containing page text content and corresponding original position coordinates; inputting the page-level structured data object into a preset archive metadata prompt template, performing semantic extraction using a large language model to generate an archive metadata set containing file attributes and content block information; based on a pre-built archive knowledge ontology, inputting the page-level structured data object into an entity relation prompt template, performing knowledge extraction using a large language model to generate a semantic triple set containing entities, relations, and evidence page numbers; and according to data association rules, performing entity alignment and fusion on the archive metadata set and the semantic triple set to construct and output an electronic archive knowledge graph with page-level traceability tags. When the computer program is executed by the central processing unit (CPU), it performs the functions defined in the method of this application.
[0113] The methods, apparatus, and devices of this application may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the method is for illustrative purposes only, and the steps of the method of this application are not limited to the order specifically described above, unless otherwise specifically stated. Furthermore, in some embodiments, this application may also be implemented as a program recorded on a recording medium, the program including machine-readable instructions for implementing the method according to this application. Thus, this application also covers recording media storing programs for performing the method according to this application.
[0114] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0115] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.< / page>
Claims
1. A method for intelligent data governance of electronic archives based on a large model, characterized in that, Step 1: Obtain the original electronic archive file, identify its file type and perform format normalization processing to generate a standard file to be processed containing the original layout information; Step 2: Perform page-by-page parsing and coordinate mapping on the standard file to be processed to generate a page-level structured data object containing the page text content and the corresponding original position coordinates; Step 3: Input the page-level structured data object into the preset archive metadata prompt template, use the large language model to perform semantic extraction, and generate an archive metadata set containing file attributes and content block information; Step 4: Based on the pre-built archival knowledge ontology, input the page-level structured data object into the entity relation prompt template, use the large language model to extract knowledge, and generate a set of semantic triples containing entities, relations and evidence page numbers; Step 5: Based on the data association rules, perform entity alignment and fusion on the set of archival metadata and the set of semantic triples, and construct and output an electronic archival knowledge graph with page-level traceability tags; The specific process of generating a semantic triple set containing entities, relations, and evidence page numbers includes: loading the archival knowledge ontology, which defines entity type constraints and legal relation types between entities; injecting the content of the page-level structured data object and the archival knowledge ontology into the entity relation prompt template; the large language model identifying entity mentions in the text based on the entity relation prompt template and determining the relationship between entities based on the legal relation types; assigning a globally unique identifier to each identified entity and merging different textual representations of the same entity into the mention list under the globally unique identifier; and constructing a quadruple structure containing subject, relation, object, and source page number to form the semantic triple set. The construction and output of the electronic archive knowledge graph with page-level traceability tags specifically includes: mapping the core fields in the archive metadata set to document attribute nodes in the graph; parsing the semantic triple set, creating entity nodes based on the globally unique identifier, and creating connecting edges based on the relationship; using the evidence page number in the semantic triple set and the start and end page number range in the archive metadata set as traceability attributes, and attaching them to the corresponding entity nodes and document attribute nodes respectively; and outputting serialized data containing the document attribute nodes, entity nodes, connecting edges, and traceability attributes as the electronic archive knowledge graph.
2. The method as described in claim 1, characterized in that, The specific process of generating a standard file to be processed containing the original layout information includes: detecting the header information of the original electronic archive file; if the original electronic archive file is a streaming document, converting it into a PDF file with a fixed layout as the standard file to be processed; if the original electronic archive file is an image document, calling an optical character recognition engine to perform text recognition on it, retaining the coordinate information of the recognized text blocks in the original image, and encapsulating the recognition result into the standard file to be processed.
3. The method as described in claim 1, characterized in that, The page-level structured data object adopts a hierarchical JSON data structure, which includes at least: a status field to identify the parsing status of the standard file to be processed; a page number index field to mark the physical page number of the currently processed content in the standard file to be processed; and a text unit list to store all text fragments within the physical page number and their corresponding two-dimensional coordinate positions in reading order. The page-level structured data object serves as the sole content input source for the large language model in subsequent steps, ensuring that all subsequently generated knowledge data can be traced back to the two-dimensional coordinate positions.
4. The method as described in claim 1, characterized in that, The archive metadata prompt template includes system instructions and user instructions; the system instructions define the roles of the large language model and the output specifications of the archive metadata set; the user instructions embed the text content of the page-level structured data object; The step of using a large language model for semantic extraction to generate an archive metadata set containing file attributes and content chunk information specifically includes: the large language model extracting file-level metadata from the page-level structured data object according to the system instructions; The large language model identifies natural semantic paragraphs in the page-level structured data object, assigns a unique logical block number to each semantic paragraph, and generates corresponding block metadata; the file-level metadata is combined with the block metadata to form the archive metadata set.
5. The method as described in claim 4, characterized in that, The block metadata includes at least the logical block number, the start and end page range of the logical block in the standard file to be processed, the core summary, and the topic tags; the start and end page range is used to establish an index from knowledge points to physical pages in the electronic archive knowledge graph.
6. The method as described in claim 5, characterized in that, The source page number is directly inherited from the page number index field in the page-level structured data object and is used as source evidence to verify the authenticity of the semantic triple.
7. A large-scale model-based intelligent data governance system for electronic archives, used to perform the method as described in any one of claims 1 to 6, characterized in that, The system includes data processing units connected in sequence: The file access and normalization unit is used to acquire the original electronic archive files, identify their file types and perform format normalization processing to generate a standard file to be processed containing the original layout information. The page-by-page structured parsing unit is used to perform page-by-page parsing and coordinate mapping on the standard file to be processed, generating a page-level structured data object containing the page text content and the corresponding original position coordinates. The semantic extraction unit is used to input the page-level structured data object into a preset archive metadata prompt template, perform semantic extraction using a large language model, and generate an archive metadata set containing file attributes and content block information. The entity relationship intelligent extraction unit is used to input the page-level structured data object into the entity relationship prompt template based on the pre-built archive knowledge ontology, and use the large language model to extract knowledge to generate a set of semantic triples containing entities, relationships and evidence page numbers. The knowledge graph fusion and generation unit is used to perform entity alignment and fusion of the archive metadata set and the semantic triple set according to data association rules, and to construct and output an electronic archive knowledge graph with page-level traceability tags.
8. A computer program adapted to be loaded by a processor to perform the steps of the large-model-based intelligent data governance method for electronic archives as described in any one of claims 1-6.