A method for automatically generating a manual attestation file for a document management system
By constructing an ISO standard knowledge graph and a multi-level rule verification system, combined with dynamic prompt word generation and blockchain evidence storage technology, the problems of standard compliance and organizational relevance in the generation of ISO standard evidentiary documents have been solved, achieving efficient and reliable document generation and audit support.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA THREE GORGES CORPORATION
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies make it difficult to guarantee the standard compliance and organizational relevance of content when generating ISO standard certification documents, and the generation process lacks traceability, resulting in insufficient evidentiary value of the documents and difficulties in review.
We construct a knowledge graph based on ISO standards, match specific instance information from the organization's internal corpus through multi-level retrieval and fusion technology, design a dynamic prompt word generation mechanism, establish a multi-level rule verification system, and use blockchain technology to ensure the traceability of generated content.
It improves the automation, compliance, and evidentiary value of evidentiary documents, ensuring that documents strictly comply with standard clauses and reflect the actual situation of the organization, and achieving the reliability and traceability of the generated content.
Smart Images

Figure CN122173452A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of document management technology, and in particular relates to a method for automatically generating document management system manual certification documents. Background Technology
[0002] With the increasing demand for standardized organizational management, Managed Systems for Records (MSR) has become a crucial tool for enterprises to ensure compliance throughout the entire document lifecycle. The ISO 30300 series of standards published by the International Organization for Standardization, including ISO 30300, ISO 30301, and ISO 30302, provides an authoritative framework for the establishment, implementation, and improvement of MSR. During system certification or internal audits, organizations need to provide supporting documentation, such as specific evidence in sections like "Leadership Role" and "Resource Support," to demonstrate that their management activities comply with the standard requirements. Traditionally, these supporting documents were entirely written manually by managers or consultants based on standard clauses and the organization's specific circumstances. However, with the expansion of organizations and frequent standard updates, this manual writing method has gradually revealed problems such as inefficiency, high costs, and inconsistent quality. In particular, it is difficult to ensure that the generated content strictly adheres to standard clauses while fully incorporating the organization's unique context, often resulting in supporting documents that are merely formalities and fail to truly reflect the operation of the management system.
[0003] To address the aforementioned issues, existing technologies attempt to assist document generation through information technology. For example, some organizations use template-based document generation tools, which pre-design general templates for each chapter, allowing staff to fill in specific information before outputting the document. While these tools improve writing efficiency to some extent, the fixed template content makes it difficult to adapt to the diverse needs of different organizations, and compliance with standard clauses relies on manual judgment.
[0004] In recent years, with the development of artificial intelligence technology, especially the breakthroughs made by Large Language Models (LLM) in the field of natural language processing, attempts have emerged to use AI to generate documents. For example, some general AI writing assistants can generate text based on simple prompts input by users, but these texts lack domain expertise and cannot ensure that the content accurately matches ISO standards.
[0005] Furthermore, some professional document generation systems have introduced Retrieval-Augmented Generation (RAG) technology, which assists AI generation by retrieving relevant knowledge bases. However, these knowledge bases typically only contain standard text or general information, failing to consider the personalized background information within an organization. Consequently, the generated content still suffers from strong generalization but weak targeting. A few solutions have also attempted to validate the generated content using business rules, but these rules are mostly simple keyword matching, making it difficult to cover the complex logical relationships of standard clauses.
[0006] The aforementioned methods in the existing technology all have obvious shortcomings: First, content generated using templates or generic AI lacks in-depth analysis of ISO standard clauses, failing to guarantee that the evidentiary documents for each chapter meet the specific requirements of the standard, especially chapters such as "leadership role" and "resource support," which require demonstrating the organization's actual measures. Second, there is a lack of effective utilization of internal organizational background documents such as job responsibilities and resource allocation records, resulting in a disconnect between the generated content and the actual situation, leading to insufficient evidentiary value of the evidentiary documents. Third, the verification rules are too simplistic, only checking format or keywords, and failing to comprehensively verify the logical consistency and standard compliance of the generated content. Fourth, the generation process is untraceable, making it difficult to meet the requirements for document source and authenticity during audits.
[0007] Therefore, based on the aforementioned widespread technical problems, it is necessary to propose a method for automatically generating evidentiary documents for document management system manuals to solve these problems. Summary of the Invention
[0008] The technical problem this invention aims to solve is to provide a method for automatically generating evidentiary documents for a document management system manual. This method involves constructing a knowledge graph based on ISO standards to achieve structured parsing of standard clauses; using multi-level retrieval and fusion technology to accurately match specific instance information from the organization's internal corpus; designing a dynamic prompt word generation mechanism to deeply integrate standard requirements with the organization's actual information; establishing a multi-level rule verification system to perform layer-by-layer verification of the generated content's grammar, standard compliance, and organizational adaptability, and introducing feedback loops to optimize the generation quality; and utilizing blockchain technology to store key corpora to ensure the traceability and immutability of the generated content, thereby fundamentally improving the automation level, compliance, and evidentiary validity of evidentiary document generation.
[0009] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows: A method for automatically generating supporting documentation for a document management system manual includes the following steps: Obtain the chapter requirements for generating evidentiary documents from the document management system manual. The chapter requirements include one or more chapters from the document management system manual, such as "Leadership Role", "Resource Support", and "Document Control". Based on the chapter requirements, relevant knowledge content and standard requirements are retrieved from a pre-built corpus, which includes ISO 30300 series standard texts, background documents from pilot units, document management system manuals, and historically generated sample evidence documents. The search results are input into the large language model to generate preliminary evidentiary document content; The generated content is validated and optimized using predefined business rules; Output compliant supporting documentation.
[0010] Preferably, before generating the initial content, the method also includes designing structured prompts based on the chapter requirements. The structured prompts include the following elements: standard basis, chapter theme, specific measures and requirements, and explanation of the actual organizational situation.
[0011] Preferably, the design of the structured prompt words further includes: Analyze the ISO standard clauses corresponding to the chapter requirements, extract the core entities and their relationships, and construct a chapter-entity-relationship knowledge graph; Retrieve specific instance information that matches the core entity from the corpus of the pilot units; Based on knowledge graphs and specific instance information, dynamic prompt words are automatically assembled and generated. These dynamic prompt words contain a fusion of standard requirements and actual organizational information.
[0012] Preferably, when constructing the chapter-entity-relationship knowledge graph, a triple extraction method based on a large language model is used to construct the knowledge graph, including entity and relation extraction based on a large language model. The specific method is as follows: Document parsing and segmentation: The ISO 30300 series standard text is segmented according to the chapter structure to obtain multiple sub-documents; Preset semantic block definitions: Based on the characteristics of the document management system, the following semantic block types are preset for sub-documents: requirement semantic blocks, definition semantic blocks, and explanation semantic blocks; Entity extraction: Extracting core entity words from target semantic blocks using a large language model; Relation extraction: Extracting words that relate entities to each other from target semantic blocks using a large language model; The core entities include one or more of the following: responsible entities, action items, object objects, and resource types. The relationships include one or more of the following: responsibility relationship, inclusion relationship, constraint relationship, and purpose relationship.
[0013] Preferably, constructing the chapter-entity-relationship knowledge graph also includes constructing the chapter-entity-relationship knowledge graph, specifically as follows: Based on the extracted entities and relationships, a structured knowledge graph for document management system is constructed. The graph structure is designed as [Chapter Node] --(Contains)-->[Entity Node] --(Relationship)-->[Entity Node]. It also includes a dynamic update mechanism for the knowledge graph, including incremental learning: when a new ISO standard interpretation document is added or the standard is updated, a new round of entity relationship extraction is automatically triggered; Association strength labeling: Based on the co-occurrence frequency and semantic similarity of entities in standard clauses, a weight value between 0 and 1 is assigned to the relationship between entities. The higher the weight, the stronger the association. When a new standard interpretation document is added, the weight value is automatically updated.
[0014] Preferably, specific instance information matching the core entity is retrieved from the corpus of the pilot unit, specifically including: Based on the core entities in the knowledge graph, a three-level progressive retrieval is performed on the corpus of the pilot units to obtain specific instance information matching the core entities; the three-level progressive retrieval includes: Level 1: Perform precise string matching on the corpus using core entity names as keywords; Level 2: Based on a pre-built entity alias library, expand the matching of common aliases and variant expressions of core entities; Level 3: Convert core entity names into semantic vectors, calculate similarity with semantic vectors in the corpus, perform keyword matching using the BM25 algorithm, and merge the two search results using a reciprocal ranking fusion method, selecting the top M candidate instances with the highest similarity. ; Where r(d) is the rank of document d in the search results. It is a constant; The large language model is used to determine the matching degree of the retrieved candidate instances, and instances that are highly related to the core entity are selected, and specific information elements in the instances are extracted.
[0015] Preferably, dynamic prompts are automatically generated based on knowledge graphs and specific instance information. These dynamic prompts contain a fusion of standard requirements and actual organizational information, specifically including: Based on a pre-defined three-layer prompt word template architecture, the standard requirements descriptions in the knowledge graph are integrated with the filtered instance information to automatically assemble and generate dynamic prompt words; the three-layer prompt word template architecture includes: The first layer is the basic template layer, which includes character settings, generated task descriptions, and output format requirements; The second layer is the dynamic parameter layer, which automatically extracts the chapter number, chapter name, and key points of standard requirements from the knowledge graph as filling parameters; The third layer is the instance information layer, which categorizes the filtered instance information according to core entities and formats it into a specific description of the actual organizational situation. By using template engines like Jinja2 or FreeMarker, the three layers of information can be dynamically populated into a preset prompt template to generate structured prompts that include standard basis, actual organizational measures, and evidence.
[0016] Preferably, the generated content is validated and optimized using predefined business rules, further including the construction of a multi-layered rule validation system: Establish a rule validation system comprising three progressively higher levels, wherein: The first layer is the syntax and format rules layer, which includes date format validation rules based on regular expressions, terminology consistency validation rules based on a predefined vocabulary, and paragraph structure integrity validation rules. The second layer is the standard compliance rule layer, which contains machine-readable logical rules based on the clauses of the ISO 30300 series of standards. The logical rules are expressed in the form of "condition-conclusion", and each rule corresponds to the core requirements of a standard clause. The third layer is the organizational adaptability rules layer, which includes responsibility matching verification rules, resource matching verification rules, and process continuity verification rules generated based on the background documents of the pilot units.
[0017] Preferably, the generated content is validated and optimized using predefined business rules, further including the standard clause rule-based transformation: Each clause of the ISO 30300 series standards is analyzed, and mandatory requirement terms and essential elements are extracted. Natural language clauses are then converted into structured, machine-readable logical rules using a rule template. The rule template includes: Existence rule template: Used to check whether the generated content contains a specific element, in the format "IF Chapter = Target Chapter THEN Must Contain Element A AND Element B"; Consistency rule template: Used to verify whether the statements in the generated content are consistent with the standard requirements. The format is "IF statement X appears THEN statement X should match the standard definition Y"; Relational rule template: Used to validate the logical relationship between multiple elements. The format is "IF element A exists AND element B THEN element A and element B should satisfy relation R".
[0018] Preferably, the generated content is validated and optimized using predefined business rules, further including progressively layered validation execution: The generated content is validated layer by layer in the order of syntax and format rules, standard compliance rules, and organizational adaptability rules. Specifically, the standard compliance rules can only be validated after the syntax and format rules layer has passed the validation. The organizational adaptability rules can only be validated after the standard compliance rules layer has passed the validation. If any level of validation fails, all non-compliance items at the current level are recorded, and a structured problem feedback list is generated.
[0019] Preferably, the generated content is validated and optimized using predefined business rules, further including a feedback loop trigger. When the generated content fails the validation at any rule level, a feedback loop mechanism is triggered, including: The problem feedback list is categorized according to rule hierarchy, and the missing information type or error type corresponding to each non-compliant item is extracted; based on the missing information type, relevant knowledge content is retrieved again from the corpus; the retrieved supplementary knowledge, together with the original generated content and the problem feedback list, is packaged into correction prompt words and returned to the large language model; a maximum feedback loop count threshold is set, and if the loop count reaches the threshold and all validations are still not passed, the system is transferred to the manual processing queue and a validation report is generated.
[0020] Preferably, the generated content is validated and optimized using predefined business rules, further including dynamic updates to the rule base: Record the types of non-compliance items that are frequently triggered during each verification process and their corresponding correction schemes. Regularly optimize and update the rule base, including adding new rules, adjusting rule weights, and merging similar rules.
[0021] Preferably, the construction of the corpus further includes: Hash values are calculated on organizational background documents, historically generated evidentiary documents, and management system manuals in the corpus to generate unique data fingerprints; Upload the data fingerprint to the blockchain platform to obtain authoritative timestamps and evidence records; When a large language model uses key corpora to generate evidentiary documents, reference annotations are automatically added to the generated documents. These reference annotations contain the data fingerprints and evidence storage information.
[0022] Preferably, after outputting the required supporting documentation, a feedback and fine-tuning step is also included: Obtain the revisions made by the reviewers to the generated documents; The difference between the generated content and the revised content is identified through a comparison algorithm; The discrepancy data is fed back to the prompt word generation step or the corpus retrieval step to optimize subsequent generation strategies.
[0023] Preferably, the feedback and fine-tuning step further includes: Based on the aforementioned difference data, the weighting of search results can be adjusted so that corpora with a high degree of matching with review preferences receive higher weight in subsequent searches; or based on the aforementioned difference data, the assembly logic of dynamic prompts can be optimized so that the generated content is closer to the organization's specific expression habits.
[0024] Preferably, a document management system manual certification document automatic generation system is provided for executing the document management system manual certification document automatic generation method, the system comprising: The input module is used to obtain the chapter requirements of the document management system manual to be generated from the user input. The chapter requirements include one or more chapters of the document management system manual from "Leadership Role", "Resource Support" and "Document Control". The corpus construction and management module is used to build and maintain a corpus containing ISO 30300 series standard texts, background documents from pilot units, document management system manuals, and historically generated evidence document samples. The knowledge graph construction module is used to parse the ISO 30300 series standard texts, extract core entities and their relationships through a large language model, and construct a chapter-entity-relationship knowledge graph. The core entities include one or more of the following: responsible subject, action item, object, and resource type. The relationships include one or more of the following: responsibility relationship, inclusion relationship, constraint relationship, and purpose relationship. The instance information retrieval module is used to perform a three-level progressive retrieval on the corpus of pilot units based on the core entities in the knowledge graph to obtain specific instance information that matches the core entities. The three-level progressive retrieval includes precise string matching, entity alias expansion matching, and hybrid retrieval combining semantic vectors and the BM25 algorithm. The dynamic prompt word generation module is used to automatically assemble and generate structured dynamic prompt words that include standard requirements descriptions in the knowledge graph and retrieved instance information based on a preset three-layer prompt word template architecture. The content generation module is used to call the large language model and generate preliminary evidentiary document content based on dynamic prompt words; The multi-level validation module is used to validate and optimize the generated content according to predefined business rules. The multi-level validation module includes a syntax and format validation sub-module, a standard compliance validation sub-module, and an organization adaptability validation sub-module, and performs the validation layer by layer in sequence. When the validation fails, a feedback loop is triggered. The feedback loop module is used to encapsulate the problem feedback list and the knowledge retrieved for supplementary retrieval into correction prompts when the generated content fails the validation, and then return it to the content generation module for supplementary generation or correction. The output module is used to generate and output the final proof documents that meet the requirements; The blockchain evidence storage module is used to calculate the hash value of key files imported into the corpus and upload them to the blockchain platform to obtain evidence storage records. When outputting evidentiary documents, it automatically adds reference labels containing data fingerprints and evidence storage information. The feedback learning module is used to obtain the revisions made by the reviewers to the generated documents. It identifies the differences between the generated content and the revised content through a comparison algorithm and feeds the difference data back to the dynamic prompt word generation module or the instance information retrieval module to optimize subsequent generation strategies.
[0025] Preferably, a computer device includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the document management system manual certification document automatic generation method.
[0026] Preferably, a computer-readable storage medium stores computer instructions that cause a computer to execute the document management system manual certification document automatic generation method.
[0027] The beneficial effects of this invention are as follows: 1. This invention effectively solves the problems of lack of standard compliance and organizational specificity in generated content in existing technologies by constructing a knowledge graph based on ISO standards and combining it with a dynamic prompt word generation mechanism. Specifically, the knowledge graph structures the core entities and their relationships in ISO standard clauses, making the standard requirements no longer a difficult-to-parse natural language text, but a logical network that can be understood and manipulated by machines. On this basis, dynamic prompt words deeply integrate the standard requirements with specific instance information retrieved from the organization's internal corpus. The generated evidentiary documents not only strictly comply with the standard clauses, but also fully reflect the organization's actual management measures and personalized characteristics, avoiding empty content caused by template-based writing, and significantly improving the evidentiary strength and persuasiveness of the documents.
[0028] 2. The multi-level rule verification system and feedback loop mechanism introduced in this invention fundamentally improve the quality and reliability of generated content. By establishing three progressively layered rule layers—syntactic format, standard compliance, and organizational adaptability—comprehensive verification of the generated content is achieved, ensuring that the file meets requirements in terms of format specifications, standard compliance, and actual matching. When verification fails, the feedback loop mechanism automatically analyzes missing information and triggers supplementary retrieval and correction generation, forming a "generated" result. check The "optimization" loop continuously iterates and improves output quality. At the same time, the dynamic update mechanism of the rule base enables the validation capabilities to evolve with actual use, solving the problem that traditional static rules are difficult to adapt to standard updates and organizational changes, and ensuring the long-term effectiveness of the system.
[0029] 3. This invention achieves the immutability of generated files and the continuous optimization capability of the system through blockchain evidence storage technology and a feedback learning module. Hash values are calculated for key corpora and uploaded to the blockchain, ensuring that every piece of evidence in the generated file is traceable to its original storage, greatly enhancing the document's credibility in external review or legal proceedings. Furthermore, the feedback learning module analyzes the revisions made by reviewers to the generated files, transforming human experience into learnable difference data for the system. This optimizes search weights and prompt word assembly logic, enabling the system to gradually adapt to the organization's specific expression habits and review preferences. This achieves continuous improvement through human-machine collaboration, significantly reducing the workload of subsequent manual review and improving overall efficiency. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of the process of the present invention; Figure 2 This is a schematic diagram of the system architecture of the present invention; Figure 3 This is a schematic diagram of a computer device in an embodiment of the present invention. Detailed Implementation
[0031] Example 1: like Figure 1 As shown, a method for automatically generating evidentiary documents for a document management system manual includes the following steps: Obtain the chapter requirements for generating evidentiary documents from the document management system manual. The chapter requirements include one or more chapters from the document management system manual, such as "Leadership Role", "Resource Support", and "Document Control". Based on the chapter requirements, relevant knowledge content and standard requirements are retrieved from a pre-built corpus, which includes ISO 30300 series standard texts, background documents from pilot units, document management system manuals, and historically generated sample evidence documents. The search results are input into the large language model to generate preliminary evidentiary document content; The generated content is validated and optimized using predefined business rules; Output compliant supporting documentation.
[0032] Preferably, before generating the initial content, the method also includes designing structured prompts based on the chapter requirements. The structured prompts include the following elements: standard basis, chapter theme, specific measures and requirements, and explanation of the actual organizational situation.
[0033] Preferably, the design of the structured prompt words further includes: Analyze the ISO standard clauses corresponding to the chapter requirements, extract the core entities and their relationships, and construct a chapter-entity-relationship knowledge graph; Retrieve specific instance information that matches the core entity from the corpus of the pilot units; Based on knowledge graphs and specific instance information, dynamic prompt words are automatically assembled and generated. These dynamic prompt words contain a fusion of standard requirements and actual organizational information.
[0034] Preferably, when constructing the chapter-entity-relationship knowledge graph, a triple extraction method based on a large language model is used to construct the knowledge graph, including entity and relation extraction based on a large language model. The specific method is as follows: Document parsing and segmentation: The ISO 30300 series standard text is segmented according to the chapter structure to obtain multiple sub-documents; Preset semantic block definitions: Based on the characteristics of the document management system, the following semantic block types are preset for sub-documents: requirement semantic blocks, definition semantic blocks, and explanation semantic blocks; Entity extraction: Extracting core entity words from target semantic blocks using a large language model; Relation extraction: Extracting words that relate entities to each other from target semantic blocks using a large language model; The core entities include one or more of the following: responsible entities, action items, object objects, and resource types. The relationships include one or more of the following: responsibility relationship, inclusion relationship, constraint relationship, and purpose relationship.
[0035] Preferably, constructing the chapter-entity-relationship knowledge graph also includes constructing the chapter-entity-relationship knowledge graph, specifically as follows: Based on the extracted entities and relationships, a structured knowledge graph for document management system is constructed. The graph structure is designed as [Chapter Node] --(Contains)-->[Entity Node] --(Relationship)-->[Entity Node]. It also includes a dynamic update mechanism for the knowledge graph, including incremental learning: when a new ISO standard interpretation document is added or the standard is updated, a new round of entity relationship extraction is automatically triggered; Association strength labeling: Based on the co-occurrence frequency and semantic similarity of entities in standard clauses, a weight value between 0 and 1 is assigned to the relationship between entities. The higher the weight, the stronger the association. When a new standard interpretation document is added, the weight value is automatically updated.
[0036] Preferably, specific instance information matching the core entity is retrieved from the corpus of the pilot unit, specifically including: Based on the core entities in the knowledge graph, a three-level progressive retrieval is performed on the corpus of the pilot units to obtain specific instance information matching the core entities; the three-level progressive retrieval includes: Level 1: Perform precise string matching on the corpus using core entity names as keywords; Level 2: Based on a pre-built entity alias library, expand the matching of common aliases and variant expressions of core entities; Level 3: Convert core entity names into semantic vectors, calculate similarity with semantic vectors in the corpus, perform keyword matching using the BM25 algorithm, and merge the two search results using a reciprocal ranking fusion method, selecting the top M candidate instances with the highest similarity. ; Where r(d) is the rank of document d in the search results. It is a constant; The large language model is used to determine the matching degree of the retrieved candidate instances, and instances that are highly related to the core entity are selected, and specific information elements in the instances are extracted.
[0037] Preferably, dynamic prompts are automatically generated based on knowledge graphs and specific instance information. These dynamic prompts contain a fusion of standard requirements and actual organizational information, specifically including: Based on a pre-defined three-layer prompt word template architecture, the standard requirements descriptions in the knowledge graph are integrated with the filtered instance information to automatically assemble and generate dynamic prompt words; the three-layer prompt word template architecture includes: The first layer is the basic template layer, which includes character settings, generated task descriptions, and output format requirements; The second layer is the dynamic parameter layer, which automatically extracts the chapter number, chapter name, and key points of standard requirements from the knowledge graph as filling parameters; The third layer is the instance information layer, which categorizes the filtered instance information according to core entities and formats it into a specific description of the actual organizational situation. By using template engines like Jinja2 or FreeMarker, the three layers of information can be dynamically populated into a preset prompt template to generate structured prompts that include standard basis, actual organizational measures, and evidence.
[0038] Preferably, the generated content is validated and optimized using predefined business rules, further including the construction of a multi-layered rule validation system: Establish a rule validation system comprising three progressively higher levels, wherein: The first layer is the syntax and format rules layer, which includes date format validation rules based on regular expressions, terminology consistency validation rules based on a predefined vocabulary, and paragraph structure integrity validation rules. The second layer is the standard compliance rule layer, which contains machine-readable logical rules based on the clauses of the ISO 30300 series of standards. The logical rules are expressed in the form of "condition-conclusion", and each rule corresponds to the core requirements of a standard clause. The third layer is the organizational adaptability rules layer, which includes responsibility matching verification rules, resource matching verification rules, and process continuity verification rules generated based on the background documents of the pilot units.
[0039] Preferably, the generated content is validated and optimized using predefined business rules, further including the standard clause rule-based transformation: Each clause of the ISO 30300 series standards is analyzed, and mandatory requirement terms and essential elements are extracted. Natural language clauses are then converted into structured, machine-readable logical rules using a rule template. The rule template includes: Existence rule template: Used to check whether the generated content contains a specific element, in the format "IF Chapter = Target Chapter THEN Must Contain Element A AND Element B"; Consistency rule template: Used to verify whether the statements in the generated content are consistent with the standard requirements. The format is "IF statement X appears THEN statement X should match the standard definition Y"; Relational rule template: Used to validate the logical relationship between multiple elements. The format is "IF element A exists AND element B THEN element A and element B should satisfy relation R".
[0040] Preferably, the generated content is validated and optimized using predefined business rules, further including progressively layered validation execution: The generated content is validated layer by layer in the order of syntax and format rules, standard compliance rules, and organizational adaptability rules. Specifically, the standard compliance rules can only be validated after the syntax and format rules layer has passed the validation. The organizational adaptability rules can only be validated after the standard compliance rules layer has passed the validation. If any level of validation fails, all non-compliance items at the current level are recorded, and a structured problem feedback list is generated.
[0041] Preferably, the generated content is validated and optimized using predefined business rules, further including a feedback loop trigger. When the generated content fails the validation at any rule level, a feedback loop mechanism is triggered, including: The problem feedback list is categorized according to rule hierarchy, and the missing information type or error type corresponding to each non-compliant item is extracted; based on the missing information type, relevant knowledge content is retrieved again from the corpus; the retrieved supplementary knowledge, together with the original generated content and the problem feedback list, is packaged into correction prompt words and returned to the large language model; a maximum feedback loop count threshold is set, and if the loop count reaches the threshold and all validations are still not passed, the system is transferred to the manual processing queue and a validation report is generated.
[0042] Preferably, the generated content is validated and optimized using predefined business rules, further including dynamic updates to the rule base: Record the types of non-compliance items that are frequently triggered during each verification process and their corresponding correction schemes. Regularly optimize and update the rule base, including adding new rules, adjusting rule weights, and merging similar rules.
[0043] Preferably, the construction of the corpus further includes: Hash values are calculated on organizational background documents, historically generated evidentiary documents, and management system manuals in the corpus to generate unique data fingerprints; Upload the data fingerprint to the blockchain platform to obtain authoritative timestamps and evidence records; When a large language model uses key corpora to generate evidentiary documents, reference annotations are automatically added to the generated documents. These reference annotations contain the data fingerprints and evidence storage information.
[0044] Preferably, after outputting the required supporting documentation, a feedback and fine-tuning step is also included: Obtain the revisions made by the reviewers to the generated documents; The difference between the generated content and the revised content is identified through a comparison algorithm; The discrepancy data is fed back to the prompt word generation step or the corpus retrieval step to optimize subsequent generation strategies.
[0045] Furthermore, in the comparison algorithm identification, the Levenshtein distance algorithm is used to identify the differences between the revisions made by the reviewer to the generated document and the original generated content, specifically including: Step 1: Text preprocessing, standardizing both the original generated content and the revised content: Step 2: Construct the dynamic programming matrix Let the original content string be A, with a length of m; let the revised content string be B, with a length of n; construct a (m+1)×(n+1) matrix D, and initialize D[i][0]= i, D[0][j]= j; Step 3: Backtrack to obtain the sequence of edit operations: Backtracking from D[m][n] to D[0][0], record the operation type at each step: If D[i][j] comes from D[i-1][j]+1, then it is a deletion operation, and "delete A[i]" is recorded; If D[i][j] comes from D[i][j-1]+1, then it is an insertion operation, and "insertion B[j]" is recorded; If D[i][j] comes from D[i-1][j-1] + cost, and cost = 1, then it is a replacement operation, and we record "replace A[i] with B[j]"; If cost=0, then the characters are the same, and no operation is performed; Step 4: Generate structured variance data The backtracked sequence of edit operations is converted into a structured difference record.
[0046] Preferably, the feedback and fine-tuning step further includes: Based on the aforementioned difference data, the weighting of search results can be adjusted so that corpora with a high degree of matching with review preferences receive higher weight in subsequent searches; or based on the aforementioned difference data, the assembly logic of dynamic prompts can be optimized so that the generated content is closer to the organization's specific expression habits.
[0047] Example 2: like Figure 2 As shown, this embodiment provides an automatic generation system for document management system manual certification documents, used to execute the aforementioned automatic generation method for document management system manual certification documents. The system includes: The input module is used to obtain the chapter requirements of the document management system manual to be generated from the user input. The chapter requirements include one or more chapters of the document management system manual from "Leadership Role", "Resource Support" and "Document Control".
[0048] The input module employs a web-based front-end interface, which can be built as a single-page application using Vue.js or React frameworks. After accessing the system through a browser, the input module presents a chapter-based tree structure of the document management system manual. Tree nodes include preset chapters such as "Leadership Role," "Resource Support," and "File Control." Users can select the chapters for which they wish to generate supporting documentation by checking boxes or clicking, supporting single or multiple selections. After selection, clicking the "Generate" button encapsulates the user-selected chapter information into a JSON data packet and sends it to the backend server via a RESTful API. The backend uses the Spring Boot framework to receive requests, parse the chapter requirements, and pass them to the next module. To accommodate the personalized needs of different organizations, the input module also allows administrators to customize chapter names and hierarchical structures; these custom configurations are stored in a system configuration table in a MySQL database.
[0049] The corpus construction and management module is used to build and maintain a corpus containing ISO 30300 series standard texts, background documents from pilot units, document management system manuals, and historically generated samples of supporting documentation.
[0050] The corpus construction and management module employs a distributed storage architecture. ISO 30300 series standard texts (including English and Chinese versions of ISO 30300, ISO 30301, and ISO 30302) are uploaded in PDF or Word format. They are first extracted into plain text using document parsing tools such as Apache Tika or Aspose.Words, and then automatically segmented and stored according to chapter structure. Background documents from pilot units (such as organizational charts, job descriptions, and permission allocation tables) are also parsed and stored in the corpus. Document management system manuals and historically generated supporting documents are standardized according to a unified format. All text content is stored in an Elasticsearch cluster for subsequent full-text search and BM25 algorithm support; simultaneously, semantic vectors generated from text fragments after vectorization model processing are stored in the FAISS vector index library, forming a dual-path storage architecture. Metadata for the corpus, such as document name, upload time, document type, and affiliated unit, is stored in a MySQL database for easy management and traceability. The corpus supports incremental updates. When a new document is added, the system automatically triggers the parsing, vectorization, and index building process.
[0051] The knowledge graph construction module is used to parse the ISO 30300 series standard texts, extract core entities and their relationships through a large language model, and construct a chapter-entity-relationship knowledge graph. The core entities include one or more of the following: responsible subject, action item, object, and resource type. The relationships include one or more of the following: responsibility relationship, inclusion relationship, constraint relationship, and purpose relationship.
[0052] The knowledge graph construction module is developed using Python, and its core utilizes the Transformers library to call pre-trained language models. Specifically, it first reads chapter texts from the ISO 30300 series standards from the corpus, and then uses the trained BERT model to fine-tune entity and relation extraction on the annotated ISO standard corpus.
[0053] Entity types include responsible entities such as "top manager," action items such as "management review," object objects such as "document management system," and resource types such as "human resources." Relationship types include responsibility relationships, inclusion relationships, constraint relationships, and purpose relationships. The extracted triples (entity-relationship-entity) are stored in the Neo4j graph database, forming a chapter-entity-relationship knowledge graph. Node attributes in the graph database include entity name, entity type, and source chapter number; edge attributes include relationship type and association strength weight. Association strength weight is calculated using a multi-dimensional fusion method: based on co-occurrence frequency, TF-IDF, and mutual information. After the knowledge graph is constructed, it provides services externally through the Neo4j REST API or Bolt protocol for other modules to query and call.
[0054] The instance information retrieval module is used to perform a three-level progressive retrieval on the corpus of pilot units based on the core entities in the knowledge graph, and to obtain specific instance information that matches the core entities. The three-level progressive retrieval includes precise string matching, entity alias expansion matching, and hybrid retrieval combining semantic vectors and the BM25 algorithm.
[0055] The instance information retrieval module is developed in Java and integrates the Elasticsearch and FAISS client SDKs. Upon receiving a list of core entities from the knowledge graph, this module performs a three-level progressive retrieval: Level 1 exact match: Using Elasticsearch's term query, perform exact string matching on the core entity name, retrieving the original content of the text fragment from the corpus.
[0056] Second-level name extension matching: Based on a pre-built entity alias library stored in Redis, all aliases of core entities are retrieved, such as aliases for "top manager" including "CEO", "Chief Executive Officer", "General Manager", etc. Exact matching is performed on each alias, and the results are merged and deduplicated.
[0057] Level 3 Hybrid Retrieval: Two-way retrieval is executed in parallel. The first path inputs the core entity names into a vectorization model, using the same fine-tuned BERT model as the corpus vectorization model to generate query vectors, and performs an approximate nearest neighbor retrieval in the FAISS index. The second path uses the core entity names as query terms and performs a BM25 retrieval in Elasticsearch. After the results from both retrieval paths are returned in ranking lists, a fusion score is calculated using the inverse sorting and RRF algorithm, and Top-K candidate instances are selected.
[0058] After the retrieval is complete, a large language model, such as DeepSeek or ChatGLM deployed on an internal server, is invoked to determine the matching degree of the candidate instances. The invocation of the large language model is encapsulated through an HTTP interface, and the prompt word templates are managed using the LangChain framework. After the model returns a "match / non-match" result, the matching instances are filtered out, and specific information elements such as name, job title, date, and amount are extracted for use by subsequent modules.
[0059] The dynamic prompt word generation module is used to automatically assemble and generate structured dynamic prompt words that include standard requirements descriptions in the knowledge graph and retrieved instance information based on a preset three-layer prompt word template architecture.
[0060] The dynamic prompt generation module is implemented using Python's Jinja2 template engine. It features a preset three-tier template architecture. Basic template layer: Stored in the templates / base directory, it contains role settings, such as "You are a professional document management system consultant", generation task descriptions, such as "Please generate supporting documents based on the following information" and output format requirements, such as "Adopt a formal document style and state the items separately".
[0061] Dynamic parameter layer: Extracts the current chapter's number, name, and key standard requirements from the knowledge graph, formats it into JSON, and injects it into the template. For example, for the "Leadership Role" chapter, it extracts the clause text of Chapter 5 of ISO 30301 and parses it into a list of key points.
[0062] Instance Information Layer: The instance information filtered by the instance information retrieval module is classified by entity type and formatted into natural language descriptions, such as "The highest manager of your unit is General Manager Wang Jianguo, with a term of 3 years, in charge of document management." It is also injected into the template in JSON format.
[0063] The template engine dynamically populates the three layers of information into a preset prompt template, generating a complete dynamic prompt. The generated prompt is also written to a log database for subsequent analysis and optimization.
[0064] The content generation module invokes a large language model to generate preliminary evidentiary document content based on dynamic prompts. This module calls a large language model service deployed on the intranet. In this embodiment, the DeepSeek model is used, deployed for high-performance inference via vLLM or TensorRT-LLM, providing an HTTP service interface compatible with OpenAI API formats. The dynamic prompt generation module sends the assembled prompts to the model service via an HTTP POST request, setting the temperature parameter to 0.3 and the maximum generation length to 2048 tokens. The generated content returned by the model, after initial cleaning, is passed to the next module as preliminary evidentiary document content. To handle high concurrency scenarios, the content generation module uses a RabbitMQ message queue for asynchronous processing, allowing users to monitor the generation progress in real time.
[0065] The multi-level validation module is used to validate and optimize the generated content according to predefined business rules. The multi-level validation module includes a syntax and format validation sub-module, a standard compliance validation sub-module, and an organization adaptability validation sub-module, and performs the validation layer by layer in sequence. When the validation fails, a feedback loop is triggered.
[0066] Furthermore, the multi-level validation module is implemented using the rule engine Drools, and the validation rules are written as DRL files. The rule base is organized in three levels: Syntax and Formatting Rules Layer: Rules are implemented using the Java regular expression library; for example, date format validation rules: The rule "Date format validation" is used when $content: String(this matches "). \\d{4}year\\d{1,2}month\\d{1,2}day. ") then / / Record non-compliant items via else / /
[0067] Standard compliance rule layer: Transforms ISO standard clauses into Drools rules; for example, existence rules: The rule "Leadership role must include management review" is set when $content: String(section== "Leadership role"&&!this.contains("Management review")) then insert(new non-compliance("Missing management review description")).
[0068] Organizational Adaptability Rule Layer: Rules are extracted from the background documents of pilot units; for example, responsibility matching rules. The rule "Top Manager Responsibilities Match" is used when $content: String(this contains "Top Manager")&¬(this contains anyOf(Job Responsibilities List)) then insert(new Non-compliantItem("Top Manager Responsibilities Description Does Not Match Job Responsibilities Document")).
[0069] During validation, the process proceeds layer by layer in the order of syntax and format, standard compliance, and organizational adaptability. Each layer of validation must pass before proceeding to the next; if a layer fails, the non-compliance is recorded and a structured issue feedback list is generated. The issue feedback list is stored in JSON format and includes fields such as rule level, rule name, non-compliance description, and missing information type.
[0070] The feedback loop module is used to encapsulate the problem feedback list and supplementary search knowledge into correction prompts when the generated content fails the validation, and then return it to the content generation module for supplementary generation or correction.
[0071] The feedback loop module receives the problem feedback list generated by the verification module and performs the following steps: Extract the missing information type for each non-compliance item from the issue feedback list, such as "missing specific time of management review".
[0072] Based on the type of missing information, supplementary search terms are constructed, and the instance information retrieval module is invoked to re-retrieve relevant knowledge content.
[0073] The retrieved supplementary knowledge, along with the original generated content and the issue feedback list, are repackaged according to the preset correction prompt word template to generate correction prompt words.
[0074] Call the content generation module to supplement or correct the content.
[0075] The maximum number of loops is set to 3. After each loop, the verification module is called again for verification. If the verification still fails after 3 loops, the currently generated content, the problem feedback list, and the loop record are packaged, transferred to the manual processing queue, and the reviewers are notified via email.
[0076] After manual processing, the revisions made by the reviewers can be used as input for the feedback and learning module.
[0077] The feedback loop module is based on Apache Camel for process orchestration, and supports flexible configuration of the number of loops and the timeout time for each stage.
[0078] The output module generates and outputs the final proof documents that meet the requirements. It supports exporting the generated proof documents to multiple formats. Specifically, it uses the Apache POI library to generate Word documents and the iText library to generate PDF documents, while also supporting Markdown and HTML formats. The generated files are named by chapter, stored in the MinIO object store, and a download link is returned to the front-end user. The output module also automatically adds the generation time, version number, and blockchain evidence information to the end of the file. Relevant information about the output files, such as file name, generation time, file size, and storage path, is recorded in a generation record table in a MySQL database for easy traceability and management.
[0079] The blockchain evidence storage module is used to calculate the hash value of key files imported into the corpus and upload them to the blockchain platform to obtain evidence storage records. When outputting evidentiary documents, it automatically adds reference labels containing data fingerprints and evidence storage information.
[0080] The blockchain evidence storage module is implemented based on the FISCO BCOS or Hyperledger Fabric consortium blockchain platform. The specific process is as follows: When key files, such as organizational background files and historical proof files, are imported into the corpus, the system uses Java's MessageDigest class to calculate the SHA-256 hash value of the file, obtaining a 64-bit hexadecimal string as a data fingerprint.
[0081] The data fingerprint, along with information such as file name, upload time, and operator, is assembled into a transaction and submitted to the consortium blockchain node via the blockchain SDK. Upon successful transaction, the blockchain returns the transaction hash and block height, from which the block time is extracted as the authoritative timestamp.
[0082] The evidence information, including data fingerprints, transaction hashes, block heights, and timestamps, is stored in the evidence record table of the MySQL database.
[0083] When the content generation module references this file to generate supporting documentation, the output module automatically adds a reference mark at the end of the file, in the format: "This statement is based on the 'Job Description (2025 Edition)', which was stored on the blockchain on March 15, 2025, with a transaction hash of 0x7a8f9e... and a data fingerprint of SHA-256:3b4c5d...".
[0084] Auditors can use the verification function provided by the system to input the document content or data fingerprint and query the evidence records on the blockchain to verify the authenticity and integrity of the document.
[0085] The feedback learning module is used to obtain the revisions made by the reviewers to the generated documents. It identifies the differences between the generated content and the revised content through a comparison algorithm and feeds the difference data back to the dynamic prompt word generation module or the instance information retrieval module to optimize subsequent generation strategies.
[0086] The feedback learning module employs an incremental learning mechanism, continuously optimizing the system based on revision data from reviewers. The specific implementation is as follows: The reviewers revise the Word document downloaded from the output module, and then upload the document back to the system after making the changes.
[0087] The system uses Apache POI to parse Word documents, extract revisions, and uses text comparison algorithms, such as the Google Diff Match Patch library, to identify differences between the generated and revised content. Difference types include additions, deletions, and replacements.
[0088] The discrepancy data is stored in a structured format, including information such as the original content fragment, the revised content fragment, the type of discrepancy, the chapter it belongs to, the reviser, and the revision time.
[0089] Regularly initiate feedback learning tasks and analyze the accumulated discrepancies: For entities or expressions that are frequently revised, adjust the retrieval weight of the instance information retrieval module so that high-quality corpora related to the entity can obtain higher rankings in subsequent searches. For the revision expressions commonly used by auditors, extract their language patterns to optimize the assembly logic of dynamic prompts. For example, if auditors often change "leadership" to "company board of directors", then add a description of the specific title to the prompts. For rules that frequently trigger validation, analyze whether the rules are too strict or too lenient, and adjust the rule thresholds or weights accordingly.
[0090] The learning results are stored in the form of configuration files or model parameters, which are automatically loaded by the system on the next startup to achieve continuous optimization.
[0091] Preferably, a computer device includes a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the document management system manual certification document automatic generation method.
[0092] Preferably, a computer-readable storage medium stores computer instructions that cause a computer to execute the document management system manual certification document automatic generation method.
[0093] Example 3: In the process of constructing the chapter-entity-relationship knowledge graph, this embodiment further assigns weights to the relationships between entities to quantify the closeness of the relationship between entities; the weight value ranges from 0 to 1, and the higher the value, the closer the relationship between the two entities in the ISO standard context, and the higher the priority will be given in the subsequent dynamic prompt word generation and retrieval ranking.
[0094] The correlation strength is calculated using a multi-dimensional fusion method, which includes the following steps: First dimension: Calculation of association strength based on co-occurrence frequency: This study analyzes the frequency of co-occurrence of two entities within the same semantic unit in the texts of the ISO 30300 series standards, including ISO 30300, ISO 30301, ISO 30302, and their accompanying interpretation documents. The definition of a semantic unit can be flexibly set according to the structure of the standard text, including the same chapter, paragraph, or sentence. The formula for calculating the co-occurrence frequency of any two entities A and B is as follows: ; in, This indicates the number of times entity A and entity B co-occur in the same semantic unit. and These represent the total number of times entity A and entity B appear in the entire standard corpus, respectively. This indicator reflects the frequency with which the two entities are mentioned together in the standard text. The higher the co-occurrence frequency, the closer the relationship between the two in the standard context. Second dimension: Entity importance weighting based on TF-IDF: To avoid excessive influence of high-frequency generalized entities such as "organization" and "document" on the association strength, this embodiment introduces the TF-IDF term frequency-inverse document frequency (TF-IDF) algorithm to weight the importance of entities; for each entity E, its IDF value is calculated as follows: ; Where N is the total number of documents in the standard corpus, the number of sub-documents after chapter division, and nE is the number of documents containing entity E; the higher the IDF value, the more domain-specific entity E is, and the higher its contribution weight in the association relationship; the IDF value is used as an adjustment coefficient to weight and correct the co-occurrence frequency: ; Third dimension: Enhanced association strength based on mutual information: To further explore the nonlinear relationships between entities, this embodiment uses mutual information (MI) to measure the degree of statistical dependency between two entities; the formula for calculating mutual information is: ; Wherein, P(A=1) represents the probability of entity A appearing, P(A=0) represents the probability of entity A not appearing, and the joint probability P(A=1,B=1) represents the probability of entities A and B appearing together; the larger the mutual information value, the stronger the correlation between the two entities, even if they do not always co-occur directly in the same semantic unit, there may be a potential association; after normalizing the mutual information value to the 0-1 interval, it is used as an enhancing factor for the association strength; Fourth Dimension: Comprehensive Weighting and Dynamic Updates The calculation results from the above three dimensions are weighted and fused to obtain the final association strength weight: ; in, and These are weighting coefficients, which can be preset based on the characteristics of the standard text, with optimal selection. =0.6, =0.4, which can also be learned from manually labeled relational data through machine learning methods; The normalized mutual information value; The calculated weight values are stored in the relation edge attributes of the knowledge graph, serving as a quantitative indicator of the degree of connection between entities.
[0095] When a new ISO standard interpretation document is added or a standard is updated, the system automatically triggers a recalculation of the association strength. The newly added corpus will participate in the statistical calculations of the above dimensions, and the updated weight values reflect the entity association relationships in the latest standard context in real time. For example, when ISO releases new technical errata or implementation guidelines, the reinterpretation of certain concepts may lead to changes in the co-occurrence patterns between entities. The system automatically adjusts the association weights through an incremental update mechanism to ensure that the knowledge graph always remains consistent with the requirements of the latest standards.
[0096] Example 4: When retrieving specific instance information matching the core entity from the corpus of pilot units, this embodiment adopts a three-level progressive retrieval strategy, with the third level being the core dual-path hybrid retrieval mechanism. This mechanism combines semantic vector similarity calculation with the BM25 keyword matching algorithm, and effectively merges the two heterogeneous retrieval results through a reciprocal ranking fusion method, thereby ensuring retrieval accuracy while taking into account semantic understanding ability and keyword matching accuracy; the semantic vector similarity calculation is as follows: The core of semantic vector similarity calculation is to map natural language text into a high-dimensional semantic space and measure the semantic similarity between texts by measuring the distance between vectors. The specific implementation steps in this embodiment are as follows: 1. Selection and fine-tuning of the vectorization model: This embodiment uses a pre-trained language model based on the Transformer architecture, such as BERT, RoBERTa, or its lightweight variants, as the base encoder. To better adapt the model to the semantic expression of the document management system domain, the model is fine-tuned using domain corpus consisting of ISO30300 series standard texts, background files of pilot units, and historical evidentiary documents. The fine-tuning objective is the "sentence semantic similarity calculation" task. Through contrastive learning or triple loss function, semantically similar texts are placed closer in the vector space, while semantically unrelated texts are placed further apart.
[0097] 2. Corpus vectorization preprocessing: All documents in the corpus of the pilot units are segmented into sentences or segments. The number of tokens is generally set to a maximum of 512, depending on the document length. Each text segment is input into the fine-tuned vectorization model to obtain the corresponding semantic vector. Taking BERT-base as an example, each vector has a dimension of 768 or higher and is subjected to L2 normalization so that the vector magnitude is 1, which facilitates the subsequent cosine similarity calculation.
[0098] The original content of all text fragments, along with their semantic vectors, are stored together in a vector database, such as FAISS, Milvus, or Elasticsearch's dense vector index, forming a vector index that can be retrieved quickly.
[0099] 3. Vectorization and similarity retrieval of core entity names: When retrieving instance information matching the core entity, the core entity name, such as "top manager," is first input into the same vectorized model to obtain the query vector q. Then, an approximate nearest neighbor (ANN) search is performed in the vector database to find the top M text segments with the highest cosine similarity to the query vector q. The formula for calculating cosine similarity is: ; The search results return a unique identifier, the original text content, and a similarity score for each candidate text fragment, ranging from 0 to 1, with scores closer to 1 indicating greater semantic similarity.
[0100] The advantage of this search method is that it can capture synonyms and semantically related concepts of the query terms. For example, when searching for "top manager", it may recall text fragments containing semantically similar words such as "CEO", "general manager" and "leadership", even if these texts do not contain the exact string "top manager".
[0101] Example 5: BM25 is a classic information retrieval algorithm based on term frequency and inverse document frequency, exhibiting stable performance in precise keyword matching and term weight calculation. This embodiment provides a specific flowchart of the BM25 keyword matching algorithm, as follows: 1. Constructing the inverted index: All documents in the pilot unit's corpus were segmented into words to construct a standard inverted index. Chinese-oriented word segmentation tools such as jieba and HanLP were used, along with a custom domain dictionary to ensure that ISO standard terms and internal organizational vocabulary, such as "management review," "document control," and "job responsibilities," were correctly segmented. The inverted index records which documents each term appears in, as well as its frequency (TF) within those documents.
[0102] 2. BM25 score calculation: Given a core entity name as the query term Q, the BM25 algorithm calculates the relevance score between each candidate document d and Q; the classic formula for BM25 is: ; in, To retrieve the i-th term in Q; For terms Frequency of occurrence in document d; The length of document d is the number of terms. The average length of documents in the corpus; b are adjustment parameters, generally taken as k1∈[1.2,2.0], b=0.75; The inverse document frequency is calculated using the following formula: ; Where N is the total number of documents. For included terms The number of documents.
[0103] The BM25 algorithm returns a relevance score for each candidate document. A higher score indicates a higher degree of matching between the document and the query term at the keyword level. The advantage of this retrieval method lies in accurately capturing the frequency and distribution of query terms in documents. It plays an irreplaceable role in scenarios that require strict matching of terms, such as specific definitions in ISO standards.
[0104] Example 6: Semantic vector retrieval and BM25 retrieval evaluate the relevance of documents to queries from two dimensions: semantic understanding and keyword matching, respectively. Their scoring scales and distribution characteristics differ, making direct comparison or weighted averaging impossible. Therefore, this embodiment employs the Reciprocal Rank Fusion (RRF) method to effectively merge the results of these two heterogeneous retrieval methods. The core idea of RRF is to calculate the fusion score based on the document's ranking position in different retrieval methods, rather than directly using the original score, thereby avoiding the problem of inconsistent scoring scales.
[0105] 1. Formula for calculating RRF fusion score: For any candidate document d, its score RRF(d) in the final fusion result is defined as: ; Where r(d) is the ranking of document d in the search results, starting from 1, with the value decreasing as the ranking increases; R is the set of retrieval methods involved in the fusion, in this scheme R={semantic vector retrieval, BM25 retrieval}; kk is an empirical constant used to smooth the scores of documents with lower rankings, generally k=60, which has been verified as a robust value in relevant studies, and can also be fine-tuned according to the actual application scenario.
[0106] The meaning of this formula is: for each retrieval method, the contribution score of a document is inversely proportional to its ranking. The higher the ranking, i.e., the smaller the r value, the larger the contribution score 1 / (k+r). By adding the contribution scores of the two methods, the final fusion score of the document is obtained.
[0107] 2. Execution steps of RRF fusion: Step 1: Obtain the ranking list: Perform semantic vector retrieval and BM25 retrieval respectively, and return the top-N candidate documents for each. N can be set according to system performance, for example, N=100, and record the ranking number of each candidate document in this retrieval.
[0108] Step 2: Construct a candidate document set: Merge all candidate documents returned by the two retrievals, remove duplicates, and obtain the candidate document set D to be scored.
[0109] Step 3: Calculate the fusion score: For each document d in set D, obtain its ranking rsem(d) in semantic vector retrieval. If d is not in the Top-N of semantic retrieval, set rsem(d) = N+1 or a large constant, and its ranking rbm25(d) in BM25 retrieval. Similarly, if it is not in the Top-N, set it to a large value and substitute it into the RRF formula to calculate: ; Step 4: Sorting and Extraction: Sort the candidate document set D according to the RRF score from high to low, and take the top K documents with the highest scores as the final candidate instances of the third-level retrieval, and enter the subsequent large language model matching degree judgment stage.
[0110] The advantages of RRF in this solution are as follows: The application of the inverse ranking fusion method in this solution has the following technical effects: First, it solves the problem of incomparability between semantic scores and BM25 scores, eliminating the need for complex score normalization. Second, it is insensitive to abnormal scores from retrieval methods; even if a particular retrieval method gives an extremely high score due to abnormal document length or word frequency distribution, it will not dominate the fusion result because RRF only depends on ranking. Third, it can effectively improve the robustness and recall of retrieval. For example, when a synonym of a core entity is not captured by BM25 but is successfully recalled by semantic retrieval, the document can still obtain a better RRF score through the higher ranking of semantic retrieval, and vice versa. Through RRF fusion, this invention can comprehensively utilize the advantages of semantic understanding and keyword matching to ensure that the instance information retrieved from the corpus is both semantically related to the core entity and meets the requirement of precise matching at the keyword level, providing high-quality instance materials for subsequent dynamic prompt word generation.
[0111] The top K candidate instances obtained after RRF fusion and ranking still need further screening to ensure a high degree of relevance to the core entity. This embodiment utilizes a large language model to perform the final matching judgment. Specifically, the core entity name, entity type (e.g., responsible party, action item), and the original text content of the candidate instances are organized into structured prompts, input into the large language model, and the model is required to output a binary judgment of "match / not match," with a brief explanation of the judgment criteria. For example: Input prompt: "Please determine whether the following candidate instances match the core entity 'Top Manager'."
[0112] Core Entity Type: Responsible Entity Candidate example content: 'Company CEO Zhang San regularly chairs management review meetings to review the operation of the document management system.' Please output 'match' or 'not match', and briefly explain why. Based on its semantic understanding capabilities, the large language model can identify the equivalence between "CEO" and "top manager," as well as the correlation between "chairing a management review meeting" and leadership role, thereby outputting a "match" and its rationale. This step filters out low-relevance noise instances that still exist after RRF fusion, ensuring that the instance information ultimately used for dynamic cue word assembly is highly accurate and representative.
[0113] Example 7: To verify the effectiveness and advancement of the technical solution of this invention, a hydropower company was selected as a pilot unit, and the test scenario was generated from the supporting documents in the "Leadership Role" section of its document management system manual. This company possesses complete organizational structure documents, job descriptions, management review records, and other background information; its implementation of the ISO 30300 series standards has entered its third year, making it typical and representative.
[0114] The experiment selected 100 historically generated "leadership role" supporting documents as test samples, and three senior document management system auditors conducted blind testing and scoring of the generation results. The comparison objects included: manually written documents, a general RAG solution based solely on retrieval and LLM generation, existing technology A - a template-based document generation system, existing technology B - a basic AI writing tool, and the solution of this invention; the average of three tests was used for each indicator, and the performance comparison data is shown in Table 1 below: Table 1: Performance Comparison Data;
[0115] The standard clause compliance rate refers to the proportion of generated content that covers the requirements of the corresponding clauses of ISO 30301; the organizational information matching degree refers to the degree of consistency between the specific personnel, positions, resources and other information involved in the generated content and the actual background documents of the enterprise; the evidence traceability score includes factors such as the clarity of information source labeling and the completeness of evidence storage.
[0116] As can be seen from the data in the table above, the solution of this invention demonstrates significant advantages in all core indicators. In terms of generation efficiency, each document takes an average of only 8 minutes, which is 30 times faster than the 240 minutes required for manual writing and 55% faster than the general RAG solution. This is thanks to the dynamic prompt word generation mechanism guided by the knowledge graph, which greatly reduces the number of trial and error attempts in model reasoning.
[0117] In terms of content quality, the standard clause compliance rate of this invention reaches 98.2%, significantly better than the 78.3% of the general RAG solution and the 85.1% of the prior art A. This advantage stems from the introduction of a multi-layered rule verification system: the syntax and format layer ensures basic standardization, the standard compliance layer verifies clause coverage through machine-readable logical rules, and the organizational adaptability layer ensures that the generated content matches the actual background of the enterprise. In particular, the organizational information matching degree reaches 96.8%, far exceeding the 52.6% of the general RAG solution, proving that the three-level progressive retrieval strategy can accurately locate specific instance information in the enterprise's internal corpus, effectively solving the persistent problem of "generalized generated content and disconnect from reality" in traditional solutions.
[0118] Evidence traceability is another outstanding feature of this invention. Its 9.7 rating far surpasses other solutions, thanks to the application of blockchain-based evidence storage technology—each cited fragment can be traced back to the data fingerprint and authoritative timestamp of the original evidence document, making the generated document not just a document, but also verifiable digital evidence. The post-review revision rate is only 8.1%, meaning the generated content is highly close to the reviewers' final requirements, significantly reducing the burden of manual review.
[0119] In summary, this invention, through the organic integration of knowledge graph construction, three-level progressive retrieval, dynamic prompt word generation, multi-level rule verification, and blockchain notarization, constructs an intelligent evidentiary document generation system that "understands standards, knows enterprises, is verifiable, and can learn," achieving a comprehensive surpassing of existing technologies in terms of efficiency, quality, and credibility.
[0120] Example 8: like Figure 3 As shown, this embodiment of the invention also provides a computer device, which includes one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory for displaying graphical information of a GUI on external input / output devices, such as display devices coupled to the interfaces. In some alternative embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations, for example, as a server array, a group of blade servers, or a multiprocessor system. Figure 3 Take a processor 10 as an example.
[0121] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0122] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0123] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0124] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0125] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0126] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded via a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the processes shown in the above embodiments are implemented.
Claims
1. A method for automatically generating evidentiary documents for a document management system manual, characterized in that, Includes the following steps: Obtain the chapter requirements for generating evidentiary documents from the document management system manual. The chapter requirements include one or more chapters from the document management system manual, namely "Leadership Role", "Resource Support", and "Document Control". Based on the chapter requirements, relevant knowledge content and standard requirements are retrieved from a pre-built corpus, which includes ISO 30300 series standard texts, background documents from pilot units, document management system manuals, and historically generated sample evidence documents. The search results are input into the large language model to generate preliminary evidentiary document content; The generated content is validated and optimized using predefined business rules; Output compliant supporting documentation.
2. The method for automatically generating evidentiary documents for a document management system manual according to claim 1, characterized in that, Before generating the initial content, the process also includes designing structured prompts based on the chapter requirements. These structured prompts include the following elements: standard basis, chapter theme, specific measures and requirements, and explanation of the organization's actual situation.
3. The method for automatically generating evidentiary documents for a document management system manual according to claim 2, characterized in that, The design of the structured prompt words further includes: Analyze the ISO standard clauses corresponding to the chapter requirements, extract the core entities and their relationships, and construct a chapter-entity-relationship knowledge graph; Retrieve specific instance information that matches the core entity from the corpus of the pilot units; Based on knowledge graphs and specific instance information, dynamic prompt words are automatically assembled and generated. These dynamic prompt words contain a fusion of standard requirements and actual organizational information.
4. The method for automatically generating evidentiary documents for a document management system manual according to claim 3, characterized in that, When constructing the chapter-entity-relationship knowledge graph, a triple extraction method based on a large language model is used to construct the knowledge graph, including entity and relation extraction based on a large language model. The specific method is as follows: Document parsing and segmentation: The ISO 30300 series standard text is segmented according to the chapter structure to obtain multiple sub-documents; Preset semantic block definitions: Based on the characteristics of the document management system, the following semantic block types are preset for sub-documents: requirement semantic blocks, definition semantic blocks, and explanation semantic blocks; Entity extraction: Extracting core entity words from target semantic blocks using a large language model; Relation extraction: Extracting words that relate entities to each other from target semantic blocks using a large language model; The core entities include one or more of the following: responsible entities, action items, object objects, and resource types. The relationships include one or more of the following: responsibility relationship, inclusion relationship, constraint relationship, and purpose relationship.
5. The method for automatically generating evidentiary documents for a document management system manual according to claim 4, characterized in that, Constructing a chapter-entity-relationship knowledge graph also includes constructing the chapter-entity-relationship knowledge graph itself, the specific method of which is as follows: Based on the extracted entities and relationships, a structured knowledge graph for document management system is constructed. The graph structure is designed as [Chapter Node] --(Contains)-->[Entity Node] --(Relationship)-->[Entity Node]. It also includes a dynamic update mechanism for the knowledge graph, including incremental learning: when a new ISO standard interpretation document is added or the standard is updated, a new round of entity relationship extraction is automatically triggered; Association strength labeling: Based on the co-occurrence frequency and semantic similarity of entities in standard clauses, a weight value between 0 and 1 is assigned to the relationship between entities. The higher the weight, the stronger the association. When a new standard interpretation document is added, the weight value is automatically updated.
6. The method for automatically generating evidentiary documents for a document management system manual according to claim 5, characterized in that, Retrieve specific instance information matching the core entity from the corpus of the pilot units, specifically including: Based on the core entities in the knowledge graph, a three-level progressive retrieval is performed on the corpus of the pilot units to obtain specific instance information matching the core entities; the three-level progressive retrieval includes: Level 1: Perform precise string matching on the corpus using core entity names as keywords; Level 2: Based on a pre-built entity alias library, expand the matching of common aliases and variant expressions of core entities; Level 3: Convert core entity names into semantic vectors, calculate similarity with semantic vectors in the corpus, perform keyword matching using the BM25 algorithm, and merge the two search results using a reciprocal ranking fusion method, selecting the top M candidate instances with the highest similarity. ; Where r(d) is the rank of document d in the search results. It is a constant; The large language model is used to determine the matching degree of the retrieved candidate instances, and instances that are highly related to the core entity are selected, and specific information elements in the instances are extracted.
7. The method for automatically generating evidentiary documents for a document management system manual according to claim 6, characterized in that, Based on knowledge graphs and specific instance information, dynamic prompts are automatically generated. These dynamic prompts contain a fusion of standard requirements and actual organizational information, specifically including: Based on a pre-defined three-layer prompt word template architecture, the standard requirements descriptions in the knowledge graph are integrated with the filtered instance information to automatically assemble and generate dynamic prompt words; the three-layer prompt word template architecture includes: The first layer is the basic template layer, which includes character settings, generated task descriptions, and output format requirements; The second layer is the dynamic parameter layer, which automatically extracts the chapter number, chapter name, and key points of standard requirements from the knowledge graph as filling parameters; The third layer is the instance information layer, which categorizes the filtered instance information according to core entities and formats it into a specific description of the actual organizational situation. The template engine dynamically populates the three layers of information into a preset prompt template, generating a structured prompt that includes the standard basis, the organization's actual measures, and evidence.
8. The method for automatically generating evidentiary documents for a document management system manual according to claim 1, characterized in that, The generated content is validated and optimized using predefined business rules, and this further includes building a multi-layered rule validation system. Establish a rule validation system comprising three progressively higher levels, wherein: The first layer is the syntax and format rules layer, which includes date format validation rules based on regular expressions, terminology consistency validation rules based on a predefined vocabulary, and paragraph structure integrity validation rules. The second layer is the standard compliance rule layer, which contains machine-readable logical rules based on the clauses of the ISO 30300 series of standards. The logical rules are expressed in the form of "condition-conclusion", and each rule corresponds to the core requirements of a standard clause. The third layer is the organizational adaptability rules layer, which includes responsibility matching verification rules, resource matching verification rules, and process continuity verification rules generated based on the background documents of the pilot units.
9. The method for automatically generating evidentiary documents for a document management system manual according to claim 8, characterized in that, The generated content is validated and optimized using predefined business rules, including the formalization of standard terms into rules. Each clause of the ISO 30300 series standards is analyzed, and mandatory requirement terms and essential elements are extracted. Natural language clauses are then converted into structured, machine-readable logical rules using a rule template. The rule template includes: Existence rule template: Used to check whether the generated content contains a specific element, in the format "IF Chapter = Target Chapter THEN Must Contain Element A AND Element B"; Consistency rule template: Used to verify whether the statements in the generated content are consistent with the standard requirements. The format is "IF statement X appears THEN statement X should match the standard definition Y". Relational rule template: Used to validate the logical relationship between multiple elements. The format is "IF element A AND element B exist THEN element A and element B should satisfy relation R".
10. The method for automatically generating evidentiary documents for a document management system manual according to claim 9, characterized in that, The generated content is validated and optimized using predefined business rules, further including progressively layered validation execution. The generated content is validated layer by layer in the order of syntax and format rules, standard compliance rules, and organizational adaptability rules. Specifically, the standard compliance rules can only be validated after the syntax and format rules layer has passed the validation. The organizational adaptability rules can only be validated after the standard compliance rules layer has passed the validation. If any level of validation fails, all non-compliance items at the current level are recorded, and a structured problem feedback list is generated.
11. The method for automatically generating evidentiary documents for a document management system manual according to claim 10, characterized in that, The generated content is validated and optimized using predefined business rules, and further includes a feedback loop trigger. When the generated content fails the validation at any rule level, the feedback loop mechanism is triggered, including: The problem feedback list is categorized according to rule hierarchy, and the missing information type or error type corresponding to each non-compliant item is extracted; based on the missing information type, relevant knowledge content is retrieved again from the corpus; the retrieved supplementary knowledge, together with the original generated content and the problem feedback list, is packaged into correction prompt words and returned to the large language model; a maximum feedback loop count threshold is set, and if the loop count reaches the threshold and all validations are still not passed, the system is transferred to the manual processing queue and a validation report is generated.
12. The method for automatically generating evidentiary documents for a document management system manual according to claim 11, characterized in that, The generated content is validated and optimized using predefined business rules, and this includes dynamic updates to the rule base. Record the types of non-compliance items that are frequently triggered during each verification process and their corresponding correction schemes. Regularly optimize and update the rule base, including adding new rules, adjusting rule weights, and merging similar rules.
13. The method for automatically generating evidentiary documents for a document management system manual according to claim 1, characterized in that, The construction of the corpus further includes: Hash values are calculated on organizational background documents, historically generated evidentiary documents, and management system manuals in the corpus to generate unique data fingerprints; Upload the data fingerprint to the blockchain platform to obtain authoritative timestamps and evidence records; When a large language model uses key corpora to generate evidentiary documents, reference annotations are automatically added to the generated documents. These reference annotations contain the data fingerprints and evidence storage information.
14. The method for automatically generating evidentiary documents for a document management system manual according to claim 1, characterized in that, After outputting compliant supporting documentation, the process also includes feedback and fine-tuning steps: Obtain the revisions made by the reviewers to the generated documents; The difference between the generated content and the revised content is identified through a comparison algorithm; The discrepancy data is fed back to the prompt word generation step or the corpus retrieval step to optimize subsequent generation strategies.
15. The method for automatically generating evidentiary documents for a document management system manual according to claim 14, characterized in that, The feedback and fine-tuning process further includes: Based on the aforementioned difference data, the weighting of search results can be adjusted so that corpora with a high degree of matching with review preferences receive higher weight in subsequent searches; or based on the aforementioned difference data, the assembly logic of dynamic prompts can be optimized so that the generated content is closer to the organization's specific expression habits.
16. A system for automatically generating supporting documentation for a document management system manual, used to execute the method for automatically generating supporting documentation for a document management system manual as described in any one of claims 1-15, characterized in that, The system includes: The input module is used to obtain the chapter requirements of the document management system manual to be generated from the user input. The chapter requirements include one or more chapters of the document management system manual from "Leadership Role", "Resource Support" and "Document Control". The corpus construction and management module is used to build and maintain a corpus containing ISO 30300 series standard texts, background documents from pilot units, document management system manuals, and historically generated evidence document samples. The knowledge graph construction module is used to parse the ISO 30300 series standard texts, extract core entities and their relationships through a large language model, and construct a chapter-entity-relationship knowledge graph. The core entities include one or more of the following: responsible subject, action item, object, and resource type. The relationships include one or more of the following: responsibility relationship, inclusion relationship, constraint relationship, and purpose relationship. The instance information retrieval module is used to perform a three-level progressive retrieval on the corpus of pilot units based on the core entities in the knowledge graph to obtain specific instance information that matches the core entities. The three-level progressive retrieval includes precise string matching, entity alias expansion matching, and hybrid retrieval combining semantic vectors and the BM25 algorithm. The dynamic prompt word generation module is used to automatically assemble and generate structured dynamic prompt words that include standard requirements descriptions in the knowledge graph and retrieved instance information based on a preset three-layer prompt word template architecture. The content generation module is used to call the large language model and generate preliminary evidentiary document content based on dynamic prompt words; The multi-level validation module is used to validate and optimize the generated content according to predefined business rules. The multi-level validation module includes a syntax and format validation sub-module, a standard compliance validation sub-module, and an organization adaptability validation sub-module, and performs the validation layer by layer in sequence. When the validation fails, a feedback loop is triggered. The feedback loop module is used to encapsulate the problem feedback list and the knowledge retrieved for supplementary retrieval into correction prompts when the generated content fails the validation, and then return it to the content generation module for supplementary generation or correction. The output module is used to generate and output the final proof documents that meet the requirements; The blockchain evidence storage module is used to calculate the hash value of key files imported into the corpus and upload them to the blockchain platform to obtain evidence storage records. When outputting evidentiary documents, it automatically adds reference labels containing data fingerprints and evidence storage information. The feedback learning module is used to obtain the revisions made by the reviewers to the generated documents. It identifies the differences between the generated content and the revised content through a comparison algorithm and feeds the difference data back to the dynamic prompt word generation module or the instance information retrieval module to optimize subsequent generation strategies.
17. A computer device, characterized in that, It includes a memory and a processor, which are interconnected and communicate with each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the automatic generation method for document management system manual certification documents as described in any one of claims 1 to 15.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the automatic generation method for document management system manual certification documents as described in any one of claims 1 to 15.